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

Ionic Native Geolocation returns wrong position

$
0
0

@lolaswift wrote:

Sometimes, a few kilometers away. Very frustrating!

getCurrentPosition() {
return Observable.create(observer => {
  let that = this;
  this._platform.ready().then(function () {

    that.geolocation.getCurrentPosition({ enableHighAccuracy: true, maximumAge: 0, timeout: 30000 }).then((position) => {
      observer.next(position);
      observer.complete();

    }).catch((error) => {
      observer.error(error);
      observer.complete();
      console.log('Error getting location', error);
    });
  });

});

}

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 71530

Trending Articles



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