lineDashArray with only 1 value => layer does not render on some android devices
We are rendering <MapboxGL.LineLayer> layers, and we are creating dashed lines with the style property 'lineDashArray'. This works as expected.
We are populating the dash array dynamically, and sometimes that array only has 1 value (e.g. [1]). This works and is rendered well up until now, but one of our users made us aware that it does not render well on his Android phone (a samsung A52).
After having debugged this further and also tested a bit more, we can also reproduce this on one of our Android test devices (Mi A1). On all other devices we have it renders well (tested both tablets and phones, iOS and Android).
I haven't had time to dig into the repo code to understand why it doesn't work on some Android devices yet, but wanted to report it here in case anyone are aware of this and what one can expect.
To get around it in the short term, we have changed our logic to only apply the lineDashArray property if there is at least 2 values in the array.
Is it supposed to work with one value in the array, or are we feeding in bad data and we have just been lucky that it works for most devices?
Versions (please complete the following information):
-
Platform: Android, iOS
-
Platform OS: Android 9, Android 12 (probably more but we have seen the issue in these)
-
Device: Mi A1, Samsung A52
-
Dev OS: OSX 12.3.1
-
@rnmapbox/maps Version: 8.5.0
-
React Native Version: 0.67.3