getGeoLocation
Returns the geo location and additional information like speed and altitude if available. Be aware, that this is an asynchronous function and you have to use await.
coords;
accuracy: 33;
altitude: null;
altitudeAccuracy: null;
heading: null;
latitude: 51.073834399999996;
longitude: 6.0768204;
speed: null;
timestamp: 1557477072518;Example Usages
let myGeoLocation = await app.getGeoLocation();
console.log(myGeoLocation.coords.latitude);
console.log(myGeoLocation.coords.longitude);let myLocation = await app.getGeoLocation();
window.open(
"http://maps.google.de/maps?q=" +
myLocation.coords.latitude +
"," +
myLocation.coords.longitude,
"_blank"
);Return Values
Last updated