Select to view content in your preferred language

Freehand Polygon

672
2
Jump to solution
05-23-2023 02:08 PM
BhavinSanghani
Frequent Contributor

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

 

0 Kudos
1 Solution

Accepted Solutions
MichaelSnook
Frequent Contributor

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"});

View solution in original post

2 Replies
MichaelSnook
Frequent Contributor

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"});

BhavinSanghani
Frequent Contributor

Thanks @MichaelSnook , it will work for me!

0 Kudos