Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 71531

Geolocation is always returning speed and heading as Zero

$
0
0

@sherifabdulmawla wrote:

Hi All,
I’ve a problem with Ionic Native Geolocation Plugin. When i use watchPosition or getCurrentPosition methods while the device is moving, lat and long are changed when device is moving as expected but both speed and heading properties are always returned as Zero which is a weird behavior.

Below is the part of code i’m using for debugging

this.geolocation.watchPosition().subscribe((res:Geoposition) => {
      console.log(res);
    }), err => {Preformatted text
      console.log(err)
    }

And below is a sample of the returned object

coords{
accuracy:21.518999099731445,
altitude:0,
altitudeAccuracy:null,
heading:0,
latitude:30.0572674,
longitude:31.3996529,
speed:0
}

If anybody can help me get the heading value returned properly using this plugin it will be appreciated.

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 71531

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>