iFrame doesn't work on AMP pages

Cris Hazzard's Avatar

Cris Hazzard

02 Nov, 2018 08:45 PM

I think you have a script that removes some UI when you view a map link in an iFrame. And it works great in a regular iFrame.

When I embed the CalTopo map link in an AMP iFrame, the script doesn't run correctly and I get a zoom out showing the whole USA.

Google Spec:
https://www.ampproject.org/docs/reference/components/amp-iframe

Sample Code:
<amp-iframe width="600" height="300" layout="responsive" sandbox="allow-scripts allow-same-origin allow-popups" frameborder="0" src="https://caltopo.com/m/P71V"></amp-iframe>

Screenshot of results attached (should be zoomed into SoCal, Mt Baldy area with that link)

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Already uploaded files

  • Screen_Shot_2018-11-02_at_13.39.46.png 684 KB

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac