[OpenLayers-Users] LayerSwitcher outside the map
Rahn Hanno (rahn)
rahn at zhaw.ch
Wed Jul 1 01:53:14 EDT 2009
Hello list,
Perhaps somebody can help me. I try to realise the LayerSwitcher outside the map. I read the example "layerswitcher".
First I make my own div where I want to place the result.
<div class="mapSwitcher" style="width:180; display:none; position:absolute; left:785; top:68; float:left;" id="mapSwitcher"></div>
Then I realise a control like this:
map.addControl(new OpenLayers.Control.LayerSwitcher({'div':OpenLayers.Util.getElement('mapSwitcher')}));
It works, but it will always be dispalyed in the upper right of my window. My div (mapSwitcher) has an absolute position in the right. The Layerswitcher should be displayed in this.
Can somebody help me? I don't know why it is always displayed in the upper right. I will show it under the LayerSwitcher Title on the right.
A lot of thanks for your help and for your tipps.
Greetings
Hanno
------------------------------------------
Hanno Rahn, Dipl.-Ing. (FH) Geoinformatik
ZHAW Zürcher Hochschule für Angewandte Wissenschaften Umwelt und Natürliche Ressourcen
Fachstelle Geoinformatik
Grüental, Postfach CH-8820 Wädenswil
Tel +41 (0)58 934 5592
Fax +41 (0)58 934 5580
hanno.rahn at zhaw.ch
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090701/a38735e7/attachment.html
More information about the Users
mailing list