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
| Parameter | Type | Default value | Description |
|---|---|---|---|
cullingEnabled | boolean | true | Whether culling of labels is enabled. Defaults to true. |
Returns
MapCullableTextLabelManager
Properties
visibleLabels
readonlyvisibleLabels: readonlyMapCullableTextLabel[] =[]
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
| Parameter | Type | Description |
|---|---|---|
label | MapCullableTextLabel | The 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
| Parameter | Type | Description |
|---|---|---|
label | MapCullableTextLabel | The 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
| Parameter | Type | Description |
|---|---|---|
enabled | boolean | Whether 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
| Parameter | Type | Description |
|---|---|---|
mapProjection | MapProjection | The projection of the map to which this manager's labels are to be drawn. |
Returns
void
Throws
Error if this manager has been destroyed.