Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Not setting a style results in blank Map #2463

Closed
tobrun opened this issue Sep 30, 2015 · 6 comments
Closed

Not setting a style results in blank Map #2463

tobrun opened this issue Sep 30, 2015 · 6 comments
Labels
Android Mapbox Maps SDK for Android bug

Comments

@tobrun
Copy link
Member

tobrun commented Sep 30, 2015

We are not informing the end developer that setting a style is required.

  • provide a default style?
  • implement logging/exception to inform end developer?
@tobrun tobrun added bug Android Mapbox Maps SDK for Android labels Sep 30, 2015
@tobrun
Copy link
Member Author

tobrun commented Sep 30, 2015

Same case for entering a not valid url

@ljbade
Copy link
Contributor

ljbade commented Sep 30, 2015

There should be some stuff in the log from the C++ side.

Problem we have is setting style is async, we don't know URL is bad until sometime after we return from setStyleURL.

I used to have a basic URL validity check in the Java side that threw an exception, but caused more issues than it fixed.

@ljbade
Copy link
Contributor

ljbade commented Oct 2, 2015

I'm documenting that null will load the default style in #2002 so going to have to implement this for v2.0.0

@ljbade ljbade added this to the android-v2.0.0 milestone Oct 2, 2015
@ljbade
Copy link
Contributor

ljbade commented Oct 2, 2015

Also the failed loading onMapChange event should be fired.

@bleege bleege modified the milestones: android-v2.1.0, android-v2.0.0 Oct 2, 2015
@bleege bleege modified the milestones: android-v2.1.0, android-v2.2.0 Oct 2, 2015
@bleege bleege modified the milestones: android-v2.2.0, android-v2.3.0 Oct 28, 2015
@bleege bleege modified the milestones: android-v2.3.0, android-v2.4.0 Dec 4, 2015
@bleege bleege modified the milestones: android-v3.0.0, android-v3.1.0 Dec 21, 2015
@tobrun
Copy link
Member Author

tobrun commented Jan 11, 2016

@bleege
is this issue actionable?
Should we load a default style in those cases?

I noticed this use-case on current master

  • open Activity with a map but not calling setStyle
  • blank Map
  • rotate device
  • Mapbox Streets style is loaded

@bleege
Copy link
Contributor

bleege commented Jan 11, 2016

Setting a style is part of the setup process (along with an Access Token) so seeing a blank map seems like a good "error message". I'm open to be convinced otherwise though. ;-)

The reason for the Mapbox Streets in the TestApp after rotation is due to it being set as the default value in the Activity for state tracking. This then gets set in onStateSave() and then loaded in onCreate() during rotation. This won't happen in the SDK on it's own.

@tobrun tobrun closed this as completed Jan 12, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Android Mapbox Maps SDK for Android bug
Projects
None yet
Development

No branches or pull requests

3 participants