Skip to main content

Class: MapAirportIcon<T>

Defined in: workingtitle-instruments-epic2/shared/Map/MapAirportIcon.ts:9

A icon for airports on the Epic2. With support for showing a different icons and localizer beams based on the map range setting.

Extends

Type Parameters

Type Parameter
T extends AirportWaypoint

Constructors

Constructor

new MapAirportIcon<T>(waypoint, priority, img, dot_img, size, currentRange, options?): MapAirportIcon<T>

Defined in: workingtitle-instruments-epic2/shared/Map/MapAirportIcon.ts:30

Constructor.

Parameters

ParameterTypeDescription
waypointTThe waypoint associated with this icon.
prioritynumber | Subscribable<number>The render priority of this icon. Icons with higher priorities should be rendered above those with lower priorities.
imgHTMLImageElementThis icon's image.
dot_imgHTMLImageElementThis icon's image for the dot.
sizeReadonly<Omit<Float64Array<ArrayBufferLike>, "set" | "sort" | "copyWithin">> | Subscribable<Readonly<Omit<Float64Array<ArrayBufferLike>, "set" | "sort" | "copyWithin">>>The size of this icon, as [width, height] in pixels, or a subscribable which provides it.
currentRangeSubscribable<number>The current range setting of the map.
options?AbstractMapWaypointIconOptionsOptions with which to initialize this icon.

Returns

MapAirportIcon<T>

Overrides

AbstractMapWaypointIcon.constructor

Properties

anchor

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

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

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

Inherited from

AbstractMapWaypointIcon.anchor


currentRange

protected readonly currentRange: Subscribable<number>

Defined in: workingtitle-instruments-epic2/shared/Map/MapAirportIcon.ts:36

The current range setting of the map.


dot_img

protected readonly dot_img: HTMLImageElement

Defined in: workingtitle-instruments-epic2/shared/Map/MapAirportIcon.ts:34

This icon's image for the dot.


img

protected readonly img: HTMLImageElement

Defined in: workingtitle-instruments-epic2/shared/Map/MapAirportIcon.ts:33

This icon's image.


offset

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

Defined in: sdk/components/map/MapWaypointIcon.ts:89

The offset of this icon from the projected position of its associated waypoint, as [x, y] in pixels.

Inherited from

AbstractMapWaypointIcon.offset


priority

readonly priority: Subscribable<number>

Defined in: sdk/components/map/MapWaypointIcon.ts:77

The render priority of this icon. Icons with higher priorities will be rendered on top of icons with lower priorities.

Inherited from

AbstractMapWaypointIcon.priority


size

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

Defined in: sdk/components/map/MapWaypointIcon.ts:80

The size of this icon, as [width, height] in pixels.

Inherited from

AbstractMapWaypointIcon.size


waypoint

readonly waypoint: T

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

The waypoint associated with this icon.

Inherited from

AbstractMapWaypointIcon.waypoint


tempVec2

protected readonly static tempVec2: Float64Array<ArrayBuffer>

Defined in: sdk/components/map/MapWaypointIcon.ts:74

Inherited from

AbstractMapWaypointIcon.tempVec2

Methods

draw()

draw(context, mapProjection): void

Defined in: sdk/components/map/MapWaypointIcon.ts:113

Renders this icon to a canvas.

Parameters

ParameterTypeDescription
contextCanvasRenderingContext2DThe canvas 2D rendering context to which to render.
mapProjectionMapProjectionThe projection to use for rendering.

Returns

void

Inherited from

AbstractMapWaypointIcon.draw


drawIconAt()

protected drawIconAt(context, mapProjection, left, top): void

Defined in: workingtitle-instruments-epic2/shared/Map/MapAirportIcon.ts:43

Draws the icon at the specified position.

Parameters

ParameterTypeDescription
contextCanvasRenderingContext2DThe canvas rendering context to use.
mapProjectionMapProjectionThe map projection to use.
leftnumberThe x-coordinate of the left edge of the icon.
topnumberThe y-coordinate of the top edge of the icon.

Returns

void

Overrides

AbstractMapWaypointIcon.drawIconAt