Class: MapFlightPlanFocusCalculator
Defined in: src/garminsdk/components/map/flightplan/MapFlightPlanFocusCalculator.ts:16
Calculates map projection parameters to fit flight plan foci.
Constructors
Constructor
new MapFlightPlanFocusCalculator(
mapProjection
):MapFlightPlanFocusCalculator
Defined in: src/garminsdk/components/map/flightplan/MapFlightPlanFocusCalculator.ts:24
Constructor.
Parameters
Parameter | Type | Description |
---|---|---|
mapProjection | MapProjection | This calculator's map projection. |
Returns
MapFlightPlanFocusCalculator
Methods
calculateRangeTarget()
calculateRangeTarget(
focus
,margins
,ppos
,out
):MapFieldOfView
Defined in: src/garminsdk/components/map/flightplan/MapFlightPlanFocusCalculator.ts:38
Calculates a maximum range and target center for a given flight plan focus such that the terminators of all legs in the focus are visible in this calculator's map projection. If there is only one leg terminator in the specified focus, the calculated range will be equal to 0. If a range and target could not be calculated, NaN will be written to the results.
Parameters
Parameter | Type | Description |
---|---|---|
focus | FlightPlanFocus | The array of legs on which to focus. |
margins | Float64Array | The margins around the projected map boundaries to respect. Expressed as [left, top, right, bottom]. |
ppos | LatLonInterface | The current position of the airplane. |
out | MapFieldOfView | The object to which to write the results. |
Returns
MapFieldOfView
The calculated range and target for the specified focus.