[OpenLayers-Users] Problem with zoomexents and google maps la yer

John Cole john.cole at uai.com
Sat Jul 14 10:27:23 EDT 2007


Steve,
  You might be doing this already or it might not apply, but...

  If you are using zoom levels (and not just free zoom scales) find out the
zoom level for your extent with something like:

var zoomlevel = map.getZoomForExtent(ci.Bounds);


  This should make sure that your entire extent is in the view port.  Then
use a setCenter with the center of your bounds and the zoomlevel.

  Like I said, this might not apply in your case.

John

-----Original Message-----
From: users-bounces at openlayers.org [mailto:users-bounces at openlayers.org] On
Behalf Of Stephen Woodbridge
Sent: Friday, July 13, 2007 4:44 PM
To: openlayers user list
Subject: [OpenLayers-Users] Problem with zoomexents and google maps layer

Hi all,

I have run into an annoying issue that if you zoom to an extents the 
extents is not always inside the viewport, so if I have a bunch of 
points and zoom to their extents, sometimes some of the points are 
outside the viewport after the zoom.

Is there a fix or workaround for this problem?

Thanks,
   -Steve W
_______________________________________________
Users mailing list
Users at openlayers.org
http://openlayers.org/mailman/listinfo/users
This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the sender. This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail.



More information about the Users mailing list