Hi All,
Our requirement is to provide additional Draw Tools like - Circle, Rectangle, Ellipse etc, when a template is selected in Editor Widget (JS API 4.X). I tried to use Editor's viewModel (of type, EditorViewModel) property of Editor Widget and from that, use sketchViewModel property (of type, SketchViewModel) and call its "cancel" function (to cancel selected polygon tool - which is default) and call "create" function by passing the desired tool name as parameter (such as "circle").
Still, no change in the flow and same Polygon tool is continued to be active and could not draw any other shape.
I could not understand where Im going wrong. I did not find much help/documentation on how to use the view models of Editor and its SketchViewModel. I also tried setting new instance of SketchViewModel, still no use.
Any help would be highly appreciated.
Thanks in advance!
With Regards,
Vara Prasad