When using IdentifyTask (IT) from SL codebehing, IT is working only for LayerOption.all enumeration.I'm using ArcGISDynamicMapServiceLayer to display layers:
<esri:ArcGISDynamicMapServiceLayer ID="testLayer"
Url="http://wexgisag1/ArcGIS/rest/services/Envision/MapServer"
VisibleLayers="105"
ImageFormat="PNG8" />
Layer is displayed and is working as it should. However when I try to identify feature on the layer by IdentifyTask:
IdentifyParameters identifyParameters = new IdentifyParameters();
// i've tried LayerOption.top and as well as adding Layers Ids as another filter
// w/o luck
identifyParameters.LayerOption = LayerOption.visible;
identifyParameters.ReturnGeometry = false;
identifyParameters.MapExtent = epaMap.Extent;
identifyParameters.Width = (int)epaMap.ActualWidth;
identifyParameters.Height = (int)epaMap.ActualHeight;
identifyParameters.Geometry = _savedLocation;
I'm not getting any results back.If I will change parameters to:
identifyParameters.LayerOption = LayerOption.all;
// w/o adding filter on layers id operation is taking much to long but is working too
identifyParameters.LayerIds.Add(105);
I'm getting results back.I'm having same issue with querying on the REST xxx/Identify site. Therefore maybe this is related more to map service settings, if so, what can be set wrong there (if there is smth)? I'm not GIS guy, I'm just doing demo to show what my company can use how this can be used. I did not install and configure ESRI/ArcGIS Servers maps etc. that was done by someone else (i don't even know who).Any ideas why this is not working as it supposed to?