Merge pull request #294 from kapouer/patch-1

layer srs is inherited from map srs
This commit is contained in:
Tom MacWright 2013-09-17 07:26:08 -07:00
commit 2c9692b029
3 changed files with 27 additions and 1 deletions

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 ') +

View File

@ -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"
}
}]
}

View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE Map[]>
<Map 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" maximum-extent="-20037508.34,-20037508.34,20037508.34,20037508.34">
<Layer name="world"
>
<Datasource>
<Parameter name="file"><![CDATA[[absolute path]]]></Parameter>
<Parameter name="type"><![CDATA[shape]]></Parameter>
</Datasource>
</Layer>
</Map>