Skip to main content

Class: NavIndicatorsCollection<SourceName, IndicatorName>

A basic implementation of NavReferenceIndicators which stores the indicators in a Map.

Type parameters

NameTypeDescription
SourceNameextends stringThe names of the nav sources supported by the nav indicators contained in the collection.
IndicatorNameextends stringThe names of the nav indicators contained in the collection.

Implements

Constructors

constructor

new NavIndicatorsCollection<SourceName, IndicatorName>(indicators?): NavIndicatorsCollection<SourceName, IndicatorName>

Creates a new instance of NavReferenceIndicatorsCollection.

Type parameters

NameType
SourceNameextends string
IndicatorNameextends string

Parameters

NameTypeDescription
indicatorsMap<IndicatorName, NavIndicator<SourceName>>A map of this collection's nav indicators, keyed by name.

Returns

NavIndicatorsCollection<SourceName, IndicatorName>

Defined in

src/garminsdk/navreference/indicator/NavReferenceIndicator.ts:102

Methods

get

get(name): NavIndicator<SourceName>

Gets a nav indicator with a given name.

Parameters

NameTypeDescription
nameIndicatorNameThe name of the indicator to get.

Returns

NavIndicator<SourceName>

The specified nav indicator.

Throws

Error if an indicator with the specified name could not be found.

Implementation of

NavIndicators.get

Defined in

src/garminsdk/navreference/indicator/NavReferenceIndicator.ts:107