---
name: "markerPos"
type: command
status: ok
groups: ["Markers"]
arma3_since: "0.50"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/markerPos
revid: 379366
updated: 2026-10-30T23:56:56Z
---

# markerPos

*Command · Markers · Arma 3 v0.50 · introduced in Operation Flashpoint v1.46*

Alias: [getMarkerPos](../commands/getMarkerPos.md)

## Description

Returns marker position. See also [setMarkerPos](../commands/setMarkerPos.md).

## Syntax

### Syntax 1

```sqf
markerPos markerName
```

**Parameters:**

- `markerName`: [String](../topics/String.md)

**Returns:** [PositionAGL](../topics/Position.md#positionagl) - [x, y, **0**], z is always 0

### Syntax 2

*since arma3 1.94*

```sqf
markerPos [markerName, preserveElevation]
```

**Parameters:**

- `markerName`: [String](../topics/String.md)
- `preserveElevation`: [Boolean](../topics/Boolean.md) - (Optional, default [false](../commands/false.md))

**Returns:** [PositionAGL](../topics/Position.md#positionagl) - if *preserveElevation* is [true](../commands/true.md) or [x, y, **0**] if *preserveElevation* is [false](../commands/false.md)

## Examples

### Example 1

```sqf
_mPos1 = markerPos "markerOne";
```

### Example 2

```sqf
_mPos2 = markerPos ["markerTwo", true];
```

## See also

[setMarkerPos](../commands/setMarkerPos.md) · [setMarkerPosLocal](../commands/setMarkerPosLocal.md)

## Community notes

**Demellion** — 2016-09-01

To accomplish getting the altitude of a marker before the alternative syntax introduced in A3 v1.93, you can do a workaround using [setMarkerDir](../commands/setMarkerDir.md) as it accepts any number (above 360 or below -360):

```sqf
"myMarker" setMarkerPos [200, 200];
"myMarker" setMarkerDir 1640;
```

After, setting player position as an example:

```sqf
player setPosASL [(markerPos "myMarker") select 0, (markerPos "myMarker") select 1, (markerDir "myMarker")]
```

<sub>Source: [BI Community Wiki — markerPos](https://community.bistudio.com/wiki/markerPos) (revision 379366).</sub>
