Hi,

I have got the Gmap to show markers for users of the site. I want to cluster multiple users from the same city as only 1 is showing up per city at the moment. However when I use the Clusterer2.js or ClusterMarker.js all the markers disappear from the map. I have downloaded the files and added to the 'thirdparty' folder as instructed.

Is anyone else having this problem?

Thanks

Comments

Logan McMillan’s picture

Version: 6.x-1.0 » 6.x-1.1-rc1
Psi-factor’s picture

Confirm, if marker have 2 location with same coordinate, gmap show ONLY last marker (tip & link to node show only for last added node)

dan.crouthamel’s picture

If it helps, I outline a modification I made to gmap here -> http://drupal.org/node/284481#comment-1223924, which allows for showing multiple markers with the same lat/long

tonycpsu’s picture

Subscribing.

gorillapictures’s picture

That is correct. I have 10 markers on the one spot - only 1 shows. When I try and use Clusterer etc. they all disappear.....but then I found out they sometimes appear at different zooms.

Anyone else get that?

webavant’s picture

I am having the problem where absolutely no markers appear on the initial load. If I zoom in or out one level, they appear right away and seem to function normally after that. Clusterer works fine for me, but ClusterMarker has this problem. None of my locations share the same coordinates.

nickbaker’s picture

StatusFileSize
new308 bytes

I also wanted to use ClusterMarker, but found the markers would not render on initial page load.

The markers would only display after changing map type, moving or zooming - investigation showed this was due to ClusterMarker's refresh method not being called until one of the events maptypechanged, moveend or zoomend occurred.

My fix was to add the following code to clustermarker_marker.js (in the gmap module's js directory):

  obj.bind('markersready', function () {
    obj.clusterMarker.refresh();
  });

This was added to the Drupal.gmap.addHandler function, following the clearmarkers handler binding.

I'm using 5.x-1.1-rc1, but the clustermarker_marker.js in 6.x-1.1-rc1 appears to be the same, as does markerloader_static.js, whichs fires the markersready event.

I'm attaching a patch file, in case it may be of use to someone else.

nemchenk’s picture

nick.baker's patch works perfectly for me with GMap 6.x-1.1-rc1 and ClusterMarker 1.3.2. Thank you! :)

Cybergarou’s picture

Version: 6.x-1.1-rc1 » 6.x-1.x-dev
Status: Active » Reviewed & tested by the community

This has been plaguing me for a very long time now. The patch in #7 solves the problem. I wouldn't be surprised if the problems I saw with some of the other marker managers have the same cause.

It's worth noting that anyone who has the autozoom feature enabled won't see this problem, presumably since autozoom triggers the zoomend event.

marcp’s picture

StatusFileSize
new636 bytes

The fix in #7 works for me too so I created a true patch file (apply it with patch < gmap-cluster-issue-406618.patch in modules/gmap/js.

I'm not sure how others are getting by with clustering without this fix in place.

duellj’s picture

I can confirm that the patch in #10 applies correctly and solves this problem.

bdragon’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.