basicpolygons.sld

来自「电子地图服务器,搭建自己的地图服务」· SLD 代码 · 共 40 行

SLD
40
字号
<?xml version="1.0" encoding="ISO-8859-1"?>
<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">
<!-- a named layer is the basic building block of an sld document -->
<NamedLayer>
<Name>A Test Layer</Name>

<!-- with in a layer you have Named Styles -->
<UserStyle>
    <!-- again they have names, titles and abstracts -->
  <Name>Blue</Name>
  <Title>A blue linestring style</Title>
  <Abstract>A sample style that uses a filter, printing only the
            lines with a LENGTH property of over 5000.  This will work
            with the default bc_roads layer</Abstract>
    <!-- FeatureTypeStyles describe how to render different features -->
    <!-- a feature type for polygons -->
    <FeatureTypeStyle>
      <Rule>
        <!-- like a linesymbolizer but with a fill too -->
        <PolygonSymbolizer> 
		<Fill>
			<CssParameter name="fill">
				<ogc:Literal>#0000C0</ogc:Literal>
			</CssParameter>
			<CssParameter name="fill-opacity">
				<ogc:Literal>1.0</ogc:Literal>
			</CssParameter>
		</Fill>
           <Stroke> 
             <CssParameter name="stroke">#000000</CssParameter> 
             <CssParameter name="stroke-width">2</CssParameter> 
           </Stroke> 
        </PolygonSymbolizer>
      </Rule>
    </FeatureTypeStyle>
</UserStyle>
</NamedLayer>
</StyledLayerDescriptor>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?