map fill-opacity in TextSymbolizer to fontOpacity
This commit is contained in:
@@ -338,9 +338,14 @@ OpenLayers.Format.SLD.v1 = OpenLayers.Class(OpenLayers.Format.Filter.v1_0_0, {
|
||||
"CssParameter": function(node, symbolizer) {
|
||||
var cssProperty = node.getAttribute("name");
|
||||
var symProperty = this.cssMap[cssProperty];
|
||||
// for labels, fill should map to the fontColor
|
||||
if (symbolizer.label && cssProperty === 'fill') {
|
||||
symProperty = "fontColor";
|
||||
// for labels, fill should map to fontColor and fill-opacity
|
||||
// to fontOpacity
|
||||
if (symbolizer.label) {
|
||||
if (cssProperty === 'fill') {
|
||||
symProperty = "fontColor";
|
||||
} else if (cssProperty === 'fill-opacity') {
|
||||
symProperty = "fontOpacity";
|
||||
}
|
||||
}
|
||||
if(symProperty) {
|
||||
// Limited support for parsing of OGC expressions
|
||||
@@ -893,9 +898,10 @@ OpenLayers.Format.SLD.v1 = OpenLayers.Class(OpenLayers.Format.Filter.v1_0_0, {
|
||||
}
|
||||
// add in optional Fill
|
||||
if(symbolizer.fontColor != null ||
|
||||
symbolizer.fillOpacity != null) {
|
||||
symbolizer.fontOpacity != null) {
|
||||
this.writeNode("Fill", {
|
||||
fillColor: symbolizer.fontColor
|
||||
fillColor: symbolizer.fontColor,
|
||||
fillOpacity: symbolizer.fontOpacity
|
||||
}, node);
|
||||
}
|
||||
return node;
|
||||
|
||||
Reference in New Issue
Block a user