[OpenLayers-Users] ZoomBox Pan in two Mapdivs at the same time

2009-07-30 Thread Rahn Hanno (rahn)
Hello list, I have a problem with the zoomBox. In my Project I have two different map windows. The maps show the same but in different times. The Geometries are polygons. Now I try to realise a rectangle zoom with a button. For this I use the NavToolbar Control. This works fine for the

Re: [OpenLayers-Users] ZoomBox Pan in two Mapdivs at the same time

2009-07-30 Thread Kris Geusebroek
[mailto:users-boun...@openlayers.org] On Behalf Of Rahn Hanno (rahn) Sent: Thursday, July 30, 2009 1:23 PM To: users@openlayers.org Subject: [OpenLayers-Users] ZoomBox Pan in two Mapdivs at the same time Hello list, I have a problem with the zoomBox. In my Project I have two different map

Re: [OpenLayers-Users] ZoomBox Pan in two Mapdivs at the same time

2009-07-30 Thread Alexandre Dube
Hi, Assuming your 'main' map is oMap and your 'second' map (that follows the main) is oMap2, the below code should do what you seek : oMap.events.register(moveend, null, function(e) {oMap2.panTo(e.object.getCenter())}); oMap.events.register(zoomend, null, function(e)