MapInfo Pro

 View Only

MapInfo Monday - Using Friendly Names in the Legend

  • 1.  MapInfo Monday - Using Friendly Names in the Legend

    Employee
    Posted 22 days ago

    Legends are an important part of your map. They describe the content on your map and show the user what colors, symbols, and lines represent.

    I recommend giving your layers a friendly name before creating your legend as the friendly name is carried over tot he legend.

    Let me show you - and a happy #MapInfoMonday!

    Using Friendly Layer Names in your Legend

    Here is my initial map of a couple of layers.

    The layers use the table name as the layer name. This is the default behavior for layers in MapInfo Pro. This means that spaces are replaced by underscores and sometimes the name is also shortened.
    To create a legend window for this map, I go to the Map tab and click on the Legend control from the Add to Map dropdown.
    This will initiate the creation of a legend for my map.
    In the first step, I will select the layers to include in the legend. I do this in the Create Legend - Choose Layers dialog.
    In the Create Legend - Legend Default Properties dialog I can control the default properties for my legend and the individual legend frames for each layer.
    The # character in the Style Name field sets the layer to use the layer name in the legend.
    In the final dialog, Create Legend - Frame Properties, I can control the look of the frames for the individual layers. This is useful if my layer holds various styles and has a column with a name for these styles.
    In my example, my layers all use a Style Override and are shown a single style. This makes the legend very simple.
    The final legend will look like this. As you can see the names in the legend refer back to the layers in the map. To change these, you must double-click on each and enter a friendly name for the legend style.
    Many of the preferences for a legend window, can be controlled via the Legend Window Preferences dialog. This lets you skip over these dialogs and hit the Finish button in the first dialog.
    The Style Name Pattern field is important in my example. Sometimes this is set to the % character which will use the symbol name instead of the layer name.
    Now if we make sure the Legend Window Preferences is set to use the layer name and we rename the layers to a more friendly name, we can create the legend with just two mouse clicks for these simple layer types.
    I have renamed my map layers with names that make more sense and that I also want to use in my legend. Read more about renaming layers in this article: MapInfo Monday: Renaming Windows, Layers, and Tables.
    I click on the Legend control from the Add to Map dropdown to create a legend window. This will bring up the Create Legend - Choose Layers dialog. Notice that the list of layers now shows the friendly names for the layers.
    As all our layers use a simple style, we can click the Finish button to use the default settings for our legend.
    The Legend window now shows the styles and layers using friendly names.
    Have fun creating legends for your map!


    ------------------------------
    Peter Horsbøll Møller
    Principal Presales Consultant | Distinguished Engineer
    Precisely | Trust in Data
    ------------------------------