Thank you for your answer, maybe I didn't express it clearly. I want to finish drawing the polygon when creating a polygon given a coordinate point and adding each point by clicking the button. Instead of drawing by tapping the screen.
Hi there,
This sample shows how it can be done: https://developers.arcgis.com/javascript/latest/sample-code/sandbox/?sample=highlight-features-by-geometry
From the button click you call the SketchViewModel.create() method and pass in the tool name you need as shown below.
selectButton.addEventListener("click", () => { sketchViewModel.create("rectangle"); });
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.