What you can do is use the .getCenterLonLat() method on the bbox you get from the points. I.e. something like:
var bounds = this.layer.getDataExtent(); //or get your bounds somehow else var zoom = this.map.getZoomForExtent(bounds); this.map.setCenter(bounds.getCenterLonLat(),zoom); -atle On Mon, 2010-01-25 at 11:06 -0500, Robert Hicks wrote: > Hey all, is it possible to call OpenLayers.Map.setCenter(); but with a > bounding box instead of a lat lon (point), or an equivalent > functionality? The reason for this is I need my map to load based on > the minimum bounding rectangle of a bunch of points. I didn't see > anything in the api except for specifying a point, which won't work > because I need the extent to be determined by the MBR. > -- Atle Frenvik Sveen Geomatikk IKT AS tel: 45 27 86 89 mail. [email protected] _______________________________________________ Users mailing list [email protected] http://openlayers.org/mailman/listinfo/users
