googlearchive / js-marker-clusterer

A marker clustering library for the Google Maps JavaScript API v3.
https://googlemaps.github.io/js-marker-clusterer/docs/reference.html
Apache License 2.0
1.28k stars 775 forks source link

"mouseover" and "mouseout" events #112

Open Dschuli opened 7 years ago

Dschuli commented 7 years ago

Are "mouseover" and "mouseout" events supported for js-marker-clusterer? Cant find any documentation re supported events.

Thx a lot for any hints?

Remo commented 7 years ago

I'm a bit late, but if you still wonder about this, here's how it works:

var markerCluster = new MarkerClusterer(
  map,
  markers,
  {
    imagePath: '../images/m', 
    onMouseoverCluster: function (clusterIcon, event) { alert('mouse over'); },
    onMouseoutCluster: function (clusterIcon, event) { alert('mouse out'); }
  }
);

You probably have more luck posting such questions in our fork as this repo isn't maintained anymore: https://github.com/gmaps-marker-clusterer/gmaps-marker-clusterer I've also updated our documentation regarding these two events: https://gmaps-marker-clusterer.github.io/gmaps-marker-clusterer/#reference-options

Dschuli commented 7 years ago

Thanks - in the meantime I created a fork and would definitely prefer a maintained solution. Will take a look at your suggestion. The other change I needed was to have the zoom-in-on cluster triggered by a double click as I needed the click event for select/deselect functionality

Remo commented 7 years ago

Let me know if there's anything I can do to get you on board of our fork, it would be great if the community would work together on a single fork!

Dschuli commented 7 years ago

Will let you know - is your fork available as npm or athmosphere package?

Remo commented 7 years ago

npm! https://www.npmjs.com/package/gmaps-marker-clusterer