ArcGIS API for JavaScript is using ESRI Toolbar Widget to handle Drawing Geometry(graphics) on the maps. Here is the Demo doing this job.
Now my question is, is there a way to not use the "esri/toolbars/draw"
facilities (Widget) and draw on the Graphic Layer by using core API coding?
Do you really want to go down that rabbit hole? I'm sure it is possible by using standard map click event handlers, but you would need to recreate all the graphic feature management tools, not even to mention if you want to edit the features you have drawn. I would just use the toolbar and try to customize it. What is the issue with the toolbar?
Thanks for reply FC Basson but what if I want to have my own toolbar? or enabling some more functions like getting x and y of added point or enabling edits and replacing points on the map! the current API is so silence about this things and I was thinking to create a new function to cover all of this!
Hi Bruce. When you say "current API" I assume you are actually talking about 3.19 and not 4.2, seeing that Editing and Sketching is not yet part of 4.2 (Choose between version 3.19 and 4.2 | ArcGIS API for JavaScript 4.2 )?
The 3.19 Draw toolbar (Draw | API Reference | ArcGIS API for JavaScript 3.19 ) can be customized with some additional coding and the Edit toolbar (Edit | API Reference | ArcGIS API for JavaScript 3.19 ) has all the bells and whistles to modify your features. What more do you need?