Happy #MapInfoMonday!People often use GIS tools like MapInfo Pro to learn about a location. They want to understand this location better to make better decisions. Sometimes, you don't have all the necessary information in your own system but you know it's available on external internet sites.Wouldn't it be great to access these sites with a single click of your mouse for a specific location?In this article, I will show you how you can use Hotlinks to access internet sites to offer you information or images for a specific location with a single click.What are Hotlinks?Hotlinks in MapInfo Pro are somewhat similar to links on websites. They allow you to point/link to additional information or an additional resource such as a document or an image.I have seen this used in various ways from within MapInfo Pro. Often your data holds some information that can link to additional information or systems. It could be a document on a shared drive where the name is based on the value in the unique property ID column, it could be information stored in an asset management system where the ID in the system is also stored in an ID column on the addresses or you could use the coordinate of the location to look up additional information on a web site.Imagine a real estate agent or a property developer looking at a specific location on a map. A base map like the one below only gives away a bit of the real world. You can add an aerial or satellite map but you would still only be able to see the area from above.
In this example, we will add additional hotlinks to our table that links to two websites. One shows oblique images of the location and another gives you information about who or how many lives at a certain address.Configuring HotlinksSelect the layer in the Layer List and from the Map tab, click on Hotlink Options in the Options group.
This will bring up the Hotlink Options dialog. In my example, you can see it's all blank. This means no hotlink configurations have been configured for this table yet.
Click the Add button to add the first configuration.
Now we need to configure the hotlink.1. Configure the Filename Expression. In our example, this will link to a website using a hardcoded parameter and two parameters from columns. From the list select Expression....You can now enter the expression that MapInfo Pro will use when you click on the record with the Hotlink tool. In this example, it will be a link to a website:
The hard-coded parameter here is east controlling the direction you are looking at the location. The two variable parameters are Str$(etrs89koordinat_øst) and Str$(etrs89koordinat_øst). They represent a coordinate pair read from two columns of the record.
2. Configure the Alias Expression. This will be shown to the user in case you have defined multiple hotlink options. This will help the user decide which hotlink to select.We will use a hard-coded expression for these:
"Oblique Imagery looking East"
As we are using a website link, make sure to uncheck the File locations are relative to table location. This is useful if the document or file you are linking to lies in the same folder as the table or in a subfolder in that folder.And finally, you need to select the option for Activate Hotlink on. It can be only labels, only objects, or both.As the imagery service support four viewing direction, we add three additional hotlink options. One for north, one for south and one for west.
If you want to save these settings, you can check the Save options to table metadata. This will save the options with the table so that they will become active whenever you open the table into a new map. The hotlink options will also be saved to a workspace.We will add a fifth definition that links to a "telephone directory" service. This allows us to look up information about the people living at the address. In this example, we will be using krak.dk. This will often depend on the country you are working in.This link only needs one parameter, the address including the postal number. If you had these in two separate columns, that could also work.
"https://map.krak.dk/s/" + Postnr_adresse
Using HotlinksOnce you have defined the Hotlink options, you can use the Hotlink tool. Remember that the layer has to be selectable.You will find the Hotlink tool in the Map Tools dropdown on the Map tab.
Once you have selected the tool, you can use it. Notice how the cursor changes when you hold it over a record that has hotlinks enabled.
When you click on the record, MapInfo Pro will execute the link through the designated Windows application.Here is the result from the oblique imagery service.
And a similar result from the "telephone directory" service.
The examples above don't require any login or accounts to use. You can also use this method to access sites that do require a login. Your initial request will require you to log in, but often you will only have to log in the first time each day.There are probably plenty of other websites that you could connect to from within MapInfo Pro in a similar fashion. Any suggestions? Which sites are you accessing? What do you normally use hotlinks for in MapInfo Pro?
------------------------------Peter Horsbøll MøllerPrincipal Presales Consultant | Distinguished EngineerPrecisely | Trust in Data------------------------------