In particular, we are discussing adding highlighting to a section of a map contaiing polygons. We will use a map of the US as an example. In this case, the goal is to highlight one particular area by occluding the others.
Begin with a map of polygons
We start by importing a polygon layer for the example. This is a standard States layer based on the US Census bureau information, but it could be any map containing polygon areas
Create a column for selection
Bring up the Layer Info window by using Window > Show Layer Info and then use the + button to add a new Column. We have removed the other columns in this table for brevity, but you don't need to do that. When creating the column:
- Add the new Column with the + button
- Set the Type to Number
- Set the Length to something reasonably short (no need to take up more space than necessary for this information)
Set the Selected value for one item
We have changed the value of the first state (Washington state, in the northwest of the continental US) for Selection to 1 so that we can experiment with the styles.
Create the Background Style
Bring up the Style window for your layer by using the Styles... button or Layer > Show Layer's Style in the menus.
In this case, we've already changed the Based On to be Selection so that we can have multiple styles for this layer that are automatically evaluated. Select the Based On pop-up and change it from None to the name of your new column.
By default, there is still only one style, the Non-Matching style (see bubble 2), which is the style to be used for anything that won't match the style we create in the next step. Before moving on, we're going to change the Fill so that it is a dark gray, making the unselected items less visible. To do this, click on the Fill box to bring up the Color window and change your fill color.
Add the new style for your highlight item
In order for the highlighted item to stand, out, we want a different style to be applied to that item. To do this:
- Click on the + item under in the Style List
- This will create an item in the Style List for your new value
- Now adjust the Fill color for this area to make it stand out
Adjust your settings for the desired style
Here's an example of how our map looks with the white highlight for the Selection and the gray Fill for the other items. You can move the Selection by deleting the value from each item and changing the value of the new item by using the data area at the bottom.