LayerFeature


A LayerFeature is a single geographical item in a layer.

It is intended to be a lightweight object that contains the properties of a feature, but not the geometry. It is returned by methods likeFeltController.getRenderedFeatures and FeltController.getFeature, and as part of the methods in the SelectionController

The geometry can be obtained via the FeltController.getGeoJsonFeature method, which returns a GeoJsonFeature object.

Properties

id

id: string | number

The identifier of the feature, unique within the layer.


layerId

layerId: string

The identifier of the layer that the feature belongs to.


geometryType

geometryType: "Polygon" | "MultiPolygon" | "LineString" | "MultiLineString" | "Point" | "MultiPoint" | string & {}

The type of geometry of the feature.

Remarks

Because LayerFeatures can be read from tiled features, it's possible that this geometryType won't match the geometry.type of theGeoJsonFeature returned by FeltController.getGeoJsonFeature.

For example, this may return LineString but the full feature is a MultiLineString, or, similarly Polygon here may be a MultiPolygon in the full feature.

As a result, you should treat this property as being indicative only.


bbox

bbox: undefined | [number, number, number, number]

The bounding box of the feature.

Remarks

Because LayerFeatures can be read from tiled features and considering that feature geometry can go through multiple tiles, it's possible that this is not the complete bounding box of the feature.


properties

properties: GeoJsonProperties

The properties of the feature, as a bag of attributes.

Last updated

Was this helpful?