Google-Maps-for-Rails
Google-Maps-for-Rails copied to clipboard
Dynamically Cluster handling
can we send a configuration to the "Google-Maps-for-Rails" plugin to tell is when to trigger the "cluster" mode ?
I want to Dynamically on/off the cluster mode
its just a boolean right now: enable/disable clustering
Thanks for quick feedback. what is the exact command where i can set it. here is my sample code:
function pinProjectLocations(coordinates){
var handler = Gmaps.build('Google');
handler.buildMap({ internal: {id: 'project_map'}}, function(){
var markers = handler.addMarkers(coordinates);
handler.bounds.extendWith(markers);
handler.fitMapToBounds();
});}
its in the handler options (https://github.com/apneadiving/Google-Maps-for-Rails/blob/master/vendor/assets/javascripts/gmaps/objects/handler.coffee#L3-L11)
var handler = Gmaps.build('Google', { markers: { clusterer: null } });
it worked ... I'm enjoying this plugin implementation...Thanks man.
@apneadiving Tried that but all my points are drawn with display: none
style. Also setIgnore(true)
gives the same result (
Sorry, my fault – everything works well.