Class: DefaultWaypointIconImageCache
A default implementation of WaypointIconImageCache.
Implements
Constructors
constructor
• new DefaultWaypointIconImageCache(): DefaultWaypointIconImageCache
Returns
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
Name | Type | Description |
---|---|---|
key | string | The 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
Name | Type | Description |
---|---|---|
airport | FacilityWaypoint <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
Name | Type | Description |
---|---|---|
vor | FacilityWaypoint <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
Name | Type | Description |
---|---|---|
waypoint | Waypoint | The 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
Name | Type | Description |
---|---|---|
key | string | The key of the image to register. |
src | string | The source URI of the image to register. |
Returns
void
Defined in
src/garminsdk/graphics/img/DefaultWaypointIconImageCache.ts:43