Skip to content

Noticeable Black Flash Before NavigationMapView Loads #4081

@billyking991

Description

@billyking991

Mapbox Navigation SDK version

2.6.0

Steps to reproduce

Please see attached video for the example. I've had the following code in viewDidLoad for Mapbox Navigation V0 and V1 (2 years) with no issues.

navigationMapView = NavigationMapView(frame: CGRect(x: 0.0, y: 0.0, width: mapHolder.frame.size.width, height: mapHolder.frame.size.height))
navigationMapView.delegate = self
navigationMapView.userLocationStyle = .puck2D()
navigationMapView.navigationCamera.viewportDataSource = NavigationViewportDataSource(mapView.mapView, viewportDataSourceType: .raw)
navigationMapView.navigationCamera.follow()
mapHolder.addSubview(navigationMapView)

Now that I'm updating the app to Mapbox Navigation V2, I'm seeing a noticeable black flash after the navigationMapView is added to the UIView and before it loads (or at least I'm guessing that's what's happening).

I've tried changing the NavigationMapView backgroundColor to UIColor.white. I've also tried adding it to the UIView holder in viewWillAppear and viewDidLoad with no luck. Any ideas? Again, this has not been a problem in the last 2 years with V0 and V1. Just ironing out issues before release. Thank you for your help!

RPReplay_Final1660767602.MOV

Expected behavior

NavigationMapView should load smoothly without a black flash.

Actual behavior

There is a noticeable black flash after the NavigationMapView is added as a subview to the UIView holder, but before the map loads.

Is this a one-time issue or a repeatable issue?

repeatable

Metadata

Metadata

Assignees

Labels

UIWork related to visual components, Android Auto, Camera, 3D, voice, etc.bugSomething isn’t workingjira-sync-complete

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions