-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
AMP: Building Accelerated Mobile Pages
By :
The Google Map is the cornerstone of many Contact or Find us pages on the web. In the following sections, we'll see how to add a Google Map to an AMP page with amp-iframe. After that, we'll see how to:
We'll start off with the Google Maps Embed API, which just requires you to configure a URL to request a map to display in the iframe. We can achieve quite a lot with the Embed API, but we'll get to a point where we'll need to use the more powerful Google Maps JavaScript API, which allows us to build and configure maps through JavaScript programming.
Note that you're not limited to using Google Maps in AMP. You could equally use any map tile provider, such as OpenStreetMap, along with any JavaScript API you like, such as the wonderful leaflet.js.