October 2017
Intermediate to advanced
370 pages
8h 57m
English
First, we need to create another, non-AMP page to hold the Google Map. This page will contain JavaScript code that will:
Then we'll use the URL of this page as the src attribute of the amp-iframe in the AMP page.
The code for the map in this example is a modified version of sample code available on the Google Maps documentation page here: developers.google.com/maps/documentation/javascript/geolocation.
Before we begin, we need to get a key (it's free!) for the Google Maps JavaScript API. You can follow the same process to get a key for the JavaScript ...
Read now
Unlock full access