<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body text="#000099" bgcolor="#ffffff">
<font size="-1"><font face="Verdana">I'm doing it like this:</font></font><br>
<blockquote><font size="-1"><font face="Verdana"></font></font><font
color="#333333" size="-1"><font face="Verdana">map = new
OpenLayers.Map (...);<br>
overviewMapControl = new OpenLayers.Control.OverviewMap (...);<br>
<br>
</font></font><font color="#333333" size="-1"><font
face="Verdana">// Update the base layer of the overview map
along with the base layer of the main map.</font></font><font
color="#333333"><br>
</font><font color="#333333" size="-1"><font face="Verdana">map.events.register
('changebaselayer', this, function (layer, properties)</font></font><font
color="#333333"><br>
</font><font color="#333333" size="-1"><font face="Verdana">{</font></font><font
color="#333333"><br>
</font><font color="#333333" size="-1"><font face="Verdana"> if
(overviewMapControl.ovmap) {</font></font><font
color="#333333"><br>
</font><font color="#333333" size="-1"><font face="Verdana">
overviewMapControl.ovmap.setBaseLayer
(overviewMapControl.ovmap.getLayersByName
(layer.layer.name)[0]);</font></font><font color="#333333"><br>
</font><font color="#333333" size="-1"><font face="Verdana"> }</font></font><font
color="#333333"><br>
</font><font color="#333333" size="-1"><font face="Verdana"> //
else the overview map is not drawn yet.</font></font><font
color="#333333"><br>
</font><font color="#333333" size="-1"><font face="Verdana">});</font></font><br>
</blockquote>
<font size="-1"><font face="Verdana">You must make sure that you've
added to the overview map all the same layers you added to the
big map, and that they have unique names (the first parameter
for a layer constructor).<br>
<br>
Janis<br>
<br>
</font></font><br>
On 2011.05.19. 18:52, Sukuchha Shrestha wrote:
<blockquote cite="mid:220974.8833.qm@web29107.mail.ird.yahoo.com"
type="cite">
<style type="text/css"><!-- DIV {margin:0px;} --></style>
<div style="font-family: 'times new roman','new york',times,serif;
font-size: 12pt;">
<div>Hello nice people,</div>
<div><br>
</div>
<div>I want to synchronize the layerswitcher and overview map. I
mean when i select my layerA in layerswitcher, the overview
map should display layerA and similarly when i select my
layerB in layerswitcher the overview map should display
layerB.</div>
<div><br>
</div>
<div>Any idea how to do it !</div>
<div><br>
</div>
<div>thanks</div>
<div>sukuchha</div>
</div>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.osgeo.org">Users@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/openlayers-users">http://lists.osgeo.org/mailman/listinfo/openlayers-users</a>
</pre>
</blockquote>
</body>
</html>