[OpenLayers-Users] FEatures orders
Andreas Hocevar
ahocevar at opengeo.org
Thu Jan 22 04:04:53 EST 2009
darrepac wrote:
>
> darrepac wrote:
>
>>
>>
>>
>>> You decide. Not the absolute z-index, only the order is relevant
>>> (greater than / less than comparison). This z-index also has nothing
>>> to do with the CSS z-index.
>>>
>>>
>>>
>> Ok but I just want to know example value to not put stupid value which
>> will make the features below the map for example...So for example if you
>> tell me that features z-index value should be around 500, I will play
>> around this number...but may-be it is 20, 2000....
>>
>> thanks
>>
>>
>
> Do you mean we can stay at the relative level and not putting absolute value
> may-be....if yes, how?
>
You do not use CSS z-index here. All you have to do is set the
graphicZIndex property of your symbolizer, as the ordering.html example
shows:
var layer = new OpenLayers.Layer.Vector(
"Y-Order",
{
styleMap: new OpenLayers.StyleMap({
externalGraphic: "../img/marker-gold.png",
pointRadius: 10,
graphicZIndex: GOLD_Z_INDEX
}),
isBaseLayer: true,
rendererOptions: {yOrdering: true}
}
);
You will not want the yOrdering renderer option, but instead:
rendererOptions: {zIndexing: true}
Regards,
Andreas.
--
Andreas Hocevar
OpenGeo - http://opengeo.org/
Expert service straight from the developers.
More information about the Users
mailing list