geoserver 黑白相间铁路样式文件

今天从网上搜索一下铁路样式文件,然后给冬梅更改了一下,铁路显示黑白相间,好看。既然是好东西,就记录下来,备着以后用。
­
<?xml version=”1.0″ encoding=”UTF-8″?>
<sld:StyledLayerDescriptor xmlns:sld=”http://www.opengis.net/sld” xmlns:ogc=”http://www.opengis.net/ogc” xmlns:gml=”http://www.opengis.net/gml” version=”1.0.0″>
    <sld:UserLayer>
        <sld:LayerFeatureConstraints>
            <sld:FeatureTypeConstraint/>
        </sld:LayerFeatureConstraints>
        <sld:UserStyle>
            <sld:Name>Default Styler</sld:Name>
            <sld:Title>Default Styler</sld:Title>
            <sld:Abstract></sld:Abstract>
            <sld:FeatureTypeStyle>
                <sld:Name>simple</sld:Name>
                <sld:Title>title</sld:Title>
                <sld:Abstract>abstract</sld:Abstract>
                <sld:SemanticTypeIdentifier>generic:geometry</sld:SemanticTypeIdentifier>
                <sld:SemanticTypeIdentifier>simple</sld:SemanticTypeIdentifier>
                <sld:Rule>
                    <sld:Name>name</sld:Name>
                    <sld:Title>title</sld:Title>
                    <sld:Abstract>Abstract</sld:Abstract>
                    
                    <sld:LineSymbolizer>
                        <sld:Stroke>
          <sld:CssParameter name=”stroke”>
           <ogc:Literal>#000000</ogc:Literal>
          </sld:CssParameter>
          <sld:CssParameter name=”stroke-width”>
           <ogc:Literal>4</ogc:Literal> <!–铁路宽度 –>
          </sld:CssParameter>
         </sld:Stroke>
      </sld:LineSymbolizer>
          </sld:Rule>
    </sld:FeatureTypeStyle>  
        <sld:FeatureTypeStyle>
     <sld:FeatureTypeName>Feature</sld:FeatureTypeName>
      <sld:Rule>
       <sld:LineSymbolizer>
        <sld:Stroke>
           <sld:CssParameter name=”stroke”>
             <ogc:Literal>#FFFFFF</ogc:Literal>
           </sld:CssParameter>
           <sld:CssParameter name=”stroke-width”>
             <ogc:Literal>2</ogc:Literal>
           </sld:CssParameter>
          </sld:Stroke>
             </sld:LineSymbolizer>
            </sld:Rule>
    </sld:FeatureTypeStyle>  
        <sld:FeatureTypeStyle>  
       <sld:Rule>
        <sld:LineSymbolizer>
              <sld:Stroke>
           <sld:CssParameter name=”stroke”>#000000</sld:CssParameter>
           <sld:CssParameter name=”stroke-width”>2</sld:CssParameter>
           <sld:CssParameter name=”stroke-dasharray”>15 15</sld:CssParameter> <!–黑白的间隔长度–>
          </sld:Stroke>
                    </sld:LineSymbolizer>                  
                    
                </sld:Rule>
            </sld:FeatureTypeStyle>
        </sld:UserStyle>
    </sld:UserLayer>
</sld:StyledLayerDescriptor>
­
那个写 blog的老兄是专门搞地图的,地址如下:http://blog.sina.com.cn/s/blog_4c079bcb01000ate.htm

转载自:https://blog.csdn.net/cyw8998/article/details/3907410

You may also like...