Hi Herry, Perhaps doing something like this (not tested).
map.events.register("changelayer", null, function(layer,properties){ var name = layer.name; if(properties["visibility"]) overviewMap.ovmap.getLayerByName(name).setVisibility(true); }); So, register a function on a change layer and on that change, change the ovmap layer visibility? I think this should work.... Roy _____ From: herry13 [mailto:herr...@gmail.com] To: us...@openlayers.org Sent: Sun, 09 Jan 2011 09:39:41 +0100 Subject: [OpenLayers-Users] Changing Map of Overview Map Control Hi Guys, I have a map that has 2 base layers (e.g. first layer is google (default) and second layer is bing). I also add an overview map control as showed in OpenLayers example (http://openlayers.org/dev/examples/overviewmap.html). The overview control is working fine when the first time I load the web page. But when I select my second base layer (bing) from LayerSwitcher control, the map in overview control still shows google map and not changes into bing. I need these two maps (main and overview map) are same. Could someone tell me how to synchronize the map showed in main map and overview map? Thanks, Herry -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Changing-Map-of-Overview-Map-Control-tp5904022p5904022.html Sent from the OpenLayers Users mailing list archive at Nabble.com. _______________________________________________ Users mailing list us...@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/openlayers-users
_______________________________________________ Users mailing list us...@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/openlayers-users