0

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?

2
  • 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. Commented Dec 19, 2011 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. Commented Dec 19, 2011 at 14:39

1 Answer 1

1

I've found a solution for my problem.

thanks to Alexandre Dubê :

map.events.on({"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...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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