[OpenLayers-Users] zooming a certain portion of the map

gingerbbm stuart.jones at jacobs.com
Fri May 14 19:47:19 EDT 2010


If I'm understanding you correctly you need zoomToExtent [1], passing in an
OpenLayers.Bounds() object configured with your lon/lat pairs [2], e.g.

    map.zoomToExtent(new OpenLayers.Bounds(lattiude1, longitude1,
lattitude2, longitude2));

[1]
http://dev.openlayers.org/releases/OpenLayers-2.9/doc/apidocs/files/OpenLayers/Map-js.html#OpenLayers.Map.zoomToExtent
[2]
http://dev.openlayers.org/releases/OpenLayers-2.9/doc/apidocs/files/OpenLayers/BaseTypes/Bounds-js.html#OpenLayers.Bounds

-- 
View this message in context: http://osgeo-org.1803224.n2.nabble.com/zooming-a-certain-portion-of-the-map-tp5056929p5057629.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.



More information about the Users mailing list