Custom overlay disappears at certain zoom level

1,854 views
Skip to first unread message

Boris Rarden

unread,
Sep 12, 2011, 5:27:33 PM9/12/11
to google-map...@googlegroups.com

I am having a problem with a custom overlay icon marker in google maps. It works fine at all zoom levels, but disappears at max zoom. In the demo only the lower icon disappears, but the upper one is ok.

Demo: http://random.hypervolume.com/map_bug.html

Try to zoom in on the lower marker, the one on 34-th street. At max zoom level it disappears.



sample.html

Rossko

unread,
Sep 12, 2011, 9:56:15 PM9/12/11
to Google Maps JavaScript API v3
> Try to zoom in on the lower marker, the one on 34-th street. At max zoom
> level it disappears.

Not for me ; it is just not where you expected - look 'up and to the
left'.
Your image top left corner is nailed to a geographic position away
from the intersection ; maybe you meant to nail its centre to a
geographic point instead.

Why not just use ordinary marker icons with custom images?

Boris Rarden

unread,
Sep 13, 2011, 2:13:01 PM9/13/11
to google-map...@googlegroups.com
It happens in Safari 5.1 on a mac. As well it happens in iPhone simulator 4.3.  

I just tested it in Google Chrome (on mac) and Firefox 3.6 (on mac) and it doesn't happen -- it works properly.

I looked up and to the left and it is not there. Furthermore, I used firebug to see that it is actually hidden behind the map layer. This is illustrated in the screenshot attached. In one of the screenshots, as I point my mouse on the marker element in debug console, I see it highlighted -- this means I'm pointing to the right element. After I zoom in, it just highlights a blank square.

visible.png
max_zoom.png

Boris Rarden

unread,
Sep 13, 2011, 2:14:06 PM9/13/11
to google-map...@googlegroups.com
I'm not using ordinary markers with custom images, since I would like to put a number inside the circle. (This represents a cluster).

Rossko

unread,
Sep 13, 2011, 4:41:38 PM9/13/11
to Google Maps JavaScript API v3
> It happens in Safari 5.1 on a mac

I'm unable to help with that.

> I'm not using ordinary markers with custom images, since I would like to put
> a number inside the circle. (This represents a cluster).

Like MarkerClusterer does
http://google-maps-utility-library-v3.googlecode.com/svn/tags/markerclustererplus/2.0/examples/simple_example.html
does that work in Mac Safari?
>  visible.png
> 45KViewDownload
>
>  max_zoom.png
> 49KViewDownload

Boris Rarden

unread,
Sep 13, 2011, 5:08:20 PM9/13/11
to google-map...@googlegroups.com
My code is based on the MarkerClusterer code.  However, it is hard to see this in their demo, since at max zoom level the cluster is replaced by a normal marker.  So I can't test that without ripping the MarkerClusterer code appart.

Rossko

unread,
Sep 13, 2011, 6:06:29 PM9/13/11
to Google Maps JavaScript API v3
> My code is based on the MarkerClusterer code.

Slooowly the info comes out

> So I can't test that without ripping the MarkerClusterer
> code appart.

Put a bunch of markers very close together?

Boris Rarden

unread,
Sep 13, 2011, 7:02:53 PM9/13/11
to google-map...@googlegroups.com
Ok, it doesn't happen with MarkerClusterer.  Here's an equivalent demo:


It is not clear to me why that happens, but I think it has to do with hiding & showing the overlay that the ClusterMarkerer does, but in my case I just don't touch it.  It is still  a bug in my opinion.

Boris

Boris Rarden

unread,
Sep 19, 2011, 8:59:21 PM9/19/11
to google-map...@googlegroups.com
It is still happening, I don't know how to fix this, and it shouldn't be hapenning -- it is a bug. Here's another demonstration:






en4ce

unread,
Nov 8, 2011, 11:16:00 AM11/8/11
to Google Maps JavaScript API v3
i have the very same problem, any suggestions?

Rossko

unread,
Nov 8, 2011, 11:39:02 AM11/8/11
to Google Maps JavaScript API v3
> i have the very same problem, any suggestions?

Where is your demo, perhaps it will offer more insight?
Only going wrong on mac/safari too?

Morgan

unread,
Feb 4, 2013, 7:35:47 PM2/4/13
to google-map...@googlegroups.com
I have run this demo on the iPad2 iOS 6.01(10A523) / Safari and the marker on 34th street does indeed disappear on max zoom.

Boris Rarden

unread,
Feb 4, 2013, 8:17:02 PM2/4/13
to google-map...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages