[OpenLayers-Users] using map.setCenterfunction with getZoomForExtent()

Carlos Henriquez carloshhp at gmail.com
Sat Feb 26 13:15:24 EST 2011


Hi i want to use the getZoomForExtent() function to set the zoom level in a
map, i have two points the one with the max longitude and the one with max
latitude
point1:(-88.530255,13.6920867)
point2:(-88.69996,13.7854783)
(longitude,latitude)
so i tried using OpenLayers.Bounds() like this:

*getZoomForExtent(new
Openlayers.Bounds(-88.69996,13.6920867,-88.530255,13.7854783))*
but i doesn't work, my idea is to use map.setcenter function to set the
center and zoom for the map like this

*map.setCenter(new
OpenLayers.LonLat(-88.7544446426224,13.6255370441885),getZoomForExtent(new
Openlayers.Bounds(-88.69996,13.6920867,-88.530255,13.7854783)));*
anyone could help me? i have no idea what is my mistake, ty vm

Carlos.-
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20110226/c82cf6f0/attachment.html


More information about the Users mailing list