I am developing a simple application using 4.16 - quite a bit different from the old 3.x stuff, so I'm still getting used to it. The additional libs/etc. I am using are bootstrap, jQuery & jQueryUI.
What I am trying to do is have a simple map displayed in a bootstrap grid using the first 11 columns and a series of buttons in the remaining column each of which will open another widget, each in its own jQueryUI dialog.
I have successfully, to an extent, (pun fully intended) managed to bring in basemap gallery, Sketch and Measure widgets (the Measure widget can be finicky, more on this later) and so I thought I'd try Bookmarks.
It successfully load the widget into the dialog and displays it but when I try to add the first bookmark the app displays a never ending whirlygig icon with the message "Adding bookmark." adjacent to it.
And checking the developer tools displays the error:
Uncaught (in promise) TypeError: can't access property "add", b.viewModel.bookmarks is undefined
This happens every time without fail in both firefox developer edition and chrome
(latest versions of each).
I have also experienced the same sort of error using the Measurement widget but that is intermittent and shows up usually after having done several successful measure actions.
Presently I am using only a single html page for the application just to keep things simple. The environment is Visual Studio Community Edition 2019. I've attached the code for anyone to have a look at.
Any suggestions would be helpful!
This was a bug on our side that will be fixed in the 4.17 release. Currently, adding bookmarks only works when you use the bookmarks widget with a WebMap (and not with Map). See related issue Bookmarks widget - v4.16
We will be releasing 4.17 shortly, so stay tuned for when it's released and the bug should be fixed. Or if you want to try out the fix in our development version of 4.17, you can use https://js.arcgis.com/next in your app instead of
Try using the measure tool with the same code above and after doing an area mesurement, then a length measurement, then trying another area measurement
Uncaught TypeError: can't access property "measurement", a is null
and then the application becomes unresponsive.
I am not able to reproduce the measurement issue that you are seeing above.
Portal home page: Portal | Documentation for ArcGIS Enterprise
Hope this helps!
Hi Anne: I noted yesterday that the measure widget was completely snafued and assumed someone must be working on it. Today it seems well-behaved and working perfectly, so I don't know what you (or someone else?) did but it's working now. Thanks.