[Bug]: [ANDROID] onUpdate in <UserLocation/> is not coming "heading" value
Nobody has claimed this yet.
- Dominant language
- Kotlin
- Stars
- 2.9k
- Forks
- 947
- Avg merge
- 6d 37m
- Merged PRs (30d)
- 1
Description
Mapbox Implementation
Mapbox
Mapbox Version
11.16.0 (all versions)
React Native Version
0.80.1
React Native Architecture
New Architecture (Fabric/TurboModules)
Platform
Android
@rnmapbox/maps version
10.0.0-beta.11
Standalone component to reproduce
import React from 'react';
import {
MapView,
UserLocation
} from '@rnmapbox/maps';
class BugReportExample extends React.Component {
render() {
return (
<MapView style={{flex: 1}}>
<UserLocation
showsUserHeadingIndicator
visible
animated
onUpdate={location => {
console.log(location) // location.coords.heading === not exist, not null, not value.
}}
/>
</MapView>
);
}
}
All cases tested. androidRenderMode as normal, gps, compass. even with deprecated renderMode="native",
Also all permissions working. (Despite of deprecated, renderMode ="native" and "compass" show the arrow in right heading, so heading... so heading natively is working)
Observed behavior and steps to reproduce
The step to reproduce is just log "location" in onUpdate in component...
Expected behavior
returns heading number, at least null value.
Notes / preliminary analysis
bridge is wrong
Additional links and references
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Android bridge for the UserLocation component and reproduce the issue using the provided React Native example with onUpdate logging. Trace the location payload passed to onUpdate; done means location.coords.heading is present with a heading number or null on Android.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kotlin, react-native
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100