mapbox / mapbox-gl-native-ios

Interactive, thoroughly customizable maps for iOS powered by vector tiles and OpenGL
https://www.mapbox.com/mobile/
Other
210 stars 122 forks source link

possibly 6.2.1 or newer bug #481

Open swsong12 opened 4 years ago

swsong12 commented 4 years ago

Steps to reproduce

  1. open app from home screen
  2. initial map loading
  3. send app to background
  4. re-open app

Expected behavior

when (3), show screen saved right before (2)

Actual behavior

when (3), shows unknown snapshot of map (unsure when this was taken), then shows screen saved right before (2)

newvideo

possibly related to #412

Configuration

Mapbox SDK versions: 6.2.0~ 6.2.1 iOS/macOS versions: ios 14 Device/simulator models: iphone 11 pro, xs max and more Xcode version: 12GM

julianrex commented 4 years ago

This is by design - please see https://github.com/mapbox/mapbox-gl-native-ios/pull/412. The snapshot that is displayed on entering the foreground used to be taken when backgrounding - however this was causing crashes.

To avoid a crash, the snapshot is now taken when the map has idled, and to avoid a jarring jump there is a cross-fade on foregrounding.

If you're seeing something other than this behavior, for example, a bug - please can you open another issue?

swsong12 commented 4 years ago

@julianrex Before checking #412, we thought this was some kind of rendering bug. Is there anyway we can disable this feature (snapshot + cross-fade) or could there be any other way to fix #412?

For ordinary users, this fix might feel like a ui/ux bug and it may potentially confuse some users.

julianrex commented 4 years ago

In theory, we should no longer require this snapshot, but it's still possible to see a flash of some sort. An alternative would be to fade from a solid color, which would certainly be less jarring.

swsong12 commented 4 years ago

@julianrex in 6.3.0 can developers choose to fade from solid color (instead of fade from snapshot)?

DrikABrak commented 3 years ago

Hello guys! Unfortunately, we always have this issue in 6.3.0 When we send app in background when we move mapview, we have a crash on MGLMapView willResignActive Do you have any updates on this crash? Thanks.

julianrex commented 3 years ago

When we send app in background when we move mapview, we have a crash on MGLMapView willResignActive

Can you open a new ticket for your crash please?

tsuz commented 3 years ago

@swsong12 @DrikABrak

FWIW, this is fixed in the new version, v10.rc-5.

https://user-images.githubusercontent.com/6927131/131432956-3dc4488a-d6b6-4c1d-8eee-643bdd0e2d38.mov