Bookmarks with LocalStorage

284
2
03-11-2021 08:46 PM
Clinton_Lunn
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. 

Clinton_Lunn_0-1615523940973.png

 

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

0 Kudos
2 Replies
ReneRubalcava
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.

https://developers.arcgis.com/javascript/latest/api-reference/esri-webmap-Bookmark.html#extent

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.

Clinton_Lunn
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