Bookmarks with LocalStorage

03-11-2021 08:46 PM
New Contributor

Hi all,

I am trying to implement localStorage with my bookmarks, but I also do not want to use a WebMap to hold my bookmarks as from the recommendations that I have seen. I've been fiddling around with this for a little while and it seems to work, but I get some strange errors thrown that I don't quite understand. 



I've attached a codepen to illustrate my issue. Any advice?

0 Kudos
2 Replies
Frequent Contributor II

The extent property of the Bookmark has been deprecated in favor of Bookmark.viewPoint, that's what the message is telling you.

For interoperability, the toJSON method still write out the extent with the viewPoint, so when you hydrate it and consume it, you get the warning. This could safely be ignored, it's just letting you know extent will be going away on the Bookmark in a future release.

New Contributor

Thanks for the reply Rene,

Can all of these warning and error messages be safely ignored? Your comment definitely explains the deprecation warning, but I'm not sure about the following 2 error messages. 

0 Kudos