Thematics is another very import aspect of cartography. This section covers the task of launching the Styler application and using it to create create a simple thematic style.
Navigate to http://localhost:8080/geoserver/www/styler/index.html in the web browser.
Running the Styler application
In the Layers panel, turn off the world_adm0 layer by unchecking the check box next to it. Turn on the bay_area_transit_routes layer by checking the check box next it.
Turning on the bay_area_transit_routes layer
Activate the bay_area_transit_routes layer for styling by selecting the radio button next to it
Note
The check boxes are used control layer visibility. Any number of layers can be visible at one time. The radio buttons are used to set the layer to be styled. Only a single layer can be styled at once.
Setting the bay_area_transit_routes layer to be styled
In the Legend panel click the defaut style
Opening the Style dialog
In the Style dialog change the Name field to “Bus”.
Click the Color field and change the color to green.
Editing color
Close the Color Picker dialog and click the Advanced tab.
Opening the advanced styling tab
Click the Limit by condition check box.
Note
Limiting by condition applies a filter to a style restricting what parts of the layer the style applies to. Such filters are usually based on a layer attribute value.
Leave the value of the first drop down list as any.
In the second drop down select the class attribute.
Selecting the attribute for a condition
In the third drop down select the = operator.
Selecting the operator for a condition
In the text field enter the text “Bus”
Specifying the value for a condition
Note
The above filter specifies that only transit routes which are “Bus” routes should be matched.
Click the Save button.
Saving a style
Add a new style by clicking the Add new button in the Legend panel:
Adding a new style
Repeating steps 5 through 13 create a new style with:
Adding the Rail style
Add another style with:
Adding the Ferry style
Zoom in closer to get a better look at the styles.
Note
The map panel of Styler is a regular OpenLayers map. You can “rubber-band” zoom by holding Shift and dragging the mouse to draw a desired viewport.
Viewing the styled bay_area_transit_routes layer
At this point a thematic style has been created with the Styler application. In the next section the style will be further improved with the addition of scale dependence.