Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

The ArcGIS Server JavaScript API contains a Bookmark dijit which allows users to add and delete bookmarks. These are not persisted between sessions, but are reset each time the page refreshes.

Has anyone written code which saves the bookmarks between sessions, and which they're willing to share?

Failing that, does anyone have any pointers as to how you'd go about writing this functionality?

Presumably you would need to save each BookmarkItem to a cookie and read them in again when the page loaded - are there any samples I can use as a starting point?

(Ideally this would be tied to a user, but more realistically it could be tied to a browser only)

Thanks

share|improve this question

1 Answer 1

up vote 3 down vote accepted

Yes, there's a sample in the SDK docs that shows this: Store Bookmarks Client Side.

Edit: updated broken link

share|improve this answer
    
perfect, thanks. Could you add a reference to this sample from the main Bookmark doco? It seems like a logical extension of the bookmark functionality. –  Stephen Lead Feb 8 '12 at 22:15
    
@StephenLead good call, we'll add a link to the bookmark widget doc –  Derek Swingley Feb 9 '12 at 3:43
    
Unfortunately the link above no longer works, so hopefully I can find it from the bookmark widget doc. –  user15116 Feb 12 '13 at 18:33
    

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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