@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.
@@ -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) {
@@ -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 = import.meta.env.VITE_API_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;