dataworld111

problems with Arcgis server 10.1  map service, map not appearing

Discussion created by dataworld111 on Feb 5, 2013
Hi, im have been trying to display a map in a web page using javascript through a arcgis server 10.1 map service but being unable to do so. When calling for the map, nothing would be displayed. After numerous debugging sessions, i found out that the map is actually working but can be opened using arcmap by clicking on the "view in arcmap" url found in the server map service directory. However, when i check all the tiles, all the tiles are empty/blank except for the starting tile of level id 11.

this is the code i used to display the map. Can someone enlighten me on wats wrong with it?
<html>
<head>
<title>testmap</title>

<script src="http://localhost:8080/arcgis_js_api/library/3.3/jsapi/init.js"></script>
<script type="text/javascript">
dojo.require("esri.map");
var map;
function init(){
   map=new esri.Map("map",{logo: true});
   var basemap = new esri.layers.ArcGISTiledMapServiceLayer("http://localhost:8080/arcgis/rest/services/BaseMaps/sampleBaseMap/MapServer");
   map.addLayer(basemap);
   alert(""+basemap.description);//returns me a null
}
dojo.addOnLoad(init);

</script>

</head>
<body>
<div id="map"></div>
</body>
</html>

Outcomes