This sandbox shows you how to draw polygons:
Sandbox | Sample Code | ArcGIS API for JavaScript 4.24 | ArcGIS Developers
However, I can shift click them to select them. Here I have selected 2 out of the 3.
Is it possible to find out what polygons you have selected?
Hey there,
You can listen to Sketch widget's update event and its payload returns array of selected graphics.
sketch.on("update", (event)=>{ console.log("selected graphics for update", event.graphics); });
Les membres connectés peuvent publier, suivre les mises à jour, et plus encore. Nouveau ici ? Inscrivez-vous gratuitement.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.