public void navigateToPoint(RoutePoint rp) { if (!currentPoints.isEmpty()) { if (currentPoints.get(0).isNextNavigate()) { currentPoints.get(0).isNextNavigate = false; } } rp.isNextNavigate = true; sortPoints(); app.getTargetPointsHelper().navigateToPoint(rp.getPoint(), true, -1, rp.getName()); }
public boolean naviateToNextPoint() { if (!currentPoints.isEmpty()) { RoutePoint rp = currentPoints.get(0); if (rp.isNextNavigate) { rp.setVisitedTime(System.currentTimeMillis()); sortPoints(); } RoutePoint first = currentPoints.get(0); if (!first.isVisited()) { app.getTargetPointsHelper().navigateToPoint(first.getPoint(), true, -1, first.getName()); first.isNextNavigate = true; return true; } else { app.getTargetPointsHelper().clearPointToNavigate(true); } } return false; }
public String getDistance(RoutePoint rp) { double d = MapUtils.getDistance(rp.getPoint(), getPoint()); String distance = OsmAndFormatter.getFormattedDistance((float) d, app); return distance; }