[OpenLayers-Users] map.setLayerIndex weirdness

PORTER.DANIEL PORTER.DANIEL at flsenate.gov
Thu Aug 4 10:15:05 EDT 2011


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20110804/75cdd940/attachment.html


More information about the Users mailing list