Index: /nodes/make-map.py
===================================================================
--- /nodes/make-map.py	(revision 8281)
+++ /nodes/make-map.py	(revision 8282)
@@ -64,4 +64,118 @@
 
 def make_graph():
+  f = open('kmlfile.kml', 'w')
+  f.write("""
+<?xml version="1.0" encoding="UTF-8"?>
+<kml xmlns="http://earth.google.com/kml/2.0">
+  <Document>
+    <name>KML Samples</name>
+    <open>1</open>
+    <description>Unleash your creativity with the help of these examples!</description>
+    <Style id="downArrowIcon">
+      <IconStyle>
+        <Icon>
+          <href>http://maps.google.com/mapfiles/kml/pal4/icon28.png</href>
+        </Icon>
+      </IconStyle>
+    </Style>
+    <Style id="globeIcon">
+      <IconStyle>
+        <Icon>
+          <href>http://maps.google.com/mapfiles/kml/pal3/icon19.png</href>
+        </Icon>
+      </IconStyle>
+      <LineStyle>
+        <width>2</width>
+      </LineStyle>
+    </Style>
+    <Style id="transPurpleLineGreenPoly">
+      <LineStyle>
+        <color>7fff00ff</color>
+        <width>4</width>
+      </LineStyle>
+      <PolyStyle>
+        <color>7f00ff00</color>
+      </PolyStyle>
+    </Style>
+    <Style id="yellowLineGreenPoly">
+      <LineStyle>
+        <color>7f00ffff</color>
+        <width>4</width>
+      </LineStyle>
+      <PolyStyle>
+        <color>7f00ff00</color>
+      </PolyStyle>
+    </Style>
+    <Style id="thickBlackLine">
+      <LineStyle>
+        <color>87000000</color>
+        <width>10</width>
+      </LineStyle>
+    </Style>
+    <Style id="redLineBluePoly">
+      <LineStyle>
+        <color>ff0000ff</color>
+      </LineStyle>
+      <PolyStyle>
+        <color>ffff0000</color>
+      </PolyStyle>
+    </Style>
+    <Style id="blueLineRedPoly">
+      <LineStyle>
+        <color>ffff0000</color>
+      </LineStyle>
+      <PolyStyle>
+        <color>ff0000ff</color>
+      </PolyStyle>
+    </Style>
+    <Style id="transRedPoly">
+      <LineStyle>
+        <width>1.5</width>
+      </LineStyle>
+      <PolyStyle>
+        <color>7d0000ff</color>
+      </PolyStyle>
+    </Style>
+    <Style id="transBluePoly">
+      <LineStyle>
+        <width>1.5</width>
+      </LineStyle>
+      <PolyStyle>
+        <color>7dff0000</color>
+      </PolyStyle>
+    </Style>
+    <Style id="transGreenPoly">
+      <LineStyle>
+        <width>1.5</width>
+      </LineStyle>
+      <PolyStyle>
+        <color>7d00ff00</color>
+      </PolyStyle>
+    </Style>
+    <Style id="transYellowPoly">
+      <LineStyle>
+        <width>1.5</width>
+      </LineStyle>
+      <PolyStyle>
+        <color>7d00ffff</color>
+      </PolyStyle>
+    </Style>
+    <Style id="noDrivingDirections">
+      <BalloonStyle>
+        <text><![CDATA[
+          <b>$[name]</b>
+          <br /><br />
+          $[description]
+        ]]></text>
+      </BalloonStyle>
+    </Style>
+    <Folder>
+      <name>Paths</name>
+      <visibility>0</visibility>
+      <description>Examples of paths. Note that the tessellate tag is by default
+        set to 0. If you want to create tessellated lines, they must be authored
+        (or edited) directly in KML.</description>
+    """)
+
   poel = {}
   link_type = {}
@@ -94,4 +208,14 @@
       lam, phi = rd2etrs(datadump['rdnap_x'], datadump['rdnap_y'])
       node[host] = (lam, phi)
+      f.write("""
+		<Placemark>
+			<name>Blue Icon</name>
+			<description>Just another blue icon.</description>
+			<styleUrl>./styles.kml#blueIcons</styleUrl>
+			<Point>
+				<coordinates>%s,%s,630</coordinates>
+			</Point>
+		</Placemark>
+   """ % (lam, phi))
       nodes += [("POINT(%s, %s)" % (lam, phi))]
   except (KeyError, ValueError), e:
@@ -113,11 +237,21 @@
     for index,lid in enumerate(leden[:-1]):
       for buur in leden[index + 1:]:
-        links += ["LINESTRING(%s %s,%s %s)" % (node[lid][0], node[lid][1], node[buur][0], node[buur][1])]
-
-  f = open('wktfile.txt', 'w')
-  f.write("GEOMETRYCOLLECTION(\n")
-  f.write(",\n".join(nodes))
-  f.write(",\n".join(links))
-  f.write(")\n")
+        f.write("""
+      <Placemark>
+        <name>Untessellated</name>
+        <visibility>0</visibility>
+        <description><![CDATA[If the <tessellate> tag has a value of 0, the line follow a simple straight-line path from point to point]]></description>
+        <LineString>
+          <tessellate>0</tessellate>
+          <coordinates> %s, %s, 0
+            %s , %s, 0 </coordinates>
+        </LineString>
+      </Placemark>
+      """ % (node[lid][0], node[lid][1], node[buur][0], node[buur][1]))
+  f.write("""
+    </Folder>
+  </Document>
+</kml>
+  """)
   f.close()
 
Index: /nodes/nodemap.html
===================================================================
--- /nodes/nodemap.html	(revision 8281)
+++ /nodes/nodemap.html	(revision 8282)
@@ -9,5 +9,7 @@
       }
     </style>
-    <script src="http://www.openlayers.org/api/OpenLayers.js"></script>
+    <!-- <script src="http://www.openlayers.org/api/OpenLayers.js"></script> -->
+    <script src="http://openlayers.org/dev/OpenLayers.js"</script>
+
     <script>
       function init() {
@@ -16,47 +18,61 @@
         map.addLayer(mapnik);
 
-        var pois = new OpenLayers.Layer.Text( "My Points",
-                           { location:"./textfile.txt",
-                             projection: map.displayProjection
-                           });
-        map.addLayer(pois);
+        //layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
+        //        "http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} );
+        //map.addLayer(layer);
+        //var pois = new OpenLayers.Layer.Text( "My Points",
+        //                   { location:"./textfile.txt",
+        //                     projection: map.displayProjection
+        //                   });
+        //map.addLayer(pois);
 
-        var vectors = new OpenLayers.Layer.Vector("Vector Layer")
-        map.addLayer(vectors);
-        map.addControl(new OpenLayers.Control.MousePosition());
-        map.addControl(new OpenLayers.Control.EditingToolbar(vectors));
+        var kml = new OpenLayers.Layer.GML("KML", "./kmlfile.kml",
+            { format: OpenLayers.Format.KML,
+              formatOptions: {
+                extractStyles: true, 
+                extractAttributes: true,
+                maxDepth: 2
+              }
+            });
+        map.addLayer(kml);
 
-        var in_options = {
-          'internalProjection': map.baseLayer.projection,
-          'externalProjection': new OpenLayers.Projection("EPSG:4326")
-        };
-        var wkt = new OpenLayers.Format.WKT(in_options);
-        var txtFile = new XMLHttpRequest();
-        txtFile.open("GET", "./wktfile.txt", false);
-        // txtFile.onreadystatechange = function() {
-        //   if(txtFile.readyState == 4) {
-        //     alert(txtFile.responseText);
-        //   }
-        // }
-        txtFile.send(null);
 
-        var features = wkt.read(txtFile.responseText.replace(/\n/g,''));
-        var bounds;
-        
-        if (features) {
-          if(features.constructor != Array) {
-           features = [features];
-          }
-          for(var i=0; i<features.length; ++i) {
-            if (!bounds) {
-              bounds = features[i].geometry.getBounds();
-            }
-            bounds.extend(features[i].geometry.getBounds());
-          }
-          vectors.addFeatures(features);
-          map.zoomToExtent(bounds);
-       } else {
-        alert("ERROR in WTK");
-       }
+        //var vectors = new OpenLayers.Layer.Vector("Vector Layer")
+        //map.addLayer(vectors);
+        //map.addControl(new OpenLayers.Control.MousePosition());
+        //map.addControl(new OpenLayers.Control.EditingToolbar(vectors));
+
+        //var in_options = {
+        //  'internalProjection': map.baseLayer.projection,
+        //  'externalProjection': new OpenLayers.Projection("EPSG:4326")
+        //};
+        //var wkt = new OpenLayers.Format.WKT(in_options);
+        //var txtFile = new XMLHttpRequest();
+        //txtFile.open("GET", "./wktfile.txt", false);
+        //// txtFile.onreadystatechange = function() {
+        ////   if(txtFile.readyState == 4) {
+        ////     alert(txtFile.responseText);
+        ////   }
+        //// }
+        //txtFile.send(null);
+
+        //var features = wkt.read(txtFile.responseText.replace(/\n/g,''));
+        //var bounds;
+        //
+        //if (features) {
+        //  if(features.constructor != Array) {
+        //   features = [features];
+        //  }
+        //  for(var i=0; i<features.length; ++i) {
+        //    if (!bounds) {
+        //      bounds = features[i].geometry.getBounds();
+        //    }
+        //    bounds.extend(features[i].geometry.getBounds());
+        //  }
+        //  vectors.addFeatures(features);
+        //  map.zoomToExtent(bounds);
+        //} else {
+        //   alert("ERROR in WTK");
+        //}
 
          map.setCenter(new OpenLayers.LonLat(4.40,52.186) // Center of the map
