Skip to content

SLD styles version 1.1.0 are not saved correctly from Style Editor #3712

@allyoucanmap

Description

@allyoucanmap

Description

SLD styles version 1.1.0 are not saved correctly from MapStore Style Editor.

style to test SLD version 1.1.0 (SE) fill orange with black stroke

<?xml version="1.0" encoding="UTF-8"?>
<StyledLayerDescriptor
    xmlns="http://www.opengis.net/sld"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.opengis.net/sld http://schemas.opengis.net/sld/1.1.0/StyledLayerDescriptor.xsd"
    xmlns:se="http://www.opengis.net/se"
    version="1.1.0"
    xmlns:ogc="http://www.opengis.net/ogc"
    xmlns:xlink="http://www.w3.org/1999/xlink">
  <NamedLayer>
    <se:Name>test_style</se:Name>
    <UserStyle>
      <se:Name>test_style</se:Name>
      <se:FeatureTypeStyle>
        <se:Rule>
          <se:Name>Polygon</se:Name>
          <se:PolygonSymbolizer>
            <se:Fill>
              <se:SvgParameter name="fill">#ffaa33</se:SvgParameter>
            </se:Fill>
            <se:Stroke>
              <se:SvgParameter name="stroke">#000000</se:SvgParameter>
            </se:Stroke>
          </se:PolygonSymbolizer>
        </se:Rule>
      </se:FeatureTypeStyle>
    </UserStyle>
  </NamedLayer>
</StyledLayerDescriptor>

In case of Bug (otherwise remove this paragraph)

Browser Affected
(use this site: https://www.whatsmybrowser.org/ for non expert users)

  • Internet Explorer
  • Chrome
  • Firefox
  • Safari

Browser Version Affected

  • all, related to Content Type in the request

Steps to reproduce

  • user needs to login as admin and MapStore configured with GeoServer to edit styles
  • open a map with a polygon layer
  • select layer in TOC and open the properties
  • select style tab and create a new SLD style from template
  • select the saved style in the list and click on edit </> icon
  • copy test_style in the textarea (SLD style described above)

Expected Result

  • polygons are rendered with black border and orange fill

Current Result

  • polygons are not rendered correctly, default grey fill

Other useful information (optional):

  • please test also the complete workflow by saving the style and try to edit another one with different format (CSS)

  • try also to copy a SLD version 1.0.0 after copied the test_style inside the textarea to verify that content types are correctly updated

SLD version 1.0.0 blue border with a square red marker

<?xml version="1.0" encoding="UTF-8"?><sld:StyledLayerDescriptor xmlns="http://www.opengis.net/sld" xmlns:sld="http://www.opengis.net/sld" xmlns:gml="http://www.opengis.net/gml" xmlns:ogc="http://www.opengis.net/ogc" version="1.0.0">
  <sld:NamedLayer>
    <sld:Name>Default Styler</sld:Name>
    <sld:UserStyle>
      <sld:Name>Default Styler</sld:Name>
      <sld:Title>Base SLD</sld:Title>
      <sld:FeatureTypeStyle>
        <sld:Name>name</sld:Name>
        <sld:Rule>
          <sld:Name>Rule Name</sld:Name>
          <sld:Title>Rule Title</sld:Title>
          <sld:Abstract>Rule Abstract</sld:Abstract>
          <sld:LineSymbolizer>
            <sld:Stroke>
              <sld:CssParameter name="stroke">#0000FF</sld:CssParameter>
            </sld:Stroke>
          </sld:LineSymbolizer>
          <sld:PointSymbolizer>
            <sld:Graphic>
              <sld:Mark>
                <sld:Fill>
                  <sld:CssParameter name="fill">#FF0000</sld:CssParameter>
                </sld:Fill>
              </sld:Mark>
            </sld:Graphic>
          </sld:PointSymbolizer>
        </sld:Rule>
      </sld:FeatureTypeStyle>
    </sld:UserStyle>
  </sld:NamedLayer>
</sld:StyledLayerDescriptor>

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions