---
name: "allMapMarkers"
type: command
status: ok
groups: ["Markers"]
arma3_since: "0.50"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/allMapMarkers
revid: 352645
updated: 2024-02-17T18:05:11Z
---

# allMapMarkers

*Command · Markers · Arma 3 v0.50*

## Description

Returns all map marker names, including user-placed markers.

> [!NOTE]
> - Arma 3 v1.58 User-defined markers have the following name format: `_USER_DEFINED #<PlayerID>/<MarkerID>/<ChannelID>`, where:
>   - <PlayerID> - unique network id of the player in [String](../topics/String.md) format, also available as [String](../topics/String.md) in the 6th param in ["PlayerConnected"](../topics/Mission_Event_Handlers.md#playerconnected) and ["PlayerDisconnected"](../topics/Mission_Event_Handlers.md#playerdisconnected) Event Handlers
>   - <MarkerID> - an incrementing marker counter id
>   - <ChannelID> - id of the chat channel in which the marker was placed (see [currentChannel](../commands/currentChannel.md))
> - To obtain the custom waypoint's (set with <kbd>LShift</kbd>+<kbd>LMB</kbd>) position, see [customWaypointPosition](../commands/customWaypointPosition.md).

## Syntax

```sqf
allMapMarkers
```

**Returns:** [Array](../topics/Array.md) of [String](../topics/String.md)s

## Examples

### Example 1

```sqf
_markers = allMapMarkers; // returns e.g ["marker1", "_USER_DEFINED #2/0"]
```

### Example 2

```sqf
{
    private "_a";
    _a = toArray _x;
    _a resize 15;
    if (toString _a == "_USER_DEFINED #") then
    // or if (_x select [0, 15] == "_USER_DEFINED #") since Arma 3 v1.28
    {
        deleteMarker _x;
    };
} forEach allMapMarkers;
```

### Example 3

```sqf
if (_someString in allMapMarkers) then
{
    hint (_someString + " is an existing marker");
};
```

## See also

[createMarker](../commands/createMarker.md) · [deleteMarker](../commands/deleteMarker.md) · [customWaypointPosition](../commands/customWaypointPosition.md)

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