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?

  • 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. – OZGUR SARIKAMIS Dec 19 '11 at 14:39
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, privacy policy and cookie policy

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