cybersthang / gmaps-utility-library-dev

Automatically exported from code.google.com/p/gmaps-utility-library-dev
0 stars 0 forks source link

MarkerClusterer does not remove off-screen clusters that have zero markers #147

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Add some markers to MarkerClusterer and set an appropriate zoom level so
that they cluster together
2. Navigate the map so that the cluster marker is off screen, do not change
the zoom level
3. Remove the markers using MarkerClusterer.removeMarker(marker)
4. Navigate back to where the cluster was

What is the expected output? What do you see instead?
I expect to not see a cluster. I see a cluster as it was when created (same
label with number of contained markers), zooming in will remove the cluster
but never show the markers as they've been removed.

What version of the product are you using? On what operating system?
I'm using the development version, haven't tested this against stable.
Firefox 3 in Ubuntu Hardy.

Please provide any additional information below.
To fix it, either force redraws when removing a marker from the cluster in
MarkerClusterer.removeMarker or change the check in cluster.redraw for
"this.getTotalMarkers() === 1" to be "this.getTotalMarkers() <= 1"

Original issue reported on code.google.com by deansa...@gmail.com on 25 Aug 2009 at 11:38