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

Set custom map style for drop-in navigation UI – *Work in progress* #480

Closed
wants to merge 4 commits into from

Conversation

langsmith
Copy link
Contributor

@langsmith langsmith commented Nov 9, 2017

This pr adds the ability to set a custom map style URL for the map that's used in the drop-in nav UI.

I started this work mainly to have more UI consistency in the Store Locator kit.

Right now, I'm using @nullable and if/else statements, so there's probably more elegant/concise refactoring to be done.

Also, in case you want to try a map style in the drop-in nav UI yourself, pass through a style url string as the last parameter of the NavigationLauncher.startNavigation() method found in launchNavigationWithRoute() of the test app's
NavigationViewActivity.java.

Maybe we can pass through mapboxMap.getStyleUrl in some cases to automatically have UI consistency?

cc @danesfeder @cammace @zugaldia @Lndsay @noemiwalzebuck

ezgif com-optimize

ezgif com-optimize

@langsmith langsmith removed the request for review from danesfeder November 9, 2017 23:45
@danesfeder
Copy link
Contributor

Capturing conversation with @ericrwolfe - I think this PR is a good opportunity to open up "theming" for the drop-in UI.

This will include the map style work that @langsmith has started here, as well as the ability to set a custom theme with the custom attributes we have defined https://github.com/mapbox/mapbox-navigation-android/blob/master/libandroid-navigation-ui/src/main/res/values/attrs.xml#L15

I can work with @langsmith on the rest of this / come up with a solution that is easy and makes sense from a developer integration standpoint.

@danesfeder
Copy link
Contributor

@langsmith this functionality landed in #507 - appreciate you getting the ball rolling on this! Docs will be updated to reflect how this can be done

@danesfeder danesfeder closed this Nov 21, 2017
@danesfeder danesfeder deleted the ls-set-map-style-functionality branch November 21, 2017 20:06
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

Successfully merging this pull request may close these issues.

2 participants