@maptiler/geocoding-control 0.0.79 → 0.0.82
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/ClearIcon.svelte.d.ts +23 -0
- package/GeocodingControl.svelte +685 -0
- package/GeocodingControl.svelte.d.ts +66 -0
- package/LoadingIcon.svelte.d.ts +23 -0
- package/{src/lib/MarkerIcon.svelte → MarkerIcon.svelte} +1 -2
- package/MarkerIcon.svelte.d.ts +16 -0
- package/README.md +7 -7
- package/ReverseGeocodingIcon.svelte.d.ts +23 -0
- package/SearchIcon.svelte.d.ts +23 -0
- package/leaflet-controller.js +1 -0
- package/leaflet-controller.js.map +1 -0
- package/leaflet-controller.umd.js +1 -0
- package/leaflet-controller.umd.js.map +1 -0
- package/leaflet.js +3943 -3970
- package/leaflet.js.map +1 -0
- package/leaflet.umd.js +6 -5
- package/leaflet.umd.js.map +1 -0
- package/maplibregl-controller.js +1 -0
- package/maplibregl-controller.js.map +1 -0
- package/maplibregl-controller.umd.js +1 -0
- package/maplibregl-controller.umd.js.map +1 -0
- package/maplibregl.js +4028 -4055
- package/maplibregl.js.map +1 -0
- package/maplibregl.umd.js +6 -5
- package/maplibregl.umd.js.map +1 -0
- package/package.json +20 -20
- package/react.js +470 -552
- package/react.js.map +1 -0
- package/react.umd.js +2 -1
- package/react.umd.js.map +1 -0
- package/style.css +1 -1
- package/src/AppLeaflet.svelte +0 -55
- package/src/AppMaplibregl.svelte +0 -45
- package/src/lib/GeocodingControl.svelte +0 -851
- package/src/lib/LeafletGeocodingControl.ts +0 -154
- package/src/lib/MaplibreglGeocodingControl.ts +0 -160
- package/src/lib/ReactGeocodingControl.ts +0 -158
- package/src/lib/leafletMapController.ts +0 -305
- package/src/lib/maplibreglMapController.ts +0 -366
- package/src/lib/mask.ts +0 -70
- package/src/lib/types.ts +0 -235
- package/src/main-copy.ts +0 -59
- package/src/main.ts +0 -65
- package/src/vite-env.d.ts +0 -2
- /package/{src/lib/ClearIcon.svelte → ClearIcon.svelte} +0 -0
- /package/{src/lib/LoadingIcon.svelte → LoadingIcon.svelte} +0 -0
- /package/{src/lib/ReverseGeocodingIcon.svelte → ReverseGeocodingIcon.svelte} +0 -0
- /package/{src/lib/SearchIcon.svelte → SearchIcon.svelte} +0 -0
- /package/{maplibre.d.ts → maplibregl.d.ts} +0 -0
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
import type { Feature, FeatureCollection, MapController, Proximity } from "./types";
|
|
3
|
+
declare const __propDef: {
|
|
4
|
+
props: {
|
|
5
|
+
class?: string | undefined;
|
|
6
|
+
apiKey: string;
|
|
7
|
+
bbox?: [number, number, number, number] | undefined;
|
|
8
|
+
clearButtonTitle?: string | undefined;
|
|
9
|
+
clearOnBlur?: boolean | undefined;
|
|
10
|
+
collapsed?: boolean | undefined;
|
|
11
|
+
country?: string | string[] | undefined;
|
|
12
|
+
debounceSearch?: number | undefined;
|
|
13
|
+
enableReverse?: boolean | "always" | undefined;
|
|
14
|
+
errorMessage?: string | undefined;
|
|
15
|
+
filter?: ((feature: Feature) => boolean) | undefined;
|
|
16
|
+
flyTo?: boolean | undefined;
|
|
17
|
+
fuzzyMatch?: boolean | undefined;
|
|
18
|
+
language?: string | string[] | undefined;
|
|
19
|
+
limit?: number | undefined;
|
|
20
|
+
mapController?: MapController | undefined;
|
|
21
|
+
minLength?: number | undefined;
|
|
22
|
+
noResultsMessage?: string | undefined;
|
|
23
|
+
placeholder?: string | undefined;
|
|
24
|
+
proximity?: Proximity;
|
|
25
|
+
reverseActive?: boolean | undefined;
|
|
26
|
+
reverseButtonTitle?: string | undefined;
|
|
27
|
+
searchValue?: string | undefined;
|
|
28
|
+
showFullGeometry?: boolean | undefined;
|
|
29
|
+
showPlaceType?: boolean | undefined;
|
|
30
|
+
showResultsWhileTyping?: boolean | undefined;
|
|
31
|
+
trackProximity?: boolean | undefined;
|
|
32
|
+
types?: string[] | undefined;
|
|
33
|
+
zoom?: number | undefined;
|
|
34
|
+
fetchParameters?: RequestInit | undefined;
|
|
35
|
+
focus?: (() => void) | undefined;
|
|
36
|
+
blur?: (() => void) | undefined;
|
|
37
|
+
setQuery?: ((value: string, submit?: boolean) => void) | undefined;
|
|
38
|
+
};
|
|
39
|
+
events: {
|
|
40
|
+
select: CustomEvent<Feature>;
|
|
41
|
+
pick: CustomEvent<Feature>;
|
|
42
|
+
optionsVisibilityChange: CustomEvent<boolean>;
|
|
43
|
+
featuresListed: CustomEvent<Feature[]>;
|
|
44
|
+
featuresMarked: CustomEvent<Feature[]>;
|
|
45
|
+
response: CustomEvent<{
|
|
46
|
+
url: string;
|
|
47
|
+
featureCollection: FeatureCollection;
|
|
48
|
+
}>;
|
|
49
|
+
reverseToggle: CustomEvent<boolean>;
|
|
50
|
+
queryChange: CustomEvent<string>;
|
|
51
|
+
} & {
|
|
52
|
+
[evt: string]: CustomEvent<any>;
|
|
53
|
+
};
|
|
54
|
+
slots: {
|
|
55
|
+
default: {};
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
export type GeocodingControlProps = typeof __propDef.props;
|
|
59
|
+
export type GeocodingControlEvents = typeof __propDef.events;
|
|
60
|
+
export type GeocodingControlSlots = typeof __propDef.slots;
|
|
61
|
+
export default class GeocodingControl extends SvelteComponentTyped<GeocodingControlProps, GeocodingControlEvents, GeocodingControlSlots> {
|
|
62
|
+
get focus(): () => void;
|
|
63
|
+
get blur(): () => void;
|
|
64
|
+
get setQuery(): (value: string, submit?: boolean) => void;
|
|
65
|
+
}
|
|
66
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/** @typedef {typeof __propDef.props} LoadingIconProps */
|
|
2
|
+
/** @typedef {typeof __propDef.events} LoadingIconEvents */
|
|
3
|
+
/** @typedef {typeof __propDef.slots} LoadingIconSlots */
|
|
4
|
+
export default class LoadingIcon extends SvelteComponentTyped<{
|
|
5
|
+
[x: string]: never;
|
|
6
|
+
}, {
|
|
7
|
+
[evt: string]: CustomEvent<any>;
|
|
8
|
+
}, {}> {
|
|
9
|
+
}
|
|
10
|
+
export type LoadingIconProps = typeof __propDef.props;
|
|
11
|
+
export type LoadingIconEvents = typeof __propDef.events;
|
|
12
|
+
export type LoadingIconSlots = typeof __propDef.slots;
|
|
13
|
+
import { SvelteComponentTyped } from "svelte";
|
|
14
|
+
declare const __propDef: {
|
|
15
|
+
props: {
|
|
16
|
+
[x: string]: never;
|
|
17
|
+
};
|
|
18
|
+
events: {
|
|
19
|
+
[evt: string]: CustomEvent<any>;
|
|
20
|
+
};
|
|
21
|
+
slots: {};
|
|
22
|
+
};
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: {
|
|
4
|
+
displayIn: "list" | "leaflet" | "maplibre";
|
|
5
|
+
};
|
|
6
|
+
events: {
|
|
7
|
+
[evt: string]: CustomEvent<any>;
|
|
8
|
+
};
|
|
9
|
+
slots: {};
|
|
10
|
+
};
|
|
11
|
+
export type MarkerIconProps = typeof __propDef.props;
|
|
12
|
+
export type MarkerIconEvents = typeof __propDef.events;
|
|
13
|
+
export type MarkerIconSlots = typeof __propDef.slots;
|
|
14
|
+
export default class MarkerIcon extends SvelteComponentTyped<MarkerIconProps, MarkerIconEvents, MarkerIconSlots> {
|
|
15
|
+
}
|
|
16
|
+
export {};
|
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@ A geocoding control for [Maplibre GL JS](https://github.com/maplibre/maplibre-gl
|
|
|
4
4
|
|
|
5
5
|
The component can be used as an ES module or UMD module.
|
|
6
6
|
|
|
7
|
-
Geocoding control is also provided as [React component](#react) and a [Svelte component](#svelte).
|
|
7
|
+
Geocoding control is also provided as [React component](#react-component) and a [Svelte component](#svelte-component).
|
|
8
8
|
|
|
9
9
|
## Usage
|
|
10
10
|
|
|
@@ -134,7 +134,7 @@ geocodingControl.addEventListener("optionsVisibilityChange", (e) => {
|
|
|
134
134
|
});
|
|
135
135
|
```
|
|
136
136
|
|
|
137
|
-
##
|
|
137
|
+
## React component
|
|
138
138
|
|
|
139
139
|
In addition to using the component as MapLibre GL or Leaflet Control it is also possible to use it stand-alone in React projects with or without MapLibre GL or Leaflet integration.
|
|
140
140
|
|
|
@@ -146,7 +146,7 @@ Component API matches API described above where options and events are exposed a
|
|
|
146
146
|
import { useEffect, useRef, useState } from "react";
|
|
147
147
|
import { GeocodingControl } from "@maptiler/geocoding-control/react";
|
|
148
148
|
import { createMaplibreglMapController } from "@maptiler/geocoding-control/maplibregl-controller";
|
|
149
|
-
import type { MapController } from "@maptiler/geocoding-control/
|
|
149
|
+
import type { MapController } from "@maptiler/geocoding-control/types";
|
|
150
150
|
import "@maptiler/geocoding-control/style.css";
|
|
151
151
|
import maplibregl from "maplibre-gl";
|
|
152
152
|
import "maplibre-gl/dist/maplibre-gl.css";
|
|
@@ -181,7 +181,7 @@ export function App() {
|
|
|
181
181
|
}
|
|
182
182
|
```
|
|
183
183
|
|
|
184
|
-
##
|
|
184
|
+
## Svelte component
|
|
185
185
|
|
|
186
186
|
In addition to using the component as MapLibre GL or Leaflet Control it is also possible to use it stand-alone in Svelte projects with or without MapLibre GL or Leaflet integration.
|
|
187
187
|
|
|
@@ -191,9 +191,9 @@ Component API matches API described above where options and events are exposed a
|
|
|
191
191
|
|
|
192
192
|
```svelte
|
|
193
193
|
<script lang="ts">
|
|
194
|
-
import GeocodingControl from "@maptiler/geocoding-control/
|
|
195
|
-
import { createMaplibreglMapController } from "@maptiler/geocoding-control/
|
|
196
|
-
import type { MapController } from "@maptiler/geocoding-control/
|
|
194
|
+
import GeocodingControl from "@maptiler/geocoding-control/GeocodingControl.svelte";
|
|
195
|
+
import { createMaplibreglMapController } from "@maptiler/geocoding-control/maplibregl";
|
|
196
|
+
import type { MapController } from "@maptiler/geocoding-control/types";
|
|
197
197
|
import maplibregl from "maplibre-gl";
|
|
198
198
|
import "maplibre-gl/dist/maplibre-gl.css";
|
|
199
199
|
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/** @typedef {typeof __propDef.props} ReverseGeocodingIconProps */
|
|
2
|
+
/** @typedef {typeof __propDef.events} ReverseGeocodingIconEvents */
|
|
3
|
+
/** @typedef {typeof __propDef.slots} ReverseGeocodingIconSlots */
|
|
4
|
+
export default class ReverseGeocodingIcon extends SvelteComponentTyped<{
|
|
5
|
+
[x: string]: never;
|
|
6
|
+
}, {
|
|
7
|
+
[evt: string]: CustomEvent<any>;
|
|
8
|
+
}, {}> {
|
|
9
|
+
}
|
|
10
|
+
export type ReverseGeocodingIconProps = typeof __propDef.props;
|
|
11
|
+
export type ReverseGeocodingIconEvents = typeof __propDef.events;
|
|
12
|
+
export type ReverseGeocodingIconSlots = typeof __propDef.slots;
|
|
13
|
+
import { SvelteComponentTyped } from "svelte";
|
|
14
|
+
declare const __propDef: {
|
|
15
|
+
props: {
|
|
16
|
+
[x: string]: never;
|
|
17
|
+
};
|
|
18
|
+
events: {
|
|
19
|
+
[evt: string]: CustomEvent<any>;
|
|
20
|
+
};
|
|
21
|
+
slots: {};
|
|
22
|
+
};
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/** @typedef {typeof __propDef.props} SearchIconProps */
|
|
2
|
+
/** @typedef {typeof __propDef.events} SearchIconEvents */
|
|
3
|
+
/** @typedef {typeof __propDef.slots} SearchIconSlots */
|
|
4
|
+
export default class SearchIcon extends SvelteComponentTyped<{
|
|
5
|
+
[x: string]: never;
|
|
6
|
+
}, {
|
|
7
|
+
[evt: string]: CustomEvent<any>;
|
|
8
|
+
}, {}> {
|
|
9
|
+
}
|
|
10
|
+
export type SearchIconProps = typeof __propDef.props;
|
|
11
|
+
export type SearchIconEvents = typeof __propDef.events;
|
|
12
|
+
export type SearchIconSlots = typeof __propDef.slots;
|
|
13
|
+
import { SvelteComponentTyped } from "svelte";
|
|
14
|
+
declare const __propDef: {
|
|
15
|
+
props: {
|
|
16
|
+
[x: string]: never;
|
|
17
|
+
};
|
|
18
|
+
events: {
|
|
19
|
+
[evt: string]: CustomEvent<any>;
|
|
20
|
+
};
|
|
21
|
+
slots: {};
|
|
22
|
+
};
|
|
23
|
+
export {};
|
package/leaflet-controller.js
CHANGED
|
@@ -15019,3 +15019,4 @@ function Cl(n, t = !0, e = !0, r = {}, i = {}, o = (s) => {
|
|
|
15019
15019
|
export {
|
|
15020
15020
|
Cl as createLeafletMapController
|
|
15021
15021
|
};
|
|
15022
|
+
//# sourceMappingURL=leaflet-controller.js.map
|