Skip to content
Last updated

API / geotoolkit / map / features / adapters / Center / Center

Class: Center

adapters.Center.Center

Calculates geometry center and applies it to Text as an anchor

Implements

Table of contents

Constructors
  • [new Center(mode)](/solutions/geotoolkit/GeoToolkit_JS/apis/classes/geotoolkit.map.features.adapters.center.center.md#new center(mode))
Methods

Contents

Constructors

new Center(mode)

• new Center(mode?)

Parameters

Name Type Description
Optional modeModegeometry center to anchor mode
Methods

apply

▸ apply(geometry, text, context?): void

Calculates geometry center and applies it to Text as an anchor

Parameters

Name Type Description
geometryGeometryBasefeature geometry
textTexttext shape to set the anchor on
Optional contextTransformation | RenderingContextrendering context or its transformation

Returns

void

Implementation of

IGeometryToText.apply


getClassName

▸ getClassName(): string

Returns

string


getClassName

▸ Static getClassName(): string

Returns

string