---
name: "BIS_fnc_zoomOnArea"
type: function
status: ok
groups: ["Map and Markers"]
arma3_since: "1.78"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/BIS_fnc_zoomOnArea
revid: 322348
updated: 2022-05-31T21:47:12Z
---

# BIS_fnc_zoomOnArea

*Function · Map and Markers · Arma 3 v1.78*

## Description

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

## Syntax

```sqf
[area, center, time, handler, forceCam] call BIS_fnc_zoomOnArea
```

**Parameters:**

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

**Returns:** [Number](../topics/Number.md) - zoom level

## Examples

### Example 1

```sqf
openMap true;
[markerSize "BIS_areaMarker", markerPos "BIS_areaMarker", 5] call BIS_fnc_zoomOnArea;
```

## See also

[BIS_fnc_zoomLock](../functions/BIS_fnc_zoomLock.md) · [BIS_fnc_zoomUnlock](../functions/BIS_fnc_zoomUnlock.md)

<sub>Source: [BI Community Wiki — BIS fnc zoomOnArea](https://community.bistudio.com/wiki/BIS_fnc_zoomOnArea) (revision 322348).</sub>
