Exemple #1
0
 @Override
 public void onPageSelected(int i) {
   if (!isPaging) {
     mapController.setMapPerspectiveForInstruction(instructions.get(i));
   } else {
     setCurrentPagerItemStyling(i);
   }
   notificationCreator.createNewNotification(
       SimpleFeatureHelper.getMarker(simpleFeature).title,
       instructions.get(i).getFullInstruction(getActivity()));
 }
Exemple #2
0
 public boolean setRoute(final Route route) {
   if (route != null && route.foundRoute()) {
     this.route = route;
     this.instructions = route.getRouteInstructions();
     storeRouteInDatabase(route.getRawRoute());
     mapController.setMapPerspectiveForInstruction(instructions.get(0));
     routeEngine.setRoute(route);
     routeEngine.setListener(this);
   } else {
     return false;
   }
   return true;
 }
Exemple #3
0
 private void setPerspectiveForCurrentInstruction() {
   int current = pagerPositionWhenPaused > 0 ? pagerPositionWhenPaused - 1 : 0;
   mapController.setMapPerspectiveForInstruction(instructions.get(current));
 }