kstukstu / google-maps-utility-library-v3

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

Map must be reset before each refresh in MarkerClusterer #13

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
This bug is visible in the advanced example here:
http://google-maps-utility-library-
v3.googlecode.com/svn/trunk/markerclusterer/examples/advanced_example.html?

To reproduce the problem:
1. go to the advanced example
2. click on a cluster or zoom in/out
3. then click on the "Refresh Map" button
4. retry clicking on a cluster or zooming in/out

Expected result:
When clicking on a cluster after refreshing the map, you would expect the 
markers to be 
regrouped after the map zooms in.

Actual result:
The clusters remain the same, such that even if you zoom out all the way, you 
would see multiple 
clusters layered on top of each other.

I've found that one way of working around this is to simply reset the map 
before each request. 
For example, you might add the following code at the beginning of the 
refreshMap() function:

map = new google.maps.Map(document.getElementById('map'), {
    zoom: 2,
    center: new google.maps.LatLng(39.91, 116.38),
    mapTypeId: google.maps.MapTypeId.ROADMAP
});

Version: Trunk

Browser / Operating System:
FF3 and Chrome 5 on OS X

Original issue reported on code.google.com by RNaw...@gmail.com on 3 Jun 2010 at 11:36

Attachments:

GoogleCodeExporter commented 9 years ago
I'm not able to replicate this. Are you still seeing a problem?

Original comment by lu...@google.com on 19 Oct 2010 at 3:58

GoogleCodeExporter commented 9 years ago

Original comment by lu...@google.com on 16 Nov 2010 at 12:45