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?

  • esri.bundle.toolbars.draw – Erikk Ross Apr 7 '15 at 17:52
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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.