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

NavigationTemplate doesn't show the map. Black screen #26

Open
artrobert opened this issue Feb 28, 2022 · 3 comments
Open

NavigationTemplate doesn't show the map. Black screen #26

artrobert opened this issue Feb 28, 2022 · 3 comments

Comments

@artrobert
Copy link

artrobert commented Feb 28, 2022

Hi,
I am playing with the automotive library and I managed to run all the examples and created a project with the templates.

I noticed that using the PlaceListMapTemplate displays the map but when i try using the NavigationTemplate the screen is black (other actions and buttons appear) but only the map is not showing.

I tried to do this simple example on Polestar2:

class NavigationMap(carContext: CarContext) : Screen(carContext) {
override fun onGetTemplate(): Template {
val actionStrip = ActionStrip.Builder()
.addAction(
Action.Builder()
.setTitle("BACK")
.setOnClickListener { this.finish() }
.build())
.build()
return NavigationTemplate.Builder()
.setActionStrip(actionStrip)
.setBackgroundColor(CarColor.SECONDARY)
.build()
}
}

Is is something that I am not doing right or missing a KEY for the map or donno? The examples are using a PNG drawn map and is not that obvious what is wrong.

@anderlopz
Copy link

@artrobert same here, did you find a solution?

@TanviJani
Copy link

@artrobert did you find any solution?

@DhanyaDsp
Copy link

Im also facing the same issue. Please help.
@nonnull
@OverRide
public Template onGetTemplate() {
ActionStrip actionStrip =
new ActionStrip.Builder()
.addAction(
new Action.Builder()
.setTitle("NavigationMapOnlyScreen")
.setOnClickListener(this::finish)
.build())
.build();

    return new NavigationTemplate.Builder().setActionStrip(actionStrip).build();
}

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

4 participants