@maptiler/geocoding-control 1.4.2-dev.2 → 2.0.0
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 +70 -35
- package/leaflet-controller.d.ts +1 -1
- package/leaflet-controller.js +407 -398
- package/leaflet-controller.js.map +1 -1
- package/leaflet-controller.umd.js +3 -3
- package/leaflet-controller.umd.js.map +1 -1
- package/leaflet.d.ts +52 -16
- package/leaflet.js +888 -870
- package/leaflet.js.map +1 -1
- package/leaflet.umd.js +3 -3
- package/leaflet.umd.js.map +1 -1
- package/maplibregl-controller.d.ts +7 -7
- package/maplibregl-controller.js +421 -413
- 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 +29 -5
- package/maplibregl.js +1244 -1236
- package/maplibregl.js.map +1 -1
- package/maplibregl.umd.js +3 -3
- package/maplibregl.umd.js.map +1 -1
- package/maptilersdk.d.ts +29 -5
- package/maptilersdk.js +1194 -1180
- package/maptilersdk.js.map +1 -1
- package/maptilersdk.umd.js +3 -3
- package/maptilersdk.umd.js.map +1 -1
- package/openlayers.js +694 -692
- package/openlayers.js.map +1 -1
- package/openlayers.umd.js +3 -3
- package/openlayers.umd.js.map +1 -1
- package/package.json +5 -5
- package/react.js +671 -669
- package/react.js.map +1 -1
- package/react.umd.js +1 -1
- package/react.umd.js.map +1 -1
- package/svelte/GeocodingControl.svelte +4 -2
- package/svelte/GeocodingControl.svelte.d.ts +1 -0
- package/svelte/MapLibreBasedGeocodingControl.d.ts +70 -35
- package/svelte/MapLibreBasedGeocodingControl.js +69 -66
- package/svelte/leaflet-controller.d.ts +1 -1
- package/svelte/leaflet-controller.js +47 -24
- package/svelte/leaflet.d.ts +52 -16
- package/svelte/leaflet.js +14 -2
- package/svelte/maplibregl-controller.d.ts +7 -7
- package/svelte/maplibregl-controller.js +55 -34
- package/svelte/maplibregl.d.ts +29 -5
- package/svelte/maplibregl.js +3 -8
- package/svelte/maptilersdk.d.ts +29 -5
- package/svelte/maptilersdk.js +15 -18
- package/svelte/types.d.ts +6 -0
- package/types.d.ts +6 -0
- package/vanilla.js +392 -390
- 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,34 +1,70 @@
|
|
|
1
1
|
import * as L from "leaflet";
|
|
2
|
-
import type { ControlOptions } from "./types";
|
|
2
|
+
import type { ControlOptions, Feature } from "./types";
|
|
3
3
|
export { createLeafletMapController } from "./leaflet-controller";
|
|
4
4
|
type LeafletControlOptions = ControlOptions & L.ControlOptions & {
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* If `
|
|
6
|
+
* Marker to be added to the map at the location of the user-selected result using a default set of Marker options.
|
|
7
|
+
*
|
|
8
|
+
* - If `true` or `undefined` then a default marker will be used.\
|
|
9
|
+
* - If the value is [MarkerOptions](https://leafletjs.com/reference.html#marker-option) then the marker will be constructed using these options.
|
|
10
|
+
* - If the value is a function then it can create and configure custom [Marker](https://leafletjs.com/reference.html#marker),
|
|
11
|
+
* add it to the [Map](https://leafletjs.com/reference.html#map) and return it.
|
|
12
|
+
* Function accepts [Map](https://leafletjs.com/reference.html#map) and `Feature` as parameters.
|
|
13
|
+
* Feature is `undefined` for the reverse location marker.
|
|
14
|
+
* - If `false` or `null` then no marker will be added to the map.
|
|
15
|
+
*
|
|
9
16
|
* Default value is `true`.
|
|
10
17
|
*/
|
|
11
|
-
marker?: boolean | L.MarkerOptions;
|
|
18
|
+
marker?: null | boolean | L.MarkerOptions | ((map: L.Map, feature?: Feature) => L.Marker | undefined | null);
|
|
12
19
|
/**
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
* If `
|
|
20
|
+
* Marker be added to the map at the location the geocoding results.
|
|
21
|
+
*
|
|
22
|
+
* - If `true` or `undefined` then a default marker will be used.
|
|
23
|
+
* - If the value is [MarkerOptions](https://leafletjs.com/reference.html#marker-option) then the marker will be constructed using these options.
|
|
24
|
+
* - If the value is a function then it can create and configure custom [Marker](https://leafletjs.com/reference.html#marker),
|
|
25
|
+
* add it to the [Map](https://leafletjs.com/reference.html#map) and return it.
|
|
26
|
+
* In this case the default pop-up won't be added to the marker.
|
|
27
|
+
* Function accepts [Map](https://leafletjs.com/reference.html#map) and `Feature` as parameters.
|
|
28
|
+
* - If `false` or `null` then no marker will be added to the map.
|
|
29
|
+
*
|
|
16
30
|
* Default value is `true`.
|
|
17
31
|
*/
|
|
18
|
-
showResultMarkers?: boolean | L.MarkerOptions;
|
|
32
|
+
showResultMarkers?: null | boolean | L.MarkerOptions | ((map: L.Map, feature: Feature) => L.Marker | undefined | null);
|
|
19
33
|
/**
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
* If
|
|
34
|
+
* Animation to selected feature on the map.
|
|
35
|
+
*
|
|
36
|
+
* - If `false` or `null` then animating the map to a selected result is disabled.
|
|
37
|
+
* - If `true` or `undefined` then animating the map will use the default animation parameters.
|
|
38
|
+
* - If an [ZoomPanOptions](https://leafletjs.com/reference.html#zoom/pan-options)
|
|
39
|
+
* ` & `[FitBoundsOptions](https://leafletjs.com/reference.html#fitbounds-options) then it will be passed as options
|
|
40
|
+
* to the map [flyTo](https://leafletjs.com/reference.html#map-flyto)
|
|
41
|
+
* or [fitBounds](https://leafletjs.com/reference.html#map-fitbounds) method providing control over the animation of the transition.
|
|
42
|
+
*
|
|
23
43
|
* Default value is `true`.
|
|
24
44
|
*/
|
|
25
|
-
flyTo?: boolean | (L.ZoomPanOptions & L.FitBoundsOptions);
|
|
45
|
+
flyTo?: null | boolean | (L.ZoomPanOptions & L.FitBoundsOptions);
|
|
26
46
|
/**
|
|
27
|
-
* Style for full feature geometry
|
|
47
|
+
* Style for the full feature geometry.
|
|
48
|
+
*
|
|
49
|
+
* - If `false` or `null` then no full geometry is drawn.
|
|
50
|
+
* - If `true` or `undefined` then default-styled full geometry is drawn.
|
|
51
|
+
* - If an [PathOptions](https://leafletjs.com/reference.html#path-option) then it will be used to style the full geometry.
|
|
52
|
+
* - If a function accepting a `Feature` and returning [PathOptions](https://leafletjs.com/reference.html#path-option)
|
|
53
|
+
* then it must teturn the style and will be used to style the full geometry.
|
|
28
54
|
*/
|
|
29
|
-
fullGeometryStyle?: L.PathOptions | L.StyleFunction;
|
|
55
|
+
fullGeometryStyle?: null | boolean | L.PathOptions | L.StyleFunction;
|
|
30
56
|
};
|
|
31
|
-
|
|
57
|
+
/**
|
|
58
|
+
* Leaflet mixins https://leafletjs.com/reference.html#class
|
|
59
|
+
* for TypeScript https://www.typescriptlang.org/docs/handbook/mixins.html
|
|
60
|
+
* @internal
|
|
61
|
+
*/
|
|
62
|
+
declare class EventedControl {
|
|
63
|
+
constructor(...args: unknown[]);
|
|
64
|
+
}
|
|
65
|
+
interface EventedControl extends L.Control, L.Evented {
|
|
66
|
+
}
|
|
67
|
+
export declare class GeocodingControl extends EventedControl {
|
|
32
68
|
#private;
|
|
33
69
|
constructor(options: LeafletControlOptions);
|
|
34
70
|
onAdd(map: L.Map): HTMLDivElement;
|