Fire Event After MarkerClusterer Completed

So, I have an application containing a map with several hundred markers. I use the markerclusterer.js provided by Google to group my markers and make everything easier to look at. I am using V3 API.

I'm alright. But what I would like to do is perform some actions when markerclusterer has finished clustering all the markers. I tried to do it myself, but I donโ€™t look.

Any suggestions? (I guess it will be easier than I think, and my brain is just fried)

+6
source share
2 answers

I was just wondering the same thing. Here is how I did it:

google.maps.event.addListener(markerClusterer, 'clusteringend', myFunction); 
+5
source

Will the idle event work? It should fire after MarkerClusterer finishes (provided that you load MarkerClusterer when the page loads).

+1
source

Source: https://habr.com/ru/post/926854/


All Articles