Apache Cordova how to get current location?

Apache Cordova how to get current location?

Updatecoord() {
 var self = this;
 console.log("Updatecoord run");

navigator.geolocation.getCurrentPosition(
 function (position) {

 var date = new Date();
date.setTime(position.timestamp);

console.log(
 'Latitude:' + position.coords.latitude + '\n' +
 'Longitude:' + position.coords.longitude + '\n' +
 'Time:' + date
);
self.SaveCoord(position);
},
 function (error) {
 console.log('code:' + error.code + '\n' +
 'message:' + error.message + '\n');
},
{
 enableHighAccuracy: true,
 timeout: 20000,
 maximumAge: 0,
}
);
 };


Try to get your location so, you get the data but they are not relevant,
as far as I understand when setting enableHighAccuracy: true, you should be prompted tipo this a68146cd827545c0a53ee88e1f40191f.png but this request does not appear, tell me what to do?
July 9th 19 at 13:50

Find more questions by tags AndroidApache CordovaGeolocationJavaScriptSatellite navigation