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
> [email protected]
> http://lists.osgeo.org/mailman/listinfo/openlayers-users

_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to