@capgo/nativegeocoder 0.1.3 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -9,6 +9,12 @@ npm install @capgo/nativegeocoder
9
9
  npx cap sync
10
10
  ```
11
11
 
12
+ then import this into your code:
13
+
14
+ ```javascript
15
+ import { NativeGeocoder } from '@capgo/nativegeocoder';
16
+ ```
17
+
12
18
  ## iOS
13
19
 
14
20
  Apple requires privacy descriptions to be specified in `Info.plist` for location information:
@@ -10,14 +10,6 @@ public class NativeGeocoderPlugin: CAPPlugin {
10
10
  private let implementation = NativeGeocoder()
11
11
 
12
12
  @objc func reverseGeocode(_ call: CAPPluginCall) {
13
- guard let addressString = call.getString("addressString") else {
14
- call.reject("Missing addressString")
15
- return
16
- }
17
- implementation.reverseGeocode(addressString: addressString, call: call)
18
- }
19
-
20
- @objc func forwardGeocode(_ call: CAPPluginCall) {
21
13
  guard let latitude = call.getDouble("latitude") else {
22
14
  call.reject("Missing latitude")
23
15
  return
@@ -26,6 +18,14 @@ public class NativeGeocoderPlugin: CAPPlugin {
26
18
  call.reject("Missing longitude")
27
19
  return
28
20
  }
29
- implementation.forwardGeocode(latitude: latitude, longitude: longitude, call: call)
21
+ implementation.reverseGeocode(latitude: latitude, longitude: longitude, call: call)
22
+ }
23
+
24
+ @objc func forwardGeocode(_ call: CAPPluginCall) {
25
+ guard let addressString = call.getString("addressString") else {
26
+ call.reject("Missing addressString")
27
+ return
28
+ }
29
+ implementation.forwardGeocode(address: addressString, call: call)
30
30
  }
31
31
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capgo/nativegeocoder",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "Capacitor plugin for native forward and reverse geocoding",
5
5
  "main": "dist/plugin.cjs.js",
6
6
  "module": "dist/esm/index.js",