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

Uncaught TypeError: Cannot read property 'fromLatLngToDivPixel' of null #50

Open junalmeida opened 8 years ago

junalmeida commented 8 years ago
MarkerClusterer.getExtendedBounds
MarkerClusterer.createClusters_
MarkerClusterer.redraw  
(anonymous function)    
_.J.trigger 
(anonymous function)    
_.J.trigger 
rb  
_.t.set 
bA.R
farin commented 7 years ago

did you call setMap(null) or try to remove overlay in different way? Mind that there is function clearMarkers() for that purpose.

SamanthaAdrichem commented 7 years ago

I get this error when i execute:

markerCluster.setMap(null);

This is how many people advice to update your marker cluster, instead you should indeed use what farin says:

markerCluster.clearMarkers();
markerCluster.addMarkers( markers );