I keep getting the following errors when attempting to provide my code with a webmap id in conjunction with the ESRI tutorial for ArcGIS Online Web Map :
Below is the Javascript code which I am currently using.
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Create a Web Map</title>
<link rel="stylesheet" type="text/css"
href="http://js.arcgis.com/3.9/js/esri/css/esri.css" />
<style>
html, body, #mapDiv,.map.container{
padding:0;
margin:0;
height:100%;
}
#legendDiv{
background-color: #fff;
postion: absolute !important;
z-index: 99;
top:10px;
right:20px;
}
</style>
<script>var dojoConfig = { parseOnLoad:true };</script>
<script src="http://js.arcgis.com/3.9compact/"></script>
<script>
var map;
require([
"esri/map",
"esri/arcgis/utils",
"esri/dijit/Legend",
"dojo/domReady!"
], function(Map, arcgisUtils, Legend){
arcgisUtils.createMap("08fdfee37898470385ad4b3752db969f", "mapDiv").then(function
(response) {
map = response.map;
var legend = new Legend({
map: map,
layerInfos:(arcgisUtils.getLegendLayers(response))
}, "legendDiv");
legend.startup();
});
});
</script>
</head>
<body>
<div id="mapDiv"></div>
<div id="legendDiv"></div>
</body>
</html>
The Map id is a publicly available map of Richmond, VA's Historic Sites