[OpenLayers-Users] Set zoomlevel depending on the fartherest
pinpoints location
Andreas Hocevar
ahocevar at opengeo.org
Mon Dec 12 09:33:00 EST 2011
Hi,
if your pinpoints are on a vector layer, you can do
map.zoomToExtent(vectorLayer.getDataExtent());
(assuming you have a reference to your OpenLayers.Map object as map,
and to your vector layer as vectorLayer)
Andreas.
On Mon, Dec 12, 2011 at 3:07 PM, Takako Tucker <Takako.Tucker at bbc.co.uk> wrote:
> Hi. Another question, if you don't mind.
>
> Is it possible to set a zoom level based on fartherest pinpoints on each
> side of the map?
> Has anyone done this before?
>
> Takako
>
>
>
> http://www.bbc.co.uk
> This e-mail (and any attachments) is confidential and may contain personal
> views which are not the views of the BBC unless specifically stated.
> If you have received it in error, please delete it from your system.
> Do not use, copy or disclose the information in any way nor act in reliance
> on it and notify the sender immediately.
> Please note that the BBC monitors e-mails sent or received.
> Further communication will signify your consent to this.
>
> _______________________________________________
> Users mailing list
> Users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/openlayers-users
>
--
Andreas Hocevar
OpenGeo - http://opengeo.org/
Expert service straight from the developers.
More information about the Users
mailing list