Page tree
Skip to end of metadata
Go to start of metadata


Introduced in

Version:1.50

Description

Description:

Sets the coordinate type and grid resolution for the loaded map (setting are valid until map is reloaded). The settings mirror those defined in CfgWorlds >> Grid (see Class Grid in the VBS3 Developer Reference).

Grid settings are applied to the zoom levels in the same order as they are defined in the configuration. If fewer zoom levels are passed with the command than there are in the configuration, only the ones from this command are used. If more are passed, then those are ignored.

Grid settings are defined as a nested array, with one array per zoom level (see Examples). Each sub-array contains 5 elements, whose usage depends on the coordinate system applied: [format,formatX,formatY,stepX,stepY]

Arguments for the different coordinate types are as follows:

  • MGRS
    • format: String - Always "XY".
    • formatX / Y: String - Number of digits to use for labels. String is a mask, with one "0" per digit.
    • stepX / Y: Number - Distance between grid lines in meters. If negative, then values decrease as they move away from the origin (be aware that changing the step size may put the map into a different zoom level, with grid spacing that may override the one defined using the command).
  • LL (Latitude / Longitude in degrees)
    • format: String - Always empty ("").
    • formatX / Y: String - Digit formatting, following C++ notation: "%.4f" shows 4 decimal digits.
    • stepX / Y: Number - Distance between grid lines in degrees.
  • LLMS (Latitude / Longitude in minutes or seconds)
    • format: String - Always empty ("").
    • formatX / Y: String - Before V3.5: Always empty (""). In V3.5+, same formatting options as for "LL" can be used.
    • stepX / Y: Number - Distance between grid lines in minutes / seconds.
  • BNG (British National Grid) (V3.8.1+)

Syntax

Syntax:setGeoCoordSystem [gridformat,coordinatesystem]
Parameters:
  • gridformat: Array - Grid formatting as described above.
  • coordinatesystem: String - System to apply. "MGRS", "LL" or "LLMS"
Return Value:Nothing

Examples

Examples:
setGeoCoordSystem [[["XY", "0000", "0000", 10, -10], ["XY", "000", "000", 100, -100], ["XY", "00", "00", 1000, -1000]], "MGRS"];
setGeoCoordSystem [[["", "%.8f", "%.8f", 0.0004, -0.0004], ["", "%.6f", "%.6f", 0.002, -0.002], ["", "%.4f", "%.4f", 0.01, -0.01]], "LL"];
setGeoCoordSystem [[["", "", "", 1, -1], ["", "", "", 10, -10], ["", "", "", 60, -60]], "LLMS"]; // V3.4-
setGeoCoordSystem [[["", "%.8f", "%.8f", 0.0004, -0.0004], ["", "%.6f", "%.6f", 0.002, -0.002], ["", "%.4f", "%.4f", 0.01, -0.01]], "LLMS"]; // V3.5+
setGeoCoordSystem[[], "BNG"];

Additional Information

See also: getGeoCoordSystem, getOrigin, posToCoord
Multiplayer:
Problems:

Notes