laptop and a wrench

Bug

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

Last Published: December 31, 2020 ArcGIS API for JavaScript
Bug ID Number BUG-000135688
SubmittedNovember 24, 2020
Last ModifiedJune 5, 2024
Applies toArcGIS API for JavaScript
Version found4.17
Operating SystemWindows OS
Operating System Version10.0
StatusNon-Reproducible

Additional Information

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

Workaround

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

Steps to Reproduce

Bug ID: BUG-000135688

Software:

  • ArcGIS API for JavaScript

Get notified when the status of a bug changes

Download the Esri Support App

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options