laptop and a wrench

Bogue

The Sketch widget graphics are drawn behind layers brought in through an ArcGIS Online web map.

Dernière publication: August 7, 2019 ArcGIS API for JavaScript
Numéro d’ID de bogue BUG-000123451
EnvoiJuly 1, 2019
Dernière modificationJune 5, 2024
S’applique àArcGIS API for JavaScript
Version trouvée4.12
StatutNon-Reproducible

Informations supplémentaires

GraphicsLayer is added before the view is ready. Update the code to the following and it works correctly: var layer = new GraphicsLayer(); const map = new WebMap({ portalItem: { id: '3acfce904368451f82b60d5c8a120f82' }}); const view = new MapView({ container: "viewDiv", map: map, zoom: 5, center: [-74, 45] }); view.when(function(evt) { map.add(layer); var sketch = new Sketch({ layer: layer, view: view }); view.ui.add(sketch, "top-right"); })

Solution de contournement

Repeat the above steps with this jsbin: https://jsbin.com/tatatedece/edit?html,output

The workaround is to add the image service directly to the map versus adding in the web map and consuming it via ArcGIS API for JavaScript.

Étapes pour reproduire

ID de bogue: BUG-000123451

Logiciel:

  • ArcGIS API for JavaScript

Recevoir une notification lorsque le statut d’un bogue change

Télécharger l’application Esri Support

En savoir plus sur ce sujet

Obtenir de l’aide auprès des experts ArcGIS

Contacter le support technique

Télécharger l’application Esri Support

Accéder aux options de téléchargement