laptop and a wrench

Bug

Adding a function with graphicsLayer clone and modifying one of its properties would only change in a single-click HTML button if it was clicked twice.

ArcGIS Maps SDK for JavaScript
Bug ID Number BUG-000130105
SubmittedApril 13, 2020
Last ModifiedFebruary 14, 2025
Applies toArcGIS Maps SDK for JavaScript
Version found4.14
Operating SystemWindows OS
Operating System Version10.0 64 Bit
StatusUnder Consideration

Workaround

Link workaroundhttps://codepen.io/AuraipornA/pen/QWQoezq

  • Instead of making a clone of the graphicsLayer and having the Polygon and Graphic made outside the function, make a function with the Polygon and Graphic within it.
  • Add in graphicsLayer.removeAll() to reset the old graphic.
  • Add in graphicsLayer.add(Graphic) to make the newly defined Polygon that were made using the HTML buttons using a single click as seen in BUG-000130105_workaround (Line number 75 - 92).

Steps to Reproduce

Bug ID: BUG-000130105

Software:

  • ArcGIS Maps SDK 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