Skip to main content

Class: MapWaypointHighlightIcon<T>

Defined in: src/garminsdk/components/map/MapWaypointIcon.ts:71

An icon for a highlighted waypoint. This icon embellishes a pre-existing ("base") icon with a surrounding ring and background.

Extends​

Type Parameters​

Type Parameter
T extends Waypoint

Constructors​

Constructor​

new MapWaypointHighlightIcon<T>(baseIcon, priority, options?): MapWaypointHighlightIcon<T>

Defined in: src/garminsdk/components/map/MapWaypointIcon.ts:97

Constructor.

Parameters​

ParameterTypeDescription
baseIconAbstractMapWaypointIcon<T>This icon's base waypoint icon.
prioritynumber | Subscribable<number>The render priority of this icon. Icons with higher priorities should be rendered above those with lower priorities.
options?MapWaypointHighlightIconOptionsOptions with which to initialize this icon.

Returns​

MapWaypointHighlightIcon<T>

Overrides​

AbstractMapWaypointIcon.constructor

Properties​

anchor​

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

Defined in: src/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


bgColor​

readonly bgColor: Subscribable<string>

Defined in: src/garminsdk/components/map/MapWaypointIcon.ts:88

The color of this icon's ring background.


drawData​

protected readonly drawData: object

Defined in: src/sdk/components/map/MapWaypointIcon.ts:117

size​

size: Float64Array<ArrayBufferLike>

topLeft​

topLeft: Float64Array<ArrayBufferLike>

waypointProjectedPos​

waypointProjectedPos: Float64Array<ArrayBufferLike>

Inherited from​

AbstractMapWaypointIcon.drawData


offset​

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

Defined in: src/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​

readonly onDraw: ReadonlySubEvent<MapWaypointHighlightIcon<T>, AbstractMapWaypointIconDrawData>

Defined in: src/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


outlineColor​

readonly outlineColor: Subscribable<string>

Defined in: src/garminsdk/components/map/MapWaypointIcon.ts:85

The color of the outline for this icon's ring.


outlineWidth​

readonly outlineWidth: Subscribable<number>

Defined in: src/garminsdk/components/map/MapWaypointIcon.ts:82

The width of the outline for this icon's ring, in pixels.


priority​

readonly priority: Subscribable<number>

Defined in: src/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


ringRadiusBuffer​

readonly ringRadiusBuffer: Subscribable<number>

Defined in: src/garminsdk/components/map/MapWaypointIcon.ts:73

The buffer of the ring around this icon's base icon, in pixels.


size​

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

Defined in: src/sdk/components/map/MapWaypointIcon.ts:97

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

Inherited from​

AbstractMapWaypointIcon.size


strokeColor​

readonly strokeColor: Subscribable<string>

Defined in: src/garminsdk/components/map/MapWaypointIcon.ts:79

The color of the stroke for this icon's ring.


strokeWidth​

readonly strokeWidth: Subscribable<number>

Defined in: src/garminsdk/components/map/MapWaypointIcon.ts:76

The width of the stroke for this icon's ring, in pixels.


waypoint​

readonly waypoint: T

Defined in: src/sdk/components/map/MapWaypointIcon.ts:132

The waypoint associated with this icon.

Inherited from​

AbstractMapWaypointIcon.waypoint


tempVec2​

protected readonly static tempVec2: Float64Array<ArrayBufferLike>

Defined in: src/sdk/components/map/MapWaypointIcon.ts:91

Inherited from​

AbstractMapWaypointIcon.tempVec2

Methods​

draw()​

draw(context, mapProjection): void

Defined in: src/sdk/components/map/MapWaypointIcon.ts:156

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: src/garminsdk/components/map/MapWaypointIcon.ts:113

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


getLastDrawData()​

getLastDrawData(): AbstractMapWaypointIconDrawData

Defined in: src/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.

Inherited from​

AbstractMapWaypointIcon.getLastDrawData