How to draw freehand polygon using ArcGIS Maps SDK for Javascript 4.26?
Is there any support for that?
I looked at Draw and SketchViewModel classes but didn't find similar to how it is in 3.x and given on the following sample url:
https://developers.arcgis.com/javascript/3/sandbox/sandbox.html?sample=toolbar_draw
Solved! Go to Solution.
Wire up a sketch widget
mySketch = new Sketch(
layer: <your graphics layer>,
view: <your view>
)
When you want to sketch something go:
mySketch.create("polygon", {mode: "freehand"});
Wire up a sketch widget
mySketch = new Sketch(
layer: <your graphics layer>,
view: <your view>
)
When you want to sketch something go:
mySketch.create("polygon", {mode: "freehand"});
Thanks @MichaelSnook , it will work for me!