Skip to main content

Class: MapAirportIcon<T>

An airport icon.

Type parameters

NameType
Textends AirportWaypoint

Hierarchy

  • MapWaypointSpriteIcon<T>

    MapAirportIcon

Constructors

constructor

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

Constructor.

Type parameters

NameType
Textends AirportWaypoint

Parameters

NameTypeDescription
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.
imgHTMLImageElementThe image to use for the icon.
sizeReadonly<Omit<Float64Array, "set" | "sort" | "copyWithin">> | Subscribable<Readonly<Omit<Float64Array, "set" | "sort" | "copyWithin">>>The size of this icon, as [width, height] in pixels, or a subscribable which provides it.
options?AbstractMapWaypointIconOptionsOptions with which to initialize this icon.

Returns

MapAirportIcon<T>

Overrides

MapWaypointSpriteIcon\<T\>.constructor

Defined in

src/garminsdk/components/map/MapWaypointIcon.ts:23

Properties

anchor

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

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

MapWaypointSpriteIcon.anchor

Defined in

src/sdk/components/map/MapWaypointIcon.ts:86


frameHeight

Protected Readonly frameHeight: number

The frame height of the sprite, in pixels.

Inherited from

MapWaypointSpriteIcon.frameHeight

Defined in

src/sdk/components/map/MapWaypointIcon.ts:185


frameWidth

Protected Readonly frameWidth: number

The frame width of the sprite, in pixels.

Inherited from

MapWaypointSpriteIcon.frameWidth

Defined in

src/sdk/components/map/MapWaypointIcon.ts:184


img

Protected Readonly img: HTMLImageElement

This icon's sprite's image source.

Inherited from

MapWaypointSpriteIcon.img

Defined in

src/sdk/components/map/MapWaypointIcon.ts:183


offset

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

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

Inherited from

MapWaypointSpriteIcon.offset

Defined in

src/sdk/components/map/MapWaypointIcon.ts:89


priority

Readonly priority: Subscribable<number>

Inherit Doc

Inherited from

MapWaypointSpriteIcon.priority

Defined in

src/sdk/components/map/MapWaypointIcon.ts:77


size

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

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

Inherited from

MapWaypointSpriteIcon.size

Defined in

src/sdk/components/map/MapWaypointIcon.ts:80


waypoint

Readonly waypoint: T

The waypoint associated with this icon.

Inherited from

MapWaypointSpriteIcon.waypoint

Defined in

src/sdk/components/map/MapWaypointIcon.ts:100


tempVec2

Static Protected Readonly tempVec2: Float64Array

Inherited from

MapWaypointSpriteIcon.tempVec2

Defined in

src/sdk/components/map/MapWaypointIcon.ts:74

Methods

draw

draw(context, mapProjection): void

Parameters

NameType
contextCanvasRenderingContext2D
mapProjectionMapProjection

Returns

void

Inherit Doc

Inherited from

MapWaypointSpriteIcon.draw

Defined in

src/sdk/components/map/MapWaypointIcon.ts:113


drawIconAt

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

Parameters

NameType
contextCanvasRenderingContext2D
mapProjectionMapProjection
leftnumber
topnumber

Returns

void

Inherit Doc

Inherited from

MapWaypointSpriteIcon.drawIconAt

Defined in

src/sdk/components/map/MapWaypointIcon.ts:194


getSpriteFrame

getSpriteFrame(mapProjection): number

Parameters

NameType
mapProjectionMapProjection

Returns

number

Overrides

MapWaypointSpriteIcon.getSpriteFrame

Defined in

src/garminsdk/components/map/MapWaypointIcon.ts:34