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

Carlos Henriquez carloshhp at gmail.com
Sun Feb 27 09:46:31 EST 2011


Thanks Thomas, i will try this

2011/2/26 Thomas Gratier <osgeo.mailinglist at gmail.com>

> Hello,
>
> It seems you forget that getZoomForExtent() is related to map or layer
> http://dev.openlayers.org/releases/OpenLayers-2.10/doc/apidocs/files/OpenLayers/Map-js.html#OpenLayers.Map.getZoomForExtent
> You also made a mistake by using *Openlayers* and not *OpenLayers*(javascript is case sensitive)
>
> A sample below you can test in
> http://openlayers.org/dev/examples/baseLayers.html
> map.setCenter(new
> OpenLayers.LonLat(-88.7544446426224,13.6255370441885),map.getZoomForExtent(new
> OpenLayers.Bounds(-88.69996,13.6920867,-88.530255,13.7854783)));
>
> Regards
>
> ThomasG
> GIS specialist
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20110227/3bdb1f54/attachment.html


More information about the Users mailing list