[OpenLayers-Users] change layer order

Van Ulden, Joost jvanulde at nrcan.gc.ca
Wed Sep 10 10:24:37 EDT 2008


Hi Till,
 
Take a look here: http://dev.openlayers.org/sandbox/jvanulden/openlayers/examples/extended-layerswitcher.html
 
and the relevant code to implement what you need:
 
map.raiseLayer(layer, 1) for up, or map.raiseLayer(layer, -1) for down.
 
Hope this helps.

 
________________________________

From: users-bounces at openlayers.org on behalf of Till Adams
Sent: Wed 10/09/2008 5:06 AM
To: users at openlayers.org
Subject: [OpenLayers-Users] change layer order



Dear list,

is there any idea or possibility to change the order of layers in OL?

I found one point which might be of interest in this context, bit I have
no real idea how to
proceed:

OpenLayers.Util.IndexOf(ma.layers, layername)

Gives me the actual index position of a layer called "layername"

Thanks in advance and regards,

Till


--
----------------------------------------------------------
terrestris GmbH & Co. KG
Irmintrudisstrasse 17
53111 Bonn
Germany

Till Adams
Geschäftsführung

Tel: +49 (0)228 / 962 899-52
Fax: +49 (0)228 / 962 899-57
adams at terrestris.de http://www.terrestris.de <http://www.terrestris.de/> 
Amtsgericht Bonn, HRA 6835
---------------------------------------------------------

Komplementärin:

terrestris Verwaltungs GmbH

vertreten durch:
Hinrich Paulsen, Till Adams

_______________________________________________
Users mailing list
Users at openlayers.org
http://openlayers.org/mailman/listinfo/users





More information about the Users mailing list