Open geographika opened 4 years ago
Problem ist at the OpenLayer Parser. When I use the SLD preview everything is correct:
SLD renderer
vs.
OpenLayers renderer
I'd suggest to make a version upgrade of geostyler-openlayers-parser first and check if this solves the problem. Otherwise this has to be fixed there.
Thanks for looking at this. Currently geostyler-openlayers-parser
has to remain on 0.21.0
as v1.0.0 requires OpenLayers 5.0 or higher.
Will review again if we move to OL6 in the future.
Same behaviour in the latest version
It appears for a cross
a default stroke is applied if none is set.
I'm unsure if cross
should support just fill
(the SLD in the first example was generated by MapServer).
Setting a <stroke>
in the XML allows the colour to be set correctly:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<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>ruins</Name>
<UserStyle>
<Name>ruins</Name>
<Title>ruins</Title>
<FeatureTypeStyle>
<Rule>
<Name>POI: Ruins</Name>
<PointSymbolizer>
<Graphic>
<Mark>
<WellKnownName>cross</WellKnownName>
<Stroke>
<CssParameter name="stroke">#ffd966</CssParameter>
<CssParameter name="stroke-width">3</CssParameter>
</Stroke>
</Mark>
<Size>8</Size>
</Graphic>
</PointSymbolizer>
</Rule>
</FeatureTypeStyle>
</UserStyle>
</NamedLayer>
</StyledLayerDescriptor>
I'm unsure if cross should support just fill (the SLD in the first example was generated by MapServer).
Also unsure what the standard says. We might have to check if this is standard compliant. If yes we could adapt the geostyler parser.
One of the new demo layers uses a cross symbol based on the SLD generated by https://w08-mapserver.compass.ie/mapserver/?map=/MapServer/apps/mapview-demo/example.map&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetStyles&LAYERS=ruins
The legend displays the correct colour (yellow), but the features themselves are displayed in black. See screencast at https://drive.google.com/file/d/1azO1N_ur1wQDRmDRsfEok_TFqw91YgWD/view
Updating
#ffd966
toyellow
does not change the result.