Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Marker cluster #33

Closed
herooutoftime opened this issue Oct 6, 2014 · 8 comments
Closed

Marker cluster #33

herooutoftime opened this issue Oct 6, 2014 · 8 comments
Labels

Comments

@herooutoftime
Copy link

@herooutoftime herooutoftime commented Oct 6, 2014

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:

...
,'markerCluster': true
,'markerClusterStyles': [{
        url: 'cluster1.png'
        ,width: 90
        ,height: 67
        ,anchor:[11,37]
        ,textColor: '#ffffff'
    },{
        url: 'cluster2.png'
        ,width: 90
        ,height: 67
        ,anchor:[11,37]
        ,textColor: '#ffffff'
    },
...

And in the plugin itself like this:

...
if(_this.settings.markerCluster === true) {
    var markerCluster = new MarkerClusterer(map, markers, {
        'styles': _this.settings.markerClusterStyles
    });
}
...
@bjorn2404

This comment has been minimized.

Copy link
Owner

@bjorn2404 bjorn2404 commented Nov 3, 2014

This is something I'm going to look into for a future version. Others have asked for this as well.

@ddalli

This comment has been minimized.

Copy link

@ddalli ddalli commented Nov 13, 2014

@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.

@ddalli

This comment has been minimized.

Copy link

@ddalli ddalli commented Nov 14, 2014

@chuck808

This comment has been minimized.

Copy link

@chuck808 chuck808 commented Jan 5, 2015

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

@ddalli

This comment has been minimized.

Copy link

@ddalli ddalli commented Jan 5, 2015

@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.

@chuck808

This comment has been minimized.

Copy link

@chuck808 chuck808 commented Jan 7, 2015

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.

@angeenes

This comment has been minimized.

Copy link

@angeenes angeenes commented Mar 14, 2015

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 ! 👍

@bjorn2404

This comment has been minimized.

Copy link
Owner

@bjorn2404 bjorn2404 commented Jun 19, 2016

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

@bjorn2404 bjorn2404 closed this Jun 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.