Search in sources :

Example 1 with FasterRouteDetector

use of com.mapbox.services.android.navigation.v5.route.FasterRouteDetector in project mapbox-navigation-android by mapbox.

the class FasterRouteDetectorTest method sanity.

@Test
public void sanity() throws Exception {
    FasterRouteDetector fasterRouteDetector = new FasterRouteDetector();
    assertNotNull(fasterRouteDetector);
}
Also used : FasterRouteDetector(com.mapbox.services.android.navigation.v5.route.FasterRouteDetector) Test(org.junit.Test) BaseTest(com.mapbox.services.android.navigation.v5.BaseTest)

Example 2 with FasterRouteDetector

use of com.mapbox.services.android.navigation.v5.route.FasterRouteDetector in project mapbox-navigation-android by mapbox.

the class MapboxNavigation method initialize.

/**
 * In-charge of initializing all variables needed to begin a navigation session. Many values can
 * be changed later on using their corresponding setter. An internal progressChangeListeners used
 * to prevent users from removing it.
 */
private void initialize() {
    // Initialize event dispatcher and add internal listeners
    navigationEventDispatcher = new NavigationEventDispatcher();
    initializeDefaultLocationEngine();
    initializeDefaultCameraEngine();
    initializeTelemetry();
    // Create and add default milestones if enabled.
    milestones = new ArrayList<>();
    if (options.defaultMilestonesEnabled()) {
        addMilestone(new VoiceInstructionMilestone.Builder().setIdentifier(VOICE_INSTRUCTION_MILESTONE_ID).build());
        addMilestone(new BannerInstructionMilestone.Builder().setIdentifier(BANNER_INSTRUCTION_MILESTONE_ID).build());
    }
    if (options.snapToRoute()) {
        snapEngine = new SnapToRoute();
    }
    if (options.enableOffRouteDetection()) {
        offRouteEngine = new OffRouteDetector();
    }
    if (options().enableFasterRouteDetection()) {
        fasterRouteEngine = new FasterRouteDetector();
    }
}
Also used : VoiceInstructionMilestone(com.mapbox.services.android.navigation.v5.milestone.VoiceInstructionMilestone) BannerInstructionMilestone(com.mapbox.services.android.navigation.v5.milestone.BannerInstructionMilestone) SnapToRoute(com.mapbox.services.android.navigation.v5.snap.SnapToRoute) FasterRouteDetector(com.mapbox.services.android.navigation.v5.route.FasterRouteDetector) OffRouteDetector(com.mapbox.services.android.navigation.v5.offroute.OffRouteDetector)

Aggregations

FasterRouteDetector (com.mapbox.services.android.navigation.v5.route.FasterRouteDetector)2 BaseTest (com.mapbox.services.android.navigation.v5.BaseTest)1 BannerInstructionMilestone (com.mapbox.services.android.navigation.v5.milestone.BannerInstructionMilestone)1 VoiceInstructionMilestone (com.mapbox.services.android.navigation.v5.milestone.VoiceInstructionMilestone)1 OffRouteDetector (com.mapbox.services.android.navigation.v5.offroute.OffRouteDetector)1 SnapToRoute (com.mapbox.services.android.navigation.v5.snap.SnapToRoute)1 Test (org.junit.Test)1