Monday, June 28, 2010

Z-Index failures?

I'm trying to implement my own GOverlay. I need it to hijack click
events from all other GMarkers, GPolygons and other custom GOverlays
(except a small subset)...

Clicks hijacked via:
GEvent.addDomListener(div, "click", function( event ){...});

Custom overlay added to display via:
map.getPane(G_MAP_FLOAT_PANE).appendChild(div);

Each class of GMarker and custom GOverlay has zIndex set via the
appropriate method:
GMarker:
markerOptions = { zIndexProcess: function() { return ZINDEX; } };
Custom GOverlay:
div.style.zIndex = ZINDEX;

In Chrome, it appears to do the "correct" thing and make use of both
panel layer and zIndex information (within panel layer). This makes it
difficult to allow the markers in my small subset to get the click,
but I can live with this as it seems to be "correct" behavior.

In Firefox, it seems to be ignoring the panel layer and using only the
zIndex information (this I can handle as it makes things much
simpler).

In IE (7 and 8 -- VML), it is ignoring all zIndex information
(div.style.zIndex = 99999) as well as panel layer information. Oddly,
it only hijacks clicks where there is already another GPolygon
(outside the polygon, all clicks are ignored and passed on to the
GMap2). It also only hijacks clicks where there is not already another
GMarker (which according to docs should be below the custom hijacker's
pane and is also below the custom overlay's zIndex).

Has anybody else noticed this? Or found a workaround? Am I perhaps
using incorrect methods?

Thanks

--
You received this message because you are subscribed to the Google Groups "Google Maps API" group.
To post to this group, send email to google-maps-api@googlegroups.com.
To unsubscribe from this group, send email to google-maps-api+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-maps-api?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate