Skip to content
Last updated

API / geotoolkit / map / features / AbstractFeature / AbstractFeature

Class: AbstractFeature

features.AbstractFeature.AbstractFeature

Abstract map feature class. Feature must have an ID (unique within a layer it's contained in) and geometry;<br> may have set of attributes (non-spatial properties)

Hierarchy

Implements

Table of contents

Constructors
  • [new AbstractFeature(options)](/solutions/geotoolkit/GeoToolkit_JS/apis/classes/geotoolkit.map.features.abstractfeature.abstractfeature.md#new abstractfeature(options))
Methods

Contents

Constructors

new AbstractFeature(options)

• Protected new AbstractFeature(options)

Parameters

Name Type Description
optionsOptionsoptions
Methods

applyMapCS

▸ Abstract applyMapCS(layer): AbstractFeature

Applies Map coordinate system to itself

Parameters

Name Type Description
layerAbstractLayermap layer to use for coordinate system conversion

Returns

AbstractFeature

this


copyConstructor

▸ Protected copyConstructor(src): AbstractFeature

Copy constructor function.<br> Function used as part of the cloning mechanism.<br> Implementations should copy the given instance state to this instance.<br> Makes a shallow copy of the feature.

Parameters

Name Type Description
srcAbstractFeatureSource to copy from

Returns

AbstractFeature

this


getAttributes

▸ getAttributes(): Attributes

Gets attributes (non-spatial properties) Attributes are some additional (non-spatial) properties. These attributes can be written as a text next to the feature itself for more information for the user.<br>

Returns

Attributes

attributes

Implementation of

IFeature.getAttributes


getClassName

▸ getClassName(): string

Returns

string


getGeometry

▸ getGeometry(isMapCS?): Geometry | Geometry[]

Gets geometry Geometry is the place, where the feature should be rendered. It is point coordinates for a point feature or a points array for polygons and polylines.

Parameters

Name Type Description
Optional isMapCSbooleanMap coordinate system flag

Returns

Geometry | Geometry[]

geometry

Implementation of

IFeature.getGeometry


getId

▸ getId(): string

Gets ID Id is a unique identifier of the feature, usually one of the attributes. It is used to simplify settings for the user, as a default 'annotation' (text info) for the feature.

Returns

string

ID

Implementation of

IFeature.getId


shallowClone

▸ shallowClone(): AbstractFeature

All subclasses should override copyConstructor or provide custom implementation for this method Returns shallow copy of the feature

Returns

AbstractFeature

clone


getClassName

▸ Static getClassName(): string

Returns

string