October 2017
Intermediate to advanced
370 pages
8h 57m
English
Now we're ready to add a map to our AMP pages. The Google Maps Embed API is probably the easiest way to get going with maps since it doesn't require any JavaScript programming, and is designed specifically to be used with iframes.
The Embed API is all about building the correct URL to request the map you want. We can start with the following code to embed a map within an AMP page:
<amp-iframe height="400" width="auto" layout="fixed-height" sandbox="allow-scripts allow-same-origin allow-popups" frameborder="0" allowfullscreen src="https://google.com/maps/embed/v1/place?q=place_id:ChIJK_hq758OZ0gRc-q7KyQHvqo&key=YOUR_KEY ...
Read now
Unlock full access