@maptiler/geocoding-control 2.0.0 → 2.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/MapLibreBasedGeocodingControl.d.ts +2616 -27
- package/leaflet-controller.d.ts +1 -1
- package/leaflet-controller.js +97 -95
- package/leaflet-controller.js.map +1 -1
- package/leaflet-controller.umd.js +2 -2
- package/leaflet-controller.umd.js.map +1 -1
- package/leaflet.d.ts +26 -4
- package/leaflet.js +906 -909
- package/leaflet.js.map +1 -1
- package/leaflet.umd.js +3 -3
- package/leaflet.umd.js.map +1 -1
- package/maplibregl-controller.d.ts +1 -1
- package/maplibregl-controller.js +480 -466
- package/maplibregl-controller.js.map +1 -1
- package/maplibregl-controller.umd.js +3 -3
- package/maplibregl-controller.umd.js.map +1 -1
- package/maplibregl.d.ts +2594 -9
- package/maplibregl.js +2094 -1969
- package/maplibregl.js.map +1 -1
- package/maplibregl.umd.js +3 -3
- package/maplibregl.umd.js.map +1 -1
- package/maptilersdk.d.ts +2594 -9
- package/maptilersdk.js +2086 -1964
- package/maptilersdk.js.map +1 -1
- package/maptilersdk.umd.js +3 -3
- package/maptilersdk.umd.js.map +1 -1
- package/openlayers-controller.d.ts +1 -1
- package/openlayers-controller.js +62 -60
- package/openlayers-controller.js.map +1 -1
- package/openlayers-controller.umd.js +2 -2
- package/openlayers-controller.umd.js.map +1 -1
- package/openlayers.d.ts +21 -0
- package/openlayers.js +754 -786
- package/openlayers.js.map +1 -1
- package/openlayers.umd.js +3 -3
- package/openlayers.umd.js.map +1 -1
- package/package.json +18 -18
- package/react.d.ts +4 -4
- package/react.js +619 -619
- package/react.js.map +1 -1
- package/react.umd.js +1 -1
- package/react.umd.js.map +1 -1
- package/style.css +1 -1
- package/svelte/FeatureItem.svelte +1 -1
- package/svelte/FeatureItem.svelte.d.ts +2 -2
- package/svelte/GeocodingControl.svelte +31 -32
- package/svelte/GeocodingControl.svelte.d.ts +26 -13
- package/svelte/MapLibreBasedGeocodingControl.d.ts +2616 -27
- package/svelte/MapLibreBasedGeocodingControl.js +120 -17
- package/svelte/leaflet-controller.d.ts +1 -1
- package/svelte/leaflet-controller.js +4 -1
- package/svelte/leaflet.d.ts +26 -4
- package/svelte/leaflet.js +17 -19
- package/svelte/maplibregl-controller.d.ts +1 -1
- package/svelte/maplibregl-controller.js +45 -36
- package/svelte/maplibregl.d.ts +2594 -9
- package/svelte/maplibregl.js +11 -3
- package/svelte/maptilersdk.d.ts +2594 -9
- package/svelte/maptilersdk.js +11 -3
- package/svelte/openlayers-controller.d.ts +1 -1
- package/svelte/openlayers-controller.js +4 -1
- package/svelte/openlayers.d.ts +21 -0
- package/svelte/openlayers.js +30 -45
- package/svelte/react.d.ts +4 -4
- package/svelte/react.js +5 -5
- package/svelte/types.d.ts +84 -35
- package/svelte/vanilla.d.ts +14 -1
- package/svelte/vanilla.js +31 -8
- package/types.d.ts +84 -35
- package/vanilla.d.ts +14 -1
- package/vanilla.js +929 -901
- package/vanilla.js.map +1 -1
- package/vanilla.umd.js +1 -1
- package/vanilla.umd.js.map +1 -1
package/leaflet.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as L from "leaflet";
|
|
2
|
-
import type { ControlOptions, Feature } from "./types";
|
|
2
|
+
import type { ControlOptions, DispatcherType, Feature } from "./types";
|
|
3
3
|
export { createLeafletMapController } from "./leaflet-controller";
|
|
4
4
|
type LeafletControlOptions = ControlOptions & L.ControlOptions & {
|
|
5
5
|
/**
|
|
@@ -54,15 +54,37 @@ type LeafletControlOptions = ControlOptions & L.ControlOptions & {
|
|
|
54
54
|
*/
|
|
55
55
|
fullGeometryStyle?: null | boolean | L.PathOptions | L.StyleFunction;
|
|
56
56
|
};
|
|
57
|
+
type LeafletEvent<T> = {
|
|
58
|
+
type: T;
|
|
59
|
+
target: GeocodingControl;
|
|
60
|
+
sourceTarget: GeocodingControl;
|
|
61
|
+
};
|
|
62
|
+
type CustomEventMap = {
|
|
63
|
+
[T in keyof DispatcherType]: DispatcherType[T] & LeafletEvent<T>;
|
|
64
|
+
};
|
|
57
65
|
/**
|
|
58
66
|
* Leaflet mixins https://leafletjs.com/reference.html#class
|
|
59
67
|
* for TypeScript https://www.typescriptlang.org/docs/handbook/mixins.html
|
|
60
68
|
* @internal
|
|
61
69
|
*/
|
|
62
|
-
declare class EventedControl {
|
|
63
|
-
constructor(...args: unknown[]);
|
|
70
|
+
declare class EventedControl extends L.Control {
|
|
64
71
|
}
|
|
65
|
-
interface EventedControl extends L.Control
|
|
72
|
+
interface EventedControl extends L.Control {
|
|
73
|
+
on<T extends keyof CustomEventMap>(type: T, fn: (event: CustomEventMap[T]) => void, context?: unknown): this;
|
|
74
|
+
addEventListener<T extends keyof CustomEventMap>(type: T, fn: (event: CustomEventMap[T]) => void, context?: unknown): this;
|
|
75
|
+
once<T extends keyof CustomEventMap>(type: T, fn: (event: CustomEventMap[T]) => void, context?: unknown): this;
|
|
76
|
+
addOneTimeEventListener<T extends keyof CustomEventMap>(type: T, fn: (event: CustomEventMap[T]) => void, context?: unknown): this;
|
|
77
|
+
off<T extends keyof CustomEventMap>(type?: T, fn?: (event: CustomEventMap[T]) => void, context?: unknown): this;
|
|
78
|
+
off(eventMap?: {
|
|
79
|
+
[T in keyof CustomEventMap]?: (event: CustomEventMap[T]) => void;
|
|
80
|
+
}): this;
|
|
81
|
+
removeEventListener<T extends keyof CustomEventMap>(type?: T, fn?: (event: CustomEventMap[T]) => void, context?: unknown): this;
|
|
82
|
+
listens<T extends keyof CustomEventMap>(type: T, fn: (event: CustomEventMap[T]) => void, context?: unknown, propagate?: boolean): boolean;
|
|
83
|
+
fire(type: string, data?: unknown, propagate?: boolean): this;
|
|
84
|
+
addEventParent(obj: L.Evented): this;
|
|
85
|
+
removeEventParent(obj: L.Evented): this;
|
|
86
|
+
fireEvent(type: string, data?: unknown, propagate?: boolean): this;
|
|
87
|
+
hasEventListeners<T extends keyof CustomEventMap>(type: T): boolean;
|
|
66
88
|
}
|
|
67
89
|
export declare class GeocodingControl extends EventedControl {
|
|
68
90
|
#private;
|