MapInfo Pro

 View Only

MapInfo Monday: Layout Templates - The Manual Way

  • 1.  MapInfo Monday: Layout Templates - The Manual Way

    Employee
    Posted 06-23-2025 05:42

    In many cases, the goal of your work inside MapInfo Pro is to create an output in the form of a map. And very often, this map needs to be created in a certain way with a given set of texts in a title block. That can include texts such as a title, the scale of the map, a date, and brief text describing the map or the analysis results.

    Therefore, instead of starting from scratch every time, it would be helpful and time-saving to begin with a template that includes all the placeholders for the final output.

    In this article, I will show you how you can create a layout template with placeholders and SmartTexts that automate as much as possible.

    This article was inspired by a question I got from the British Transport Police.

    Happy #MapInfoMonday!

    Creating a Layout Template

    First, you need to make sure you have no maps or tables open. We'll end up saving the layout template to a workspace, and we don't want to contaminate this workspace with tables or windows that aren't part of the layout template.

    Now, open a new layout window.

    You can also change the paper format to the desired size and orientation. I'll stick to the default A4 Portrait that you see above.
    Let's start by adding some design elements to the layout that relate to our company's design policy.
    I added a single rectangle at the top of my paper. I can now select this rectangle and, via the context menu, go to the Frame Properties dialog. In this dialog, I can modify the position slightly, and I can also use the Style button to change the colors of the rectangle.
    Once done. I make a copy of this rectangle and move the second rectangle to the bottom of the page.
    Now I can add an empty frame to the layout using the Add Empty Frame control in the Frames dropdown.
    I draw the frame onto the layout, and I can also position it to be aligned with the two rectangles.
    This frame is the placeholder for my map when I will be using the template. It's therefore a good idea to give the frame a name so that I can refer to this name in my SmartText elements.
    In the Frame Properties dialog, I can add a name to the frame using the Name field. I set it to "Map-1" as my SmartTexts often use this name. When you have changed the name of the frame, the name will appear inside the frame instead of the text "<No Content>".
    Next up, are a few SmartText so that the layout automatically will show values as the name of the map as the title, a date, and the scale of the map. I can find these from the Text dropdown, and simply click in the layout where I want the text to appear. After this, I can change the text style for the text frame to match my requirements. As I put them on top of my purple rectangle, I make the text white.
    As you can see, a few of the texts appear in a different color, and they also show Error(1068). If you hold the mouse over the text frame, a pop-up will give you some more details on the error. In this case, the problem is that the frame doesn't hold a map yet and therefore it can't get the title and the scale from the map. So all is fine.
    I'm using the Layout Text Editor from WindowHelper to modify the text. This makes it easier as the text is shown in a dialog. You can read more about this in this article: MapInfo Monday: Editing Text in the Layout Window.
    Finally, I insert a symbol in the top right corner of the empty frame. This will be my north arrow. I double-click on the symbol to open to the Symbols dialog. Here I can select the MapInfo Arrows font and then select my preferred north arrow.
    I haven't shown this in my example, but you can also insert a logo in the form of an image onto the layout and get this saved to the template.
    Now that my template is all fine, it's time to save it so that I can reuse it later. I save it into a MapInfo Workspace. You could also save it as a Layout Template via the Layout Template add-in. I'll come back to this in a later article.
    I give the template a meaningful name, and I also include text that describes the paper format. This is useful if you create the same template for different paper formats.
    With the template saved, I can now use Close All to close the layout window.

    Using a Layout Template from a MapInfo Workspace

    Now the time has come when you want to use your new template. You have a map window open that looks the way you want for your output.
    To get to your template, you need to open the workspace. In this case, you also want to keep your current workspace open, so you will have to use the Add Workspace control. You can find the Add Workspace control in the Open dropdown.
    We will now browse to the location where we saved our layout template and select this.
    The layout will now be opened as we saved it. I have positioned it on a new vertical tab group to be able to see the layout as well as the map window.
    The empty frame is still empty. We need to manually insert a map into it.
    To do so, we will select the empty frame so that MapInfo Pro understands that we want to insert something it this frame.
    From the Map dropdown on the Layout tab, I select the map I want to insert into the empty frame.
    When the empty frame gets populated with the map, a couple of things happen. MapInfo Pro clones the selected map into the empty frame. You now have another map window open. If you don't need the standalone map window anymore, you can close it. Secondly, the Smart Texts on the layout are now refreshed as they can now find a map in the frame named "Map-1".
    You can also modify the zoom and center of the map so that it matches the form of the frame. You can double-click on the frame with the map to activate the map. Now you can use the normal map tools to zoom and pan in the map.
    I'll now select the text placeholder under my map and use the Layout Text Editor from the context menu to edit this text. Currently, as you can see, it holds some dummy text that I can replace with, for example, a description of the analysis result.
    Finally, I'll rename the embedded map through the Layer List to match the title that I want for my map.
    Hopefully, you found this of interest and see that you can save a lot of mouse clicks by using a template for your layouts.


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