[OpenLayers-Users] Problem with Zoom when change the Layer

Salvaro asufsc at gmail.com
Mon Sep 8 09:30:33 EDT 2008


I'm using two different layers (WMS and GMaps). I set the projection configs
(projection, maxextent, sphericalMercator...) on the two layers and the
displayProjection on the Map object.

The problem is when I change the layer.
WMS -> Google Maps - the zoom level goes to the Max level of ZoomScale.
Google Maps -> the zoom level goes to the Min level of ZoomScale.

The map lost the Zoom information after the change. Then I tried to save the
zoomLevel in a variable, and pass this variable in the setCenter. But after
this the maps didn't work rigth =/.

Don't know why it is happening.

Thanks,
Salvaro.

PS: Another problem is with the setCenter in SphericalMercator, if I set the
center using LonLat coordinates of the WMS layer the map goes to the center
(seem as the parameters are 0,0), and if I transform this LonLat using
forward mercator the program stops running. How should be the type of
coordinate in sphericalMercator?
-- 
View this message in context: http://n2.nabble.com/Problem-with-Zoom-when-change-the-Layer-tp1069835p1069835.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.




More information about the Users mailing list