1

I am building an application using Angular JS, and have been accessing ESRI classes thus far in the following way:

var graphicsLayer = new esri.layers.GraphicsLayer();

I have access to the 'esri' object throughout my application. I am getting this access through my index.html file:

<script src="https://js.arcgis.com/3.12"></script>

Of note, I am not using any dojo code to initialize the map. Is there any way I can access the Draw toolbar class in the ESRI JS API without having to load it in through dojo?

PolyGeo
65.5k29 gold badges115 silver badges349 bronze badges
asked Apr 7, 2015 at 16:47
1
  • esri.bundle.toolbars.draw Commented Apr 7, 2015 at 17:52

1 Answer 1

1

You should be be able to use it like you have used GraphicLayer.

var drawToolBar = new esri.toolbars.Draw(map, options);

Create Buttons using any framework or html, and onclick activate the required tool in draw. couple of things you need to handle is the draw-end to get the geometry from the draw tools. and ensure the map navigation is set to appropriate value when ever draw tool is active or disabled, as show in this example. https://developers.arcgis.com/javascript/jssamples/toolbar_draw.html

answered May 18, 2015 at 14:15

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.