1 <script type="text/javascript"> 2 //require newly created dijit 3 dojo.require("mapDijits.mapDijit_FullScreen"); 4 dojo.require("mapDijits.toolsDijit"); 5 dojo.require("dojo.parser"); 6 7 // global 8 var g = {}; 9 g.baseURL = "http://gis.sandy.utah.gov/ArcGIS/rest/services/"; 10 g.PermitsURL = g.baseURL + "Public_Works/Road_Cut_Permits/MapServer"; 11 12 function init(){ 13 // get map dijit and tools dijit 14 var mapDij = dijit.byId("mapDijit"); 15 var toolsDij = dijit.byId("toolsDijit"); 16 17 // set map dijit for tools dijit 18 toolsDij.mapDijit = mapDij; 19 toolsDij.setup(); 20 21 // add permits layer 22 mapDij.addLayer(g.PermitsURL, cached=false, wireErrors=true); 23 24 // add buttons 25 toolsDij.addButton(label="Add Line", iconClass="drawLineIcon", method=drawLine); 26 toolsDij.addButton(label="Add Point", iconClass="drawPointIcon", method=drawPoint); 27 }