Skip to content

Instantly share code, notes, and snippets.

@geog4046instructor
Last active January 1, 2018 23:02
Show Gist options
  • Save geog4046instructor/aa2722a066ee8a2f10c3 to your computer and use it in GitHub Desktop.
Save geog4046instructor/aa2722a066ee8a2f10c3 to your computer and use it in GitHub Desktop.
ArcGIS JavaScript API - Simple map
/* Create a simple map with the ArcGIS JavaScript API.
* example: http://developers.arcgis.com/javascript/samples/map_simple/
*/
require([
"esri/map", // modules need to be added to this list before dojo/domReady, separated by a comma and enclosed in quotation marks
"dojo/domReady!"
], function (
Map // the names of functions corresponding to the modules need to be added to this list, separated by a comma
) {
let map = new Map("map", {
basemap: "topo", // list of basemap names: https://developers.arcgis.com/javascript/jsapi/esri.basemaps-amd.html
center: [-90, 30],
zoom: 4
})
// code to add layers and map control goes here
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment