MapInfo Labels:  Tips, Tricks, & Traps
Presentation outline prepared initially for the Northwest MapInfo Users Group
John Schlosser, Schlosser Geographic Systems, Inc. (SGSI) May 1998
 
Updated July 13, 2005

Overview Contents
MapInfo Pro has advanced labelling features.  For example:  It can display data-driven label dynamically, on-the-fly.  It can maintain the live link between the data and the labels.  It has a neat little handle for rotating labels.  Although introduced by MapInfo in 1996, these features have still not been mastered by MapInfo's competitors.  Still, MapInfo's label features are not perfect.  Nor are they well documented.  The purpose of this presentation is to outline how to build on the strengths and avoid the weakness of current label features.

 

Summary:  Three Types of Labels
Automatic labels
  • Appear automatically as you pan and zoom around.
  • The Label checkbox, in the Layer Control dialog, must be checked, of course.
Custom labels
  • An automatic label becomes a custom label if you manually tweak it, however slightly: e.g, move it, change its font, edit the characters in the label text, alter the leader line/arrow, or delete it.
  • Labels you make with the Label tool lablbutt.gif (954 bytes) are Custom labels.
Permanent or "text feature" labels
  • Aka "MapInfo 3.0 style labels".
  • Text features are map features, just as points, lines, and regions are map features.
  • To create text features use the Text tool textbutt.gif (932 bytes) or the built-in MapBasic tools "Autolabl.mbx" or "Labeler.mbx" (MI 4.1+ only).
Not all Labels are equal
Automatic labels:  Fast, easy, & (sometimes) ugly
  • Positioned essentially at the centroid or center point of the map line, point or region on which they are based.
  • Automatic labels are never saved and don't need to be. They are automatically regenerated whenever you need them.
  • If you have limited the labels to be generated (ie., via suppressing "Duplicate text" or "Overlapping text") you can't control which specific labels get drawn.
  • With automatic labels, the font size seems disconnected from the map.   That is, the text size does *not* change as you zoom in and out: ie., if the label is in 10 point type when you are zoomed out, it will be 10 point when you zoom in. This means that the text size relative to the map lines and regions, *does* change.
  • Automatic labels are always "Selectable". If they get in the way, turn them "Off" by un-checking the Label checkbox in Layer Control.
  • Automatic labels have a "live" link to the data. Change your data record and the label will change automatically.
  • Neither ArcView nor Workstation Arc/Info can create dynamic automatic labels.
Custom labels:  A middle ground approach
  • Can be moved and positioned anywhere.  Custom labels are only saved if you save the Workspace. The tweaks you make become part of the workspace. Thus custom labels (the tweaks) are hard to use with future work.
  • With custom labels, as with automatic labels, the text font size seems disconnected from the map.  It does *not* appear bigger or smaller as you zoom in and out: ie., if it is 10 point when you are zoomed out, it will be 10 point when you zoom in.   The text size relative to the map lines and regions, *does* change as you change the zoom level.
  • Custom labels are always "Selectable". They will display even if you un-check the Label checkbox in Layer Control.
  • Custom labels, like automatic labels, have a "live" link to the data.  Change the data and the label changes automatically.
  • Discard or erase *all* custom labels via  Map > Clear Custom labels  menu option.  You'll still have labels if you do this, but they will all be Automatic labels.
Permanent or "text feature" labels:  For complete control
  • Can be placed anywhere.
  • Save the text features in a permanent map layer (usually a map layer without any lines, point, or regions).
  • With text-only map layers, unlike with Automatic or Custom labels, the text values are completely independent of the table from whence they came. They do not refresh automatically if the original source table is edited. On the positive side, you can use the text-only map layer in many different workspaces or projects.
  • Like any other map layer, text in a permanent text-only layer can be set to be Visible, Selectable, or Editable. You can also control the layer draw order of this text, by moving the layer Up or Down in the Layer Control dialog.
  • With permanent or "text feature" labels, it's as if the text is "painted on the pavement".  The text scales just like the map lines, points or regions.  If you zoom in on the map, the text gets larger and vice versa.
SGSI's Cardinal Rules for Working with Labels
Rule #1 You have a choice. If Automatic or Custom labels are inconvenient for you, avoid them entirely.
Rule #2 Use Automatic labels when working dynamically with your data. This feature is great if you are doing interactive what-if analysis, using Query > Find , or doing other free-form operations.
Rule #3 Use text feature labels (text-only layers) when making a map that has to look good on paper. This is particularly true if you are plotting a large map (e.g., E-size). Know and use the Labeler.mbx and AutoLabl.mbx utilities.  In MapInfo 4.5 these utilities are readily accessible via the new Tool Manager:

  1. Labeler.mbx: Converts automatic labels into text features that can be saved permanently. This mbx was first included with MapInfo 4.1.

TraLbl_Dlg.GIF (3347 bytes)

  1. AutoLabl.mbx: Creates text features directly from the data table, without displaying automatic labels (and without incorporating any label changes you've already made.).
Labeling Tricks, Tips & Traps
Disappearing label First label disappears when you try to add a second identical one with the Label tool . No matter how many times you use the Label tool with that map feature, you only get one label.
This is a design "feature".  It is *not* caused by checking or un-checking the "Allow duplicate labels" checkbox.
Jumbled labels Custom labels are jumbled. You use File > Open Workspace only to find that text labels have been shuffled. E.g., the point for "Enumclaw" is labeled with "Mount Vernon", the point for "Everett" is labelled "Snohomish" etc.
The workspace file contains your custom label tweaks, referencing records in the source table by record number.  Have you "pack-ed" this source table? The record numbers change when you "Pack" a table.   This is the problem.

If you save your workspace *again*, immediately after "pack-ing" your table, your custom labels will be secure for this workspace. If you forget to re-save the workspace after the "Pack", your custom labels are guaranteed to be jumbled. 
Important note:  In general, beware of using the "Pack" command for tables with custom labels.  It's possible to save the current workspace, but all other workspaces referencing this newly-packed table will have jumbled custom labels.   These other workspaces still use the row # references that were valid for the un-packed table.

What you did to the automatic label: How the Workspace file records it:
Moved label, have arrow
Deleted label for row 668

Moved label, have arrow
Edited label text contents
Changed label font
Moved label

Object 722 Line Arrow Anchor (-122.036758,47.790173)
Object 668 Visibility Off

Object 724 Line Arrow Anchor (-122.033634,47.790136)
Object 796 Text "Label \n171,641.12"
Object 744 Font ("Arial",1,12,0) Anchor (-122.040803,47.793883)
Object 805 Anchor (-122.043522,47.793413)
Irrepressible labels Labels you thought you deleted keep re-appearing.   For example, you see a street map  label: "I-5 Ramp". You delete it and print the map. When you print the map, you notice that there is again an "I-5 Ramp" label on the map.
Let's say there are at least two lines with name "I-5 Ramp". Only one of them is labeled, if you have suppressed "duplicate labels" (the default situation). When you delete the label for the first "I-5 Ramp" segment, the second segment gets to display its label since there's no other duplicate label displayed.
Layout labels don't show in map window Labels print via the Layout that didn't show in the Map window.  The printed page can contain some unexpected (and maybe unwanted) automatic labels.
The map window only shows map labels that 'qualify' for display. That is, unless you've checked the "Allow overlapping labels" box in the Layer Control dialog, many labels will be suppressed. However, your page layout could easily have a map frame with a lot more space than the map window. This is especially true if printing in large formats. So, when placed in the layout, at the scale of the plotted page, many more labels qualify for display.

Some suggestions, should you chose to keep the labels as automatic or custom labels:

  • Scan the Layout Window before printing.
  • Use the Layout > View Actual Size command to see just what labels will display on paper.
  • Set up screen windows so you can see both the layout window and map window side-by-side.
  • To adjust the labels, you have to be able to see them in the Map window.  To see them, you need to zoom in on the Map window.  Before starting,  make a note of your zoom level and the center coordinates.]
  • Zoom-in on the map window temporarily to see what labels will display. Make your custom adjustments.  Use Map > View Previous to restore your original zoom setting.  Finally refresh the Layout window.
  • This is an iterative process.
"Hybrid" custom/automatic labels Re-position region centroids or make a separate "label point" layer to make Automatic labels that are always in the right place
An automatic label is placed at the geometric center of the region or other object.  You can edit the centroid and cause it to automatically fall where it looks good instead.  Beware that moving the centroid can affect other analysis.  A safer bet it to create an entirely separate map layer with point.  Adjust this points so they are exactly where you want your labels to be.  Then turn on automatic labels for this "label point" layer.  See also SGSI Tip #151:  Making a separate label point map.
Labels don't print You print a large map with lots of automatic or custom labels.  The labels show in your Layout, but don't print, or don't *all* print, on paper.
This is a memory issue.  There may or may not be an error message if it is a printer memory error.  Displaying hundreds or thousands of labels takes lots of system memory too.  With some versions of MapInfo Pro, especially with other applications running simultaneously, this causes some labels to show, but not print.  
Text   "scale" is wrong You have converted automatic labels into a permanent text map layer using Labeler.mbx, but the scale of the text in no longer constant.
Automatic text stays a constant font size as you zoom in and out on the map.  Text in a permanent text map layer does not.  For a solution, please refer to our Technical Tip on this subject.

 

Home | Top of Page | Contents | Search | Email SGSI

[sgs_foot.htm]