Label the map

Map labels help to identify features, establish a visual hierarchy of important features, and focus the map user's attention on the purpose of the map.

Overview

  • This video was created with ArcGIS ProArcGIS Pro 3.5.

In this tutorial, you'll label map layers and work with label properties such as size, color, orientation, and placement. Optionally, you'll use the ArcGIS Arcade expression language to create custom label expressions based on feature attributes.

  • Estimated time: 30 minutes
  • Software requirements: ArcGIS Pro Basic
Note:

The quick-start tutorials are updated at each software release. For the best experience, use an online help version that matches your software version.

Open the project

You'll label suburbs in Wellington, New Zealand; historic buildings that lie in a flood risk zone; and local civil defense centers. Adding labels makes it easier for a city planning group to identify important features on the map and make decisions for risk management.

  1. Start ArcGIS Pro and sign in if necessary.
  2. Open a browse dialog box to search for the project in one of the following ways:
    • On the start page, click Open another project .
    • In an open project, click the Project tab on the ribbon. In the list of side tabs, click Open. On the Open page, click Open another project .

    Open another project command

  3. On the Open Project browse dialog box, in the navigation pane, under Portal , click ArcGIS Online .
    Note:

    If you are signed in to ArcGIS Enterprise , you must set your active portal to ArcGIS Online to access the tutorial data. If you can't do this, you can download the data from a browser.

  4. At the top of the dialog box, in the Search box, type Label your map and press the Enter key.
  5. In the list of search results, click Label your map to select the project package.
    Note:

    If there is more than one project package with this name, select the package with the Authoritative badge . In the Owner column, the owner name is ArcGISProTutorials. If you don't get any results, see No search results are returned.

  6. Click OK.

    Light gray basemap displaying Wellington, New Zealand

    The project opens with a light gray basemap centered on Wellington, New Zealand. Boundaries of local neighborhoods and suburbs are drawn in darker gray, and a flood risk zone is shown in light blue. Other layers in the Contents pane are turned off or are not visible at the current map scale (as indicated by a gray check mark).

  7. On the ribbon, click the View tab, and in the Windows group, click Pane Sets , and click Mapping .

    This ensures that the Contents and Catalog panes are open and that other panes are closed.

Label suburbs

The basemap includes a reference layer that labels the local neighborhoods. The reference layer is useful, but doesn't allow you to control the label styling or placement. By labeling the Suburb Boundaries layer instead, you can control the appearance of each suburb's label.

  1. In the Contents pane, right-click the Light Gray Reference layer and click Remove Remove.

    The labels are removed from the map.

  2. In the Contents pane, right-click the Suburb Boundaries layer and click Attribute Table Open Table.

    The attribute table appears. Labels for a layer are based on values in a field of the layer's attribute table. In this case, the Suburb field will be used by default.

    Suburb Boundaries attribute table
  3. Close the attribute table. In the Contents pane, make sure the Suburb Boundaries layer is selected.
  4. On the ribbon, click the Labeling tab. In the Layer group, click Label Enable Labeling.

    The suburbs are labeled with the names you saw in the table. On the ribbon, in the Label Class group, you can see that the labels come from the Suburb field of the layer attribute table.

  5. In the Text Symbol group, expand the Text Symbol Style gallery. Under Scheme 2, click the Landform/Physical Region style.
    Text Symbol Style: Landform/Physical Region
    Depending on the size of your application window, the gallery may be accessed from a Text Symbol Style button on the ribbon.

    The labels update to reflect the new style.

  6. On the Labeling tab, in the Label Placement group, click Land Parcel.
    Land Parcel label placement options

    Some labels disappear. The Land Parcel placement setting suppresses labels that don't fit completely within a feature. This condition changes as you zoom in and out on the map.

    Note:

    ArcGIS Pro has two labeling engines: the default Maplex Label Engine, which is used in this map, and the Standard Label Engine. The Maplex Label Engine has more advanced label placement settings than the Standard Label Engine. To change the label engine setting, on the Labeling tab, in the Map group, click More and uncheck Use Maplex Label Engine.

    Learn more about labeling with the Maplex Label Engine and labeling with the Standard Label Engine

  7. Zoom in and out and pan the map.

    As you zoom in, more features are labeled. As you pan, the labels change position to stay in view.

Set a visibility range for label display

Labels may be more helpful at some scales than others. As you zoom in, labels for regional features grow less important and labels for local features become more important. By choosing the right map scale for label display, you help the map reader focus on the most important features of the map. You'll set a visibility range for the Suburb Boundaries labels so they don't display at very large (close-up) map scales.

  1. On the Labeling tab, in the Visibility Range group, click the input box next to Maximum Scale Maximum scale. Type 1:7,000 in the box and press the Enter key.
    Visibility Range setting
  2. On the ribbon, click the Map tab. In the Navigate group, click Bookmarks Bookmarks and click Te Aro.

    Map zoomed to Te Aro bookmark
    The map scale depends on the size of your map view. At your map scale, the Building Footprints layer may or may not draw.

    The map zooms in to the Te Aro neighborhood. The map scale is displayed in the lower left corner of the map view. Suburb labels are visible when the map scale is smaller (farther away) than 1:7,000. Building footprints appear when the scale is larger (closer) than 1:10,000.

  3. If necessary, on the Map tab, in the Navigate group, click Fixed Zoom In Fixed Zoom In as needed until the suburb labels disappear.
  4. On the Quick Access Toolbar, click Save Project .

Label historic buildings

City planners are concerned about damage to historic buildings in the event of a flood. The Building Footprints layer is already symbolized to show which buildings are historic. You'll zoom in to a small area that lies within the flood risk zone and label the historic buildings with their names. By default, all features in a layer are labeled. To label just the historic buildings, you'll build an SQL query.

  1. On the Map tab, in the Navigate group, click Bookmarks Bookmarks and click Historic Buildings 1.
    View of buildings and flood risk zone
  2. In the Contents pane, right-click the Building Footprints layer and click Label Enable Labeling.
    Tip:

    You can label a layer either from the ribbon or from its context menu.

  3. In the Contents pane, right-click the Building Footprints layer and click Attribute Table Open Table.
  4. In the table, right-click the Historic field name heading and click Sort Descending Sort Descending.
  5. Scroll down through the table and look at some values in the Name field (not the Historic field) for the historic buildings.

    Most of the historic buildings have proper names. Others are called Building, House, or Warehouse.

  6. Close the attribute table.
  7. In the Contents pane, right-click the Building Footprints layer and click Labeling Properties .

    The Label Class pane appears.

    Note:

    By default, labels are grouped in a label class. All labels in a class have the same properties, such as text symbol and placement settings. A layer can have more than one label class. Additional label classes allow you to define different properties for subsets of labels within a layer. To create a label class, on the Labeling tab, in the Label Class group, click the Class drop-down arrow and click Create label class. Alternatively, in the Label Class pane, click Menu Menu and click Create label class.

  8. In the Label Class pane, confirm that the Class tab is selected at the top of the pane. Under it, click the SQL query tab SQL Query.

    Queries are used to filter features and table records of interest. In this case, you'll use the query to label only the historic buildings.

  9. Click New expression.

    The clause builder appears.

  10. In the clause builder, click the drop-down arrow next to Where and click Historic. Ensure the query condition is set to is equal to. Click the drop-down arrow in the empty box and click Yes for the value.

    SQL query clause

    Only table records with the value Yes in the Historic field satisfy the query.

    Tip:

    If you don't see the full text of the expression, you can widen the pane or hover over a parameter to display it as a ScreenTip.

  11. Click Apply at the bottom of the pane.

    On the map, only historic buildings (symbolized in purple) are labeled.

Change label placement settings

By default, all the historic buildings are labeled, even if labels are placed outside the features they belong to. You'll change some label properties and placement settings to make the labels easier to see and to make them fit within the buildings. Some labels will not display at all scales.

  1. In the Label Class pane, click the Position tab at the top of the pane.

    Under Position, click the Position tab Position if necessary.

  2. Expand Placement, if necessary.
  3. Change the Horizontal in polygon setting to Straight in polygon.

    On the map, the labels are oriented to the longest axis of their features. They now fit better within their features.

  4. Uncheck the May place label outside polygon boundary check box.

    Label Class pane with position settings

    Building labels can no longer be placed completely outside their features. However, labels are allowed to extend beyond the boundary of a feature. (You may not see any changes in your current map extent.)

  5. On the ribbon, click the Labeling tab. In the Text Symbol group, change the text symbol font size to 8 pt and the color to Arctic White (row 1, column 1 on the color palette).
    Historic buildings with labels
    Your results may look slightly different.

    The white labels are easier to read. The smaller font size means that more labels fit completely inside the buildings.

  6. Pan around the neighborhood and look at other historic buildings.

    Some buildings have long names and don't fit well within their features, even at this large map scale. You'll place some constraints on how far a label can extend beyond the boundary of its feature.

  7. Near the top of the Label Class pane, click the Fitting strategy tab Fitting strategy.
  8. Expand Overrun and change the Maximum overrun to 5 points. Press the Enter key.
  9. Expand Reduce size and check the Reduce font size check box. Under Font size reduction, change the Lower limit value to 7.5 pts and press the Enter key.
  10. Under Font width compression, change the Lower limit value to 95 percent and press the Enter key.

    Fitting strategy settings on the Label Class pane

    The changes are applied to the map as you make them. Labels are not allowed to overrun their feature boundaries by more than 5 points. Font size and compression are adjusted slightly to make a label fit better. Labels only draw if they fit within a feature using these constraints.

  11. On the ribbon, click the Map tab. In the Navigate group, click Bookmarks Bookmarks and click Historic Buildings 2.

    In this part of the neighborhood, you may see a few historic buildings that are not labeled.

  12. On the ribbon, click the Labeling tab. In the Map group, click View Unplaced View unplaced.

    Unplaced labels are drawn in red on the map.

  13. Click View Unplaced View unplaced again to turn off the display of unplaced labels.
  14. At the bottom of the map view, click the map scale drop-down arrow and click 1:10,000. If the scale isn't present in the list, type 1:10,000 directly in the scale box.

    At this scale—the smallest scale at which the buildings are visible—the overrun setting prevents most or all of the building labels from drawing. However, some labels may still be visible. You want the labels to draw at the scale of city blocks but not at the scale of neighborhoods. You'll set a visibility range to make sure the building labels turn off at a specified scale.

  15. On the ribbon, on the Labeling tab, in the Visibility Range group, click the input box next to Minimum Scale Minimum scale. Type 1:2,500 and press the Enter key.

    Any visible building labels turn off. They display only when the map scale is 1:2,500 or larger.

  16. On the Quick Access Toolbar, click Save Project .

Label civil defense centers

In the event of a flood, civil defense centers—which are typically schools or community centers—are important emergency shelters. You'll label the civil defense centers in the Wellington area.

  1. Click the Map tab and go to the Te Aro bookmark.

    If the buildings are still visible, click Fixed Zoom Out Fixed Zoom Out as needed to zoom out to a scale beyond 1:10,000.

  2. In the Contents pane, turn on the Civil Defence Centres layer.
  3. On the map, click one of the red dots representing civil defense centers.

    The Pop-up pane appears and displays the attributes of the feature you clicked. You'll label the features using the Site Name field.

    Note:

    By default, features are labeled using the first text field in the attribute table that includes the text string Name (not case sensitive) in its field name. If no text fields include this string, the first text field is used. In this map, the Civil Defence Centres layer uses the Site Name field and the Building Footprints layer uses the Name field. The Suburb Boundaries layer uses the Suburb field because no text fields include the Name string. To change the field, click the Labeling tab on the ribbon. In the Label Class group, click the Field drop-down list and choose the field you want.

    Learn more about specifying text for labels

  4. Close the Pop-up pane.
  5. In the Contents pane, right-click the Civil Defence Centres layer and click Label Enable Labeling.

    The labels display on the map. You'll change the symbology.

  6. On the ribbon, click the Labeling tab. In the Text Symbol group, expand the Text Symbol Style gallery. Under Scheme 2, click the Populated Place style.
  7. In the Label Class pane, click the Position tab in the top row of tabs if necessary. Click the Position tab Position under it and expand Placement.
    Tip:

    If the Label Class pane is not open, right-click the Civil Defence Centres layer in the Contents pane and click Labeling Properties .

  8. Change the placement from Best position to Bottom of point.

    The label is placed under the feature.

  9. Change the placement back to Best position.

    The Best position placement usually puts the label above and slightly to the right of the point. It uses other positions as needed to avoid conflicts with other labels or features.

    Map of Te Aro
  10. On the Quick Access Toolbar, click Save Project .

Customize labels with Arcade

Optionally, you can add more information to the civil defense center labels with a label expression. You'll use the Esri expression language, Arcade, to display the number of people each center can hold and to customize the label's appearance.

  1. On the map, click a civil defense center feature.

    The Pop-up pane appears. The Capacity field contains the maximum number of people the center can hold. For each label, you'll add the word Capacity and the corresponding value from the Capacity field.

  2. Close the Pop-up pane.
  3. In the Label Class pane, click the Class tab. Click the Label expression tab Label expression under it.
  4. If necessary, click the Language drop-down arrow and click Arcade.

    In the Expression box, the first part of the expression, $feature.site_name, appears by default. This labels each feature with its value in the Site Name field. You'll put the word Capacity on a new line followed by the value from the Capacity field.

  5. Copy the expression below. In the Expression box, delete the current expression and paste the new expression.

    $feature.site_name + TextFormatting.NewLine + "Capacity: " + $feature.Capacity

    TextFormatting.NewLine starts a new line below the site name. "Capacity: " is added as text on the new line and $feature.Capacity adds the capacity value for each site.

  6. At the bottom of the pane, click Apply. Pan the map to view labels in different suburbs.
    Arcade label expression displaying capacity

    The site name and capacity both display with the same font size. You'll use a font tag to make the second line of the expression smaller.

  7. Copy the expression below. In the Expression box, delete the current expression and paste the new expression.
    $feature.site_name + TextFormatting.NewLine + "<FNT name= 'Arial' size= '9'>" + "Capacity: " + $feature.Capacity + "</FNT>"

    Everything between the opening and closing font tags will display in 9 point Arial font.

    Final label expression

  8. Click Apply.
    Modified Arcade label expression
    Note:

    Some labels may appear on three lines because of a default stacking setting. To change the setting, in the Label Class pane, click the Position tab, click the Fitting strategy tab , and uncheck the Prefer to stack long labels check box.

    Learn more about label stacking

  9. On the ribbon, on the Labeling tab, in the Map group, click the More drop-down arrow and click Summary Label Summary.

    Labeling Summary dialog box

    For each label class in each map layer, the Labeling Summary dialog box reports settings such as scale ranges, SQL queries, advanced expressions, and fonts. Any issues that prevent labels from displaying properly or that affect label drawing performance are shown in red text. In this case, there are no problems.

    Learn more about the Labeling Summary report

  10. Click Close on the Labeling Summary dialog box.
  11. On the Quick Access Toolbar, click Save Project .

In this tutorial, you labeled three map layers and explored a number of labeling techniques. You applied text symbols, and changed label color, size, and placement. You used fitting strategies to make labels fit inside polygon features. You controlled label display with visibility ranges and SQL expressions. Finally, you customized labels with an Arcade expression.

To learn more advanced labeling techniques, such as how to convert labels to annotation, try the Map text in ArcGIS Pro tutorial series.

Related topics