{"name":"ctrlMapScale","title":"ctrlMapScale","type":"command","url":"https://community.bistudio.com/wiki/ctrlMapScale","revid":378435,"updated":"2026-04-07T21:06:22Z","groups":["GUI Control - Map"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Returns the current scale of given map control.","syntaxes":[{"syntax":"ctrlMapScale ctrl","params":[{"name":"ctrl","type":"Control","type_expr":"Control"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"ctrl"}}],"examples":[{"code":["_control = (findDisplay 12) displayCtrl 51; // Arma 3\n_scale = ctrlMapScale _control; // returns number from 1 to 0.001"]}],"see_also":["ctrlScale","ctrlSetScale","ctrlMapDir"],"notes":[{"user":"Veteran29","date":"2024-10-07T00:35:13Z","text":"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:\n\n```sqf\n800 * (1 / ctrlMapScale _ctrlMap) * (1 / getTerrainInfo#1)\n```\n\nThe thresholds are defined in\nptsPerSquare* ctrl map properties, e.g:\n\n```sqf\ngetNumber (configFile >> \"ctrlMap\" >> \"ptsPerSquareObj\")\n```"}]}