GMap: Add Google Maps to your site

The GMap module is both an API and a filter to easily embed Google Maps into your site.

Drupal 6.x

The GMap package consists of the following modules:

  • GMap: provides the GMap API, integration with Views and Location, and GMap macros.
  • GMap Location: Provides a map of all a site's nodes and a map of all of the site users.
  • GMap Taxonomy: Allows you to display different map markers based on taxonomy of a specific node.
  • GMap Macro Builder: Provides a GUI for building "macros" (a text-based way of describing arbitrary GMaps).

In order to use this module, you need a (free) Google Maps API key. Note: The current version of GMap relies on Version 2 of the Google Maps API, which has been deprecated by Google as of May 19, 2010 but is still available for use. A Version 3-enabled update of the GMap module is not yet available.

Using GMap and Location to associate a node with a GMap pushpin and display a Google map on the node view page.

This overview follows the steps covered in the very nice DrupalTherapy video tutorial for location-enabling nodes and displaying a Google map on the node view page. This assumes you'll be using both GMap and Location modules. Once installed, enable the GMap, GMap Location, and Location modules. Next, check appropriate permissions for these modules in admin/user/permissions: gmap_location module: view node map and location module: submit latitude/longitude. You may also wish to enable location module: view location directory and location module: view view node location table.

Once you have your Google Maps API key, visit admin/settings/gmap and enter it, making adjustments to your map's appearance and default location as needed.

If you would like users to be able to use a Google map to set the latitude and longitude for a node (instead of typing them in), visit admin/settings/location and check "Use a Google Map to set latitude and longitude".

Next, enable a module that will allow you to create a location field for your chosen content types. You can either enable Node Locations (see the DrupalTherapy video for details) or the Location CCK module (if using the Content module).

If using the Location CCK module, click on Manage Fields for your chosen content type, and add a field of type Location. Configure the desired default fields to include (address, city, etc).

Drupal 5

gmap.module

  • Map generation and display API
  • Macro filter
  • GeoRSS feed display
  • Various utility routines

gmap_location.module

  • Store a user's location (SCHEDULED FOR REMOVAL -- will move to location.module)
  • Display a map of users
  • Display a map of nodes
  • Display a block with a map of a node's location
  • Display a block with a map of a node author's location

gmap_macro_builder.module

  • Macro builder

gmap_views.module

  • Views display plugin to render a view as a map

Drupal 4.7

gmap.module

  • Macro builder
  • Map generation and display API
  • Macro Filter
  • GeoRSS feed display
  • Various utility routines

gmap_location.module

  • Store a user's location and display it on a map
  • Store a location for each node and display it on a map
  • Display a map of users
  • Display a map of nodes
  • Display a block with a map of a node's location
  • Display a block with a map of a node author's location (incomplete)

Creating a Google Maps Mashup with Drupal and GMap

The standard GMap module in Drupal is designed to display one location at a time on a Google map. There may be times however, when you

Debugging Commonly Encountered Issues on GMap

The following is a non-comprehensive list of things to check if your markers are not showing up on a Gmap or if JS is enabled in your

GMap 5.x API

The GMap 5.x API is significantly changed from previous releases. Maps are now proper form elements (though they can still be rendered

GMap views - listing clickable nodes with a GMap

By default the GMap view only allows for a map to be displayed with markers. To display a list with the Map and to allow for interaction

How To: Custom Maps on Each Node

Please note that this article is old. Look at the assumptions section to understand what this was written for. The ideas are still

Managing Multiple Google Maps API keys

Problem: We maintain separate dev, test and production instances of our sites:

Guide maintainers

leehunter's picture