Using an Expression to Create Multi Line Labels - MapInfo_Pro - 2023

MapInfo Pro Help

Product type
Software
Portfolio
Locate
Product family
MapInfo
Product
MapInfo > MapInfo Pro
Version
2023
ft:locale
en-US
Product name
MapInfo Pro
ft:title
MapInfo Pro Help
First publish date
1985
ft:lastEdition
2023-09-12
ft:lastPublication
2023-09-12T16:39:16.995000

You can create an expression to have labels fit within region boundaries by having them display on multiple lines (so that they wrap from one line to the next within a region boundary). To do this, you would follow the instructions under Labeling with Expressions and add a carriage return to the abbreviation expression.

As an example, you have a layer of capital cities that you want to label on the map, and you want to include the country name in the labels, such as "London, England". Your label expression would look like this:

Capital + ", " + Country 

Where Capital and Country are columns in the layer table. This displays on the map as:

London, England

Madrid, Spain

Paris, France

However, some labels may be too long to fit within their regions and do not display as a result. To increase the number of region labels, you can specify an abbreviation expression that includes a carriage return in the middle.

Capital +  ", " + Chr$(10) + Country 

If the following label does not fit within its country boundary,

London, England

Then it displays as:

London,

England