I try to set my Identify tool to identify only the results of my query task instead all of them (this includes invisible). Setting LayerOption = LayerOption.visible does not work in my case, because the query task returns one result for polygon feature class and one for points, where the extent of polygons is much bigger than points. I would like to be able identify only these points, which were returned by a query, but all polygons. My guess is I should use Layer Definitions, but I do not know how exactly to do it. I tried something like this:
private void IdentifyStart()
{
ESRI.ArcGIS.Client.Tasks.IdentifyParameters identifyParams = new IdentifyParameters()
{
Geometry = _clickPont,
MapExtent = Map.Extent,
Width = (int)Map.ActualWidth,
Height = (int)Map.ActualHeight,
SpatialReference = Map.SpatialReference,
Tolerance = 10,
IEnumerable < "PreKSitesGraphicsLayer" > IdentifyParameters.LayerDefinitions,
};
But this is not working. Does someone have idea how to solve it, or can provide me with any code sample? Thank you!