fix #339
This commit is contained in:
parent
580e946cc0
commit
4f771ed2a5
@ -97,6 +97,7 @@ tree.Definition.prototype.symbolizersToXML = function(env, symbolizers, zoom) {
|
||||
}
|
||||
|
||||
sym_order = symbolizerList(sym_order);
|
||||
var sym_count = 0;
|
||||
|
||||
for (var i = 0; i < sym_order.length; i++) {
|
||||
var attributes = symbolizers[sym_order[i]];
|
||||
@ -105,6 +106,7 @@ tree.Definition.prototype.symbolizersToXML = function(env, symbolizers, zoom) {
|
||||
// Skip the magical * symbolizer which is used for universal properties
|
||||
// which are bubbled up to Style elements intead of Symbolizer elements.
|
||||
if (symbolizer === '*') continue;
|
||||
sym_count++;
|
||||
|
||||
var fail = tree.Reference.requiredProperties(symbolizer, attributes);
|
||||
if (fail) {
|
||||
@ -147,7 +149,7 @@ tree.Definition.prototype.symbolizersToXML = function(env, symbolizers, zoom) {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!xml) return '';
|
||||
if (!sym_count || !xml) return '';
|
||||
return ' <Rule>\n' + xml + ' </Rule>\n';
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user