Here is my example: http://oddjobbs.com/googlemaps1.html
The shield icon is a regular marker. The circle is a Circle. The gray disk icon is a custom layer. The problem comes in when I want to do anything with zIndex other than what the map automatically does. Right now, it shows it in order from bottom to top: circle disk icon shield marker If you look at the DOM, effectively the circle and disk icon are put under one div and the shield marker is put under another: The circle/disk icon are here overlay.div_.parentNode <div style="z-index:101;position:absolute;left:0px;top:0px;"><div style="position:absolute;left:0px;top:0px;z-index:1;"><div style="position:absolute;left:0px;top:0px;z-index:1;">…</div></div><div style="width:32px;height:32px;z-index:500;border-top-style:none; border-right-style:none;border-bottom-style:none;border-left-style:none; border-width:initial;border-color:initial;border-top-width:0px; border-right-width:0px;border-bottom-width:0px;border-left-width:0px; position:absolute;background-image:url(http://maps.google.com/mapfiles/ kml/pal2/icon18.png);cursor:pointer;left:496px;top:367px;"></div></div> This is its sibling, the shield marker: <div style="z-index:105;position:absolute;left:0px;top:0px;"><div style="width:32px;height:32px;overflow-x:hidden;overflow-y:hidden; position:absolute;left:492px;top:347px;z-index:200;opacity:0.01;cursor: pointer;" class="gmnoprint" title><img style="position:absolute;left: 0px;top:0px;width:32px;height:32px;-webkit-user-select:none; border-top-width:0px;border-right-width:0px;border-bottom-width:0px; border-left-width:0px;border-style:initial;border-color:initial; padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px; margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px; -webkit-user-drag:none;" src="http://maps.google.com/mapfiles/kml/pal2/ icon16.png"></div> Those 101 and 105 values seem to be out-of-reach from the API. The zIndex on a Marker is useless, because it only applies to any other Markers, not other layers. And it also seems to ignore the zIndex:1000 on the Circle so you can't even get it to be over the disk icon if you want. So, other than kludging in implementation specific code that will probably break on a map update, is there any way to actually get to those z-indexes? This seems to hobble custom layers quite effectively. I've ran into other test (still trying to reproduce) where the Circle winds up being on top of the custom overlay layer. I think the map API decides how to arrange the divs differently depending on other factors. This makes a non-API solution even more tricky and unrealiable. Thanks. -- You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-maps-js-api-v3?hl=en.
