How to display location info on GMap in Drupal

There are many reasons to integrate your Drupal site with Google map (GMap). You can create a business directory with company contacts and locations, or a list of local restaurants with directions. Good news is that it can be achieved using Gmap and Location Drupal modules. And we will show you how to use Gmap and Location modules in Drupal in this article.

Demo of GMap in a Drupal site

Let's take our Drupal theme ST Pipe as an example. Basically it is a restaurant review website. It shows restaurant information such as images, contact details and a Gmap block to show directions to the location. Very nice way to make the content more appealing to users.

The following section is how we implement this feature in Drupal.

How to use Drupal Gmap and Location modules

  1. Download Drupal GMap and Drupal Location modules.
  2. Go to admin/build/modules page, enable Location, Gmap, and Gmap Location.
  3. Go to admin/settings/location, enable "Display of Locations", and check "Use a Google Map".

  4. Go to http://code.google.com/apis/maps/signup.html and get an API key for your URL.
  5. Back to admin/settings/gmap, paste in your API key, scroll to the bottom of the form, and save the configuration.  (You must do this before the other configuration options will work.)
  6. On the same page, set your Default Map Settings - this is for zooming, marker or etc. You can ignore it for now.
  7. Go to admin/settings/gmap_location and adjust the settings for your user and node maps.  If you're not going to use one or the other, just ignore it.
  8. Go to admin/user/permissions and set the permissions for the gmap_location and location modules. 
  9. Go to admin/content/types, edit each content type that you want to show location information, and turn on the Locative Information settings.
     
  10. Edit or create a new node of a type that you want to set location. Under Location, click on the map to add a marker.  Pick up and drop the marker repeatedly to zoom in so you can place it more precisely.  (This is a lot quicker than zooming and panning)
  11. Go to admin/build/block, assign Location map block into Content region. In ST Pipe, we asign it into "Node Location" region.

This is done. Hope you have a great time with Drupal Gmap and Location modules. how do you get rid of bed bugs how many calories to lose weight