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
Parameter | 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.
getForAirport()
protected
getForAirport(airport
):undefined
|HTMLImageElement
Defined in: src/garminsdk/graphics/img/DefaultWaypointIconImageCache.ts:87
Retrieves an image for an airport.
Parameters
Parameter | 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.
getForVor()
protected
getForVor(vor
):undefined
|HTMLImageElement
Defined in: src/garminsdk/graphics/img/DefaultWaypointIconImageCache.ts:121
Retrieves an image for a VOR.
Parameters
Parameter | 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.
getForWaypoint()
getForWaypoint(
waypoint
):undefined
|HTMLImageElement
Defined in: src/garminsdk/graphics/img/DefaultWaypointIconImageCache.ts:59
Retrieves an image for a waypoint.
Parameters
Parameter | 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
register()
register(
key
,src
):void
Defined in: src/garminsdk/graphics/img/DefaultWaypointIconImageCache.ts:43
Registers an image with this cache.
Parameters
Parameter | Type | Description |
---|---|---|
key | string | The key of the image to register. |
src | string | The source URI of the image to register. |
Returns
void