Skip to main content

Class: MapSystemUtils

Utility methods related to MapSystem.

Constructors

constructor

new MapSystemUtils(): MapSystemUtils

Returns

MapSystemUtils

Methods

nominalToTrueRelativeX

nominalToTrueRelativeX(nominalRelX, width, deadZone): number

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

NameTypeDescription
nominalRelXnumberA nominal relative projected x coordinate.
widthnumberThe width of the map's projected window, in pixels.
deadZoneReadonly<Omit<Float64Array, "set" | "sort" | "copyWithin">>The 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.

Defined in

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


nominalToTrueRelativeXY

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

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

NameTypeDescription
nominalReadonly<Omit<Float64Array, "set" | "sort" | "copyWithin">>Nominal relative projected coordinates.
sizeReadonly<Omit<Float64Array, "set" | "sort" | "copyWithin">>The size of the map's projected window, as [width, height] in pixels.
deadZoneReadonly<Omit<Float64Array, "set" | "sort" | "copyWithin">>The 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.

Defined in

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


nominalToTrueRelativeY

nominalToTrueRelativeY(nominalRelY, height, deadZone): number

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

NameTypeDescription
nominalRelYnumberA nominal relative projected y coordinate.
heightnumberThe height of the map's projected window, in pixels.
deadZoneReadonly<Omit<Float64Array, "set" | "sort" | "copyWithin">>The 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.

Defined in

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


trueToNominalRelativeX

trueToNominalRelativeX(trueRelX, width, deadZone): number

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

NameTypeDescription
trueRelXnumberA true relative projected x coordinate.
widthnumberThe width of the map's projected window, in pixels.
deadZoneReadonly<Omit<Float64Array, "set" | "sort" | "copyWithin">>The 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.

Defined in

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


trueToNominalRelativeXY

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

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

NameTypeDescription
nominalReadonly<Omit<Float64Array, "set" | "sort" | "copyWithin">>True relative projected coordinates.
sizeReadonly<Omit<Float64Array, "set" | "sort" | "copyWithin">>The size of the map's projected window, as [width, height] in pixels.
deadZoneReadonly<Omit<Float64Array, "set" | "sort" | "copyWithin">>The 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.

Defined in

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


trueToNominalRelativeY

trueToNominalRelativeY(trueRelY, height, deadZone): number

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

NameTypeDescription
trueRelYnumberA true relative projected y coordinate.
heightnumberThe height of the map's projected window, in pixels.
deadZoneReadonly<Omit<Float64Array, "set" | "sort" | "copyWithin">>The 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.

Defined in

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