Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using GeoExt with OpenLayers and trying to save the extent of the map. while exploring the page, users can be able to save the extent and restore via their browsers.

Here is the point that I'm stuck:

how can I catch mousewheel's actions to save the extent of the map and keep it in cookies?

any ideas?

share|improve this question
Which question(s) are you asking: how to capture map extent change events, or how to use cookies? There should be plenty of examples and info online for both. – Anthony -GISCOE- Dec 19 '11 at 13:45
Actually examples about cookies, yes there are plenty of them. But I don't know how to catch the extent after the mousewheel rolls. – vestanbul Dec 19 '11 at 14:39

I've found a solution for my problem.

thanks to Alexandre Dubê :{"moveend": function(e) { 
     alert("map moveend"); 
}, "zoomend": function(e) { 
     alert("map zoomend"); 
}, scope: map}); 

So whenever the zoom or extend of my map changes, I will be able to save the extend information...

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.