[OpenLayers-Users] Set zoomlevel depending on the fartherest pinpoints location

Takako Tucker Takako.Tucker at bbc.co.uk
Mon Dec 12 09:43:25 EST 2011


Thanks Andreas and John for your support. 

-----Original Message-----
From: andreas.hocevar at gmail.com [mailto:andreas.hocevar at gmail.com] On
Behalf Of Andreas Hocevar
Sent: 12 December 2011 14:33
To: Takako Tucker
Cc: openlayers-users at lists.osgeo.org
Subject: Re: [OpenLayers-Users] Set zoomlevel depending on the
fartherest pinpoints location

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.

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.
					


More information about the Users mailing list