Skip to main content

Class: DefaultWaypointIconImageCache

Defined in: src/garminsdk/graphics/img/DefaultWaypointIconImageCache.ts:35

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

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

Retrieves an image from this cache.

Parameters​

ParameterTypeDescription
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.


getForAirport()​

protected getForAirport(airport): undefined | HTMLImageElement

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

Retrieves an image for an airport.

Parameters​

ParameterTypeDescription
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.


getForVor()​

protected getForVor(vor): undefined | HTMLImageElement

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

Retrieves an image for a VOR.

Parameters​

ParameterTypeDescription
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.


getForWaypoint()​

getForWaypoint(waypoint): undefined | HTMLImageElement

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

Retrieves an image for a waypoint.

Parameters​

ParameterTypeDescription
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


register()​

register(key, src): void

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

Registers an image with this cache.

Parameters​

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

Returns​

void