The labels show the street numbers of the parcels, but not the street names. You can use an expression to concatenate (combine) two properties. In this case, you concatenate the address (street number) and street name. You use the expression
\n to add a line break, producing a multiline label.
To use an expression to refine the labels
- Select the Parcels layer and click Style.
- In the Style Editor, click the cell under Feature Label in the lower half of the window.
- In the Style Label dialog box, for Text Content, select Use Expression.
- In the Create/Modify Expressions window, delete the current expression so the window is empty.
- Click Text FunctionConcat.
An expression is inserted. It has two property placeholders.
- To replace the first property entry, select it and click Property at the top of the Create/Modify Expressions window. Select the numeric property ADDRESS.
- Place the cursor after the comma following the ADDRESS property.
- Type
'\P', to move to a new line after the address number.
Type the entry exactly as shown, with single quotes surrounding the \P, make sure you type a capital P, and enter a comma following the closing quotation mark.
- Click the Text Property entry and select Enter A Property.
- Select the text property STNAME.
- Delete the square brackets and the ellipsis (three dots) inside the brackets, as well as the final comma.
- Click Validate (at the bottom of the dialog box) to make sure that the expression is valid.
- Click OK.
- Click Apply and Close in the Style Label dialog box and close the Style Editor.
- Zoom in to the area around the cloverleaf in the middle of town.
Where you are now
The streets (drawing objects) display speed limits and the parcels (geospatial features) display full street addresses.
To continue this tutorial, go to
Exercise 3: Display text along a curve.