Last updated

Better Route Navigation SDK

Offer a turn-by-turn navigation optimized for the last mile delivery by integrating it into your apps with on- and offline capabilities as well as rich maps.

Documentation

Route SDK header
Route SDK flow

Implementation example

ℹ️ Current SDK API is under validation

to show a Map just initialise GeoMapApi():

val mutableCameraSource =
    remember(geoMapApi) {
        val mutableCameraSource =
            geoMapApi.MutableCameraSource(
                cameraBehavior = CameraBehavior.FIXED,
                cameraPosition = cameraPosition,
            )
    }

val mutableInteractionSource = MutableInteractionSource()

geoMapApi.GeoMapView(
    modifier = modifier,
    mapStyle = null,
    mutableCameraSource = mutableCameraSource,
    disabledGestures = emptyList(),
    mutableInteractionSource = mutableInteractionSource,
) {
    geoMapApi.MapMarkers(mapMarkers = listOf(marker), mutableInteractionSource) {}
}

to start a turn by turn Navigation just initialise navigatorMapApi()

val routeWaypoints = mutableListOf<NavigationModelWaypoint>()
var navigationState by remember { mutableStateOf(NavigationState.RUNNING) }

navigatorMapApi.Navigation(
    sequence = NavigationModelSequence(routeWaypoints.toList()),
    navigationState = navigationState,
    isSimulated = false,
    maneuverOptions = ManeuverNotificationOptions(languageCode = LanguageCode.EN_US),
    maneuverEvent = {},
    voicePromptEvent = {},
    mutableCameraSource = mutableCameraSource,
    mapInteractionSource = mutableInteractionSource,
    onDestinationReached = {},
    onStopOverReached = {},
    routeDurationInMillis = {},
)