Select to view content in your preferred language

Label expressions not honoured for polygon and polyline features

662
1
Jump to solution
03-20-2023 07:37 PM
Labels (1)
acarmody
Regular Contributor

Hi there,

I’ve noticed that spaces in label expressions are not being honoured for polygon and polyline features in ArcGIS Pro.

In the arcade label expression builder, I’m using spaces to add a small background colour buffer on either side of the label – refer to line 4. I use this technique extensively in my work, across ArcGIS Pro versions 2.6 through to my current install of 3.1.0.

The spaces work on point features, as you can see below.

 

acarmody_0-1679365710098.png

 

Feature.Id is a text field. 

"<ACP>"
+"<BOL>"
+"<CLR red='0' green='0' blue='0' alpha='100'><BGD red='255' green='3' blue='1' alpha='100'>"
+" "+$feature.Id+" "+
"</BGD></CLR>"
+"</BOL>"+
"</ACP>"

The same expression has been applied to a polygon and polyline layer; you can see the spaces are not honoured.

I’ve also noticed that in polygon and line features, leading and trailing spaces in the attributes of the labelling field are not honoured either.

acarmody_1-1679365751081.png

Polygons above, polylines below

acarmody_2-1679365760778.png

 

Is a different expression required to label a polygon or line features in the way?

Are the capabilities of label expressions different between the 3 feature types: points, polygons, and polylines?


Any help on getting this to work is very much appreciated.

Cheers

0 Kudos
1 Solution

Accepted Solutions
KenBuja
MVP Esteemed Contributor

In the polygon and polyline examples, you haven't unchecked the "Remove extra spaces" option

View solution in original post

1 Reply
KenBuja
MVP Esteemed Contributor

In the polygon and polyline examples, you haven't unchecked the "Remove extra spaces" option