Closed herooutoftime closed 8 years ago
This is something I'm going to look into for a future version. Others have asked for this as well.
@herooutoftime -- I tried implementing your above code, in a temp. fashion before this feature is officially supported, but I'm seeing an error:
"Uncaught ReferenceError: MarkerClusterer is not defined"
Thoughts? I'd appreciate any feedback. Thanks.
Nevermind, forgot to include markerclusterer.js -- via http://google-maps-utility-library-v3.googlecode.com/svn/trunk/markerclusterer/src/markerclusterer.js
Could you please let me know whereabouts this goes
... if(_this.settings.markerCluster === true) { var markerCluster = new MarkerClusterer(map, markers, { 'styles': _this.settings.markerClusterStyles }); } ...
Thanks
@chuck808, I placed it on line 1890 in jquery.storelocator.js; however, this may differ from yours, for I have various additions/edits throughout the doc.. Nevertheless, I have it directly below the code that sets the list li background colors...
Search for the comment: "// Add the list li background colors" in your doc... and place it under that.
Hi ddalli,
Sorry for the delayed response. I haven't had time to give it a go yet but thank you very much for your help.
Thanks, works great except for the markerClusterStyles , for some reason, I can't make it work, anyways, just use 'markerCluster': true, and then it all works fine ! :+1:
I've added support for Marker Clusterer in v2.6.0 with the new markerCluster setting. When set, that setting value (needs to be an object) gets passed in to the third parameter of the MarkerClusterer constructor (options object). https://googlemaps.github.io/js-marker-clusterer/docs/reference.html
Would be a nice enhancement to add marker clustering ability. Had to implement a really basic approach myself but could be done far more extensive.
To apply it:
And in the plugin itself like this: