Writing sld:Mark fill and stroke in cases where graphicName is not provided. r=ahocevar (closes #2008)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@9139 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Tim Schaub
2009-03-27 02:02:58 +00:00
parent 84fa9dd1ae
commit a9e087b5b9
2 changed files with 67 additions and 2 deletions

View File

@@ -786,7 +786,7 @@ OpenLayers.Format.SLD.v1 = OpenLayers.Class(OpenLayers.Format.Filter.v1_0_0, {
var node = this.createElementNSPlus("Graphic");
if(symbolizer.externalGraphic != undefined) {
this.writeNode("ExternalGraphic", symbolizer, node);
} else if(symbolizer.graphicName) {
} else {
this.writeNode("Mark", symbolizer, node);
}
@@ -813,7 +813,9 @@ OpenLayers.Format.SLD.v1 = OpenLayers.Class(OpenLayers.Format.Filter.v1_0_0, {
},
"Mark": function(symbolizer) {
var node = this.createElementNSPlus("Mark");
this.writeNode("WellKnownName", symbolizer.graphicName, node);
if(symbolizer.graphicName) {
this.writeNode("WellKnownName", symbolizer.graphicName, node);
}
this.writeNode("Fill", symbolizer, node);
this.writeNode("Stroke", symbolizer, node);
return node;