You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CameraDebugView is not updating because on app start it does not have supscription to CameraChanged event due to DebugOptionsController has value started == false. Only in MapView.onStart() this value is setting to true but at first onStart next contdition is not met:
if (debugOptionsControllerDelegate.isInitialized()) {
debugOptionsController.started = true
}
Workaround: call MapView.onStart() after setting debug options
MapView.onStart() is called from MapViewLifecycle very early before MapView.debugOptions is set. While in View style MapView.onStart() is called from MapboxLifecyclePluginImpl when MapView.debugOptions is already set.
Environment
Observed behavior and steps to reproduce
Compose app with MapView and MapViewDebugOptions.CAMERA enabled. For example - https://github.com/mapbox/mapbox-maps-android/blob/main/compose-app/src/main/java/com/mapbox/maps/compose/testapp/examples/basic/DebugModeActivity.kt
CameraDebugView is not updating (lat, lon, etc.) on app start, But after minimize and return to app again app starts updating of CameraDebugView.
screen-20241206-111412.mp4
Expected behavior
CameraDebugView should always show camera updates
Notes / preliminary analysis
CameraDebugView is not updating because on app start it does not have supscription to CameraChanged event due to DebugOptionsController has value started == false. Only in MapView.onStart() this value is setting to true but at first onStart next contdition is not met:
Workaround: call MapView.onStart() after setting debug options
Additional links and references
The text was updated successfully, but these errors were encountered: