This is a sample map of Germany and demonstrates how neighboring countries can be hidden.
We use the following technique to hide regions on our map:
- First we have to define a dataless region color that has to be different from the color for our visible regions. For example, we can pick “#fcfcfc”.
- The second step is to color all regions that we want to display on our map.
Once we are done, we can apply a CSS rule to hide all unnecessary regions. We have to add the following rule to the CSS of our Map Template:
#{cssid} path[fill="#fcfcfc"] {
display: none;
}
If we click on the “Update Preview” button, the map should have some hidden regions now.
Please note that the hiding only works in region mode. The other modes won’t allow you to add custom colors for regions.
The map configuration can be seen here:
Continue reading