Label your map

Overview

  • Video length: 3:27
  • This video was created with ArcGIS Pro 2.5.

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.

  • Estimated time: 25 minutes
  • Software requirements: ArcGIS Pro
Note:

The tutorial steps in the online help reflect the look and capabilities of the current software release. If you have an earlier software version, use the offline help system to open the tutorial. To switch from the online to the offline help system, see Set the help source in the topic About ArcGIS Pro help. If you don't have ArcGIS Pro, you can sign up for an ArcGIS Pro free trial.

Open the project

In this tutorial, you'll label suburbs in Wellington, New Zealand; historic buildings that lie in a flood risk zone; and local civil defense centers nearby. 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. On the start page, under your recent projects, click Open another project.
    Note:

    If you already have a project open, click the Project tab on the ribbon. In the list of menu items on the left, click Open. On the Open page, click Portal and click Open another project at the bottom of the page.

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

    If you see ArcGIS Enterprise ArcGIS Enterprise listed instead, you must set your active portal to ArcGIS Online or download the tutorial data from a browser. Learn more about how to access the quick-start tutorials.

  4. At the top of the dialog box, in the Search box, type Label your map tutorial and press Enter.
  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, look at the Owner column. Select the item with the owner name ArcGISProTutorials. If no search results are returned, see Access the quick-start tutorials.

  6. Click OK.

    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 (indicated by a gray checkmark).

    Light gray basemap displaying Wellington, New Zealand.

    By default, project packages are unpacked to your <User Documents>\ArcGIS\Packages folder. You can change the default location in the Share and download options.

  7. On the ribbon, click the View tab. In the Windows group, click Reset Panes Reset Panes and click Reset Panes for Mapping (Default).

    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 notable features. However, the Suburb Boundaries layer has more information about the area and will allow you to control the appearance of each suburb's label.

You'll label the Suburb Boundaries layer so the suburb names display on the map. Labels for a layer are based on values in the layer's attribute table. Before you turn on labeling, you'll remove the reference layer.

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

    The default reference labels for the basemap are removed.

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

    The attribute table opens. The Suburb field contains the values that will be used to label the suburbs.

    Suburb Boundaries attribute table.
  3. Close the attribute table.
  4. In the Contents pane, right-click the Suburb Boundaries layer and click Label Enable Labeling.

    The suburbs are labeled with the names you saw in the table. On the ribbon, the Feature Layer contextual tab set appears.

  5. Under Feature Layer, click the Labeling tab. 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.

    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 of the labels disappear. The Land Parcel placement setting suppresses labels that don't fit completely within their 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 the More button More and uncheck Use Maplex Labeling 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 your 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 In Beyond Maximum Scale. Type 1:7,000 in the box and press Enter.
    Visibility Range setting
  2. On the ribbon, click the Map tab. In the Navigate group, click Bookmarks Bookmarks and click Te Aro.

    The map zooms in to the Te Aro neighborhood. Whether or not you see the labels depends on whether your map scale is larger (closer) than 1:7,000. The map scale is displayed in the lower left corner of the map view.

  3. If necessary, on the Map tab, in the Navigate group, click the Fixed Zoom In button Fixed Zoom In as needed until the labels disappear.

    When you zoom in closer than 1:10,000, the Building Footprints layer displays.

  4. On the Quick Access Toolbar, click the Save button Save to save the project.

Label historic buildings

City planners may be 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 the 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, click the Building Footprints layer to select it. On the ribbon, under Feature Layer, click the Labeling tab.
  3. On the Labeling tab, in the Layer group, click Label Enable Labeling.

    The buildings are labeled. On the ribbon, in the Label Class group, you can see that the labels come from the Name field of the layer attribute table.

    Tip:

    As you have seen with the Suburb Boundaries and Building Footprints layers, you can label a layer either from its context menu or from the ribbon.

  4. In the Contents pane, right-click the Building Footprints layer and click Attribute Table Open Table.
  5. In the table, right-click the Historic field name heading and click Sort Descending Sort Descending.
  6. 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.

  7. Close the attribute table.
  8. In the Contents pane, right-click the Building Footprints layer and click Labeling Properties 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, click the Menu button Menu on the Label Class pane.

  9. 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. Other buildings will not be labeled.

  10. In the Label Class pane, click New expression.

    The clause builder appears.

  11. In the clause builder, click the drop-down arrow next to OBJECTID and click Historic. Make sure 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
    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.
  12. Click Apply at the bottom of the pane.

    On the map, only the 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 of the 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.
  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 are no longer placed completely outside their features. However, labels are allowed to extend beyond the boundary of a feature. (You may not see any changes in the area of the map you're zoomed to.)

  5. On the ribbon, on the Labeling tab, in the Text Symbol group, change the text symbol font size to 8 and the color to Arctic White.
    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 some other historic buildings.

    Some buildings have long names and don't fit well within their features, even at this large scale. You'll place some constraints on how far a label is allowed to 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 Enter.
  9. Expand Reduce size and check the Reduce font size check box. Under Font size reduction, change the Lower limit to 7.5 pts and press Enter.
  10. Under Font width compression, change the Lower limit to 95% and press Enter.

    The changes are applied to the map as you make them. Labels are now allowed to overrun their feature boundaries by no more than 5 points. Font size and compression will be adjusted slightly to make a label fit better. Labels will not be drawn if they don't fit within a feature under 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 some historic buildings that aren't labeled.

  12. On the ribbon, under Feature Layer, 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.

    The Maplex Label Engine has many fitting strategies to help you place labels within features. For more information, see Why use additional strategies for placing 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), your overrun setting prevents most or all of the building labels from drawing. However, it's possible that some labels are visible. You'll set a visibility range to make sure all the labels turn off when you zoom out. You want the labels to draw at the scale of city blocks but not at the scale of neighborhoods.

  15. On the ribbon, under Feature Layer, click the Labeling tab. In the Visibility Range group, click the input box next to Out Beyond Minimum Scale. Type 1:2,500 and press Enter.

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

  16. On the Quick Access Toolbar, click the Save button Save to save the project.

Label civil defense centers

In the event of a flood, civil defense centers—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 the Te Aro bookmark.

    The buildings should no longer be visible. If they are visible, click the Fixed Zoom Out button 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. The labels for the civil defense centers are based on the Site Name attribute.

  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, but might look better with different symbology.

  6. On the ribbon, under Feature Layer, 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 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 the Save button Save.

Customize labels with Arcade (optional)

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

  1. Right-click the Civil Defence Centres layer and click Attribute Table Open Table.

    The Capacity field contains the maximum number of people each center can hold. For each civil defense center label, you'll add the word "Capacity" and the corresponding value from the Capacity field.

  2. Close the attribute table.
  3. On 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.

    You will specify the text for the label in the Expression box. Since you have already labeled the civil defense centers, the site names are included in the Arcade expression as $feature.site_name. You'll add text and the Capacity field to the label as a new line under the site names.

  5. Copy the text below. In the Expression box, paste the text at the end of the existing expression.

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

    TextFormatting.NewLine creates a new line below the site name labels. "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. Optionally pan the map to view labels in other suburbs.
    Arcade label expression displaying capacity

    The site name and capacity text both display with the same font size. To make the civil defense center name stand out, you'll decrease the size of the capacity text. By adding a font tag, you can specify the font and size of the text.

  7. Copy the text below. In the Expression box, paste the text after TextFormatting.NewLine + and before "Capacity: ".
    "<FNT name= 'Arial' size= '9'>" +
  8. In the Expression box, at the end of the expression, type (or copy and paste) the closing font tag.
    + "</FNT>"

    Everything between the opening and closing font tags will display with Arial font and size 9 text.

    Final label expression

  9. Click Apply.
    Modified arcade label expression

    For more information about using Arcade for labeling, see Specify text for labels.

  10. On the Quick Access Toolbar, click the Save button Save to save the project.

You have labeled three layers on your map. You can keep experimenting with label properties to make improvements. For example, you can change the text color or halo size of the Suburb Boundaries layer to make its labels stand out more distinctly against the basemap. You can use different text symbols and fonts for the labels in any of your layers.

Related topics