You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey. I think I found an issue when working with Sld and OpenLayers parsers. Sld parses fill-opacity to fillOpacity field:
case 'fill-opacity':
fillSymbolizer.fillOpacity = parseFloat(value);
break;
However later on opacity field is also set:
if (!fillSymbolizer.color) {
fillSymbolizer.opacity = 0;
}
I also found out that in OpenLayers parser, when creating Polygon symbolizer from Fill symbolizer, opacity field is used, which won't work because the opacity will be null because the color is set, therefor the color will always be solid:
getOlPolygonSymbolizerFromFillSymbolizer(symbolizer: FillSymbolizer): OlStyleFill {
let fill = symbolizer.color ? new this.OlStyleFillConstructor({
color: (symbolizer.opacity !== null && symbolizer.opacity !== undefined) ?
OlStyleUtil.getRgbaColor(symbolizer.color, symbolizer.opacity) : symbolizer.color
}) : null;
Am I correct in thinking that this is not right? If this is an issue, is it an issue of Sld or OpenLayers parser?
The text was updated successfully, but these errors were encountered:
Actually you could arguee, that an opacity without a fillcolor does not make sence, but I think you're right and we should not modify this. Maybe you could open a PR with a (failing) test that contains the input and expected output?
I think you're also right about the OLParser. Would be nice if you could open an issue here. And same as for the bug here. An PR with a failing test for the input and expected output would be very helpful.
Question
Hey. I think I found an issue when working with Sld and OpenLayers parsers. Sld parses fill-opacity to fillOpacity field:
However later on opacity field is also set:
I also found out that in OpenLayers parser, when creating Polygon symbolizer from Fill symbolizer, opacity field is used, which won't work because the opacity will be null because the color is set, therefor the color will always be solid:
Am I correct in thinking that this is not right? If this is an issue, is it an issue of Sld or OpenLayers parser?
The text was updated successfully, but these errors were encountered: