Change destination red cursor to 1st intermediate

This commit is contained in:
Victor Shcherb 2015-11-23 10:22:54 +01:00
parent 73dcb066b7
commit ecb58268c9

View file

@ -8,7 +8,6 @@ import android.graphics.Paint;
import android.graphics.Paint.Align; import android.graphics.Paint.Align;
import android.graphics.Paint.Style; import android.graphics.Paint.Style;
import android.graphics.PointF; import android.graphics.PointF;
import net.osmand.data.LatLon; import net.osmand.data.LatLon;
import net.osmand.data.PointDescription; import net.osmand.data.PointDescription;
import net.osmand.data.QuadPoint; import net.osmand.data.QuadPoint;
@ -19,6 +18,7 @@ import net.osmand.plus.TargetPointsHelper.TargetPoint;
import net.osmand.plus.activities.MapActivity; import net.osmand.plus.activities.MapActivity;
import net.osmand.plus.views.ContextMenuLayer.IContextMenuProvider; import net.osmand.plus.views.ContextMenuLayer.IContextMenuProvider;
import java.util.Iterator;
import java.util.List; import java.util.List;
public class PointNavigationLayer extends OsmandMapLayer implements IContextMenuProvider { public class PointNavigationLayer extends OsmandMapLayer implements IContextMenuProvider {
@ -103,7 +103,12 @@ public class PointNavigationLayer extends OsmandMapLayer implements IContextMenu
int locationY = tb.getPixYFromLatNoRot(pointToNavigate.getLatitude()); int locationY = tb.getPixYFromLatNoRot(pointToNavigate.getLatitude());
canvas.rotate(-tb.getRotate(), locationX, locationY); canvas.rotate(-tb.getRotate(), locationX, locationY);
canvas.drawBitmap(targetPoint, locationX - marginX, locationY - marginY, bitmapPaint); canvas.drawBitmap(targetPoint, locationX - marginX, locationY - marginY, bitmapPaint);
} else if (pointToNavigate != null) { }
Iterator<TargetPoint> it = targetPoints.getIntermediatePoints().iterator();
if(it.hasNext()) {
pointToNavigate = it.next();
}
if (pointToNavigate != null && !isLocationVisible(tb, pointToNavigate)) {
boolean show = !view.getApplication().getRoutingHelper().isRouteCalculated(); boolean show = !view.getApplication().getRoutingHelper().isRouteCalculated();
if(view.getSettings().SHOW_DESTINATION_ARROW.isSet()) { if(view.getSettings().SHOW_DESTINATION_ARROW.isSet()) {
show = view.getSettings().SHOW_DESTINATION_ARROW.get(); show = view.getSettings().SHOW_DESTINATION_ARROW.get();