Skip to main content

Class: DefaultNavDataBarFieldModelFactory

A default implementation of NavDataBarFieldModelFactory.

Implements

Constructors

constructor

new DefaultNavDataBarFieldModelFactory(bus, gpsValidity, options?): DefaultNavDataBarFieldModelFactory

Creates a new instance of DefaultNavDataBarFieldModelFactory.

Parameters

NameTypeDescription
busEventBusThe event bus.
gpsValiditySubscribable<NavDataFieldGpsValidity>The subscribable that provides the validity of the GPS data for the models.
options?Readonly<DefaultNavDataBarFieldModelFactoryOptions>Options with which to configure the factory.

Returns

DefaultNavDataBarFieldModelFactory

Defined in

src/garminsdk/components/navdatabar/DefaultNavDataBarFieldModelFactory.ts:39

new DefaultNavDataBarFieldModelFactory(bus, fms, gpsValidity, options?): DefaultNavDataBarFieldModelFactory

Creates a new instance of DefaultNavDataBarFieldModelFactory.

Parameters

NameTypeDescription
busEventBusThe event bus.
fmsFms<any>The flight management system.
gpsValiditySubscribable<NavDataFieldGpsValidity>The subscribable that provides the validity of the GPS data for the models.
options?Readonly<DefaultNavDataBarFieldModelFactoryOptions>Options with which to configure the factory.

Returns

DefaultNavDataBarFieldModelFactory

Deprecated

Please use the constructor overload without the fms parameter, since that parameter is no longer used.

Defined in

src/garminsdk/components/navdatabar/DefaultNavDataBarFieldModelFactory.ts:53

Properties

factory

Protected Readonly factory: GenericNavDataBarFieldModelFactory

Defined in

src/garminsdk/components/navdatabar/DefaultNavDataBarFieldModelFactory.ts:31

Methods

create

create<T>(type): NavDataBarFieldTypeModelMap[T]

Creates a navigation data bar field data model for a given type of field.

Type parameters

NameType
Textends NavDataFieldType

Parameters

NameTypeDescription
typeTA data bar field type.

Returns

NavDataBarFieldTypeModelMap[T]

A navigation data bar field data model for the given field type.

Throws

Error if an unsupported field type is specified.

Implementation of

NavDataBarFieldModelFactory.create

Defined in

src/garminsdk/components/navdatabar/DefaultNavDataBarFieldModelFactory.ts:110