diff --git a/workspace/WATisRain/src/com/lucky/watisrain/MainActivity.java b/workspace/WATisRain/src/com/lucky/watisrain/MainActivity.java index 07d9956..6419e67 100644 --- a/workspace/WATisRain/src/com/lucky/watisrain/MainActivity.java +++ b/workspace/WATisRain/src/com/lucky/watisrain/MainActivity.java @@ -51,7 +51,7 @@ protected void onStart(){ super.onStart(); // Make the zoom reasonable - attacher.setScale(1.6f, 2312f, 680f, true); + attacher.setScale(1.6f, 2312f, 400f, true); } diff --git a/workspace/WATisRain/src/com/lucky/watisrain/map/MapDraw.java b/workspace/WATisRain/src/com/lucky/watisrain/map/MapDraw.java index af395ac..39475e0 100644 --- a/workspace/WATisRain/src/com/lucky/watisrain/map/MapDraw.java +++ b/workspace/WATisRain/src/com/lucky/watisrain/map/MapDraw.java @@ -79,6 +79,11 @@ public void drawCircleOnMap(float x, float y, float radius, Paint paint){ */ public void drawLineOnMap(float x1, float y1, float x2, float y2, float linewidth, Paint paint){ + // Don't draw a line from a point to itself. Doing so causes a + // problem on some devices. + if(x1 == x2 && y1 == y2) + return; + float adjust_x1 = x1 * scale - offset_x; float adjust_y1 = y1 * scale - offset_y; float adjust_x2 = x2 * scale - offset_x;