Skip to content

Getting heading value -1 in navigator.geolocation.getCurrentPosition method only in iOS #25984

@harikanammi

Description

@harikanammi

I am using navigator.geolocation.getCurrentPosition method for getting current latitude and longitude and I am getting heading value as -1 in iOS whereas in android it working fine

React Native version:

"react-native": "0.58.4"

Steps To Reproduce

  1. Getting heading value -1 in iOS.
navigator.geolocation.getCurrentPosition(
      position => {
        alert("postion12345........6" + JSON.stringify(position.coords.heading));
  })

Describe what you expected to happen:
To get the correct heading value to rotating the marker.

Snack, code example, screenshot, or link to a repository:
https://stackoverflow.com/questions/55688545/getting-heading-value-1-in-getcurrentpostion-method-in-geoloaction

Screenshot:-
Simulator Screen Shot - iPhone 6s - 2019-08-08 at 16 59 38

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions