[OpenLayers-Users] Custom layer switcher

Paul Meems bontepaarden at gmail.com
Wed Nov 21 07:57:10 PST 2012


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


More information about the Users mailing list