Angular 11 and @arcgis/core 4.18.1 fail to display features added from editor until zooming
See original GitHub issueI am reporting an issue with
- TypeScript definitions
- another resource in this repository
Issue
I’m with Esri Sweden support, and we’ve gotten report from a client that Angular 11 and JS API 4.18 is causing issues with rendering features when they are newly added to a web map. The feature, after being added, only appears after zooming in our out in the map.
Replication
- Clone the https://github.com/Esri/jsapi-resources repository
- Move into the jsapi-resources/esm-samples/jsapi-angular-cli folder
- Run npm install
- Run npm install -g @angular/cli
Now it’s time to add some code:
###src/app/app.component.ts
change line 36 to the following:
id: '6c5d657f1cb04a5eb78a450e3c699c2a',
Add the following line after line 13:
import Editor from '@arcgis/core/widgets/Editor'
Around line 51, add the following:
const editor = new Editor({ view, });
And finally, after the following line:
view.ui.add(bkExpand, 'top-right');
Add the following:
view.ui.add(editor, 'bottom-right');
Save the edits
- Run ng serve --open
- Add a feature to the map from the editor dialog
Another example which doesn’t use feature service https://github.com/gurgelx/ArcGIS_example
Issue Analytics
- State:
- Created 3 years ago
- Comments:13 (6 by maintainers)
Top GitHub Comments
Got it. I was able to reproduce it using https://github.com/gurgelx/ArcGIS_example which implements
SketchViewModel
. This definitely looks like a known bug that we are investigating. Hopefully we can get this resolved for the 4.19 release in April.I’ll add your use case to the bug report and close this out. Thanks for reporting!
Just wanted to close the loop. I was able to verify the fix using ESModules.