Index: /trunk/src/org/openstreetmap/josm/data/osm/visitor/MapPaintVisitor.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/osm/visitor/MapPaintVisitor.java	(revision 1295)
+++ /trunk/src/org/openstreetmap/josm/data/osm/visitor/MapPaintVisitor.java	(revision 1296)
@@ -46,4 +46,5 @@
     protected boolean drawMultipolygon;
     protected boolean drawRestriction;
+    protected boolean leftHandTraffic;
     protected boolean restrictionDebug;
     protected int showNames;
@@ -660,9 +661,10 @@
         double dy = (pFrom.y >= pVia.y) ? (pFrom.y - pVia.y) : (pVia.y - pFrom.y);
         
+        double fromAngle;
         if(dx == 0.0) {
-            System.out.println("dx " + dx);
-            return;
-        }
-        double fromAngle = Math.atan(dy / dx);
+            fromAngle = Math.PI/2;
+        } else {
+            fromAngle = Math.atan(dy / dx);
+        }
         double fromAngleDeg = Math.toDegrees(fromAngle);
 
@@ -684,21 +686,41 @@
 
         if(pFrom.x >= pVia.x && pFrom.y >= pVia.y) {
-            vx2 = distanceFromWay * Math.cos(Math.toRadians(fromAngleDeg - 90));
-            vy2 = distanceFromWay * Math.sin(Math.toRadians(fromAngleDeg - 90));
+            if(leftHandTraffic) {
+                vx2 = distanceFromWay * Math.cos(Math.toRadians(fromAngleDeg - 90));
+                vy2 = distanceFromWay * Math.sin(Math.toRadians(fromAngleDeg - 90));
+            } else {
+                vx2 = distanceFromWay * Math.cos(Math.toRadians(fromAngleDeg + 90));
+                vy2 = distanceFromWay * Math.sin(Math.toRadians(fromAngleDeg + 90));
+            }
             iconAngle = 270+fromAngleDeg;
         }
         if(pFrom.x < pVia.x && pFrom.y >= pVia.y) {
-            vx2 = distanceFromWay * Math.sin(Math.toRadians(fromAngleDeg));
-            vy2 = distanceFromWay * Math.cos(Math.toRadians(fromAngleDeg));
+            if(leftHandTraffic) {
+                vx2 = distanceFromWay * Math.sin(Math.toRadians(fromAngleDeg));
+                vy2 = distanceFromWay * Math.cos(Math.toRadians(fromAngleDeg));
+            } else {
+                vx2 = distanceFromWay * Math.sin(Math.toRadians(fromAngleDeg + 180));
+                vy2 = distanceFromWay * Math.cos(Math.toRadians(fromAngleDeg + 180));
+            }
             iconAngle = 90-fromAngleDeg;
         }
         if(pFrom.x < pVia.x && pFrom.y < pVia.y) {
-            vx2 = distanceFromWay * Math.cos(Math.toRadians(fromAngleDeg + 90));
-            vy2 = distanceFromWay * Math.sin(Math.toRadians(fromAngleDeg + 90));
+            if(leftHandTraffic) {
+                vx2 = distanceFromWay * Math.cos(Math.toRadians(fromAngleDeg + 90));
+                vy2 = distanceFromWay * Math.sin(Math.toRadians(fromAngleDeg + 90));
+            } else {
+                vx2 = distanceFromWay * Math.cos(Math.toRadians(fromAngleDeg - 90));
+                vy2 = distanceFromWay * Math.sin(Math.toRadians(fromAngleDeg - 90));
+            }
             iconAngle = 90+fromAngleDeg;
         }
         if(pFrom.x >= pVia.x && pFrom.y < pVia.y) {
-            vx2 = distanceFromWay * Math.sin(Math.toRadians(fromAngleDeg+180));
-            vy2 = distanceFromWay * Math.cos(Math.toRadians(fromAngleDeg+180));
+            if(leftHandTraffic) {
+                vx2 = distanceFromWay * Math.sin(Math.toRadians(fromAngleDeg + 180));
+                vy2 = distanceFromWay * Math.cos(Math.toRadians(fromAngleDeg + 180));
+             } else {
+                vx2 = distanceFromWay * Math.sin(Math.toRadians(fromAngleDeg));
+                vy2 = distanceFromWay * Math.cos(Math.toRadians(fromAngleDeg));
+            }
             iconAngle = 270-fromAngleDeg;
         }
@@ -1193,4 +1215,5 @@
         drawRestriction = Main.pref.getBoolean("mappaint.restriction",false);
         restrictionDebug = Main.pref.getBoolean("mappaint.restriction.debug",false);
+        leftHandTraffic = Main.pref.getBoolean("mappaint.lefthandtraffic",false);
         orderFont = new Font(Main.pref.get("mappaint.font","Helvetica"), Font.PLAIN, Main.pref.getInteger("mappaint.fontsize", 8));
         String currentLocale = Locale.getDefault().getLanguage();
