gordonbanderson / Mappable

Mappable module for SilverStripe CMS
BSD 3-Clause "New" or "Revised" License
10 stars 2 forks source link

Can not disable clusterer #29

Closed sanderha closed 8 years ago

sanderha commented 8 years ago

Hey I am trying to disable the clustering functionality.

using

$map->setClusterer( false );

Does not disable it. Even when I go directly to MapGoogleJS and set the useclusterer to false, it still clusters. Even the JS data-useclusterer attribute is set to false, but it still clusters..

What is going on?

gordonbanderson commented 8 years ago

I can replicate the bug. It seems there is a second problem in that if clustering is correctly disabled then no markers show at all.

sanderha commented 8 years ago

To work around this, I ended up editing the module itself, in the maputil.js file, line 345. I added the following:

                markerCluster.setMaxZoom(1);
                markerCluster.setGridSize(1);
                markerCluster.redraw();

Which is not very nice I know, but I didnt have time to really mess with it much

gordonbanderson commented 8 years ago

I've tested this toggling clustering on a POIMapPage I am running locally and it is now behaving as expected.

Thanks for reporting the issue.

sanderha commented 8 years ago

Very nice, thanks!