Happy #MapInfoMonday,
Today, I'll provide you with a tiny but useful tip to avoid too much clutter in your map by only labelling some of your records.
In this example, we are looking at a property map and we have added labels with the property number. As you can see in the map below, the map does look a bit cluttered as there are too many labels. How can you limit the number of labels shown, and limit it so that it's the "important" records that get labelled?
To manage which objects to label, you can use the IIf function to specify a condition the records should meet. The logic here is if the condition is met, the IIf function will return the label string to apply, if not, it will return an empty string which basically won't show the label.
Here's the expression used:
In this example, I use the area of the properties as a weight to determine if the label should be visible or not. If the area is larger than 0.25 square km, the label which here is read from the column MATRNR will be shown:
IIf(Area(Object, "sq km") > 0.25, MATRNR, "")
Below you can see the resulting map with a lot fewer labels.
You can use multiple Label Overrides to change the size of the properties as the user changes the zoom, or just have two label overrides: 1 to show all labels when you have zoomed in and another to limit the number of labels to some degree. In the image below, you can see an example where I have added 5 Label Overrides to change the size of the property to match the zoom level.
This is just one basic example of how you can use the IIf-function to control your labels. You can use this in multiple ways to control what label, you are showing to the user.
------------------------------
Peter Horsbøll Møller
Principal Presales Consultant | Distinguished Engineer
Precisely | Trust in Data
------------------------------