@capgo/nativegeocoder 0.1.13 → 0.1.14

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
@@ -54,12 +54,16 @@ This API requires the following permissions be added to your `AndroidManifest.xm
54
54
  reverseGeocode(options: reverseOptions) => Promise<{ addresses: Adress[]; }>
55
55
  ```
56
56
 
57
+ Convert latitude and longitude to an address
58
+
57
59
  | Param | Type |
58
60
  | ------------- | --------------------------------------------------------- |
59
61
  | **`options`** | <code><a href="#reverseoptions">reverseOptions</a></code> |
60
62
 
61
63
  **Returns:** <code>Promise&lt;{ addresses: Adress[]; }&gt;</code>
62
64
 
65
+ **Since:** 0.0.1
66
+
63
67
  --------------------
64
68
 
65
69
 
@@ -69,12 +73,16 @@ reverseGeocode(options: reverseOptions) => Promise<{ addresses: Adress[]; }>
69
73
  forwardGeocode(options: ForwardOptions) => Promise<{ addresses: Adress[]; }>
70
74
  ```
71
75
 
76
+ Convert an address to latitude and longitude
77
+
72
78
  | Param | Type |
73
79
  | ------------- | --------------------------------------------------------- |
74
80
  | **`options`** | <code><a href="#forwardoptions">ForwardOptions</a></code> |
75
81
 
76
82
  **Returns:** <code>Promise&lt;{ addresses: Adress[]; }&gt;</code>
77
83
 
84
+ **Since:** 0.0.1
85
+
78
86
  --------------------
79
87
 
80
88
 
@@ -101,16 +109,24 @@ forwardGeocode(options: ForwardOptions) => Promise<{ addresses: Adress[]; }>
101
109
 
102
110
  #### reverseOptions
103
111
 
104
- | Prop | Type |
105
- | --------------- | ------------------- |
106
- | **`latitude`** | <code>number</code> |
107
- | **`longitude`** | <code>number</code> |
112
+ | Prop | Type | Description |
113
+ | ------------------- | -------------------- | ------------------------------------------------------------------------ |
114
+ | **`latitude`** | <code>number</code> | latitude is a number representing the latitude of the location. |
115
+ | **`longitude`** | <code>number</code> | longitude is a number representing the longitude of the location. |
116
+ | **`useLocale`** | <code>boolean</code> | Localise the results to the given locale. |
117
+ | **`defaultLocale`** | <code>string</code> | locale is a string in the format of language_country, for example en_US. |
118
+ | **`maxResults`** | <code>number</code> | Max number of results to return. |
119
+ | **`apiKey`** | <code>string</code> | Only used for web platform to use google api |
108
120
 
109
121
 
110
122
  #### ForwardOptions
111
123
 
112
- | Prop | Type |
113
- | ------------------- | ------------------- |
114
- | **`addressString`** | <code>string</code> |
124
+ | Prop | Type | Description |
125
+ | ------------------- | -------------------- | ------------------------------------------------------------------------ |
126
+ | **`addressString`** | <code>string</code> | address is a string of the address to be geocoded. |
127
+ | **`useLocale`** | <code>boolean</code> | Localise the results to the given locale. |
128
+ | **`defaultLocale`** | <code>string</code> | locale is a string in the format of language_country, for example en_US. |
129
+ | **`maxResults`** | <code>number</code> | Max number of results to return. |
130
+ | **`apiKey`** | <code>string</code> | Only used for web platform to use google api |
115
131
 
116
132
  </docgen-api>
package/dist/docs.json CHANGED
@@ -16,8 +16,25 @@
16
16
  }
17
17
  ],
18
18
  "returns": "Promise<{ addresses: Adress[]; }>",
19
- "tags": [],
20
- "docs": "",
19
+ "tags": [
20
+ {
21
+ "name": "param",
22
+ "text": "id The bundle id to delete (note, this is the bundle id, NOT the version name)"
23
+ },
24
+ {
25
+ "name": "returns",
26
+ "text": "an Promise with the list of addresses according to maxResults"
27
+ },
28
+ {
29
+ "name": "throws",
30
+ "text": "An error if the something went wrong"
31
+ },
32
+ {
33
+ "name": "since",
34
+ "text": "0.0.1"
35
+ }
36
+ ],
37
+ "docs": "Convert latitude and longitude to an address",
21
38
  "complexTypes": [
22
39
  "Adress",
23
40
  "reverseOptions"
@@ -35,8 +52,21 @@
35
52
  }
36
53
  ],
37
54
  "returns": "Promise<{ addresses: Adress[]; }>",
38
- "tags": [],
39
- "docs": "",
55
+ "tags": [
56
+ {
57
+ "name": "returns",
58
+ "text": "an Promise with the list of addresses according to maxResults"
59
+ },
60
+ {
61
+ "name": "throws",
62
+ "text": "An error if the something went wrong"
63
+ },
64
+ {
65
+ "name": "since",
66
+ "text": "0.0.1"
67
+ }
68
+ ],
69
+ "docs": "Convert an address to latitude and longitude",
40
70
  "complexTypes": [
41
71
  "Adress",
42
72
  "ForwardOptions"
@@ -150,16 +180,44 @@
150
180
  {
151
181
  "name": "latitude",
152
182
  "tags": [],
153
- "docs": "",
183
+ "docs": "latitude is a number representing the latitude of the location.",
154
184
  "complexTypes": [],
155
185
  "type": "number"
156
186
  },
157
187
  {
158
188
  "name": "longitude",
159
189
  "tags": [],
160
- "docs": "",
190
+ "docs": "longitude is a number representing the longitude of the location.",
161
191
  "complexTypes": [],
162
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"
163
221
  }
164
222
  ]
165
223
  },
@@ -173,9 +231,37 @@
173
231
  {
174
232
  "name": "addressString",
175
233
  "tags": [],
176
- "docs": "",
234
+ "docs": "address is a string of the address to be geocoded.",
177
235
  "complexTypes": [],
178
236
  "type": "string"
237
+ },
238
+ {
239
+ "name": "useLocale",
240
+ "tags": [],
241
+ "docs": "Localise the results to the given locale.",
242
+ "complexTypes": [],
243
+ "type": "boolean | undefined"
244
+ },
245
+ {
246
+ "name": "defaultLocale",
247
+ "tags": [],
248
+ "docs": "locale is a string in the format of language_country, for example en_US.",
249
+ "complexTypes": [],
250
+ "type": "string | undefined"
251
+ },
252
+ {
253
+ "name": "maxResults",
254
+ "tags": [],
255
+ "docs": "Max number of results to return.",
256
+ "complexTypes": [],
257
+ "type": "number | undefined"
258
+ },
259
+ {
260
+ "name": "apiKey",
261
+ "tags": [],
262
+ "docs": "Only used for web platform to use google api",
263
+ "complexTypes": [],
264
+ "type": "string | undefined"
179
265
  }
180
266
  ]
181
267
  }
@@ -12,23 +12,73 @@ export interface Adress {
12
12
  areasOfInterest: string[];
13
13
  formatted_address: string;
14
14
  }
15
- export interface baseOption {
15
+ export interface ForwardOptions {
16
+ /**
17
+ * address is a string of the address to be geocoded.
18
+ */
19
+ addressString: string;
20
+ /**
21
+ * Localise the results to the given locale.
22
+ */
16
23
  useLocale?: boolean;
24
+ /**
25
+ * locale is a string in the format of language_country, for example en_US.
26
+ */
17
27
  defaultLocale?: string;
28
+ /**
29
+ * Max number of results to return.
30
+ */
18
31
  maxResults?: number;
32
+ /**
33
+ * Only used for web platform to use google api
34
+ */
19
35
  apiKey?: string;
20
36
  }
21
- export interface ForwardOptions extends baseOption {
22
- addressString: string;
23
- }
24
- export interface reverseOptions extends baseOption {
37
+ export interface reverseOptions {
38
+ /**
39
+ * latitude is a number representing the latitude of the location.
40
+ */
25
41
  latitude: number;
42
+ /**
43
+ * longitude is a number representing the longitude of the location.
44
+ */
26
45
  longitude: number;
46
+ /**
47
+ * Localise the results to the given locale.
48
+ */
49
+ useLocale?: boolean;
50
+ /**
51
+ * locale is a string in the format of language_country, for example en_US.
52
+ */
53
+ defaultLocale?: string;
54
+ /**
55
+ * Max number of results to return.
56
+ */
57
+ maxResults?: number;
58
+ /**
59
+ * Only used for web platform to use google api
60
+ */
61
+ apiKey?: string;
27
62
  }
28
63
  export interface NativeGeocoderPlugin {
64
+ /**
65
+ * Convert latitude and longitude to an address
66
+ *
67
+ * @param id The bundle id to delete (note, this is the bundle id, NOT the version name)
68
+ * @returns {Promise<{addresses: Adress[]}>} an Promise with the list of addresses according to maxResults
69
+ * @throws An error if the something went wrong
70
+ * @since 0.0.1
71
+ */
29
72
  reverseGeocode(options: reverseOptions): Promise<{
30
73
  addresses: Adress[];
31
74
  }>;
75
+ /**
76
+ * Convert an address to latitude and longitude
77
+ *
78
+ * @returns {Promise<{addresses: Adress[]}>} an Promise with the list of addresses according to maxResults
79
+ * @throws An error if the something went wrong
80
+ * @since 0.0.1
81
+ */
32
82
  forwardGeocode(options: ForwardOptions): Promise<{
33
83
  addresses: Adress[];
34
84
  }>;
@@ -1 +1 @@
1
- {"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["export interface Adress {\n latitude:\tnumber\n longitude:\tnumber\n countryCode:\tstring\n postalCode:\tstring\n administrativeArea:\tstring\n subAdministrativeArea:\tstring\n locality:\tstring\n subLocality:\tstring\n thoroughfare:\tstring\n subThoroughfare:\tstring\n areasOfInterest:\tstring[]\n formatted_address: string\n}\n\nexport interface baseOption {\n /*\n * Localise the results to the given locale.\n */\n useLocale?:\tboolean\n /*\n * locale is a string in the format of language_country, for example en_US.\n */\n defaultLocale?:\tstring\n /*\n * Max number of results to return.\n */\n maxResults?:\tnumber\n /*\n * Only used for web platform to use google api\n */\n apiKey?:\tstring\n}\nexport interface ForwardOptions extends baseOption {\n /*\n * address is a string of the address to be geocoded.\n */\n addressString:\tstring\n}\nexport interface reverseOptions extends baseOption {\n /*\n * latitude is a number representing the latitude of the location.\n */\n latitude:\tnumber\n /*\n * longitude is a number representing the longitude of the location.\n */\n longitude:\tnumber\n}\nexport interface NativeGeocoderPlugin {\n /*\n * Convert latitude and longitude to an address\n *\n * @param id The bundle id to delete (note, this is the bundle id, NOT the version name)\n * @returns {Promise<{addresses: Adress[]}>} an Promise with the list of addresses according to maxResults\n * @throws An error if the something went wrong\n * @since 0.0.1\n */\n reverseGeocode(options: reverseOptions): Promise<{ addresses:\tAdress[] }>;\n /*\n * Convert an address to latitude and longitude\n *\n * @returns {Promise<{addresses: Adress[]}>} an Promise with the list of addresses according to maxResults\n * @throws An error if the something went wrong\n * @since 0.0.1\n */\n forwardGeocode(options: ForwardOptions): Promise<{ addresses:\tAdress[] }>;\n}\n"]}
1
+ {"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["export interface Adress {\n latitude:\tnumber\n longitude:\tnumber\n countryCode:\tstring\n postalCode:\tstring\n administrativeArea:\tstring\n subAdministrativeArea:\tstring\n locality:\tstring\n subLocality:\tstring\n thoroughfare:\tstring\n subThoroughfare:\tstring\n areasOfInterest:\tstring[]\n formatted_address: string\n}\n\nexport interface ForwardOptions {\n /**\n * address is a string of the address to be geocoded.\n */\n addressString:\tstring\n /**\n * Localise the results to the given locale.\n */\n useLocale?:\tboolean\n /**\n * locale is a string in the format of language_country, for example en_US.\n */\n defaultLocale?:\tstring\n /**\n * Max number of results to return.\n */\n maxResults?:\tnumber\n /**\n * Only used for web platform to use google api\n */\n apiKey?:\tstring\n}\nexport interface reverseOptions {\n /**\n * latitude is a number representing the latitude of the location.\n */\n latitude:\tnumber\n /**\n * longitude is a number representing the longitude of the location.\n */\n longitude:\tnumber\n /**\n * Localise the results to the given locale.\n */\n useLocale?:\tboolean\n /**\n * locale is a string in the format of language_country, for example en_US.\n */\n defaultLocale?:\tstring\n /**\n * Max number of results to return.\n */\n maxResults?:\tnumber\n /**\n * Only used for web platform to use google api\n */\n apiKey?:\tstring\n}\nexport interface NativeGeocoderPlugin {\n /**\n * Convert latitude and longitude to an address\n *\n * @param id The bundle id to delete (note, this is the bundle id, NOT the version name)\n * @returns {Promise<{addresses: Adress[]}>} an Promise with the list of addresses according to maxResults\n * @throws An error if the something went wrong\n * @since 0.0.1\n */\n reverseGeocode(options: reverseOptions): Promise<{ addresses:\tAdress[] }>;\n /**\n * Convert an address to latitude and longitude\n *\n * @returns {Promise<{addresses: Adress[]}>} an Promise with the list of addresses according to maxResults\n * @throws An error if the something went wrong\n * @since 0.0.1\n */\n forwardGeocode(options: ForwardOptions): Promise<{ addresses:\tAdress[] }>;\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capgo/nativegeocoder",
3
- "version": "0.1.13",
3
+ "version": "0.1.14",
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",