Skip to content
This repository was archived by the owner on Sep 4, 2021. It is now read-only.

Commit 28b46be

Browse files
committed
v0.4.1
1 parent 48ac606 commit 28b46be

File tree

4 files changed

+19
-11
lines changed

4 files changed

+19
-11
lines changed

.npmignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ img
22
example
33
e2e
44
test
5+
circle.yml
6+
.npmignore
57

68
# OSX
79
#

README.md

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ dependencies {
4040
```java
4141
import 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
6969
Geocoder.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
7575
Geocoder.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
9197
both iOS and Android will return the following object:
9298

9399
```js

ios/RNGeocoder.xcodeproj/project.pbxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@
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;
@@ -222,7 +222,7 @@
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;

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
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": {

0 commit comments

Comments
 (0)