[OpenLayers-Users] saving a state of a map

Greg Allensworth gregor at greeninfo.org
Fri Jul 15 14:09:30 EDT 2011


On 7/15/2011 11:03 AM, Huey Brantley wrote:
> Permalink would create a url to that view.  You would also extend the
> Bookmark control to save the position to a cookie.

True, the Permalink and ArgParser are a good route to do this too. 
Depends on your use case.

Permalink has the advantage that SOMEONE ELSE can visit that big long 
URL and see the same map as yourself. It means more work for the users 
(copy and pasting URLs) but does give the ability to share your map with 
someone else. You can't do that with cookies.

The cookie method has the advantage of not requiring the user to copy 
and paste a long URL: you visit the same map as always, and ta-da it's 
the same as before. This is great when the user may be visiting all over 
the website and you want state retained, and passing around a big long 
URL may not be feasible.

-- 
Greg Allensworth
Web GIS Developer, GreenInfo Network
BS  A+  Network+  Security+  Linux+  Server+


More information about the Users mailing list