moralexluis

Map doesn't displayed

Discussion created by moralexluis on Aug 18, 2010
Latest reply on Aug 19, 2010 by moralexluis
Hi, I'm wondering if anyone has had this problem, I'm using JavaScript API to display a simple map but when I run the appy the browser doesn't display anything :S it's like the map doesn't exist :S
here is my code:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
  <head>
    <title>Create a Map</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <link rel="stylesheet" type="text/css" href="http://serverapi.arcgisonline.com/jsapi/arcgis/1.6/js/dojo/dijit/themes/tundra/tundra.css">
    <script type="text/javascript" src="http://serverapi.arcgisonline.com/jsapi/arcgis/?v=1.6"></script>

    <script type="text/javascript">
        dojo.require("esri.map");

        var myMap, myTiledMapServiceLayer;
        function init() {
            myMap = new esri.Map("mapDiv");

           //myTiledMapServiceLayer = new esri.layers.ArcGISTiledMapServiceLayer("http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer");
            myTiledMapServiceLayer = new esri.layers.ArcGISTiledMapServiceLayer("http://servarcgisprd/arcgis/rest/services/Demo_001/MapServer");
                  
            myMap.addLayer(myTiledMapServiceLayer);
        }

        dojo.addOnLoad(init);
    </script>
  </head>
  <body>
    <div id="mapDiv" class="tundra" style="width:900px; height:600px; border:1px solid #000;"></div>
    <h4>Work flow:</h4>
<ul>
<li>Create a map.</li>
<li>Add an ArcGISTiledMapServiceLayer.</li>
</ul>
  </body>
</html>

Please If You know the answer help me!
thanks in advanced

Outcomes