Thanks, that seems much happier.<br>Ludwig<br><br><br><div><span class="gmail_quote">On 1/17/07, <b class="gmail_sendername">Bart van den Eijnden (OSGIS)</b> <<a href="mailto:bartvde@osgis.nl">bartvde@osgis.nl</a>> wrote:
</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Have you tried this syntax:<br><br>overview = new OpenLayers.Control.OverviewMap({div: $('controls')});
<br><br>Best regards,<br>Bart<br><br>--<br>Bart van den Eijnden<br>OSGIS, Open Source GIS<br><a href="http://www.osgis.nl">http://www.osgis.nl</a><br><br><br>--------- Oorspronkelijk bericht --------<br>Van: Ludwig Max Brinckmann <
<a href="mailto:ludwigbrinckmann@gmail.com">ludwigbrinckmann@gmail.com</a>><br>Naar: <a href="mailto:dev@openlayers.org">dev@openlayers.org</a> <<a href="mailto:dev@openlayers.org">dev@openlayers.org</a>><br>Onderwerp: [OpenLayers-Dev] Control outside map (re #445)
<br>Datum: 17/01/07 08:05<br><br>> Ticket #445 promises a way of easily putting controls outside the main map<br>-- a great help if there is more than just very simple mouse interaction<br>since that seems to confuse many
browsers.The way I understand it, to<br>utilise this one, I have to pass in the id of the div where the control is<br>supposed to be located when creating the control, such as<br>> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; overview = new
<br>OpenLayers.Control.OverviewMap({div :<br>&#39;controls&#39;});&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;<br>map.addControl(overview);However, when running this it gives me the<br>following exception:
<br>> Error: this.div.appendChild is not a functionSource File:<br><a href="http://localhost/javascripts/openlayers/lib/OpenLayers/Control/OverviewMap.js">http://localhost/javascripts/openlayers/lib/OpenLayers/Control/OverviewMap.js
</a><br>> Line: 117Is there a working example (with current svn head) someone could<br>point me to? I am actually not that keen on this particular control, I am<br>looking for a working starting point for my own control, so any control
<br>would do.<br>> LudwigThe full script:&lt;html<br>xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;&nbsp;<br>&lt;head&gt;&nbsp;&nbsp;&nbsp; &lt;style<br>type=&quot;text/css&quot;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #map
<br>{<br>> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; width:<br>80%;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<br>height: 100%;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; top:<br>0;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; left:<br>0;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<br>position: absolute;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #controls<br>{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; width:
<br>20%;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>position: absolute;<br>> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; top:
<br>0;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; right:<br>0;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; height:
<br>100%;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }&nbsp;&nbsp;&nbsp;<br>&lt;/style&gt;&nbsp;&nbsp;&nbsp; &lt;script<br>src=&quot;/javascripts/openlayers/lib/OpenLayers.js&quot;&gt;&lt;/script&gt;&nbsp;&nbsp;&nbsp;
<br>&lt;script type=&quot;text/javascript&quot;&gt;<br>> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>&lt;!--&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; function
<br>init(){&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>var map = new OpenLayers.Map(&#39;map&#39;);&nbsp;&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp; boundary = new
<br>OpenLayers.Layer.WMS.Untiled(&#39;Boundary&#39;, &nbsp;&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp; &quot;<br>> <a href="http://localhost/cgi-bin/yunnanserver?&quot">http://localhost/cgi-bin/yunnanserver?&quot
</a>;, {layers:<br>&quot;Watersheds&quot;,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>transparent: &quot;false&quot;, format:&quot;image/png&quot; }
<br>);&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;<br>boundary.setVisibility(true);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>map.addLayers
<br>> ([boundary]);&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; overview = new<br>OpenLayers.Control.OverviewMap({div :<br>&#39;controls&#39;});&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
<br>map.addControl(overview);&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; bounds = new<br>OpenLayers.Bounds(-180,-90,180,90);&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;<br>map.zoomToExtent
<br>> (bounds);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }&nbsp;&nbsp;&nbsp;<br>&lt;/script&gt;&nbsp; &lt;/head&gt;&nbsp; &lt;body<br>onload=&quot;init()&quot;&gt;&nbsp;&nbsp;&nbsp; &lt;div
<br>id=&quot;controls&quot;&gt;&lt;/div&gt;&nbsp;&nbsp;&nbsp; &lt;div<br>id=&quot;map&quot;&gt;&lt;/div&gt;&nbsp; &lt;/body&gt;<br>> &lt;/html&gt;
<br>><br>><br>><br>><br>><br>> _______________________________________________<br>> Dev mailing list<br>> <a href="mailto:Dev@openlayers.org">Dev@openlayers.org</a><br>> <a href="http://openlayers.org/mailman/listinfo/dev">
http://openlayers.org/mailman/listinfo/dev</a><br>><br><br><br><br></blockquote></div><br>