I facing this critical issue which i am not able to solve.When i create map object using ArcGISDynamicMapServiceLayer then things work fine but since i need lot of graphics and want to handle user interactions on map so i want to feature layer to my map but when i add feature layer the browser hangs.
'm using ArcGIS Server 10.1 and the ArcGIS JS API 3.6.
Please let me know what could be the issue how can i avoid feature layer from hanging from my machine.
map = new esri.Map("map");
var layer = new esri.layers.ArcGISDynamicMapServiceLayer("http://10.32.9.106:6080/arcgis/rest/services/Administrative_Maps/World_Countries_v1/MapServer");
map.addLayer(layer);
var url = "http://10.32.9.106:6080/arcgis/rest/services/Administrative_Maps/World_Countries_v1/MapServer/0";
var info_content = "<table><tr><td><b>COUNTRY :</b></td><td style='text-align:right'>${COUNTRY}</td></tr></table>";
var infoTemplate1 = new esri.InfoTemplate("${COUNTRY}", info_content);
var fl = new esri.layers.FeatureLayer(url, {
id: "world-regions",
outFields: ["COUNTRY"],
infoTemplate: infoTemplate1
});
map.addLayer(fl);
When i see in net panel of my firebug i see some of request being timeout and aborted like below once
http://10.32.9.106:6080/arcgis/rest/services/Administrative_Maps/World_Countries_v1/MapServer/0/query?f=json&returnGeometry=true&spatialRel=esriSpatialRelIntersects&maxAllowableOffset=0&geometry=%7B%22xmin%22%3A-180%2C%22ymin%22%3A-26.69003668516953%2C%22xmax%22%3A85.04864429221129%2C%22ymax%22%3A238.35860760704176%2C%22spatialReference%22%3A%7B%22wkid%22%3A4326%2C%22latestWkid%22%3A4326%7D%7D&geometryType=esriGeometryEnvelope&inSR=4326&outFields=COUNTRY%2CFID&outSR=4326
Where is the issue is this something to do with lot of graphics of feature layer that browse has to fetch if so what is the solution , else is it related with query feature of feature layer , i tried to query using rest url i added COUNTRY='Australia' i got result immediately so please kindly help with this issue.
I tried setting autoGeneralize as enable but still no help.
Kindly let me know what could be the issue.
Below is the output of rest service [http://10.32.9.106:6080/arcgis/rest/services/Administrative_Maps/World_Countries_v1/MapServer/0][1]
Name: World_Countries_v3
Display Field: COUNTRY
Type: Feature Layer
Geometry Type: esriGeometryPolygon
Description: World Countires Map (v3) with the Display field as ISO3A. No changes to the data from V1.
Definition Expression:
Copyright Text:
Default Visibility: true
MaxRecordCount: 1000
Supported Query Formats: JSON, AMF
Min Scale: 0
Max Scale: 0
Supports Advanced Queries: false
Supports Statistics: false
Has Labels: false
Can Modify Layer: true
Can Scale Symbols: false
Extent:
XMin: -179.99999999990004
YMin: -89.99999999990001
XMax: 180.00000000010002
YMax: 83.66549107605236
Spatial Reference: 4326 (4326)
Drawing Info:
Renderer:
Simple Renderer:
Symbol:
Style: esriSFSSolid
Color: [206, 191, 242, 255]
Outline:
Style: esriSLSSolid
Color: [110, 110, 110, 255]
Width: 0
Label:
Description:
Transparency: 0
Labeling Info:
HasZ: false
HasM: false
Has Attachments: false
HTML Popup Type: esriServerHTMLPopupTypeAsHTMLText
Type ID Field: null
Fields:
FID ( type: esriFieldTypeOID , alias: FID )
Shape ( type: esriFieldTypeGeometry , alias: Shape )
OBJECTID ( type: esriFieldTypeInteger , alias: OBJECTID )
COUNTRY ( type: esriFieldTypeString , alias: COUNTRY , length: 50 )
CONTINENT ( type: esriFieldTypeString , alias: CONTINENT , length: 13 )
ISO3A ( type: esriFieldTypeString , alias: ISO3A , length: 5 )
ISO2 ( type: esriFieldTypeString , alias: ISO2 , length: 5 )
Shape_Leng ( type: esriFieldTypeDouble , alias: Shape_Leng )
Shape_Area ( type: esriFieldTypeDouble , alias: Shape_Area )
Supported Operations: Query Generate Renderer Return Updates