Ordering kmlLayer and overlay

162 views
Skip to first unread message

Matthieu Lux

unread,
Jan 18, 2012, 8:21:07 AM1/18/12
to google-map...@googlegroups.com

Hi,

I work on an interface with Google Maps JavaScript API V3 for some times now. In this interface, I use an "empty" mapType (map type which always return blank tile) a kml layer with all my data.

This kml contains rectangles. I develop a behavior which listen click event on one of these rectangles and draw the same rectangle with an overlay when it’s fired. It does allow the user to "hilight" my rectangles.

This worked great until today when I seen that my rectangle overlay appears behind the kml layer. After a deep search, I found that this is a API version issue. The overlay is on top with API v3.6 and behind with v3.7.

I can't understand why I getting this problems: the v3.7 update was deployed last November so why I got this now? But also: why a new version put the overlays behind? And finally: how can I do to use the last version get my rectangle on top?

If anyone has some answers for me, I'll be very grateful!

Matthieu

Enoch Lau (Google Employee)

unread,
Jan 18, 2012, 5:48:46 PM1/18/12
to google-map...@googlegroups.com
We're taking a look - thanks.

Enoch

Matthieu Lux

unread,
Jan 19, 2012, 3:55:22 AM1/19/12
to google-map...@googlegroups.com
I did some more tests with the v3.6 and I found that I have differents behaviour on when I put the first rectangle on the map. If I put it in the same time that I had the kml layer to the map, it came behind. If I do it later, it appear on top. Is it possible that the sequencement of adding elements to the map matters?

Matthieu

Matthieu Lux

unread,
Jan 29, 2012, 11:45:24 AM1/29/12
to google-map...@googlegroups.com
Up... Anything for me ?

Matthieu

Enoch Lau (Google Employee)

unread,
Jan 29, 2012, 9:17:57 PM1/29/12
to google-map...@googlegroups.com
This should have been fixed. Rectangles and other polys should now always appear on top of KML layers. Are you not seeing this behavior? If so, please post a link to a demo.

Enoch

Matthieu Lux

unread,
Feb 16, 2012, 8:43:30 AM2/16/12
to google-map...@googlegroups.com
Hi,

Sorry for the delay for testing your fix but it works fine, thank you very much!

Matthieu
Reply all
Reply to author
Forward
0 new messages