Skip to main content

Class: NavReferenceSourceCollection<SourceName>

Defined in: src/garminsdk/navreference/source/NavReferenceSource.ts:40

A basic implementation of NavReferenceSources which stores the sources in a Map.

Type Parameters

Type ParameterDescription
SourceName extends stringThe names of the navigation reference sources supported by the collection.

Implements

Constructors

Constructor

new NavReferenceSourceCollection<SourceName>(...sources): NavReferenceSourceCollection<SourceName>

Defined in: src/garminsdk/navreference/source/NavReferenceSource.ts:47

Creates a new instance of NavReferenceSourceCollection.

Parameters

ParameterTypeDescription
...sourcesreadonly NavReferenceSource<SourceName>[]The navigation reference sources to include in the collection.

Returns

NavReferenceSourceCollection<SourceName>

Methods

get()

get(name): NavReferenceSource<SourceName>

Defined in: src/garminsdk/navreference/source/NavReferenceSource.ts:52

Gets a navigation reference source with a given name.

Parameters

ParameterTypeDescription
nameSourceNameThe name of the source to get.

Returns

NavReferenceSource<SourceName>

The specified navigation reference source.

Throws

Error if a source with the specified name could not be found.

Implementation of

NavReferenceSources.get