@evripides wrote:
I am trying to use Geolocation but I get the below error
TypeError: Object(…) is not a function
at Geolocation.getCurrentPositionIonic Version 3.20.0
cordova-plugin-geolocation 4.0.1 “Geolocation”my code
import { Geolocation } from ‘@ionic-native/geolocation/ngx’;
mylocation(){
this.geolocation.getCurrentPosition().then((resp) => {
this.lat = resp.coords.latitude;
this.longt =resp.coords.longitude;
}).catch((error) => {
console.log(‘Error getting location’, error);
});
}any idea what I can do
Thank you
Posts: 1
Participants: 1