question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Angular 11 and @arcgis/core 4.18.1 fail to display features added from editor until zooming

See original GitHub issue

I 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

  1. Clone the https://github.com/Esri/jsapi-resources repository
  2. Move into the jsapi-resources/esm-samples/jsapi-angular-cli folder
  3. Run npm install
  4. 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

  1. Run ng serve --open
  2. 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:closed
  • Created 3 years ago
  • Comments:13 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
andygupcommented, Jan 27, 2021

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!

1reaction
bsanticommented, Mar 7, 2021

Just wanted to close the loop. I was able to verify the fix using ESModules.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Breaking changes | ArcGIS Maps SDK for JavaScript 4.25
A comprehensive guide to all breaking changes for the ArcGIS Maps SDK for JavaScript ... To see all the added features and advancements...
Read more >
Bug: Graphics Added to GraphicLayer do not render until you ...
Describe the bug When adding graphics to a graphic layer, the graphics do not render immediately. If you zoom the map, the graphics...
Read more >
Error while loading loading map. - Page 2 - Esri Community
I'm using React [^17.0.1] and arcgis-js-api [^4.18.1] for the app, After 'npm start' I'm receiving the below errors, [esri.widgets.
Read more >
ArcGIS API for JavaScript: Building Apps with Angular [2021]
Learn about integrating the ArcGIS API for JavaScript's @ arcgis / core ES modules with Angular's robust development platform.
Read more >
ArcGIS API for JavaScript 4.18.1 - Angular 11, Typescript, NPM
import { EventEmitter, Injectable } from '@angular/core'; import MapView from ... You would then add your layers to the map view as usual....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found