diff --git a/lib/carto/tree/layer.js b/lib/carto/tree/layer.js index c1b3f55..24e61ce 100644 --- a/lib/carto/tree/layer.js +++ b/lib/carto/tree/layer.js @@ -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 '' + s + ''; }).join('\n ') + diff --git a/test/rendering/issue294.mml b/test/rendering/issue294.mml new file mode 100644 index 0000000..7e8d6c0 --- /dev/null +++ b/test/rendering/issue294.mml @@ -0,0 +1,11 @@ +{ + "srs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over", + "Stylesheet": [], + "Layer": [{ + "name": "world", + "Datasource": { + "file": "http://tilemill-data.s3.amazonaws.com/test_data/shape_demo.zip", + "type": "shape" + } + }] +} diff --git a/test/rendering/issue294.result b/test/rendering/issue294.result new file mode 100644 index 0000000..f396629 --- /dev/null +++ b/test/rendering/issue294.result @@ -0,0 +1,15 @@ + + + + + + + + + + + + + +