Lighweight, read-only, ol.Feature and ol.geom.Geometry like
structure, optimized for rendering and styling. Geometry retrieval is
limited to getting the type and extent of the geometry.
Geometry extents are calculated lazily, which results in faster rendering for vector tiles, but slower hit detection.
Methods
-
get(key){*} experimental
src/ol/FlyweightFeature.js, line 72 -
Get a feature property by its key.
Name Type Description keystring Key
Returns:
Value for the requested key.
-
getExtent(){ol.Extent} experimental
src/ol/FlyweightFeature.js, line 90 -
Get the extent of this flyweight feature's geometry.
Returns:
Extent.
-
getGeometry(){ol.FlyweightFeature} experimental
src/ol/FlyweightFeature.js, line 116 -
Get the flyweight feature for working with its geometry.
Returns:
Flyweight feature.
-
getProperties(){Object.<string, *>} experimental
src/ol/FlyweightFeature.js, line 126 -
Get the feature properties.
Returns:
Feature properties.
-
getType(){ol.geom.GeometryType} experimental
src/ol/FlyweightFeature.js, line 156 -
Get the type of this flyweight feature's geometry.
Returns:
Geometry type.
OpenLayers 3