How to restrict the Sketch widget

136
0
3 weeks ago
SaiPeketi
New Contributor III

Hi,

 

I want to restrict the sketch from sketch widget with the polygon boundary. I'm aware that we can get the geometry with event of click

sketch.on("create, (event) => {

if(!(geometryEngine.within(event.graphic.geometry, polygon))) {

return;

}

});

but I'm still able to create feature outside the polygon boundary.

Thanks

0 Kudos
0 Replies