laptop and a wrench

Bug

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

Zuletzt veröffentlicht: August 7, 2019 ArcGIS API for JavaScript
Bug-ID-Nummer BUG-000123451
EingereichtJuly 1, 2019
Zuletzt geändertJune 5, 2024
Gilt fürArcGIS API for JavaScript
Gefunden in Version4.12
StatusNon-Reproducible

Zusätzliche Informationen

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"); })

Workaround

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.

Schritte zur Reproduzierung

Bug-ID: BUG-000123451

Software:

  • ArcGIS API for JavaScript

Benachrichtigung erhalten, wenn sich der Status eines Bugs ändert

Esri Support App herunterladen

Weitere Informationen zu diesem Thema erkunden

Unterstützung durch ArcGIS-Experten anfordern

An den technischen Support wenden

Esri Support App herunterladen

Zu Download-Optionen wechseln