Class: RenderFeature

ol/render/Feature~RenderFeature


Lightweight, read-only, Feature and Geometry like structure, optimized for vector tile rendering and styling. Geometry access through the API is limited to getting the type and extent of the geometry.

Methods

Get a feature property by its key.

Name Type Description
key string

Key

Returns:
Value for the requested key.

Get the extent of this feature's geometry.

Returns:
Extent.

For API compatibility with Feature, this method is useful when determining the geometry type in style function (see #getType).

Returns:
Feature.

getId(){number | string | undefined}

Get the feature identifier. This is a stable identifier for the feature and is set when reading data from a remote source.

Returns:
Id.

getProperties(){Object.<string, *>}

Get the feature properties.

Returns:
Feature properties.

Get the type of this feature's geometry.

Returns:
Geometry type.