Hi,
I have a local ArcGIS server using which I published a service.
The service works using the "Create a Web Application" Wizard.
I downloaded a sample code and it ran smoothly, the difference is the URL is online and not local to my server.
I want to run this code using my local ArcGIS server URL and all I see is a blank screen. The map is error free. Can anybody help resolve this?
My code
<html>
<head>
<script src="http://serverapi.arcgisonline.com/jsapi/arcgis/?v=2.1" type="text/javascript"></script>
<link href="http://serverapi.arcgisonline.com/jsapi/arcgis/2.1/js/dojo/dijit/themes/claro/claro.css" rel="stylesheet" type="text/css" >
</head>
<script type="text/javascript">
dojo.require("esri.map");
var map;'
function init()
{
map=new esri.Map("mapDiv")
var basemapURL = "http://8hXXXX:8399/arcgis/rest/services/Map_City/MapServer";
var basemap = new esri.layers.ArcGISDynamicMapServiceLayer(basemapURL);
map.addLayer(basemap);
}
dojo.addOnLoad(init);
</script>
<body class="caro">
<div id="mapDiv" style="width:900px;height:600px;border:1px solid #000;"></div>
</body>
</body>
</html>
Thanks!
PS: URL no is censored for security
{ map=new esri.Map("mapDiv") var basemapURL = "http://8hXXXX:8399/arcgis/rest/services/Map_City/MapServer"; var basemap = new esri.layers.ArcGISDynamicMapServiceLayer(basemapUR L); map.addLayer(basemap); }