Class: Feature

ol.render.Feature

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

Methods

get(key){*} experimental

src/ol/render/feature.js, line 68

Get a feature property by its key.

Name Type Description
key string

Key

Returns:
Value for the requested key.

getExtent(){ol.Extent} experimental

src/ol/render/feature.js, line 86

Get the extent of this feature's geometry.

Returns:
Extent.

getGeometry(){ol.render.Feature} experimental

src/ol/render/feature.js, line 118

Get the feature for working with its geometry.

Returns:
Feature.

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

src/ol/render/feature.js, line 128

Get the feature properties.

Returns:
Feature properties.

getType(){ol.geom.GeometryType} experimental

src/ol/render/feature.js, line 160

Get the type of this feature's geometry.

Returns:
Geometry type.