laptop and a wrench

Error

Graphic with TextSymbol does not draw when Polygon Graphic is added to the view twice.

Última publicación: December 31, 2020 ArcGIS API for JavaScript
Número de ID del error BUG-000135688
EnviadoNovember 24, 2020
Última modificaciónJune 5, 2024
Relacionado conArcGIS API for JavaScript
Versión encontrada4.17
Sistema operativoWindows OS
Versión de sistema operativo10.0
EstadoNon-Reproducible

Información adicional

The code appears to be the issue. If the user zooms in or out after the original test app loads, the text appears to be fine. https://codepen.io/lxie/pen/QWEeroL?editors=1000 If the user adds a delay before adding the second polygon graphic, the text appears fine. https://codepen.io/noash/pen/wvzzByO

Solución alternativa

To add a graphic to the view for the second time, use Graphic.clone() to create a deep clone of the graphic object, and add the clone to the view instead. 

  • Graphic.clone(): https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html#clone

Pasos para reproducir

ID del error: BUG-000135688

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