Null attributes when creating FeatureCollectionTable from QueryFeatureResult

177
0
a month ago
HVN
by
New Contributor II

When I query a ServiceFeatureTable with queryFeatures, and try to create a FeatureCollectionTable from that result, the features of the table end with null attributes.

Sample code

 

val queryParams = QueryParameters().apply {
    whereClause = "IDENT IN (1,2,3)"
}
val queryResult = layer.table?.queryFeatures(queryParams, QueryFeatureFields.LoadAll).getOrNull()
val featureCollectionTable = FeatureCollectionTable(queryResult!!)

 

What I expect

The FeatureCollectionTable should be created with the features from queryResult with fields from the service.

What I got

The FeatureCollectionTable was correctly created with the features from queryResult, but all the fields are set to null. Only the OBJECTID field is filled.

 

Am I creating the FeatureCollectionTable wrong? How do I properly add the features so that the fields are populated?

Tags (1)
0 Kudos
0 Replies