MapInfo Pro

  • 1.  MapInfo Monday: Layer Override Styles

    Employee
    Posted 09-13-2021 08:28
    Edited by Peter Møller 09-13-2021 08:36
    Happy #MapInfoMonday,

    Today's post will be a short one but still with some neat information that you may have overlooked in MapInfo Pro. We will dive a bit into setting override styles on layers.

    Styling in MapInfo Pro

    MapInfo Pro allows you to style your vector layers in several ways.

    When you initially open a table into MapInfo Pro, the records in the table will be styled using the object style. This style is saved with the table as part of the individual spatial objects.​In fact, MapInfo Pro stores details about what styles are stored with objects in the table metadata part of the MAP file. Each object then refers to one of these styles. This saves a bit of space as each style is only stored once per MAP file.

    You can also create a thematic layer where you connect values from your table to a specific style. This is quite useful when you want to for instance show individual data values on the map, and as the style is linked to the attribute value, the style will change when the attribute value changes. Remember that you can save your theme to the metadata of the table and have MapInfo Pro use this when you open the table into a new or existing map.

    Another way, which we will dive a bit more into today, is to use an override style for your layer. This is also referred to as a global style, especially if you use MapBasic. Note that the override style will render all objects in the layer with the same style.

    Assigning an override style to a layer

    In the example below, you can see that I have loaded two layers into a map window. Actually, the only way you can see that there are two layers is because there are two layers in Layer List of the Explorer window.

    Both layers may very well be rendered with the same style, or maybe the top layer just completely covers the layer below.

    To change this, you can click on the small thumbnail next to the layer name in the Layer List. This will bring up a style dialog. The type of style dialog depends on the object types in your layer. In my case, I have layers with only regions, also known as polygons. That is why I get the Region Style dialog.

    I can very quickly change the region styles for my layers. Make the layer with the larger polygons show with a thicker red line and the layer with the smaller polygons I set to use a region style with a thin red line. For both layers, I set a Fill Pattern of None.

    In the map, I can now more clearly distinguish between the objects in the two layers.

    If you select a layer and select the Style tab on the Ribbon, you can also enable the Use Stacked Styles option for the layer. This allows you to combine multiple styles for your override style. In my example, I add a thicker white layer under the thick red line for the layer with the larger polygons. This makes the lines stand out a bit more against dark base maps.

    In the image below, you can see how the Stacked Region Styles dialog, allows you to combine any number of styles for your layer.

    Just keep in mind having a stacked style adds a bit of time to the time it takes to render the map. That's because MapInfo Pro basically renders each of the styles in the Stacked Style one at a time. For a single stacked style with two styles, it would be similar to having the layer twice in the map. You will need to have many stacked styles to really notice a big difference though.

    Here is the final result where you can see the white border around the thick red lines. This is especially easy to see against the blue river.

    In my example, I used tables with polygons but you can also do this with tables holding points and lines too.

    What styling method are you typically using with MapInfo Pro? The per-object style, a thematic layer, or the layer override style?

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


  • 2.  RE: MapInfo Monday: Layer Override Styles

    Employee
    Posted 12-01-2021 14:29
    Edited by Chris Jenkins 12-01-2021 14:36
    Nice tips, I was inspired to have a go.  Created some nice boundary borders using the stacked styles and really exaggerating the multiple line widths using the Point size and setting it up to 20 points for a really wide border.



    ------------------------------
    Chris Jenkins
    Pitney Bowes Software Ltd
    HENLEY-ON-THAMES
    ------------------------------