示例#1
0
 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());
 }
示例#2
0
 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;
 }
示例#3
0
 public String getDistance(RoutePoint rp) {
   double d = MapUtils.getDistance(rp.getPoint(), getPoint());
   String distance = OsmAndFormatter.getFormattedDistance((float) d, app);
   return distance;
 }