[OpenLayers-Dev] OpenLayers map.AfterDraw event
geojoe
jwolter at wisc.edu
Thu Nov 5 16:42:07 EST 2009
I would like to save the map extent to cookies so I can use it on a page
refresh.
Is there an AfterDraw event and if not how do I create it so it will fire
the function below?
function saveMapExtentCookies() {
var bounds = map.getExtent();
var date = new Date();
var days = 1;
alert(bounds.Left);
date.setTime(date.getTime()+(days*24*60*60*1000));
var expires = "; expires="+date.toGMTString();
document.cookie = "'mapExtentLeft'=" +bounds.Left +expires;
document.cookie = "'mapExtentBottom'="+bounds.Bottom +expires;
document.cookie = "'mapExtentRight'=" +bounds.Right +expires;
document.cookie = "'mapExtentTop'=" +bounds.Top +expires;
}
Thanks
--
View this message in context: http://n2.nabble.com/OpenLayers-map-AfterDraw-event-tp3955274p3955274.html
Sent from the OpenLayers Dev mailing list archive at Nabble.com.
More information about the Dev
mailing list