ionicgeolocationmodule
v1.0.0
Published
This module allow you to use geolocation, easy to implement.
Downloads
3
Maintainers
Readme
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 : [email protected]