Index: /trunk/test/atmsdriver/model/HighwaysTest.java
===================================================================
--- /trunk/test/atmsdriver/model/HighwaysTest.java	(revision 228)
+++ /trunk/test/atmsdriver/model/HighwaysTest.java	(revision 243)
@@ -94,4 +94,15 @@
 "  5 S @--";
 
+    public void testToJson() {
+        System.out.println("toJson");
+        Highways highways = new Highways(
+                "config/vds_data/highways_fullmap.txt",
+                "localhost", 8080);
+        highways.getHighwayByRouteNumber(5).stations.get(0).loops.get(0).vol = 1;
+        String result = highways.toJson();
+        System.out.println(result);
+        assertTrue(result.startsWith(expToJson1));
+    }
+    String expToJson1 = ""; 
    
 
Index: /trunk/src/atmsdriver/model/Highways.java
===================================================================
--- /trunk/src/atmsdriver/model/Highways.java	(revision 238)
+++ /trunk/src/atmsdriver/model/Highways.java	(revision 243)
@@ -5,4 +5,5 @@
 import atmsdriver.model.Station.DIRECTION;
 import java.io.File;
+import java.io.FileInputStream;
 import java.io.FileNotFoundException;
 import java.io.IOException;
@@ -522,4 +523,77 @@
         return result.toString();
     }
+    /** Return a json representation of the Highways, readable by Google Maps */
+    public String toJson()
+    {
+        PostmileCoords pmList = new PostmileCoords();
+        FileInputStream fis = null;
+        try
+        {
+            fis = new FileInputStream("config/vds_data/postmile_coordinates.txt");
+        }
+        catch (FileNotFoundException ex)
+        {
+            Logger.getLogger(Highways.class.getName()).log(Level.SEVERE, null, ex);
+        }
+        Scanner s = new Scanner(fis).useDelimiter("\\A");
+        pmList.load(s);
+        String header = "{\n" +
+        "  \"type\": \"FeatureCollection\",\n" +
+        "  \"features\": [";
+        StringBuilder result = new StringBuilder();
+        result.append(header);
+        for (Highway hwy: highways)
+        {
+            // Consider each route direction
+            //for (DIRECTION dir: DIRECTION.values())
+            // TODO: Needs fixing so proper direction is displayed
+            Station.DIRECTION dir = Station.DIRECTION.SOUTH;
+            if (hwy.routeNumber == 55)
+                dir = Station.DIRECTION.SOUTH;
+            if (hwy.routeNumber == 405)
+                dir = Station.DIRECTION.NORTH;
+            {
+                String rowLabel = ""+String.format("%3s ",hwy.routeNumber)+dir.getLetter()+' ';
+                StringBuilder lineout = new StringBuilder();
+                // Examine every station on this highway and direction
+                for (Station stat: hwy.stations)
+                {
+                    String pmID = "" + hwy.routeNumber + " " + stat.postmile;
+                    PostmileCoords.Postmile currentPM = pmList.find(pmID);
+                    if (currentPM != null)
+                    {    
+                    //lineout.append("" + dir.getLetter() + stat.postmile);
+                    //lineout.append(stat.getColorByDirection(dir));
+                    String outString = currentPM.toJson();
+                    String colorName="";
+                    switch (stat.getColorByDirection(dir))
+                    {
+                        case '@': colorName = "red";break;
+                        case '+': colorName = "yellow"; break;
+                        case '-': colorName = "green";break;
+                        case ' ': colorName = "green";break;
+                    }
+                    outString = outString.replace("green",colorName);
+                    lineout.append(outString);
+                    lineout.append("  ");
+                    }
+                }
+                                // See if there were stations for this direction
+                String checkMe = lineout.toString().trim();
+                // if any stations were colored, output the line
+                if (checkMe.length() > 1)
+                {
+                    //result.append(rowLabel);
+                    result.append(lineout + "\n");
+                }
+
+            }
+        }
+        // remove last trailing comma
+        result.replace(result.lastIndexOf(","), result.lastIndexOf(",") + 1, " "  );
+
+        result.append("  ]\n" +  "}");
+        return result.toString();
+    }
     
     /**
