Skip to main content

Class: DefaultWaypointIconImageCache

A default implementation of WaypointIconImageCache.

Implements

Constructors

constructor

new DefaultWaypointIconImageCache(): DefaultWaypointIconImageCache

Returns

DefaultWaypointIconImageCache

Properties

cache

Protected Readonly cache: Map<string, HTMLImageElement>

Defined in

src/garminsdk/graphics/img/DefaultWaypointIconImageCache.ts:36

Methods

get

get(key): undefined | HTMLImageElement

Retrieves an image from this cache.

Parameters

NameTypeDescription
keystringThe key of the image to retrieve.

Returns

undefined | HTMLImageElement

The image registered under the specified key, or undefined if one could not be found.

Defined in

src/garminsdk/graphics/img/DefaultWaypointIconImageCache.ts:54


getForAirport

getForAirport(airport): undefined | HTMLImageElement

Retrieves an image for an airport.

Parameters

NameTypeDescription
airportFacilityWaypoint<AirportFacility>The airport for which to retrieve the image.

Returns

undefined | HTMLImageElement

The image for the specified airport, or undefined if one could not be found.

Defined in

src/garminsdk/graphics/img/DefaultWaypointIconImageCache.ts:87


getForVor

getForVor(vor): undefined | HTMLImageElement

Retrieves an image for a VOR.

Parameters

NameTypeDescription
vorFacilityWaypoint<VorFacility>The VOR for which to retrieve the image.

Returns

undefined | HTMLImageElement

The image for the specified VOR, or undefined if one could not be found.

Defined in

src/garminsdk/graphics/img/DefaultWaypointIconImageCache.ts:121


getForWaypoint

getForWaypoint(waypoint): undefined | HTMLImageElement

Retrieves an image for a waypoint.

Parameters

NameTypeDescription
waypointWaypointThe waypoint for which to retrieve the image.

Returns

undefined | HTMLImageElement

The image for the specified waypoint, or undefined if one could not be found.

Implementation of

WaypointIconImageCache.getForWaypoint

Defined in

src/garminsdk/graphics/img/DefaultWaypointIconImageCache.ts:59


register

register(key, src): void

Registers an image with this cache.

Parameters

NameTypeDescription
keystringThe key of the image to register.
srcstringThe source URI of the image to register.

Returns

void

Defined in

src/garminsdk/graphics/img/DefaultWaypointIconImageCache.ts:43