I am trying to find out how a user can draw a shape, and on click get the information on the shape they drew, without transforming and moving it around.
I've managed to get sketch up and running and drawing working.
However even disabling all the options when user clicks on it it still allows moving of shape, and i don't know how to get details of the shape (particularly points of the shape so i can store it for future drawing).
Here is what i have so far
const graphicsLayer = new GraphicsLayer();
const webmap = new WebMap({
// committed for brevity
layers: [graphicsLayer]
});
const view = new MapView({
map: webmap,
// committed for brevity
});
let sketch = new Sketch({
layer: graphicsLayer,
view: view,
creationMode: "update",
defaultUpdateOptions: {
enableRotation: false,
enableScaling: false,
enableZ: false,
toggleToolOnClick: false,
}
});