Route

The calculated navigation route.

Drawn on the map during a ride and used for turn-by-turn advices. The route is not updated while riding — live information is available via the navigation service eta and distance to destination.

To request a route to a different destination write to the navigation service control.

const onRouteChange = (value: Route, timestamp?: Date) => {
    console.log(value, timestamp);
};

COBI.navigationService.route.subscribe(onRouteChange);
COBI.navigationService.route.unsubscribe(onRouteChange);
pageRoute
Example Response
{
    "origin": {
        "name": "Test",
        "address": "Some address",
        "category": "SHOPPING",
        "coordinate": {
            "latitude": 12.345,
            "longitude": 12.345
        }
    },
    "destination": {
        "name": "Test 2",
        "address": "Some other address",
        "category": "NONE",
        "coordinate": {
            "latitude": 57.345,
            "longitude": 80.365
        }
    },
    "name": "Test",
    "distance": 12,
    "elevationGain": 56,
    "duration": 5.5,
    "predefined": true,
    "waypoints": {
        "latitude": 57.345,
        "longitude": 80.365
    }
}

Last updated