[OpenLayers-Users] saving a state of a map

Michael mdm at yachtpc.com
Sat Jul 16 01:26:34 EDT 2011


I think offering both is clever, and maybe you can use some of the same 
code!

On 7/15/2011 11:09 AM, Greg Allensworth wrote:
> 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.
>


More information about the Users mailing list