Class: WaypointDisplayBuilder
Defined in: src/sdk/components/mapsystem/WaypointDisplayBuilder.ts:11
A class that builds a configuration for the display of waypoints on the map.
Extended by
Constructors
Constructor
new WaypointDisplayBuilder(
iconFactory,labelFactory,waypointRenderer):WaypointDisplayBuilder
Defined in: src/sdk/components/mapsystem/WaypointDisplayBuilder.ts:23
Creates an instance of the WaypointDisplayBuilder.
Parameters
| Parameter | Type | Description |
|---|---|---|
iconFactory | MapSystemIconFactory | The icon factory to use with this builder. |
labelFactory | MapSystemLabelFactory | The label factory to use with this builder. |
waypointRenderer | MapSystemWaypointsRenderer | The waypoint renderer to use with this builder. |
Returns
WaypointDisplayBuilder
Properties
facilityWaypointCache
protectedfacilityWaypointCache:FacilityWaypointCache|undefined
Defined in: src/sdk/components/mapsystem/WaypointDisplayBuilder.ts:15
iconFactory
protectedreadonlyiconFactory:MapSystemIconFactory
Defined in: src/sdk/components/mapsystem/WaypointDisplayBuilder.ts:23
The icon factory to use with this builder.
isCenterTarget
protectedisCenterTarget:boolean=false
Defined in: src/sdk/components/mapsystem/WaypointDisplayBuilder.ts:14
labelFactory
protectedreadonlylabelFactory:MapSystemLabelFactory
Defined in: src/sdk/components/mapsystem/WaypointDisplayBuilder.ts:23
The label factory to use with this builder.
roleGroup
protectedroleGroup:string=MapSystemWaypointRoles.Normal
Defined in: src/sdk/components/mapsystem/WaypointDisplayBuilder.ts:13
waypointRenderer
protectedreadonlywaypointRenderer:MapSystemWaypointsRenderer
Defined in: src/sdk/components/mapsystem/WaypointDisplayBuilder.ts:24
The waypoint renderer to use with this builder.
Methods
addDefaultIcon()
addDefaultIcon<
T>(role,config):this
Defined in: src/sdk/components/mapsystem/WaypointDisplayBuilder.ts:52
Adds a default icon configuration to the waypoint display system, if no other configuration is found.
Type Parameters
| Type Parameter |
|---|
T extends Waypoint |
Parameters
| Parameter | Type | Description |
|---|---|---|
role | string | number | The role to add this waypoint display config for. |
config | (waypoint) => MapWaypointIcon<T> | The waypoint icon factory to add as a configuration. |
Returns
this
The modified builder.
addDefaultLabel()
addDefaultLabel<
T>(role,config):this
Defined in: src/sdk/components/mapsystem/WaypointDisplayBuilder.ts:75
Adds a label configuration to the waypoint display system.
Type Parameters
| Type Parameter |
|---|
T extends Waypoint |
Parameters
| Parameter | Type | Description |
|---|---|---|
role | string | number | The role to add this waypoint display config for. |
config | (waypoint) => MapCullableLocationTextLabel | The waypoint label factory to add as a configuration. |
Returns
this
The modified builder.
addIcon()
addIcon<
T>(role,type,config):this
Defined in: src/sdk/components/mapsystem/WaypointDisplayBuilder.ts:41
Adds a icon configuration to the waypoint display system.
Type Parameters
| Type Parameter |
|---|
T extends Waypoint |
Parameters
| Parameter | Type | Description |
|---|---|---|
role | string | number | The role to add this waypoint display config for. |
type | string | The type of waypoint to add an icon for. |
config | (waypoint) => MapWaypointIcon<T> | The waypoint icon factory to add as a configuration. |
Returns
this
The modified builder.
addLabel()
addLabel<
T>(role,type,config):this
Defined in: src/sdk/components/mapsystem/WaypointDisplayBuilder.ts:64
Adds a label configuration to the waypoint display system.
Type Parameters
| Type Parameter |
|---|
T extends Waypoint |
Parameters
| Parameter | Type | Description |
|---|---|---|
role | string | number | The role to add this waypoint display config for. |
type | string | The type of waypoint to add an label for. |
config | (waypoint) => MapCullableLocationTextLabel | The waypoint label factory to add as a configuration. |
Returns
this
The modified builder.
getIsCenterTarget()
getIsCenterTarget():
boolean
Defined in: src/sdk/components/mapsystem/WaypointDisplayBuilder.ts:146
Gets if the waypoint search is using the map target with offset as the search center.
Returns
boolean
True if the search center is the map target, false if it is the map center.
getRoleGroup()
getRoleGroup():
string
Defined in: src/sdk/components/mapsystem/WaypointDisplayBuilder.ts:30
Gets the render role group used by this builder when registering a render role with the waypoint renderer.
Returns
string
The render role group used by this builder when registering a render role with the waypoint renderer.
getRoleId()
getRoleId(
role):number
Defined in: src/sdk/components/mapsystem/WaypointDisplayBuilder.ts:117
Gets the ID of a role in the waypoint display system.
Parameters
| Parameter | Type | Description |
|---|---|---|
role | string | The name of the role to get the ID for. |
Returns
number
The ID of the role.
Throws
An error if an invalid role name is supplied.
getWaypointCache()
getWaypointCache():
FacilityWaypointCache|undefined
Defined in: src/sdk/components/mapsystem/WaypointDisplayBuilder.ts:164
Gets the currently set facility waypoint cache.
Returns
FacilityWaypointCache | undefined
The currently set facility waypoint cache.
registerRole()
registerRole(
name):this
Defined in: src/sdk/components/mapsystem/WaypointDisplayBuilder.ts:105
Registers a render role for use with the waypoint renderer. When the render role is registered, it will also be
added to this builder's render role group (accessible via getRoleGroup()).
Parameters
| Parameter | Type | Description |
|---|---|---|
name | string | The name of the role to register. |
Returns
this
The modified builder.
withSearchCenter()
withSearchCenter(
center):this
Defined in: src/sdk/components/mapsystem/WaypointDisplayBuilder.ts:132
Configures the center for waypoint searches for this display.
Parameters
| Parameter | Type | Description |
|---|---|---|
center | "center" | "target" | If center, then waypoint searches will use the map center. If target, waypoint searches will use the map target with offset. |
Returns
this
The modified builder.
withWaypointCache()
withWaypointCache(
cache):this
Defined in: src/sdk/components/mapsystem/WaypointDisplayBuilder.ts:155
Configures the facility waypoint cache to use with the waypoint display.
Parameters
| Parameter | Type | Description |
|---|---|---|
cache | FacilityWaypointCache | undefined | The facility waypoint cache to use, or undefined to use the default. |
Returns
this
The modified builder.