Because an annotation feature class is static and separate from the dynamics of a labeling engine, I'm having trouble understanding why my street annotation is altering my labeled features.

More specifically, I have milepost point features that use an expression to essentially place the numbers vertically, like you see in real space when driving down the highway. And it works just fine when the street annotation layer is turned off. But when I turn it back on, some of the labels ignore the expression and revert back to a standard horizontal, left-to-right labeling of the numbers (see related images and note milepost 298 at bottom of map page).

How do I fix this so that the mileposts always (i.e. hard constraint) label according to the expression?

enter image description here

enter image description here

  • Looks like your Road Ramp Names are shifting the Symbols. The names for ramps look long do you need them that long or labelled at all?
    – Mapperz
    Aug 4, 2017 at 16:22
  • 1
    Have you tried changing the feature weights in Maplex's weight ranking? There are some other settings in the layer's placement properties, like the fitting strategies tab, that can be adjusted as well including the stack label.
    – John
    Aug 4, 2017 at 17:11
  • You're right, Mapperz, it is specifically (at least on that page) the ramp labels that are shifting it, and I know this because they are a separate symbol class that I can turn on and off, and I have debated what you suggested, which is turning them off altogether. The problem is, they aren't always the culprit (I've found one or two caused by other labels), and so I'd really prefer the ability to make them "do as they're told." And in terms of weight rankings, johns, yes, I've tried various settings and combinations, but nothing worked (and sorry for not offering those details in my OP).
    – T Schulzke
    Aug 4, 2017 at 17:48
  • At this point, I will probably just need to bite the bullet and convert the labels to annotation while other layers are turned off in order to maximize the number of features that are oriented correctly in the vertical position. Thanks!
    – T Schulzke
    Aug 4, 2017 at 17:49
  • @Mapperz it looks like your comment could be an answer, although it looks like the asker may be able to provide a more detailed self-answer to score some rep from.
    – PolyGeo
    Aug 5, 2017 at 4:59

1 Answer 1


One option is to create additional fields for each number in the mile post.

  • Create new fields (number will depend on the number of digits in your largest mile post - if the number goes to 6 digits, create 6 new fields.
  • Calculate each number of the mile post into the appropriate new field (if the post is number 112, calculate 1 into first field, 1 into second field, 2 into third field

Here is an expression for the calculation (using Python, so the index of the first digit is 0, 2nd is 1, 3rd is 2). To calculate the first digit:

Code Block:

def filldigit(sourcefield, digit):
  if len(sourcefield) > int(digit):
    return sourcefield[int(digit)]
    return None


filldigit(!SourceField!, 0)
  • Build a label expression using the new fields like this (I am using Python in my example):

def FindLabel ([NewField1], [NewField2], [NewField3]): if not [NewField2] and not [NewField3]: return [NewField1] elif [NewField1] != None and [NewField2] != None and [NewField3] == None: return [NewField1] + '\n' + [NewField2] elif [NewField1] != None and [NewField2] != None and [NewField3] != None: return [NewField1] + '\n' + [NewField2] + '\n' + [NewField3]

This will result in the following (using 3 fields):

enter image description here

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.