mapbox / mapbox/mapbox-navigation-android
existe uma API pública para controlar o zoom do Free Drive no NavigationView Drop-in
Nobody has claimed this yet.
- Dominant language
- Kotlin
- Stars
- 651
- Forks
- 321
- PR merge metrics
- No merged PRs in 30d
Description
dropInNavigationView.customizeViewOptions {
mapStyleUriDay = "mapbox://styles/mapbox/navigation-day-v1"
showManeuver = true
showSpeedLimit = false
showRoadName = false
showTripProgress = false
showActionButtons = false
showEndNavigationButton = false
showStartNavigationButton = false
showRoutePreviewButton = false
showInfoPanelInFreeDrive = false
}
// Tenta definir zoom 16.5 no modo Free Drive
dropInNavigationView.post {
try {
MapboxNavigationApp.current()?.let { nav ->
dropInNavigationView.api.startFreeDrive()
// Tenta criar um viewportDataSource e sobrescrever o zoom
val viewportDataSource = com.mapbox.navigation.ui.maps.camera.data.MapboxNavigationViewportDataSource(
dropInNavigationView.retrieveMapboxMap() ?: return@let
)
viewportDataSource.options.followingFrameOptions.zoomUpdatesAllowed = false
viewportDataSource.followingZoomPropertyOverride(16.5)
viewportDataSource.evaluate()
}
} catch (e: Exception) {
Log.e("MainActivity", "Erro ao configurar zoom Free Drive: ${e.message}")
}
}
tentei varias formulas
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the DropInNavigationView API, its customizeViewOptions configuration, and the startFreeDrive entry point shown in the issue. Review how MapboxNavigationViewportDataSource and followingZoomPropertyOverride are intended to interact with Free Drive, then determine whether a supported public zoom control exists and document the expected behavior or API gap.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, kotlin
- Domain
- mobile
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100