Dear all,
when i Geolocation Plugin getCurrentPostion , it has problem
sometimes it get location based on WIFI , but i want to get postion based on GPS (if on handy)
how to do this settings?
any hints well be more than welcom!
import { Geolocation } from ‘@ionic-native/geolocation’;
…
constructor(private geolocation: Geolocation) {}
…
this.geolocation.getCurrentPosition().then((resp) => {
// resp.coords.latitude
// resp.coords.longitude
}).catch((error) => {
console.log(‘Error getting location’, error);
});
let watch = this.geolocation.watchPosition();
watch.subscribe((data) => {
// data can be a set of coordinates, or an error (if an error occurred).
// data.coords.latitude
// data.coords.longitude
});