About offsetting line labels
You can set the offset distance between the line feature and the label by entering a value and choosing the type of units from the drop-down list. This offset can be measured from the geometry of the feature or from the feature symbology boundary. You can also constrain the placement of the label to a specific side of the line.
You can add a secondary offset distance, which will be used if the label is unplaced after applying the primary offset. This placement allows you to set a minimum and maximum offset value instead of an actual distance and places the label horizontal to the line feature.
You can control the location of a label along a line for all the placement styles. You can use the default setting, At best position along line, or you can specify a label position relative to the end of a line. A variety of measurement options are also available for offsetting labels along a line.
The Label Offset dialog box has a series of parameters for offsets along the line; using them together, you can control where on the line a label is placed.
You can place the label at the midpoint of a line:
Position Label: Along the line from the start
Measured to: Center of label
Distance: 50%
Or you can place the label at a specified location:
Position Label: Along the line from the end
Measured to: Nearest side
Distance: 5 mm
Offsetting a label from a line
For each of the offset styles (Offset Horizontal, Offset Straight, Offset Curved, and Offset Perpendicular), you can control how far a label is from the line feature, determine whether the offset is measured from the feature geometry or the feature symbology boundary, and constrain the side of the feature on which the label is placed. You can set a preferred label offset distance from the line, measured in map units, millimeters, inches, or points. You can also set a secondary offset that places the label horizontal to the feature. This label offset requires minimum and maximum values for the offset range.
You can constrain the side of a feature on which the label is placed using the Constraint Offset drop-down list. The options are as follows:
- No Constraint—Places the label on either side of the feature. The default location is always above the line, but if the label engine can't place the label above the line, it attempts to place it below the line.
- Above Line—Places the label above the line based on feature orientation to the page.
- Below Line—Places the label below the line based on feature orientation to the page.
- Left of Line—Places the label on the left side of the line based on the inherent direction of the feature.
- Right of Line—Places the label on the right side of the line based on the inherent direction of the feature.
The Constrain Offset parameter is unavailable if Street Placement is checked for a particular label class.
The image below shows the ferry line labels placed with an offset of 5 points and no constraint:
Offsetting a label along a line
The default setting is At best position along line. When this is selected, the Esri Maplex Label Engine finds an available location somewhere along the line (the default location is toward the center of the line) to place the label. The options are as follows:
- At best position along line—Finds the closest available location to the midpoint of the line.
- Before start of line—Places the label at a specified distance before the starting point of the line. The starting point of a line is determined using one of two methods. If Use Line Direction is checked, the starting point is determined based on the order of the coordinates in the line feature. If it is not checked, the leftmost end node of a line relative to the map page is the start of the line.
- Along the line from start—Places the label at a specified distance after the starting point of the line. The starting point of a line is determined using one of two methods. If Use Line Direction is checked, the starting point is determined based on the order of the coordinates in the line feature. If it is not checked, the leftmost end node of a line relative to the map page is the start of the line.
- Along the line from end—Places the label at a specified distance before the ending point of the line. The ending point of a line is determined using one of two methods. If Use Line Direction is checked, the ending point is determined based on the order of the coordinates in the line feature. If it is not checked, the rightmost end node of a line relative to the map page is the end of the line.
- After end of line—Places the label at a specified distance after the ending point of the line. The ending point of a line is determined using one of two methods. If Use Line Direction is checked, the ending point is determined based on the order of the coordinates in the line feature. If it is not checked, the rightmost end node of a line relative to the map page is the end of the line.
Measure To
You can control which part of the label is measured to when a label offset distance is applied. The Measure To control sets an anchor point in the label that is used to place the label along the line.
- Center of label—Measures from the middle of the label.
- Nearest side of label—Sets the anchor point to the edge of the label nearest to the feature. If no offset distances are specified, the label tends to extend beyond the feature.
- Farthest side of the label—Sets the anchor point to the edge of the label farthest from the feature. If no offset distances are specified, the label tends to lie on the feature.
Distance
This parameter controls how far a label is placed from the start or end point of a line feature.
You can choose to measure in map units, millimeters, inches, points, or a percentage of the line length. Percent of line length is useful when you want to place a label at a specific location on the line but the lines vary in length. For example, if you want to place all labels along the first quarter of a line, enter a distance of 25 and choose Percent of line length for the units.
Tolerance (+/-)
The Tolerance parameter gives the label some freedom to move along the line. A tolerance value of 0 specifies that the label should only be placed at the distance entered in the Distance edit box. The tolerance units are the same as the distance units.
Use Line Direction
When Use Line Direction is checked, the order of the coordinates in the line feature determines the start and end points of a line. When it is not checked, the start point is the leftmost end node of a line and the endpoint is the rightmost end node of the line, relative to the map page.
Example
The image below shows the ferry lines labeled 40 points from the end of the line.