mapbox / mapbox-navigation-android

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

Off route geometry disappears #3787

Open palimad opened 4 years ago

palimad commented 4 years ago

Please run code below, simple replace BasicNavigationFragment from your examples. Can you please tell me how to fix it so the off-route road will not disappear (it is the section at the end of the road)? Basically the point is to navigate also through waypoints I add manually, they are off the road. Thanks

package com.mapbox.navigation.examples.core

import android.annotation.SuppressLint import android.graphics.Bitmap import android.os.Bundle import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import android.view.ViewTreeObserver import android.widget.ImageButton import androidx.appcompat.widget.AppCompatImageButton import androidx.fragment.app.Fragment import androidx.preference.PreferenceManager import com.google.android.material.bottomsheet.BottomSheetBehavior import com.google.android.material.snackbar.Snackbar import com.google.gson.Gson import com.mapbox.android.core.location.LocationEngine import com.mapbox.android.core.location.LocationEngineCallback import com.mapbox.android.core.location.LocationEngineProvider import com.mapbox.android.core.location.LocationEngineResult import com.mapbox.api.directions.v5.models. import com.mapbox.geojson.Point import com.mapbox.geojson.utils.PolylineUtils import com.mapbox.mapboxsdk.Mapbox import com.mapbox.mapboxsdk.camera.CameraUpdateFactory import com.mapbox.mapboxsdk.geometry.LatLng import com.mapbox.mapboxsdk.location.LocationComponent import com.mapbox.mapboxsdk.location.LocationComponentActivationOptions import com.mapbox.mapboxsdk.location.OnCameraTrackingChangedListener import com.mapbox.mapboxsdk.location.modes.CameraMode import com.mapbox.mapboxsdk.location.modes.RenderMode import com.mapbox.mapboxsdk.maps.MapboxMap import com.mapbox.mapboxsdk.maps.OnMapReadyCallback import com.mapbox.mapboxsdk.maps.Style import com.mapbox.navigation.base.internal.extensions.applyDefaultParams import com.mapbox.navigation.base.internal.extensions.coordinates import com.mapbox.navigation.base.internal.route.RouteUrl import com.mapbox.navigation.base.trip.model.RouteProgress import com.mapbox.navigation.core.MapboxNavigation import com.mapbox.navigation.core.directions.session.RoutesRequestCallback import com.mapbox.navigation.core.replay.MapboxReplayer import com.mapbox.navigation.core.replay.ReplayLocationEngine import com.mapbox.navigation.core.replay.route.ReplayProgressObserver import com.mapbox.navigation.core.telemetry.events.FeedbackEvent.UI import com.mapbox.navigation.core.trip.session. import com.mapbox.navigation.examples.R import com.mapbox.navigation.examples.utils.Utils import com.mapbox.navigation.examples.utils.Utils.PRIMARY_ROUTE_BUNDLE_KEY import com.mapbox.navigation.examples.utils.Utils.getRouteFromBundle import com.mapbox.navigation.ui.NavigationButton import com.mapbox.navigation.ui.NavigationConstants import com.mapbox.navigation.ui.SoundButton import com.mapbox.navigation.ui.camera.DynamicCamera import com.mapbox.navigation.ui.camera.NavigationCamera import com.mapbox.navigation.ui.feedback.FeedbackBottomSheet import com.mapbox.navigation.ui.feedback.FeedbackBottomSheetListener import com.mapbox.navigation.ui.feedback.FeedbackItem import com.mapbox.navigation.ui.instruction.NavigationAlertView import com.mapbox.navigation.ui.internal.utils.ViewUtils import com.mapbox.navigation.ui.map.NavigationMapboxMap import com.mapbox.navigation.ui.map.OnWayNameChangedListener import com.mapbox.navigation.ui.summary.SummaryBottomSheet import com.mapbox.navigation.ui.voice.NavigationSpeechPlayer import com.mapbox.navigation.ui.voice.SpeechPlayerProvider import com.mapbox.navigation.ui.voice.VoiceInstructionLoader import kotlinx.android.synthetic.main.fragment_basic_navigation.* import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.GlobalScope import kotlinx.coroutines.delay import kotlinx.coroutines.launch import okhttp3.Cache import timber.log.Timber import java.io.File import java.lang.ref.WeakReference import java.util.Locale

/**

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.