React Native module bridge to convert address to geo coordinates.
MIT License
React Native module bridge to convert address to geo coordinates.
Makes use of the following native iOS classes:
npm install react-native-reverse-geo --save
Libraries
➜ Add Files to [your project's name]
node_modules
➜ react-native-reverse-geo
and add RNReverseGeo.xcodeproj
libRNReverseGeo.a
to your project's Build Phases
➜ Link Binary With Libraries
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
.Cmd+R
)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.