Maplex: Leader lines and labels for small polygons

By Charlie Frye, Esri Chief Cartographer

Click to see larger image showing the use of leader lines for labels

Whether you’re labeling soils, buildings, geologic units, lakes, or parks; you’ll eventually be faced with the problem of the text for the label being larger than the polygon you’re labeling. In most cases we recommend offsetting the labels from the small polygons and using leader lines to positively associate the label with its feature. The general idea is to split up the labeling of a layer into at least two label classes, one for the normal case, and one for the small features.

Maplex - Figure 1
The first task is determining features are small. I usually start by labeling my map as though usual and then carefully inspect the map. For instance the map on the right [click any of the maps to see a larger image] doesn’t appear, at first glance, to be poorly labeled. However, a second glance will show that some of the small polygons did not get labeled. This map on the right was labeled with Maplex, in best mode, and the labels that are placed are well placed, adding to the deception that all is not so bad. To reliably sort out whether your map is being labeled well, use the View Unplaced Labels under options on the Labeling toolbar. Select a new color if need be.

Maplex - Figure 2
This second map on the right shows a bit more alarming picture. There were at least eight labels that were not placed. It is worth noting that in this second view Maplex actually makes the map look a bit worse than it might otherwise be. The reason for this is that the unplaced labels are drawn/dumped on the map in their default position with no attempt to minimize conflicts with other features or labels.

How the map was fixed:

  1. First I used the Label Manager to add an additional label class and set its SQL Query to be: I came up with the number 500,000 by using the Identify tool and clicking on what looked like a polygon that would typically be too small to contain its label. Then I just rounded up a little bit. I also renamed my Default label class to be Medium Units (see the illustration below).
  2. For the text symbol of my Small Units label class I added a leader line:
    1. Click on the Symbol button
    2. In the Symbol Selector dialog box click the Properties button.
    3. In the symbol Editor click on and show the Advanced Text tab.
    4. Note that I also set up a white drop shadow here (0.8 X offset, and -0.4 Y offset)
    5. Check the Text background option, and then click its Properties button.
    6. Change the Type to Simple Line Callout.
    7. Change the Leader Tolerance to 8.0
    8. Check the option to automatically snap the leader to the text.
    9. For the leader line symbol, I made a two layer symbol, the bottom layer was solid white line that was 1.2 points wide. The top line was a dark gray line that was 0.6 points wide. This allowed my leader line to uniquely match with the text symbol, making it easier to associate the leader and its text.
    10. Click OK until you get back to the Label Manager and then click Apply.
  3. Next, Maplex placement properties needed to be set.
    1. Click the Position button and then choose Offset Horizontal.
    2. Change the offset to 12 points.
    3. Click the Properties button and show the Fitting Strategy tab, where I used the Overrun feature option and set it to 12 points and check to use the Asymmetric Overrun option.
    4. For those of you already using ArcGIS 9.3, click and show the Label Position tab, where you can now click a button called External Zones where you can refine the priorities for which direction the label will be offset.
  4. Click OK or Apply to see how your map was labeled. Below is how mine turned out:

Maplex - Figure 3
The only unplaced labels (to prove I didn’t fake this by creating annotation) were at the lower corners of my data view and occurred because those polygons were clipped just beyond the edge of the data frame (something Maplex does to help ensure optimal performance).

One last tip on this subject is for when you may need some additional logic in selecting which features should get leader lines. In some cases I’ve found it useful to base my leader line labels on the number of characters in the text that will be used for a label. I used to add an integer field to my data and calculate it to be ‘len([name]). It turns out there is an SQL Operator called Char_Length, which can be used to save the time an effort of creating a field. Here is an example SQL Query statement from a label class in another map I recently made:

CHAR_LENGTH(“LabelStr”) > 11 AND “CS_ID” in (720008, 720009)

In this case the data were stored in a File Geodatabase.

Last, if you’ve got any tips you use to better label features on your maps by using leader lines please share them as comments on this post.

This entry was posted in Mapping and tagged , . Bookmark the permalink.

Leave a Reply

4 Comments

  1. wj says:

    It is very useful. I try to use this method in compling the digital geological map of Asia (1:5M). It looks better than before. Thanks
    -wj

  2. olaszlo says:

    useful, even today
    thanks

  3. csbattle says:

    Can you update this so we can see what your SQL Query was, and how you set it?

    “First I used the Label Manager to add an additional label class and set its SQL Query to be: I came up with the number 500,000 by using the Identify tool and clicking on what looked like a polygon that would typically be too small to contain its label.”

  4. dforbuss_rvss says:

    Still works great in 10.3! Just make sure you have the offset units set to points and not inches like I did (I had lines crossing all over the page).