Cordova geolocation plugin not working properly


#1

Hi,

I’m trying to capture latitude and longitude using cordova geolocation plugin.I facing issues in this.The plugin is capturing the geolocations first time but again tried to capture but its not capturing.

This is my code.

$cordovaGeolocation.getCurrentPosition({
timeout: 3600000,
maximumAge: 3600000,
enableHighAccuracy: false
})
.then((position) => {
this.latitude = position.coords.latitude;
this.longitude = position.coords.longitude;
this.accuracy = position.coords.accuracy;
}, (e) => {
//console.log('error capturing location: ’ + Utils.toString(e));
});
}
I’m using geolocation plugin version 1.0.0 , cordova version 7.0.0 and cordova android version 6.2.3