I'm new to the Javascript API.
An example of my question is if you add "esri/Symbols/SimpleLineSymbol" to the list on this sample: ArcGIS API for JavaScript Sandbox
It will lose functionality. Why is that?
The items do not have to be in any order. However, the order needs to be reflected in the names of the function parameters:
The case of the required module path matters. In your example try changing "esri/Symbols/SimpleLineSymbol" to "esri/symbols/SimpleLineSymbol" (note the lowercase s in /symbols/).
I agree with Owen, but you should put your require statements that do not have parameters last as this will put your required elements and your parameters out of order.
Take a look at this informative blog post on the basics of AMD programming.
The most important thing to remember is that the arguments are positional, which means that you have to be careful to ensure that your argument names are listed in the same order that you loaded your modules. If this isn’t done your variables won’t refer to the module you expect them to.
You will also see that sometimes AMD samples load modules that weren’t loaded using dojo.require() before. Some examples are: “esri/config”, “dojo/_base/Color”, and “dojo/dom”.
Mitchell,
Check out the new tool I have created: Get your map!
Once you got your extent and basemap click on "Go to require", which will take you to a require builder, which was first created by Derek Swingley . I did some debugging on his code and included it in my tool.
Let me know if this helps!
Tim