How to get Lat, Long in Ionic app

|
| By Webner

Steps to access GPS in Ionic app to capture lat/long

For this feature we use Geolocation plugin in ionic. It provides user’s current position based on the device’s current location (latitude and longitude). With the help of latitude and longitude you can get the address of the person. It also provides the functionality to watch device position.
Installation:

$ ionic cordova plugin add cordova-plugin-geolocation
$ npm install @ionic-native/geolocation

Platform:

  • Amazon Fire OS
  • Android
  • Browser
  • iOS
  • Windows

Use:
Import inside the page where you want.

Leave a Reply

Your email address will not be published. Required fields are marked *