|
1 | | -# geolocation |
2 | | -ReasonML / BuckleScript bindings for @react-native-community/geolocation |
| 1 | +# BuckleScript bindings to @react-native-community/geolocation |
| 2 | + |
| 3 | +[](https://github.com/reason-react-native/geolocation/actions) |
| 4 | +[](https://www.npmjs.com/package/@reason-react-native/geolocation) |
| 5 | + |
| 6 | +These are complete BuckleScript bindings to |
| 7 | +[`@reason-react-native/geolocation`](https://github.com/react-native-community/react-native-geolocation), |
| 8 | +in Reason syntax. |
| 9 | + |
| 10 | +Version `x.y.z` of `@reason-react-native/geolocation` should be compatible with |
| 11 | +version `x.y.*` of `@react-native-community/geolocation`. |
| 12 | + |
| 13 | +## Installation |
| 14 | + |
| 15 | +With `yarn`: |
| 16 | + |
| 17 | +```shell |
| 18 | +yarn add @reason-react-native/geolocation |
| 19 | +``` |
| 20 | + |
| 21 | +With `npm`: |
| 22 | + |
| 23 | +```shell |
| 24 | +npm install @reason-react-native/geolocation |
| 25 | +``` |
| 26 | + |
| 27 | +`@react-native-community/geolocation` should be properly installed and linked. |
| 28 | +Please refer to the relevant |
| 29 | +[instructions](https://github.com/react-native-community/react-native-geolocation/blob/master/README.md). |
| 30 | + |
| 31 | +Finally, `@reason-react-native/geolocation` should be added to `bs-dependencies` |
| 32 | +in `BuckleScript` configuration of the project (`bsconfig.json`). For example, |
| 33 | + |
| 34 | +```json |
| 35 | +{ |
| 36 | + ... |
| 37 | + "bs-dependencies": ["reason-react", "reason-react-native", "@reason-react-native/geolocation"], |
| 38 | + ... |
| 39 | +} |
| 40 | +``` |
| 41 | + |
| 42 | +## Note |
| 43 | + |
| 44 | +On Android, this package uses the |
| 45 | +[android.location API](https://developer.android.com/reference/android/location/package-summary), |
| 46 | +which is slower and less accurate than the |
| 47 | +[Google Location Services API](https://developer.android.com/training/location/). |
| 48 | +While this may be addressed in the future, below alternatives already use the |
| 49 | +latter API: |
| 50 | + |
| 51 | +- [react-native-geolocation-service](https://github.com/Agontuk/react-native-geolocation-service) |
| 52 | +- [react-native-location](https://github.com/timfpark/react-native-location) |
| 53 | + |
| 54 | +## Use |
| 55 | + |
| 56 | +Documentation is not available at this time. |
| 57 | + |
| 58 | +--- |
| 59 | + |
| 60 | +## Changelog |
| 61 | + |
| 62 | +Check the [changelog](./CHANGELOG.md) for more informations about recent |
| 63 | +releases. |
| 64 | + |
| 65 | +--- |
| 66 | + |
| 67 | +## Contribute |
| 68 | + |
| 69 | +Read the |
| 70 | +[contribution guidelines](https://github.com/reason-react-native/.github/blob/master/CONTRIBUTING.md) |
| 71 | +before contributing. |
| 72 | + |
| 73 | +## Code of Conduct |
| 74 | + |
| 75 | +We want this community to be friendly and respectful to each other. Please read |
| 76 | +[our full code of conduct](https://github.com/reason-react-native/.github/blob/master/CODE_OF_CONDUCT.md) |
| 77 | +so that you can understand what actions will and will not be tolerated. |
0 commit comments