Markers randomly appear behind Polylines

156 views
Skip to first unread message

Tiby Ionescu

unread,
Oct 26, 2011, 3:21:44 PM10/26/11
to Google Maps JavaScript API v3
Since I updated to Chrome 15 a weird thing is happening: I have a
drawing app that has that common little square markers for vertices
and midpoints. Now whenever I pan or zoom with markers on, they
sometimes get behind the polyline, completely random. They also get
back in front if you continue to pan and zoom.

I verified in IE and after I tested it a while (for about a minute)
this behavior never occurred. I also tried some variations, with
default marker images, with zIndex, but no result.

It's getting really annoying, because I can't figure if it's my fault
or it is a bug.

If you have any idea or got the same problem, please let me know.
Thanks!

Rossko

unread,
Oct 26, 2011, 3:43:02 PM10/26/11
to Google Maps JavaScript API v3
What happens if you set your little-square marker options for non-
optimized?

Enoch Lau (Google Employee)

unread,
Oct 26, 2011, 7:22:45 PM10/26/11
to google-map...@googlegroups.com
Could you post up a link please?

Enoch

Tiby Ionescu

unread,
Oct 27, 2011, 12:45:58 PM10/27/11
to Google Maps JavaScript API v3
For Rossko, I don't know what non-optimized markers are, and for
Enoch, the project is still on my localhost, but if I don't find a
solution soon, I'll upload it somewhere online and I will let you
know. Thanks

Until that, I found another interesting problem, that is the polylines
also appear in front of info windows (and not even mine, but the
default place information windows that appear when you click a place
icon). They seem like they always appear like that, and not randomly
as in case of markers. Still, in IE this does never occur.

Wasn't there some predefined behavior in the api you could never
override, that the markers appear in front of polylines, info windows
in front of them all, and so forth?

Rossko

unread,
Oct 27, 2011, 1:54:04 PM10/27/11
to Google Maps JavaScript API v3
> For Rossko, I don't know what non-optimized markers are

http://code.google.com/apis/maps/documentation/javascript/reference.html#MarkerOptions
Default optimized markers use Canvas, where the browser provides.
Non-optimized markers are constructed in DOM.
The different techniques the API uses could/should expose different
browser rendering issues.

Tiby Ionescu

unread,
Oct 27, 2011, 4:36:02 PM10/27/11
to Google Maps JavaScript API v3
Oh, sorry, I never knew it's a marker option. I tried with it set to
false and I still get the same behavior.

I made a sample test page with 2 markers, a polyline and a infowindow
(with the same annoying glitches).

http://www.artflow.ro/tibi/maps.html

If you keep the zoom constant, the first marker will be exactly above
(or below) the polyline, and the second one has an info window
attached, which if you open by clicking the second marker, the window
will also be above (or below) the polyline.

I have Chrome 15.0.874 (probably the latest version as I write this).

Try panning and maybe zooming and see if you get the same results as I
do. They should be visually clear.

Thanks!

Enoch Lau (Google Employee)

unread,
Oct 27, 2011, 7:27:47 PM10/27/11
to google-map...@googlegroups.com
I'm not seeing anything odd on your demo with Chrome 15.0.874.102 beta - the infowindow is always on top and the markers are always on top of the polyline, even when I pan around for a bit. What operating system are you using? Can you describe in more details the steps I should take after opening your page to reproduce the problem? Can you post a screenshot?

Enoch

Tiby Ionescu

unread,
Oct 28, 2011, 5:51:32 AM10/28/11
to Google Maps JavaScript API v3
Ok, I got fresh new information:

First, I tested this demo on 2 other machines, so here are details
along with mine:

My machine:
- Operating system: Windows 7 Enterprise x64
- AMD Phenom II processor with 8 GB memory
- Results:
- Before update (version 14): worked normally
- After update (version 15): got the problems described above

Machine #2:
- Operating system: Windows XP Professional x86
- I don't know the specs, but it is an old crappy rig anyway
- Resuls: both before update (version 14) and after update (15) the
demo worked perfectly normal

Machine #3 (laptop)
- Operating system: Windows 7 Enterprise x64
- Intel Pentium Dual Core processor with 1 GB memory
- Results: same as mine (before update, version 13 was installed)

So in conclusion, on two different machines running Windows 7 the
problems were encountered, but on Windows XP they were not. All three
were running the latest version of Chrome after update.

Now, to see exactly what I get, I made a little screen recording to
demonstrate it, which you can view at:

http://www.youtube.com/watch?v=ylPx8t27QuQ

I can see some kind of pattern, which remains constant: the
overlapping occurs on the sides of the screen, and in the center it
does not, and also, the zones in which this occurs remain constant.
There was something similar in my app, but I also saw exceptions.

If you watch closely you'll see the problem occurring even while I'm
panning, and not only after I stop panning.

If you want more information, please let me know.

Have a nice day!

MymsMan

unread,
Oct 28, 2011, 7:16:14 AM10/28/11
to google-map...@googlegroups.com
I can see the problem with Chrome 15.0.874.106 on Win7 Home premium x64

sb

unread,
Oct 28, 2011, 2:39:42 PM10/28/11
to Google Maps JavaScript API v3
I get the problem with chrome 15 on win7 and on my cr 48

sb

unread,
Oct 28, 2011, 2:44:48 PM10/28/11
to Google Maps JavaScript API v3
to replicate the problem;

Use Chrome 15

1. open http://www.artflow.ro/tibi/maps.html
2. click on the lower marker.
3. drag the map left or right (until the infowindow is near/off the
page).

No such problem in IE or FF.

My bad investigations have shown it probably an issue with the DOM in
Chrome,

Hope this is of help.



On Oct 27, 7:27 pm, "Enoch Lau (Google Employee)"

Tiby Ionescu

unread,
Oct 28, 2011, 4:32:43 PM10/28/11
to Google Maps JavaScript API v3
I think Enoch is using Windows XP or other OS cause I didn't encounter
the problem on Windows XP.

I tested another 2 machines running Windows 7 Enterprise x32 and
result was as expected, so that brings us to a total of 6 problematic
machines.

I'll also make some little investigations now in the chrome debugger,
and I'll keep you posted.

Cheers!

Tiby Ionescu

unread,
Nov 1, 2011, 3:38:56 AM11/1/11
to Google Maps JavaScript API v3
Should I report this as a bug to the Google Chrome team?

Enoch Lau (Google Employee)

unread,
Nov 1, 2011, 10:32:10 PM11/1/11
to google-map...@googlegroups.com
Thanks for that - I can see the problem on Windows 7 / Chrome 15.

Enoch

Enoch Lau (Google Employee)

unread,
Nov 1, 2011, 10:33:07 PM11/1/11
to google-map...@googlegroups.com
If you can, sure, that might be useful. Post a link to the bug report if you do so - then we can all track it.

Enoch

Tiby Ionescu

unread,
Nov 2, 2011, 8:16:35 AM11/2/11
to Google Maps JavaScript API v3
Your welcome.

I posted the issue in the Google Maps API bug tracker (
http://code.google.com/p/gmaps-api-issues/issues/detail?id=3711 ), but
I'll try to gather some more information from the Chrome debugger
before posting to it's own list (I suppose it's the chromium bug
tracker).

Maybe someone can help, I'm not quite familiar with the Maps / Chrome
mechanisms (especially Canvas), so I could use a little help.

Thanks!

Tiby Ionescu

unread,
Nov 11, 2011, 7:24:29 PM11/11/11
to Google Maps JavaScript API v3
Finished testing on Ubuntu 11.10 with latest Chrome version. No
problem detected.

Also posted in the Chromium bug tracker:
http://code.google.com/p/chromium/issues/detail?id=103521

Tiby Ionescu

unread,
Nov 13, 2011, 10:26:01 AM11/13/11
to Google Maps JavaScript API v3
Updated to latest version (15.0.874.120 m) and the bug is gone, so
this topic can be closed.
Reply all
Reply to author
Forward
0 new messages