[OpenLayers-Users] Z-Index of Markers Layer

bradleyspencer brad at cubewerx.com.au
Thu May 29 19:13:28 EDT 2008


Eric,

The hack suggestion did not work, or at least I am unable to make it work :(

My latest attempt to sort this almost worked.

Given that the OL defaults are Z_INDEX_BASE: { BaseLayer: 100, Overlay: 325, Popup: 750, Control: 1000 }, I made sure that all my user layers were set in the correct overlay levels within the range 325 thru 700 Zindex. Then I set the levels of the two markers to be offset from the Popup default level by -1 and -2 by using 'myMarkerLayer'.setZIndex(map.Z_INDEX_BASE['Popup'] - 1 & 2). This worked fine if I just wanted to see the marker layers and the popups together. However, once I plotted my other layers they simply stamped over the top of the markers and popup layers.

Is there a way to interrogate the ZIndex of any given layer so that I can check what is going on?

Cheers,

Brad Spencer




-----Original Message-----
From: Eric Lemoine [mailto:eric.c2c at gmail.com]
Sent: Thursday, 29 May 2008 9:20 PM
To: brad at cubewerx.com.au
Cc: openlayers users
Subject: Re: [OpenLayers-Users] Z-Index of Markers Layer


On Thu, May 29, 2008 at 12:02 PM, bradleyspencer <brad at cubewerx.com.au> wrote:
> Eric,
>
> Thanks for that. I tried your suggestion.
>
> So this will make the markerLayer a Z-Index one less than the Popup. Right?

Correct.

>
> However, what I am doing is preassigning groups of layers to z-index levels so they layer predictably and not just as they get dynamically loaded. On top of all this I want to display two markers layers - I have been able to make sure that the two markers layers are above these layers by assigning numbers appropriately.
>
> When I use this suggestion it pushes the markers below the other layers which I do not want to do. Is there any way of making the Popup to be +1 above the markers layers?

Have you tried playing with popup.div.style.zIndex? This is getting hackish ;-)

--
Eric




More information about the Users mailing list