I am trying to build an app that queries some features, I wrote the query, but I am not able to select the queried features.
The query works well, and I can confirm that by the toast that says "found 10 features" by the showtoast() function. However I am not able to select these feature and highlight them in the layer.
Any suggestion about how I can select the resultant features?
Any help is highly appreciated!
Hani
Solved! Go to Solution.
Hi Hani,
Have you looked at the sample that selects features and highlights them: Query Feature Service Table | ArcGIS for Developers ?
Once your query completes, is your code doing something like the following?:
// Iterate the results and select each feature.
for (Object objFeature : objs){
Feature feature = (Feature) objFeature;
featureLayer.selectFeature(feature.getId());
}
@Eric Bader
@Mengyi Guo
Hi Hani,
Have you looked at the sample that selects features and highlights them: Query Feature Service Table | ArcGIS for Developers ?
Once your query completes, is your code doing something like the following?:
// Iterate the results and select each feature.
for (Object objFeature : objs){
Feature feature = (Feature) objFeature;
featureLayer.selectFeature(feature.getId());
}
Thank you Eric,
I tried this and it worked Great!