We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I want to add speed limit in my app. I refer these https://docs.mapbox.com/android/navigation/guides/ui-components/speed-limit/ https://docs.mapbox.com/android/navigation/examples/show-speed-limit/
but it give me error this error "Type mismatch: inferred type is MapboxNavigationView but Context was expected" for below code.
// Define speed limit formatter options private val speedLimitFormatter: SpeedLimitFormatter by lazy { SpeedLimitFormatter(this) }
for SpeedLimitFormatter variable
Can you please help me how to add speed limit code in MapboxNavigationView.kt file.
The text was updated successfully, but these errors were encountered:
Hi, I solved it myself. replace "this" with "context"
Code : // Define speed limit formatter options private val speedLimitFormatter: SpeedLimitFormatter by lazy { SpeedLimitFormatter(context) }
Now speed limit is worked on my navigation map.
Sorry, something went wrong.
No branches or pull requests
I want to add speed limit in my app.
I refer these
https://docs.mapbox.com/android/navigation/guides/ui-components/speed-limit/
https://docs.mapbox.com/android/navigation/examples/show-speed-limit/
but it give me error this error "Type mismatch: inferred type is MapboxNavigationView but Context was expected" for below code.
// Define speed limit formatter options
private val speedLimitFormatter: SpeedLimitFormatter by lazy {
SpeedLimitFormatter(this)
}
for SpeedLimitFormatter variable
Can you please help me how to add speed limit code in MapboxNavigationView.kt file.
The text was updated successfully, but these errors were encountered: