Skip to main content
1 of 3
Stephen Lead
  • 21.2k
  • 18
  • 114
  • 241

How to save Bookmarks between sessions using the JS API

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?

Thanks

Stephen Lead
  • 21.2k
  • 18
  • 114
  • 241