cybersthang / gmaps-utility-library-dev

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

MarkerClusterer fails to cluster at max map zoom level #131

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
0. Create a marker clusterer with no max zoom option
1. Create several markers at exactly the same latlng
2. Zoom the map to its maximum resolution where the markers are
3. At the maximum resolution, markers are not clustered

What is the expected output? What do you see instead?

Markers should be clustered at any resolution level if no max zoom option 
is selected.

What version of the product are you using? On what operating system?

Tested on development version. I am attaching a modified simple-example.htm 
of marker clusterer that shows the error.

Please provide any additional information below.

It can be solved by changing the following lines in the redraw_ function of 
marker clusterer:

    var mz = markerClusterer.getMaxZoom_();
    if (mz === null) {
      mz = map_.getCurrentMapType().getMaximumResolution();
    }
    if (zoom_ >= mz || this.getTotalMarkers() === 1) {

to

    var mz = markerClusterer.getMaxZoom_();
    if (mz === null) {
      mz = map_.getCurrentMapType().getMaximumResolution();
    }
    if (zoom_ > mz || this.getTotalMarkers() === 1) {

or just

    var mz = markerClusterer.getMaxZoom_();

    if ((mz !== null && zoom_ >= mz) || this.getTotalMarkers() === 1) {

Original issue reported on code.google.com by spallad...@gmail.com on 15 Jul 2009 at 6:06

Attachments:

GoogleCodeExporter commented 8 years ago
Another patch! :) Shall I just add you to the project? Instructions for joining 
are 
here:
http://code.google.com/p/gmaps-utility-library-dev/wiki/FrequentlyAskedQuestions

Original comment by pamela.fox on 15 Jul 2009 at 9:19

GoogleCodeExporter commented 8 years ago
Fixed in r1017. For some reason the svn log command did not update the issue's 
status.

Original comment by spallad...@gmail.com on 23 Jul 2009 at 1:13