Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 48983

Allow location permission question

$
0
0

Hi all. Part of the code is to use the latitude and longitude obtained from the device. The problem I have is that it stopped asking if it is allowed to get the location, so now it does not get the latitude and longitude.

let posicion: string | number;

const getLocation = async () => {

  try {

      const position = await Geolocation.getCurrentPosition();

      posicion=position.coords.latitude +"/"+ position.coords.longitude

      return posicion;

  } catch (e) {

    return 0;

  }

}

Is there a statement like asking for permissions?

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 48983

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>