I'm using the Esri Angular CLI template from Github here: GitHub - Esri/angular-cli-esri-map: Example Angular component for building mapping applications with the ArcGIS API for … . I've been trying to understand how I can add a widget to the app, in the esri-map.component.ts file. I've added the appropriate code for the BasemapToggle widget within the "async ... try {..." and after the "const mapViewProperties:..." parts like so:
But after that, I get a window in Visual Studio Code saying "any: Property 'add' does not exist on type 'DefaultUIProperties'", even though it looks like add() is mentioned in the documentation: https://developers.arcgis.com/javascript/latest/api-reference/esri-views-ui-DefaultUI.html.
The code is attached. Any guidance whatsoever would be greatly appreciated.
As the mentioned reference is added, I still can't find the solution
Maybe this response will help others....
Add the widget to the mapview in the mapView.when(() => { callback. This will ensure that the mapView is fully initialized AND in scope.
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.