[OpenLayers-Users] Setting the map center with a bounding box?
Marc Jansen
jansen at terrestris.de
Mon Jan 25 11:12:02 EST 2010
Hi Robert,
try
map.zoomToExtent( <OenLayers.Bounds> )
http://dev.openlayers.org/releases/OpenLayers-2.8/doc/apidocs/files/OpenLayers/Map-js.html#OpenLayers.Map.zoomToExtent
Regards,
Marc
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.
>
>
--
Dipl.-Geogr. Marc Jansen
- Anwendungsentwickler -
terrestris GmbH & Co. KG
Irmintrudisstraße 17
53111 Bonn
Tel: ++49 (0)228 / 96 28 99 -53
Fax: ++49 (0)228 / 96 28 99 -57
Email: jansen at terrestris.de
Web: http://www.terrestris.de
Amtsgericht Bonn, HRA 6835
Komplementärin: terrestris Verwaltungsgesellschaft mbH
vertreten durch: Hinrich Paulsen, Till Adams
More information about the Users
mailing list