[OpenLayers-Dev] reassigning map view question
gina.m.dang at lmco.com
Mon Jul 13 15:08:19 EDT 2009
I'm passing the boundbox as a string from a different function, so I actually
need to create bound object in order to zoomToExtent.
Originally I thought it didn't pass the special characters, but it somehow
revert to even if I hard code the str.
Eric Lemoine-2-2 wrote:
> On Monday, July 13, 2009, mikani <gina.m.dang at lmco.com> wrote:
>> I'm trying to reset the map to a current viewport by getting the extent
>> current view, and setting the zoomextent to the previous extent, and it's
>> not working correctly for me.
>> Is this a correct way to do so? If not, what do I need to call in order
>> reset the map to previous state?
>> Sample code:
>> var boundbox = map.getExtent().toBBOX());
>> map.zoomToExtent(new OpenLayers.Bounds(boundbox));
> How about
> var bounds = map.getExtent();
> Eric Lemoine
> Camptocamp France SAS
> Savoie Technolac, BP 352
> 73377 Le Bourget du Lac, Cedex
> Tel : 00 33 4 79 44 44 96
> Mail : eric.lemoine at camptocamp.com
> Dev mailing list
> Dev at openlayers.org
View this message in context: http://n2.nabble.com/reassigning-map-view-question-tp3250698p3252397.html
Sent from the OpenLayers Dev mailing list archive at Nabble.com.
More information about the Dev