Select/Highlight feature in Offline map

175
3
03-01-2019 11:58 AM
LaurynasGedminas2
Occasional Contributor

Following this example: Open mobile map (map package)—ArcGIS Runtime SDK for Qt | ArcGIS for Developers 

how to select features in the map?

Thank you,

0 Kudos
3 Replies
ErwinSoekianto
Esri Regular Contributor

Looping in ArcGIS Runtime SDK for Qt‌, to see if anyone in this group can answer this. 

0 Kudos
LucasDanzinger
Esri Frequent Contributor

Once you have a Map/MapView, you will use identifyLayer or identifyLayers to get features back, and then you can call selectFeature on the FeatureLayer. Here is a sample that shows this

arcgis-runtime-samples-qt/FeatureLayer_Selection.qml at master · Esri/arcgis-runtime-samples-qt · Gi... 

use identifyLayer if you want to search for clicked features within a specific layer, and identifyLayers if you want to search for clicked features in any layer in the mapview

doc - GeoView QML Type | ArcGIS for Developers 

0 Kudos
LaurynasGedminas2
Occasional Contributor

Thank you Lucas,

I was trying the identify thru mapView.identifyLayersWithMaxResults, it get's the selected feature, but nothing is highlighted thru this code: featureLayer.selectFeatures(identifiedObjects);

Thank you,

0 Kudos