From 770da9871fd9c5f784563bab1bb4fdd5b0792470 Mon Sep 17 00:00:00 2001 From: Tom MacWright Date: Wed, 2 Feb 2011 16:58:33 -0500 Subject: [PATCH] Fixing up readme formatting --- README.md | 85 ++++++++++++++++++++++++++----------------------------- 1 file changed, 40 insertions(+), 45 deletions(-) diff --git a/README.md b/README.md index 0fb4eae..39cea88 100644 --- a/README.md +++ b/README.md @@ -8,50 +8,44 @@ _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. - - - - - - - - -
CascadenikMess.js
+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 +
<Stylesheet><![CDATA[
-        Map
-        {
-            map-bgcolor: #69f;
-        }
+    Map
+    {
+        map-bgcolor: #69f;
+    }
 
-        Layer
-        {
-            line-width: 1;
-            line-color: #696;
-            polygon-fill: #6f9;
-        }
-    ]]></Stylesheet>
-    <Layer srs="+proj=latlong +ellps=WGS84 +datum=WGS84 +no_defs">
-        <Datasource>
-            <Parameter name="type">shape</Parameter>
-            <Parameter name="file">world_borders</Parameter>
-        </Datasource>
-    </Layer>
+    Layer
+    {
+        line-width: 1;
+        line-color: #696;
+        polygon-fill: #6f9;
+    }
+]]></Stylesheet>
+<Layer srs="+proj=latlong +ellps=WGS84 +datum=WGS84 +no_defs">
+    <Datasource>
+        <Parameter name="type">shape</Parameter>
+        <Parameter name="file">world_borders</Parameter>
+    </Datasource>
+</Layer>
 </Map>
-
-
{
-    "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"
-        }
-    }]
-}
-
## Attachments _new_ @@ -85,13 +79,13 @@ Instead of the name attribute of the [TextSymbolizer](http://trac.mapnik.org/wik mess.js - +
 #world NAME {
   text-face-name: "Arial";
 }
- +
 #world {
   text-name: "NAME";
@@ -168,7 +162,7 @@ By defining multiple fonts in a `text-face-name` definition, you create [FontSet
     messXML
     
     
-      
+    
 
     
#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";
 }
- + +
<FontSet name="fontset-0">
   <Font face_name="Georgia Regular"/>
   <Font face_name="Arial Italic"/>