1.0.0 • Published 5 years ago

ionicgeolocationmodule v1.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

Ionic4 ionicgeolocationmodule

This module allow you to use geolocation, easy to implement.

How to install

##Run commond

ionic cordova plugin add cordova-plugin-request-location-accuracy && npm install @ionic-native/location-accuracy && ionic cordova plugin add cordova-plugin-geolocation && npm install @ionic-native/geolocation && npm install ionicgeolocationmodule

How to use

Step 1 : import module

import { GeolocationModule } from 'ionicgeolocationmodule';

imports : GeolocationModule

Step 2 : Inject service and use it.

import { GeolocationService } from 'ionicgeolocationmodule';

constructor(private gs: GeolocationService) {}

this.gs.locationRequest().then((location) => {
  alert(location.coords.longitude);
  alert(location.coords.latitude);
}).catch((error) => {
  alert(JSON.stringify(error));
});

Contact

gmail : mrksphp@gmail.com