user3887061
user3887061

Reputation: 61

Google Maps Markerclusterer end event

I am using markerclusterer for Google Maps in the home page of my project.

I am showing a page loading image till the markerclusterer loads fully (with its complete total of markers)

The below code does not work for me.

google.maps.event.addListener(markerCluster, 'clusterend', function() {
$("#intialimage").hide()
});

In place of 'clusterend', I tried with 'clusteringend', 'click','clusterclick' instead etc., for testing purpose.

I suspect the image is in foreground and does not let the markerclusterer receive the event.

Using a div and CSS class, the image is shown. Unable to get proper syntax for the addlistener of markerclusterer for the cluster end event.

Could anyone suggest on which could have gone wrong or any other suggestion?

Upvotes: 6

Views: 4950

Answers (1)

Эрих Гайлис
Эрих Гайлис

Reputation: 69

i had the same problem. i change library - @version 2.0.8 [February 9, 2012] https://code.google.com/p/google-maps-utility-library-v3/source/browse/trunk/markerclustererplus/src/markerclusterer.js?r=360

and it work:

        var markerCluster2 = new MarkerClusterer(map, markers, mcOptions);
        google.maps.event.addListener(markerCluster2, 'clusteringend', myFunction);

Upvotes: 3

Related Questions