Solved! Go to Solution.
var educationLayer = new esri.layers.ArcGISDynamicMapServiceLayer( "http://webgis.arizona.edu/ArcGIS/rest/services/webGIS/Demographics/MapServer", {visibleLayers: [0]} );
Steve
var educationLayer = new esri.layers.ArcGISDynamicMapServiceLayer( "http://domain/ArcGIS/rest/services/webGIS/Demographics/MapServer" ); educationLayer.setVisibleLayers([0]);
Could it be because of the file size of the layer? There are a lot of fields in the layer.
var ftrLyr = new esri.layers.FeatureLayer(result,{ mode: esri.layers.FeatureLayer.MODE_SNAPSHOT, outFields: ["NAME","STATE_NAME"] });
While there are a lot of fields, you're doing the right thing in terms of limiting them to just the ones you need.var ftrLyr = new esri.layers.FeatureLayer(result,{ mode: esri.layers.FeatureLayer.MODE_SNAPSHOT, outFields: ["NAME","STATE_NAME"] });
I think the problem is due to the size of the layer - the soil layer is about 2Mb in size, which will take a while to download.
At the full scale, you're showing hundreds of tiny polygons which are too small to discern anyway. Is it an option to generalize the layer, and show States rather than Counties (or whatever) at this scale? Then show the more detailed polygons when you zoom in.
You could also try using a Dynamic or Tiled layer - there's nothing in your application which seems to require a Feature layer, which involves downloading the actual vectors to the client.
Steve
http://domain/arcgis/rest/services/Soil/MapServerbut I need to use
http://domain/arcgis/rest/services/Soil/MapServer/1 or 2 or 3and that gives me a error.
Is it possible to use Dynamic Layer?
var educationLayer = new esri.layers.ArcGISDynamicMapServiceLayer( "http://webgis.arizona.edu/ArcGIS/rest/services/webGIS/Demographics/MapServer", {visibleLayers: [0]} );
var educationLayer = new esri.layers.ArcGISDynamicMapServiceLayer( "http://webgis.arizona.edu/ArcGIS/rest/services/webGIS/Demographics/MapServer", {visibleLayers: [0]} );
Steve
var educationLayer = new esri.layers.ArcGISDynamicMapServiceLayer( "http://domain/ArcGIS/rest/services/webGIS/Demographics/MapServer" ); educationLayer.setVisibleLayers([0]);