Skip to main content

Class: MapCullableTextLabelManager

Defined in: src/sdk/components/map/MapCullableTextLabel.ts:130

Manages the visibility of a set of MapCullableTextLabels. If culling is enabled, then 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

Defined in: src/sdk/components/map/MapCullableTextLabel.ts:170

Creates a new instance of MapCullableTextLabelManager.

Parameters

ParameterTypeDefault valueDescription
cullingEnabledbooleantrueWhether culling of labels is enabled. Defaults to true.

Returns

MapCullableTextLabelManager

Properties

visibleLabels

readonly visibleLabels: readonly MapCullableTextLabel[] = []

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

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

Methods

deregister()

deregister(label): void

Defined in: src/sdk/components/map/MapCullableTextLabel.ts:197

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

Parameters

ParameterTypeDescription
labelMapCullableTextLabelThe label to deregister.

Returns

void

Throws

Error if this manager has been destroyed.


destroy()

destroy(): void

Defined in: src/sdk/components/map/MapCullableTextLabel.ts:320

Destroys this manager.

Returns

void


register()

register(label): void

Defined in: src/sdk/components/map/MapCullableTextLabel.ts:179

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

Parameters

ParameterTypeDescription
labelMapCullableTextLabelThe label to register.

Returns

void

Throws

Error if this manager has been destroyed.


setCullingEnabled()

setCullingEnabled(enabled): void

Defined in: src/sdk/components/map/MapCullableTextLabel.ts:219

Sets whether or not text label culling is enabled.

Parameters

ParameterTypeDescription
enabledbooleanWhether or not culling is enabled.

Returns

void

Throws

Error if this manager has been destroyed.


update()

update(mapProjection): void

Defined in: src/sdk/components/map/MapCullableTextLabel.ts:237

Updates this manager.

Parameters

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

Returns

void

Throws

Error if this manager has been destroyed.