Select to view content in your preferred language

Getting Started

10078
30
Jump to solution
01-18-2014 05:24 AM
jaykapalczynski
Honored Contributor
I am running through some tutorials and having an issue

https://developers.arcgis.com/en/javascript/jstutorials/intro_agstemplate_amd.html

I am trying to use the Web Map Id they said you can in the example and then the map vanishes.  I dont know how to get another one I can use.
I assume that the web map id is not working....what else can I be doing wrong
If you haven't created a web map yet, you can use 1a40fa5cc1ab4569b79f45444d728067 for testing.


require([       "esri/map",       "esri/arcgis/utils",       "dojo/domReady!"       ], function(Map, arcgisUtils){       arcgisUtils.createMap("1a40fa5cc1ab4569b79f45444d728067", "mapDiv").then(function (response) {           map = response.map;          });   });


If I use this from the first example then the map shows up fine

map = new Map("mapDiv", { center: [-77.4329, 37.5410], zoom: 6, basemap: "streets"



<script>   var map;     require(["esri/map", "esri/arcgis/utils", "esri/dijit/Legend", "dojo/domReady!"     ], function(Map, arcgisUtils, Legend ) {          arcgisUtils.createMap("1a40fa5cc1ab4569b79f45444d728067", "mapDiv").then(function (response) {    map = response.map;           var legend = new Legend({       map: map,        layerInfos:(arcgisUtils.getLegendLayers(response))     }, "legendDiv");          legend.startup();         });         }); </script>
0 Kudos
30 Replies
HugoSelbie
Deactivated User
Just fantastic information and so quick. V.impressed
Will install something like MAMP or WAMP when I get back from work and retry.

Many thanks.
0 Kudos