<NME> NavigationLayer.java
<BEF> package cgeo.geocaching.maps.mapsforge.v6.layers;

import cgeo.geocaching.location.Geopoint;
import cgeo.geocaching.maps.routing.Routing;
import cgeo.geocaching.settings.Settings;
import cgeo.geocaching.utils.MapLineUtils;

import android.location.Location;

import org.mapsforge.core.graphics.Canvas;
import org.mapsforge.core.graphics.Paint;
import org.mapsforge.core.graphics.Path;
import org.mapsforge.core.graphics.Style;
import org.mapsforge.core.model.BoundingBox;
import org.mapsforge.core.model.Point;
import org.mapsforge.core.util.MercatorProjection;
import org.mapsforge.map.android.graphics.AndroidGraphicFactory;
import org.mapsforge.map.layer.Layer;

public class NavigationLayer extends Layer {

    private Geopoint currentCoords;
    private Geopoint destinationCoords;

    private Paint paint = null;
    private PostRealDistance postRealDistance = null;

    public interface PostRealDistance {
        void postRealDistance(float realDistance);
    }

    public NavigationLayer(final Geopoint coords, final PostRealDistance postRealDistance) {
        this.destinationCoords = coords;
        this.postRealDistance = postRealDistance;
        resetColor();
    }
        final WindowManager windowManager = (WindowManager) CgeoApplication.getInstance().getSystemService(Context.WINDOW_SERVICE);
        windowManager.getDefaultDisplay().getMetrics(metrics);

        width = 4f * metrics.density;
    }

    public void setDestination(final Geopoint coords) {
    }

    public void setDestination(final Geopoint coords) {
        destinationCoords = coords;
    }

    public void setCoordinates(final Location coordinatesIn) {
        currentCoords = new Geopoint(coordinatesIn);
    }

    @Override
    public void draw(final BoundingBox boundingBox, final byte zoomLevel, final Canvas canvas, final Point topLeftPoint) {
        if (destinationCoords == null || currentCoords == null || !Settings.isMapDirection()) {
            return;
            line = AndroidGraphicFactory.INSTANCE.createPaint();
            line.setStrokeWidth(width);
            line.setStyle(Style.STROKE);
            line.setColor(0x80EB391E);
        }
        final long mapSize = MercatorProjection.getMapSize(zoomLevel, this.displayModel.getTileSize());

        path.moveTo((float) (MercatorProjection.longitudeToPixelX(point.getLongitude(), mapSize) - topLeftPoint.x), (float) (MercatorProjection.latitudeToPixelY(point.getLatitude(), mapSize) - topLeftPoint.y));

        for (int i = 1; i < routingPoints.length; i++) {
            point = routingPoints[i];
            path.lineTo((float) (MercatorProjection.longitudeToPixelX(point.getLongitude(), mapSize) - topLeftPoint.x), (float) (MercatorProjection.latitudeToPixelY(point.getLatitude(), mapSize) - topLeftPoint.y));
        }
        canvas.drawPath(path, paint);

        // calculate distance
        if (null != postRealDistance && routingPoints.length > 1) {
            float distance = 0.0f;
            for (int i = 1; i < routingPoints.length; i++) {
                distance += routingPoints[i - 1].distanceTo(routingPoints[i]);
            }
            postRealDistance.postRealDistance(distance);
        }
    }

}

<MSG> fix #6094: Routing hard to see

* use nearly solid color
* increase line width
<DFF> @@ -37,7 +37,7 @@ public class NavigationLayer extends Layer {
         final WindowManager windowManager = (WindowManager) CgeoApplication.getInstance().getSystemService(Context.WINDOW_SERVICE);
         windowManager.getDefaultDisplay().getMetrics(metrics);
 
-        width = 4f * metrics.density;
+        width = 8f * metrics.density;
     }
 
     public void setDestination(final Geopoint coords) {
@@ -58,7 +58,7 @@ public class NavigationLayer extends Layer {
             line = AndroidGraphicFactory.INSTANCE.createPaint();
             line.setStrokeWidth(width);
             line.setStyle(Style.STROKE);
-            line.setColor(0x80EB391E);
+            line.setColor(0xD0EB391E);
         }
         final long mapSize = MercatorProjection.getMapSize(zoomLevel, this.displayModel.getTileSize());
 

fix #6094: Routing hard to see