---
title: "How to show labels on map features"
description: "Show a field's value as text on each point, line, or polygon, and set its colour, size, halo, and position. Label changes save as soon as you make them."
sidebar:
  label: "Show feature labels"
---

Pick a field in the layer's `Labels` tab, and each feature shows that field's value as text on the map. Label changes save as soon as you make them: unlike the `Style` tab, the `Labels` tab has no `Save` button.

**[See it on an example map](https://mangomap-staging.com/examples-staging/maps/cfxgj3l4/singapore-point-styling-lab)**

Open the Singapore Point Styling Lab. In the legend, turn on the `Labels` folder and turn off `Icons by Category`. `Sites — Labelled` shows each site's name above its point, with a white halo.

{/* video-content: id=show-feature-labels
Start: A fully loaded map with the Labels tab open for a point layer. Source
attribute is No labels, and the map shows the points with no labels.

Show:

1. Open Source attribute and pick the layer's name field. Labels appear on the
   map at once.
2. Open the font size dropdown and pick 16px. The labels grow on the map.
3. Click More label options and turn on Allow label overlap. Labels that were
   hidden by collisions appear.

End: The map with every visible point labelled at 16px.

Exclude: Authentication, loading screens, fixture setup, the text colour
picker, halo and Label anchor settings, and the Style tab. Label changes save
at once, so the spec must set Source attribute back to No labels after capture,
outside the recording.
*/}
{/* walkthrough: id=show-feature-labels */}
<video
  src="/_assets/walkthroughs/show-feature-labels.webm"
  controls muted playsInline width="960">
  <track kind="captions" src="/_assets/walkthroughs/show-feature-labels.vtt" srclang="en" default />
</video>

{/* /walkthrough */}

## Before you start

- You need edit access to the map.
- The layer must be a point, line, or polygon layer. Raster and WMS layers have no `Labels` tab.
- Choose a field with short values, such as a name or a code. Long text crowds the map.

## Where labels go

The steps are the same for every geometry, but each geometry places its labels differently:

| | Point | Line | Polygon |
| --- | --- | --- | --- |
| Where the label sits | Next to the point | Along the line, following its bends | At the spot inside the polygon that is farthest from its edges |
| `Label anchor` | Sets which side of the point the label is on | Has no effect | Sets which part of the label sits on that inside spot |
| How often | Once per point | Repeats along long lines. A line shorter than its label has no label. | Once per polygon. A polygon with several parts, such as a country with islands, can get a label on each part. |

## Open the Labels tab

In the layer panel, click the layer name to open its settings. Then open the `Labels` tab.

## Pick the field to show

Open `Source attribute` and pick a field. The list shows the dataset's field names.

The labels appear on the map at once. A feature with an empty value in the field has no label.

**Point**

<img src="/_assets/styling-layers/show-feature-labels--labels-tab.png" alt="Labels section of the Country Centroids layer with Source attribute set to name, a black text colour swatch, the font size dropdown at 14px, and More label options; country names show as labels on the map" width="1600" height="960" />

**Line**

<img src="/_assets/styling-layers/show-feature-labels--labels-tab-line.png" alt="Labels section of the Roads — Uniform layer with Source attribute set to name, a black text colour swatch, the font size dropdown at 14px, and More label options; road names run along the roads on the map" width="1600" height="960" />

**Polygon**

<img src="/_assets/styling-layers/show-feature-labels--labels-tab-polygon.png" alt="Labels section of the Countries — Income Group layer with Source attribute set to name, a black text colour swatch, the font size dropdown at 14px, and More label options; country names show inside the countries on the map" width="1600" height="960" />

## Set the text colour and size

1. Click the text colour swatch and pick a colour. Use the picker's transparency control to fade the labels.
2. Open the font size dropdown and pick a size from 10px to 32px.

## (Optional) Set the halo, position, and overlap

Click `More label options` to show these settings:

<img src="/_assets/styling-layers/show-feature-labels--more-options.png" alt="Labels section of the Country Centroids layer with More label options open, showing the Allow label overlap checkbox, the halo colour swatch and Halo width slider, and the Label anchor dropdown at Bottom" width="1600" height="960" />

- **`Allow label overlap`** — off by default. While it's off, MangoMap hides labels that would collide with other labels. Turn it on to show every label, even where they overlap.
- **Halo colour and width** — the halo is an outline around the text that keeps it readable on busy backgrounds. The width runs from 0 to 5 px. Set it to 0 to remove the halo.
- **`Label anchor`** — the part of the label that sits on the feature. With `Bottom`, the default, a point's label sits above the point, and a polygon's label sits just above the polygon's inside spot. Pick `Center` to centre a polygon's label on that spot. Line labels ignore it (see [Where labels go](#where-labels-go)).

## Check the labels

Pan and zoom the map. A label shows only when:

- the feature has a value in the field,
- the layer's style draws the feature, and
- the map is inside the layer's `Visibility` zoom range.

Point labels with a halo, as viewers see them:

<img src="/_assets/styling-layers/show-feature-labels--sites-map.png" alt="Singapore Point Styling Lab as a viewer sees it with Sites — Labelled on: navy circles for 30 landmarks, each with its name in dark blue text with a white halo above the point, and the legend entry Sites — Labelled" width="1600" height="960" />

Features in a hidden category have no label. With a quantity or size style, features with no value in the styled field also have no label. For the zoom range, see [How to set the zoom range a layer is visible at](/docs/styling-layers/set-layer-zoom-visibility).

## Turn labels off

Open `Source attribute` and pick `No labels`. The labels disappear from the map.

## Troubleshooting

**Some features have no label.** The feature's value is empty, or its category is hidden in the `Style` tab. With `Allow label overlap` off, crowded labels are also hidden: zoom in, or turn the option on.

**Short lines have no label.** A line label shows only where the line is longer than the text and has no sharp bend under it. Zoom in, or pick a smaller font size.

**A label shows `1500.5`, not `1,500.50`.** Labels show the raw field value. Settings on the `Format` tab don't apply to labels.

**Labels disappear when I zoom out.** The map is outside the layer's `Visibility` zoom range. Labels follow the same range as the layer.

**`Label anchor` does nothing.** The layer is a line layer. Line labels always run along the line.

**The layer has no `Labels` tab.** Raster and WMS layers can't show labels.

## Related

- [Label settings](/docs/styling-layers/label-settings-reference) — every label setting and its choices.
- [How to set the zoom range a layer is visible at](/docs/styling-layers/set-layer-zoom-visibility)
- [How to style features by category](/docs/styling-layers/style-by-category) — hidden categories hide their labels too.
- [How attribute formatting works in MangoMap](/docs/formatting-attributes/concepts-attribute-formatting) — formatting changes popups, not labels.
- [Layer panel controls](/docs/managing-layers/layer-panel-reference)
