LayerFeature
Last updated
Was this helpful?
Last updated
Was this helpful?
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 like and , and as part of the methods in the
The geometry can be obtained via the method, which returns a object.
id:
string
|number
The identifier of the feature, unique within the layer.
layerId:
string
The identifier of the layer that the feature belongs to.
geometryType:
"Polygon"
|"MultiPolygon"
|"LineString"
|"MultiLineString"
|"Point"
|"MultiPoint"
|string
& {}
The type of geometry of the feature.
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.
The properties of the feature, as a bag of attributes.
Because LayerFeatures are read from tiled features, it's
possible that this geometryType
won't match the geometry.type
of the returned by .
properties: