[OpenLayers-Users] Minimize LayerSwitcher outside the map canvas

Noli Sicad nsicad at gmail.com
Thu Nov 3 00:32:44 EDT 2011


Hi,

I am trying to implement a custom Layer Swicher outside map. I am
using the example in layerswitcher from OL example.

Javascript:

map.addControl(new
OpenLayers.Control.LayerSwitcher({'div':OpenLayers.Util.getElement('layerswitcher')}));


HTML

<div id="layerswitcher" class="olControlLayerSwitcher"></div>

The problem with this, the layerswitcher is already maximized i.e.
expanded at the start.

How can I make it minimize - unexpanded?

Any thing, anybody knows how to implement a leaflet style
layerswitcher in mobile.

http://leaflet.cloudmade.com/examples/layers-control.html

I got mine layerswitcher in right hand side.

Noli


More information about the Users mailing list