BIS fnc zoomOnArea: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - " *\| *([Cc]omments|COMMENTS|Game|[Gg]ame [Nn]ame|Game [Vv]ersion|Game Version \(number surrounded by NO SPACES\)|Arguments in MP|Multiplayer Arguments( \("local" or "global"\))?|Effects|Execution|Effects? in MP|Multiplayer Effects(...)
m (Some wiki formatting)
 
(17 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Function
{{RV|type=function


|game1= arma3
|game1= arma3
|version1= 1.78
|version1= 1.78


<!--|serverExec= server-->
|gr1= Map and Markers
 
<!--|arg= local-->
 
<!--|eff= local-->
 
|gr1 = Map and Markers


|descr= Map will zoom on the given area. Function always takes the longer side of the area to zoom on.
|descr= Map will zoom on the given area. Function always takes the longer side of the area to zoom on.


|s1= [area, center, time, handler, forceCam] [[call]] [[BIS_fnc_zoomOnArea]]
|s1= [area, center, time, handler, forceCam] call [[BIS_fnc_zoomOnArea]]
 
|p1= area: [[Array]] - Area to zoom on


|p2= center: [[Array]] - Coordinates of the center
|p1= area: [[Array]] - area to zoom on


|p3= time: [[Number]] - (Optional, default 1) Time of the zoom operation
|p2= center: [[Array]] - coordinates of the center


|p4= handler: [[Control]] - (Optional, default [[nil]]) Handler to the map display control (you can pass one if already exists, if not, handler is created)
|p3= time: [[Number]] - (Optional, default 1) time of the zoom operation


|p5= forceCam: [[Boolean]] - (Optional, default [[false]]) Whether to force the camera in position after the zoom.
|p4= handler: [[Control]] - (Optional, default [[nil]]) handler to the map display control (you can pass one if already exists, if not, handler is created)


|r1= [[Number]] - Zoom level
|p5= forceCam: [[Boolean]] - (Optional, default [[false]]) whether to force the camera in position after the zoom.


|x1= <code>[[openMap]] [[true]]; <nowiki>[</nowiki>[[markerSize]] "BIS_areaMarker", [[markerPos]] "BIS_areaMarker", 5] [[call]] [[BIS_fnc_zoomOnArea]];</code>
|r1= [[Number]] - zoom level


|exec= call
|x1= <sqf>
openMap true;
[markerSize "BIS_areaMarker", markerPos "BIS_areaMarker", 5] call BIS_fnc_zoomOnArea;
</sqf>


|seealso= [[BIS_fnc_zoomLock]] [[BIS_fnc_zoomUnlock]]
|seealso= [[BIS_fnc_zoomLock]] [[BIS_fnc_zoomUnlock]]
}}
}}
[[Category:Functions|{{uc:zoomOnArea}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:zoomOnArea}}]]

Latest revision as of 22:47, 31 May 2022

Hover & click on the images for description

Description

Description:
Map will zoom on the given area. Function always takes the longer side of the area to zoom on.
Execution:
call
Groups:
Map and Markers

Syntax

Syntax:
[area, center, time, handler, forceCam] call BIS_fnc_zoomOnArea
Parameters:
area: Array - area to zoom on
center: Array - coordinates of the center
time: Number - (Optional, default 1) time of the zoom operation
handler: Control - (Optional, default nil) handler to the map display control (you can pass one if already exists, if not, handler is created)
forceCam: Boolean - (Optional, default false) whether to force the camera in position after the zoom.
Return Value:
Number - zoom level

Examples

Example 1:
openMap true; [markerSize "BIS_areaMarker", markerPos "BIS_areaMarker", 5] call BIS_fnc_zoomOnArea;

Additional Information

See also:
BIS_fnc_zoomLock BIS_fnc_zoomUnlock

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note