# Moving, resizing and squaring the FiveM minimap

> Move, resize or square the FiveM minimap with SetMinimapComponentPosition, then read its exact rectangle so your HUD can sit flush against the radar.

Source: https://fam-tools.com/guides/fivem-minimap-position-hud-anchor · FAM Tools · published 2026-09-11 · updated 2026-09-11 · about 13 min

**Short answer.** The minimap is made of scaleform components (`minimap`, `minimap_mask`, `minimap_blur`) that can be moved and resized with `SetMinimapComponentPosition(name, alignX, alignY, posX, posY, sizeX, sizeY)` followed by a reload of the minimap. To place HUD elements beside it, compute its rectangle from the safe-zone size and aspect ratio — the widely used “GetMinimapAnchor” function does exactly that.

## Key points

- The minimap position depends on **resolution, aspect ratio and the safe-zone setting**.
- `SetMinimapComponentPosition` moves/resizes the components; reload the minimap to apply it.
- A square minimap needs a square mask texture, not just new sizes.
- Place HUD elements from a computed anchor rather than fixed pixel offsets.

`SetMinimapComponentPosition` is the native that moves and resizes the FiveM minimap, and it is also how servers square it off. The other half of the job is reading where the minimap already sits: a custom HUD almost always wants health bars, a speedometer or street names right beside it, which only works if you know its exact rectangle on every screen. Both are fiddly, and both depend on the player's resolution and safe-zone setting.

## What the minimap is made of

| Component | Role |
| --- | --- |
| `minimap` | The map itself |
| `minimap_mask` | The shape that clips the map (rounded rectangle by default) |
| `minimap_blur` | The soft background behind it |

Each component has an alignment (left/right/top/bottom), a position and a size in screen-relative units (0–1). Change them together or the map, mask and blur drift apart.

## Moving and resizing

*client.lua — a slightly larger minimap*

```lua
CreateThread(function()
    -- alignX 'L' = left, alignY 'B' = bottom; then posX, posY, sizeX, sizeY
    SetMinimapComponentPosition('minimap', 'L', 'B', -0.0045, -0.022, 0.160, 0.190)
    SetMinimapComponentPosition('minimap_mask', 'L', 'B', 0.020, 0.032, 0.111, 0.159)
    SetMinimapComponentPosition('minimap_blur', 'L', 'B', -0.03, 0.002, 0.266, 0.237)

    -- Re-initialise so the new layout is used
    SetBigmapActive(true, false)
    Wait(0)
    SetBigmapActive(false, false)
end)
```

The exact numbers depend on the look you want; the values above are a starting point, not a standard. Change one component at a time, reload, and compare in game at 16:9 and at your ultrawide or 16:10 test resolution.

> **Reload after changing** — The minimap reads its layout when it initialises. Toggling the big map on and off, as above, is the common way to force it to rebuild with the new values.

## Square minimaps

Resizing alone does not make the minimap square — the mask is a texture with rounded corners. Square-minimap resources stream a replacement mask texture (a square instead of the rounded shape) and then set the component sizes so the map fills it. If you only change sizes, you get a stretched rounded rectangle.

A square minimap pairs well with a clean custom texture, because the extra corners show more map. Our maps work with round and square layouts alike; [installing a custom minimap](https://fam-tools.com/guides/install-fivem-minimap) covers load order when a HUD also touches the minimap.

## Finding the minimap’s exact rectangle for a HUD

Most HUD resources contain a version of a function commonly called `GetMinimapAnchor`. It computes the minimap’s rectangle from the safe-zone size and the screen’s aspect ratio, so HUD elements can be drawn in the same place on every resolution. The idea:

*client.lua — the classic minimap anchor calculation*

```lua
function GetMinimapAnchor()
    local safezone = GetSafeZoneSize()
    local sx, sy = 1.0 / 20.0, 1.0 / 20.0
    local aspect = GetAspectRatio(false)
    local resX, resY = GetActiveScreenResolution()
    local xscale = 1.0 / resX
    local yscale = 1.0 / resY

    local mm = {}
    mm.width  = xscale * (resX / (4 * aspect))
    mm.height = yscale * (resY / 5.674)
    mm.left_x = xscale * (resX * (sx * (math.abs(safezone - 1.0) * 10)))
    mm.bottom_y = 1.0 - yscale * (resY * (sy * (math.abs(safezone - 1.0) * 10)))
    mm.right_x = mm.left_x + mm.width
    mm.top_y = mm.bottom_y - mm.height
    return mm -- all values in 0-1 screen space
end
```

The result is in 0–1 screen space: multiply by the resolution for pixels, or use it directly with the game’s draw natives. For an NUI HUD, send the values to the page and position elements with percentages. Recalculate when the resolution or safe-zone setting changes, and note that the result describes the **default** layout — if you move the minimap, offset the anchor by the same amounts.

## The safe-zone setting

Players can shrink the HUD area in the game’s display settings (“Safe Zone Size”), which pulls the minimap inwards from the screen edges. That is why a HUD built with fixed pixel offsets lines up on your PC and floats in space on someone else’s. Always read `GetSafeZoneSize()`.

## Questions

### How do I move the minimap in FiveM?

Use `SetMinimapComponentPosition` for the `minimap`, `minimap_mask` and `minimap_blur` components, then toggle the big map on and off so the minimap rebuilds with the new layout.

### How do I make a square minimap?

Stream a square mask texture to replace the rounded one and resize the components to match. Resizing alone leaves rounded corners.

### Why does my HUD not line up with the minimap on other screens?

It uses fixed pixel offsets. Compute the minimap position from the safe-zone size and aspect ratio (a GetMinimapAnchor function) and place elements relative to it.

### Does moving the minimap affect custom minimap textures?

No. The texture is what is drawn; the component position is where it is drawn. Any texture works with any layout.

## Related

- https://fam-tools.com/guides/fivem-round-minimap
- https://fam-tools.com/guides/fivem-radar-zoom-settings
- https://fam-tools.com/guides/fivem-hide-minimap-radar
- https://fam-tools.com/guides/install-fivem-minimap
- https://fam-tools.com/guides/minimap-technical-specification
