@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())); }
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; }
private void setPerspectiveForCurrentInstruction() { int current = pagerPositionWhenPaused > 0 ? pagerPositionWhenPaused - 1 : 0; mapController.setMapPerspectiveForInstruction(instructions.get(current)); }