Hi,

I just installed Gmap and acquired my API key. Before adding the key i could see the map. After adding the key, the map under node locations and build a macro are grey/empty. The map under User locations, however, comes up just fine.

I've seen some people post about this but have not seen any conclusive answers/fixes.

Sorry I cannot help out here ... I'm not a developer.

Any ideas would be much appreciated!

Comments

meximese@drupal.org’s picture

I'm not sure if this is right, but check the API key you probably entered for the Location module. It's under admin/settings/location/geocoding; choose Configure Parameters to edit the key. The API for both modules probably needs to match for things to work right.

jonnyz’s picture

Thanks. I had entered the key in both places at the same time. So I think we can rule that one out.

jonnyz’s picture

Just discovered a new clue ... It seems that when there are locations associated with a specific map the grey shows up, but when it cannot find any locations to plot, it does show the map.

For instance, when i deleted the two nodes that contained location data, the Node Locations map worked again. And when I added my user location to my account settings, the User Locations map stopped working.

So...if data exists for a map, it displays grey. No data, it works.

Hmmmm......

jonnyz’s picture

Well, it looks like I figured it out and may have uncovered a bug. Under Marker Manager (In the GMap Config admin/settings/gmap) I had originally selected "GMarker Manager" just because I always assume adding Google to the mix can't be a bad thing. After I changed it back to "No manager (use addOverlay directly)" the grey map issue went away. Not sure how to use the Marker Manager but it is either not working or I am not aware of other files/requirements to get the Google GMarker Manager working.

Assuming there are no other requirements to get this working, I believe this to be a bug.

JZ

ray007’s picture

yes, I have the same problem here.
without a marker manager, the map shows up fine, with marker manager the map is just grey and firebug shows me javascript errors:

Drupal.gmap.marker has no properties (.../modules/gmap/js/gmarkermanager_marker.js Line 12)
a.q() has no properties (http://maps.google.com/mapfiles/maps2.69.api.js Line 1055)

when using "Google's GMarkerManager"
and

Drupal.gmap.marker has no properties (.../modules/gmap/js/clusterer_marker.js Line 12)
Clusterer is not defined (.../modules/gmap/js/clusterer_marker.js Line 9)

when using "Jef Poskanzer's Clusterer"
as Marker manager

ray007’s picture

Small status update:

using the very latest version from cvs, I now at least see a map when using "Jef Poskanzer's Clusterer", but I still get the 2 javascript errors, I don't see the map-navigation controls and (you guessed it) no markers either.
using "Google's GMarkerManager" still results in a gray map.

bdragon’s picture

Status: Active » Closed (duplicate)

Neither clusterer or gmarkermanager are currently working. It's been on my todo list like forever...

Nikita.Leonov’s picture

Constructor of GMarkerManager should be called only after call to map.setCenter function, i assume it is because GMarkerManager can't setup viewport correctly. If you will not call map.setCenter before initialization of GMarkerManager, you will get grey map.

Do not works:
map = new GMap2(document.getElementById("map"));
mgr = new GMarkerManager(map);

map.setCenter(new GLatLng(55.73948, 10.67871), 9);

Works:
map = new GMap2(document.getElementById("map"));
map.setCenter(new GLatLng(55.73948, 10.67871), 9);

mgr = new GMarkerManager(map);