Skip to main content

Class: FlightPathWaypointLabel

Defined in: workingtitle-instruments-wt21/shared/Map/FlightPathWaypointLabel.ts:16

An map flightplan waypoint label for the WT21. Capable of showing speed and altitude restrictions.

Extends

Constructors

Constructor

new FlightPathWaypointLabel(waypoint, displaySetting?, options?): FlightPathWaypointLabel

Defined in: workingtitle-instruments-wt21/shared/Map/FlightPathWaypointLabel.ts:29

Ctor

Parameters

ParameterTypeDescription
waypointFlightPathWaypointThe map waypoint object to display.
displaySetting?UserSetting<number>The map display settings object.
options?MapLocationTextLabelOptionsThe label options.

Returns

FlightPathWaypointLabel

Overrides

MapCullableLocationTextLabel.constructor

Properties

alwaysShow

readonly alwaysShow: Subscribable<boolean>

Defined in: sdk/components/map/MapCullableTextLabel.ts:36

Whether this label is immune to culling.

Inherited from

MapCullableLocationTextLabel.alwaysShow


anchor

readonly anchor: Subscribable<Readonly<Omit<Float64Array<ArrayBufferLike>, "set" | "sort" | "copyWithin">>>

Defined in: sdk/components/map/MapTextLabel.ts:112

The anchor point of this label, expressed relative to this label's width/height. [0, 0] is the top-left corner, and [1, 1] is the bottom-right corner.

Inherited from

MapCullableLocationTextLabel.anchor


bgBorderRadius

readonly bgBorderRadius: Subscribable<number>

Defined in: sdk/components/map/MapTextLabel.ts:139

The border radius of this label's background.

Inherited from

MapCullableLocationTextLabel.bgBorderRadius


bgColor

readonly bgColor: Subscribable<string>

Defined in: sdk/components/map/MapTextLabel.ts:133

This label's background color.

Inherited from

MapCullableLocationTextLabel.bgColor


bgOutlineColor

readonly bgOutlineColor: Subscribable<string>

Defined in: sdk/components/map/MapTextLabel.ts:145

The outline color of this label's background.

Inherited from

MapCullableLocationTextLabel.bgOutlineColor


bgOutlineWidth

readonly bgOutlineWidth: Subscribable<number>

Defined in: sdk/components/map/MapTextLabel.ts:142

The outline width of this label's background.

Inherited from

MapCullableLocationTextLabel.bgOutlineWidth


bgPadding

readonly bgPadding: Subscribable<Readonly<Omit<Float64Array<ArrayBufferLike>, "set" | "sort" | "copyWithin">>>

Defined in: sdk/components/map/MapTextLabel.ts:136

The padding of this label's background, in pixels. Expressed as [top, right, bottom, left].

Inherited from

MapCullableLocationTextLabel.bgPadding


bounds

readonly bounds: Float64Array<ArrayBuffer>

Defined in: sdk/components/map/MapCullableTextLabel.ts:39

The bounding box of this label, as [left, top, right, bottom].

Inherited from

MapCullableLocationTextLabel.bounds


drawData

protected readonly drawData: object

Defined in: sdk/components/map/MapTextLabel.ts:159

size

size: Float64Array<ArrayBufferLike>

textSize

textSize: Float64Array<ArrayBufferLike>

textTopLeft

textTopLeft: Float64Array<ArrayBufferLike>

topLeft

topLeft: Float64Array<ArrayBufferLike>

Inherited from

MapCullableLocationTextLabel.drawData


font

readonly font: Subscribable<string>

Defined in: sdk/components/map/MapTextLabel.ts:115

The font type of this label.

Inherited from

MapCullableLocationTextLabel.font


fontColor

readonly fontColor: Subscribable<string>

Defined in: sdk/components/map/MapTextLabel.ts:121

The font color of this label.

Inherited from

MapCullableLocationTextLabel.fontColor


fontOutlineColor

readonly fontOutlineColor: Subscribable<string>

Defined in: sdk/components/map/MapTextLabel.ts:127

The font outline color of this label.

Inherited from

MapCullableLocationTextLabel.fontOutlineColor


fontOutlineWidth

readonly fontOutlineWidth: Subscribable<number>

Defined in: sdk/components/map/MapTextLabel.ts:124

The font outline width of this label, in pixels.

Inherited from

MapCullableLocationTextLabel.fontOutlineWidth


fontSize

readonly fontSize: Subscribable<number>

Defined in: sdk/components/map/MapTextLabel.ts:118

The font size of this label, in pixels.

Inherited from

MapCullableLocationTextLabel.fontSize


invalidation

readonly invalidation: SubEventInterface<FlightPathWaypointLabel, void>

Defined in: sdk/components/map/MapCullableTextLabel.ts:42

An invalidation event.

Inherited from

MapCullableLocationTextLabel.invalidation


location

readonly location: Subscribable<GeoPointInterface>

Defined in: sdk/components/map/MapTextLabel.ts:383

Inherited from

MapCullableLocationTextLabel.location


offset

readonly offset: Subscribable<Readonly<Omit<Float64Array<ArrayBufferLike>, "set" | "sort" | "copyWithin">>>

Defined in: sdk/components/map/MapTextLabel.ts:385

Inherited from

MapCullableLocationTextLabel.offset


onDraw

readonly onDraw: ReadonlySubEvent<FlightPathWaypointLabel, AbstractMapTextLabelDrawData>

Defined in: sdk/components/map/MapTextLabel.ts:157

An event that notifies subscribers when this label is drawn (when draw() is called). The sender of the event is this label. The event data describes the draw operation that triggered the event. When the draw operation did not draw a visible label, the event is triggered with all NaN values.

The data object passed to event handlers is only guaranteed to be valid at the moment the handler is called. If a handler needs to retain the data past this moment, then it is recommended that a copy of the data be made.

Inherited from

MapCullableLocationTextLabel.onDraw


priority

readonly priority: Subscribable<number>

Defined in: sdk/components/map/MapTextLabel.ts:106

The render priority of this label. Higher numbers will render on top of labels with lower numbers when used with a MapCullableTextLabelManager.

Inherited from

MapCullableLocationTextLabel.priority


showBg

readonly showBg: Subscribable<boolean>

Defined in: sdk/components/map/MapTextLabel.ts:130

Whether to show the background for this label.

Inherited from

MapCullableLocationTextLabel.showBg


text

readonly text: Subscribable<string>

Defined in: sdk/components/map/MapTextLabel.ts:103

The text of this label.

Inherited from

MapCullableLocationTextLabel.text


tempVec2

protected readonly static tempVec2: Float64Array<ArrayBuffer>

Defined in: sdk/components/map/MapTextLabel.ts:100

Inherited from

MapCullableLocationTextLabel.tempVec2

Methods

destroy()

destroy(): void

Defined in: workingtitle-instruments-wt21/shared/Map/FlightPathWaypointLabel.ts:41

Destroys this label.

Returns

void

Overrides

MapCullableLocationTextLabel.destroy


draw()

draw(context, mapProjection): void

Defined in: workingtitle-instruments-wt21/shared/Map/FlightPathWaypointLabel.ts:55

Draws this label to a canvas.

Parameters

ParameterTypeDescription
contextCanvasRenderingContext2DThe canvas rendering context to use to draw.
mapProjectionMapProjectionThe projection to use to project the location of the label.

Returns

void

Overrides

MapCullableLocationTextLabel.draw


drawBackground()

protected drawBackground(context, centerX, centerY, width, height): void

Defined in: sdk/components/map/MapTextLabel.ts:296

Draws this label's background to a canvas.

Parameters

ParameterTypeDescription
contextCanvasRenderingContext2DThe canvas rendering context.
centerXnumberThe x-coordinate of the center of the label, in pixels.
centerYnumberthe y-coordinate of the center of the label, in pixels.
widthnumberThe width of the background, in pixels.
heightnumberThe height of the background, in pixels.

Returns

void

Inherited from

MapCullableLocationTextLabel.drawBackground


drawText()

protected drawText(context, centerX, centerY): void

Defined in: workingtitle-instruments-wt21/shared/Map/FlightPathWaypointLabel.ts:69

Draws this label's text to a canvas.

Parameters

ParameterTypeDescription
contextCanvasRenderingContext2DThe canvas rendering context.
centerXnumberThe x-coordinate of the center of the label, in pixels.
centerYnumberthe y-coordinate of the center of the label, in pixels.

Returns

void

Overrides

MapCullableLocationTextLabel.drawText


getLastDrawData()

getLastDrawData(): AbstractMapTextLabelDrawData

Defined in: sdk/components/map/MapTextLabel.ts:204

Gets data describing this label's last executed drawing operation (the last time that draw() was called). If the label has not been drawn yet or the last draw operation did not draw a visible label, then the data will report all NaN values.

Returns

AbstractMapTextLabelDrawData

Data describing this label's last executed drawing operation. The returned data object passed is only guaranteed to be valid at the moment it is returned. If you need to retain the data past this moment, then it is recommended that a copy of the data be made.

Inherited from

MapCullableLocationTextLabel.getLastDrawData


getPosition()

protected getPosition(mapProjection, out): Float64Array

Defined in: sdk/components/map/MapTextLabel.ts:407

Gets the projected position of the label, in pixels.

Parameters

ParameterTypeDescription
mapProjectionMapProjectionThe map projection to use.
outFloat64ArrayThe vector to which to write the result.

Returns

Float64Array

The projected position of the label.

Inherited from

MapCullableLocationTextLabel.getPosition


loadBackgroundPath()

protected loadBackgroundPath(context, left, top, width, height, radius): void

Defined in: sdk/components/map/MapTextLabel.ts:347

Loads the path of this label's background to a canvas rendering context.

Parameters

ParameterTypeDescription
contextCanvasRenderingContext2DThe canvas rendering context to use.
leftnumberThe x-coordinate of the left edge of the background, in pixels.
topnumberThe y-coordinate of the top edge of the background, in pixels.
widthnumberThe width of the background, in pixels.
heightnumberThe height of the background, in pixels.
radiusnumberThe border radius of the background, in pixels.

Returns

void

Inherited from

MapCullableLocationTextLabel.loadBackgroundPath


setDisplayed()

setDisplayed(isDisplayed): void

Defined in: workingtitle-instruments-wt21/shared/Map/FlightPathWaypointLabel.ts:50

Sets whether or not the label is displayed.

Parameters

ParameterTypeDescription
isDisplayedbooleanWhether or not the label is displayed.

Returns

void


setTextStyle()

protected setTextStyle(context): void

Defined in: sdk/components/map/MapTextLabel.ts:263

Loads this label's text style to a canvas rendering context.

Parameters

ParameterTypeDescription
contextCanvasRenderingContext2DThe canvas rendering context to use.

Returns

void

Inherited from

MapCullableLocationTextLabel.setTextStyle


updateBounds()

updateBounds(mapProjection): void

Defined in: sdk/components/map/MapCullableTextLabel.ts:86

Updates this label's bounding box.

Parameters

ParameterTypeDescription
mapProjectionMapProjectionThe map projection to use.

Returns

void

Inherited from

MapCullableLocationTextLabel.updateBounds