Difference between revisions of "BIS fnc zoomOnArea"

From Bohemia Interactive Community
Jump to navigation Jump to search
(Created page with "{{Function|= Comments | arma3 |Game name= |1.78|Game version= <!---|arg= local |Multiplayer Arguments=---> <!---|eff= local |Multiplayer Effects=---> | <pre>/* Author: Z...")
 
m (page filled)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Function|= Comments
+
{{Function
  
| arma3 |Game name=
+
|game1= arma3
  
|1.78|Game version=
+
|version1= 1.78
  
<!---|arg= local |Multiplayer Arguments=--->
+
<!--|serverExec= server-->
  
<!---|eff= local |Multiplayer Effects=--->
+
<!--|arg= local-->
  
| <pre>/*
+
<!--|eff= local-->
Author: ZoZo
 
  
Description:
+
|descr= Map will zoom on the given area. Function always takes the longer side of the area to zoom on.
  Map will zoom on the given area. Function always takes the longer side of the area to zoom on.
 
  
Parameters:
+
|s1= [area, center, time, handler, forceCam] [[call]] [[BIS_fnc_zoomOnArea]]
Select 0 - ARRAY: Area to zoom on
 
Select 1 - ARRAY: Coordinates of the center
 
Select 2 - (OPTIONAL) - NUMBER: time of the zoom operation. Default is 1
 
Select 3 - (OPTIONAL) - CONTROL: handler to the map display control (you can pass one if already exists, if not, handler is created)
 
Select 4 - (OPTIONAL) - BOOL: whether we have to force the camera in position after the zoom.
 
  
Returns:
+
|p1= area: [[Array]] - Area to zoom on
Amount of zoom (can be used for the check if the zoom operation is already done)
 
  
Examples:
+
|p2= center: [[Array]] - Coordinates of the center
_xHandle = [markerSize "BIS_areaMarker", markerPos "BIS_areaMarker", 5] call BIS_fnc_zoomOnArea //zoom on the area given by the marker in 5 seconds.
 
_xHandle = [markerSize "BIS_areaMarker", markerPos "BIS_areaMarker"] call BIS_fnc_zoomOnArea //zoom on the area given by the marker in default 1 second.
 
BIS_mapDisplay = (findDisplay 12 displayCtrl 51); ... ; _xHandle = [markerSize "BIS_areaMarker", markerPos "BIS_areaMarker", 2, BIS_mapDisplay] call BIS_fnc_zoomOnArea //zoom on the area given by the marker in default 2 seconds.
 
*/</pre>{{Informative|Placeholder description extracted from the function header by [[BIS_fnc_exportFunctionsToWiki]]}} |Description=
 
  
|[] call [[BIS_fnc_zoomOnArea]]|Syntax=
+
|p3= time: [[Number]] - (Optional, default 1) Time of the zoom operation
  
|p1= parameter: Datatype - (Optional, default defValue) description |Parameter 1=
+
|p4= handler: [[Control]] - (Optional, default [[nil]]) Handler to the map display control (you can pass one if already exists, if not, handler is created)
  
|Datatype - description|Return value=
+
|p5= forceCam: [[Boolean]] - (Optional, default [[false]]) Whether to force the camera in position after the zoom.
  
|x1= <code></code>|Example 1=
+
|r1= [[Number]] - Zoom level
  
|exec= call |Execution=
+
|x1= <code>[[openMap]] [[true]]; <nowiki>[</nowiki>[[markerSize]] "BIS_areaMarker", [[markerPos]] "BIS_areaMarker", 5] [[call]] [[BIS_fnc_zoomOnArea]];</code>
 +
 
 +
|exec= call
 +
 
 +
|seealso= [[BIS_fnc_zoomLock]] [[BIS_fnc_zoomUnlock]]
  
| |See also=
 
 
}}
 
}}
  

Latest revision as of 11:35, 20 July 2020

Introduced with Arma 3 version 1.781.78
Hover & click on the images for descriptions

Description

Description:
Map will zoom on the given area. Function always takes the longer side of the area to zoom on.

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

Execution:
call
See also:
BIS_fnc_zoomLock BIS_fnc_zoomUnlock

Notes

i
Only post proven facts here. Report bugs on the Feedback Tracker and discuss on the Arma Discord or on the Forums.