AnsweredAssumed Answered

Is it possible to select features with where clause and geometry in SelectFeaturesAsync method

Question asked by raj_riyas43 on Dec 27, 2019

Hi,

I tried with setting where clause and geometry for selecting features using SelectFeaturesAsync method.but i didn't get the result. where as I achieved same with separately setting them.

Code 1: Combination

  QueryParameters params1 = new QueryParameters
{
WhereClause = query ,
Geometry = geometry,
SpatialRelationship = SpatialRelationship.Intersects,
ReturnGeometry = true
};
FeatureQueryResult fts = await selectedFeatureLayer.SelectFeaturesAsync(params1,Esri.ArcGISRuntime.Mapping.SelectionMode.New);

 

Code 2: Seperately

await selectedFeatureLayer.SelectFeaturesAsync(new QueryParameters { WhereClause = query }, Esri.ArcGISRuntime.Mapping.SelectionMode.New);
await selectedFeatureLayer.SelectFeaturesAsync(new QueryParameters { Geometry = geometry, SpatialRelationship =  SpatialRelationship.Intersects,ReturnGeometry = true}, Esri.ArcGISRuntime.Mapping.SelectionMode.Add);

 

Is it possible to get results with where clause and geometry?

 

Thanks,

Mohammad Riyaz Babu

Outcomes