@maptiler/geocoding-control 0.0.58 → 0.0.60

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/README.md CHANGED
@@ -86,7 +86,7 @@ For examples without using bundler see `demo-maplibregl.html` or `demo-leaflet.h
86
86
  - `trackProximity`: `boolean` - If true, the geocoder proximity will automatically update based on the map view. Default `true`.
87
87
  - `minLength`: `number` - Minimum number of characters to enter before results are shown. Default `2`.
88
88
  - `bbox`: `[number, number, number, number]` - A bounding box argument: this is a bounding box given as an array in the format [minX, minY, maxX, maxY]. Search results will be limited to the bounding box.
89
- - `language`: `string | string[]` - Specify the language(s) to use for response text and query result weighting. Options are IETF language tags comprised of a mandatory ISO 639-1 language code and optionally one or more IETF subtags for country or script. More than one value can also be specified, separated by commas. Set to empty string for forcing no language preference.
89
+ - `language`: `string | string[]` - Specify the language(s) to use for response text and query result weighting. Options are IETF language tags comprised of a mandatory ISO 639-1 language code and optionally one or more IETF subtags for country or script. More than one value can also be specified, separated by commas. Set to empty string or empty array for forcing no language preference. If this parameter is not provided at all the browser's language settings will be used.
90
90
  - `showResultsWhileTyping`: `boolean` - If `false`, indicates that search will only occur on enter key press. If `true`, indicates that the Geocoder will search on the input box being updated above the minLength option. Default `false`.
91
91
  - `marker`: `boolean | MarkerOptions` - If `true`, a [MapLibre GL Marker](https://maplibre.org/maplibre-gl-js-docs/api/markers/#marker) / [Leaflet Marker](https://leafletjs.com/reference.html#marker) will be added to the map at the location of the user-selected result using a default set of Marker options. If the value is an object, the marker will be constructed using these options. If `false`, no marker will be added to the map. Requires that `options.maplibregl` also be set. Default `true`.
92
92
  - `showResultMarkers`: `boolean | MarkerOptions` - If `true`, [MapLibre GL Marker](https://maplibre.org/maplibre-gl-js-docs/api/markers/#marker) / [Leaflet Marker](https://leafletjs.com/reference.html#marker) will be added to the map at the location the top results for the query. If the value is an object, the marker will be constructed using these options. If `false`, no marker will be added to the map. Requires that `options.maplibregl` also be set. Default `true`.
package/dist/leaflet.js CHANGED
@@ -706,7 +706,7 @@ function Gl(r, t, e) {
706
706
  async function ss(N, { byId: Ft = !1, exact: Fn = !1 } = {}) {
707
707
  e(16, gr = void 0);
708
708
  const Vi = $s(), Ge = new URLSearchParams();
709
- y && Ge.set("language", Array.isArray(y) ? y.join(",") : y), Xt && Ge.set("types", Xt.join(",")), Vi || (p && Ge.set("bbox", p.map((Gr) => Gr.toFixed(6)).join(",")), yt && Ge.set("country", Array.isArray(yt) ? yt.join(",") : yt)), Ft || (g && Ge.set("proximity", g.map((Gr) => Gr.toFixed(6)).join(",")), (Fn || !I) && Ge.set("autocomplete", "false"), Ge.set("fuzzyMatch", String(ut))), X !== void 0 && Ge.set("limit", String(X)), Ge.set("key", u);
709
+ y != null && Ge.set("language", Array.isArray(y) ? y.join(",") : y), Xt && Ge.set("types", Xt.join(",")), Vi || (p && Ge.set("bbox", p.map((Gr) => Gr.toFixed(6)).join(",")), yt && Ge.set("country", Array.isArray(yt) ? yt.join(",") : yt)), Ft || (g && Ge.set("proximity", g.map((Gr) => Gr.toFixed(6)).join(",")), (Fn || !I) && Ge.set("autocomplete", "false"), Ge.set("fuzzyMatch", String(ut))), X !== void 0 && Ge.set("limit", String(X)), Ge.set("key", u);
710
710
  const Br = "https://api.maptiler.com/geocoding/" + encodeURIComponent(N) + ".json?" + Ge.toString();
711
711
  if (Br === Js) {
712
712
  Ft ? (e(12, J = void 0), e(44, it = Eo[0])) : e(12, J = Eo);
@@ -717,7 +717,7 @@ function Gl(r, t, e) {
717
717
  e(17, Fr = ve);
718
718
  let ls;
719
719
  try {
720
- console.log("fetch"), ls = await fetch(Br, { signal: ve.signal }).finally(() => {
720
+ ls = await fetch(Br, { signal: ve.signal }).finally(() => {
721
721
  ve === Fr && e(17, Fr = void 0);
722
722
  });
723
723
  } catch (Gr) {