@maptiler/geocoding-control 3.0.0-rc.2 → 3.0.0-rc.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 +0 -2
- package/dist/index.js +1 -1
- package/dist/index.umd.js +9 -9
- package/dist/index.umd.js.map +1 -1
- package/dist/leaflet.public.js +25 -22
- package/dist/leaflet.public.js.map +1 -1
- package/dist/leaflet.public.umd.js +6 -6
- package/dist/leaflet.public.umd.js.map +1 -1
- package/dist/maplibregl.js +40 -45
- package/dist/maplibregl.js.map +1 -1
- package/dist/maplibregl.umd.js +23 -23
- package/dist/maplibregl.umd.js.map +1 -1
- package/dist/maptilersdk.js +143 -122
- package/dist/maptilersdk.js.map +1 -1
- package/dist/maptilersdk.umd.js +45 -45
- package/dist/maptilersdk.umd.js.map +1 -1
- package/dist/openlayers.public.js +1283 -0
- package/dist/openlayers.public.js.map +1 -0
- package/dist/openlayers.public.umd.js +276 -0
- package/dist/openlayers.public.umd.js.map +1 -0
- package/dist/src/controls/base-control.d.ts +4 -0
- package/dist/src/controls/leaflet-control.d.ts +1 -0
- package/dist/src/controls/maplibregl-control.d.ts +1 -0
- package/dist/src/controls/maptilersdk-control.d.ts +7 -0
- package/dist/src/controls/maptilersdk-options.d.ts +10 -0
- package/dist/src/controls/openlayers-control.d.ts +1 -0
- package/package.json +6 -3
|
@@ -15,6 +15,7 @@ export declare class LeafletGeocodingControl extends EventedControl<LeafletGeoco
|
|
|
15
15
|
onAdd(map: LMap): HTMLElement;
|
|
16
16
|
/** @internal Not to be called directly */
|
|
17
17
|
onRemove(): void;
|
|
18
|
+
getOptions(): LeafletGeocodingControlOptions;
|
|
18
19
|
setOptions(options: LeafletGeocodingControlOptions): void;
|
|
19
20
|
setQuery(value: string): void;
|
|
20
21
|
submitQuery(value: string): void;
|
|
@@ -19,6 +19,7 @@ export declare class MaplibreglGeocodingControl extends Evented implements ICont
|
|
|
19
19
|
onAdd(map: MLMap): HTMLElement;
|
|
20
20
|
/** @internal Not to be called directly */
|
|
21
21
|
onRemove(): void;
|
|
22
|
+
getOptions(): MaplibreglGeocodingControlOptions;
|
|
22
23
|
setOptions(options: MaplibreglGeocodingControlOptions): void;
|
|
23
24
|
setQuery(value: string): void;
|
|
24
25
|
submitQuery(value: string): void;
|
|
@@ -1,7 +1,14 @@
|
|
|
1
|
+
import { Map as SDKMap } from '@maptiler/sdk';
|
|
1
2
|
import { GeocodingControlBase } from './base-control';
|
|
2
3
|
import { MaplibreglGeocodingControl } from './maplibregl-control';
|
|
3
4
|
import { MaptilerGeocodingControlOptions } from './maptilersdk-options';
|
|
4
5
|
export declare class MaptilerGeocodingControl extends MaplibreglGeocodingControl implements GeocodingControlBase<MaptilerGeocodingControlOptions> {
|
|
6
|
+
#private;
|
|
5
7
|
constructor(options?: MaptilerGeocodingControlOptions);
|
|
8
|
+
/** @internal Not to be called directly */
|
|
9
|
+
onAdd(map: SDKMap): HTMLElement;
|
|
10
|
+
/** @internal Not to be called directly */
|
|
11
|
+
onRemove(): void;
|
|
12
|
+
getOptions: () => MaptilerGeocodingControlOptions;
|
|
6
13
|
setOptions(options: MaptilerGeocodingControlOptions): void;
|
|
7
14
|
}
|
|
@@ -6,5 +6,15 @@ export type MaptilerGeocodingControlOptions = Omit<MaplibreglGeocodingControlOpt
|
|
|
6
6
|
* Default: The same API key as the connected map uses.
|
|
7
7
|
*/
|
|
8
8
|
apiKey?: string;
|
|
9
|
+
/**
|
|
10
|
+
* Specifies whether the geocoder runs with a session logic.
|
|
11
|
+
* A "session" is started at the initialization of the MapTiler SDK and finished when
|
|
12
|
+
* the browser page is being closed or refreshed.
|
|
13
|
+
* When this option is enabled, extra URL param `mtsid` is added to queries
|
|
14
|
+
* to the MapTiler Cloud API. This allows MapTiler to enable "session based billing".
|
|
15
|
+
*
|
|
16
|
+
* Default: `true`.
|
|
17
|
+
*/
|
|
18
|
+
session?: boolean;
|
|
9
19
|
};
|
|
10
20
|
export { DEFAULT_GEOMETRY_STYLE, RESULT_LAYER_FILL, RESULT_LAYER_LINE, RESULT_SOURCE, ZOOM_DEFAULTS, type FullGeometryStyle } from './maplibregl-options';
|
|
@@ -20,6 +20,7 @@ export declare class OpenLayersGeocodingControl extends Control implements Geoco
|
|
|
20
20
|
constructor(options?: OpenLayersGeocodingControlOptions);
|
|
21
21
|
/** @internal Not to be called directly */
|
|
22
22
|
setMap(map: OLMap | null): void;
|
|
23
|
+
getOptions(): OpenLayersGeocodingControlOptions;
|
|
23
24
|
setOptions(options: OpenLayersGeocodingControlOptions): void;
|
|
24
25
|
setQuery(value: string): void;
|
|
25
26
|
submitQuery(value: string): void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@maptiler/geocoding-control",
|
|
3
|
-
"version": "3.0.0-rc.
|
|
3
|
+
"version": "3.0.0-rc.4",
|
|
4
4
|
"description": "The Javascript & TypeScript Map Control component for MapTiler Geocoding service. Easy to be integrated into any JavaScript mapping application.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": {
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"scripts": {
|
|
32
32
|
"dev": "vite -c vite.config-dev.ts",
|
|
33
33
|
"make": "npm run clean && npm run build && npm run check-version",
|
|
34
|
-
"build": "npm run build:index && npm run build:index:umd && npm run build:maptilersdk && npm run build:maptilersdk:umd && npm run build:maplibregl && npm run build:maplibregl:umd && npm run build:leaflet && npm run build:leaflet:umd",
|
|
34
|
+
"build": "npm run build:index && npm run build:index:umd && npm run build:maptilersdk && npm run build:maptilersdk:umd && npm run build:maplibregl && npm run build:maplibregl:umd && npm run build:leaflet && npm run build:leaflet:umd && npm run build:openlayers && npm run build:openlayers:umd",
|
|
35
35
|
"build:index": "FLAVOUR=index vite build",
|
|
36
36
|
"build:index:umd": "FLAVOUR=index MODE=umd vite build",
|
|
37
37
|
"build:maptilersdk": "FLAVOUR=maptilersdk vite build",
|
|
@@ -40,6 +40,8 @@
|
|
|
40
40
|
"build:maplibregl:umd": "FLAVOUR=maplibregl MODE=umd vite build",
|
|
41
41
|
"build:leaflet": "FLAVOUR=leaflet vite build",
|
|
42
42
|
"build:leaflet:umd": "FLAVOUR=leaflet MODE=umd vite build",
|
|
43
|
+
"build:openlayers": "FLAVOUR=openlayers vite build",
|
|
44
|
+
"build:openlayers:umd": "FLAVOUR=openlayers MODE=umd vite build",
|
|
43
45
|
"check-version": "npm run check-version:leaflet-v1.5 && npm run check-version:leaflet-v1.7 && npm run check-version:leaflet-v1.9 && npm run check-version:leaflet-v2",
|
|
44
46
|
"check-version:leaflet-v1.5": "tsc -p tsconfig.leaflet-v1.5.json",
|
|
45
47
|
"check-version:leaflet-v1.7": "tsc -p tsconfig.leaflet-v1.7.json",
|
|
@@ -120,6 +122,7 @@
|
|
|
120
122
|
"tslib": "^2.8.1",
|
|
121
123
|
"typescript": "~5.8.3",
|
|
122
124
|
"typescript-eslint": "^8.46.2",
|
|
125
|
+
"unplugin-replace": "^0.6.3",
|
|
123
126
|
"vite": "^7.1.12",
|
|
124
127
|
"vite-plugin-dts": "^4.5.4",
|
|
125
128
|
"vite-plugin-externalize-deps": "^0.10.0",
|
|
@@ -127,7 +130,7 @@
|
|
|
127
130
|
"vitest": "^4.0.8"
|
|
128
131
|
},
|
|
129
132
|
"peerDependencies": {
|
|
130
|
-
"@maptiler/sdk": "1 - 4",
|
|
133
|
+
"@maptiler/sdk": "1.0.7 - 4",
|
|
131
134
|
"leaflet": "1.5 - 2",
|
|
132
135
|
"maplibre-gl": "2 - 5",
|
|
133
136
|
"ol": "6 - 10"
|