This repository was archived by the owner on Sep 4, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +19
-11
lines changed Expand file tree Collapse file tree 4 files changed +19
-11
lines changed Original file line number Diff line number Diff line change 22example
33e2e
44test
5+ circle.yml
6+ .npmignore
57
68# OSX
79#
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ dependencies {
4040``` java
4141import com.devfd.RNGeocoder.RNGeocoderPackage ; // <--- import
4242
43- public class MainActivity extends Activity implements DefaultHardwareBackBtnHandler {
43+ public class MainActivity extends ReactActivity {
4444 ......
4545
4646 @Override
@@ -67,27 +67,33 @@ var NY = {
6767};
6868
6969Geocoder.geocodePosition(NY).then(res => {
70- // res is an Array of geocoding object
70+ // res is an Array of geocoding object (see below)
7171})
7272.catch(err => console.log(err))
7373
7474// Address Geocoding
7575Geocoder.geocodeAddress('New York').then(res => {
76- // res is an Array of geocoding object
76+ // res is an Array of geocoding object (see below)
7777})
7878.catch(err => console.log(err))
7979```
8080
8181## With async / await
8282```
83- const res = await Geocoder.geocodePosition(NY);
84- ...
83+ try {
8584
86- const res = await Geocoder.geocodeAddress('London');
87- ...
85+ const res = await Geocoder.geocodePosition(NY);
86+ ...
87+
88+ const res = await Geocoder.geocodeAddress('London');
89+ ...
90+ }
91+ catch(err) {
92+ console.log(err);
93+ }
8894```
8995
90- ## Geocoding return format
96+ ## Geocoding object format
9197both iOS and Android will return the following object:
9298
9399``` js
Original file line number Diff line number Diff line change 212212 BF8FCF9E1BFFB184000FCD37 /* Debug */ = {
213213 isa = XCBuildConfiguration;
214214 buildSettings = {
215- HEADER_SEARCH_PATHS = "$(SRCROOT)/../node_modules /react-native/React/**";
215+ HEADER_SEARCH_PATHS = "$(SRCROOT)/../.. /react-native/React/**";
216216 OTHER_LDFLAGS = "-ObjC";
217217 PRODUCT_NAME = "$(TARGET_NAME)";
218218 SKIP_INSTALL = YES;
222222 BF8FCF9F1BFFB184000FCD37 /* Release */ = {
223223 isa = XCBuildConfiguration;
224224 buildSettings = {
225- HEADER_SEARCH_PATHS = "$(SRCROOT)/../node_modules /react-native/React/**";
225+ HEADER_SEARCH_PATHS = "$(SRCROOT)/../.. /react-native/React/**";
226226 OTHER_LDFLAGS = "-ObjC";
227227 PRODUCT_NAME = "$(TARGET_NAME)";
228228 SKIP_INSTALL = YES;
Original file line number Diff line number Diff line change 11{
22 "name" : " react-native-geocoder" ,
3- "version" : " 0.3 .1" ,
3+ "version" : " 0.4 .1" ,
44 "description" : " react native geocoding and reverse geocoding" ,
55 "main" : " index.js" ,
66 "scripts" : {
You can’t perform that action at this time.
0 commit comments