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
| Parameter | Type | Description |
|---|---|---|
waypoint | T | The waypoint associated with this icon. |
priority | number | Subscribable<number> | The render priority of this icon. Icons with higher priorities should be rendered above those with lower priorities. |
img | HTMLImageElement | This icon's image. |
dot_img | HTMLImageElement | This icon's image for the dot. |
size | Readonly<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. |
currentRange | Subscribable<number> | The current range setting of the map. |
options? | AbstractMapWaypointIconOptions | Options with which to initialize this icon. |
Returns
MapAirportIcon<T>
Overrides
AbstractMapWaypointIcon.constructor
Properties
anchor
readonlyanchor:Subscribable<Readonly<Omit<Float64Array<ArrayBufferLike>,"set"|"sort"|"copyWithin">>>
Defined in: sdk/components/map/MapWaypointIcon.ts:103
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
protectedreadonlycurrentRange:Subscribable<number>
Defined in: workingtitle-instruments-epic2/shared/Map/MapAirportIcon.ts:36
The current range setting of the map.
dot_img
protectedreadonlydot_img:HTMLImageElement
Defined in: workingtitle-instruments-epic2/shared/Map/MapAirportIcon.ts:34
This icon's image for the dot.
drawData
protectedreadonlydrawData:object
Defined in: sdk/components/map/MapWaypointIcon.ts:117
size
size:
Float64Array<ArrayBufferLike>
topLeft
topLeft:
Float64Array<ArrayBufferLike>
waypointProjectedPos
waypointProjectedPos:
Float64Array<ArrayBufferLike>
Inherited from
AbstractMapWaypointIcon.drawData
img
protectedreadonlyimg:HTMLImageElement
Defined in: workingtitle-instruments-epic2/shared/Map/MapAirportIcon.ts:33
This icon's image.
offset
readonlyoffset:Subscribable<Readonly<Omit<Float64Array<ArrayBufferLike>,"set"|"sort"|"copyWithin">>>
Defined in: sdk/components/map/MapWaypointIcon.ts:106
The offset of this icon from the projected position of its associated waypoint, as [x, y] in pixels.
Inherited from
AbstractMapWaypointIcon.offset
onDraw
readonlyonDraw:ReadonlySubEvent<MapAirportIcon<T>,AbstractMapWaypointIconDrawData>
Defined in: sdk/components/map/MapWaypointIcon.ts:115
An event that notifies subscribers when this icon is drawn (when draw() is called). The sender of the event is this icon. The event data describes the draw operation that triggered the event.
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
AbstractMapWaypointIcon.onDraw
priority
readonlypriority:Subscribable<number>
Defined in: sdk/components/map/MapWaypointIcon.ts:94
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
readonlysize:Subscribable<Readonly<Omit<Float64Array<ArrayBufferLike>,"set"|"sort"|"copyWithin">>>
Defined in: sdk/components/map/MapWaypointIcon.ts:97
The size of this icon, as [width, height] in pixels.
Inherited from
waypoint
readonlywaypoint:T
Defined in: sdk/components/map/MapWaypointIcon.ts:132
The waypoint associated with this icon.
Inherited from
AbstractMapWaypointIcon.waypoint
tempVec2
protectedreadonlystatictempVec2:Float64Array<ArrayBufferLike>
Defined in: sdk/components/map/MapWaypointIcon.ts:91
Inherited from
AbstractMapWaypointIcon.tempVec2
Methods
draw()
draw(
context,mapProjection):void
Defined in: sdk/components/map/MapWaypointIcon.ts:156
Renders this icon to a canvas.
Parameters
| Parameter | Type | Description |
|---|---|---|
context | CanvasRenderingContext2D | The canvas 2D rendering context to which to render. |
mapProjection | MapProjection | The projection to use for rendering. |
Returns
void
Inherited from
drawIconAt()
protecteddrawIconAt(context,mapProjection,left,top):void
Defined in: workingtitle-instruments-epic2/shared/Map/MapAirportIcon.ts:43
Draws the icon at the specified position.
Parameters
| Parameter | Type | Description |
|---|---|---|
context | CanvasRenderingContext2D | The canvas rendering context to use. |
mapProjection | MapProjection | The map projection to use. |
left | number | The x-coordinate of the left edge of the icon. |
top | number | The y-coordinate of the top edge of the icon. |
Returns
void
Overrides
AbstractMapWaypointIcon.drawIconAt
getLastDrawData()
getLastDrawData():
AbstractMapWaypointIconDrawData
Defined in: sdk/components/map/MapWaypointIcon.ts:151
Gets data describing this icon's last executed drawing operation (the last time that draw() was
called). If the icon has not been drawn yet, then the data will report NaN values.
Returns
AbstractMapWaypointIconDrawData
Data describing this icon'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.