Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aaronksaunders/react-native-reverse-geo
https://github.com/aaronksaunders/react-native-reverse-geo
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/aaronksaunders/react-native-reverse-geo
- Owner: aaronksaunders
- License: mit
- Created: 2015-05-12T01:10:51.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-05-17T17:36:07.000Z (over 9 years ago)
- Last Synced: 2024-04-26T03:33:31.962Z (8 months ago)
- Language: Objective-C
- Size: 176 KB
- Stars: 19
- Watchers: 3
- Forks: 5
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-react-native - react-native-reverse-geo ★18 - React Native module bridge to convert address to geo coordinates. (Components / Geolocation)
- awesome-react-native - react-native-reverse-geo ★18 - React Native module bridge to convert address to geo coordinates. (Components / Geolocation)
- awesome-react-native - react-native-reverse-geo ★18 - React Native module bridge to convert address to geo coordinates. (Components / Geolocation)
- awesome-react-native-ui - react-native-reverse-geo ★14 - React Native module bridge to convert address to geo coordinates. (Components / System)
- awesome-react-native - react-native-reverse-geo ★18 - React Native module bridge to convert address to geo coordinates. (Components / Geolocation)
README
# react-native-reverse-geo
React Native module bridge to convert address to geo coordinates.
Makes use of the following native iOS classes:
* [CLGeocoder](https://developer.apple.com/library/prerelease/ios/documentation/CoreLocation/Reference/CLGeocoder_class/index.html)
* [CLPlacemark](https://developer.apple.com/library/prerelease/ios/documentation/CoreLocation/Reference/CLPlacemark_class/index.html)
* [MKPlacemark](https://developer.apple.com/library/mac/documentation/MapKit/Reference/MKPlacemark_Class/index.html)## API
## Getting Started (and running the demo project)
1. From inside your project run `npm install react-native-reverse-geo --save`
2. In XCode, in the project navigator, right click `Libraries` ➜ `Add Files to [your project's name]`
3. Go to `node_modules` ➜ `react-native-reverse-geo` and add `RNReverseGeo.xcodeproj`
4. In XCode, in the project navigator, select your project. Add `libRNReverseGeo.a` to your project's `Build Phases` ➜ `Link Binary With Libraries`
5. Click `RNReverseGeo.xcodeproj` in the project navigator and go the `Build Settings` tab. Make sure 'All' is toggled on (instead of 'Basic'). Look for `Header Search Paths` and make sure it contains both `$(SRCROOT)/../react-native/React` and `$(SRCROOT)/../../React` - mark both as `recursive`.
6. RNReverseGeoRun your project (`Cmd+R`)## Usage Example
```js
var React = require('react-native');// Load Up our Native Module..
var {
RNReverseGeo
} = require('NativeModules');getInitialState: function() {
return {
reverseGeoResults: "Loading..."
};
},componentDidMount: function() {
var that = this;
RNReverseGeo.geoCodeAddress("370 Tompkins Ave, Brooklyn, NY 11216",
function(_results){
console.log(_results);
that.setState({
reverseGeoResults : JSON.stringify(_results,null,2)
})
});
},
```There is an example project supplied with the repo in the RNReverseGeoDemo folder.