mapbox / mapbox-navigation-android

Mapbox Navigation SDK for Android
https://docs.mapbox.com/android/navigation/overview/
Other
622 stars 319 forks source link

Crash on navigation 2.2.2 regarding geometry_index on the MapboxRouteLineUtils.getRoadClassArray method #5536

Closed Brammos closed 2 years ago

Brammos commented 2 years ago

Hello, I've made a sample navigation app which uses mapbox navigation 2.2.2 and a DirectionRoute Json to navigate. But as soon as i press the navigate button which activates the navigation and converts the DirectionRoute Json into a DirectionRoute the app crashes.

Here is the first fragment code: ` class FirstFragment : Fragment() {

private var _binding: FragmentFirstBinding? = null

// This property is only valid between onCreateView and
// onDestroyView.
private val binding get() = _binding!!

private lateinit var locationPermissionHelper: LocationPermissionHelper

private val mapboxReplayer = MapboxReplayer()
private val replayLocationEngine = ReplayLocationEngine(mapboxReplayer)
private val replayProgressObserver = ReplayProgressObserver(mapboxReplayer)
private lateinit var mapboxNavigation: MapboxNavigation
private lateinit var navigationCamera: NavigationCamera
private lateinit var viewportDataSource: MapboxNavigationViewportDataSource
private lateinit var maneuverApi: MapboxManeuverApi
private lateinit var tripProgressApi: MapboxTripProgressApi
private lateinit var routeLineApi: MapboxRouteLineApi
private lateinit var routeLineView: MapboxRouteLineView
private val routeArrowApi: MapboxRouteArrowApi = MapboxRouteArrowApi()
private lateinit var routeArrowView: MapboxRouteArrowView
private lateinit var speechApi: MapboxSpeechApi
private lateinit var voiceInstructionsPlayer: MapboxVoiceInstructionsPlayer
private val navigationLocationProvider = NavigationLocationProvider()

private val routesObserver = RoutesObserver { routeUpdateResult ->
    if (routeUpdateResult.routes.isNotEmpty()) {
// generate route geometries asynchronously and render them
        val routeLines = routeUpdateResult.routes.map { RouteLine(it, null) }

        routeLineApi.setRoutes(
            routeLines
        ) { value ->
            mapboxMap.getStyle()?.apply {
                routeLineView.renderRouteDrawData(this, value)
            }
        }

// update the camera position to account for the new route
        viewportDataSource.onRouteChanged(routeUpdateResult.routes.first())
        viewportDataSource.evaluate()
    } else {
// remove the route line and route arrow from the map
        val style = mapboxMap.getStyle()
        if (style != null) {
            routeLineApi.clearRouteLine { value ->
                routeLineView.renderClearRouteLineValue(
                    style,
                    value
                )
            }
            routeArrowView.render(style, routeArrowApi.clearArrows())
        }

// remove the route reference from camera position evaluations
        viewportDataSource.clearRouteData()
        viewportDataSource.evaluate()
    }
}

private val routeProgressObserver = RouteProgressObserver { routeProgress ->
    // update the camera position to account for the progressed fragment of the route
    viewportDataSource.onRouteProgressChanged(routeProgress)
    viewportDataSource.evaluate()

    // draw the upcoming maneuver arrow on the map
    val style = mapboxMap.getStyle()
    if (style != null) {
        val maneuverArrowResult = routeArrowApi.addUpcomingManeuverArrow(routeProgress)
        routeArrowView.renderManeuverUpdate(style, maneuverArrowResult)
    }

    // update top banner with maneuver instructions
    val maneuvers = maneuverApi.getManeuvers(routeProgress)
    maneuvers.fold(
        { error ->
            Toast.makeText(
                requireContext(),
                error.errorMessage,
                Toast.LENGTH_SHORT
            ).show()
        },
        {
            binding.maneuverView.visibility = View.VISIBLE
            binding.maneuverView.renderManeuvers(maneuvers)
        }
    )

    // update bottom trip progress summary
    binding.tripProgressView.render(
        tripProgressApi.getTripProgress(routeProgress)
    )
}

private val locationObserver = object : LocationObserver {
    var firstLocationUpdateReceived = false

    override fun onNewRawLocation(rawLocation: Location) {
    // not handled
    }

    override fun onNewLocationMatcherResult(locationMatcherResult: LocationMatcherResult) {
        val enhancedLocation = locationMatcherResult.enhancedLocation
        // update location puck's position on the map
        navigationLocationProvider.changePosition(
            location = enhancedLocation,
            keyPoints = locationMatcherResult.keyPoints,
        )

        // update camera position to account for new location
        viewportDataSource.onLocationChanged(enhancedLocation)
        viewportDataSource.evaluate()

        // if this is the first location update the activity has received,
        // it's best to immediately move the camera to the current user location
        if (!firstLocationUpdateReceived) {
            firstLocationUpdateReceived = true
            navigationCamera.requestNavigationCameraToOverview(
                stateTransitionOptions = NavigationCameraTransitionOptions.Builder()
                    .maxDuration(0) // instant transition
                    .build()
            )
        }
    }
}

private val voiceInstructionsPlayerCallback =
    MapboxNavigationConsumer<SpeechAnnouncement> { value ->
        // remove already consumed file to free-up space
        speechApi.clean(value)
    }

private val speechCallback =
    MapboxNavigationConsumer<Expected<SpeechError, SpeechValue>> { expected ->
        expected.fold(
            { error ->
                // play the instruction via fallback text-to-speech engine
                voiceInstructionsPlayer.play(
                    error.fallback,
                    voiceInstructionsPlayerCallback
                )
            },
            { value ->
                // play the sound file from the external generator
                voiceInstructionsPlayer.play(
                    value.announcement,
                    voiceInstructionsPlayerCallback
                )
            }
        )
    }

private val voiceInstructionsObserver = VoiceInstructionsObserver { voiceInstructions ->
    speechApi.generate(voiceInstructions, speechCallback)
}

private var isVoiceInstructionsMuted = false
    set(value) {
        field = value
        if (value) {
            binding.soundButton.muteAndExtend(BUTTON_ANIMATION_DURATION)
            voiceInstructionsPlayer.volume(SpeechVolume(0f))
        } else {
            binding.soundButton.unmuteAndExtend(BUTTON_ANIMATION_DURATION)
            voiceInstructionsPlayer.volume(SpeechVolume(1f))
        }
    }

private val pixelDensity = Resources.getSystem().displayMetrics.density
private val overviewPadding: EdgeInsets by lazy {
    EdgeInsets(
        140.0 * pixelDensity,
        40.0 * pixelDensity,
        120.0 * pixelDensity,
        40.0 * pixelDensity
    )
}
private val landscapeOverviewPadding: EdgeInsets by lazy {
    EdgeInsets(
        30.0 * pixelDensity,
        380.0 * pixelDensity,
        110.0 * pixelDensity,
        20.0 * pixelDensity
    )
}
private val followingPadding: EdgeInsets by lazy {
    EdgeInsets(
        180.0 * pixelDensity,
        40.0 * pixelDensity,
        150.0 * pixelDensity,
        40.0 * pixelDensity
    )
}
private val landscapeFollowingPadding: EdgeInsets by lazy {
    EdgeInsets(
        30.0 * pixelDensity,
        380.0 * pixelDensity,
        110.0 * pixelDensity,
        40.0 * pixelDensity
    )
}

private val onIndicatorBearingChangedListener = OnIndicatorBearingChangedListener {
    mapView.getMapboxMap().setCamera(CameraOptions.Builder().bearing(it).build())
}

private val onIndicatorPositionChangedListener = OnIndicatorPositionChangedListener {
    mapView.getMapboxMap().setCamera(CameraOptions.Builder().center(it).build())
    mapView.gestures.focalPoint = mapView.getMapboxMap().pixelForCoordinate(it)
}

private val onMoveListener = object : OnMoveListener {
    override fun onMoveBegin(detector: MoveGestureDetector) {
        onCameraTrackingDismissed()
    }

    override fun onMove(detector: MoveGestureDetector): Boolean {
        return false
    }

    override fun onMoveEnd(detector: MoveGestureDetector) {}
}
private lateinit var mapView: MapView
private lateinit var mapboxMap: MapboxMap

private fun onMapReady() {
    mapView.getMapboxMap().setCamera(
        CameraOptions.Builder()
            .zoom(14.0)
            .build()
    )
    mapView.getMapboxMap().loadStyleUri(
        Style.MAPBOX_STREETS
    ) {
        initLocationComponent()
        setupGesturesListener()
    }
}

private fun setupGesturesListener() {
    mapView.gestures.addOnMoveListener(onMoveListener)
}

private fun initLocationComponent() {
    val locationComponentPlugin = mapView.location
    locationComponentPlugin.updateSettings {
        this.enabled = true
        this.locationPuck = LocationPuck2D(
            bearingImage = AppCompatResources.getDrawable(
                requireContext(),
                R.drawable.mapbox_user_puck_icon,
            ),
            shadowImage = AppCompatResources.getDrawable(
                requireContext(),
                R.drawable.mapbox_user_icon_shadow,
            ),
            scaleExpression = interpolate {
                linear()
                zoom()
                stop {
                    literal(0.0)
                    literal(0.6)
                }
                stop {
                    literal(20.0)
                    literal(1.0)
                }
            }.toJson()
        )
    }
    locationComponentPlugin.addOnIndicatorPositionChangedListener(
        onIndicatorPositionChangedListener
    )
    locationComponentPlugin.addOnIndicatorBearingChangedListener(
        onIndicatorBearingChangedListener
    )
}

private fun onCameraTrackingDismissed() {
    Toast.makeText(requireContext(), "onCameraTrackingDismissed", Toast.LENGTH_SHORT).show()
    mapView.location
        .removeOnIndicatorPositionChangedListener(onIndicatorPositionChangedListener)
    mapView.location
        .removeOnIndicatorBearingChangedListener(onIndicatorBearingChangedListener)
    mapView.gestures.removeOnMoveListener(onMoveListener)
}

override fun onRequestPermissionsResult(
    requestCode: Int,
    permissions: Array<String>,
    grantResults: IntArray
) {
    super.onRequestPermissionsResult(requestCode, permissions, grantResults)
    locationPermissionHelper.onRequestPermissionsResult(requestCode, permissions, grantResults)
}

override fun onCreateView(
    inflater: LayoutInflater, container: ViewGroup?,
    savedInstanceState: Bundle?
): View {
    _binding = FragmentFirstBinding.inflate(inflater, container, false)
    return binding.root
}

@SuppressLint("MissingPermission")
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
    super.onViewCreated(view, savedInstanceState)
    mapView = binding.mapView
    mapboxMap = binding.mapView.getMapboxMap()
    // initialize the location puck
    binding.mapView.location.apply {
        this.locationPuck = LocationPuck2D(
            bearingImage = ContextCompat.getDrawable(
                requireContext(),
                R.drawable.mapbox_navigation_puck_icon
            )
        )
        setLocationProvider(navigationLocationProvider)
        enabled = true
    }

    // initialize Mapbox Navigation
    mapboxNavigation = if (MapboxNavigationProvider.isCreated()) {
        MapboxNavigationProvider.retrieve()
    } else {
        MapboxNavigationProvider.create(
            NavigationOptions.Builder(requireContext())
                .accessToken(getString(R.string.mapbox_access_token))
                // comment out the location engine setting block to disable simulation
                .locationEngine(replayLocationEngine)
                .build()
        )
    }

    // initialize Navigation Camera
    viewportDataSource = MapboxNavigationViewportDataSource(mapboxMap)
    navigationCamera = NavigationCamera(
        mapboxMap,
        binding.mapView.camera,
        viewportDataSource
    )
    // set the animations lifecycle listener to ensure the NavigationCamera stops
    // automatically following the user location when the map is interacted with
    binding.mapView.camera.addCameraAnimationsLifecycleListener(
        NavigationBasicGesturesHandler(navigationCamera)
    )
    navigationCamera.registerNavigationCameraStateChangeObserver { navigationCameraState ->
    // shows/hide the recenter button depending on the camera state
        when (navigationCameraState) {
            NavigationCameraState.TRANSITION_TO_FOLLOWING,
            NavigationCameraState.FOLLOWING -> binding.recenter.visibility = View.INVISIBLE
            NavigationCameraState.TRANSITION_TO_OVERVIEW,
            NavigationCameraState.OVERVIEW,
            NavigationCameraState.IDLE -> binding.recenter.visibility = View.VISIBLE
        }
    }
    // set the padding values depending on screen orientation and visible view layout
    if (this.resources.configuration.orientation == Configuration.ORIENTATION_LANDSCAPE) {
        viewportDataSource.overviewPadding = landscapeOverviewPadding
    } else {
        viewportDataSource.overviewPadding = overviewPadding
    }
    if (this.resources.configuration.orientation == Configuration.ORIENTATION_LANDSCAPE) {
        viewportDataSource.followingPadding = landscapeFollowingPadding
    } else {
        viewportDataSource.followingPadding = followingPadding
    }

    // make sure to use the same DistanceFormatterOptions across different features
    val distanceFormatterOptions = mapboxNavigation.navigationOptions.distanceFormatterOptions

    // initialize maneuver api that feeds the data to the top banner maneuver view
    maneuverApi = MapboxManeuverApi(
        MapboxDistanceFormatter(distanceFormatterOptions)
    )

    // initialize bottom progress view
    tripProgressApi = MapboxTripProgressApi(
        TripProgressUpdateFormatter.Builder(requireContext())
            .distanceRemainingFormatter(
                DistanceRemainingFormatter(distanceFormatterOptions)
            )
            .timeRemainingFormatter(
                TimeRemainingFormatter(requireContext())
            )
            .percentRouteTraveledFormatter(
                PercentDistanceTraveledFormatter()
            )
            .estimatedTimeToArrivalFormatter(
                EstimatedTimeToArrivalFormatter(requireContext(), TimeFormat.NONE_SPECIFIED)
            )
            .build()
    )

    // initialize voice instructions api and the voice instruction player
    speechApi = MapboxSpeechApi(
        requireContext(),
        getString(R.string.mapbox_access_token),
        Locale.US.language
    )
    voiceInstructionsPlayer = MapboxVoiceInstructionsPlayer(
        requireContext(),
        getString(R.string.mapbox_access_token),
        Locale.US.language
    )

    // initialize route line, the withRouteLineBelowLayerId is specified to place
    // the route line below road labels layer on the map
    // the value of this option will depend on the style that you are using
    // and under which layer the route line should be placed on the map layers stack
    val mapboxRouteLineOptions = MapboxRouteLineOptions.Builder(requireContext())
        .withRouteLineBelowLayerId("road-label")
        .build()
    routeLineApi = MapboxRouteLineApi(mapboxRouteLineOptions)
    routeLineView = MapboxRouteLineView(mapboxRouteLineOptions)

    // initialize maneuver arrow view to draw arrows on the map
    val routeArrowOptions = RouteArrowOptions.Builder(requireContext()).build()
    routeArrowView = MapboxRouteArrowView(routeArrowOptions)

    // load map style
    mapboxMap.loadStyleUri(
        Style.MAPBOX_STREETS
    ) {
    // add long click listener that search for a route to the clicked destination
        binding.startNavigation.setOnClickListener {
            val directionRoute = DirectionsRoute.fromJson(
                "{\"duration\":829.15295,\"distance\":13247.613,\"legs\":[{\"duration\":829.15295,\"distance\":13247.613,\"summary\":\"\",\"weight\":710.80244,\"steps\":[{\"duration\":45.45067,\"distance\":241.675,\"mode\":\"driving\",\"name\":\"Neuweg\",\"geometry\":\"gcbrbBmnrzHe@i_@Si_@bYvK`ZfAbQKbQKfDG\",\"driving_side\":\"right\",\"intersections\":[{\"entry\":[true],\"bearings\":[87],\"out\":0,\"geometry_index\":0,\"location\":[5.17094,52.21741]}],\"maneuver\":{\"instruction\":\"Blijf op Violenstraat\",\"bearing_after\":87,\"bearing_before\":0,\"location\":[5.17094,52.21741],\"type\":\"depart\"},\"bannerInstructions\":[{\"distanceAlongGeometry\":241.675,\"primary\":{\"text\":\"Gijsbrecht van Amstelstraat\",\"type\":\"turn\",\"modifier\":\"left\",\"components\":[{\"text\":\"Gijsbrecht van Amstelstraat\",\"type\":\"text\"}]},\"sub\":{\"text\":\"Van Ostadelaan\",\"type\":\"turn\",\"modifier\":\"right\",\"components\":[{\"text\":\"Van Ostadelaan\",\"type\":\"text\"}]}}],\"voiceInstructions\":[{\"distanceAlongGeometry\":200,\"announcement\":\"Over 200 meter, linksaf naar Gijsbrecht van Amstelstraat\",\"ssmlAnnouncement\":\"\\u003cspeak\\u003e\\u003camazon:effect name=\\\"drc\\\"\\u003e\\u003cprosody rate=\\\"1.08\\\"\\u003eOver 200 meter, linksaf naar Gijsbrecht van Amstelstraat\\u003c/prosody\\u003e\\u003c/amazon:effect\\u003e\\u003c/speak\\u003e\"},{\"distanceAlongGeometry\":80,\"announcement\":\"linksaf naar Gijsbrecht van Amstelstraat\",\"ssmlAnnouncement\":\"\\u003cspeak\\u003e\\u003camazon:effect name=\\\"drc\\\"\\u003e\\u003cprosody rate=\\\"1.08\\\"\\u003elinksaf naar Gijsbrecht van Amstelstraat\\u003c/prosody\\u003e\\u003c/amazon:effect\\u003e\\u003c/speak\\u003e\"}]},{\"duration\":29.252,\"distance\":289.109,\"mode\":\"driving\",\"name\":\"Gijsbrecht van Amstelstraat\",\"geometry\":\"kf_rbBaatzHhBcXzD}^bEy^bEy^jBaPdEsg@|Dge@~Dee@\",\"driving_side\":\"right\",\"intersections\":[{\"entry\":[true,true,true,false],\"bearings\":[102,176,275,358],\"in\":1,\"out\":2,\"geometry_index\":0,\"location\":[5.17175,52.21593]},{\"entry\":[true,true,true],\"bearings\":[108,187,287],\"in\":0,\"out\":1,\"geometry_index\":4,\"location\":[5.17368,52.21558]},{\"entry\":[true,true,true],\"bearings\":[104,288,359],\"in\":1,\"out\":0,\"geometry_index\":5,\"location\":[5.17395,52.21553]},{\"entry\":[true,true,true,true],\"bearings\":[10,104,186,284],\"in\":0,\"out\":2,\"geometry_index\":6,\"location\":[5.1746,52.21543]}],\"maneuver\":{\"instruction\":\"Linksaf naar Gijsbrecht van Amstelstraat\",\"modifier\":\"left\",\"bearing_after\":102,\"bearing_before\":178,\"location\":[5.17175,52.21593],\"type\":\"turn\"},\"bannerInstructions\":[{\"distanceAlongGeometry\":289.109,\"primary\":{\"text\":\"Van Ostadelaan\",\"type\":\"turn\",\"modifier\":\"right\",\"components\":[{\"text\":\"Van Ostadelaan\",\"type\":\"text\"}]},\"sub\":{\"text\":\"RING\",\"type\":\"turn\",\"modifier\":\"left\",\"components\":[{\"text\":\"RING\",\"type\":\"text\"}]}}],\"voiceInstructions\":[{\"distanceAlongGeometry\":200,\"announcement\":\"Over 200 meter, rechtsaf naar Van Ostadelaan\",\"ssmlAnnouncement\":\"\\u003cspeak\\u003e\\u003camazon:effect name=\\\"drc\\\"\\u003e\\u003cprosody rate=\\\"1.08\\\"\\u003eOver 200 meter, rechtsaf naar Van Ostadelaan\\u003c/prosody\\u003e\\u003c/amazon:effect\\u003e\\u003c/speak\\u003e\"},{\"distanceAlongGeometry\":80,\"announcement\":\"rechtsaf naar Van Ostadelaan\",\"ssmlAnnouncement\":\"\\u003cspeak\\u003e\\u003camazon:effect name=\\\"drc\\\"\\u003e\\u003cprosody rate=\\\"1.08\\\"\\u003erechtsaf naar Van Ostadelaan\\u003c/prosody\\u003e\\u003c/amazon:effect\\u003e\\u003c/speak\\u003e\"}]},{\"duration\":23.658,\"distance\":179.745,\"mode\":\"driving\",\"name\":\"Van Ostadelaan\",\"geometry\":\"m{}qbB{_|zHnX}BnX_CnX}B`WqA\",\"driving_side\":\"right\",\"intersections\":[{\"entry\":[true,true,true,true],\"bearings\":[7,99,175,284],\"in\":0,\"out\":1,\"geometry_index\":0,\"location\":[5.17582,52.21524]},{\"entry\":[true,true,true,true],\"bearings\":[82,176,261,355],\"in\":1,\"out\":2,\"geometry_index\":3,\"location\":[5.17601,52.21402]}],\"maneuver\":{\"instruction\":\"Rechtsaf naar Van Ostadelaan\",\"modifier\":\"right\",\"bearing_after\":175,\"bearing_before\":104,\"location\":[5.17582,52.21524],\"type\":\"turn\"},\"bannerInstructions\":[{\"distanceAlongGeometry\":179.745,\"primary\":{\"text\":\"RING\",\"type\":\"turn\",\"modifier\":\"left\",\"components\":[{\"text\":\"RING\",\"type\":\"text\"}]},\"sub\":{\"text\":\"RING\",\"type\":\"roundabout\",\"modifier\":\"right\",\"components\":[{\"text\":\"RING\",\"type\":\"text\"}],\"degrees\":225}}],\"voiceInstructions\":[{\"distanceAlongGeometry\":80,\"announcement\":\"linksaf naar Govert Flincklaan\",\"ssmlAnnouncement\":\"\\u003cspeak\\u003e\\u003camazon:effect name=\\\"drc\\\"\\u003e\\u003cprosody rate=\\\"1.08\\\"\\u003elinksaf naar Govert Flincklaan\\u003c/prosody\\u003e\\u003c/amazon:effect\\u003e\\u003c/speak\\u003e\"}]},{\"duration\":80.113,\"distance\":607.755,\"mode\":\"driving\",\"name\":\"RING\",\"geometry\":\"{vzqbBin|zHtM{\\\\vM{\\\\tM{\\\\rPy`@fJqe@~UVpT|FlYPdFH~CU|Ej@bAwNOmHaBsQ`Agf@xAcf@rAef@fAgf@\",\"driving_side\":\"right\",\"intersections\":[{\"entry\":[true,true,true],\"bearings\":[129,214,356],\"in\":2,\"out\":0,\"geometry_index\":0,\"location\":[5.17605,52.21363]},{\"entry\":[true,true,true,true],\"bearings\":[38,130,221,309],\"in\":2,\"out\":3,\"geometry_index\":3,\"location\":[5.17749,52.21292]},{\"entry\":[false,true,true,true],\"bearings\":[13,90,181,288],\"in\":0,\"out\":3,\"geometry_index\":7,\"location\":[5.17851,52.21175]},{\"entry\":[false,true,true],\"bearings\":[1,182,273],\"in\":0,\"out\":1,\"geometry_index\":8,\"location\":[5.1785,52.21133]},{\"entry\":[false,true,true,false],\"bearings\":[97,187,258,355],\"in\":3,\"out\":2,\"geometry_index\":10,\"location\":[5.1785,52.21113]},{\"entry\":[true,true,false],\"bearings\":[85,184,282],\"in\":2,\"out\":0,\"geometry_index\":12,\"location\":[5.17873,52.21099]},{\"entry\":[true,true,false],\"bearings\":[21,75,265],\"in\":1,\"out\":0,\"geometry_index\":13,\"location\":[5.17888,52.21099]},{\"entry\":[true,false,true],\"bearings\":[95,255,291],\"in\":2,\"out\":1,\"geometry_index\":14,\"location\":[5.17918,52.21104]}],\"maneuver\":{\"instruction\":\"Linksaf naar Govert Flincklaan\",\"modifier\":\"left\",\"bearing_after\":129,\"bearing_before\":176,\"location\":[5.17605,52.21363],\"type\":\"turn\"},\"bannerInstructions\":[{\"distanceAlongGeometry\":607.755,\"primary\":{\"text\":\"RING\",\"type\":\"roundabout\",\"modifier\":\"right\",\"components\":[{\"text\":\"RING\",\"type\":\"text\"}],\"degrees\":225},\"sub\":{\"text\":\"Oostereind\",\"type\":\"off ramp\",\"components\":[{\"text\":\"Oostereind\",\"type\":\"text\"}]}}],\"voiceInstructions\":[{\"distanceAlongGeometry\":400,\"announcement\":\"Over 400 meter, Neem afslag 2 naar RING op de rotonde \",\"ssmlAnnouncement\":\"\\u003cspeak\\u003e\\u003camazon:effect name=\\\"drc\\\"\\u003e\\u003cprosody rate=\\\"1.08\\\"\\u003eOver 400 meter, Neem afslag 2 naar RING op de rotonde \\u003c/prosody\\u003e\\u003c/amazon:effect\\u003e\\u003c/speak\\u003e\"},{\"distanceAlongGeometry\":80,\"announcement\":\"Neem afslag 2 naar RING op de rotonde \",\"ssmlAnnouncement\":\"\\u003cspeak\\u003e\\u003camazon:effect name=\\\"drc\\\"\\u003e\\u003cprosody rate=\\\"1.08\\\"\\u003eNeem afslag 2 naar RING op de rotonde \\u003c/prosody\\u003e\\u003c/amazon:effect\\u003e\\u003c/speak\\u003e\"}]},{\"duration\":65.873,\"distance\":834.759,\"mode\":\"driving\",\"name\":\"RING\",\"geometry\":\"mkuqbBung{HpHwKgDgKrB{i@|Bwi@zByi@rB{i@tByi@rB{i@xB_i@pB{d@pB}d@rB{d@pB{d@dBea@fBca@~Au_@~Au_@|Bgk@~Bik@|Bgk@\",\"driving_side\":\"right\",\"intersections\":[{\"entry\":[false,true,true],\"bearings\":[57,141,275],\"in\":0,\"out\":2,\"geometry_index\":0,\"location\":[5.18169,52.21089]},{\"entry\":[true,true,false],\"bearings\":[55,186,321],\"in\":1,\"out\":2,\"geometry_index\":1,\"location\":[5.1819,52.21073]},{\"entry\":[true,true,false],\"bearings\":[4,98,235],\"in\":2,\"out\":1,\"geometry_index\":2,\"location\":[5.18209,52.21082]},{\"entry\":[true,true,false,false],\"bearings\":[35,98,279,342],\"in\":1,\"out\":2,\"geometry_index\":15,\"location\":[5.19039,52.21007]}],\"maneuver\":{\"exit\":2,\"instruction\":\"Neem afslag 2 naar RING op de rotonde \",\"modifier\":\"right\",\"bearing_after\":141,\"bearing_before\":95,\"location\":[5.18169,52.21089],\"type\":\"roundabout\"},\"exit\":2,\"bannerInstructions\":[{\"distanceAlongGeometry\":834.759,\"primary\":{\"text\":\"Oostereind\",\"type\":\"off ramp\",\"components\":[{\"text\":\"Oostereind\",\"type\":\"text\"}]},\"sub\":{\"text\":\"A27\",\"type\":\"on ramp\",\"modifier\":\"left\",\"components\":[{\"text\":\"A27\",\"type\":\"text\"}]}}],\"voiceInstructions\":[{\"distanceAlongGeometry\":400,\"announcement\":\"Over 400 meter, houd rechts aan\",\"ssmlAnnouncement\":\"\\u003cspeak\\u003e\\u003camazon:effect name=\\\"drc\\\"\\u003e\\u003cprosody rate=\\\"1.08\\\"\\u003eOver 400 meter, houd rechts aan\\u003c/prosody\\u003e\\u003c/amazon:effect\\u003e\\u003c/speak\\u003e\"},{\"distanceAlongGeometry\":80,\"announcement\":\"houd rechts aan\",\"ssmlAnnouncement\":\"\\u003cspeak\\u003e\\u003camazon:effect name=\\\"drc\\\"\\u003e\\u003cprosody rate=\\\"1.08\\\"\\u003ehoud rechts aan\\u003c/prosody\\u003e\\u003c/amazon:effect\\u003e\\u003c/speak\\u003e\"}]},{\"duration\":60.08,\"distance\":749.376,\"mode\":\"driving\",\"name\":\"Oostereind\",\"geometry\":\"ifsqbBwt~{HzLg]zRV|RVdMJdMJ|Yn@zYzBlYdGxY|BhY_HxU{UpPe`@~Nib@tOoa@rKyUrKwUdKgSdKgSbFkQ\",\"driving_side\":\"right\",\"intersections\":[{\"entry\":[true,true,false],\"bearings\":[98,127,278],\"in\":2,\"out\":1,\"geometry_index\":0,\"location\":[5.19356,52.20978]},{\"entry\":[true,true,false],\"bearings\":[132,169,308],\"in\":2,\"out\":0,\"geometry_index\":14,\"location\":[5.19589,52.20517]}],\"maneuver\":{\"instruction\":\"Houd rechts aan\",\"bearing_after\":127,\"bearing_before\":98,\"location\":[5.19356,52.20978],\"type\":\"off ramp\"},\"bannerInstructions\":[{\"distanceAlongGeometry\":749.376,\"primary\":{\"text\":\"A27\",\"type\":\"on ramp\",\"modifier\":\"left\",\"components\":[{\"text\":\"A27\",\"type\":\"text\"}]},\"sub\":{\"text\":\"A27\",\"type\":\"off ramp\",\"components\":[{\"text\":\"A27\",\"type\":\"text\"}]}}],\"voiceInstructions\":[{\"distanceAlongGeometry\":400,\"announcement\":\"Over 400 meter, linksaf\",\"ssmlAnnouncement\":\"\\u003cspeak\\u003e\\u003camazon:effect name=\\\"drc\\\"\\u003e\\u003cprosody rate=\\\"1.08\\\"\\u003eOver 400 meter, linksaf\\u003c/prosody\\u003e\\u003c/amazon:effect\\u003e\\u003c/speak\\u003e\"},{\"distanceAlongGeometry\":80,\"announcement\":\"linksaf\",\"ssmlAnnouncement\":\"\\u003cspeak\\u003e\\u003camazon:effect name=\\\"drc\\\"\\u003e\\u003cprosody rate=\\\"1.08\\\"\\u003elinksaf\\u003c/prosody\\u003e\\u003c/amazon:effect\\u003e\\u003c/speak\\u003e\"}]},{\"duration\":140.349,\"distance\":3706.428,\"mode\":\"driving\",\"name\":\"A27\",\"geometry\":\"amhqbBqnf|H}FyXaLoTyQ_VqRmTaRmUySqZsRw\\\\eQa_@aPs`@}Qo]iNmc@gNoc@eJm\\\\_J_]}I_]_Ja]}I_]wKob@uKmb@}Kgb@sLsa@oK_]wKu\\\\{Nk`@eO}_@yOc_@gPo^_Qk]aSs^sSw]aT}\\\\{Tg[gUqZyUeYiVcX{VsVeWyUiWoU}T}QeP_McPaMeP_McNiKcNkKsN_LsNaLcWmS_WuS}V{ScWkScWmScWkSgW}RgW_SgW}R_TmP_TmPkVeRuVoQkVeRgVuR_VoSyUcTsUkTkUkU_UcVqTiW_TmXqSoY}NeTsN}T}MaVaPuYuOiZcOa[sN{[cNu\\\\wMa]mNm`@}Mca@mMsa@sLob@aLwa@aHcWaHeW\",\"driving_side\":\"right\",\"intersections\":[{\"entry\":[true,false,false,true],\"bearings\":[63,202,302,329],\"in\":1,\"out\":3,\"geometry_index\":0,\"location\":[5.19756,52.20426]}],\"maneuver\":{\"instruction\":\"Linksaf\",\"modifier\":\"left\",\"bearing_after\":63,\"bearing_before\":122,\"location\":[5.19756,52.20426],\"type\":\"on ramp\"},\"bannerInstructions\":[{\"distanceAlongGeometry\":3706.428,\"primary\":{\"text\":\"A27\",\"type\":\"off ramp\",\"components\":[{\"text\":\"A27\",\"type\":\"text\"}]},\"sub\":{\"text\":\"A1\",\"type\":\"turn\",\"components\":[{\"text\":\"A1\",\"type\":\"text\"}]}}],\"voiceInstructions\":[{\"distanceAlongGeometry\":2000,\"announcement\":\"Over 2 kilometer houd rechts aan naar A27\",\"ssmlAnnouncement\":\"\\u003cspeak\\u003e\\u003camazon:effect name=\\\"drc\\\"\\u003e\\u003cprosody rate=\\\"1.08\\\"\\u003eOver 2 kilometer houd rechts aan naar A27\\u003c/prosody\\u003e\\u003c/amazon:effect\\u003e\\u003c/speak\\u003e\"},{\"distanceAlongGeometry\":1000,\"announcement\":\"Over 1 kilometer houd rechts aan naar A27\",\"ssmlAnnouncement\":\"\\u003cspeak\\u003e\\u003camazon:effect name=\\\"drc\\\"\\u003e\\u003cprosody rate=\\\"1.08\\\"\\u003eOver 1 kilometer houd rechts aan naar A27\\u003c/prosody\\u003e\\u003c/amazon:effect\\u003e\\u003c/speak\\u003e\"},{\"distanceAlongGeometry\":400,\"announcement\":\"Over 400 meter, houd rechts aan naar A27\",\"ssmlAnnouncement\":\"\\u003cspeak\\u003e\\u003camazon:effect name=\\\"drc\\\"\\u003e\\u003cprosody rate=\\\"1.08\\\"\\u003eOver 400 meter, houd rechts aan naar A27\\u003c/prosody\\u003e\\u003c/amazon:effect\\u003e\\u003c/speak\\u003e\"},{\"distanceAlongGeometry\":80,\"announcement\":\"houd rechts aan naar A27\",\"ssmlAnnouncement\":\"\\u003cspeak\\u003e\\u003camazon:effect name=\\\"drc\\\"\\u003e\\u003cprosody rate=\\\"1.08\\\"\\u003ehoud rechts aan naar A27\\u003c/prosody\\u003e\\u003c/amazon:effect\\u003e\\u003c/speak\\u003e\"}]},{\"duration\":15.624,\"distance\":388.824,\"mode\":\"driving\",\"name\":\"A27\",\"geometry\":\"wpxrbBofj~HmHmd@mHkd@cHud@uFme@iEcf@wByd@_Aee@Ske@Lie@\",\"driving_side\":\"right\",\"intersections\":[{\"entry\":[true,true,false],\"bearings\":[59,68,239],\"in\":2,\"out\":1,\"geometry_index\":0,\"location\":[5.23225,52.22889]}],\"maneuver\":{\"instruction\":\"Houd rechts aan naar A27\",\"bearing_after\":68,\"bearing_before\":59,\"location\":[5.23225,52.22889],\"type\":\"off ramp\"},\"bannerInstructions\":[{\"distanceAlongGeometry\":388.824,\"primary\":{\"text\":\"A1\",\"type\":\"turn\",\"components\":[{\"text\":\"A1\",\"type\":\"text\"}]},\"sub\":{\"text\":\"E231\",\"type\":\"turn\",\"components\":[{\"text\":\"E231\",\"type\":\"text\"}]}}],\"voiceInstructions\":[{\"distanceAlongGeometry\":200,\"announcement\":\"Over 200 meter, houd rechts aan naar A27\",\"ssmlAnnouncement\":\"\\u003cspeak\\u003e\\u003camazon:effect name=\\\"drc\\\"\\u003e\\u003cprosody rate=\\\"1.08\\\"\\u003eOver 200 meter, houd rechts aan naar A27\\u003c/prosody\\u003e\\u003c/amazon:effect\\u003e\\u003c/speak\\u003e\"},{\"distanceAlongGeometry\":80,\"announcement\":\"houd rechts aan naar A27\",\"ssmlAnnouncement\":\"\\u003cspeak\\u003e\\u003camazon:effect name=\\\"drc\\\"\\u003e\\u003cprosody rate=\\\"1.08\\\"\\u003ehoud rechts aan naar A27\\u003c/prosody\\u003e\\u003c/amazon:effect\\u003e\\u003c/speak\\u003e\"}]},{\"duration\":33.444,\"distance\":894.572,\"mode\":\"driving\",\"name\":\"A1\",\"geometry\":\"u`zrbBg}t~HtCwi@`Bcj@hBcj@fC{i@vE_i@rHog@hKoe@lMoc@fMuc@jP__@zOu_@lOk`@dOs`@xNaa@~Mab@hMyb@bM_c@lLuc@`Lad@\",\"driving_side\":\"right\",\"intersections\":[{\"entry\":[true,true,false],\"bearings\":[91,100,271],\"in\":1,\"out\":0,\"geometry_index\":0,\"location\":[5.23773,52.22966]}],\"maneuver\":{\"instruction\":\"Houd rechts aan naar A27\",\"bearing_after\":100,\"bearing_before\":91,\"location\":[5.23773,52.22966],\"type\":\"turn\"},\"bannerInstructions\":[{\"distanceAlongGeometry\":894.572,\"primary\":{\"text\":\"E231\",\"type\":\"turn\",\"components\":[{\"text\":\"E231\",\"type\":\"text\"}]},\"sub\":{\"text\":\"Houd rechts aan\",\"type\":\"off ramp\",\"components\":[{\"text\":\"Houd rechts aan\",\"type\":\"text\"}]}}],\"voiceInstructions\":[{\"distanceAlongGeometry\":400,\"announcement\":\"Over 400 meter, houd links aan naar A1\",\"ssmlAnnouncement\":\"\\u003cspeak\\u003e\\u003camazon:effect name=\\\"drc\\\"\\u003e\\u003cprosody rate=\\\"1.08\\\"\\u003eOver 400 meter, houd links aan naar A1\\u003c/prosody\\u003e\\u003c/amazon:effect\\u003e\\u003c/speak\\u003e\"},{\"distanceAlongGeometry\":80,\"announcement\":\"houd links aan naar A1\",\"ssmlAnnouncement\":\"\\u003cspeak\\u003e\\u003camazon:effect name=\\\"drc\\\"\\u003e\\u003cprosody rate=\\\"1.08\\\"\\u003ehoud links aan naar A1\\u003c/prosody\\u003e\\u003c/amazon:effect\\u003e\\u003c/speak\\u003e\"}]},{\"duration\":113.39,\"distance\":3216.67,\"mode\":\"driving\",\"name\":\"E231\",\"geometry\":\"k_srbBuek_I|Kke@bKcf@`J{f@bJ{f@vIeg@zHug@fHch@zGih@|F{h@~Ca[xBeW`CeWxD{e@pDaf@xCgf@dDwk@fCal@pBel@tAil@hAml@Vql@Vol@Vql@Jql@Hql@Jql@Jql@j@cl@j@cl@j@cl@j@cl@j@cl@j@cl@j@el@j@cl@j@cl@j@cl@h@cl@j@cl@j@cl@j@cl@j@cl@h@cl@l@cl@t@cl@v@al@|@cl@lA_l@tA}k@lB{k@vBwk@|Buk@vCqk@~Cmk@nDgk@|Dek@pE{j@bFuj@fFsj@vFkj@jGaj@rG}i@pGwh@pGwh@|Gsh@zGqh@|Gqh@\",\"driving_side\":\"right\",\"intersections\":[{\"entry\":[true,true,false],\"bearings\":[119,132,300],\"in\":1,\"out\":2,\"geometry_index\":0,\"location\":[5.24913,52.22605]}],\"maneuver\":{\"instruction\":\"Houd links aan naar A1\",\"bearing_after\":119,\"bearing_before\":120,\"location\":[5.24913,52.22605],\"type\":\"turn\"},\"bannerInstructions\":[{\"distanceAlongGeometry\":3216.67,\"primary\":{\"text\":\"Houd rechts aan\",\"type\":\"off ramp\",\"components\":[{\"text\":\"Houd rechts aan\",\"type\":\"text\"}]},\"sub\":{\"text\":\"Bisschopsweg\",\"type\":\"roundabout\",\"modifier\":\"right\",\"components\":[{\"text\":\"Bisschopsweg\",\"type\":\"text\"}],\"degrees\":221}}],\"voiceInstructions\":[{\"distanceAlongGeometry\":2000,\"announcement\":\"Over 2 kilometer houd rechts aan\",\"ssmlAnnouncement\":\"\\u003cspeak\\u003e\\u003camazon:effect name=\\\"drc\\\"\\u003e\\u003cprosody rate=\\\"1.08\\\"\\u003eOver 2 kilometer houd rechts aan\\u003c/prosody\\u003e\\u003c/amazon:effect\\u003e\\u003c/speak\\u003e\"},{\"distanceAlongGeometry\":1000,\"announcement\":\"Over 1 kilometer houd rechts aan\",\"ssmlAnnouncement\":\"\\u003cspeak\\u003e\\u003camazon:effect name=\\\"drc\\\"\\u003e\\u003cprosody rate=\\\"1.08\\\"\\u003eOver 1 kilometer houd rechts aan\\u003c/prosody\\u003e\\u003c/amazon:effect\\u003e\\u003c/speak\\u003e\"},{\"distanceAlongGeometry\":400,\"announcement\":\"Over 400 meter, houd rechts aan\",\"ssmlAnnouncement\":\"\\u003cspeak\\u003e\\u003camazon:effect name=\\\"drc\\\"\\u003e\\u003cprosody rate=\\\"1.08\\\"\\u003eOver 400 meter, houd rechts aan\\u003c/prosody\\u003e\\u003c/amazon:effect\\u003e\\u003c/speak\\u003e\"},{\"distanceAlongGeometry\":80,\"announcement\":\"houd rechts aan\",\"ssmlAnnouncement\":\"\\u003cspeak\\u003e\\u003camazon:effect name=\\\"drc\\\"\\u003e\\u003cprosody rate=\\\"1.08\\\"\\u003ehoud rechts aan\\u003c/prosody\\u003e\\u003c/amazon:effect\\u003e\\u003c/speak\\u003e\"}]},{\"duration\":38.456,\"distance\":743.067,\"mode\":\"driving\",\"name\":\"\",\"geometry\":\"_sirbBk_ebIfL{f@rKig@~J{g@`Nae@vPya@`R}_@pQw`@vP{a@~Laf@lI_i@dHwi@vG_j@xG}i@vG_j@xG_j@\",\"driving_side\":\"right\",\"intersections\":[{\"entry\":[true,true,false],\"bearings\":[109,118,289],\"in\":1,\"out\":0,\"geometry_index\":0,\"location\":[5.29511,52.22125]}],\"maneuver\":{\"instruction\":\"Houd rechts aan\",\"bearing_after\":118,\"bearing_before\":109,\"location\":[5.29511,52.22125],\"type\":\"off ramp\"},\"bannerInstructions\":[{\"distanceAlongGeometry\":743.067,\"primary\":{\"text\":\"Bisschopsweg\",\"type\":\"roundabout\",\"modifier\":\"right\",\"components\":[{\"text\":\"Bisschopsweg\",\"type\":\"text\"}],\"degrees\":221},\"sub\":{\"text\":\"Eemweg\",\"type\":\"roundabout\",\"modifier\":\"right\",\"components\":[{\"text\":\"Eemweg\",\"type\":\"text\"}],\"degrees\":221}}],\"voiceInstructions\":[{\"distanceAlongGeometry\":400,\"announcement\":\"Over 400 meter, Neem afslag 1 naar Bisschopsweg op de rotonde \",\"ssmlAnnouncement\":\"\\u003cspeak\\u003e\\u003camazon:effect name=\\\"drc\\\"\\u003e\\u003cprosody rate=\\\"1.08\\\"\\u003eOver 400 meter, Neem afslag 1 naar Bisschopsweg op de rotonde \\u003c/prosody\\u003e\\u003c/amazon:effect\\u003e\\u003c/speak\\u003e\"},{\"distanceAlongGeometry\":80,\"announcement\":\"Neem afslag 1 naar Bisschopsweg op de rotonde \",\"ssmlAnnouncement\":\"\\u003cspeak\\u003e\\u003camazon:effect name=\\\"drc\\\"\\u003e\\u003cprosody rate=\\\"1.08\\\"\\u003eNeem afslag 1 naar Bisschopsweg op de rotonde \\u003c/prosody\\u003e\\u003c/amazon:effect\\u003e\\u003c/speak\\u003e\"}]},{\"duration\":41.912,\"distance\":509.262,\"mode\":\"driving\",\"name\":\"Bisschopsweg\",\"geometry\":\"epcrbBsnwbI~HsHbXbA~WzBfWLt@@xYlCdY`IxWxO`U~WzL~ZbJh^dId_@jI~^\",\"driving_side\":\"right\",\"intersections\":[{\"entry\":[false,true,false],\"bearings\":[20,149,288],\"in\":2,\"out\":1,\"geometry_index\":0,\"location\":[5.30457,52.21813]},{\"entry\":[true,true,false],\"bearings\":[96,183,329],\"in\":2,\"out\":1,\"geometry_index\":1,\"location\":[5.30472,52.21797]},{\"entry\":[false,true,true],\"bearings\":[1,12,181],\"in\":0,\"out\":2,\"geometry_index\":4,\"location\":[5.30462,52.21678]},{\"entry\":[true,false,true,true,true],\"bearings\":[1,92,110,186,271],\"in\":4,\"out\":0,\"geometry_index\":5,\"location\":[5.30462,52.21675]},{\"entry\":[true,true,true],\"bearings\":[35,137,231],\"in\":1,\"out\":0,\"geometry_index\":9,\"location\":[5.30372,52.21516]}],\"maneuver\":{\"exit\":1,\"instruction\":\"Neem afslag 1 naar Bisschopsweg op de rotonde \",\"modifier\":\"right\",\"bearing_after\":149,\"bearing_before\":108,\"location\":[5.30457,52.21813],\"type\":\"roundabout\"},\"exit\":1,\"bannerInstructions\":[{\"distanceAlongGeometry\":509.262,\"primary\":{\"text\":\"Eemweg\",\"type\":\"roundabout\",\"modifier\":\"right\",\"components\":[{\"text\":\"Eemweg\",\"type\":\"text\"}],\"degrees\":221},\"sub\":{\"text\":\"Eemstraat\",\"type\":\"continue\",\"components\":[{\"text\":\"Eemstraat\",\"type\":\"text\"}]}}],\"voiceInstructions\":[{\"distanceAlongGeometry\":400,\"announcement\":\"Over 400 meter, Neem afslag 3 naar Eemweg op de rotonde \",\"ssmlAnnouncement\":\"\\u003cspeak\\u003e\\u003camazon:effect name=\\\"drc\\\"\\u003e\\u003cprosody rate=\\\"1.08\\\"\\u003eOver 400 meter, Neem afslag 3 naar Eemweg op de rotonde \\u003c/prosody\\u003e\\u003c/amazon:effect\\u003e\\u003c/speak\\u003e\"},{\"distanceAlongGeometry\":80,\"announcement\":\"Neem afslag 3 naar Eemweg op de rotonde \",\"ssmlAnnouncement\":\"\\u003cspeak\\u003e\\u003camazon:effect name=\\\"drc\\\"\\u003e\\u003cprosody rate=\\\"1.08\\\"\\u003eNeem afslag 3 naar Eemweg op de rotonde \\u003c/prosody\\u003e\\u003c/amazon:effect\\u003e\\u003c/speak\\u003e\"}]},{\"duration\":51.28,\"distance\":365.168,\"mode\":\"driving\",\"name\":\"Eemweg\",\"geometry\":\"uh|qbB}}qbIu@dK|E^bBhHlI~a@nI|a@nIfd@pH|d@vFr`@vFp`@lEbZxAfL`HdO\",\"driving_side\":\"right\",\"intersections\":[{\"entry\":[true,false,true],\"bearings\":[62,197,283],\"in\":0,\"out\":2,\"geometry_index\":0,\"location\":[5.30174,52.21443]},{\"entry\":[false,true,true],\"bearings\":[103,185,314],\"in\":0,\"out\":1,\"geometry_index\":1,\"location\":[5.30155,52.21445]},{\"entry\":[false,true,true],\"bearings\":[5,98,241],\"in\":0,\"out\":2,\"geometry_index\":2,\"location\":[5.30153,52.21434]},{\"entry\":[true,true,true],\"bearings\":[64,245,317],\"in\":0,\"out\":1,\"geometry_index\":5,\"location\":[5.30026,52.21396]},{\"entry\":[true,true,true,true],\"bearings\":[68,159,249,341],\"in\":0,\"out\":2,\"geometry_index\":7,\"location\":[5.29906,52.21364]}],\"maneuver\":{\"exit\":3,\"instruction\":\"Neem afslag 3 naar Eemweg op de rotonde \",\"modifier\":\"right\",\"bearing_after\":283,\"bearing_before\":242,\"location\":[5.30174,52.21443],\"type\":\"roundabout\"},\"exit\":3,\"bannerInstructions\":[{\"distanceAlongGeometry\":365.168,\"primary\":{\"text\":\"Eemstraat\",\"type\":\"continue\",\"components\":[{\"text\":\"Eemstraat\",\"type\":\"text\"}]},\"sub\":{\"text\":\"Bosstraat\",\"type\":\"turn\",\"modifier\":\"left\",\"components\":[{\"text\":\"Bosstraat\",\"type\":\"text\"}]}}],\"voiceInstructions\":[{\"distanceAlongGeometry\":200,\"announcement\":\"Over 200 meter, blijf op Eemstraat\",\"ssmlAnnouncement\":\"\\u003cspeak\\u003e\\u003camazon:effect name=\\\"drc\\\"\\u003e\\u003cprosody rate=\\\"1.08\\\"\\u003eOver 200 meter, blijf op Eemstraat\\u003c/prosody\\u003e\\u003c/amazon:effect\\u003e\\u003c/speak\\u003e\"},{\"distanceAlongGeometry\":80,\"announcement\":\"blijf op Eemstraat\",\"ssmlAnnouncement\":\"\\u003cspeak\\u003e\\u003camazon:effect name=\\\"drc\\\"\\u003e\\u003cprosody rate=\\\"1.08\\\"\\u003eblijf op Eemstraat\\u003c/prosody\\u003e\\u003c/amazon:effect\\u003e\\u003c/speak\\u003e\"}]},{\"duration\":61.257,\"distance\":323.194,\"mode\":\"driving\",\"name\":\"Eemstraat\",\"geometry\":\"ouyqbBqzhbInIzS|JvQnRv^|Opb@jNld@xJtg@pHfi@?dO\",\"driving_side\":\"right\",\"intersections\":[{\"entry\":[false,true,true,true,true],\"bearings\":[48,63,155,231,321],\"in\":0,\"out\":2,\"geometry_index\":0,\"location\":[5.29708,52.2131]},{\"entry\":[true,true,true],\"bearings\":[70,163,270],\"in\":0,\"out\":2,\"geometry_index\":7,\"location\":[5.29344,52.21157]}],\"maneuver\":{\"instruction\":\"Blijf op Eemstraat\",\"bearing_after\":231,\"bearing_before\":228,\"location\":[5.29708,52.2131],\"type\":\"continue\"},\"bannerInstructions\":[{\"distanceAlongGeometry\":323.194,\"primary\":{\"text\":\"Bosstraat\",\"type\":\"turn\",\"modifier\":\"left\",\"components\":[{\"text\":\"Bosstraat\",\"type\":\"text\"}]},\"sub\":{\"text\":\"Cantonlaan\",\"type\":\"turn\",\"modifier\":\"right\",\"components\":[{\"text\":\"Cantonlaan\",\"type\":\"text\"}]}}],\"voiceInstructions\":[{\"distanceAlongGeometry\":200,\"announcement\":\"Over 200 meter, linksaf naar Bosstraat\",\"ssmlAnnouncement\":\"\\u003cspeak\\u003e\\u003camazon:effect name=\\\"drc\\\"\\u003e\\u003cprosody rate=\\\"1.08\\\"\\u003eOver 200 meter, linksaf naar Bosstraat\\u003c/prosody\\u003e\\u003c/amazon:effect\\u003e\\u003c/speak\\u003e\"},{\"distanceAlongGeometry\":80,\"announcement\":\"linksaf naar Bosstraat\",\"ssmlAnnouncement\":\"\\u003cspeak\\u003e\\u003camazon:effect name=\\\"drc\\\"\\u003e\\u003cprosody rate=\\\"1.08\\\"\\u003elinksaf naar Bosstraat\\u003c/prosody\\u003e\\u003c/amazon:effect\\u003e\\u003c/speak\\u003e\"}]},{\"duration\":28.394,\"distance\":192.84,\"mode\":\"driving\",\"name\":\"Bosstraat\",\"geometry\":\"{uvqbBagabIlP~BbPbBdPjAhHWjV_BzU_G\",\"driving_side\":\"right\",\"intersections\":[{\"entry\":[true,true,true],\"bearings\":[90,188,337],\"in\":0,\"out\":1,\"geometry_index\":0,\"location\":[5.29319,52.21157]},{\"entry\":[true,true,true],\"bearings\":[8,186,271],\"in\":0,\"out\":1,\"geometry_index\":1,\"location\":[5.29312,52.21129]},{\"entry\":[true,true,true,true],\"bearings\":[5,90,177,249],\"in\":0,\"out\":2,\"geometry_index\":3,\"location\":[5.29303,52.21074]},{\"entry\":[true,true,true,true],\"bearings\":[80,175,264,357],\"in\":3,\"out\":1,\"geometry_index\":4,\"location\":[5.29305,52.21059]}],\"maneuver\":{\"instruction\":\"Linksaf naar Bosstraat\",\"modifier\":\"left\",\"bearing_after\":188,\"bearing_before\":270,\"location\":[5.29319,52.21157],\"type\":\"turn\"},\"bannerInstructions\":[{\"distanceAlongGeometry\":192.84,\"primary\":{\"text\":\"Cantonlaan\",\"type\":\"turn\",\"modifier\":\"right\",\"components\":[{\"text\":\"Cantonlaan\",\"type\":\"text\"}]},\"sub\":{\"text\":\"Cantonlaan\",\"type\":\"arrive\",\"components\":[{\"text\":\"Cantonlaan\",\"type\":\"text\"}]}}],\"voiceInstructions\":[{\"distanceAlongGeometry\":80,\"announcement\":\"rechtsaf naar Cantonlaan, daarna bestemming bereikt\",\"ssmlAnnouncement\":\"\\u003cspeak\\u003e\\u003camazon:effect name=\\\"drc\\\"\\u003e\\u003cprosody rate=\\\"1.08\\\"\\u003erechtsaf naar Cantonlaan, daarna bestemming bereikt\\u003c/prosody\\u003e\\u003c/amazon:effect\\u003e\\u003c/speak\\u003e\"}]},{\"duration\":0.62028,\"distance\":5.169,\"mode\":\"driving\",\"name\":\"Cantonlaan\",\"geometry\":\"qjsqbBiiabId@hC\",\"driving_side\":\"right\",\"intersections\":[{\"entry\":[true,true,true,true],\"bearings\":[63,169,246,348],\"in\":3,\"out\":2,\"geometry_index\":0,\"location\":[5.29322,52.20985]}],\"maneuver\":{\"instruction\":\"Rechtsaf naar Cantonlaan\",\"modifier\":\"right\",\"bearing_after\":246,\"bearing_before\":168,\"location\":[5.29322,52.20985],\"type\":\"turn\"},\"bannerInstructions\":[{\"distanceAlongGeometry\":5.169,\"primary\":{\"text\":\"Cantonlaan\",\"type\":\"arrive\",\"components\":[{\"text\":\"Cantonlaan\",\"type\":\"text\"}]}}],\"voiceInstructions\":[{\"distanceAlongGeometry\":5.2,\"announcement\":\"bestemming bereikt\",\"ssmlAnnouncement\":\"\\u003cspeak\\u003e\\u003camazon:effect name=\\\"drc\\\"\\u003e\\u003cprosody rate=\\\"1.08\\\"\\u003ebestemming bereikt\\u003c/prosody\\u003e\\u003c/amazon:effect\\u003e\\u003c/speak\\u003e\"}]},{\"duration\":0,\"distance\":0,\"mode\":\"driving\",\"name\":\"Cantonlaan\",\"geometry\":\"kisqbB_eabI\",\"driving_side\":\"right\",\"intersections\":[{\"entry\":[true],\"bearings\":[246],\"in\":0,\"geometry_index\":0,\"location\":[5.29315,52.20983]}],\"maneuver\":{\"instruction\":\"Bestemming bereikt\",\"bearing_after\":0,\"bearing_before\":246,\"location\":[5.29315,52.20983],\"type\":\"arrive\"}}]}],\"weight_name\":\"routability\",\"weight\":710.80244,\"geometry\":\"gcbrbBmnrzHe@i_@Si_@bYvK`ZfAbQKbQKfDGhBcXzD}^bEy^bEy^jBaPdEsg@|Dge@~Dee@nX}BnX_CnX}B`WqAtM{\\\\vM{\\\\tM{\\\\rPy`@fJqe@~UVpT|FlYPdFH~CU|Ej@bAwNOmHaBsQ`Agf@xAcf@rAef@fAgf@pHwKgDgKrB{i@|Bwi@zByi@rB{i@tByi@rB{i@xB_i@pB{d@pB}d@rB{d@pB{d@dBea@fBca@~Au_@~Au_@|Bgk@~Bik@|Bgk@zLg]zRV|RVdMJdMJ|Yn@zYzBlYdGxY|BhY_HxU{UpPe`@~Nib@tOoa@rKyUrKwUdKgSdKgSbFkQ}FyXaLoTyQ_VqRmTaRmUySqZsRw\\\\eQa_@aPs`@}Qo]iNmc@gNoc@eJm\\\\_J_]}I_]_Ja]}I_]wKob@uKmb@}Kgb@sLsa@oK_]wKu\\\\{Nk`@eO}_@yOc_@gPo^_Qk]aSs^sSw]aT}\\\\{Tg[gUqZyUeYiVcX{VsVeWyUiWoU}T}QeP_McPaMeP_McNiKcNkKsN_LsNaLcWmS_WuS}V{ScWkScWmScWkSgW}RgW_SgW}R_TmP_TmPkVeRuVoQkVeRgVuR_VoSyUcTsUkTkUkU_UcVqTiW_TmXqSoY}NeTsN}T}MaVaPuYuOiZcOa[sN{[cNu\\\\wMa]mNm`@}Mca@mMsa@sLob@aLwa@aHcWaHeWmHmd@mHkd@cHud@uFme@iEcf@wByd@_Aee@Ske@Lie@tCwi@`Bcj@hBcj@fC{i@vE_i@rHog@hKoe@lMoc@fMuc@jP__@zOu_@lOk`@dOs`@xNaa@~Mab@hMyb@bM_c@lLuc@`Lad@|Kke@bKcf@`J{f@bJ{f@vIeg@zHug@fHch@zGih@|F{h@~Ca[xBeW`CeWxD{e@pDaf@xCgf@dDwk@fCal@pBel@tAil@hAml@Vql@Vol@Vql@Jql@Hql@Jql@Jql@j@cl@j@cl@j@cl@j@cl@j@cl@j@cl@j@el@j@cl@j@cl@j@cl@h@cl@j@cl@j@cl@j@cl@j@cl@h@cl@l@cl@t@cl@v@al@|@cl@lA_l@tA}k@lB{k@vBwk@|Buk@vCqk@~Cmk@nDgk@|Dek@pE{j@bFuj@fFsj@vFkj@jGaj@rG}i@pGwh@pGwh@|Gsh@zGqh@|Gqh@fL{f@rKig@~J{g@`Nae@vPya@`R}_@pQw`@vP{a@~Laf@lI_i@dHwi@vG_j@xG}i@vG_j@xG_j@~HsHbXbA~WzBfWLt@@xYlCdY`IxWxO`U~WzL~ZbJh^dId_@jI~^u@dK|E^bBhHlI~a@nI|a@nIfd@pH|d@vFr`@vFp`@lEbZxAfL`HdOnIzS|JvQnRv^|Opb@jNld@xJtg@pHfi@?dOlP~BbPbBdPjAhHWjV_BzU_Gd@hC\"}"
            )
            val route = directionRoute.toBuilder().routeOptions(
                RouteOptions.builder()
                    .bannerInstructions(true)
                    .voiceInstructions(true)
                    .geometries(DirectionsCriteria.GEOMETRY_POLYLINE6)
                    .alternatives(true)
                    .steps(true)
                    .coordinates("5.55056, 52.03917;5.5375, 52.04285")
                    .profile(DirectionsCriteria.PROFILE_DRIVING_TRAFFIC)
                    .baseUrl("https://www.test.com")
                    .language("nl")
                    .layersList(null)
                    .enableRefresh(false)
                    .user(DirectionsCriteria.PROFILE_DEFAULT_USER)
                    .roundaboutExits(true)
                    .build()
            ).build()
            findRoute(route)
            binding.startNavigation.visibility = View.GONE
        }
    }

    // initialize view interactions
    binding.stop.setOnClickListener {
        clearRouteAndStopNavigation()
    }
    binding.recenter.setOnClickListener {
        navigationCamera.requestNavigationCameraToFollowing()
        binding.routeOverview.showTextAndExtend(BUTTON_ANIMATION_DURATION)
    }
    binding.routeOverview.setOnClickListener {
        navigationCamera.requestNavigationCameraToOverview()
        binding.recenter.showTextAndExtend(BUTTON_ANIMATION_DURATION)
    }
    binding.soundButton.setOnClickListener {
    // mute/unmute voice instructions
        isVoiceInstructionsMuted = !isVoiceInstructionsMuted
    }

    // set initial sounds button state
    binding.soundButton.unmute()

    // start the trip session to being receiving location updates in free drive
    // and later when a route is set also receiving route progress updates
    mapboxNavigation.startTripSession()
}

override fun onStart() {
    super.onStart()

    // register event listeners
    mapboxNavigation.registerRoutesObserver(routesObserver)
    mapboxNavigation.registerRouteProgressObserver(routeProgressObserver)
    mapboxNavigation.registerLocationObserver(locationObserver)
    mapboxNavigation.registerVoiceInstructionsObserver(voiceInstructionsObserver)
    mapboxNavigation.registerRouteProgressObserver(replayProgressObserver)

    if (mapboxNavigation.getRoutes().isEmpty()) {
        // if simulation is enabled (ReplayLocationEngine set to NavigationOptions)
        // but we're not simulating yet,
        // push a single location sample to establish origin
        mapboxReplayer.pushEvents(
            listOf(
                ReplayRouteMapper.mapToUpdateLocation(
                    eventTimestamp = 0.0,
                    point = Point.fromLngLat(5.1712217, 52.2174967)
                )
            )
        )
        mapboxReplayer.playFirstLocation()
    }
}

override fun onStop() {
    super.onStop()

    // unregister event listeners to prevent leaks or unnecessary resource consumption
    mapboxNavigation.unregisterRoutesObserver(routesObserver)
    mapboxNavigation.unregisterRouteProgressObserver(routeProgressObserver)
    mapboxNavigation.unregisterLocationObserver(locationObserver)
    mapboxNavigation.unregisterVoiceInstructionsObserver(voiceInstructionsObserver)
    mapboxNavigation.unregisterRouteProgressObserver(replayProgressObserver)
}

override fun onDestroy() {
    super.onDestroy()
    MapboxNavigationProvider.destroy()
    mapboxReplayer.finish()
    maneuverApi.cancel()
    routeLineApi.cancel()
    routeLineView.cancel()
    speechApi.cancel()
    voiceInstructionsPlayer.shutdown()
}

private fun setRouteAndStartNavigation(routes: DirectionsRoute) {
    // set routes, where the first route in the list is the primary route that
    // will be used for active guidance
    mapboxNavigation.setRoutes(listOf(routes), 0)

    // start location simulation along the primary route
    startSimulation(routes)

    // show UI elements
    binding.soundButton.visibility = View.VISIBLE
    binding.routeOverview.visibility = View.VISIBLE
    binding.tripProgressCard.visibility = View.VISIBLE

    // move the camera to overview when new route is available
    navigationCamera.requestNavigationCameraToOverview()
}

private fun clearRouteAndStopNavigation() {
    // clear
    mapboxNavigation.setRoutes(listOf())

    // stop simulation
    mapboxReplayer.stop()

    // hide UI elements
    binding.soundButton.visibility = View.INVISIBLE
    binding.maneuverView.visibility = View.INVISIBLE
    binding.routeOverview.visibility = View.INVISIBLE
    binding.tripProgressCard.visibility = View.INVISIBLE
    binding.startNavigation.visibility = View.VISIBLE
}

private fun findRoute(route: DirectionsRoute) {
    setRouteAndStartNavigation(route)
}

private fun startSimulation(route: DirectionsRoute) {
    mapboxReplayer.run {
        stop()
        clearEvents()
        val replayEvents = ReplayRouteMapper().mapDirectionsRouteGeometry(route)
        pushEvents(replayEvents)
        seekTo(replayEvents.first())
        play()
    }
}

private companion object {
    private const val BUTTON_ANIMATION_DURATION = 1500L
}

} `

And here is a the layout of the fragment: `<?xml version="1.0" encoding="utf-8"?> <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" xmlns:mapbox="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".FirstFragment">

<com.mapbox.maps.MapView
    android:id="@+id/mapView"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    mapbox:mapbox_cameraTargetLat="52.2175"
    mapbox:mapbox_cameraTargetLng="5.1712"
    mapbox:mapbox_cameraZoom="9.0"
    app:layout_constraintTop_toTopOf="parent"
    app:layout_constraintEnd_toEndOf="parent"
    app:layout_constraintBottom_toBottomOf="parent"
    app:layout_constraintStart_toStartOf="parent"
    />

<androidx.cardview.widget.CardView
    android:id="@+id/tripProgressCard"
    android:layout_width="0dp"
    android:layout_height="wrap_content"
    android:visibility="invisible"
    app:cardElevation="8dp"
    app:cardUseCompatPadding="false"
    app:layout_constraintBottom_toBottomOf="parent"
    app:layout_constraintEnd_toEndOf="parent"
    app:layout_constraintStart_toStartOf="parent">

    <com.mapbox.navigation.ui.tripprogress.view.MapboxTripProgressView
        android:id="@+id/tripProgressView"
        android:layout_width="match_parent"
        android:layout_height="wrap_content" />

    <ImageView
        android:id="@+id/stop"
        android:layout_width="48dp"
        android:layout_height="48dp"
        android:layout_gravity="end|center_vertical"
        android:layout_marginEnd="12dp"
        app:srcCompat="@android:drawable/ic_delete" />
</androidx.cardview.widget.CardView>

<com.mapbox.navigation.ui.maneuver.view.MapboxManeuverView
    android:id="@+id/maneuverView"
    android:layout_width="0dp"
    android:layout_height="wrap_content"
    android:layout_margin="4dp"
    android:visibility="invisible"
    app:layout_constraintEnd_toEndOf="parent"
    app:layout_constraintStart_toStartOf="parent"
    app:layout_constraintTop_toTopOf="parent" />

<com.mapbox.navigation.ui.voice.view.MapboxSoundButton
    android:id="@+id/soundButton"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_marginTop="8dp"
    android:layout_marginEnd="16dp"
    android:visibility="invisible"
    app:layout_constraintEnd_toEndOf="parent"
    app:layout_constraintTop_toBottomOf="@id/maneuverView" />

<com.mapbox.navigation.ui.maps.camera.view.MapboxRouteOverviewButton
    android:id="@+id/routeOverview"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_marginTop="8dp"
    android:layout_marginEnd="16dp"
    android:visibility="invisible"
    app:layout_constraintEnd_toEndOf="parent"
    app:layout_constraintTop_toBottomOf="@id/soundButton" />

<com.mapbox.navigation.ui.maps.camera.view.MapboxRecenterButton
    android:id="@+id/recenter"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_marginTop="8dp"
    android:layout_marginEnd="16dp"
    app:layout_constraintEnd_toEndOf="parent"
    app:layout_constraintTop_toBottomOf="@id/routeOverview" />

<Button
    android:id="@+id/startNavigation"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="start navigation"
    android:layout_marginBottom="24dp"
    app:layout_constraintBottom_toBottomOf="parent"
    app:layout_constraintEnd_toEndOf="parent"
    app:layout_constraintStart_toStartOf="parent"/>

</androidx.constraintlayout.widget.ConstraintLayout>

`

As soon as you press the navigate button the app crashes with stacktrace: com.example.mapboxnewnavigation E/AndroidRuntime: FATAL EXCEPTION: main Process: com.example.mapboxnewnavigation, PID: 8308 java.lang.ArrayIndexOutOfBoundsException: length=1; index=4 at com.mapbox.navigation.ui.maps.internal.route.line.MapboxRouteLineUtils.getRoadClassArray(MapboxRouteLineUtils.kt:637) at com.mapbox.navigation.ui.maps.internal.route.line.MapboxRouteLineUtils.access$getRoadClassArray(MapboxRouteLineUtils.kt:54) at com.mapbox.navigation.ui.maps.internal.route.line.MapboxRouteLineUtils$extractRouteData$1.invoke(MapboxRouteLineUtils.kt:515) at com.mapbox.navigation.ui.maps.internal.route.line.MapboxRouteLineUtils$extractRouteData$1.invoke(MapboxRouteLineUtils.kt:557) at com.mapbox.navigation.ui.maps.util.CacheResultUtils$CacheResultKey2.invoke(CacheResultUtils.kt:17) at com.mapbox.navigation.ui.maps.util.CacheResultUtils$CacheResultKey2.invoke(CacheResultUtils.kt:15) at com.mapbox.navigation.ui.maps.util.CacheResultUtils$CacheResultHandler.invoke(CacheResultUtils.kt:50) at com.mapbox.navigation.ui.maps.util.CacheResultUtils$cacheResult$2.invoke(CacheResultUtils.kt:38) at com.mapbox.navigation.ui.maps.internal.route.line.MapboxRouteLineUtils$extractRouteDataWithTrafficAndRoadClassDeDuped$1.invoke(MapboxRouteLineUtils.kt:479) at com.mapbox.navigation.ui.maps.internal.route.line.MapboxRouteLineUtils$extractRouteDataWithTrafficAndRoadClassDeDuped$1.invoke(MapboxRouteLineUtils.kt:497) at com.mapbox.navigation.ui.maps.util.CacheResultUtils$CacheResultKey2.invoke(CacheResultUtils.kt:17) at com.mapbox.navigation.ui.maps.util.CacheResultUtils$CacheResultKey2.invoke(CacheResultUtils.kt:15) at com.mapbox.navigation.ui.maps.util.CacheResultUtils$CacheResultHandler.invoke(CacheResultUtils.kt:50) at com.mapbox.navigation.ui.maps.util.CacheResultUtils$cacheResult$2.invoke(CacheResultUtils.kt:38) at com.mapbox.navigation.ui.maps.internal.route.line.MapboxRouteLineUtils.calculateRouteLineSegments(MapboxRouteLineUtils.kt:440) at com.mapbox.navigation.ui.maps.internal.route.line.MapboxRouteLineUtils.getTrafficLineExpressionProducer$lambda-37(MapboxRouteLineUtils.kt:1111) at com.mapbox.navigation.ui.maps.internal.route.line.MapboxRouteLineUtils.$r8$lambda$bh5wkWVuIHohgdk4TO2twBJAxiw(Unknown Source:0) at com.mapbox.navigation.ui.maps.internal.route.line.MapboxRouteLineUtils$$ExternalSyntheticLambda2.generateExpression(Unknown Source:18) at com.mapbox.navigation.ui.maps.route.line.api.MapboxRouteLineView$updateLineGradientAsync$gradientExpression$1.invokeSuspend(MapboxRouteLineView.kt:527) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106) at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)

It seem to be a problem at the com.mapbox.navigation.ui.maps.internal.route.line.MapboxRouteLineUtils.getRoadClassArray(MapboxRouteLineUtils.kt:637)

We are using a geometry_index inside our json and it seem to cause the problem. So there is something wrong regarding your geometry_index and the sdk. This also crashes on iOS! so it seems to be a shared problem.

Android API: 30 Mapbox Navigation SDK version: implementation "com.mapbox.navigation:android:2.2.2"

Steps to trigger behavior

  1. Just start the navigation and it crashes

Expected behavior

Pressing the navigation button and the navigation starting.

Actual behavior

Pressing the button and app crashes due to indexOutOfBoundException in the MapboxRouteLineUtils.kt

cafesilencio commented 2 years ago

The data in the route provided above is unusual. Each step in the leg will usually have one or more intersections with each intersection having a geometry_index. The value could be null but if it isn't the values should be in ascending order. In the route provided there are several intersections with a geometry_index of 0 which I've never seen before. Looking at the very last intersection which is the arrival it also has a geometry_index of 0 which is incorrect since the destination isn't at the last intersection of the route.

@Brammos may I ask how this route was generated? Based on the code you provided it doesn't appear to have been generated by the navigation SDK given that you're manually creating RouteOptions. Any insight you can provide would be helpful.

Here is a comparison between the route provided above and a route generated by the navigation SDK using the same coordinates above. This is the arrival element in the route JSON. Notice the value for the geometry_index.

{
          "distance": 0.0,
          "duration": 0.0,
          "geometry": "kisqbB_eabI",
          "name": "Cantonlaan",
          "mode": "driving",
          "maneuver": {
            "location": [
              5.29315,
              52.20983
            ],
            "bearing_before": 246.0,
            "bearing_after": 0.0,
            "instruction": "Bestemming bereikt",
            "type": "arrive"
          },
          "driving_side": "right",
          "weight": 0.0,
          "intersections": [
            {
              "location": [
                5.29315,
                52.20983
              ],
              "bearings": [
                246
              ],
              "entry": [
                true
              ],
              "in": 0,
              "geometry_index": 0
            }

                    {
          "distance": 0.0,
          "duration": 0.0,
          "duration_typical": 0.0,
          "speedLimitUnit": "km/h",
          "speedLimitSign": "vienna",
          "geometry": "ydmgbBwl~pI??",
          "name": "",
          "ref": "A12; E 35",
          "mode": "driving",
          "maneuver": {
            "location": [
              5.5375,
              52.042845
            ],
            "bearing_before": 93.0,
            "bearing_after": 0.0,
            "instruction": "You have arrived at your destination.",
            "type": "arrive"
          },
          "voiceInstructions": [],
          "bannerInstructions": [],
          "driving_side": "right",
          "weight": 0.0,
          "intersections": [
            {
              "location": [
                5.5375,
                52.042845
              ],
              "bearings": [
                273
              ],
              "entry": [
                true
              ],
              "in": 0,
              "geometry_index": 220,
              "admin_index": 0
            }
          ]
        }
Brammos commented 2 years ago

@cafesilencio So we actually use our own output to generate a route. The output is as following:

{"routeIndex":"0","distance":9639.716,"duration":807.88585,"geometry":"gcbrbBmnrzHe@i_@Si_@bYvK`ZfAbQKbQKfDGhBcXzD}^bEy^bEy^jBaPdEsg@|Dge@~Dee@dBc_@n@o_@n@m_@\\sg@\\sg@?mDFeE_@e^]c^]e^e@ic@}Aac@eDgb@mEiKeOo]u@oC~CaJyG}KmE~HyVM{Vr@yVd@{VX}TVeTcDtJg`@tJg`@tJg`@tJg`@vHc[xHa[vH{[`HuSjHkYdHqYhHoY~Hy[xGaZzG_ZxKqe@jLce@jLae@jLce@jLae@lLae@hLce@jLce@hLce@`Lke@|Kme@vKue@tJof@~DPbFwKgD{OtDuT~DoTnJga@bKs`@hLa_@rLw^dO_b@hCaIhGeRjGeRfLw]~J}^vH_a@zGua@pEcWxE{VpBmIvGiXzGeXtLsf@vLsf@nIiU`Ik\\bIk\\jGu]|Kid@rKsd@rKqd@tL}e@rL_f@tL}e@~Kke@~Kie@dLge@fLce@nKye@|Jif@dHch@bBqLdHqh@hHoh@nG_i@hG_i@jGai@jG_i@lG_i@rG{h@tG{h@rG{h@|Fgi@vGyh@tG{h@rG{h@jGai@hG_i@pE{i@hE}i@zEwi@zEwi@lDqf@nDqf@lDsf@dDsf@lC}f@hC}f@r@iJhCuh@lB}h@bB_i@`B_i@`B_i@`B_i@lC}j@`Dwj@lDuj@bDuj@xC{j@xCyj@~Cyj@|Cyj@~Cwj@|Cyj@pCeh@lCgh@dCih@tAoh@Zyh@\\{h@?yh@G{h@p@qe@j@se@Dse@Due@?aHGyf@?yf@U{f@e@wf@kAsf@_A}g@}@}g@_A}g@}@}g@_A}g@}@}g@}@}g@_A}g@}@}g@cA{j@cA}j@eA{j@cA}j@cA{j@cA}j@cA{j@aA}j@cA}j@aA{j@cA}j@iA{j@eA{j@eA{j@}@}]cCa_@gFo]cHe\\eEoLiPu\\uQeZgPob@qP_b@{Ly[}Lw[{Ly[{Ly[kPyb@iPyb@kP{b@iPyb@cNm^eNm^cNm^cNm^uDyJgHcQ{GqQuJ{WuJ}WkFeN_O{`@eEuK_ImSmLoZmLqZgLwZiLuZoIa^qAmb@mAob@rAgOoT{[yU{VePWePW?mQ?mU`SoZyGuOsB}DrJoc@","weight":692.98753,"weight_name":"routability","legs":[{"distance":9639.716,"duration":807.88585,"summary":"","steps":[{"distance":241.675,"duration":38.61228,"geometry":"gcbrbBmnrzHe@i_@Si_@bYvK`ZfAbQKbQKfDG","name":"Neuweg","mode":"driving","maneuver":{"location":[5.17094,52.21741],"bearing_before":0,"bearing_after":87,"instruction":"Blijf op Violenstraat","type":"depart"},"voiceInstructions":[{"distanceAlongGeometry":200,"announcement":"Over 200 meter, linksaf naar Gijsbrecht van Amstelstraat","ssmlAnnouncement":"<speak><amazon:effect name=\"drc\"><prosody rate=\"1.08\">Over 200 meter, linksaf naar Gijsbrecht van Amstelstraat</prosody></amazon:effect></speak>"},{"distanceAlongGeometry":80,"announcement":"linksaf naar Gijsbrecht van Amstelstraat","ssmlAnnouncement":"<speak><amazon:effect name=\"drc\"><prosody rate=\"1.08\">linksaf naar Gijsbrecht van Amstelstraat</prosody></amazon:effect></speak>"}],"bannerInstructions":[{"distanceAlongGeometry":241.675,"primary":{"text":"Gijsbrecht van Amstelstraat","components":[{"text":"Gijsbrecht van Amstelstraat","type":"text"}],"type":"turn","modifier":"left"},"sub":{"text":"Utrechtseweg","components":[{"text":"Utrechtseweg","type":"text"}],"type":"roundabout","modifier":"right","degrees":248}}],"driving_side":"right","weight":0,"intersections":[{"location":[5.17094,52.21741],"bearings":[87],"entry":[true],"out":0}]},{"distance":786.848,"duration":76.83,"geometry":"kf_rbBaatzHhBcXzD}^bEy^bEy^jBaPdEsg@|Dge@~Dee@dBc_@n@o_@n@m_@\\sg@\\sg@?mDFeE_@e^]c^]e^e@ic@}Aac@eDgb@mEiKeOo]u@oC","name":"Gijsbrecht van Amstelstraat","mode":"driving","maneuver":{"location":[5.17175,52.21593],"bearing_before":178,"bearing_after":102,"instruction":"Linksaf naar Gijsbrecht van Amstelstraat","type":"turn","modifier":"left"},"voiceInstructions":[{"distanceAlongGeometry":400,"announcement":"Over 400 meter, Neem afslag 3 naar Utrechtseweg op de rotonde ","ssmlAnnouncement":"<speak><amazon:effect name=\"drc\"><prosody rate=\"1.08\">Over 400 meter, Neem afslag 3 naar Utrechtseweg op de rotonde </prosody></amazon:effect></speak>"},{"distanceAlongGeometry":80,"announcement":"Neem afslag 3 naar Utrechtseweg op de rotonde ","ssmlAnnouncement":"<speak><amazon:effect name=\"drc\"><prosody rate=\"1.08\">Neem afslag 3 naar Utrechtseweg op de rotonde </prosody></amazon:effect></speak>"}],"bannerInstructions":[{"distanceAlongGeometry":786.848,"primary":{"text":"Utrechtseweg","components":[{"text":"Utrechtseweg","type":"text"}],"type":"roundabout","modifier":"right","degrees":248},"sub":{"text":"Soestdijkerstraatweg","components":[{"text":"Soestdijkerstraatweg","type":"text"}],"type":"turn","modifier":"sharp right"}}],"driving_side":"right","weight":0,"intersections":[{"location":[5.17175,52.21593],"bearings":[102,176,275,358],"entry":[true,true,true,false],"in":1,"out":2},{"location":[5.17368,52.21558],"bearings":[108,187,287],"entry":[true,true,true],"in":0,"out":1},{"location":[5.17395,52.21553],"bearings":[104,288,359],"entry":[true,true,true],"in":1,"out":0},{"location":[5.1746,52.21543],"bearings":[10,104,186,284],"entry":[true,true,true,true],"in":0,"out":2},{"location":[5.17582,52.21524],"bearings":[7,99,175,284],"entry":[true,true,true,true],"in":0,"out":2},{"location":[5.17738,52.21514],"bearings":[8,92,183,274],"entry":[true,true,true,true],"in":3,"out":1},{"location":[5.17868,52.21511],"bearings":[90,180,272],"entry":[true,true,true],"in":2,"out":0},{"location":[5.17876,52.21511],"bearings":[94,270,359],"entry":[true,true,true],"in":1,"out":0},{"location":[5.18036,52.21515],"bearings":[87,190,267,358],"entry":[true,true,true,true],"in":1,"out":0},{"location":[5.18208,52.2153],"bearings":[50,182,257],"entry":[true,true,true],"in":2,"out":0}]},{"distance":304.716,"duration":75.425,"geometry":"sw~qbBgvi{H~CaJyG}KmE~HyVM{Vr@yVd@{VX}TVeTcD","name":"Utrechtseweg","mode":"driving","maneuver":{"location":[5.18284,52.21569],"bearing_before":58,"bearing_after":126,"instruction":"Neem afslag 3 naar Utrechtseweg op de rotonde ","type":"roundabout","modifier":"right","exit":3},"voiceInstructions":[{"distanceAlongGeometry":200,"announcement":"Over 200 meter, ga rechtsaf naar Soestdijkerstraatweg","ssmlAnnouncement":"<speak><amazon:effect name=\"drc\"><prosody rate=\"1.08\">Over 200 meter, ga rechtsaf naar Soestdijkerstraatweg</prosody></amazon:effect></speak>"},{"distanceAlongGeometry":80,"announcement":"ga rechtsaf naar Soestdijkerstraatweg","ssmlAnnouncement":"<speak><amazon:effect name=\"drc\"><prosody rate=\"1.08\">ga rechtsaf naar Soestdijkerstraatweg</prosody></amazon:effect></speak>"}],"bannerInstructions":[{"distanceAlongGeometry":304.716,"primary":{"text":"Soestdijkerstraatweg","components":[{"text":"Soestdijkerstraatweg","type":"text"}],"type":"turn","modifier":"sharp right"},"sub":{"text":"N415","components":[{"text":"N415","type":"text"}],"type":"roundabout","modifier":"right","degrees":247}}],"driving_side":"right","weight":0,"intersections":[{"location":[5.18284,52.21569],"bearings":[40,126,238],"entry":[false,true,true],"in":2,"out":1},{"location":[5.18301,52.21561],"bearings":[42,187,306],"entry":[true,true,false],"in":2,"out":0},{"location":[5.18322,52.21575],"bearings":[90,222,316],"entry":[true,false,true],"in":1,"out":2},{"location":[5.18306,52.21585],"bearings":[1,136,220],"entry":[true,false,true],"in":2,"out":1},{"location":[5.18301,52.21738],"bearings":[179,262,359],"entry":[true,true,true],"in":0,"out":2}]},{"distance":1128.96,"duration":109.159,"geometry":"klcrbBmej{HtJg`@tJg`@tJg`@tJg`@vHc[xHa[vH{[`HuSjHkYdHqYhHoY~Hy[xGaZzG_ZxKqe@jLce@jLae@jLce@jLae@lLae@hLce@jLce@hLce@`Lke@|Kme@vKue@tJof@","name":"Soestdijkerstraatweg","mode":"driving","maneuver":{"location":[5.18308,52.21807],"bearing_before":8,"bearing_after":120,"instruction":"Ga rechtsaf naar Soestdijkerstraatweg","type":"turn","modifier":"sharp right"},"voiceInstructions":[{"distanceAlongGeometry":1000,"announcement":"Over 1 kilometer Neem afslag 2 naar Soestdijkerstraatweg op de rotonde ","ssmlAnnouncement":"<speak><amazon:effect name=\"drc\"><prosody rate=\"1.08\">Over 1 kilometer Neem afslag 2 naar Soestdijkerstraatweg op de rotonde </prosody></amazon:effect></speak>"},{"distanceAlongGeometry":400,"announcement":"Over 400 meter, Neem afslag 2 naar Soestdijkerstraatweg op de rotonde ","ssmlAnnouncement":"<speak><amazon:effect name=\"drc\"><prosody rate=\"1.08\">Over 400 meter, Neem afslag 2 naar Soestdijkerstraatweg op de rotonde </prosody></amazon:effect></speak>"},{"distanceAlongGeometry":80,"announcement":"Neem afslag 2 naar Soestdijkerstraatweg op de rotonde ","ssmlAnnouncement":"<speak><amazon:effect name=\"drc\"><prosody rate=\"1.08\">Neem afslag 2 naar Soestdijkerstraatweg op de rotonde </prosody></amazon:effect></speak>"}],"bannerInstructions":[{"distanceAlongGeometry":1128.96,"primary":{"text":"N415","components":[{"text":"N415","type":"text"}],"type":"roundabout","modifier":"right","degrees":247},"sub":{"text":"Stationsweg","components":[{"text":"Stationsweg","type":"text"}],"type":"continue"}}],"driving_side":"right","weight":0,"intersections":[{"location":[5.18308,52.21807],"bearings":[45,120,188,321],"entry":[true,true,true,true],"in":2,"out":3},{"location":[5.18521,52.21732],"bearings":[119,207,300],"entry":[true,true,true],"in":2,"out":0},{"location":[5.18611,52.21701],"bearings":[119,210,300],"entry":[true,true,true],"in":2,"out":0},{"location":[5.18657,52.21685],"bearings":[18,126,299],"entry":[true,true,true],"in":2,"out":1},{"location":[5.1869,52.21671],"bearings":[120,214,306],"entry":[true,true,true],"in":0,"out":1},{"location":[5.18863,52.2161],"bearings":[118,159,300],"entry":[true,true,true],"in":0,"out":1},{"location":[5.1895,52.21582],"bearings":[44,118,185,298],"entry":[true,true,true,true],"in":2,"out":0}]},{"distance":5577.487,"duration":315.071,"geometry":"ouyqbB{hf|H~DPbFwKgD{OtDuT~DoTnJga@bKs`@hLa_@rLw^dO_b@hCaIhGeRjGeRfLw]~J}^vH_a@zGua@pEcWxE{VpBmIvGiXzGeXtLsf@vLsf@nIiU`Ik\\bIk\\jGu]|Kid@rKsd@rKqd@tL}e@rL_f@tL}e@~Kke@~Kie@dLge@fLce@nKye@|Jif@dHch@bBqLdHqh@hHoh@nG_i@hG_i@jGai@jG_i@lG_i@rG{h@tG{h@rG{h@|Fgi@vGyh@tG{h@rG{h@jGai@hG_i@pE{i@hE}i@zEwi@zEwi@lDqf@nDqf@lDsf@dDsf@lC}f@hC}f@r@iJhCuh@lB}h@bB_i@`B_i@`B_i@`B_i@lC}j@`Dwj@lDuj@bDuj@xC{j@xCyj@~Cyj@|Cyj@~Cwj@|Cyj@pCeh@lCgh@dCih@tAoh@Zyh@\\{h@?yh@G{h@p@qe@j@se@Dse@Due@?aHGyf@?yf@U{f@e@wf@kAsf@_A}g@}@}g@_A}g@}@}g@_A}g@}@}g@}@}g@_A}g@}@}g@cA{j@cA}j@eA{j@cA}j@cA{j@cA}j@cA{j@aA}j@cA}j@aA{j@cA}j@iA{j@eA{j@eA{j@}@}]cCa_@gFo]cHe\\eEoL","name":"N415","mode":"driving","maneuver":{"location":[5.19747,52.2131],"bearing_before":116,"bearing_after":183,"instruction":"Neem afslag 2 naar Soestdijkerstraatweg op de rotonde ","type":"roundabout","modifier":"right","exit":2},"voiceInstructions":[{"distanceAlongGeometry":5000,"announcement":"Ga rechtdoor 5 kilometer","ssmlAnnouncement":"<speak><amazon:effect name=\"drc\"><prosody rate=\"1.08\">Ga rechtdoor 5 kilometer</prosody></amazon:effect></speak>"},{"distanceAlongGeometry":2000,"announcement":"Over 2 kilometer blijf op Luitenant Generaal van Heutszlaan","ssmlAnnouncement":"<speak><amazon:effect name=\"drc\"><prosody rate=\"1.08\">Over 2 kilometer blijf op Luitenant Generaal van Heutszlaan</prosody></amazon:effect></speak>"},{"distanceAlongGeometry":1000,"announcement":"Over 1 kilometer blijf op Luitenant Generaal van Heutszlaan","ssmlAnnouncement":"<speak><amazon:effect name=\"drc\"><prosody rate=\"1.08\">Over 1 kilometer blijf op Luitenant Generaal van Heutszlaan</prosody></amazon:effect></speak>"},{"distanceAlongGeometry":400,"announcement":"Over 400 meter, blijf op Luitenant Generaal van Heutszlaan","ssmlAnnouncement":"<speak><amazon:effect name=\"drc\"><prosody rate=\"1.08\">Over 400 meter, blijf op Luitenant Generaal van Heutszlaan</prosody></amazon:effect></speak>"},{"distanceAlongGeometry":80,"announcement":"blijf op Luitenant Generaal van Heutszlaan","ssmlAnnouncement":"<speak><amazon:effect name=\"drc\"><prosody rate=\"1.08\">blijf op Luitenant Generaal van Heutszlaan</prosody></amazon:effect></speak>"}],"bannerInstructions":[{"distanceAlongGeometry":5577.487,"primary":{"text":"Stationsweg","components":[{"text":"Stationsweg","type":"text"}],"type":"continue"},"sub":{"text":"Oranjestraat","components":[{"text":"Oranjestraat","type":"text"}],"type":"turn","modifier":"left"}}],"driving_side":"right","weight":0,"intersections":[{"location":[5.19747,52.2131],"bearings":[51,183,296],"entry":[false,true,true],"in":2,"out":1},{"location":[5.19746,52.213],"bearings":[3,132,214],"entry":[false,true,true],"in":1,"out":2},{"location":[5.19767,52.21289],"bearings":[63,216,312],"entry":[true,false,false],"in":2,"out":0},{"location":[5.19794,52.21297],"bearings":[113,243,356],"entry":[true,false,true],"in":2,"out":1},{"location":[5.19971,52.21241],"bearings":[26,124,205,300],"entry":[true,true,true,true],"in":3,"out":1},{"location":[5.20129,52.21172],"bearings":[38,125,307],"entry":[true,true,true],"in":2,"out":1},{"location":[5.20145,52.21165],"bearings":[125,213,305],"entry":[true,true,true],"in":0,"out":1},{"location":[5.20207,52.21138],"bearings":[36,125,305],"entry":[true,true,true],"in":2,"out":1},{"location":[5.20417,52.21068],"bearings":[114,208,293],"entry":[true,true,true],"in":1,"out":2},{"location":[5.20494,52.21046],"bearings":[38,119,295],"entry":[true,true,true],"in":2,"out":1},{"location":[5.20511,52.21041],"bearings":[119,262,299],"entry":[true,true,true],"in":2,"out":0},{"location":[5.20897,52.20906],"bearings":[119,294,304],"entry":[true,false,true],"in":2,"out":1},{"location":[5.21077,52.20845],"bearings":[31,120,208,299],"entry":[true,true,true,true],"in":2,"out":1},{"location":[5.21721,52.20637],"bearings":[110,204,291],"entry":[true,true,true],"in":0,"out":1},{"location":[5.2345,52.20326],"bearings":[16,103,192,280],"entry":[false,true,true,false],"in":1,"out":3},{"location":[5.23468,52.20324],"bearings":[13,100,200,283],"entry":[true,true,false,false],"in":3,"out":1},{"location":[5.2387,52.20291],"bearings":[99,277,281],"entry":[true,false,true],"in":1,"out":0},{"location":[5.2535,52.20179],"bearings":[0,90,188,270],"entry":[false,true,true,false],"in":0,"out":3},{"location":[5.25365,52.20179],"bearings":[1,89,207,270],"entry":[true,true,false,false],"in":3,"out":1},{"location":[5.25683,52.20186],"bearings":[85,264,270],"entry":[true,false,true],"in":1,"out":0},{"location":[5.26273,52.20214],"bearings":[85,176,266],"entry":[true,true,true],"in":2,"out":0},{"location":[5.27306,52.20266],"bearings":[78,264,345],"entry":[true,false,true],"in":1,"out":0},{"location":[5.27452,52.20298],"bearings":[53,154,243,337],"entry":[true,true,false,false],"in":2,"out":0}]},{"distance":1264.073,"duration":138.31,"geometry":"scfqbBef}`IiPu\\uQeZgPob@qP_b@{Ly[}Lw[{Ly[{Ly[kPyb@iPyb@kP{b@iPyb@cNm^eNm^cNm^cNm^uDyJgHcQ{GqQuJ{WuJ}WkFeN_O{`@eEuK_ImSmLoZmLqZgLwZiLuZoIa^qAmb@mAob@rAgO","name":"Stationsweg","mode":"driving","maneuver":{"location":[5.27474,52.20308],"bearing_before":53,"bearing_after":46,"instruction":"Blijf op Luitenant Generaal van Heutszlaan","type":"continue"},"voiceInstructions":[{"distanceAlongGeometry":1000,"announcement":"Over 1 kilometer linksaf naar Stationsweg","ssmlAnnouncement":"<speak><amazon:effect name=\"drc\"><prosody rate=\"1.08\">Over 1 kilometer linksaf naar Stationsweg</prosody></amazon:effect></speak>"},{"distanceAlongGeometry":400,"announcement":"Over 400 meter, linksaf naar Stationsweg","ssmlAnnouncement":"<speak><amazon:effect name=\"drc\"><prosody rate=\"1.08\">Over 400 meter, linksaf naar Stationsweg</prosody></amazon:effect></speak>"},{"distanceAlongGeometry":80,"announcement":"linksaf naar Stationsweg","ssmlAnnouncement":"<speak><amazon:effect name=\"drc\"><prosody rate=\"1.08\">linksaf naar Stationsweg</prosody></amazon:effect></speak>"}],"bannerInstructions":[{"distanceAlongGeometry":1264.073,"primary":{"text":"Oranjestraat","components":[{"text":"Oranjestraat","type":"text"}],"type":"turn","modifier":"left"},"sub":{"text":"Oranjepark","components":[{"text":"Oranjepark","type":"text"}],"type":"turn","modifier":"right"}}],"driving_side":"right","weight":0,"intersections":[{"location":[5.27474,52.20308],"bearings":[46,156,233,333],"entry":[true,false,false,true],"in":0,"out":2},{"location":[5.27565,52.20366],"bearings":[52,222,233,327],"entry":[true,false,true,true],"in":0,"out":2},{"location":[5.27678,52.20422],"bearings":[52,231,322],"entry":[true,true,true],"in":1,"out":0},{"location":[5.27862,52.2051],"bearings":[52,232,334],"entry":[true,true,true],"in":2,"out":1},{"location":[5.28091,52.20621],"bearings":[52,232,332],"entry":[true,true,true],"in":1,"out":0},{"location":[5.28293,52.20718],"bearings":[52,232,311],"entry":[true,true,true],"in":1,"out":0},{"location":[5.28311,52.20727],"bearings":[50,137,232],"entry":[true,true,true],"in":2,"out":0},{"location":[5.28474,52.20806],"bearings":[52,232,318],"entry":[true,true,true],"in":1,"out":0},{"location":[5.28528,52.20831],"bearings":[51,168,232,346],"entry":[true,true,true,true],"in":2,"out":0},{"location":[5.28581,52.20857],"bearings":[51,98,231],"entry":[true,true,true],"in":2,"out":0},{"location":[5.28758,52.20943],"bearings":[61,232,304],"entry":[true,true,true],"in":0,"out":2}]},{"distance":205.19,"duration":32.906,"geometry":"_}rqbBa_zaIoT{[yU{VePWePW?mQ?mU","name":"Oranjestraat","mode":"driving","maneuver":{"location":[5.28947,52.20963],"bearing_before":105,"bearing_after":39,"instruction":"Linksaf naar Stationsweg","type":"turn","modifier":"left"},"voiceInstructions":[{"distanceAlongGeometry":200,"announcement":"Over 200 meter, rechtsaf naar Oranjepark, daarna linksaf naar Stationsweg","ssmlAnnouncement":"<speak><amazon:effect name=\"drc\"><prosody rate=\"1.08\">Over 200 meter, rechtsaf naar Oranjepark, daarna linksaf naar Stationsweg</prosody></amazon:effect></speak>"},{"distanceAlongGeometry":80,"announcement":"rechtsaf naar Oranjepark, daarna linksaf naar Stationsweg","ssmlAnnouncement":"<speak><amazon:effect name=\"drc\"><prosody rate=\"1.08\">rechtsaf naar Oranjepark, daarna linksaf naar Stationsweg</prosody></amazon:effect></speak>"}],"bannerInstructions":[{"distanceAlongGeometry":205.19,"primary":{"text":"Oranjepark","components":[{"text":"Oranjepark","type":"text"}],"type":"turn","modifier":"right"},"sub":{"text":"Stationsweg","components":[{"text":"Stationsweg","type":"text"}],"type":"turn","modifier":"left"}}],"driving_side":"right","weight":0,"intersections":[{"location":[5.28947,52.20963],"bearings":[39,158,285],"entry":[true,true,true],"in":2,"out":0},{"location":[5.29032,52.21034],"bearings":[2,213,276],"entry":[true,true,true],"in":0,"out":2}]},{"distance":48.038,"duration":8.932,"geometry":"ukuqbBe~|aI`SoZ","name":"Oranjepark","mode":"driving","maneuver":{"location":[5.291,52.21089],"bearing_before":90,"bearing_after":140,"instruction":"Rechtsaf naar Oranjepark","type":"turn","modifier":"right"},"voiceInstructions":[{"distanceAlongGeometry":48,"announcement":"linksaf naar Stationsweg, daarna rechtsaf naar Nijverheidstraat","ssmlAnnouncement":"<speak><amazon:effect name=\"drc\"><prosody rate=\"1.08\">linksaf naar Stationsweg, daarna rechtsaf naar Nijverheidstraat</prosody></amazon:effect></speak>"}],"bannerInstructions":[{"distanceAlongGeometry":48.038,"primary":{"text":"Stationsweg","components":[{"text":"Stationsweg","type":"text"}],"type":"turn","modifier":"left"},"sub":{"text":"Nijverheidstraat","components":[{"text":"Nijverheidstraat","type":"text"}],"type":"turn","modifier":"right"}}],"driving_side":"right","weight":0,"intersections":[{"location":[5.291,52.21089],"bearings":[140,270,316],"entry":[true,true,true],"in":2,"out":1}]},{"distance":33.559,"duration":5.684,"geometry":"swtqbBuy}aIyGuOsB}D","name":"Stationsweg","mode":"driving","maneuver":{"location":[5.29144,52.21057],"bearing_before":140,"bearing_after":49,"instruction":"Linksaf naar Stationsweg","type":"turn","modifier":"left"},"voiceInstructions":[{"distanceAlongGeometry":33.6,"announcement":"rechtsaf naar Nijverheidstraat, daarna bestemming bereikt","ssmlAnnouncement":"<speak><amazon:effect name=\"drc\"><prosody rate=\"1.08\">rechtsaf naar Nijverheidstraat, daarna bestemming bereikt</prosody></amazon:effect></speak>"}],"bannerInstructions":[{"distanceAlongGeometry":33.559,"primary":{"text":"Nijverheidstraat","components":[{"text":"Nijverheidstraat","type":"text"}],"type":"turn","modifier":"right"},"sub":{"text":"Nijverheidstraat","components":[{"text":"Nijverheidstraat","type":"text"}],"type":"arrive"}}],"driving_side":"right","weight":0,"intersections":[{"location":[5.29144,52.21057],"bearings":[49,249,320],"entry":[true,true,true],"in":1,"out":2},{"location":[5.2917,52.21071],"bearings":[45,229,325],"entry":[true,true,true],"in":1,"out":0}]},{"distance":49.17,"duration":6.95657,"geometry":"aduqbBip~aIrJoc@","name":"Nijverheidstraat","mode":"driving","maneuver":{"location":[5.2918,52.21077],"bearing_before":45,"bearing_after":117,"instruction":"Rechtsaf naar Nijverheidstraat","type":"turn","modifier":"right"},"voiceInstructions":[{"distanceAlongGeometry":25,"announcement":"bestemming bereikt","ssmlAnnouncement":"<speak><amazon:effect name=\"drc\"><prosody rate=\"1.08\">bestemming bereikt</prosody></amazon:effect></speak>"}],"bannerInstructions":[{"distanceAlongGeometry":49.17,"primary":{"text":"Nijverheidstraat","components":[{"text":"Nijverheidstraat","type":"text"}],"type":"arrive"}}],"driving_side":"right","weight":0,"intersections":[{"location":[5.2918,52.21077],"bearings":[41,117,225],"entry":[true,true,true],"in":2,"out":1}]},{"distance":0,"duration":0,"geometry":"mxtqbByt_bI","name":"Nijverheidstraat","mode":"driving","maneuver":{"location":[5.29238,52.21058],"bearing_before":117,"bearing_after":0,"instruction":"Bestemming bereikt","type":"arrive"},"driving_side":"right","weight":0,"intersections":[{"location":[5.29238,52.21058],"bearings":[117],"entry":[true],"in":0}]}]}]}

But we are actually getting the error: image image

We are stuck on this issue because the maneuverApi keeps giving us an exception. So could you please help us out getting further on this. What needs to be changed to make this output work? Because if we use the json from your requestRoute function the json works without an exception and the maneuverApi actually got a maneuver.

Working json:


{"routeIndex":"0","distance":10768.994,"duration":778.778,"duration_typical":789.943,"geometry":"}dbrbBeltzH??A}Ab[vLfJz@vLSh]SzDCdDGh@uFbAmPdD{[|KuaAhBaPNiBvDid@vJmkAdBo\\bBqbAx@gpA?mDFeEw@i{@c@e`@K_ZuCuz@cC}SoEiKeOo]u@oCh@a@d@o@\\u@T}@PkAFoAvBXzj@xGjUtCryA~Qb]hEjDj@~`@rGjc@hIfOrCdEbAGpBJnB\\dBl@tAx@|@bA`@fABfA_@|@_Ap@yA^kBHuBEcBU}Aa@sAm@aAu@o@XeJl@aQpGs|ApJceCtB_i@jMqvCnEicAzDk`A|J{cC`BsKxAcFjBiDtCcDzf@n@h[Vld@bAxLtAjL|AdNtD~KdBzEXbFBrFa@bFeAnDmAvD}AbEgCjE_ErC_DrCuD`FgJxGyOfHcTbOcb@pIaTdXql@lWmg@hBqD~@aCb@gCRqC@{DOoCYiBi@kBmQi]wKgOcNwOaNqOoMePuI}LwJ}N_LeRwNsY_Nc[kQmd@aIiKk]}gAkJm\\{j@awBsa@a`BkPwj@eF_QaQwh@eUsm@yNq^kOq]sPu^aKyRmRo]}Uoa@wXoc@qm@ox@}`@ad@i`@_`@mi@if@aU}Qir@ai@i]uWe^aYqb@c]sa@e]sdA_z@mlAw~@ai@{a@uQsNa`@wXyWqSyTsQeRmPsf@wc@}b@yb@uToVwS_WuVq\\mIuLwK{O{P_XyNkWeXmf@eNeYsO{[wPka@sSwh@mTkm@sTkr@gN}f@aLwa@cQio@qRmlAaFyZuDoZyC{W{Cm_@uAkV}@qWc@yVMsVIq[Pw[hD{p@bBcp@jC_s@zA}WhBuTzBoStEq[vByL~DcRxD}OhGcTxHkVjH_XxXmn@~^_`A|Tmm@jLi]fL_`@~W}~@dTe{@nMiWnPwj@pIsWbFuJ`HcIxFaElHwBdHYdHv@vJfEhKpHxKjIxOxIhP~ElLvBjNjAbo@eAbESzGc@\\`N~@xx@~@fv@`BfYbCnY~B~PpB|PxAvS|AhVVbM`IzsGhK`kIlFfeEBzR}Bhn@YpP@jOd@x_@~@vXHzOz@bj@f@bcAnArl@z@v~@oU^sIR}T~@{FTaFLw~@jCq@mn@mBahBEeE{@kt@qAgz@","weight":898.419,"weight_name":"auto","legs":[{"distance":10768.994,"duration":778.778,"duration_typical":789.943,"summary":"A27, Zandheuvelweg","admins":[{"iso_3166_1":"NL","iso_3166_1_alpha3":"NLD"},{"iso_3166_1":"NL","iso_3166_1_alpha3":"NLD"}],"steps":[{"distance":3,"duration":0.778,"duration_typical":0.778,"speedLimitUnit":"km/h","speedLimitSign":"vienna","geometry":"}dbrbBeltzH??A}A","name":"Violenstraat","mode":"driving","maneuver":{"location":[5.171923,52.217439],"bearing_before":0,"bearing_after":88,"instruction":"Drive east on Violenstraat.","type":"depart"},"voiceInstructions":[{"distanceAlongGeometry":3,"announcement":"Drive east on Violenstraat. Then Turn right onto Neuweg.","ssmlAnnouncement":"<speak><amazon:effect name=\"drc\"><prosody rate=\"1.08\">Drive east on <say-as interpret-as=\"address\">Violenstraat</say-as>. Then Turn right onto <say-as interpret-as=\"address\">Neuweg</say-as>.</prosody></amazon:effect></speak>"}],"bannerInstructions":[{"distanceAlongGeometry":3,"primary":{"text":"Neuweg","components":[{"text":"Neuweg","type":"text"}],"type":"turn","modifier":"right"}}],"driving_side":"right","weight":4.206,"intersections":[{"location":[5.171923,52.217439],"bearings":[88],"entry":[true],"out":0,"geometry_index":0,"is_urban":true,"admin_index":0,"mapbox_streets_v8":{"class":"street"}},{"location":[5.171923,52.217439],"bearings":[21,88,197,268],"entry":[false,true,false,false],"in":3,"out":1,"geometry_index":1,"is_urban":true,"admin_index":0,"mapbox_streets_v8":{"class":"street"}}]},{"distance":170,"duration":27.308,"duration_typical":27.308,"speedLimitUnit":"km/h","speedLimitSign":"vienna","geometry":"_ebrbBcotzHb[vLfJz@vLSh]SzDCdDG","name":"Neuweg","mode":"driving","maneuver":{"location":[5.17197,52.21744],"bearing_before":88,"bearing_after":197,"instruction":"Turn right onto Neuweg.","type":"turn","modifier":"right"},"voiceInstructions":[{"distanceAlongGeometry":153.333,"announcement":"In 600 feet, Turn left onto Gijsbrecht van Amstelstraat.","ssmlAnnouncement":"<speak><amazon:effect name=\"drc\"><prosody rate=\"1.08\">In 600 feet, Turn left onto <say-as interpret-as=\"address\">Gijsbrecht van Amstelstraat</say-as>.</prosody></amazon:effect></speak>"},{"distanceAlongGeometry":66.667,"announcement":"Turn left.","ssmlAnnouncement":"<speak><amazon:effect name=\"drc\"><prosody rate=\"1.08\">Turn left.</prosody></amazon:effect></speak>"}],"bannerInstructions":[{"distanceAlongGeometry":170,"primary":{"text":"Gijsbrecht van Amstelstraat","components":[{"text":"Gijsbrecht van Amstelstraat","type":"text"}],"type":"turn","modifier":"left"}}],"driving_side":"right","weight":38.063,"intersections":[{"location":[5.17197,52.21744],"bearings":[23,106,197,268],"entry":[false,false,true,false],"in":3,"out":2,"geometry_index":2,"is_urban":true,"admin_index":0,"mapbox_streets_v8":{"class":"tertiary"}},{"location":[5.17173,52.21659],"bearings":[83,179,267,358],"entry":[false,true,false,false],"in":3,"out":1,"geometry_index":5,"is_urban":true,"admin_index":0,"mapbox_streets_v8":{"class":"tertiary"}},{"location":[5.171742,52.216011],"bearings":[107,178,267,359],"entry":[false,true,false,false],"in":3,"out":1,"geometry_index":7,"is_urban":true,"admin_index":0,"mapbox_streets_v8":{"class":"tertiary"}}]},{"distance":787,"duration":92.225,"duration_typical":84.949,"speedLimitUnit":"km/h","speedLimitSign":"vienna","geometry":"of_rbBcatzHh@uFbAmPdD{[|KuaAhBaPNiBvDid@vJmkAdBo\\bBqbAx@gpA?mDFeEw@i{@c@e`@K_ZuCuz@cC}SoEiKeOo]u@oC","name":"Gijsbrecht van Amstelstraat","mode":"driving","maneuver":{"location":[5.171746,52.215928],"bearing_before":178,"bearing_after":106,"instruction":"Turn left onto Gijsbrecht van Amstelstraat.","type":"turn","modifier":"left"},"voiceInstructions":[{"distanceAlongGeometry":770.333,"announcement":"Continue for a half mile.","ssmlAnnouncement":"<speak><amazon:effect name=\"drc\"><prosody rate=\"1.08\">Continue for a half mile.</prosody></amazon:effect></speak>"},{"distanceAlongGeometry":402.336,"announcement":"In a quarter mile, Enter the roundabout and take the 1st exit onto Utrechtseweg.","ssmlAnnouncement":"<speak><amazon:effect name=\"drc\"><prosody rate=\"1.08\">In a quarter mile, Enter the roundabout and take the 1st exit onto <say-as interpret-as=\"address\">Utrechtseweg</say-as>.</prosody></amazon:effect></speak>"},{"distanceAlongGeometry":88.889,"announcement":"Enter the roundabout and take the 1st exit onto Utrechtseweg.","ssmlAnnouncement":"<speak><amazon:effect name=\"drc\"><prosody rate=\"1.08\">Enter the roundabout and take the 1st exit onto <say-as interpret-as=\"address\">Utrechtseweg</say-as>.</prosody></amazon:effect></speak>"}],"bannerInstructions":[{"distanceAlongGeometry":787,"primary":{"text":"Utrechtseweg","components":[{"text":"Utrechtseweg","type":"text"}],"type":"roundabout","modifier":"right","degrees":47,"driving_side":"right"}}],"driving_side":"right","weight":129.333,"intersections":[{"location":[5.171746,52.215928],"bearings":[106,176,282,358],"entry":[true,true,true,false],"in":3,"out":0,"geometry_index":8,"is_urban":true,"admin_index":0,"mapbox_streets_v8":{"class":"tertiary"}},{"location":[5.171869,52.215907],"bearings":[101,182,286,356],"entry":[true,false,false,false],"in":2,"out":0,"geometry_index":9,"is_urban":true,"admin_index":0,"mapbox_streets_v8":{"class":"tertiary"}},{"location":[5.172148,52.215873],"bearings":[106,252,281,307],"entry":[true,false,false,false],"in":2,"out":0,"geometry_index":10,"is_urban":true,"admin_index":0,"mapbox_streets_v8":{"class":"tertiary"}},{"location":[5.173677,52.215583],"bearings":[108,183,288],"entry":[true,true,false],"in":2,"out":0,"geometry_index":12,"is_urban":true,"admin_index":0,"mapbox_streets_v8":{"class":"tertiary"}},{"location":[5.17395,52.21553],"bearings":[104,288,359],"entry":[true,false,true],"in":1,"out":0,"geometry_index":13,"is_urban":true,"admin_index":0,"mapbox_streets_v8":{"class":"tertiary"}},{"location":[5.174003,52.215522],"bearings":[104,177,284],"entry":[true,true,false],"in":2,"out":0,"geometry_index":14,"is_urban":true,"admin_index":0,"mapbox_streets_v8":{"class":"tertiary"}},{"location":[5.1746,52.21543],"bearings":[8,104,186,284],"entry":[true,true,true,false],"in":3,"out":1,"geometry_index":15,"is_urban":true,"admin_index":0,"mapbox_streets_v8":{"class":"tertiary"}},{"location":[5.175823,52.215242],"bearings":[7,100,175,284],"entry":[true,true,true,false],"in":3,"out":1,"geometry_index":16,"is_urban":true,"admin_index":0,"mapbox_streets_v8":{"class":"tertiary"}},{"location":[5.177376,52.215141],"bearings":[8,92,183,274],"entry":[true,true,true,false],"in":3,"out":1,"geometry_index":18,"is_urban":true,"admin_index":0,"mapbox_streets_v8":{"class":"tertiary"}},{"location":[5.178676,52.215112],"bearings":[90,180,272],"entry":[true,true,false],"in":2,"out":0,"geometry_index":19,"is_urban":true,"admin_index":0,"mapbox_streets_v8":{"class":"tertiary"}},{"location":[5.178763,52.215112],"bearings":[94,270,359],"entry":[true,false,true],"in":1,"out":0,"geometry_index":20,"is_urban":true,"admin_index":0,"mapbox_streets_v8":{"class":"tertiary"}},{"location":[5.178862,52.215108],"bearings":[87,182,274],"entry":[true,false,false],"in":2,"out":0,"geometry_index":21,"is_urban":true,"admin_index":0,"mapbox_streets_v8":{"class":"tertiary"}},{"location":[5.180358,52.215154],"bearings":[0,89,190,267],"entry":[true,true,true,false],"in":3,"out":1,"geometry_index":23,"is_urban":true,"admin_index":0,"mapbox_streets_v8":{"class":"tertiary"}},{"location":[5.181745,52.215235],"bearings":[72,87,263],"entry":[true,false,false],"in":2,"out":0,"geometry_index":25,"is_urban":true,"admin_index":0,"mapbox_streets_v8":{"class":"tertiary"}},{"location":[5.18208,52.215301],"bearings":[49,182,252],"entry":[true,true,false],"in":2,"out":0,"geometry_index":26,"is_urban":true,"admin_index":0,"mapbox_streets_v8":{"class":"tertiary"}},{"location":[5.182277,52.215405],"bearings":[25,49,229],"entry":[false,true,false],"in":2,"out":1,"geometry_index":27,"is_urban":true,"admin_index":0,"mapbox_streets_v8":{"class":"tertiary"}},{"location":[5.182765,52.215664],"bearings":[59,151,229,351],"entry":[true,false,false,false],"in":2,"out":0,"geometry_index":28,"is_urban":true,"admin_index":0,"mapbox_streets_v8":{"class":"tertiary"}}]},{"distance":16,"duration":4.141,"duration_typical":4.141,"speedLimitUnit":"km/h","speedLimitSign":"vienna","geometry":"uw~qbBivi{Hh@a@d@o@\\u@T}@PkAFoA","name":"Utrechtseweg","mode":"driving","maneuver":{"location":[5.182837,52.215691],"bearing_before":59,"bearing_after":126,"instruction":"Enter the roundabout and take the 1st exit onto Utrechtseweg.","type":"roundabout","modifier":"right","exit":1},"voiceInstructions":[{"distanceAlongGeometry":16,"announcement":"Exit the roundabout onto Utrechtseweg.","ssmlAnnouncement":"<speak><amazon:effect name=\"drc\"><prosody rate=\"1.08\">Exit the roundabout onto <say-as interpret-as=\"address\">Utrechtseweg</say-as>.</prosody></amazon:effect></speak>"}],"bannerInstructions":[{"distanceAlongGeometry":16,"primary":{"text":"Utrechtseweg","components":[{"text":"Utrechtseweg","type":"text"}],"type":"roundabout","modifier":"right","degrees":47,"driving_side":"right"}}],"driving_side":"right","weight":10.96,"intersections":[{"location":[5.182837,52.215691],"bearings":[24,126,239],"entry":[false,true,false],"in":2,"out":1,"geometry_index":29,"is_urban":true,"admin_index":0,"mapbox_streets_v8":{"class":"roundabout"}}]},{"distance":520,"duration":58.549,"duration_typical":57.72,"speedLimitUnit":"km/h","speedLimitSign":"vienna","geometry":"wr~qbBkaj{HvBXzj@xGjUtCryA~Qb]hEjDj@~`@rGjc@hIfOrCdEbA","name":"Utrechtseweg","mode":"driving","maneuver":{"location":[5.183014,52.215612],"bearing_before":126,"bearing_after":188,"instruction":"Exit the roundabout onto Utrechtseweg.","type":"exit roundabout","modifier":"right"},"voiceInstructions":[{"distanceAlongGeometry":503.333,"announcement":"In a quarter mile, Enter the roundabout and take the 3rd exit onto Diependaalselaan.","ssmlAnnouncement":"<speak><amazon:effect name=\"drc\"><prosody rate=\"1.08\">In a quarter mile, Enter the roundabout and take the 3rd exit onto <say-as interpret-as=\"address\">Diependaalselaan</say-as>.</prosody></amazon:effect></speak>"},{"distanceAlongGeometry":116.667,"announcement":"Enter the roundabout and take the 3rd exit onto Diependaalselaan, RING.","ssmlAnnouncement":"<speak><amazon:effect name=\"drc\"><prosody rate=\"1.08\">Enter the roundabout and take the 3rd exit onto <say-as interpret-as=\"address\">Diependaalselaan</say-as>, <say-as interpret-as=\"address\">RING</say-as>.</prosody></amazon:effect></speak>"}],"bannerInstructions":[{"distanceAlongGeometry":520,"primary":{"text":"Diependaalselaan / RING","components":[{"text":"Diependaalselaan","type":"text"},{"text":"/","type":"delimiter"},{"text":"RING","type":"icon","mapbox_shield":{"base_url":"https://api.mapbox.com/styles/v1","name":"default","text_color":"black","display_ref":"RING"}}],"type":"roundabout","modifier":"right","degrees":272,"driving_side":"right"}}],"driving_side":"right","weight":73.269,"intersections":[{"location":[5.183014,52.215612],"bearings":[48,188,306],"entry":[true,true,false],"in":2,"out":1,"geometry_index":35,"is_urban":true,"admin_index":0,"mapbox_streets_v8":{"class":"secondary"}},{"location":[5.183001,52.215552],"bearings":[8,86,187,282],"entry":[false,false,true,false],"in":0,"out":2,"geometry_index":36,"is_urban":true,"admin_index":0,"mapbox_streets_v8":{"class":"secondary"}},{"location":[5.182481,52.213042],"bearings":[7,187,275],"entry":[false,true,true],"in":0,"out":1,"geometry_index":39,"is_urban":true,"admin_index":0,"mapbox_streets_v8":{"class":"secondary"}},{"location":[5.182358,52.212474],"bearings":[8,189,272],"entry":[false,true,true],"in":0,"out":1,"geometry_index":41,"is_urban":false,"admin_index":0,"mapbox_streets_v8":{"class":"secondary"}},{"location":[5.182055,52.211348],"bearings":[10,97,190],"entry":[false,true,true],"in":0,"out":2,"geometry_index":43,"is_urban":false,"admin_index":0,"mapbox_streets_v8":{"class":"secondary"}},{"location":[5.181981,52.211088],"bearings":[10,104,192,282],"entry":[false,false,true,false],"in":0,"out":2,"geometry_index":44,"is_urban":false,"admin_index":0,"mapbox_streets_v8":{"class":"secondary"}}]},{"distance":65,"duration":20.077,"duration_typical":20.735,"speedLimitUnit":"km/h","speedLimitSign":"vienna","geometry":"yquqbBu~g{HGpBJnB\\dBl@tAx@|@bA`@fABfA_@|@_Ap@yA^kBHuBEcBU}Aa@sAm@aAu@o@","name":"Diependaalselaan","ref":"RING","mode":"driving","maneuver":{"location":[5.181947,52.210989],"bearing_before":192,"bearing_after":241,"instruction":"Enter the roundabout and take the 3rd exit onto Diependaalselaan/RING.","type":"roundabout","modifier":"right","exit":3},"voiceInstructions":[{"distanceAlongGeometry":48.333,"announcement":"Exit the roundabout onto Diependaalselaan, RING.","ssmlAnnouncement":"<speak><amazon:effect name=\"drc\"><prosody rate=\"1.08\">Exit the roundabout onto <say-as interpret-as=\"address\">Diependaalselaan</say-as>, <say-as interpret-as=\"address\">RING</say-as>.</prosody></amazon:effect></speak>"}],"bannerInstructions":[{"distanceAlongGeometry":65,"primary":{"text":"Diependaalselaan / RING","components":[{"text":"Diependaalselaan","type":"text"},{"text":"/","type":"delimiter"},{"text":"RING","type":"icon","mapbox_shield":{"base_url":"https://api.mapbox.com/styles/v1","name":"default","text_color":"black","display_ref":"RING"}}],"type":"roundabout","modifier":"right","degrees":272,"driving_side":"right"}}],"driving_side":"right","weight":18.96,"intersections":[{"location":[5.181947,52.210989],"bearings":[12,134,241],"entry":[false,false,true],"in":0,"out":2,"geometry_index":45,"is_urban":false,"admin_index":0,"mapbox_streets_v8":{"class":"roundabout"}},{"location":[5.181692,52.210886],"bearings":[52,147,275],"entry":[false,true,true],"in":0,"out":1,"geometry_index":51,"is_urban":false,"admin_index":0,"mapbox_streets_v8":{"class":"roundabout"}},{"location":[5.181896,52.210737],"bearings":[56,184,313],"entry":[true,true,false],"in":2,"out":0,"geometry_index":57,"is_urban":false,"admin_index":0,"mapbox_streets_v8":{"class":"roundabout"}}]},{"distance":790,"duration":66.766,"duration_typical":74.402,"speedLimitUnit":"km/h","speedLimitSign":"vienna","geometry":"cguqbBwgh{HXeJl@aQpGs|ApJceCtB_i@jMqvCnEicAzDk`A|J{cC","name":"Diependaalselaan","ref":"RING","mode":"driving","maneuver":{"location":[5.182092,52.210818],"bearing_before":56,"bearing_after":97,"instruction":"Exit the roundabout onto Diependaalselaan/RING.","type":"exit roundabout","modifier":"slight right"},"voiceInstructions":[{"distanceAlongGeometry":773.333,"announcement":"Continue for a half mile.","ssmlAnnouncement":"<speak><amazon:effect name=\"drc\"><prosody rate=\"1.08\">Continue for a half mile.</prosody></amazon:effect></speak>"},{"distanceAlongGeometry":402.336,"announcement":"In a quarter mile, Turn right toward A27.","ssmlAnnouncement":"<speak><amazon:effect name=\"drc\"><prosody rate=\"1.08\">In a quarter mile, Turn right toward <say-as interpret-as=\"address\">A27</say-as>.</prosody></amazon:effect></speak>"},{"distanceAlongGeometry":83.333,"announcement":"Turn right toward A27, Amsterdam.","ssmlAnnouncement":"<speak><amazon:effect name=\"drc\"><prosody rate=\"1.08\">Turn right toward <say-as interpret-as=\"address\">A27</say-as>, <say-as interpret-as=\"address\">Amsterdam</say-as>.</prosody></amazon:effect></speak>"}],"bannerInstructions":[{"distanceAlongGeometry":790,"primary":{"text":"Exit 33","components":[{"text":"Exit","type":"exit"},{"text":"33","type":"exit-number"}],"type":"turn","modifier":"right"}},{"distanceAlongGeometry":402.336,"primary":{"text":"Exit 33","components":[{"text":"Exit","type":"exit"},{"text":"33","type":"exit-number"}],"type":"turn","modifier":"right"},"sub":{"text":"","components":[{"text":"","type":"lane","directions":["straight"],"active":false},{"text":"","type":"lane","directions":["straight"],"active":false},{"text":"","type":"lane","directions":["right"],"active":true,"active_direction":"right"},{"text":"","type":"lane","directions":["right"],"active":true,"active_direction":"right"}]}}],"driving_side":"right","weight":65.816,"intersections":[{"location":[5.182092,52.210818],"bearings":[4,97,236],"entry":[true,true,false],"in":2,"out":1,"geometry_index":62,"is_urban":false,"admin_index":0,"mapbox_streets_v8":{"class":"primary"}},{"location":[5.182271,52.210805],"bearings":[6,97,206,277],"entry":[false,true,false,false],"in":3,"out":1,"geometry_index":63,"is_urban":false,"admin_index":0,"mapbox_streets_v8":{"class":"primary"}},{"location":[5.186204,52.21046],"bearings":[98,278],"classes":["tunnel"],"entry":[true,false],"in":1,"out":0,"geometry_index":66,"is_urban":false,"admin_index":0,"mapbox_streets_v8":{"class":"primary"}},{"location":[5.186876,52.210401],"bearings":[99,278],"entry":[true,false],"in":1,"out":0,"geometry_index":67,"is_urban":false,"admin_index":0,"mapbox_streets_v8":{"class":"primary"}},{"location":[5.189301,52.210171],"bearings":[99,279],"entry":[true,false],"in":1,"out":0,"geometry_index":68,"is_urban":false,"admin_index":0,"mapbox_streets_v8":{"class":"primary"}},{"location":[5.190394,52.210067],"bearings":[35,98,279,344],"entry":[true,true,false,false],"in":2,"out":1,"lanes":[{"valid":false,"active":false,"indications":["left"]},{"valid":true,"active":false,"valid_indication":"straight","indications":["straight"]},{"valid":true,"active":true,"valid_indication":"straight","indications":["straight"]}],"geometry_index":69,"is_urban":false,"admin_index":0,"mapbox_streets_v8":{"class":"primary"}},{"location":[5.19144,52.209973],"bearings":[98,278],"entry":[true,false],"in":1,"out":0,"geometry_index":70,"is_urban":false,"admin_index":0,"mapbox_streets_v8":{"class":"primary"}}]},{"distance":595,"duration":39.411,"duration_typical":41.612,"speedLimitUnit":"km/h","speedLimitSign":"vienna","geometry":"kfsqbB{t~{H`BsKxAcFjBiDtCcDzf@n@h[Vld@bAxLtAjL|AdNtD~KdBzEXbFBrFa@bFeAnDmAvD}AbEgCjE_ErC_DrCuD`FgJxGyOfHcTbOcb@pIaT","name":"Oostereind","destinations":"A27: Amsterdam, Utrecht","mode":"driving","maneuver":{"location":[5.193566,52.209782],"bearing_before":98,"bearing_after":181,"instruction":"Turn right toward A27/Amsterdam/Utrecht.","type":"turn","modifier":"right"},"voiceInstructions":[{"distanceAlongGeometry":563.667,"announcement":"In a quarter mile, Continue toward A27.","ssmlAnnouncement":"<speak><amazon:effect name=\"drc\"><prosody rate=\"1.08\">In a quarter mile, Continue toward <say-as interpret-as=\"address\">A27</say-as>.</prosody></amazon:effect></speak>"},{"distanceAlongGeometry":175.556,"announcement":"Continue toward A27, Amsterdam. Then Turn left to take the ramp toward Amersfoort.","ssmlAnnouncement":"<speak><amazon:effect name=\"drc\"><prosody rate=\"1.08\">Continue toward <say-as interpret-as=\"address\">A27</say-as>, <say-as interpret-as=\"address\">Amsterdam</say-as>. Then Turn left to take the ramp toward <say-as interpret-as=\"address\">Amersfoort</say-as>.</prosody></amazon:effect></speak>"}],"bannerInstructions":[{"distanceAlongGeometry":595,"primary":{"text":"Exit 33","components":[{"text":"Exit","type":"exit"},{"text":"33","type":"exit-number"}],"type":"turn","modifier":"straight"},"sub":{"text":"","components":[{"text":"","type":"lane","directions":["straight"],"active":true,"active_direction":"straight"},{"text":"","type":"lane","directions":["straight"],"active":false},{"text":"","type":"lane","directions":["right"],"active":false}]}}],"driving_side":"right","weight":42.06,"intersections":[{"location":[5.193566,52.209782],"bearings":[99,115,278],"entry":[true,true,false],"in":2,"out":1,"lanes":[{"valid":false,"active":false,"indications":["straight"]},{"valid":false,"active":false,"indications":["straight"]},{"valid":true,"active":true,"valid_indication":"right","indications":["right"]},{"valid":true,"active":true,"valid_indication":"right","indications":["right"]}],"geometry_index":71,"is_urban":false,"admin_index":0,"mapbox_streets_v8":{"class":"primary_link"}},{"location":[5.194049,52.209559],"bearings":[6,181,319],"entry":[false,true,false],"in":2,"out":1,"geometry_index":75,"is_urban":false,"admin_index":0,"mapbox_streets_v8":{"class":"primary"}},{"location":[5.194025,52.208921],"bearings":[1,181],"entry":[false,true],"in":0,"out":1,"geometry_index":76,"is_urban":false,"admin_index":0,"mapbox_streets_v8":{"class":"primary"}},{"location":[5.194013,52.208468],"bearings":[1,182],"entry":[false,true],"in":0,"out":1,"geometry_index":77,"is_urban":false,"admin_index":0,"mapbox_streets_v8":{"class":"primary"}}],"exits":"33"},{"distance":153,"duration":20.179,"duration_typical":24.611,"speedLimitUnit":"km/h","speedLimitSign":"vienna","geometry":"{ejqbBefc|HdXql@lWmg@hBqD~@aCb@gCRqC","name":"Oostereind","destinations":"A27: Amsterdam, Utrecht","mode":"driving","maneuver":{"location":[5.195891,52.205166],"bearing_before":129,"bearing_after":132,"instruction":"Continue toward A27/Amsterdam/Utrecht.","type":"new name","modifier":"straight"},"voiceInstructions":[{"distanceAlongGeometry":126.333,"announcement":"Turn left to take the ramp toward Amersfoort.","ssmlAnnouncement":"<speak><amazon:effect name=\"drc\"><prosody rate=\"1.08\">Turn left to take the ramp toward <say-as interpret-as=\"address\">Amersfoort</say-as>.</prosody></amazon:effect></speak>"}],"bannerInstructions":[{"distanceAlongGeometry":153,"primary":{"text":"Amersfoort","components":[{"text":"Amersfoort","type":"text"}],"type":"turn","modifier":"left"},"sub":{"text":"","components":[{"text":"","type":"lane","directions":["left"],"active":true,"active_direction":"left"},{"text":"","type":"lane","directions":["left"],"active":true,"active_direction":"left"}]}}],"driving_side":"right","weight":19.161,"intersections":[{"location":[5.195891,52.205166],"bearings":[132,151,309],"entry":[true,true,false],"in":2,"out":0,"lanes":[{"valid":true,"active":true,"valid_indication":"straight","indications":["straight"]},{"valid":true,"active":false,"valid_indication":"straight","indications":["straight"]},{"valid":false,"active":false,"indications":["right"]}],"geometry_index":97,"is_urban":false,"admin_index":0,"mapbox_streets_v8":{"class":"primary"}},{"location":[5.19662,52.204763],"bearings":[135,312],"entry":[true,false],"in":1,"out":0,"lanes":[{"valid":true,"active":true,"valid_indication":"left","indications":["left"]},{"valid":true,"active":true,"valid_indication":"left","indications":["left"]}],"geometry_index":98,"is_urban":false,"admin_index":0,"mapbox_streets_v8":{"class":"primary"}},{"location":[5.197267,52.204372],"bearings":[125,315],"entry":[true,false],"in":1,"out":0,"lanes":[{"valid":true,"active":true,"valid_indication":"left","indications":["left"]},{"valid":true,"active":true,"valid_indication":"left","indications":["left"]}],"geometry_index":99,"is_urban":false,"admin_index":0,"mapbox_streets_v8":{"class":"primary"}}],"exits":"33"},{"distance":3700.999,"duration":144.639,"duration_typical":145.444,"speedLimitUnit":"km/h","speedLimitSign":"vienna","geometry":"emhqbBsnf|H@{DOoCYiBi@kBmQi]wKgOcNwOaNqOoMePuI}LwJ}N_LeRwNsY_Nc[kQmd@aIiKk]}gAkJm\\{j@awBsa@a`BkPwj@eF_QaQwh@eUsm@yNq^kOq]sPu^aKyRmRo]}Uoa@wXoc@qm@ox@}`@ad@i`@_`@mi@if@aU}Qir@ai@i]uWe^aYqb@c]sa@e]sdA_z@mlAw~@ai@{a@uQsNa`@wXyWqSyTsQeRmPsf@wc@}b@yb@uToVwS_WuVq\\mIuLwK{O{P_XyNkWeXmf@eNeYsO{[wPka@sSwh@mTkm@sTkr@gN}f@aLwa@cQio@","name":"","ref":"A27","destinations":"Amersfoort","mode":"driving","maneuver":{"location":[5.197562,52.204259],"bearing_before":120,"bearing_after":74,"instruction":"Turn left to take the ramp toward Amersfoort.","type":"turn","modifier":"left"},"voiceInstructions":[{"distanceAlongGeometry":3657.666,"announcement":"Continue for 2 miles.","ssmlAnnouncement":"<speak><amazon:effect name=\"drc\"><prosody rate=\"1.08\">Continue for 2 miles.</prosody></amazon:effect></speak>"},{"distanceAlongGeometry":1609.344,"announcement":"In 1 mile, Keep right to take A1.","ssmlAnnouncement":"<speak><amazon:effect name=\"drc\"><prosody rate=\"1.08\">In 1 mile, Keep right to take <say-as interpret-as=\"address\">A1</say-as>.</prosody></amazon:effect></speak>"},{"distanceAlongGeometry":804.672,"announcement":"In a half mile, Keep right to take A1.","ssmlAnnouncement":"<speak><amazon:effect name=\"drc\"><prosody rate=\"1.08\">In a half mile, Keep right to take <say-as interpret-as=\"address\">A1</say-as>.</prosody></amazon:effect></speak>"},{"distanceAlongGeometry":188.889,"announcement":"Keep right to take A1 toward Amersfoort.","ssmlAnnouncement":"<speak><amazon:effect name=\"drc\"><prosody rate=\"1.08\">Keep right to take <say-as interpret-as=\"address\">A1</say-as> toward <say-as interpret-as=\"address\">Amersfoort</say-as>.</prosody></amazon:effect></speak>"}],"bannerInstructions":[{"distanceAlongGeometry":3700.999,"primary":{"text":"A1","components":[{"text":"A1","type":"icon"}],"type":"fork","modifier":"right"},"secondary":{"text":"Amersfoort","components":[{"text":"Amersfoort","type":"text"}],"type":"fork","modifier":"right"}},{"distanceAlongGeometry":1609.344,"primary":{"text":"A1","components":[{"text":"A1","type":"icon"}],"type":"fork","modifier":"right"},"secondary":{"text":"Amersfoort","components":[{"text":"Amersfoort","type":"text"}],"type":"fork","modifier":"right"},"sub":{"text":"","components":[{"text":"","type":"lane","directions":["straight"],"active":false},{"text":"","type":"lane","directions":["straight"],"active":false},{"text":"","type":"lane","directions":["slight right"],"active":false},{"text":"","type":"lane","directions":["slight right"],"active":true,"active_direction":"slight right"}]}}],"driving_side":"right","weight":157.297,"intersections":[{"location":[5.197562,52.204259],"bearings":[74,194,300,329],"entry":[true,false,false,true],"in":2,"out":0,"lanes":[{"valid":true,"active":true,"valid_indication":"left","indications":["left"]},{"valid":true,"active":true,"valid_indication":"left","indications":["left"]}],"geometry_index":103,"is_urban":false,"admin_index":0,"mapbox_streets_v8":{"class":"primary_link"}},{"location":[5.19832,52.204595],"bearings":[38,225],"entry":[true,false],"in":1,"out":0,"geometry_index":108,"is_urban":false,"admin_index":0,"mapbox_streets_v8":{"class":"primary_link"}},{"location":[5.199388,52.205514],"bearings":[39,216],"entry":[true,false],"in":1,"out":0,"geometry_index":112,"is_urban":false,"admin_index":0,"mapbox_streets_v8":{"class":"primary_link"}},{"location":[5.201845,52.207028],"bearings":[56,217,235],"classes":["motorway"],"entry":[true,false,false],"in":1,"out":0,"geometry_index":119,"is_urban":false,"admin_index":0,"mapbox_streets_v8":{"class":"motorway"}},{"location":[5.203012,52.207514],"bearings":[58,236],"classes":["motorway"],"entry":[true,false],"in":1,"out":0,"geometry_index":120,"is_urban":false,"admin_index":0,"mapbox_streets_v8":{"class":"motorway"}},{"location":[5.203483,52.207696],"bearings":[59,238],"classes":["motorway"],"entry":[true,false],"in":1,"out":0,"geometry_index":121,"is_urban":false,"admin_index":0,"mapbox_streets_v8":{"class":"motorway"}},{"location":[5.205404,52.208398],"bearings":[60,239],"classes":["motorway"],"entry":[true,false],"in":1,"out":0,"geometry_index":122,"is_urban":false,"admin_index":0,"mapbox_streets_v8":{"class":"motorway"}},{"location":[5.207657,52.20923],"bearings":[57,237],"classes":["motorway"],"entry":[true,false],"in":1,"out":0,"geometry_index":124,"is_urban":false,"admin_index":0,"mapbox_streets_v8":{"class":"motorway"}},{"location":[5.208613,52.209634],"bearings":[52,235],"classes":["motorway"],"entry":[true,false],"in":1,"out":0,"geometry_index":126,"is_urban":false,"admin_index":0,"mapbox_streets_v8":{"class":"motorway"}},{"location":[5.211177,52.210979],"bearings":[44,215,225],"classes":["motorway"],"entry":[true,false,false],"in":2,"out":0,"geometry_index":131,"is_urban":false,"admin_index":0,"mapbox_streets_v8":{"class":"motorway"}},{"location":[5.215471,52.214569],"bearings":[28,210],"classes":["motorway"],"entry":[true,false],"in":1,"out":0,"geometry_index":138,"is_urban":false,"admin_index":0,"mapbox_streets_v8":{"class":"motorway"}},{"location":[5.215774,52.214922],"bearings":[27,208],"classes":["motorway"],"entry":[true,false],"in":1,"out":0,"geometry_index":139,"is_urban":false,"admin_index":0,"mapbox_streets_v8":{"class":"motorway"}},{"location":[5.216447,52.215743],"bearings":[27,207],"classes":["motorway"],"entry":[true,false],"in":1,"out":0,"geometry_index":140,"is_urban":false,"admin_index":0,"mapbox_streets_v8":{"class":"motorway"}},{"location":[5.216842,52.216228],"bearings":[27,207],"classes":["motorway"],"entry":[true,false],"in":1,"out":0,"geometry_index":141,"is_urban":false,"admin_index":0,"mapbox_streets_v8":{"class":"motorway"}},{"location":[5.217259,52.216727],"bearings":[27,207],"classes":["motorway"],"entry":[true,false],"in":1,"out":0,"geometry_index":142,"is_urban":false,"admin_index":0,"mapbox_streets_v8":{"class":"motorway"}},{"location":[5.220188,52.220203],"bearings":[27,207],"classes":["motorway"],"entry":[true,false],"in":1,"out":0,"geometry_index":146,"is_urban":false,"admin_index":0,"mapbox_streets_v8":{"class":"motorway"}},{"location":[5.220746,52.220876],"bearings":[27,207],"classes":["motorway"],"entry":[true,false],"in":1,"out":0,"geometry_index":147,"is_urban":false,"admin_index":0,"mapbox_streets_v8":{"class":"motorway"}},{"location":[5.222035,52.22245],"bearings":[29,196,208],"classes":["motorway"],"entry":[true,false,false],"in":2,"out":0,"geometry_index":151,"is_urban":false,"admin_index":0,"mapbox_streets_v8":{"class":"motorway"}},{"location":[5.224927,52.225191],"bearings":[39,219],"classes":["motorway"],"entry":[true,false],"in":1,"out":0,"geometry_index":158,"is_urban":false,"admin_index":1,"mapbox_streets_v8":{"class":"motorway"}},{"location":[5.225987,52.225934],"bearings":[44,223],"classes":["motorway"],"entry":[true,false],"in":1,"out":0,"geometry_index":161,"is_urban":false,"admin_index":1,"mapbox_streets_v8":{"class":"motorway"}},{"location":[5.228717,52.22746],"bearings":[53,231],"classes":["motorway"],"entry":[true,false],"in":1,"out":0,"lanes":[{"valid":false,"active":false,"indications":["straight"]},{"valid":false,"active":false,"indications":["straight"]},{"valid":true,"active":true,"valid_indication":"slight right","indications":["slight right"]}],"geometry_index":166,"is_urban":false,"admin_index":1,"mapbox_streets_v8":{"class":"motorway"}},{"location":[5.23092,52.228393],"bearings":[58,238],"classes":["motorway"],"entry":[true,false],"in":1,"out":0,"lanes":[{"valid":false,"active":false,"indications":["straight"]},{"valid":false,"active":false,"indications":["straight"]},{"valid":true,"active":false,"valid_indication":"slight right","indications":["slight right"]},{"valid":true,"active":true,"valid_indication":"slight right","indications":["slight right"]}],"geometry_index":169,"is_urban":false,"admin_index":1,"mapbox_streets_v8":{"class":"motorway"}},{"location":[5.231476,52.228602],"bearings":[59,238],"classes":["motorway"],"entry":[true,false],"in":1,"out":0,"lanes":[{"valid":false,"active":false,"indications":["straight"]},{"valid":false,"active":false,"indications":["straight"]},{"valid":true,"active":false,"valid_indication":"slight right","indications":["slight right"]},{"valid":true,"active":true,"valid_indication":"slight right","indications":["slight right"]}],"geometry_index":170,"is_urban":false,"admin_index":1,"mapbox_streets_v8":{"class":"motorway"}}]},{"distance":388,"duration":14.413,"duration_typical":15.362,"speedLimitUnit":"km/h","speedLimitSign":"vienna","geometry":"wpxrbBqfj~HqRmlAaFyZuDoZyC{W{Cm_@uAkV}@qWc@yVMsVIq[Pw[","name":"","ref":"A27","destinations":"A1: Amersfoort, Hilversum-Noord, Amsterdam","mode":"driving","maneuver":{"location":[5.232249,52.228892],"bearing_before":59,"bearing_after":68,"instruction":"Keep right to take A1 toward Amersfoort.","type":"fork","modifier":"slight right"},"voiceInstructions":[{"distanceAlongGeometry":354.667,"announcement":"In a quarter mile, Keep right to take A1.","ssmlAnnouncement":"<speak><amazon:effect name=\"drc\"><prosody rate=\"1.08\">In a quarter mile, Keep right to take <say-as interpret-as=\"address\">A1</say-as>.</prosody></amazon:effect></speak>"},{"distanceAlongGeometry":188.889,"announcement":"Keep right to take A1 toward Amersfoort.","ssmlAnnouncement":"<speak><amazon:effect name=\"drc\"><prosody rate=\"1.08\">Keep right to take <say-as interpret-as=\"address\">A1</say-as> toward <say-as interpret-as=\"address\">Amersfoort</say-as>.</prosody></amazon:effect></speak>"}],"bannerInstructions":[{"distanceAlongGeometry":388,"primary":{"text":"A1","components":[{"text":"A1","type":"icon"}],"type":"fork","modifier":"right"},"secondary":{"text":"Amersfoort","components":[{"text":"Amersfoort","type":"text"}],"type":"fork","modifier":"right"},"sub":{"text":"","components":[{"text":"","type":"lane","directions":["straight"],"active":false},{"text":"","type":"lane","directions":["slight right"],"active":true,"active_direction":"slight right"}]}}],"driving_side":"right","weight":14.04,"intersections":[{"location":[5.232249,52.228892],"bearings":[59,68,239],"classes":["motorway"],"entry":[true,true,false],"in":2,"out":1,"lanes":[{"valid":false,"active":false,"indications":["straight"]},{"valid":false,"active":false,"indications":["straight"]},{"valid":true,"active":false,"valid_indication":"slight right","indications":["slight right"]},{"valid":true,"active":true,"valid_indication":"slight right","indications":["slight right"]}],"geometry_index":171,"is_urban":false,"admin_index":1,"mapbox_streets_v8":{"class":"motorway_link"}},{"location":[5.23529,52.229564],"bearings":[79,256],"classes":["motorway"],"entry":[true,false],"in":1,"out":0,"geometry_index":176,"is_urban":false,"admin_index":1,"mapbox_streets_v8":{"class":"motorway_link"}}]},{"distance":893,"duration":33.501,"duration_typical":34.594,"speedLimitUnit":"km/h","speedLimitSign":"vienna","geometry":"u`zrbBi}t~HhD{p@bBcp@jC_s@zA}WhBuTzBoStEq[vByL~DcRxD}OhGcTxHkVjH_XxXmn@~^_`A|Tmm@jLi]fL_`@~W}~@dTe{@","name":"","ref":"A1","destinations":"A1: Amersfoort","mode":"driving","maneuver":{"location":[5.237733,52.229659],"bearing_before":92,"bearing_after":100,"instruction":"Keep right to take A1 toward Amersfoort.","type":"fork","modifier":"slight right"},"voiceInstructions":[{"distanceAlongGeometry":859.666,"announcement":"In a half mile, Keep right to take exit 10.","ssmlAnnouncement":"<speak><amazon:effect name=\"drc\"><prosody rate=\"1.08\">In a half mile, Keep right to take exit <say-as interpret-as=\"address\">10</say-as>.</prosody></amazon:effect></speak>"},{"distanceAlongGeometry":244.444,"announcement":"Keep right to take exit 10 onto N221 toward Soest, Baarn-Noord.","ssmlAnnouncement":"<speak><amazon:effect name=\"drc\"><prosody rate=\"1.08\">Keep right to take exit <say-as interpret-as=\"address\">10</say-as> onto <say-as interpret-as=\"address\">N221</say-as> toward <say-as interpret-as=\"address\">Soest</say-as>, <say-as interpret-as=\"address\">Baarn-Noord</say-as>.</prosody></amazon:effect></speak>"}],"bannerInstructions":[{"distanceAlongGeometry":893,"primary":{"text":"Exit 10 N221","components":[{"text":"Exit","type":"exit"},{"text":"10","type":"exit-number"},{"text":"N221","type":"icon","mapbox_shield":{"base_url":"https://api.mapbox.com/styles/v1","name":"rectangle-yellow","text_color":"black","display_ref":"N221"}}],"type":"fork","modifier":"right"},"secondary":{"text":"Soest / Baarn-Noord","components":[{"text":"Soest","type":"text"},{"text":"/","type":"text"},{"text":"Baarn-Noord","type":"text"}],"type":"fork","modifier":"right"},"sub":{"text":"","components":[{"text":"","type":"lane","directions":["straight"],"active":false},{"text":"","type":"lane","directions":["straight"],"active":false},{"text":"","type":"lane","directions":["slight right"],"active":true,"active_direction":"slight right"},{"text":"","type":"lane","directions":["slight right"],"active":true,"active_direction":"slight right"}]}}],"driving_side":"right","weight":33.388,"intersections":[{"location":[5.237733,52.229659],"bearings":[92,100,272],"classes":["motorway"],"entry":[true,true,false],"in":2,"out":1,"lanes":[{"valid":false,"active":false,"indications":["straight"]},{"valid":true,"active":true,"valid_indication":"slight right","indications":["slight right"]}],"geometry_index":182,"is_urban":false,"admin_index":1,"mapbox_streets_v8":{"class":"motorway_link"}},{"location":[5.24359,52.228497],"bearings":[132,301,314],"classes":["motorway"],"entry":[true,false,false],"in":1,"out":0,"geometry_index":195,"is_urban":false,"admin_index":1,"mapbox_streets_v8":{"class":"motorway_link"}}]},{"distance":530,"duration":47.796,"duration_typical":49.292,"speedLimitUnit":"km/h","speedLimitSign":"vienna","geometry":"o_srbBuek_InMiWnPwj@pIsWbFuJ`HcIxFaElHwBdHYdHv@vJfEhKpHxKjIxOxIhP~ElLvBjNjAbo@eAbESzGc@","name":"","destinations":"N221: Soest, Baarn-Noord","mode":"driving","maneuver":{"location":[5.249131,52.226056],"bearing_before":120,"bearing_after":134,"instruction":"Keep right to take exit 10 onto N221 toward Soest/Baarn-Noord.","type":"fork","modifier":"slight right"},"voiceInstructions":[{"distanceAlongGeometry":496.667,"announcement":"In a quarter mile, Turn right onto Zandheuvelweg.","ssmlAnnouncement":"<speak><amazon:effect name=\"drc\"><prosody rate=\"1.08\">In a quarter mile, Turn right onto <say-as interpret-as=\"address\">Zandheuvelweg</say-as>.</prosody></amazon:effect></speak>"},{"distanceAlongGeometry":77.778,"announcement":"Turn right onto Zandheuvelweg.","ssmlAnnouncement":"<speak><amazon:effect name=\"drc\"><prosody rate=\"1.08\">Turn right onto <say-as interpret-as=\"address\">Zandheuvelweg</say-as>.</prosody></amazon:effect></speak>"}],"bannerInstructions":[{"distanceAlongGeometry":530,"primary":{"text":"Zandheuvelweg","components":[{"text":"Zandheuvelweg","type":"text"}],"type":"turn","modifier":"right"},"sub":{"text":"","components":[{"text":"","type":"lane","directions":["left"],"active":false},{"text":"","type":"lane","directions":["left"],"active":false},{"text":"","type":"lane","directions":["right"],"active":true,"active_direction":"right"}]}}],"driving_side":"right","weight":46.564,"intersections":[{"location":[5.249131,52.226056],"bearings":[120,134,300],"entry":[true,true,false],"in":2,"out":1,"lanes":[{"valid":false,"active":false,"indications":["straight"]},{"valid":false,"active":false,"indications":["straight"]},{"valid":true,"active":true,"valid_indication":"slight right","indications":["slight right"]},{"valid":true,"active":true,"valid_indication":"slight right","indications":["slight right"]}],"geometry_index":202,"is_urban":false,"admin_index":1,"mapbox_streets_v8":{"class":"primary_link"}},{"location":[5.250303,52.222949],"bearings":[5,178],"entry":[false,true],"in":0,"out":1,"geometry_index":218,"is_urban":false,"admin_index":1,"mapbox_streets_v8":{"class":"primary_link"}},{"location":[5.250348,52.222081],"bearings":[87,176,267,357],"entry":[false,true,false,false],"in":3,"out":1,"lanes":[{"valid":false,"active":false,"indications":["left"]},{"valid":false,"active":false,"indications":["left"]},{"valid":true,"active":true,"valid_indication":"right","indications":["right"]}],"geometry_index":220,"is_urban":false,"admin_index":1,"mapbox_streets_v8":{"class":"primary_link"}}],"exits":"10"},{"distance":1622,"duration":96.235,"duration_typical":96.235,"speedLimitUnit":"km/h","speedLimitSign":"vienna","geometry":"e~jrbB{rm_I\\`N~@xx@~@fv@`BfYbCnY~B~PpB|PxAvS|AhVVbM`IzsGhK`kIlFfeEBzR}Bhn@YpP@jOd@x_@~@vXHzOz@bj@f@bcAnArl@z@v~@","name":"Zandheuvelweg","mode":"driving","maneuver":{"location":[5.250366,52.221939],"bearing_before":176,"bearing_after":264,"instruction":"Turn right onto Zandheuvelweg.","type":"turn","modifier":"right"},"voiceInstructions":[{"distanceAlongGeometry":1595.333,"announcement":"In 1 mile, Turn right onto Eemeroordlaan.","ssmlAnnouncement":"<speak><amazon:effect name=\"drc\"><prosody rate=\"1.08\">In 1 mile, Turn right onto <say-as interpret-as=\"address\">Eemeroordlaan</say-as>.</prosody></amazon:effect></speak>"},{"distanceAlongGeometry":804.672,"announcement":"In a half mile, Turn right onto Eemeroordlaan.","ssmlAnnouncement":"<speak><amazon:effect name=\"drc\"><prosody rate=\"1.08\">In a half mile, Turn right onto <say-as interpret-as=\"address\">Eemeroordlaan</say-as>.</prosody></amazon:effect></speak>"},{"distanceAlongGeometry":124.444,"announcement":"Turn right onto Eemeroordlaan.","ssmlAnnouncement":"<speak><amazon:effect name=\"drc\"><prosody rate=\"1.08\">Turn right onto <say-as interpret-as=\"address\">Eemeroordlaan</say-as>.</prosody></amazon:effect></speak>"}],"bannerInstructions":[{"distanceAlongGeometry":1622,"primary":{"text":"Eemeroordlaan","components":[{"text":"Eemeroordlaan","type":"text"}],"type":"turn","modifier":"right"}}],"driving_side":"right","weight":116.346,"intersections":[{"location":[5.250366,52.221939],"bearings":[87,177,264,356],"entry":[false,true,true,false],"in":3,"out":2,"lanes":[{"valid":false,"active":false,"indications":["left"]},{"valid":false,"active":false,"indications":["left"]},{"valid":true,"active":true,"valid_indication":"right","indications":["right"]}],"geometry_index":221,"is_urban":false,"admin_index":1,"mapbox_streets_v8":{"class":"secondary"}},{"location":[5.250125,52.221924],"bearings":[84,177,267,358],"entry":[false,false,true,false],"in":0,"out":2,"geometry_index":222,"is_urban":false,"admin_index":1,"mapbox_streets_v8":{"class":"secondary"}},{"location":[5.2492,52.221892],"bearings":[1,87,179,267],"entry":[true,false,true,true],"in":1,"out":3,"geometry_index":223,"is_urban":false,"admin_index":1,"mapbox_streets_v8":{"class":"secondary"}},{"location":[5.246192,52.221532],"bearings":[78,87,265],"entry":[false,true,true],"in":0,"out":2,"geometry_index":230,"is_urban":false,"admin_index":1,"mapbox_streets_v8":{"class":"secondary"}},{"location":[5.241536,52.221359],"bearings":[13,87,186,267],"entry":[true,false,true,true],"in":1,"out":3,"geometry_index":232,"is_urban":false,"admin_index":1,"mapbox_streets_v8":{"class":"secondary"}},{"location":[5.236223,52.221162],"bearings":[1,87,175,266],"entry":[true,false,true,true],"in":1,"out":3,"geometry_index":233,"is_urban":false,"admin_index":1,"mapbox_streets_v8":{"class":"secondary"}}]},{"distance":239,"duration":49.774,"duration_typical":49.774,"speedLimitUnit":"km/h","speedLimitSign":"vienna","geometry":"w_irbBok_~HoU^sIR}T~@{FTaFLw~@jC","name":"Eemeroordlaan","mode":"driving","maneuver":{"location":[5.226696,52.22094],"bearing_before":267,"bearing_after":358,"instruction":"Turn right onto Eemeroordlaan.","type":"turn","modifier":"right"},"voiceInstructions":[{"distanceAlongGeometry":225.667,"announcement":"In 800 feet, Turn right onto IJssellaan.","ssmlAnnouncement":"<speak><amazon:effect name=\"drc\"><prosody rate=\"1.08\">In 800 feet, Turn right onto <say-as interpret-as=\"address\">IJssellaan</say-as>.</prosody></amazon:effect></speak>"},{"distanceAlongGeometry":62.222,"announcement":"Turn right onto IJssellaan.","ssmlAnnouncement":"<speak><amazon:effect name=\"drc\"><prosody rate=\"1.08\">Turn right onto <say-as interpret-as=\"address\">IJssellaan</say-as>.</prosody></amazon:effect></speak>"}],"bannerInstructions":[{"distanceAlongGeometry":239,"primary":{"text":"IJssellaan","components":[{"text":"IJssellaan","type":"text"}],"type":"turn","modifier":"right"}}],"driving_side":"right","weight":59.891,"intersections":[{"location":[5.226696,52.22094],"bearings":[87,175,266,358],"entry":[false,true,true,true],"in":0,"out":3,"geometry_index":245,"is_urban":false,"admin_index":1,"mapbox_streets_v8":{"class":"street"}},{"location":[5.22668,52.2213],"bearings":[87,178,358],"entry":[true,false,true],"in":1,"out":2,"geometry_index":246,"is_urban":false,"admin_index":1,"mapbox_streets_v8":{"class":"street"}},{"location":[5.22667,52.22147],"bearings":[86,178,357],"entry":[true,false,true],"in":1,"out":2,"geometry_index":247,"is_urban":false,"admin_index":1,"mapbox_streets_v8":{"class":"street"}},{"location":[5.226638,52.221821],"bearings":[177,266,357],"entry":[false,false,true],"in":0,"out":2,"geometry_index":248,"is_urban":false,"admin_index":1,"mapbox_streets_v8":{"class":"street"}},{"location":[5.226627,52.221947],"bearings":[177,266,358],"entry":[false,true,true],"in":0,"out":2,"geometry_index":249,"is_urban":false,"admin_index":1,"mapbox_streets_v8":{"class":"street"}},{"location":[5.22662,52.22206],"bearings":[89,178,358],"entry":[true,false,true],"in":1,"out":2,"geometry_index":250,"is_urban":false,"admin_index":1,"mapbox_streets_v8":{"class":"street"}}]},{"distance":297,"duration":62.985,"duration_typical":62.985,"speedLimitUnit":"km/h","speedLimitSign":"vienna","geometry":"oemrbBkb_~Hq@mn@mBahBEeE{@kt@qAgz@","name":"IJssellaan","mode":"driving","maneuver":{"location":[5.22655,52.22308],"bearing_before":358,"bearing_after":87,"instruction":"Turn right onto IJssellaan.","type":"end of road","modifier":"right"},"voiceInstructions":[{"distanceAlongGeometry":283.667,"announcement":"In 1,000 feet, You will arrive at your destination.","ssmlAnnouncement":"<speak><amazon:effect name=\"drc\"><prosody rate=\"1.08\">In 1,000 feet, You will arrive at your destination.</prosody></amazon:effect></speak>"},{"distanceAlongGeometry":48.611,"announcement":"You have arrived at your destination.","ssmlAnnouncement":"<speak><amazon:effect name=\"drc\"><prosody rate=\"1.08\">You have arrived at your destination.</prosody></amazon:effect></speak>"}],"bannerInstructions":[{"distanceAlongGeometry":297,"primary":{"text":"You will arrive at your destination","components":[{"text":"You will arrive at your destination","type":"text"}],"type":"arrive","modifier":"straight"}},{"distanceAlongGeometry":48.611,"primary":{"text":"You have arrived at your destination","components":[{"text":"You have arrived at your destination","type":"text"}],"type":"arrive","modifier":"straight"}}],"driving_side":"right","weight":69.065,"intersections":[{"location":[5.22655,52.22308],"bearings":[87,178,265],"entry":[true,false,true],"in":1,"out":0,"geometry_index":251,"is_urban":false,"admin_index":1,"mapbox_streets_v8":{"class":"street"}},{"location":[5.227309,52.223105],"bearings":[87,267,358],"entry":[true,false,false],"in":1,"out":0,"geometry_index":252,"is_urban":false,"admin_index":1,"mapbox_streets_v8":{"class":"street"}},{"location":[5.229089,52.223163],"bearings":[87,166,267,358],"entry":[true,true,false,true],"in":2,"out":0,"geometry_index":254,"is_urban":false,"admin_index":1,"mapbox_streets_v8":{"class":"street"}},{"location":[5.229943,52.223193],"bearings":[86,267,358],"entry":[true,false,false],"in":1,"out":0,"geometry_index":255,"is_urban":false,"admin_index":1,"mapbox_streets_v8":{"class":"street"}}]},{"distance":0,"duration":0,"duration_typical":0,"speedLimitUnit":"km/h","speedLimitSign":"vienna","geometry":"comrbBuqg~H??","name":"IJssellaan","mode":"driving","maneuver":{"location":[5.230891,52.223234],"bearing_before":86,"bearing_after":0,"instruction":"You have arrived at your destination.","type":"arrive"},"voiceInstructions":[],"bannerInstructions":[],"driving_side":"right","weight":0,"intersections":[{"location":[5.230891,52.223234],"bearings":[266],"entry":[true],"in":0,"geometry_index":256,"admin_index":1}]}],"annotation":{"distance":[0,3.2,52.3,20.1,24.5,54,10.5,9.2,8.7,19.4,32.8,76.3,19.5,3.7,42,86,32.7,73.9,88.7,5.9,6.8,65.9,36.3,29.5,65.7,24,17.7,44,5.8,2.6,2.7,2.5,2.4,2.8,2.8,6.7,78.7,40.2,162.7,54.1,9.7,61.3,65.8,29.4,11.3,3.9,3.9,3.9,3.9,3.9,4,4,4.2,4.1,4.1,4.1,4.1,3.4,3.4,3.4,3.4,3.4,12.3,19.9,103.3,147.8,46.3,167.4,75.5,72.1,146.6,14.8,9.2,8.4,10,71,50.4,66.7,24.8,24,27.8,23.4,12.3,12.7,13.6,12.9,10.2,10.7,11.9,13.1,9.9,10.3,17.6,24.1,28.3,47.9,29.7,67,62,8.5,5.7,5.1,5.1,6.4,5,3.9,4.4,46.6,28.8,32.6,32.4,31.9,24.4,27.2,31.2,40.4,40.7,52.4,22.4,96.3,38,152.6,122.6,56.9,23.4,55.8,64.4,44.5,44.3,46.7,30.5,48,55.6,60.7,104,72.7,69.4,86.9,44.4,102.3,60.3,62.4,71.4,69.9,139.7,154.5,84,37.4,65.2,49.6,43.8,39.1,81.2,75,46.4,45.3,53.1,23.8,29.2,41.9,38.7,62.2,39.3,43.2,49.1,58.5,63.4,68,51.3,44.5,61.8,91.4,32.8,31.7,28.5,36.4,25.9,27,26.1,25.8,31.2,31.4,55.2,53.9,57.3,27.7,24.4,23.4,33.4,16.5,23.4,21.2,27.4,30.9,32,69.2,91,64,40.8,43,82.8,75.7,37,57,32.8,18,19.6,15.4,17.3,16.4,16.5,22,24.3,25.5,32.2,31.8,24.3,27.5,85.7,10.9,15.9,16.5,63.2,60.4,29.2,29.8,20.9,20.6,23.2,26,15.5,302.6,363,216.7,21.7,52.1,19.2,17.9,35.9,28.3,18.4,47.2,74.4,50,69.6,40.1,18.9,39.1,14,12.6,113.6,51.8,114.8,6.8,58.3,64.8],"duration":[0,0.824,5.537,2.133,2.594,9.256,1.794,1.585,1.12,2.494,4.222,9.815,2.009,0.372,4.199,7.938,2.737,6.19,8.406,0.562,0.812,10.782,5.935,3.121,6.953,2.541,2.06,5.114,1.382,0.587,0.602,0.559,0.55,0.625,0.622,0.622,7.268,3.709,15.022,4.426,0.793,9.592,10.293,4.599,1.763,0.671,0.665,0.661,0.667,0.662,0.678,0.802,0.831,0.817,0.829,0.818,0.812,0.493,0.494,0.495,0.491,0.493,0.868,1.403,7.293,10.435,2.925,9.415,4.244,9.272,18.845,2.052,1.281,1.156,1.391,5.015,2.976,3.938,1.462,1.419,1.638,1.382,0.725,0.749,0.804,0.762,0.599,0.633,0.7,0.774,0.583,0.609,1.037,1.425,1.672,2.827,1.753,5.48,8.927,2.032,1.365,1.213,1.225,0.379,0.295,0.23,0.258,2.751,1.701,1.921,1.909,1.884,1.438,1.606,1.843,2.384,2.402,3.09,1.322,3.536,1.395,5.493,4.413,2.048,0.82,1.95,2.23,1.54,1.534,1.617,1.055,1.662,1.923,2.103,3.6,2.518,2.403,3.009,1.567,3.61,2.13,2.14,2.622,2.568,5.133,5.675,3.087,1.402,2.447,1.859,1.644,1.467,3.044,2.812,1.739,1.699,1.992,0.894,1.096,1.572,1.453,2.331,1.475,1.621,1.839,2.194,2.377,2.55,1.925,1.601,2.318,3.392,1.219,1.175,1.056,1.352,0.963,1.003,0.967,0.957,1.157,1.165,2.138,2.086,2.217,1.072,0.944,0.906,1.291,0.638,0.907,0.82,1.06,1.197,1.238,2.517,3.308,2.327,1.482,1.565,3.009,2.754,2.116,3.258,1.874,1.028,1.118,0.88,0.989,0.936,0.941,1.258,1.388,1.456,1.839,1.815,1.387,1.572,18.159,2.315,3.358,1.383,5.29,3.397,1.64,1.678,1.175,1.157,1.304,1.461,0.807,15.79,18.668,13.452,1.346,3.234,1.193,1.109,2.226,1.758,1.143,2.928,4.616,3.102,4.323,7.596,4.261,5.87,2.107,2.832,22.729,10.367,22.959,1.352,12.353,13.724],"speed":[0,3.9,9.4,9.4,9.4,5.8,5.8,5.8,7.8,7.8,7.8,7.8,9.7,10,10,10.8,11.9,11.9,10.6,10.6,8.3,6.1,6.1,9.4,9.4,9.4,8.6,8.6,4.2,4.4,4.4,4.4,4.4,4.4,4.4,10.8,10.8,10.8,10.8,12.2,12.2,6.4,6.4,6.4,6.4,5.8,5.8,5.8,5.8,5.8,5.8,5,5,5,5,5,5,6.9,6.9,6.9,6.9,6.9,14.2,14.2,14.2,14.2,15.8,17.8,17.8,7.8,7.8,7.2,7.2,7.2,7.2,14.2,16.9,16.9,16.9,16.9,16.9,16.9,16.9,16.9,16.9,16.9,16.9,16.9,16.9,16.9,16.9,16.9,16.9,16.9,16.9,16.9,16.9,12.2,6.9,4.2,4.2,4.2,4.2,16.9,16.9,16.9,16.9,16.9,16.9,16.9,16.9,16.9,16.9,16.9,16.9,16.9,16.9,16.9,16.9,27.2,27.2,27.8,27.8,27.8,28.6,28.6,28.9,28.9,28.9,28.9,28.9,28.9,28.9,28.9,28.9,28.9,28.9,28.9,28.3,28.3,28.3,29.2,27.2,27.2,27.2,27.2,27.2,26.7,26.7,26.7,26.7,26.7,26.7,26.7,26.7,26.7,26.7,26.7,26.7,26.7,26.7,26.7,26.7,26.7,26.7,26.7,26.7,26.7,26.7,27.8,26.7,26.9,26.9,26.9,26.9,26.9,26.9,26.9,26.9,26.9,26.9,26.9,25.8,25.8,25.8,25.8,25.8,25.8,25.8,25.8,25.8,25.8,25.8,25.8,25.8,27.5,27.5,27.5,27.5,27.5,27.5,27.5,17.5,17.5,17.5,17.5,17.5,17.5,17.5,17.5,17.5,17.5,17.5,17.5,17.5,17.5,17.5,17.5,4.7,4.7,4.7,11.9,11.9,17.8,17.8,17.8,17.8,17.8,17.8,17.8,19.2,19.2,19.4,16.1,16.1,16.1,16.1,16.1,16.1,16.1,16.1,16.1,16.1,16.1,16.1,5.3,4.4,6.7,6.7,4.4,5,5,5,5,4.7,4.7],"maxspeed":[{"unknown":true},{"unknown":true},{"speed":50,"unit":"km/h"},{"speed":50,"unit":"km/h"},{"speed":50,"unit":"km/h"},{"speed":50,"unit":"km/h"},{"speed":50,"unit":"km/h"},{"speed":50,"unit":"km/h"},{"speed":50,"unit":"km/h"},{"speed":50,"unit":"km/h"},{"speed":50,"unit":"km/h"},{"speed":50,"unit":"km/h"},{"speed":50,"unit":"km/h"},{"speed":50,"unit":"km/h"},{"speed":50,"unit":"km/h"},{"speed":50,"unit":"km/h"},{"speed":50,"unit":"km/h"},{"speed":50,"unit":"km/h"},{"speed":50,"unit":"km/h"},{"speed":50,"unit":"km/h"},{"speed":50,"unit":"km/h"},{"speed":50,"unit":"km/h"},{"speed":50,"unit":"km/h"},{"speed":50,"unit":"km/h"},{"speed":50,"unit":"km/h"},{"speed":50,"unit":"km/h"},{"speed":50,"unit":"km/h"},{"speed":50,"unit":"km/h"},{"unknown":true},{"speed":50,"unit":"km/h"},{"speed":50,"unit":"km/h"},{"speed":50,"unit":"km/h"},{"speed":50,"unit":"km/h"},{"speed":50,"unit":"km/h"},{"speed":50,"unit":"km/h"},{"speed":50,"unit":"km/h"},{"speed":50,"unit":"km/h"},{"speed":50,"unit":"km/h"},{"speed":50,"unit":"km/h"},{"speed":50,"unit":"km/h"},{"speed":50,"unit":"km/h"},{"speed":50,"unit":"km/h"},{"speed":50,"unit":"km/h"},{"speed":50,"unit":"km/h"},{"speed":50,"unit":"km/h"},{"speed":50,"unit":"km/h"},{"speed":50,"unit":"km/h"},{"speed":50,"unit":"km/h"},{"speed":50,"unit":"km/h"},{"speed":50,"unit":"km/h"},{"speed":50,"unit":"km/h"},{"speed":50,"unit":"km/h"},{"speed":50,"unit":"km/h"},{"speed":50,"unit":"km/h"},{"speed":50,"unit":"km/h"},{"speed":50,"unit":"km/h"},{"speed":50,"unit":"km/h"},{"speed":50,"unit":"km/h"},{"speed":50,"unit":"km/h"},{"speed":50,"unit":"km/h"},{"speed":50,"unit":"km/h"},{"speed":50,"unit":"km/h"},{"speed":50,"unit":"km/h"},{"speed":50,"unit":"km/h"},{"speed":50,"unit":"km/h"},{"speed":50,"unit":"km/h"},{"speed":50,"unit":"km/h"},{"speed":50,"unit":"km/h"},{"speed":50,"unit":"km/h"},{"speed":50,"unit":"km/h"},{"speed":50,"unit":"km/h"},{"unknown":true},{"unknown":true},{"unknown":true},{"unknown":true},{"speed":50,"unit":"km/h"},{"speed":80,"unit":"km/h"},{"speed":80,"unit":"km/h"},{"speed":80,"unit":"km/h"},{"speed":80,"unit":"km/h"},{"speed":80,"unit":"km/h"},{"speed":80,"unit":"km/h"},{"speed":80,"unit":"km/h"},{"speed":80,"unit":"km/h"},{"speed":80,"unit":"km/h"},{"speed":80,"unit":"km/h"},{"speed":80,"unit":"km/h"},{"speed":80,"unit":"km/h"},{"speed":80,"unit":"km/h"},{"speed":80,"unit":"km/h"},{"speed":80,"unit":"km/h"},{"speed":80,"unit":"km/h"},{"speed":80,"unit":"km/h"},{"speed":80,"unit":"km/h"},{"speed":80,"unit":"km/h"},{"speed":80,"unit":"km/h"},{"speed":80,"unit":"km/h"},{"speed":80,"unit":"km/h"},{"speed":80,"unit":"km/h"},{"speed":80,"unit":"km/h"},{"speed":80,"unit":"km/h"},{"speed":80,"unit":"km/h"},{"speed":80,"unit":"km/h"},{"speed":130,"unit":"km/h"},{"speed":130,"unit":"km/h"},{"speed":130,"unit":"km/h"},{"speed":130,"unit":"km/h"},{"speed":130,"unit":"km/h"},{"speed":130,"unit":"km/h"},{"speed":130,"unit":"km/h"},{"speed":130,"unit":"km/h"},{"speed":130,"unit":"km/h"},{"speed":130,"unit":"km/h"},{"speed":130,"unit":"km/h"},{"speed":130,"unit":"km/h"},{"speed":130,"unit":"km/h"},{"speed":130,"unit":"km/h"},{"speed":130,"unit":"km/h"},{"speed":130,"unit":"km/h"},{"speed":100,"unit":"km/h"},{"speed":100,"unit":"km/h"},{"speed":100,"unit":"km/h"},{"speed":100,"unit":"km/h"},{"speed":100,"unit":"km/h"},{"speed":100,"unit":"km/h"},{"speed":100,"unit":"km/h"},{"speed":100,"unit":"km/h"},{"speed":100,"unit":"km/h"},{"speed":100,"unit":"km/h"},{"speed":100,"unit":"km/h"},{"speed":100,"unit":"km/h"},{"speed":100,"unit":"km/h"},{"speed":100,"unit":"km/h"},{"speed":100,"unit":"km/h"},{"speed":100,"unit":"km/h"},{"speed":100,"unit":"km/h"},{"speed":100,"unit":"km/h"},{"speed":100,"unit":"km/h"},{"speed":100,"unit":"km/h"},{"speed":100,"unit":"km/h"},{"speed":100,"unit":"km/h"},{"speed":100,"unit":"km/h"},{"speed":100,"unit":"km/h"},{"speed":100,"unit":"km/h"},{"speed":100,"unit":"km/h"},{"speed":100,"unit":"km/h"},{"speed":100,"unit":"km/h"},{"speed":100,"unit":"km/h"},{"speed":100,"unit":"km/h"},{"speed":100,"unit":"km/h"},{"speed":100,"unit":"km/h"},{"speed":100,"unit":"km/h"},{"speed":100,"unit":"km/h"},{"speed":100,"unit":"km/h"},{"speed":100,"unit":"km/h"},{"speed":100,"unit":"km/h"},{"speed":100,"unit":"km/h"},{"speed":100,"unit":"km/h"},{"speed":100,"unit":"km/h"},{"speed":100,"unit":"km/h"},{"speed":100,"unit":"km/h"},{"speed":100,"unit":"km/h"},{"speed":100,"unit":"km/h"},{"speed":100,"unit":"km/h"},{"speed":100,"unit":"km/h"},{"speed":100,"unit":"km/h"},{"speed":100,"unit":"km/h"},{"speed":100,"unit":"km/h"},{"speed":100,"unit":"km/h"},{"speed":100,"unit":"km/h"},{"speed":100,"unit":"km/h"},{"speed":100,"unit":"km/h"},{"speed":100,"unit":"km/h"},{"speed":100,"unit":"km/h"},{"speed":100,"unit":"km/h"},{"speed":100,"unit":"km/h"},{"speed":100,"unit":"km/h"},{"speed":100,"unit":"km/h"},{"speed":100,"unit":"km/h"},{"speed":100,"unit":"km/h"},{"speed":100,"unit":"km/h"},{"speed":100,"unit":"km/h"},{"speed":100,"unit":"km/h"},{"speed":100,"unit":"km/h"},{"speed":100,"unit":"km/h"},{"speed":100,"unit":"km/h"},{"speed":100,"unit":"km/h"},{"speed":100,"unit":"km/h"},{"speed":100,"unit":"km/h"},{"speed":100,"unit":"km/h"},{"speed":100,"unit":"km/h"},{"speed":100,"unit":"km/h"},{"speed":100,"unit":"km/h"},{"speed":100,"unit":"km/h"},{"speed":100,"unit":"km/h"},{"speed":100,"unit":"km/h"},{"speed":100,"unit":"km/h"},{"speed":100,"unit":"km/h"},{"speed":100,"unit":"km/h"},{"speed":100,"unit":"km/h"},{"speed":100,"unit":"km/h"},{"speed":100,"unit":"km/h"},{"speed":100,"unit":"km/h"},{"speed":100,"unit":"km/h"},{"speed":100,"unit":"km/h"},{"speed":100,"unit":"km/h"},{"speed":100,"unit":"km/h"},{"speed":100,"unit":"km/h"},{"speed":100,"unit":"km/h"},{"speed":100,"unit":"km/h"},{"speed":100,"unit":"km/h"},{"speed":100,"unit":"km/h"},{"speed":100,"unit":"km/h"},{"speed":100,"unit":"km/h"},{"speed":100,"unit":"km/h"},{"speed":100,"unit":"km/h"},{"speed":100,"unit":"km/h"},{"speed":100,"unit":"km/h"},{"speed":50,"unit":"km/h"},{"speed":50,"unit":"km/h"},{"speed":50,"unit":"km/h"},{"speed":80,"unit":"km/h"},{"speed":80,"unit":"km/h"},{"speed":80,"unit":"km/h"},{"speed":80,"unit":"km/h"},{"speed":80,"unit":"km/h"},{"speed":80,"unit":"km/h"},{"speed":80,"unit":"km/h"},{"speed":80,"unit":"km/h"},{"speed":80,"unit":"km/h"},{"speed":80,"unit":"km/h"},{"speed":80,"unit":"km/h"},{"speed":80,"unit":"km/h"},{"speed":80,"unit":"km/h"},{"speed":80,"unit":"km/h"},{"speed":80,"unit":"km/h"},{"speed":80,"unit":"km/h"},{"speed":80,"unit":"km/h"},{"speed":80,"unit":"km/h"},{"speed":80,"unit":"km/h"},{"speed":80,"unit":"km/h"},{"speed":80,"unit":"km/h"},{"speed":80,"unit":"km/h"},{"speed":80,"unit":"km/h"},{"speed":80,"unit":"km/h"},{"unknown":true},{"unknown":true},{"unknown":true},{"unknown":true},{"unknown":true},{"unknown":true},{"unknown":true},{"unknown":true},{"unknown":true},{"unknown":true},{"unknown":true}],"congestion_numeric":[null,null,4,4,4,16,16,16,14,14,14,14,null,null,null,8,3,3,9,null,null,41,41,6,6,6,4,4,null,null,null,null,null,null,null,12,12,12,12,6,6,33,33,33,33,3,3,3,3,3,3,20,20,20,20,20,20,6,6,6,6,6,1,1,1,1,1,0,0,46,46,19,19,19,19,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,0,null,null,null,null,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,9,9,9,9,6,6,8,8,8,8,8,8,8,8,8,8,8,8,8,9,9,6,12,12,12,12,11,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,6,9,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,19,19,19,null,null,1,1,1,1,1,1,1,4,4,3,1,1,1,1,1,1,1,1,1,1,1,1,null,null,null,null,null,null,null,null,null,null,null]}}],"routeOptions":{"baseUrl":"https://api.mapbox.com","user":"mapbox","profile":"driving-traffic","coordinates":"5.171923,52.217439;5.2308454,52.2232322","language":"en","bearings":"88.6703415,45;","layers":"0;","continue_straight":true,"roundabout_exits":true,"geometries":"polyline6","overview":"full","steps":true,"annotations":"congestion_numeric,maxspeed,closure,speed,duration,distance","voice_instructions":true,"banner_instructions":true,"voice_units":"imperial","enable_refresh":true},"voiceLocale":"en-US","requestUuid":"zLVDU1F_0idey-iwPfVi52bYMAEV3ilKx9vjFgzMhmQvpr_k4pZKQw=="}```
cafesilencio commented 2 years ago

Looking at the JSON legs->steps the last step in the array doesn't have a bannerInstructions element. I"ll paste the last two steps below for comparison. The maneuver API is expecting each step to have a banner instruction.

The view API classes have a lot of expectations about the contents of the DirectionsRoute. I'm not the original author of that class so i'm not sure about the necessity of each step having banner instructions vs. just omitting the banner instructions for a step and continuing.

One way to discover the cause of these issues is to checkout the source code and open it in Android Studio, look at the unit tests and modify them enough to use your own route. Most of the tests use either a mock DirectionsRoute or load one from a file. The JSON can be pasted into a test with DirectionsRoute.fromJson(). Stepping through the code while laborious can surface any future issues you might encounter with the routes you're generating.

        {
          "distance": 49.17,
          "duration": 6.95657,
          "geometry": "aduqbBip~aIrJoc@",
          "name": "Nijverheidstraat",
          "mode": "driving",
          "maneuver": {
            "location": [
              5.2918,
              52.21077
            ],
            "bearing_before": 45,
            "bearing_after": 117,
            "instruction": "Rechtsaf naar Nijverheidstraat",
            "type": "turn",
            "modifier": "right"
          },
          "voiceInstructions": [
            {
              "distanceAlongGeometry": 25,
              "announcement": "bestemming bereikt",
              "ssmlAnnouncement": "<speak><amazon:effect name=\"drc\"><prosody rate=\"1.08\">bestemming bereikt</prosody></amazon:effect></speak>"
            }
          ],
          "bannerInstructions": [
            {
              "distanceAlongGeometry": 49.17,
              "primary": {
                "text": "Nijverheidstraat",
                "components": [
                  {
                    "text": "Nijverheidstraat",
                    "type": "text"
                  }
                ],
                "type": "arrive"
              }
            }
          ],
          "driving_side": "right",
          "weight": 0,
          "intersections": [
            {
              "location": [
                5.2918,
                52.21077
              ],
              "bearings": [
                41,
                117,
                225
              ],
              "entry": [
                true,
                true,
                true
              ],
              "in": 2,
              "out": 1
            }
          ]
        },
        {
          "distance": 0,
          "duration": 0,
          "geometry": "mxtqbByt_bI",
          "name": "Nijverheidstraat",
          "mode": "driving",
          "maneuver": {
            "location": [
              5.29238,
              52.21058
            ],
            "bearing_before": 117,
            "bearing_after": 0,
            "instruction": "Bestemming bereikt",
            "type": "arrive"
          },
          "driving_side": "right",
          "weight": 0,
          "intersections": [
            {
              "location": [
                5.29238,
                52.21058
              ],
              "bearings": [
                117
              ],
              "entry": [
                true
              ],
              "in": 0
            }
          ]
        }
      ]
    }
cafesilencio commented 2 years ago

Crash condition resolved via https://github.com/mapbox/mapbox-navigation-android/pull/5542.