[Users] Saving the state of the client GUI to cookies or localstorage

Valiquette,Francois [Montreal] Francois.Valiquette at ec.gc.ca
Wed Feb 20 15:05:56 CET 2013


Hello,

 

I've started coding functions to save the GUI state. For example, all Layer Tree that the user have added, also it will save witch layers were checked, the layers order, the size of the panels (my panels are resizable). I was wondering if anyone has done anything similar ?

 

At the beginning I wanted to use JSON.stringify but the map and the layer nodes are having circular references and JSON stringify does not allow me to do it easily. Also, when using  Ext.state.Manager, I get a stack over flow when saving to cookies. 


This is why,  I have created my own save file by making a loops over my trees and by saving the necessary data to a multidimensional array . Is there any simpler way ?

 

François

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.geoext.org/pipermail/users/attachments/20130220/f5a7bac9/attachment.htm 


More information about the Users mailing list