Happy #MapInfoMonday!
This will be the last #MapInfoMonday post in 2023. Next week, on Boxing Day, we will post an article looking back at 2023 through the eyes of #MapInfoMonday.
Many of our users use MapInfo Pro to create hundreds, maybe thousands, of maps. This is typical for getting a map of each site or location and the surroundings. Below is a basic example of such a map showing a specific location and in this case a couple of drivetime zones around the location. You can include all other sorts of additional layers that would make sense to your business. And besides showing the location on a map, you often also want to include attributes from the location such as a name, maybe some address details and other relevant information.
Earlier these maps were typically printed on paper. These days, they are saved as an image or printed as a PDF document.
Doing this manually would be very cumbersome and time-intensive.
Open the MapInfo Marketplace from the Home tab in MapInfo Pro, browse to the Site Mapper tool, and click the Install Product button to download, install, and register Site Mapper in your MapInfo Pro.
In my example, I have a table with 24 sites, car dealers, in Sweden. I have also created three drive time zones around these car dealers.
I created a basic layout with two maps. One map that focus on the drive time zones, and another smaller map that focus on the location of the car dealer.
In the lower-left corner of the layout, I have inserted a few placeholders for attributes from the car dealer table. These placeholders are a combination of a fixed text and a SmartText that will pull information from the car dealer record as it gets printed.
This expression will read the value from the column EMAIL in the car dealer table for the current location or site:
$mb{SMGetSiteValue("EMAIL")}
As I have designed my output in the layout with my two maps and the texts, I'm ready to generate the output.
From the Home tab, I click on the Site Mapper control in the Output group.
You can now configure the output via the Site Mapper - Batch Printing Tool dialog.
Let me give you a quick tour as the dialog can look a bit intimidating.
Start with Template Window in the top-left corner, go down, and then start again from Output Settings on the right and go down.
First, I select Layout as I'm using a layout as the template. Note that some options may be disabled. This happens when a condition for that option isn't met. In my example, I can only select Layout for Export mapper or layout because I don't have any stand-alone map windows open.
Next, I have to select the frame for my main map and potentially also for a secondary map if I have one.
Now I configure the Sites Layer - Primary Map where I select the table Car_Dealer and the column with their names. I leave the additional options unchecked as I just want the tool to center the map on these locations. I could also add the current site as a new layer to avoid my maps showing two sites in areas where they are close together.
For Map Pan and Zoom Settings - Primary Map, I set the site map to center on the center of the sites and to keep the current zoom.
Under Output Settings, I set the resulting filenames to be named using a counter instead of using the names. I know my names can hold special characters that aren't allowed in file names.
I select the PNG file format as output and set the Image Resolution to 150 dpi. I also specify the Output folder for the exported images.
I configure my secondary map similarly to the primary map.
If you check the option to clone main window, you will end up with a new layout window for each site.
When ready, I click the OK button to start generating my output.
You can see how the layout window changes to reflect the changes for the current site and once it has finished, you can find the resulting output files in the specified output folder.
------------------------------
Peter Horsbøll Møller
Principal Presales Consultant | Distinguished Engineer
Precisely | Trust in Data
------------------------------