I'm trying to display a full list of attributes for some selected features, but the code below only prints a few of the attributes for each selected feature. There should be about 20 different fields for each feature, but the code only prints 5 of their attributes. How do I go about displaying the entire list of attributes for a selected feature? Also, how would I display the popup for a selected feature obtained in this manner? Thanks for any help!
let layers = self.mv.map?.operationalLayers as? [AGSLayer]
for layer in layers! {
if let featureLayer = layer as? AGSFeatureLayer {
featureLayer.getSelectedFeatures { (queryResult: AGSFeatureQueryResult?, error: Error?) in
if let error = error {
print("Error: \(error.localizedDescription)")
return
}
if let result = queryResult {
let selectedFeatures = result.featureEnumerator().allObjects
for feature in selectedFeatures {
print("Attributes: \(feature.attributes)")
}
}
}
}
}