Yesterday during Lab Hours we went through the process of adding and configuring a GMap view in a Drupal site. We've done this before but ran into a few hurdles that we'd forgotten about. Here is the first of several tips to keep you from suffering as much as we did.
Our frustration is rooted in the fact that the settings for a successful GMap implementation are spread far and wide in Drupal. Once you think you've handled everything, another hidden setting must be found and dealt with. You must complete settings for three separate modules:
GMap, GMap Location (which comes packaged with GMap module) and
Location (a separate module).
Here's our Tip: You need to add your Google Maps API key in TWO places in your settings. One is logical, the other confusingly hidden away (in our humble opinion).
First, the key (which you must obtain directly from Google before you get to this step) must be entered into the GMap module's settings. Once the module is enabled, go to Administration>Site Configuration>GMap and enter your Google map API key into the designated field.
Second, the key must also be entered into the Location module's settings. Once you have the Location module enabled, go to Administration>Site Configuration>Location and click on the Geocoding Options tab. Enable the Google Maps geocoding feature by clicking on the radio button. And you'd think you're done, right? Wrong! Before clicking on Save Configuration, look to the right under the Configure column and click on the "Configure parameters" link. I know, I know, it looks like it's next to the Yahoo Maps feature, but click it anyway. THIS is where you need to enter your Google Map API key so that the Location module will use Google Maps to geocode (essentially add latitute and longitude settings) to the location information in your nodes. Otherwise? No pins on your GMaps.
That's our tip. Note that this is not everything you need to do to get a GMap view up and running, but it is the step that's tripped us up twice now.
Comments
Post new comment