Sorry, but I do not understand why IdentifyTask needed?
1 - FeatureLayer has default MXML property graphicProvider= ArrayCollection of all the graphics currently in the layer. Each of graphics has geometry.
2 - FeatureLayer has public property outFields.
3 - Well - you have array of geometries(graphicProvider) on client side and fields(outFields) on client side. Tell me why new server call(IdentifyTask) needed? Or I'm missing something?
Thanks.
Sorry, but I do not understand why IdentifyTask needed?
1 - FeatureLayer has default MXML property graphicProvider= ArrayCollection of all the graphics currently in the layer. Each of graphics has geometry.
2 - FeatureLayer has public property outFields.
3 - Well - you have array of geometries(graphicProvider) on client side and fields(outFields) on client side. Tell me why new server call(IdentifyTask) needed? Or I'm missing something?
Thanks.
Identify on FeatureLayer using Coordinates, and this layer is <esri:Map /> child i do not make any calls to ArcGIS server, because FeatureLayer is the result of query and has all needed geometries and fields on client side. I'll just filter and sort it as I need:
for each (var gr:Graphic in featureLayer.graphicProvider) { // find geometry and get fields }
Just trying it with FeatureServicenot included in <esri:Map /> MXML tag. I call to server with new query.
Placing the FeatureLayer inside the Map tag would require listing everyone of those fields I would potentially need to query in the Outfields, correct?
So what I'm hearing is that you cannot (or shouldn't) place the URL of a FeatureService in the identifyTask MXML tag, correct?
if (layer is FeatureLayer) { var featLayer:FeatureLayer = layer as FeatureLayer; url = featLayer.url; var layId:int = -1; var arcDL:ArcGISDynamicMapServiceLayer; if( url.indexOf("FeatureServer") > -1) { var msName:String = url.replace("FeatureServer","MapServer"); arcDL = new ArcGISDynamicMapServiceLayer(msName.substring(0,msName.lastIndexOf("/"))); url = arcDL.url; layId = parseInt(msName.substring(msName.lastIndexOf("/")+ 1)); }else{ arcDL = new ArcGISDynamicMapServiceLayer(url.substring(0,url.lastIndexOf("/"))); layId = parseInt(url.substring(url.lastIndexOf("/")+ 1)); url = arcDL.url; } if(identifyLayerOption == "visible") { if(layId != -1) identifyParams.layerIds = [layId]; if(featLayer.visible == false) url=""; } }