@nextgis/geocoder 3.0.0-alpha.9 → 3.0.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 +14 -13
- 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 +609 -530
- 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 +14 -13
- 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 +609 -530
- 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 +21 -19
- package/package.json +7 -7
package/lib/index.d.ts
CHANGED
|
@@ -1,22 +1,8 @@
|
|
|
1
1
|
import { LngLatBoundsArray, LngLatArray } from '@nextgis/utils';
|
|
2
2
|
import { GeoJsonObject } from 'geojson';
|
|
3
|
-
import NgwConnector, { FeatureItem,
|
|
3
|
+
import NgwConnector, { FeatureItem, NgwConnectorOptions } from '@nextgis/ngw-connector';
|
|
4
4
|
import { FetchNgwItemsOptions } from '@nextgis/ngw-kit';
|
|
5
|
-
|
|
6
|
-
interface ResultItem {
|
|
7
|
-
/**
|
|
8
|
-
* Display text of the result item.
|
|
9
|
-
*/
|
|
10
|
-
text: string;
|
|
11
|
-
/**
|
|
12
|
-
* Bounding box of the result item in [west, south, east, north] format.
|
|
13
|
-
*/
|
|
14
|
-
extent: LngLatBoundsArray;
|
|
15
|
-
/**
|
|
16
|
-
* Optional GeoJSON geometry associated with this result item.
|
|
17
|
-
*/
|
|
18
|
-
geom?: GeoJsonObject;
|
|
19
|
-
}
|
|
5
|
+
import { CompositeRead } from '@nextgisweb/resource/type/api';
|
|
20
6
|
|
|
21
7
|
/**
|
|
22
8
|
* Options for initializing a basic search provider.
|
|
@@ -52,6 +38,21 @@ declare abstract class BaseProvider<O extends BaseProviderOptions = BaseProvider
|
|
|
52
38
|
label?: string;
|
|
53
39
|
}
|
|
54
40
|
|
|
41
|
+
interface ResultItem {
|
|
42
|
+
/**
|
|
43
|
+
* Display text of the result item.
|
|
44
|
+
*/
|
|
45
|
+
text: string;
|
|
46
|
+
/**
|
|
47
|
+
* Bounding box of the result item in [west, south, east, north] format.
|
|
48
|
+
*/
|
|
49
|
+
extent: LngLatBoundsArray;
|
|
50
|
+
/**
|
|
51
|
+
* Optional GeoJSON geometry associated with this result item.
|
|
52
|
+
*/
|
|
53
|
+
geom?: GeoJsonObject;
|
|
54
|
+
}
|
|
55
|
+
|
|
55
56
|
interface SearchItem {
|
|
56
57
|
/**
|
|
57
58
|
* A dynamic property bucket for the `SearchItem`.
|
|
@@ -165,7 +166,7 @@ interface NgwSearchItem extends SearchItem {
|
|
|
165
166
|
/** The specific feature item from NGW */
|
|
166
167
|
item: FeatureItem;
|
|
167
168
|
/** The NGW resource item */
|
|
168
|
-
resourceItem:
|
|
169
|
+
resourceItem: CompositeRead;
|
|
169
170
|
}
|
|
170
171
|
/**
|
|
171
172
|
* Defines the structure for a rendered search item.
|
|
@@ -174,7 +175,7 @@ interface RenderSearchItem {
|
|
|
174
175
|
/** The specific feature item */
|
|
175
176
|
item: FeatureItem;
|
|
176
177
|
/** The NGW resource item */
|
|
177
|
-
resourceItem:
|
|
178
|
+
resourceItem: CompositeRead;
|
|
178
179
|
}
|
|
179
180
|
/**
|
|
180
181
|
* Options for searching within a NGW resource.
|
|
@@ -240,4 +241,5 @@ declare class NominatimProvider extends BaseProvider<NominatimProviderOptions> i
|
|
|
240
241
|
|
|
241
242
|
declare function create(options: GeocoderOptions): Geocoder;
|
|
242
243
|
|
|
243
|
-
export { BaseProvider,
|
|
244
|
+
export { BaseProvider, Geocoder, NgwProvider, NominatimProvider, create };
|
|
245
|
+
export type { BaseProviderOptions, GeocoderOptions, ResultItem, SearchItem };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nextgis/geocoder",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.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",
|
|
12
|
+
"@nextgis/ngw-connector": "3.0.1",
|
|
13
|
+
"@nextgis/ngw-kit": "3.0.1",
|
|
14
|
+
"@nextgis/utils": "3.0.0",
|
|
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"
|
|
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": "e84003edfc140d6eeb56ebcf9940adc4698fe22c"
|
|
57
57
|
}
|