Open heyuejin2empty opened 2 months ago
val mapboxRouteLineApiOptions = MapboxRouteLineApiOptions.Builder().build() val mapboxRouteLineViewOptions = MapboxRouteLineViewOptions.Builder(this) .routeLineBelowLayerId("road-label-navigation") .routeLineColorResources(RouteLineColorResources.Builder() .routeLineTraveledColor(Color.RED) .routeLineTraveledCasingColor(Color.GREEN) .routeCasingColor(Color.BLUE) .routeClosureColor(Color.YELLOW) .routeDefaultColor(Color.GRAY) .build()).build() routeLineAPI = MapboxRouteLineApi(mapboxRouteLineApiOptions) routeLineView = MapboxRouteLineView(mapboxRouteLineViewOptions) val routeArrowOptions = RouteArrowOptions.Builder(this) .build() routeArrowView = MapboxRouteArrowView(routeArrowOptions)
I use the dependent version: implementation "com.mapbox.navigationcore:navigation:3.3.1" implementation "com.mapbox.navigationcore:copilot:3.3.1" implementation "com.mapbox.navigationcore:ui-maps:3.3.1" implementation "com.mapbox.navigationcore:voice:3.3.1" implementation "com.mapbox.navigationcore:tripdata:3.3.1" implementation "com.mapbox.navigationcore:android:3.3.1" implementation "com.mapbox.navigationcore:ui-components:3.3.1"
@heyuejin2empty I am using version 2.19, in my app the withVanishingRouteLineEnabled(true) function was required for this color change
withVanishingRouteLineEnabled(true)
I use the dependent version: implementation "com.mapbox.navigationcore:navigation:3.3.1" implementation "com.mapbox.navigationcore:copilot:3.3.1" implementation "com.mapbox.navigationcore:ui-maps:3.3.1" implementation "com.mapbox.navigationcore:voice:3.3.1" implementation "com.mapbox.navigationcore:tripdata:3.3.1" implementation "com.mapbox.navigationcore:android:3.3.1" implementation "com.mapbox.navigationcore:ui-components:3.3.1"