Arma 3 Scripting

Command in GUI Control - Map

ctrlMapScale

Also available as Markdown and JSON, or read the original wiki page.

Description

Returns the current scale of given map control.

Syntax

ctrlMapScale ctrl

Parameters:

Returns: Number

Examples

Example 1

_control = (findDisplay 12) displayCtrl 51; // Arma 3
_scale = ctrlMapScale _control; // returns number from 1 to 0.001

See also

ctrlScale · ctrlSetScale · ctrlMapDir

Community notes

Veteran29

Following formula can be used to calculate current "zoom points", these can be used to hide/show icons at the same thresholds as the native map icons:

800 * (1 / ctrlMapScale _ctrlMap) * (1 / getTerrainInfo#1)

The thresholds are defined in ptsPerSquare* ctrl map properties, e.g:

getNumber (configFile >> "ctrlMap" >> "ptsPerSquareObj")