[OpenLayers-Dev] reassigning map view question

mikani gina.m.dang at lmco.com
Mon Jul 13 10:31:27 EDT 2009


Hi,

I'm trying to reset the map to a current viewport by getting the extent from
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 to
reset the map to previous state?

Sample code:

...
var boundbox = map.getExtent().toBBOX());
...

After:
...
map.zoomToExtent(new OpenLayers.Bounds(boundbox));
...
-- 
View this message in context: http://n2.nabble.com/reassigning-map-view-question-tp3250698p3250698.html
Sent from the OpenLayers Dev mailing list archive at Nabble.com.



More information about the Dev mailing list