Thanks Slawomir, Adding "ascending":false solved my problem.
Thanks again, Paul 2012/11/21 Slawomir Messner <[email protected]> > Hi, > you're probably looking for the "ascending" attribute. It's not well > documented. > > http://dev.openlayers.org/releases/OpenLayers-2.12/doc/apidocs/files/OpenLayers/Control/LayerSwitcher-js.html#OpenLayers.Control.LayerSwitcher.ascending > Try: > new OpenLayers.Control.LayerSwitcher({'div': > document.getElementById('layerSwitcher'),"ascending":false}) > > Am 21.11.2012 16:57, schrieb Paul Meems: > > I want to create a custom layer switcher. > I can put the 'normal' text in another div, but I also want to change the > order: > The base layers at the bottom and the overlays on top. > Looking at the docs I think I need to use baseLayersDiv and dataLayersDiv > but when I use those nothing happens. > > This is working: > new OpenLayers.Control.LayerSwitcher({'div': > document.getElementById('layerSwitcher')}) > but with the default ordering. > > This isn't working: > new OpenLayers.Control.LayerSwitcher({'baseLayersDiv': > document.getElementById('baseLayers'), 'dataLayersDiv': > document.getElementById('dataLayers')}) > > Does anybody has experience with this? > Searching didn't resulted in any example. > > Thanks, > > Paul > > > > _______________________________________________ > Users mailing > [email protected]http://lists.osgeo.org/mailman/listinfo/openlayers-users > > > _______________________________________________ > 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
