Select to view content in your preferred language

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

649
0
12-27-2019 04:39 AM
Labels (1)
RIYAZ_BABUmohammad
New Contributor

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

Tags (1)
0 Kudos
0 Replies