laptop and a wrench

Bogue

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

Dernière publication: December 31, 2020 ArcGIS API for JavaScript
Numéro d’ID de bogue BUG-000135688
EnvoiNovember 24, 2020
Dernière modificationJune 5, 2024
S’applique àArcGIS API for JavaScript
Version trouvée4.17
Système d’exploitationWindows OS
Version du système d’exploitation10.0
StatutNon-Reproducible

Informations supplémentaires

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

Solution de contournement

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

Étapes pour reproduire

ID de bogue: BUG-000135688

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