setting graphic to false by default when reading a TextSymbolizer, just like is done on other symbolizers
This commit is contained in:
@@ -207,7 +207,9 @@ OpenLayers.Format.SLD.v1 = OpenLayers.Class(OpenLayers.Format.Filter.v1_0_0, {
|
||||
rule.maxScaleDenominator = parseFloat(this.getChildValue(node));
|
||||
},
|
||||
"TextSymbolizer": function(node, rule) {
|
||||
var config = {};
|
||||
var config = {
|
||||
graphic: false
|
||||
};
|
||||
this.readChildNodes(node, config);
|
||||
if (this.multipleSymbolizers) {
|
||||
config.zIndex = this.featureTypeCounter;
|
||||
|
||||
@@ -622,6 +622,17 @@
|
||||
|
||||
}
|
||||
|
||||
function test_readTextSymbolizer(t) {
|
||||
t.plan(1);
|
||||
var format = new OpenLayers.Format.SLD.v1_0_0({
|
||||
multipleSymbolizers: true,
|
||||
namedLayersAsArray: true
|
||||
});
|
||||
doc = readXML("point_pointwithdefaultlabel.sld");
|
||||
var sld = format.read(doc);
|
||||
t.eq(sld.namedLayers[0].userStyles[0].rules[0].symbolizers[1].graphic, false, "graphic set to false on TextSymbolizer");
|
||||
}
|
||||
|
||||
function test_roundtrip(t) {
|
||||
|
||||
t.plan(5);
|
||||
|
||||
Reference in New Issue
Block a user