Skip to content
New issue

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

Override style of MapboxTripProgressView #171

Open
foyst opened this issue Nov 21, 2022 · 0 comments
Open

Override style of MapboxTripProgressView #171

foyst opened this issue Nov 21, 2022 · 0 comments

Comments

@foyst
Copy link

foyst commented Nov 21, 2022

Hi,

I'm following the "Render trip progress information" example and I'm wanting to apply a custom style to the MapboxTripProgressView component.

I can see in mapbox_activity_trip_progress.xml there is already a custom style applied but commented out. I've tried uncommenting this but the style doesn't seem to take effect.

Conversely I've tried uncommenting the custom style in "Render maneuver instructions for a route" (mapbox_activity_show_maneuver_instructions.xml) and this works fine.

I think the difference in behaviour is because MapboxManeuverView is passing config through the "updateOptions" functions, whereas MapboxTripProgressView is using the "updateStyle" function (which appears to be deprecated, and also has a hardcoded style of 0 passed in through the constructor that's being used).

Let me know if you need any more info.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant