Exercise 4: Add static text

You can add static text to the creek label, just as you did in the annotation template. Use the Concat function again.

In this exercise, you use Concat to add the static text "Waterway:" to the creek labels.

Note: This exercise uses the map you edited in Exercise 3: Display text along a curve.

To add static text to the label

  1. Select the Creeks layer and click Style.
  2. In the Style Editor, click the cell under Feature Label in the lower half of the window.
  3. In the Style Label dialog box, for Text Content, select Use Expression.
  4. In the Create/Modify Expressions window, delete the current expression.
  5. Click Text Function and select Concat.
  6. Select the first Property entry and replace it with the text 'Waterway: '.

    When you add a static text entry, surround it with single quotes. To include a space between the static text and the following property, put the space inside the closing single quote mark.

  7. Select the second entry ([Text Property]) and click Enter Property. Click Property and select the text property NAME.
  8. Delete the square brackets and the ellipsis inside them, as well as the final comma.

    The expression now looks like this:

    CONCAT ( 'Waterway: ' , NAME )

  9. Click OK.
  10. In the Style Label dialog box, click Apply and then Close.
  11. Close the Style Editor.

Where you are now

Zoom in to the same area around the cloverleaf in the middle of town. The creeks now display the new labels with the static text and creek names.

To continue this tutorial, go to Lesson 3: Use text layers.