[OpenLayers-Users] map.setLayerIndex weirdness

Marc Jansen jansen at terrestris.de
Fri Aug 5 04:40:17 EDT 2011


Hi Daniel,

I failed to reproduce that map.setLayerIndex(<layer>, 3); doesn't work.
I used http://www.openlayers.org/dev/examples/example.html as an example.

Maybe you can share some more code that enlightens the problem.

Best regards,
Marc

 


On 04.08.2011 16:15, PORTER.DANIEL wrote:
>
> I'm trying to set a vector layer to be on top of all of the other layers.
>
>
> This is part of my init function:
>
>
> map.addLayers([base_layer, water, census, vector_layer]);
>
> map.setLayerIndex(vector_layer, 3);
>
>  
>
> but it doesn't work.  When I run map.setLayerIndex(vector_layer, 3) in
> firebug after the page has finished loading, it works.
>
>  
>
> Is there something that has to occur before I can set the layer index?
>
>  
>
> Thanks,
>
> Daniel
>
>
> _______________________________________________
> Users mailing list
> Users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/openlayers-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20110805/7e247b9e/attachment.html


More information about the Users mailing list