1

I am using the sketch widget for ArcGIS JavaScript: https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html

I am building a custom toolbar with additional tools and would like to emulate the behavior of the "reshape" and "transform" buttons in the default toolbar. I don't see a way to do this through the Sketch Widget API.

Is this possible?

Katah
1,0707 silver badges12 bronze badges
asked Oct 14, 2019 at 15:37

1 Answer 1

2

Yes, you want to use the SketchViewModel. When the user clicks your button, call the update method.

var sketchViewModel = new SketchViewModel({
 view: view,
 layer: graphicsLayer
});
sketchViewModel.update([currentGraphic], {
 tool: "transform"
});

Full demo here.

answered Oct 30, 2019 at 14:51

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.