DataFields

Data fields are loaded by the viewer as part of loading plans. These can be edited through PlanStudio and set on a per-partnership basis to customise the data attached to Features.

The DataFields class is a wrapper provided by the SDK that allows you to query data fields, primarily to assist with the pushFeature API.

You cannot directly create DataFields instances, and you cannot modify any of their properties.

dataFields.getField(key)

Returns details about the data field associated with the given key. If no data field exists, null will be returned.

The displayName property is the human-readable name for the data field.

dataFields.getFieldsForFeatureType(featureType[, subType])

Returns an array of data fields that are accessible by the given feature type. Use the feature.getType() API to get the type of a feature. Invalid types will return an empty array.

When featureType is fixedIcon, leaderlineIcon, or zonedIcon, the optional parameter subType must be set to an iconType. Currently, subType is not used for any other features.