[Bug]: showsUserHeadingIndicator is not working on Android
Mapbox Implementation
Mapbox
Mapbox Version
default
Platform
Android
@rnmapbox/maps version
10.0.13
Standalone component to reproduce
import React from 'react';
import {
MapView,
Camera,
UserLocation
} from '@rnmapbox/maps';
class Example extends React.Component {
render() {
return (
<MapView
logoEnabled={false}
style={{ flex: 1 }}
attributionEnabled={false}
styleURL="mapbox://styles/mapbox/satellite-streets-v11"
scaleBarEnabled={false}
>
<UserLocation
visible
showsUserHeadingIndicator
/>
</MapView>
);
}
}
Observed behavior and steps to reproduce
After updating to the latest version of rnmapbox 10.0.13, I've seen that this property has no effect on Android devices.
Android:
iOS:
Expected behavior
The heading indicator should be shown in Android when the property is set to true.
Notes / preliminary analysis
No response
Additional links and references
No response
We are having the same issue as well.
maybe your phone doesn't have a compass sensor
@lufke Using previous versions, worked fine. I have a Samsung Note 20 Ultra
@lufke In our case as well it worked in the previous
Have you tried setting the androidRenderMode to "gps"?
Might have to also set the renderMode to UserLocationRenderMode.Native
Have you tried setting the
androidRenderModeto"gps"? Might have to also set therenderModetoUserLocationRenderMode.Native
this solved my issue, thanksss