Last active
December 24, 2015 13:09
-
-
Save jgravois/6802432 to your computer and use it in GitHub Desktop.
anatomy of AMD module loading
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
require([ | |
"esri/map", "esri/InfoTemplate", "esri/layers/FeatureLayer", | |
"dojo/parser", "dojo/domReady!" | |
], function( //Beginning of anonymous callback which fires when modules have been loaded. | |
Map, InfoTemplate, FeatureLayer, | |
parser //Variable names to refer to loaded modules | |
) { | |
parser.parse(); //first line of actual callback code | |
map = new Map("mapDiv", { | |
basemap: "national-geographic", | |
center: [-96.541, 38.34], | |
zoom: 6 | |
}); | |
... | |
}) //close out the anonymous callback function and require method's parenthesis |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment