如图我在wms中添加了sld文件,然后发布的时候选择了该服务,但是样式没有生效。样式文件是从geoserver中迁移过来的,如下:
<?xml version="1.0" encoding="UTF-8"?>
<StyledLayerDescriptor version="1.0.0"
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" xsi:schemaLocation="http://www.opengis.net/sld StyledLayerDescriptor.xsd">
<NamedLayer>
<Name>green</Name>
<UserStyle>
<Name>green</Name>
<Title>Green polygon</Title>
<Abstract>Green fill with black outline</Abstract>
<FeatureTypeStyle>
<Rule>
<PolygonSymbolizer>
<Fill>
<CssParameter name="fill">#fff</CssParameter>
<CssParameter name="fill-opacity">0</CssParameter>
</Fill>
<Stroke>
<CssParameter name="stroke">#c48c6c</CssParameter>
<CssParameter name="stroke-width">5</CssParameter>
</Stroke>
</PolygonSymbolizer>
</Rule>
</FeatureTypeStyle>
</UserStyle>
</NamedLayer>
</StyledLayerDescriptor>