Skip to main content

Class: MapCullableTextLabelManager

Manages a set of MapCullableTextLabels. Colliding labels will be culled based on their render priority. Labels with lower priorities will be culled before labels with higher priorities.

Constructors

constructor

new MapCullableTextLabelManager(cullingEnabled?): MapCullableTextLabelManager

Creates an instance of the MapCullableTextLabelManager.

Parameters

NameTypeDefault valueDescription
cullingEnabledbooleantrueWhether or not culling of labels is enabled.

Returns

MapCullableTextLabelManager

Defined in

src/sdk/components/map/MapCullableTextLabel.ts:154

Accessors

visibleLabels

get visibleLabels(): readonly MapCullableTextLabel[]

An array of labels registered with this manager that are visible.

Returns

readonly MapCullableTextLabel[]

Defined in

src/sdk/components/map/MapCullableTextLabel.ts:140

Methods

deregister

deregister(label): void

Deregisters a label with this manager. Newly deregistered labels will be processed with the next manager update.

Parameters

NameTypeDescription
labelMapCullableTextLabelThe label to deregister.

Returns

void

Defined in

src/sdk/components/map/MapCullableTextLabel.ts:173


register

register(label): void

Registers a label with this manager. Newly registered labels will be processed with the next manager update.

Parameters

NameTypeDescription
labelMapCullableTextLabelThe label to register.

Returns

void

Defined in

src/sdk/components/map/MapCullableTextLabel.ts:160


setCullingEnabled

setCullingEnabled(enabled): void

Sets whether or not text label culling is enabled.

Parameters

NameTypeDescription
enabledbooleanWhether or not culling is enabled.

Returns

void

Defined in

src/sdk/components/map/MapCullableTextLabel.ts:190


update

update(mapProjection): void

Updates this manager.

Parameters

NameTypeDescription
mapProjectionMapProjectionThe projection of the map to which this manager's labels are to be drawn.

Returns

void

Defined in

src/sdk/components/map/MapCullableTextLabel.ts:199