yenbao1340 / 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 markers in array leftMarkers_ #137

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

1.  Create a map with markers outside of the viewport.
2.  Try to remove the Marker.
3.  Scroll to where the leftMarker would be.
4.  The marker will still appear.

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

When running removeMarker, the MarkerClusterer code does not loop through
the leftMarker_ array.  This causes a marker that should have been removed
to reappear once the marker is brought into the viewport.

I fixed this manually by adding the following code to MarkerClusterer r1018:

    315:  for (var i = 0; i < leftMarkers_.length; ++i) {
    316:    if (leftMarkers_[i] === marker) {
    317:      leftMarkers_.splice(i, 1);

    318:      return;
    319:    }
    320:  }

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

MarkerClusterer r1018.  Windows Vista.  Mozilla Firefox 3.0.12.

Please provide any additional information below.

Original issue reported on code.google.com by Ben.Talberg on 31 Jul 2009 at 11:21

GoogleCodeExporter commented 8 years ago

Original comment by pamela.fox on 1 Aug 2009 at 11:13

GoogleCodeExporter commented 8 years ago
Thanks, that fix works for me.

Original comment by deansa...@gmail.com on 26 Aug 2009 at 1:35

GoogleCodeExporter commented 8 years ago
Thanks, solved my problem

Original comment by v.mikhai...@gmail.com on 9 Dec 2009 at 1:32

GoogleCodeExporter commented 8 years ago
sorry, but i couldn't understand where you put the fix, inside which function, 
after which code?

Original comment by mn.ya...@gmail.com on 14 Jan 2011 at 2:43