Skip to content

[Bug]: [ANDROID] onUpdate in <UserLocation/> is not coming "heading" value #4063

@naturelabsar

Description

@naturelabsar

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug 🪲Something isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions