Returns the current geolocation of the user.
The getCurrentGeolocation()
function returns a Promise that resolves to an
object containing the current geolocation of the user.
The getCurrentGeolocation()
function has the following limitations:
getCurrentGeolocation()
with a setTimeout()
in case the browser is set to not detect the locale. Adding the timeout lets you handle the unfulfilled promise.