<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.5730.11" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><FONT face="Trebuchet MS" size=2><SPAN
class=243401420-17012007>In case anybody else is searching for the syntax to add
the Overview Map control outside of the viewport, see</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face="Trebuchet MS" size=2><SPAN
class=243401420-17012007><A
href="http://trac.openlayers.org/wiki/Control/OverviewMap#Customlayout">http://trac.openlayers.org/wiki/Control/OverviewMap#Customlayout</A></SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face="Trebuchet MS" size=2><SPAN
class=243401420-17012007></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face="Trebuchet MS" size=2><SPAN
class=243401420-17012007>Tim</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face="Trebuchet MS" size=2><SPAN
class=243401420-17012007></SPAN></FONT> </DIV><FONT face="Trebuchet MS"
size=2></FONT><BR>
<BLOCKQUOTE
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> dev-bounces@openlayers.org
[mailto:dev-bounces@openlayers.org] <B>On Behalf Of </B>Ludwig Max
Brinckmann<BR><B>Sent:</B> Wednesday, January 17, 2007 3:05 AM<BR><B>To:</B>
dev@openlayers.org<BR><B>Subject:</B> [OpenLayers-Dev] Control outside map (re
#445)<BR></FONT><BR></DIV>
<DIV></DIV>Ticket #445 promises a way of easily putting controls outside the
main map -- a great help if there is more than just very simple mouse
interaction since that seems to confuse many browsers.<BR><BR>The way I
understand it, to utilise this one, I have to pass in the id of the div where
the control is supposed to be located when creating the control, such as
<BR><BR> overview = new
OpenLayers.Control.OverviewMap({div : 'controls'});<BR>
map.addControl(overview);<BR><BR>However, when running this
it gives me the following exception:<BR><BR>
<DIV style="MARGIN-LEFT: 40px">Error: this.div.appendChild is not a
function<BR>Source File: <A
href="http://localhost/javascripts/openlayers/lib/OpenLayers/Control/OverviewMap.js">http://localhost/javascripts/openlayers/lib/OpenLayers/Control/OverviewMap.js
</A><BR>Line: 117<BR></DIV><BR>Is there a working example (with current svn
head) someone could point me to? I am actually not that keen on this
particular control, I am looking for a working starting point for my own
control, so any control would do. <BR><BR>Ludwig<BR><BR>The full
script:<BR><html xmlns="<A
href="http://www.w3.org/1999/xhtml">http://www.w3.org/1999/xhtml</A>"><BR>
<head><BR> <style
type="text/css"><BR> #map {
<BR> width:
80%;<BR>
height: 100%;<BR> top:
0;<BR> left:
0;<BR>
position: absolute;<BR>
}<BR> #controls
{<BR> width:
20%;<BR>
position: absolute;
<BR> top:
0;<BR>
right:
0;<BR>
height: 100%;<BR>
}<BR> </style><BR><BR> <script
src="/javascripts/openlayers/lib/OpenLayers.js"></script><BR><BR>
<script type="text/javascript">
<BR>
<!--<BR> function
init(){<BR>
var map = new OpenLayers.Map('map');<BR>
boundary = new OpenLayers.Layer.WMS.Untiled('Boundary', <BR>
"<A href="http://localhost/cgi-bin/yunnanserver?">
http://localhost/cgi-bin/yunnanserver?</A>", {layers:
"Watersheds",<BR>
transparent: "false", format:"image/png" } );<BR>
boundary.setVisibility(true);<BR>
map.addLayers ([boundary]);<BR> overview
= new OpenLayers.Control.OverviewMap({div :
'controls'});<BR>
map.addControl(overview);<BR> bounds =
new OpenLayers.Bounds(-180,-90,180,90);<BR>
map.zoomToExtent
(bounds);<BR>
}<BR> </script><BR> </head><BR>
<body onload="init()"><BR> <div
id="controls"></div><BR> <div
id="map"></div><BR> </body>
<BR></html><BR><BR><BR></BLOCKQUOTE></BODY></HTML>