5

I am running a google maps v3 web site and today markers that are wider than 55 disappear when zooming in and reappear when zooming out. These markers have shown alright until today, maybe google has changed something?

1
  • Which version of the API are you running? It seems like a new release might be in progress.
    – geocodezip
    Nov 21, 2012 at 12:38

5 Answers 5

1

It seems to be the anchor that does not accept negative values anymore. When I change to a positive value the markers show at all zoom levels.

1
  • Reporting this as an issue in the issue tracker and providing a link to an example that demonstrates the problem (or attaching example files to the issue), might get it fixed.
    – geocodezip
    Nov 22, 2012 at 3:21
1

I solved the problem with

map.panTo(defaultMarker.getPosition());

And then fitBounds to all markers...

Only ugly think is that the map is zooming from marker up to all and that´s not looking nice...

0

I concur with Henkemota. My custom markers just started to disappear on zoom change as well. The "Anchor" value was slightly larger in the Y direction to offset the marker slightly north of the "Position". Changing the value to be within the size of the icon fixed the issue. It was working fine for weeks, so something must have changed in the API. Thank you for posting your solution as that would have been very hard to track down.

0

Maybe it is a Google api bug, I found Issue 167 - Moved marker disappears when using Marker Clusterer (Plus) might be helpful to you.

0

it did the same for me (I use custom markers). I changed the pane to which I attached the custom markers to, from floatPane to overlayMouseTarget. It seems this is a secondary effect on choosing on which pane you want your markers to live:

var panes = this.getPanes();
panes.overlayMouseTarget.appendChild(div);

from this example: https://developers.google.com/maps/documentation/javascript/customoverlays

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.