@nextgis/geocoder 2.5.0 → 3.0.0-alpha.1
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/lib/geocoder.cjs.js +53 -64
- package/lib/geocoder.cjs.js.map +1 -1
- package/lib/geocoder.cjs.prod.js +1 -1
- package/lib/geocoder.cjs.prod.js.map +1 -1
- package/lib/geocoder.esm-browser.js +446 -651
- package/lib/geocoder.esm-browser.js.map +1 -1
- package/lib/geocoder.esm-browser.prod.js +1 -1
- package/lib/geocoder.esm-browser.prod.js.map +1 -1
- package/lib/geocoder.esm-bundler.js +53 -64
- package/lib/geocoder.esm-bundler.js.map +1 -1
- package/lib/geocoder.esm-bundler.prod.js +1 -1
- package/lib/geocoder.esm-bundler.prod.js.map +1 -1
- package/lib/geocoder.global.js +446 -651
- package/lib/geocoder.global.js.map +1 -1
- package/lib/geocoder.global.prod.js +1 -1
- package/lib/geocoder.global.prod.js.map +1 -1
- package/lib/index.d.ts +6 -7
- package/package.json +7 -7
package/lib/index.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import CancelablePromise from '@nextgis/cancelable-promise';
|
|
2
1
|
import { LngLatBoundsArray, LngLatArray } from '@nextgis/utils';
|
|
3
2
|
import { GeoJsonObject } from 'geojson';
|
|
4
3
|
import NgwConnector, { FeatureItem, ResourceItem, NgwConnectorOptions } from '@nextgis/ngw-connector';
|
|
@@ -85,7 +84,7 @@ interface SearchItem {
|
|
|
85
84
|
/**
|
|
86
85
|
* An optional function that can be called to retrieve detailed result for this search item.
|
|
87
86
|
*/
|
|
88
|
-
result?: () =>
|
|
87
|
+
result?: () => Promise<ResultItem>;
|
|
89
88
|
}
|
|
90
89
|
|
|
91
90
|
/**
|
|
@@ -111,7 +110,7 @@ declare abstract class BaseGeocoder<O extends Record<string, any> = Record<strin
|
|
|
111
110
|
* @param item - The search item to get detailed result for.
|
|
112
111
|
* @returns A promise that resolves to the detailed result.
|
|
113
112
|
*/
|
|
114
|
-
abstract result(item: SearchItem):
|
|
113
|
+
abstract result(item: SearchItem): Promise<any>;
|
|
115
114
|
/**
|
|
116
115
|
* Method for reverse geocoding.
|
|
117
116
|
* Takes coordinates and returns the corresponding address or location information.
|
|
@@ -144,7 +143,7 @@ declare class Geocoder extends BaseGeocoder<GeocoderOptions> {
|
|
|
144
143
|
constructor(options: GeocoderOptions);
|
|
145
144
|
abort(): void;
|
|
146
145
|
search(query: string): AsyncGenerator<SearchItem, void, unknown>;
|
|
147
|
-
result(item: SearchItem):
|
|
146
|
+
result(item: SearchItem): Promise<any>;
|
|
148
147
|
reverse(coordinates: LngLatArray): AsyncGenerator<SearchItem, void, unknown>;
|
|
149
148
|
/**
|
|
150
149
|
* Returns the first reverse geocoding result for given coordinates from any provider.
|
|
@@ -205,7 +204,7 @@ declare class NgwProvider extends BaseProvider<NgwProviderOptions> {
|
|
|
205
204
|
constructor(options: NgwProviderOptions);
|
|
206
205
|
abort(): void;
|
|
207
206
|
search(query: string): AsyncGenerator<NgwSearchItem, void, unknown>;
|
|
208
|
-
result(item: NgwSearchItem):
|
|
207
|
+
result(item: NgwSearchItem): Promise<ResultItem>;
|
|
209
208
|
reverse(coordinates: LngLatArray): AsyncGenerator<SearchItem, void, unknown>;
|
|
210
209
|
private _makeSignal;
|
|
211
210
|
private _items;
|
|
@@ -213,11 +212,11 @@ declare class NgwProvider extends BaseProvider<NgwProviderOptions> {
|
|
|
213
212
|
|
|
214
213
|
declare class NominatimProvider extends BaseProvider {
|
|
215
214
|
searchUrl: string;
|
|
216
|
-
private
|
|
215
|
+
private _abort;
|
|
217
216
|
constructor(options?: BaseProviderOptions);
|
|
218
217
|
abort(): void;
|
|
219
218
|
search(val: string): AsyncGenerator<SearchItem, void, unknown>;
|
|
220
|
-
result(model: SearchItem):
|
|
219
|
+
result(model: SearchItem): Promise<ResultItem>;
|
|
221
220
|
reverse(coordinates: LngLatArray): AsyncGenerator<SearchItem, void, unknown>;
|
|
222
221
|
}
|
|
223
222
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nextgis/geocoder",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0-alpha.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "lib/geocoder.esm-bundler.js",
|
|
@@ -8,16 +8,16 @@
|
|
|
8
8
|
"jsdelivr": "lib/geocoder.global.prod.js",
|
|
9
9
|
"types": "lib/index.d.ts",
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@nextgis/cancelable-promise": "^
|
|
12
|
-
"@nextgis/ngw-connector": "^
|
|
13
|
-
"@nextgis/ngw-kit": "^
|
|
14
|
-
"@nextgis/utils": "^
|
|
11
|
+
"@nextgis/cancelable-promise": "^3.0.0-alpha.1",
|
|
12
|
+
"@nextgis/ngw-connector": "^3.0.0-alpha.1",
|
|
13
|
+
"@nextgis/ngw-kit": "^3.0.0-alpha.1",
|
|
14
|
+
"@nextgis/utils": "^3.0.0-alpha.1",
|
|
15
15
|
"@types/events": "^3.0.0",
|
|
16
16
|
"@types/geojson": "^7946.0.14",
|
|
17
17
|
"events": "*"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
|
-
"@nextgis/build-tools": "^
|
|
20
|
+
"@nextgis/build-tools": "^3.0.0-alpha.1"
|
|
21
21
|
},
|
|
22
22
|
"buildOptions": {
|
|
23
23
|
"name": "Geocoder",
|
|
@@ -53,5 +53,5 @@
|
|
|
53
53
|
"bugs": {
|
|
54
54
|
"url": "https://github.com/nextgis/nextgis_frontend/issues"
|
|
55
55
|
},
|
|
56
|
-
"gitHead": "
|
|
56
|
+
"gitHead": "407035f12a90263cea5a2a93a06512e0b5680a76"
|
|
57
57
|
}
|