views:

64

answers:

1
  1. Which modules can I use to add a google map to a node with a address entered by a user, so that the location shows on the map? (i'm asking, because I tried a few and could never find one that worked straight off the bat)
  2. Am I allowed to just use google maps?
  3. Will the Google Map API work from my local machine, or will it only work once it's online acting from the registered website address?
+2  A: 

Hi,

You should be able to get what you want using the two following modules :

GMap

The GMap module provides an interface to the Google Maps API within Drupal. It integrates with the Location module to provide users a clickable map for entering latitude and longitude, as well as to display maps of Drupal nodes and users.

Location

The Location module allows real-world geographic locations to be associated with Drupal nodes, including people, places, and other content. The Location module allows admins to collect addresses, geocode them (translate addresses to lattitude/longitude), and associate locations with Drupal nodes and users.


About your question 3) :

  • you can get one API key for your production website, and others for your other environments (like dev, test, staging, ...)
  • if you don't have the right API key (in dev, for instance), you'll have a not-nice JS alert each time a map loads -- but it should still be displayed.

You can take a look at this entry from Google maps's FAQ : How does the Google Maps APIs key system work?

Pascal MARTIN
This kinda does the trick, but it doesn't seem to allow users to just type in their address, and then automatically show the map. I.e. they have to go manually find it on the map. Which is a real pain.
RD
The location module will generate a map coordinate from the typed addr ess. Then the coordinate will appear in the gmap block. Or you call print theme('gmap', $map_array); after filling in the $map_array structure.
Tom