ArcGIS API for JavaScript is using ESRI Toolbar Widget to handle Drawing like Point 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?


In the Demo page, add this few lines after map.on("load", createToolbar):

    map.on("click", addGraphic);

    function addGraphic(evt) {
      var symbol = new SimpleMarkerSymbol();
      var graphic = new Graphic(evt.mapPoint, symbol);
      alert("Graphic added without the draw toolbar");
  • Thanks a lot Lele3p, can we also use same mechanism and other Geometry like line , Polyline, Polygon,.. ? Jan 17 '17 at 18:00

This site is temporarily in read only mode and not accepting new answers.

Not the answer you're looking for? Browse other questions tagged .