-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Prevent black flash when loading styles #3101
Comments
This would be fixed by #3096 I believe. |
Ah ha, thanks. |
I solve this by this code |
Fixed by #3096. |
The fix in #3096 only takes effect if you set |
|
As of the iOS 10 SDK, The black flash you’re seeing is more likely the style’s background layer being rendered before the other layers come in, since the other layers likely require fetching vector tiles. (This is the phase in which MapKit would render a graticule: see #119.) The background color of a style usually matches the color of land, although Mapbox Satellite and Satellite Streets have black as their background color. You can configure the background color by customizing a style in Mapbox Studio or, as of the upcoming Mapbox iOS SDK v3.4.0 beta, by modifying If you’re seeing a noticeable black flash despite the style’s background color being set to something lighter, I agree that we should revisit this issue and find a better solution. |
I set |
I don’t mean to be stubborn; just wondering whether we’re missing something that allows MapKit to default to being opaque but still avoid the black flash. I’ve opened #7256 to track defaulting |
I've set a background colour on my
MGLMapView
, to the background of the Streets style, so it looks a little less jarring when loading. However, it still flashes black while loading the map for the first time. It'd be great if it could keep the background colour until the style is fully loaded.The text was updated successfully, but these errors were encountered: