Module: ol/render/Feature

ol/render/Feature


Classes

RenderFeature

Functions

toFeature(renderFeature, geometryName){Feature}

import {toFeature} from 'ol/render/Feature';

Create an ol/Feature from an ol/render/Feature

Name Type Description
renderFeature RenderFeature

RenderFeature

geometryName string (defaults to 'geometry')

Geometry name to use when creating the Feature.

Returns:
Newly constructed ol/Feature with properties, geometry, and id copied over.

toGeometry(renderFeature){Point | MultiPoint | LineString | MultiLineString | Polygon | MultiPolygon}

import {toGeometry} from 'ol/render/Feature';

Create a geometry from an ol/render/Feature

Name Type Description
renderFeature RenderFeature

Render Feature

Returns:
New geometry instance.

Type Definitions

Type{'Point'} {'LineString'} {'LinearRing'} {'Polygon'} {'MultiPoint'} {'MultiLineString'}

The geometry type. One of 'Point', 'LineString', 'LinearRing', 'Polygon', 'MultiPoint' or 'MultiLineString'`.