I am currently trying to show a map that has been tiled. I am using version 10 of the Arcgis server, and version 2.5 of the Javascript api.
The odd thing I am running into is that the map will not show when using the constructor arcGISTiledMapServiceLayer
but it will show when I'm using the alternate constructor arcGisDynamicMapServiceLayer
.
Here is a very simple code snippet i'm using to test out my functionality
dojo.require("esri.map");
dojo.require("esri.tasks.geometry");
var map = null;
var gsvc = null;
var pt = null;
function initialize() {
map = new esri.Map("map");
var layer = new esri.layers.ArcGISTiledMapServiceLayer("http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer");
alert(map.toString());
map.addLayer(layer);
}
dojo.addOnLoad(initialize);
As you all have no doubt realized, this example code is using arcgisonline.com instead of my actual service that I'm running.
There is one more very important piece of information, this code above, works it shows the map but the same code with my url doesn't leading me to believe something is wrong with my server setup, but I am fairly new to arcgis so I'm not leaving any stones unturned.
If there are any querstions please feel free to ask.