I have been playing with this function as well, and find that, as noted in the docs, it may not exactly contain everything. I've had to hack a little extra space by creating bounds that go an extra 10% in each direction.

On 6/15/2011 5:01 AM, Eric Lemoine wrote:
On Wed, Jun 15, 2011 at 1:54 PM, Arnie Shore<[email protected]>  wrote:
Making progress in my converting a GMaps application to OL, my latest
quandary is the folg.  (I'd think this is a common problem, but a search
failed for me.)

Given the bounds of a set of points, calculate the tightest zoom that will
contain all.
<http://dev.openlayers.org/releases/OpenLayers-2.10/doc/apidocs/files/OpenLayers/Map-js.html#OpenLayers.Map.getZoomForExtent>

Cheers,

_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to