The style created in the previous section lacks some scale rules. In a previous module scale dependence was added by editing XML directly. In this section scale dependence will be added via the Styler.
Using the Zoom Slider on the left zoom to an approximate scale of 1:550,000.
Zooming with the slider
Note
At any time the current scale can be viewed by hovering over the zoom slider. This can be useful when setting up scale dependent style rules.
Edit the Bus style by clicking on the rule in the Legend panel.
On the Basic tab change the Name to “Bus > 155K”
Changing the name of a style
On the Advanced tab click the add condition button
Adding a condition to a style filter
Set the Match drop down to all.
Add the condition “shape_leng > 50000” and save the style.
Note
The “shape_leng” represents the overall length of the transit route. Supplementing the scale filter with this conditional filter creates the affect of longer transit routes showing up at larger scales.
Filtering the bay_area_bus_routes layer
Zoom in two levels to an approximate scale of 1:135,000.
In the Legend Panel click the Add new button.
Add a new style rule with:
Adding a style at the 155K - 35K scale
Save the Bus 155 - 35k style.
Add a third style rule that similar to the one added in steps 8 through 10 with:
Adding a style at the < 35K scale
Zoom the map in and out to verify the scale dependent rules.
Viewing style change based on scale
Up to this point SLD styles have been created by editing XML directly, and via the Styler application. In the next module an SLD style will be created with a combination of the two.