Select to view content in your preferred language

Freehand Polygon

422
2
Jump to solution
05-23-2023 02:08 PM
BhavinSanghani
Occasional Contributor II

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
Occasional Contributor III

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
Occasional Contributor III

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
Occasional Contributor II

Thanks @MichaelSnook , it will work for me!

0 Kudos