I am using the Legend example and cannot get it to work. I am new to JavaScript. The map services are publicly accessible and we are using ArcGIS server 10.2 Here is the code:
<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <!--The viewport meta tag is used to improve the presentation and behavior of the samples on iOS devices--> <meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"> <title>Create Map and add a dynamic layer</title> <link rel="stylesheet" href="http://js.arcgis.com/3.9/js/esri/css/esri.css"/> <link rel="stylesheet" href="http://js.arcgis.com/3.9/js/dojo/dijit/themes/claro/claro.css"> <style> html, body, #mapDiv{ padding: 0; height: 97%; width: 98%; margin: 1%; } #rightPane { width: 20%; } #legendPane { border: solid #97DCF2 1px; } </style>
Yes it takes a while getting used to. ESRI has some nice resources to learn from.
I taught myself everything. I started with html and javascript via codeacademy and then looked at the ESRI Javascript developers page. Once I kinda got the concept I started building the app, piece by piece.
I will look into the code academy. One advantage of the Javascript is the brevity of lines of code. Flash template from ESRI was approx. 1000 files in a many folders. One typical mxml file would be several thousand lines. Most of the time I just edit the config files which are xml.