AnsweredAssumed Answered

Javascript api

Question asked by cwholmes on Jul 25, 2014
Latest reply on Aug 6, 2014 by cwholmes


Hello, I am new to working with the api so have started with the "Build your first application" https://developers.arcgis.com/javascript/jstutorials/intro_firstmap.html

 

I think I have all of the text correct, but what I end up with is the following in the browser:

var map; function init() { map = new esri.Map("mapDiv", { center: [-56.049, 38.485], zoom: 3, basemap: "streets" }); } dojo.ready(init);

 

Here is a copy of my file:

 

<!DOCTYPE html>

<html>

  <head>

  <title>Create a Map</title>

  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">

  <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no">

  <link rel="stylesheet" href="http://js.arcgis.com/3.10/js/dojo/dijit/themes/claro/claro.css">

  <link rel="stylesheet" href="http://js.arcgis.com/3.10/js/esri/css/esri.css">

  <script src="http://js.arcgis.com/3.10/"></script>

  <style>

   html, body, #mapDiv {

    padding: 0;

    margin: 0;

    height: 100%;

   }

  </style>

 

 

  <script>

   dojo.require("esri.map");

   function init() {

    var map = new esri.Map("mapDiv", {

    center: [-56.049, 38.485],

    zoom: 3,

    basemap: "streets"

   });

   }

   dojo.ready(init);

  </script>

 

</head>

<body class="claro">

  <div id="mapDiv"></div>

</body>

</html>

 

Any ideas as to what I am missing are appreciated. Thanks!

Outcomes