@maptiler/geocoding-control 0.0.91-git.4d23c0 → 0.0.91-git.896be4
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/FeatureItem.svelte +1 -1
- package/GeocodingControl.svelte +2 -5
- package/GeocodingControl.svelte.d.ts +1 -0
- package/leaflet.js +1937 -1935
- package/leaflet.js.map +1 -1
- package/leaflet.umd.js +5 -5
- package/leaflet.umd.js.map +1 -1
- package/maplibregl.js +1890 -1888
- package/maplibregl.js.map +1 -1
- package/maplibregl.umd.js +5 -5
- package/maplibregl.umd.js.map +1 -1
- package/maptilersdk.js +1889 -1887
- package/maptilersdk.js.map +1 -1
- package/maptilersdk.umd.js +5 -5
- package/maptilersdk.umd.js.map +1 -1
- package/package.json +1 -1
- package/react.js +268 -266
- package/react.js.map +1 -1
- package/react.umd.js +1 -1
- package/react.umd.js.map +1 -1
- package/types.d.ts +12 -0
package/FeatureItem.svelte
CHANGED
|
@@ -8,7 +8,7 @@ $: imageUrl = category
|
|
|
8
8
|
? `/icons/${category.replace(/ /g, "_")}.svg`
|
|
9
9
|
: undefined;
|
|
10
10
|
$: placeType = feature.id.startsWith("poi.")
|
|
11
|
-
? feature.properties?.categories?.join("
|
|
11
|
+
? feature.properties?.categories?.join(", ")
|
|
12
12
|
: feature.properties?.place_type_name?.[0] ?? feature.place_type[0];
|
|
13
13
|
function handleImgError(e) {
|
|
14
14
|
if (index > -1) {
|
package/GeocodingControl.svelte
CHANGED
|
@@ -37,6 +37,7 @@ export let trackProximity = true;
|
|
|
37
37
|
export let types = undefined;
|
|
38
38
|
export let zoom = 16;
|
|
39
39
|
export let maxZoom = 18;
|
|
40
|
+
export let apiUrl = import.meta.env.VITE_API_URL;
|
|
40
41
|
export let fetchParameters = {};
|
|
41
42
|
export function focus() {
|
|
42
43
|
input.focus();
|
|
@@ -232,11 +233,7 @@ async function search(searchValue, { byId = false, exact = false, } = {}) {
|
|
|
232
233
|
sp.set("limit", String(limit));
|
|
233
234
|
}
|
|
234
235
|
sp.set("key", apiKey);
|
|
235
|
-
const url =
|
|
236
|
-
"/" +
|
|
237
|
-
encodeURIComponent(searchValue) +
|
|
238
|
-
".json?" +
|
|
239
|
-
sp.toString();
|
|
236
|
+
const url = apiUrl + "/" + encodeURIComponent(searchValue) + ".json?" + sp.toString();
|
|
240
237
|
if (url === lastSearchUrl) {
|
|
241
238
|
if (byId) {
|
|
242
239
|
listFeatures = undefined;
|
|
@@ -32,6 +32,7 @@ declare const __propDef: {
|
|
|
32
32
|
types?: string[] | undefined;
|
|
33
33
|
zoom?: number | undefined;
|
|
34
34
|
maxZoom?: number | undefined;
|
|
35
|
+
apiUrl?: string | undefined;
|
|
35
36
|
fetchParameters?: RequestInit | undefined;
|
|
36
37
|
focus?: (() => void) | undefined;
|
|
37
38
|
blur?: (() => void) | undefined;
|