Skip to main content

Class: G3XChartsSelectionManager

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Charts/G3XChartsSelectionManager.ts:48

A G3X Touch manager for electronic charts selected for display.

Constructors​

Constructor​

new G3XChartsSelectionManager(bus, chartsSources, fplSourceDataProvider, posHeadingDataProvider, chartsSettingManager): G3XChartsSelectionManager

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Charts/G3XChartsSelectionManager.ts:81

Creates a new instance of G3XChartsSelectionManager.

Parameters​

ParameterTypeDescription
busEventBusThe event bus.
chartsSourcesIterable<G3XChartsSource>All available electronic charts sources.
fplSourceDataProviderG3XFplSourceDataProviderA provider of flight plan source data.
posHeadingDataProviderPositionHeadingDataProviderA provider of airplane position and heading data.
chartsSettingManagerUserSettingManager<G3XChartsUserSettingTypes>A manager for electronic charts user settings.

Returns​

G3XChartsSelectionManager

Properties​

chartsSources​

readonly chartsSources: ReadonlyMap<string, G3XChartsSource>

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Charts/G3XChartsSelectionManager.ts:50

A map to all available electronic charts sources from their unique IDs.


isLoadingAirportData​

readonly isLoadingAirportData: Subscribable<boolean>

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Charts/G3XChartsSelectionManager.ts:69

Whether this manager is currently busy loading airport chart data.


selectedAirportData​

readonly selectedAirportData: Subscribable<G3XChartsAirportSelectionData | null>

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Charts/G3XChartsSelectionManager.ts:61

Data describing the currently selected airport.


selectedPageData​

readonly selectedPageData: Subscribable<G3XChartsPageSelectionData | null>

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Charts/G3XChartsSelectionManager.ts:65

Data describing the currently selected chart page.

Methods​

destroy()​

destroy(): void

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Charts/G3XChartsSelectionManager.ts:653

Destroys this manager.

Returns​

void


reset()​

reset(): void

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Charts/G3XChartsSelectionManager.ts:130

Resets this manager's displayed electronic charts such that both the selected airport and selected chart page are cleared.

Returns​

void


selectAirport()​

selectAirport(icao, syncToFlightPlan): Promise<boolean>

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Charts/G3XChartsSelectionManager.ts:104

Selects an airport for which to display charts.

Parameters​

ParameterTypeDefault valueDescription
icaoIcaoValueundefinedThe ICAO value of the airport to select.
syncToFlightPlanbooleanfalseWhether to sync the selected chart page for the newly selected airport with the active flight plan. If false, then the selected chart page will be set to the primary airport diagram page instead (if an airport diagram page is not available, then the first airport information chart page is used). Defaults to false.

Returns​

Promise<boolean>

A Promise which fulfills with whether the selection was successful.


selectPage()​

selectPage(pageData): Promise<boolean>

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Charts/G3XChartsSelectionManager.ts:113

Selects a chart page to display.

Parameters​

ParameterTypeDescription
pageDataG3XChartsPageSelectionDataData describing the page to select.

Returns​

Promise<boolean>

A Promise which fulfills with whether the selection was successful.


syncToFlightPlan()​

syncToFlightPlan(): Promise<boolean>

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Charts/G3XChartsSelectionManager.ts:122

Syncs the selected chart page for the currently selected airport with the active flight plan. If no airport is selected, then this method does nothing (the returned Promise is immediately fulfilled with a value of true).

Returns​

Promise<boolean>

A Promise which fulfills with whether the sync was successful.