Drupal is a registered trademark of Dries Buytaert
Protected Pages 3.0.0 Major update available for module protected_pages (3.0.0). Commerce Core 3.3.8 Minor update available for module commerce (3.3.8). Search API HTML Element Filter 1.0.7 Minor update available for module search_api_html_element_filter (1.0.7). Layout Builder Reorder 2.0.1 Minor update available for module layout_builder_reorder (2.0.1). Ban 1.1.0 Minor update available for module ban (1.1.0). Field Formatter Range 2.0.0 Major update available for module field_formatter_range (2.0.0). Field Formatter Range 8.x-1.8 Minor update available for module field_formatter_range (8.x-1.8). UI Patterns (SDC in Drupal UI) 2.0.18 Minor update available for module ui_patterns (2.0.18). Search API Solr 4.3.11 Module search_api_solr updated after 14 months of inactivity (4.3.11). Provus Mega Menu Module provus_mega_menu crossed 1,000 active installs.

Simple Google Maps

23,454 sites Security covered
View on drupal.org

This module provides a simple way to display a Google Map embedded in your content by entering an address into a text field. It allows you to show a dynamic map, a static map, a link to Google Maps, or a combination of these.

This module is about the simplest way to display a Google Map, and/or a link to a Google Map, in your content. It provides a field formatter for Drupal plain text fields (it can also be used on Computed Fields module fields). You enter an address that Google Maps can recognize in the field, and the formatter displays it as a dynamic Google map, a static Google map (without the ability to zoom/pan etc.), a link to Google Maps, or some combination.

If you want to do something more complicated than this, such as displaying location fields from multiple nodes on a map, see:
https://www.drupal.org/project/gmap

Installation and configuration

  1. Install/enable as any other module. No additional downloads are required.
  2. Add a plain Text field to your content type, taxonomy vocabulary, user accounts, comment type, or whatever. (Fields from the Computed Fields contributed module are also supported.) You probably should add some Help text to the field to explain that a one-line address that Google Maps can recognize needs to be entered, and that the output will be formatted with a map (or a link or both, depending on how you are using this field).
  3. On the Manage Display screen, choose the provided mapping formatter for your text field, and make sure the field is not Hidden.
  4. If desired, change the field display settings. For static maps, you will need to enter a Google maps API key and set up billing for maps with Google.
  5. After you have it all set up, make sure to click Save/Submit at the bottom of the Manage Display page.

You can also use this formatter to display the field in Views. Add the text field you set up to your view, choose the map formatter, and set options as desired.

You can also override the display output of this formatter in your theme, by overriding the simple-gmap-output.tpl.php file in the usual way (in Drupal 8, the template file is templates/simple-gmap-output.html.twig).

Caveats and notes

  • Several users have experienced problems when attempting to embed a dynamic map display in a tab, collapsed field set, Panels, etc. This is due to bugs in Google Maps itself, and there is not anything that can be done about it in this module, unfortunately. For more information, see: #2166781: [meta] Display issues with Simple Google Maps.
  • In the past, Google allowed people to embed maps in their site without an account. At some point, they changed it so that you needed an API key in order to display static maps (and this module added the ability to enter your API key in the settings). Later still, Google changed its policy so you now need to set up billing (give them a credit card number) in order to use an API key to display static maps. At this time, embedding a dynamic map does not require an API key or billing, and making a link works without an API key (that just links to a Google URL).

Activity

Total releases
2
First release
Jan 2025
Latest release
1 year ago
Releases (12 mo)
0 ▼ from 2
Maintenance
Dormant

Releases

Version Type Release date
4.0.0 Stable Jan 29, 2025
3.1.1 Stable Jan 22, 2025