Geolocation Plugin getCurrentPostion problem


#1

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
});


#2

it was working well on my handy but just recently it start to use wifi for currentlocation instead of gps. i am not aware of what i did to my handy. i will try to enahble highaccuracy on api to see if it helps