AnsweredAssumed Answered

write and load custom dojo class

Question asked by bforbhavin on Aug 18, 2014
Latest reply on Apr 22, 2015 by Yusufamro

How can I write my custom dojo class that I can add with require([..]) like other ArcGIS JS classes? I created one module (or class) like following so, I can keep some of the code in this class for reusability.


//file name for following module let's say ESRI.js














  function(GraphicsLayer, SimpleMarkerSymbol, SimpleFillSymbol, SimpleLineSymbol, TextSymbol, Color, Font,

  Circle, Polygon, Units, Query, QueryTask){

return {

  getMap: function() {



  setMap: function(map) { = map;