Class: MapTodIcon
Defined in: workingtitle-instruments-epic2/shared/Map/MapTod.ts:59
A VNAV waypoint icon.
Extends
Constructors
Constructor
new MapTodIcon(
waypoint,priority,size,options?):MapTodIcon
Defined in: workingtitle-instruments-epic2/shared/Map/MapTod.ts:67
Constructor.
Parameters
| Parameter | Type | Description |
|---|---|---|
waypoint | VNavWaypoint | The waypoint associated with this icon. |
priority | number | The render priority of this icon. Icons with higher priorities should be rendered above those with lower priorities. |
size | ReadonlyFloat64Array | The size of this icon, as [width, height] in pixels. |
options? | AbstractMapWaypointIconOptions | Options with which to initialize this icon. |
Returns
MapTodIcon
Overrides
MapWaypointImageIcon.constructor
Properties
anchor
readonlyanchor: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
img
protectedreadonlyimg:HTMLImageElement
Defined in: sdk/components/map/MapWaypointIcon.ts:150
This icon's image.
Inherited from
offset
readonlyoffset: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
priority
readonlypriority: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
size
readonlysize: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
waypoint
readonlywaypoint:VNavWaypoint
Defined in: sdk/components/map/MapWaypointIcon.ts:100
The waypoint associated with this icon.
Inherited from
tempVec2
protectedreadonlystatictempVec2:Float64Array<ArrayBuffer>
Defined in: sdk/components/map/MapWaypointIcon.ts:74
Inherited from
Methods
draw()
draw(
context,mapProjection):void
Defined in: sdk/components/map/MapWaypointIcon.ts:113
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: sdk/components/map/MapWaypointIcon.ts:158
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