@capgo/nativegeocoder 6.1.32 → 7.1.0

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.
@@ -11,7 +11,7 @@ Pod::Spec.new do |s|
11
11
  s.author = package['author']
12
12
  s.source = { :git => package['repository']['url'], :tag => s.version.to_s }
13
13
  s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}'
14
- s.ios.deployment_target = '13.0'
14
+ s.ios.deployment_target = '14.0'
15
15
  s.dependency 'Capacitor'
16
16
  s.swift_version = '5.1'
17
17
  end
package/README.md CHANGED
@@ -66,7 +66,7 @@ The return data is limited to the data available from the native API on the devi
66
66
  ### reverseGeocode(...)
67
67
 
68
68
  ```typescript
69
- reverseGeocode(options: ReverseOptions) => any
69
+ reverseGeocode(options: ReverseOptions) => Promise<{ addresses: Address[]; }>
70
70
  ```
71
71
 
72
72
  Convert latitude and longitude to an address
@@ -75,7 +75,7 @@ Convert latitude and longitude to an address
75
75
  | ------------- | --------------------------------------------------------- |
76
76
  | **`options`** | <code><a href="#reverseoptions">ReverseOptions</a></code> |
77
77
 
78
- **Returns:** <code>any</code>
78
+ **Returns:** <code>Promise&lt;{ addresses: Address[]; }&gt;</code>
79
79
 
80
80
  **Since:** 0.0.1
81
81
 
@@ -85,7 +85,7 @@ Convert latitude and longitude to an address
85
85
  ### forwardGeocode(...)
86
86
 
87
87
  ```typescript
88
- forwardGeocode(options: ForwardOptions) => any
88
+ forwardGeocode(options: ForwardOptions) => Promise<{ addresses: Address[]; }>
89
89
  ```
90
90
 
91
91
  Convert an address to latitude and longitude
@@ -94,7 +94,7 @@ Convert an address to latitude and longitude
94
94
  | ------------- | --------------------------------------------------------- |
95
95
  | **`options`** | <code><a href="#forwardoptions">ForwardOptions</a></code> |
96
96
 
97
- **Returns:** <code>any</code>
97
+ **Returns:** <code>Promise&lt;{ addresses: Address[]; }&gt;</code>
98
98
 
99
99
  **Since:** 0.0.1
100
100
 
@@ -104,6 +104,24 @@ Convert an address to latitude and longitude
104
104
  ### Interfaces
105
105
 
106
106
 
107
+ #### Address
108
+
109
+ | Prop | Type |
110
+ | --------------------------- | --------------------- |
111
+ | **`latitude`** | <code>number</code> |
112
+ | **`longitude`** | <code>number</code> |
113
+ | **`countryCode`** | <code>string</code> |
114
+ | **`countryName`** | <code>string</code> |
115
+ | **`postalCode`** | <code>string</code> |
116
+ | **`administrativeArea`** | <code>string</code> |
117
+ | **`subAdministrativeArea`** | <code>string</code> |
118
+ | **`locality`** | <code>string</code> |
119
+ | **`subLocality`** | <code>string</code> |
120
+ | **`thoroughfare`** | <code>string</code> |
121
+ | **`subThoroughfare`** | <code>string</code> |
122
+ | **`areasOfInterest`** | <code>string[]</code> |
123
+
124
+
107
125
  #### ReverseOptions
108
126
 
109
127
  | Prop | Type | Description |
@@ -117,24 +135,6 @@ Convert an address to latitude and longitude
117
135
  | **`resultType`** | <code>string</code> | Only used for web platform to use google api |
118
136
 
119
137
 
120
- #### Address
121
-
122
- | Prop | Type |
123
- | --------------------------- | ------------------- |
124
- | **`latitude`** | <code>number</code> |
125
- | **`longitude`** | <code>number</code> |
126
- | **`countryCode`** | <code>string</code> |
127
- | **`countryName`** | <code>string</code> |
128
- | **`postalCode`** | <code>string</code> |
129
- | **`administrativeArea`** | <code>string</code> |
130
- | **`subAdministrativeArea`** | <code>string</code> |
131
- | **`locality`** | <code>string</code> |
132
- | **`subLocality`** | <code>string</code> |
133
- | **`thoroughfare`** | <code>string</code> |
134
- | **`subThoroughfare`** | <code>string</code> |
135
- | **`areasOfInterest`** | <code>{}</code> |
136
-
137
-
138
138
  #### ForwardOptions
139
139
 
140
140
  | Prop | Type | Description |
@@ -1,8 +1,8 @@
1
1
  ext {
2
2
  junitVersion = project.hasProperty('junitVersion') ? rootProject.ext.junitVersion : '4.13.2'
3
- androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.1.5'
4
- androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.5.1'
5
- androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.6.1'
3
+ androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.2.1'
4
+ androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.6.1'
5
+ androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.7.0'
6
6
  }
7
7
 
8
8
  buildscript {
@@ -11,7 +11,7 @@ buildscript {
11
11
  google()
12
12
  }
13
13
  dependencies {
14
- classpath 'com.android.tools.build:gradle:8.6.1'
14
+ classpath 'com.android.tools.build:gradle:8.7.2'
15
15
  }
16
16
  }
17
17
 
@@ -19,10 +19,10 @@ apply plugin: 'com.android.library'
19
19
 
20
20
  android {
21
21
  namespace "ee.forgr.capacitor_nativegeocoder"
22
- compileSdk project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 34
22
+ compileSdk project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 35
23
23
  defaultConfig {
24
- minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 22
25
- targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 34
24
+ minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 23
25
+ targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 35
26
26
  versionCode 1
27
27
  versionName "1.0"
28
28
  testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
@@ -37,8 +37,8 @@ android {
37
37
  abortOnError false
38
38
  }
39
39
  compileOptions {
40
- sourceCompatibility JavaVersion.VERSION_17
41
- targetCompatibility JavaVersion.VERSION_17
40
+ sourceCompatibility JavaVersion.VERSION_21
41
+ targetCompatibility JavaVersion.VERSION_21
42
42
  }
43
43
  }
44
44
 
package/dist/docs.json CHANGED
@@ -7,7 +7,7 @@
7
7
  "methods": [
8
8
  {
9
9
  "name": "reverseGeocode",
10
- "signature": "(options: ReverseOptions) => any",
10
+ "signature": "(options: ReverseOptions) => Promise<{ addresses: Address[]; }>",
11
11
  "parameters": [
12
12
  {
13
13
  "name": "options",
@@ -15,7 +15,7 @@
15
15
  "type": "ReverseOptions"
16
16
  }
17
17
  ],
18
- "returns": "any",
18
+ "returns": "Promise<{ addresses: Address[]; }>",
19
19
  "tags": [
20
20
  {
21
21
  "name": "param",
@@ -36,14 +36,14 @@
36
36
  ],
37
37
  "docs": "Convert latitude and longitude to an address",
38
38
  "complexTypes": [
39
- "ReverseOptions",
40
- "Address"
39
+ "Address",
40
+ "ReverseOptions"
41
41
  ],
42
42
  "slug": "reversegeocode"
43
43
  },
44
44
  {
45
45
  "name": "forwardGeocode",
46
- "signature": "(options: ForwardOptions) => any",
46
+ "signature": "(options: ForwardOptions) => Promise<{ addresses: Address[]; }>",
47
47
  "parameters": [
48
48
  {
49
49
  "name": "options",
@@ -51,7 +51,7 @@
51
51
  "type": "ForwardOptions"
52
52
  }
53
53
  ],
54
- "returns": "any",
54
+ "returns": "Promise<{ addresses: Address[]; }>",
55
55
  "tags": [
56
56
  {
57
57
  "name": "returns",
@@ -68,8 +68,8 @@
68
68
  ],
69
69
  "docs": "Convert an address to latitude and longitude",
70
70
  "complexTypes": [
71
- "ForwardOptions",
72
- "Address"
71
+ "Address",
72
+ "ForwardOptions"
73
73
  ],
74
74
  "slug": "forwardgeocode"
75
75
  }
@@ -77,64 +77,6 @@
77
77
  "properties": []
78
78
  },
79
79
  "interfaces": [
80
- {
81
- "name": "ReverseOptions",
82
- "slug": "reverseoptions",
83
- "docs": "",
84
- "tags": [],
85
- "methods": [],
86
- "properties": [
87
- {
88
- "name": "latitude",
89
- "tags": [],
90
- "docs": "latitude is a number representing the latitude of the location.",
91
- "complexTypes": [],
92
- "type": "number"
93
- },
94
- {
95
- "name": "longitude",
96
- "tags": [],
97
- "docs": "longitude is a number representing the longitude of the location.",
98
- "complexTypes": [],
99
- "type": "number"
100
- },
101
- {
102
- "name": "useLocale",
103
- "tags": [],
104
- "docs": "Localise the results to the given locale.",
105
- "complexTypes": [],
106
- "type": "boolean | undefined"
107
- },
108
- {
109
- "name": "defaultLocale",
110
- "tags": [],
111
- "docs": "locale is a string in the format of language_country, for example en_US.",
112
- "complexTypes": [],
113
- "type": "string | undefined"
114
- },
115
- {
116
- "name": "maxResults",
117
- "tags": [],
118
- "docs": "Max number of results to return.",
119
- "complexTypes": [],
120
- "type": "number | undefined"
121
- },
122
- {
123
- "name": "apiKey",
124
- "tags": [],
125
- "docs": "Only used for web platform to use google api",
126
- "complexTypes": [],
127
- "type": "string | undefined"
128
- },
129
- {
130
- "name": "resultType",
131
- "tags": [],
132
- "docs": "Only used for web platform to use google api",
133
- "complexTypes": [],
134
- "type": "string | undefined"
135
- }
136
- ]
137
- },
138
80
  {
139
81
  "name": "Address",
140
82
  "slug": "address",
@@ -224,7 +166,65 @@
224
166
  "tags": [],
225
167
  "docs": "",
226
168
  "complexTypes": [],
227
- "type": "{}"
169
+ "type": "string[]"
170
+ }
171
+ ]
172
+ },
173
+ {
174
+ "name": "ReverseOptions",
175
+ "slug": "reverseoptions",
176
+ "docs": "",
177
+ "tags": [],
178
+ "methods": [],
179
+ "properties": [
180
+ {
181
+ "name": "latitude",
182
+ "tags": [],
183
+ "docs": "latitude is a number representing the latitude of the location.",
184
+ "complexTypes": [],
185
+ "type": "number"
186
+ },
187
+ {
188
+ "name": "longitude",
189
+ "tags": [],
190
+ "docs": "longitude is a number representing the longitude of the location.",
191
+ "complexTypes": [],
192
+ "type": "number"
193
+ },
194
+ {
195
+ "name": "useLocale",
196
+ "tags": [],
197
+ "docs": "Localise the results to the given locale.",
198
+ "complexTypes": [],
199
+ "type": "boolean | undefined"
200
+ },
201
+ {
202
+ "name": "defaultLocale",
203
+ "tags": [],
204
+ "docs": "locale is a string in the format of language_country, for example en_US.",
205
+ "complexTypes": [],
206
+ "type": "string | undefined"
207
+ },
208
+ {
209
+ "name": "maxResults",
210
+ "tags": [],
211
+ "docs": "Max number of results to return.",
212
+ "complexTypes": [],
213
+ "type": "number | undefined"
214
+ },
215
+ {
216
+ "name": "apiKey",
217
+ "tags": [],
218
+ "docs": "Only used for web platform to use google api",
219
+ "complexTypes": [],
220
+ "type": "string | undefined"
221
+ },
222
+ {
223
+ "name": "resultType",
224
+ "tags": [],
225
+ "docs": "Only used for web platform to use google api",
226
+ "complexTypes": [],
227
+ "type": "string | undefined"
228
228
  }
229
229
  ]
230
230
  },
@@ -7,6 +7,12 @@ import Capacitor
7
7
  */
8
8
  @objc(NativeGeocoderPlugin)
9
9
  public class NativeGeocoderPlugin: CAPPlugin {
10
+ public let identifier = "NativeGeocoderPlugin"
11
+ public let jsName = "NativeGeocoder"
12
+ public let pluginMethods: [CAPPluginMethod] = [
13
+ CAPPluginMethod(name: "reverseGeocode", returnType: CAPPluginReturnPromise),
14
+ CAPPluginMethod(name: "forwardGeocode", returnType: CAPPluginReturnPromise)
15
+ ]
10
16
  private let implementation = NativeGeocoder()
11
17
 
12
18
  @objc func reverseGeocode(_ call: CAPPluginCall) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capgo/nativegeocoder",
3
- "version": "6.1.32",
3
+ "version": "7.1.0",
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",
@@ -13,6 +13,8 @@
13
13
  "ios/Plugin/",
14
14
  "CapgoNativegeocoder.podspec"
15
15
  ],
16
+ "author": "Martin Donadieu <martin@capgo.app>",
17
+ "license": "MIT",
16
18
  "repository": {
17
19
  "type": "git",
18
20
  "url": "git+https://github.com/Cap-go/capacitor-nativegeocoder.git"
@@ -29,7 +31,7 @@
29
31
  ],
30
32
  "scripts": {
31
33
  "verify": "npm run verify:ios && npm run verify:android && npm run verify:web",
32
- "verify:ios": "cd ios && pod install && xcodebuild -workspace Plugin.xcworkspace -scheme Plugin && cd ..",
34
+ "verify:ios": "cd ios && pod install && xcodebuild -workspace Plugin.xcworkspace -sdk iphoneos -scheme Plugin && cd ..",
33
35
  "verify:android": "cd android && ./gradlew clean build test && cd ..",
34
36
  "verify:web": "npm run build",
35
37
  "lint": "npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint",
@@ -41,34 +43,33 @@
41
43
  "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs",
42
44
  "clean": "rimraf ./dist",
43
45
  "watch": "tsc --watch",
44
- "prepublishOnly": "npm run build",
45
- "prepare": "husky install"
46
+ "prepublishOnly": "npm run build"
46
47
  },
47
- "author": "Martin Donadieu <martindonadieu@gmail.com>",
48
- "license": "MIT",
49
48
  "devDependencies": {
50
- "@capacitor/android": "^6.0.0",
51
- "@capacitor/cli": "^6.0.0",
52
- "@capacitor/core": "^6.0.0",
53
- "@capacitor/docgen": "^0.2.2",
54
- "@capacitor/ios": "^6.0.0",
55
- "@ionic/eslint-config": "^0.3.0",
49
+ "@capacitor/android": "^7.0.0",
50
+ "@capacitor/cli": "^7.0.0",
51
+ "@capacitor/core": "^7.0.0",
52
+ "@capacitor/docgen": "^0.3.0",
53
+ "@capacitor/ios": "^7.0.0",
54
+ "@ionic/eslint-config": "^0.4.0",
56
55
  "@ionic/prettier-config": "^4.0.0",
57
- "@ionic/swiftlint-config": "^1.1.2",
58
- "@typescript-eslint/eslint-plugin": "^7.8.0",
59
- "@typescript-eslint/parser": "^7.8.0",
60
- "eslint": "^9.1.1",
61
- "eslint-plugin-import": "^2.29.1",
62
- "husky": "^9.0.11",
63
- "prettier": "^3.2.5",
64
- "prettier-plugin-java": "^2.6.0",
65
- "rimraf": "^5.0.5",
66
- "rollup": "^4.17.1",
67
- "swiftlint": "^1.0.2",
68
- "typescript": "^5.4.5"
56
+ "@ionic/swiftlint-config": "^2.0.0",
57
+ "@types/node": "^22.13.1",
58
+ "eslint": "^8.57.0",
59
+ "eslint-plugin-import": "^2.31.0",
60
+ "husky": "^9.1.7",
61
+ "prettier": "^3.4.2",
62
+ "prettier-plugin-java": "^2.6.7",
63
+ "rimraf": "^6.0.1",
64
+ "rollup": "^4.34.6",
65
+ "swiftlint": "^2.0.0",
66
+ "typescript": "^5.7.3"
69
67
  },
70
68
  "peerDependencies": {
71
- "@capacitor/core": "^6.0.0"
69
+ "@capacitor/core": ">=7.0.0"
70
+ },
71
+ "eslintConfig": {
72
+ "extends": "@ionic/eslint-config/recommended"
72
73
  },
73
74
  "prettier": "@ionic/prettier-config",
74
75
  "swiftlint": "@ionic/swiftlint-config",