ts84zs
asked on
javascript code - function in function
i am trying to understand this code-
in this code, a function is written inside a function -
Why the functions "setElevation()", "supports_canvas()", "getRasterData() ", "mapLoaded()"
are written within
"function(
Map, ArcGISTiledMapServiceLayer ,
domUtils, esriRequest,
parser, number, JSON, dom,
registry, RasterLayer
) "
thanks so much
pl guide
in this code, a function is written inside a function -
<script>
require([
"esri/map", "esri/layers/ArcGISTiledMapServiceLayer",
"esri/domUtils", "esri/request",
"dojo/parser", "dojo/number", "dojo/json", "dojo/dom",
"dijit/registry", "modules/RasterLayer",
"dijit/layout/BorderContainer", "dijit/layout/ContentPane",
"dijit/form/HorizontalSlider", "dojo/domReady!"
], function(
Map, ArcGISTiledMapServiceLayer,
domUtils, esriRequest,
parser, number, JSON, dom,
registry, RasterLayer
) {
//some code
function mapLoaded() {
//code of maploaded
}
function getRasterData() {
//code
}
function setElevation() {
//code
}
function supports_canvas() {
//code
}
});
</script>
Why the functions "setElevation()", "supports_canvas()", "getRasterData() ", "mapLoaded()"
are written within
"function(
Map, ArcGISTiledMapServiceLayer
domUtils, esriRequest,
parser, number, JSON, dom,
registry, RasterLayer
) "
thanks so much
pl guide
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
actually i do not understand the whole code ,,, I will open another question to explain the whole code....