Thank you very much, for the advise and the example.<br>It works exellent.<br><br><br><br><br><div><span class="gmail_quote">2007/10/4, Tim Schaub <<a href="mailto:tschaub@openplans.org">tschaub@openplans.org</a>>:</span>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hey-<br><br>Leandro R wrote:<br>> Hello!!!<br>> Is there any chance to put a Panel (a collection of buttons in my case)
<br>> outside the Map.<br>> I have tried with the 'div' option, but doesn't work for me.<br>> Am I doing something wrong?.<br><br>A couple things.<br><br>Any time you do *anything* that requires a custom layout/style (for me
<br>this means always), use a separate link tag to point to the OL default<br>style. That is<br><br><link rel="stylesheet" href="../theme/default/style.css" type="text/css" /><br><br>This stops the dynamic stylesheet loading that breaks the cascading
<br>nature of CSS.<br><br>Second, if you extend the default styles, you'll need to add a class<br>name to your panel element. That is<br><br><div id="panel" class="olControlPanel"></div>
<br><br>The alternative is to copy the olControlPanel style into a declaration<br>that references your #panel element.<br><br>I just put up a quick example that demonstrates this (see [1] and [2]).<br><br>Hope that helps,
<br>Tim<br><br>[1]<br><a href="http://trac.openlayers.org/browser/trunk/openlayers/examples/editingtoolbar-outside.html">http://trac.openlayers.org/browser/trunk/openlayers/examples/editingtoolbar-outside.html</a><br><br>
or after the svn update occurs<br><br>[2] <a href="http://openlayers.org/dev/examples/editingtoolbar-outside.html">http://openlayers.org/dev/examples/editingtoolbar-outside.html</a><br><br><br>> Thanks<br>> Here is the page:
<br>><br>> <style type="text/css"><br>> #map {<br>> width: 650px;<br>> height: 550px;<br>> border: 1px solid black;<br>> }<br>> .olControlPanel div {
<br>> display: block;<br>> float: left;<br>> margin: 3px;<br>> width: 24px;<br>> height: 24px;<br>> background-color:red;<br>> }...
<br>><br>> <script type="text/javascript"><br>> var panel = new OpenLayers.Control.Panel({div:$('panel')});<br>> panel.addControls([<br>> new OpenLayers.Control.MouseDefaults
(), // DragPan +<br>> MouseWheel<br>> new OpenLayers.Control.ZoomBox(),<br>> new OpenLayers.Control.ZoomToMaxExtent()<br>> ]);<br>> map.addControl(panel);<br>>
<br>> <body onload="init()"><br>> <table><br>> <tr><br>> <td style="width:40px" valign="middle" rowspan="3"><div<br>> id="panzoombar"></div></td>
<br>> <td colspan="3" align="right"><div id="panel"></div></td><br>> </tr><br>> <tr><br>> <td colspan="3"><div id="map"></div></td>
<br>> </tr><br>> <tr><br>> <td align="left" style="font-size:0.8em;<br>> font-family:Verdana"><div id="scale"></div></td><br>
> <td align="right" style="font-size: 0.8em;<br>> font-family:Verdana"><div id="position"></div></td><br>> </tr><br>> </table>
<br>> <div id="nodelist"></div><br>> </body><br>><br>> !DSPAM:4033,4703e79c210551804284693!<br>><br>><br>> ------------------------------------------------------------------------
<br>><br>> _______________________________________________<br>> Users mailing list<br>> <a href="mailto:Users@openlayers.org">Users@openlayers.org</a><br>> <a href="http://openlayers.org/mailman/listinfo/users">
http://openlayers.org/mailman/listinfo/users</a><br>><br>><br>> !DSPAM:4033,4703e79c210551804284693!<br><br>_______________________________________________<br>Users mailing list<br><a href="mailto:Users@openlayers.org">
Users@openlayers.org</a><br><a href="http://openlayers.org/mailman/listinfo/users">http://openlayers.org/mailman/listinfo/users</a><br></blockquote></div><br>