laptop and a wrench

Erro

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

Última Publicação: August 7, 2019 ArcGIS API for JavaScript
Número de ID do Erro BUG-000123451
EnviadoJuly 1, 2019
Última ModificaçãoJune 5, 2024
Aplica-se àArcGIS API for JavaScript
Versão encontrada4.12
StatusNon-Reproducible

Informações Adicionais

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

Solução Provisória

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.

Etapas para Reproduzir

ID do Erro: BUG-000123451

Software:

  • ArcGIS API for JavaScript

Seja notificado quando o status de um erro mudar

Baixe o Aplicativo de Suporte da Esri

Descubra mais sobre este tema

Obtenha ajuda de especialistas do ArcGIS

Entre em contato com Suporte Técnico

Baixe o Aplicativo de Suporte da Esri

Ir para as opções de download