Google Maps / MapKit Style does not match
- /e/ version: ?
- Device model(s): Samsung Galaxy A5(2017)
Summary
Third Party app crash when applying a Style (setMapStyle) to Google Maps.
The problem
Steps to reproduce
Download app https://play.google.com/store/apps/details?id=com.virtuo.customer
What is the current behavior?
App crash on first screen because of a map
What is the expected correct behavior?
App should not crash like if the phone is using Google Maps
Technical informations
Relevant logs (adb logcat
)
Fatal Exception: java.lang.IllegalStateException: Calling getSourceAs when a newer style is loading/has loaded.
at com.mapbox.mapboxsdk.maps.Style.validateState(Style.java:777)
at com.mapbox.mapboxsdk.maps.Style.getSourceAs(Style.java:148)
at com.mapbox.mapboxsdk.location.SymbolLocationLayerRenderer.refreshSource(SymbolLocationLayerRenderer.java:321)
at com.mapbox.mapboxsdk.location.SymbolLocationLayerRenderer.updatePulsingUi(SymbolLocationLayerRenderer.java:289)
at com.mapbox.mapboxsdk.location.LocationLayerController$5.onNewAnimationValue(LocationLayerController.java:299)
at com.mapbox.mapboxsdk.location.LocationLayerController$5.onNewAnimationValue(LocationLayerController.java:292)
at com.mapbox.mapboxsdk.location.MapboxAnimator.postUpdates(MapboxAnimator.java:104)
at com.mapbox.mapboxsdk.location.MapboxAnimator.onAnimationUpdate(MapboxAnimator.java:91)
at com.mapbox.mapboxsdk.location.PulsingLocationCircleAnimator.onAnimationUpdate(PulsingLocationCircleAnimator.java:6)
at android.animation.ValueAnimator.animateValue(ValueAnimator.java:1547)
at android.animation.ValueAnimator.animateBasedOnTime(ValueAnimator.java:1339)
at android.animation.ValueAnimator.doAnimationFrame(ValueAnimator.java:1471)
at android.animation.AnimationHandler.doAnimationFrame(AnimationHandler.java:146)
at android.animation.AnimationHandler.access$100(AnimationHandler.java:37)
at android.animation.AnimationHandler$1.doFrame(AnimationHandler.java:54)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:947)
at android.view.Choreographer.doCallbacks(Choreographer.java:761)
at android.view.Choreographer.doFrame(Choreographer.java:693)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:935)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6718)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:491)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
Solutions
Workaround
Install Google Maps
Possible fixes
Support the setMapStyle feature like Google Maps in the MapKit replacement