Display a Google Map in an iFrame on a Drupal Website

Getting a Google Map to display in an iframe on a Drupal site means following a very specific set of steps. Here's one solution, using the iframe module.

Embedding a Google Map via an iframe makes it very convenient for your viewers. The map displays well, and has helpful links: Directions, View in Google Maps, etc. This is tricky to do using standard Drupal input formats, but is made much easier with the iFrame module - which allows you to create an iframe field on any content type. Finding the Google Maps embed link can also be challenging (and it's the only one that will work in an iframe), so here's how to find it.

Requirements: Drupal 7 site, iFrame module, iframe field.

First, log into Google.

Find the map you need on Google Maps, e.g.:
https://www.google.com/maps/place/5001+Great+America+Pkwy,+Santa+Clara,+CA+95054/@37.4044488,-121.975247,17z

On that page, click the Share icon:
Google Map 

In the box the appears, click the Embed map tab:

Google Map embed screen

 

Use the code in the top row in your iframe field, but only the src link (which starts with https:)

 

In this example, here is the entire code, but you only need the URL, which is highlighted in yellow:

Google Map iframe embed code

 

Put the URL (only) in the Drupal iframe field, save the node, and enjoy your beautiful iframe map!

Google Map iframe