道路不止一种颜色的话只要多加一个<rule></rule>,外圈的宽度(stroke-width)比内圈大就可以了。
Sample Code
<?xml version="1.0"?>
<StyledLayerDescriptor version="1.0.0"
xsi:schemaLocation="http://www.opengis.net/sld StyledLayerDescriptor.xsd"
xmlns="http://www.opengis.net/sld" xmlns:ogc="http://www.opengis.net/ogc"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<NamedLayer>
<Name>guodao_polyline</Name>
<UserStyle>
<Name>guodao_polyline_style</Name>
<Title>geoserver style</Title>
<Abstract>Generated by GeoServer</Abstract>
<FeatureTypeStyle>
<Rule>
<LineSymbolizer>
<Stroke>
<CssParameter name="stroke">#E7AC46</CssParameter>
<CssParameter name="stroke-opacity">0.8</CssParameter>
<CssParameter name="stroke-width">6</CssParameter>
</Stroke>
</LineSymbolizer>
</Rule>
<Rule>
<LineSymbolizer>
<Stroke>
<CssParameter name="stroke">#FEB539</CssParameter>
<CssParameter name="stroke-opacity">1</CssParameter>
<CssParameter name="stroke-width">4</CssParameter>
</Stroke>
</LineSymbolizer>
</Rule>
</FeatureTypeStyle>
</UserStyle>
</NamedLayer>
</StyledLayerDescriptor>
<?xml version="1.0"?>
<StyledLayerDescriptor version="1.0.0"
xsi:schemaLocation="http://www.opengis.net/sld StyledLayerDescriptor.xsd"
xmlns="http://www.opengis.net/sld" xmlns:ogc="http://www.opengis.net/ogc"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<NamedLayer>
<Name>guodao_polyline</Name>
<UserStyle>
<Name>guodao_polyline_style</Name>
<Title>geoserver style</Title>
<Abstract>Generated by GeoServer</Abstract>
<FeatureTypeStyle>
<Rule>
<LineSymbolizer>
<Stroke>
<CssParameter name="stroke">#E7AC46</CssParameter>
<CssParameter name="stroke-opacity">0.8</CssParameter>
<CssParameter name="stroke-width">6</CssParameter>
</Stroke>
</LineSymbolizer>
</Rule>
<Rule>
<LineSymbolizer>
<Stroke>
<CssParameter name="stroke">#FEB539</CssParameter>
<CssParameter name="stroke-opacity">1</CssParameter>
<CssParameter name="stroke-width">4</CssParameter>
</Stroke>
</LineSymbolizer>
</Rule>
</FeatureTypeStyle>
</UserStyle>
</NamedLayer>
</StyledLayerDescriptor>
如果想要控制不同的比例下显示样式不同,使用下面两个标签就可以了
<MinScaleDenominator>32000</MinScaleDenominator>
<MaxScaleDenominator>32000</MaxScaleDenominator>