No longer writes out layer status if it is undefined

cdb-0.8
AJ Ashton 12 years ago
parent 991feb9ba3
commit ff0f0fc9f9

@ -2,7 +2,6 @@
tree.Layer = function Layer(obj) {
this.name = obj.name;
if (typeof obj.status === 'undefined') obj.status = true;
this.status = obj.status;
this.styles = obj.styles;
this.properties = obj.properties || {};
@ -25,7 +24,7 @@ tree.Layer.prototype.toXML = function() {
return '<Layer' +
' name="' + this.name + '"\n' +
prop_string +
' status="' + this.status + '"\n' +
((typeof this.status === 'undefined') ? '' : ' status="' + this.status + '"\n') +
' srs="' + this.srs + '">\n ' +
this.styles.reverse().map(function(s) {
return '<StyleName>' + s + '</StyleName>';

Loading…
Cancel
Save