2

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.

PolyGeo
65.5k29 gold badges115 silver badges350 bronze badges
asked Feb 8, 2012 at 5:02

1 Answer 1

4

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

The bookmarks widget does not natively persist bookmarks created by a user. This sample shows how to store user created bookmarks client side. When bookmarks are created, the app tries to store them in local storage. If local storage is not available, the app falls back to using a cookie.

PolyGeo
65.5k29 gold badges115 silver badges350 bronze badges
answered Feb 8, 2012 at 17:41
0

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.