How to get the geometric information of the polylines of a feature? in QML

594
4
Jump to solution
05-08-2018 08:59 AM
GuillaumeMichel
New Contributor

How to get the geometric information of the polylines of a feature? 

like for example, the rivers of the Ocean feature

I don't understand how to get feature information

qml‌ #polyline#geometric

Tags (3)
0 Kudos
1 Solution

Accepted Solutions
LucasDanzinger
Esri Frequent Contributor

You can setup a Query to query the table for features that match a specific value. For example, create QueryParameters and then pass that into queryFeatures - FeatureTable Class | ArcGIS for Developers . We have a sample of that here - arcgis-runtime-samples-qt/ArcGISRuntimeSDKQt_CppSamples/Features/FeatureLayerQuery at master · Esri/... 

Another option is if you want to identify a specific feature in the service from a mouse click, you can use identifyLayer method - GeoView Class | ArcGIS for Developers 

Once you get access to a Feature object, you can access its attributes through this method Feature Class | ArcGIS for Developers. The AttributeListModel allows you to get the value for a given field name AttributeListModel Class | ArcGIS for Developers 

View solution in original post

4 Replies
LucasDanzinger
Esri Frequent Contributor

What type of data are you working with? Is it a FeatureLayer?

0 Kudos
GuillaumeMichel
New Contributor

Yes, is it this featurelayer

https://services6.arcgis.com/VcmJbyrKy45nGxBT/ArcGIS/rest/services/MGBPLZ/FeatureServer/0 

now i can get the different name of the fields but i can't get the value of a selected field

0 Kudos
LucasDanzinger
Esri Frequent Contributor

You can setup a Query to query the table for features that match a specific value. For example, create QueryParameters and then pass that into queryFeatures - FeatureTable Class | ArcGIS for Developers . We have a sample of that here - arcgis-runtime-samples-qt/ArcGISRuntimeSDKQt_CppSamples/Features/FeatureLayerQuery at master · Esri/... 

Another option is if you want to identify a specific feature in the service from a mouse click, you can use identifyLayer method - GeoView Class | ArcGIS for Developers 

Once you get access to a Feature object, you can access its attributes through this method Feature Class | ArcGIS for Developers. The AttributeListModel allows you to get the value for a given field name AttributeListModel Class | ArcGIS for Developers 

GuillaumeMichel
New Contributor

Thanks that help

0 Kudos