laptop and a wrench

Error

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

Última publicación: August 7, 2019 ArcGIS API for JavaScript
Número de ID del error BUG-000123451
EnviadoJuly 1, 2019
Última modificaciónJune 5, 2024
Relacionado conArcGIS API for JavaScript
Versión encontrada4.12
EstadoNon-Reproducible

Información adicional

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

Solución alternativa

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.

Pasos para reproducir

ID del error: BUG-000123451

Software:

  • ArcGIS API for JavaScript

Recibir notificaciones cuando cambie el estado de un error

Descargar la aplicación de soporte de Esri

Descubrir más sobre este tema

Obtener ayuda de expertos en ArcGIS

Contactar con el soporte técnico

Descargar la aplicación de soporte de Esri

Ir a opciones de descarga