Menu
Newbedev LogoNEWBEDEV Python Javascript Linux Cheat sheet
Newbedev LogoNEWBEDEV
  • Python 1
  • Javascript
  • Linux
  • Cheat sheet
  • Contact

How to reference the ArcGIS Server JS API using RequireJS

You would do this

requirejs.config({
  'paths': {
    'esri': 'http://js.arcgis.com/3.12/esri',
    'dojo': 'http://js.arcgis.com/3.12/dojo',
    'dojox': 'http://js.arcgis.com/3.12/dojox',
    'dijit': 'http://js.arcgis.com/3.12/dijit'
  }
});

Then require your modules in AMD style like this

requirejs(["esri/dijit/BasemapGallery", 
         "dojo/dom", 
         "dijit/form/Button", 
         "dojox/grid/DataGrid"], 
         function(BasemapGallery, dom, Button, DataGrid){
});

Tags:

Javascript

Arcgis Javascript Api

Related

Area in KM from Polygon of coordinates Performing a 'far analysis' using ArcGIS for Desktop? Converting csv to kml/geojson using ogr2ogr or equivalent command line tools? How to split text attribute by characters in QGIS? Coordinate transformation/reprojection using DotSpatial? Using azimuthal orthographic projection in QGIS? Filtering Overpass-API by country How to create a mosaic in QGIS with cutline and feathering for Landsat-8 imagery 'Home' button Leaflet map What does 'Course Made Good' in NMEA string mean? Remove selected feature Openlayers 3 Can one parameter choice on Python toolbox tool set Display Names of other parameters?

Recent Posts

Pandas how to find column contains a certain value Recommended way to install multiple Python versions on Ubuntu 20.04 Build super fast web scraper with Python x100 than BeautifulSoup How to convert a SQL query result to a Pandas DataFrame in Python How to write a Pandas DataFrame to a .csv file in Python
© 2021 newbedevPrivacy Policy