react-native-proximus-geolocations
v1.0.0
Published
[![Build Status Master](https://www.bitrise.io/app/2eeb6d5899039e71/status.svg?token=wXbsIlJQCm-sNiTX8ZRE9A&branch=master)](https://www.bitrise.io/app/2eeb6d5899039e71)(Master)
Downloads
7
Readme
Build Status
react-native-proximus-geolocations
Getting started
$ npm install react-native-proximus-geolocations --save
Mostly automatic installation
$ react-native link react-native-proximus-geolocations
Usage
get current position
import geolocation from 'react-native-proximus-geolocations';
geolocation.getCurrentDevicePosition().then(position => {
// ...
});
Watch position
import geolocation from 'react-native-proximus-geolocations';
const observable = geolocation.watchDevicePosition();
const subscription = observable.subscribe(
position => {
// ...
}
},
err => {
throw Error(err);
}
);
Permissions
This library is based on React Native navigator.geolocation
which requires configuration and permissions.
Please see following for details: https://facebook.github.io/react-native/docs/geolocation.html#docsNav
ChangeLog
Version 1.0.0
- Added watchDevicePosition and getCurrentDevicePosition
- Unit tests (100% coverage)
Version 0.0.0
- Library created