Skip to main content

Class: MapSystemUtils

Defined in: src/sdk/components/mapsystem/MapSystemUtils.ts:6

Utility methods related to MapSystem.

Constructors

Constructor

new MapSystemUtils(): MapSystemUtils

Returns

MapSystemUtils

Methods

nominalToTrueRelativeX()

static nominalToTrueRelativeX(nominalRelX, width, deadZone): number

Defined in: src/sdk/components/mapsystem/MapSystemUtils.ts:16

Converts a nominal relative projected x coordinate to a true relative projected x coordinate. Nominal relative coordinates are expressed relative to the map's projected width and height, excluding dead zones. True relative coordinates are expressed relative to the map's projected width and height, including dead zones.

Parameters

ParameterTypeDescription
nominalRelXnumberA nominal relative projected x coordinate.
widthnumberThe width of the map's projected window, in pixels.
deadZoneReadonlyFloat64ArrayThe map's dead zone, as [left, top, right, bottom] in pixels.

Returns

number

The true relative projected x coordinate that is equivalent to the specified nominal coordinate.


nominalToTrueRelativeXY()

static nominalToTrueRelativeXY(nominal, size, deadZone, out): Float64Array

Defined in: src/sdk/components/mapsystem/MapSystemUtils.ts:43

Converts nominal relative projected coordinates to true relative projected coordinates. Nominal relative coordinates are expressed relative to the map's projected width and height, excluding dead zones. True relative coordinates are expressed relative to the map's projected width and height, including dead zones.

Parameters

ParameterTypeDescription
nominalReadonlyFloat64ArrayNominal relative projected coordinates.
sizeReadonlyFloat64ArrayThe size of the map's projected window, as [width, height] in pixels.
deadZoneReadonlyFloat64ArrayThe map's dead zone, as [left, top, right, bottom] in pixels.
outFloat64ArrayThe vector to which to write the result.

Returns

Float64Array

The true relative projected coordinates that are equivalent to the specified nominal coordinates.


nominalToTrueRelativeY()

static nominalToTrueRelativeY(nominalRelY, height, deadZone): number

Defined in: src/sdk/components/mapsystem/MapSystemUtils.ts:29

Converts a nominal relative projected y coordinate to a true relative projected y coordinate. Nominal relative coordinates are expressed relative to the map's projected width and height, excluding dead zones. True relative coordinates are expressed relative to the map's projected width and height, including dead zones.

Parameters

ParameterTypeDescription
nominalRelYnumberA nominal relative projected y coordinate.
heightnumberThe height of the map's projected window, in pixels.
deadZoneReadonlyFloat64ArrayThe map's dead zone, as [left, top, right, bottom] in pixels.

Returns

number

The true relative projected y coordinate that is equivalent to the specified nominal coordinate.


trueToNominalRelativeX()

static trueToNominalRelativeX(trueRelX, width, deadZone): number

Defined in: src/sdk/components/mapsystem/MapSystemUtils.ts:65

Converts a true relative projected x coordinate to a nominal relative projected x coordinate. Nominal relative coordinates are expressed relative to the map's projected width and height, excluding dead zones. True relative coordinates are expressed relative to the map's projected width and height, including dead zones.

Parameters

ParameterTypeDescription
trueRelXnumberA true relative projected x coordinate.
widthnumberThe width of the map's projected window, in pixels.
deadZoneReadonlyFloat64ArrayThe map's dead zone, as [left, top, right, bottom] in pixels.

Returns

number

The nominal relative projected x coordinate that is equivalent to the specified true coordinate.


trueToNominalRelativeXY()

static trueToNominalRelativeXY(nominal, size, deadZone, out): Float64Array

Defined in: src/sdk/components/mapsystem/MapSystemUtils.ts:92

Converts true relative projected coordinates to nominal relative projected coordinates. Nominal relative coordinates are expressed relative to the map's projected width and height, excluding dead zones. True relative coordinates are expressed relative to the map's projected width and height, including dead zones.

Parameters

ParameterTypeDescription
nominalReadonlyFloat64ArrayTrue relative projected coordinates.
sizeReadonlyFloat64ArrayThe size of the map's projected window, as [width, height] in pixels.
deadZoneReadonlyFloat64ArrayThe map's dead zone, as [left, top, right, bottom] in pixels.
outFloat64ArrayThe vector to which to write the result.

Returns

Float64Array

The nominal relative projected coordinates that are equivalent to the specified true coordinates.


trueToNominalRelativeY()

static trueToNominalRelativeY(trueRelY, height, deadZone): number

Defined in: src/sdk/components/mapsystem/MapSystemUtils.ts:78

Converts a true relative projected y coordinate to a nominal relative projected y coordinate. Nominal relative coordinates are expressed relative to the map's projected width and height, excluding dead zones. True relative coordinates are expressed relative to the map's projected width and height, including dead zones.

Parameters

ParameterTypeDescription
trueRelYnumberA true relative projected y coordinate.
heightnumberThe height of the map's projected window, in pixels.
deadZoneReadonlyFloat64ArrayThe map's dead zone, as [left, top, right, bottom] in pixels.

Returns

number

The nominal relative projected y coordinate that is equivalent to the specified true coordinate.