[OpenLayers-Users] FEatures orders

Andreas Hocevar ahocevar at opengeo.org
Wed Jan 21 16:22:16 EST 2009


On Sun, Jan 18, 2009 at 10:29 PM, darrepac <pascal.darre at laposte.net> wrote:
>
>
>
> Andreas Hocevar-2 wrote:
>>
>> You could use z-indexing on the layer. See
>> http://www.openlayers.org/dev/examples/ordering.html for an example.
>>
>> You would probably have to sort your features by size, and create
>> ascending z-indices with descending size. This would ensure that
>> smaller rectangles will be drawn on top of larger ones.
>>
>> Regards,
>> Andreas.
>>
>
> Sounds to me good, I want to give it a try.
> Can you tell me what should be the default z indice of my Geojson features?

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.

Regards,
Andreas.

-- 
Andreas Hocevar
OpenGeo - http://opengeo.org/
Expert service straight from the developers.



More information about the Users mailing list