No longer writes out layer status if it is undefined
This commit is contained in:
parent
991feb9ba3
commit
ff0f0fc9f9
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
tree.Layer = function Layer(obj) {
|
tree.Layer = function Layer(obj) {
|
||||||
this.name = obj.name;
|
this.name = obj.name;
|
||||||
if (typeof obj.status === 'undefined') obj.status = true;
|
|
||||||
this.status = obj.status;
|
this.status = obj.status;
|
||||||
this.styles = obj.styles;
|
this.styles = obj.styles;
|
||||||
this.properties = obj.properties || {};
|
this.properties = obj.properties || {};
|
||||||
@ -25,7 +24,7 @@ tree.Layer.prototype.toXML = function() {
|
|||||||
return '<Layer' +
|
return '<Layer' +
|
||||||
' name="' + this.name + '"\n' +
|
' name="' + this.name + '"\n' +
|
||||||
prop_string +
|
prop_string +
|
||||||
' status="' + this.status + '"\n' +
|
((typeof this.status === 'undefined') ? '' : ' status="' + this.status + '"\n') +
|
||||||
' srs="' + this.srs + '">\n ' +
|
' srs="' + this.srs + '">\n ' +
|
||||||
this.styles.reverse().map(function(s) {
|
this.styles.reverse().map(function(s) {
|
||||||
return '<StyleName>' + s + '</StyleName>';
|
return '<StyleName>' + s + '</StyleName>';
|
||||||
|
Loading…
Reference in New Issue
Block a user