Skip to main content

Class: SimChartService

Defined in: src/sdk/charts/SimChartService.ts:9

A chart service that provides chart data from the sim's JS chart listener.

Implements​

Constructors​

Constructor​

new SimChartService(): SimChartService

Returns​

SimChartService

Methods​

getChartPages()​

getChartPages(chartGuid): Promise<SimChartPages>

Defined in: src/sdk/charts/SimChartService.ts:32

Gets chart pages for a given chart.

Parameters​

ParameterTypeDescription
chartGuidstringThe GUID of the chart for which to get pages.

Returns​

Promise<SimChartPages>

A Promise which is fulfilled with the requested chart pages if they were successfully retrieved, or rejected with a numeric error code if the chart pages could not be retrieved. The error code is of type number and extends ChartServiceErrorCode.

Implementation of​

ChartService.getChartPages


getIndexForAirport()​

getIndexForAirport<T>(provider, airportIcao): Promise<SimChartIndex<T>>

Defined in: src/sdk/charts/SimChartService.ts:11

Gets a chart index for an airport.

Type Parameters​

Type Parameter
T extends string

Parameters​

ParameterTypeDescription
providerstringThe provider from which to get the chart index.
airportIcaoIcaoValueThe ICAO of the airport for which to get the chart index.

Returns​

Promise<SimChartIndex<T>>

A Promise which is fulfilled with the requested chart index if one was successfully retrieved, or rejected with a numeric error code if the chart index could not be retrieved. The error code is of type number and extends ChartServiceErrorCode.

Implementation of​

ChartService.getIndexForAirport