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
Describe the bug
In the latest master version 18fc03c, setting a Transition style for a style property causes an error in Android (iOS works properly):
com.facebook.react.bridge.ReadableNativeArray cannot be cast to com.facebook.react.bridge.ReadableNativeMap
getMap
ReadableNativeArray.java:153
getMap
ReadableNativeArray.java:22
<init>
RCTMGLStyleValue.java:46
getStyleValueForKey
RCTMGLStyle.java:59
setRasterLayerStyle
RCTMGLStyleFactory.java:526
addStyles
RCTMGLRasterLayer.java:25
...
To Reproduce
Set the transition style for any transitionable style property e.g. set rasterOpacityTransition for rasterOpacity:
Describe the bug
In the latest master version 18fc03c, setting a Transition style for a style property causes an error in Android (iOS works properly):
To Reproduce
Set the transition style for any transitionable style property e.g. set
rasterOpacityTransition
for rasterOpacity:Expected behavior
Transition style should be set in Android without causing an error.
Versions
Additional context
https://github.com/react-native-mapbox/maps/blob/f0b469d75c2af3c2ffe44cdba47ff9abafd1d022/android/rctmgl/src/main/java/com/mapbox/rctmgl/components/styles/RCTMGLStyleValue.java#L45-L51 does not properly handle style values that are objects (transition style values are objects so
array
contains another array, not a map).https://github.com/react-native-mapbox/maps/blob/f0b469d75c2af3c2ffe44cdba47ff9abafd1d022/android/rctmgl/src/main/java/com/mapbox/rctmgl/components/styles/RCTMGLStyleValue.java#L139-L140 does not get the transition options properly from the style value.
The text was updated successfully, but these errors were encountered: