Friends
The ESRI Javascript example below uses Window.grid and Window.map.
They makes a New Map with Window.map and add layers to it with map.addlayer.
Confusing...at least for me. Dojo must be involved.
dgrid | ArcGIS API for JavaScript
Thanks
Keith
Solved! Go to Solution.
In the samples where you see the window.map or window.[some variable name] the developer is just writing the sample so that the variable is globally accessible. Basically its attaching the map variable to the window object so you can access it throughout your application.
Here's a link to an article with some more detail:
Global Variables in JavaScript - Snook.ca
And additional reading on global variables in general and why you may want to minimize the use of global variables in your app. See the 'Variable Declarations' section.
In the samples where you see the window.map or window.[some variable name] the developer is just writing the sample so that the variable is globally accessible. Basically its attaching the map variable to the window object so you can access it throughout your application.
Here's a link to an article with some more detail:
Global Variables in JavaScript - Snook.ca
And additional reading on global variables in general and why you may want to minimize the use of global variables in your app. See the 'Variable Declarations' section.