Fixing up readme formatting

This commit is contained in:
Tom MacWright 2011-02-02 16:58:33 -05:00
parent 90fdaab9d7
commit 770da9871f

View File

@ -8,12 +8,24 @@ _incompatibility_
* MML files are assumed to be JSON, not XML. The files are near-identical to the XML files accepted by Cascadenik, just translated into JSON.
* Like Cascadenik, you can also include remote stylesheets, by including their URLs as simple strings in the Stylesheet array.
<table>
<tr>
<th>Cascadenik</th>
<th>Mess.js</th>
</tr>
<td>
mess.js MML:
{
"srs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs",
"Stylesheet": [{"id":"style.mss","data":"Map {\n background-color: #fff;\n}\n\n#world {\n line-color: #ccc;\n line-width: 0.5;\n polygon-fill: #eee;\n}"}],
"Layer": [{
"id": "world",
"name": "world",
"srs": "+proj=latlong +ellps=WGS84 +datum=WGS84 +no_defs",
"Datasource": {
"file": "world_borders",
"type": "shape"
}
}]
}
Cascadenik MML
<pre>&lt;Stylesheet&gt;&lt;![CDATA[
Map
{
@ -34,24 +46,6 @@ _incompatibility_
&lt;/Datasource&gt;
&lt;/Layer&gt;
&lt;/Map&gt;</pre>
</td>
<td>
<pre>{
"srs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs",
"Stylesheet": [{"id":"style.mss","data":"Map {\n background-color: #fff;\n}\n\n#world {\n line-color: #ccc;\n line-width: 0.5;\n polygon-fill: #eee;\n}"}],
"Layer": [{
"id": "world",
"name": "world",
"srs": "+proj=latlong +ellps=WGS84 +datum=WGS84 +no_defs",
"Datasource": {
"file": "world_borders",
"type": "shape"
}
}]
}</pre>
</td>
</tr>
</table>
## Attachments
_new_
@ -85,13 +79,13 @@ Instead of the name attribute of the [TextSymbolizer](http://trac.mapnik.org/wik
<th>mess.js</th>
</tr>
<tr>
<td>
<td valign='top'>
<pre>
#world NAME {
text-face-name: "Arial";
}</pre>
</td>
<td>
<td valign='top'>
<pre>
#world {
text-name: "NAME";
@ -168,7 +162,7 @@ By defining multiple fonts in a `text-face-name` definition, you create [FontSet
<th>mess</th><th>XML</th>
</tr>
<tr>
<td>
<td valign='top'>
<pre>#world {
text-name: "[NAME]";
@ -176,7 +170,8 @@ By defining multiple fonts in a `text-face-name` definition, you create [FontSet
text-face-name: "Georgia Regular", "Arial Italic";
}</pre>
</td><td>
</td>
<td valign='top'>
<pre>&lt;FontSet name=&quot;fontset-0&quot;&gt;
&lt;Font face_name=&quot;Georgia Regular&quot;/&gt;
&lt;Font face_name=&quot;Arial Italic&quot;/&gt;