Last active
January 1, 2018 23:02
-
-
Save geog4046instructor/aa2722a066ee8a2f10c3 to your computer and use it in GitHub Desktop.
ArcGIS JavaScript API - Simple map
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 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