layer srs is inherited from map srs

Do not output srs attribute when srs is undefined,
since layer srs is inherited from map srs, it is optional.
This commit is contained in:
Jérémy Lal 2013-08-26 14:41:07 +02:00
parent 525bdc5bef
commit b63fe0a9af

View File

@ -22,7 +22,7 @@ tree.LayerXML = function(obj, styles) {
' name="' + obj.name + '"\n' +
prop_string +
((typeof obj.status === 'undefined') ? '' : ' status="' + obj.status + '"\n') +
' srs="' + obj.srs + '">\n ' +
((typeof obj.srs === 'undefined') ? '' : ' srs="' + obj.srs + '"') + '>\n ' +
styles.reverse().map(function(s) {
return '<StyleName>' + s + '</StyleName>';
}).join('\n ') +