@maptiler/geocoding-control 2.1.3 → 2.1.4-rc1
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/leaflet.js +2 -2
- package/leaflet.js.map +1 -1
- package/leaflet.umd.js +1 -1
- package/leaflet.umd.js.map +1 -1
- package/maplibregl.js +2 -2
- package/maplibregl.js.map +1 -1
- package/maplibregl.umd.js +1 -1
- package/maplibregl.umd.js.map +1 -1
- package/maptilersdk.js +3 -3
- package/maptilersdk.js.map +1 -1
- package/maptilersdk.umd.js +1 -1
- package/maptilersdk.umd.js.map +1 -1
- package/openlayers.js +2 -2
- package/openlayers.js.map +1 -1
- package/openlayers.umd.js +1 -1
- package/openlayers.umd.js.map +1 -1
- package/package.json +1 -1
- package/react.js +2 -2
- package/react.js.map +1 -1
- package/react.umd.js +3 -3
- package/react.umd.js.map +1 -1
- package/svelte/FeatureItem.svelte +1 -1
- package/svelte/GeocodingControl.svelte +1 -1
- package/svelte/info.json +1 -1
- package/vanilla.js +58 -58
- package/vanilla.js.map +1 -1
- package/vanilla.umd.js +2 -2
- package/vanilla.umd.js.map +1 -1
|
@@ -81,7 +81,7 @@ export let zoom = ZOOM_DEFAULTS;
|
|
|
81
81
|
export let apiUrl = "https://api.maptiler.com/geocoding";
|
|
82
82
|
export let fetchParameters = {};
|
|
83
83
|
export let iconsBaseUrl = "https://cdn.maptiler.com/maptiler-geocoding-control/v" +
|
|
84
|
-
"2.1.
|
|
84
|
+
"2.1.4-rc1" +
|
|
85
85
|
"/icons/";
|
|
86
86
|
/**
|
|
87
87
|
* @deprecated use `adjustUrl`
|
package/svelte/info.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@maptiler/geocoding-control","version":"2.1.
|
|
1
|
+
{"name":"@maptiler/geocoding-control","version":"2.1.4-rc1"}
|
package/vanilla.js
CHANGED
|
@@ -78,7 +78,7 @@ function I(i, e, t) {
|
|
|
78
78
|
function U(i) {
|
|
79
79
|
i.parentNode && i.parentNode.removeChild(i);
|
|
80
80
|
}
|
|
81
|
-
function
|
|
81
|
+
function D(i) {
|
|
82
82
|
return document.createElement(i);
|
|
83
83
|
}
|
|
84
84
|
function fe(i) {
|
|
@@ -409,7 +409,7 @@ function fn(i) {
|
|
|
409
409
|
let e, t;
|
|
410
410
|
return {
|
|
411
411
|
c() {
|
|
412
|
-
e =
|
|
412
|
+
e = D("img"), Y(e.src, t = /*iconsBaseUrl*/
|
|
413
413
|
i[3] + "area.svg") || a(e, "src", t), a(
|
|
414
414
|
e,
|
|
415
415
|
"alt",
|
|
@@ -451,7 +451,7 @@ function mn(i) {
|
|
|
451
451
|
let e, t;
|
|
452
452
|
return {
|
|
453
453
|
c() {
|
|
454
|
-
e =
|
|
454
|
+
e = D("img"), Y(e.src, t = /*iconsBaseUrl*/
|
|
455
455
|
i[3] + "reverse.svg") || a(e, "src", t), a(
|
|
456
456
|
e,
|
|
457
457
|
"alt",
|
|
@@ -493,7 +493,7 @@ function gn(i) {
|
|
|
493
493
|
let e, t;
|
|
494
494
|
return {
|
|
495
495
|
c() {
|
|
496
|
-
e =
|
|
496
|
+
e = D("img"), Y(e.src, t = /*iconsBaseUrl*/
|
|
497
497
|
i[3] + "poi.svg") || a(e, "src", t), a(
|
|
498
498
|
e,
|
|
499
499
|
"alt",
|
|
@@ -535,7 +535,7 @@ function hn(i) {
|
|
|
535
535
|
let e, t;
|
|
536
536
|
return {
|
|
537
537
|
c() {
|
|
538
|
-
e =
|
|
538
|
+
e = D("img"), Y(e.src, t = /*iconsBaseUrl*/
|
|
539
539
|
i[3] + "postal_code.svg") || a(e, "src", t), a(
|
|
540
540
|
e,
|
|
541
541
|
"alt",
|
|
@@ -577,7 +577,7 @@ function bn(i) {
|
|
|
577
577
|
let e, t;
|
|
578
578
|
return {
|
|
579
579
|
c() {
|
|
580
|
-
e =
|
|
580
|
+
e = D("img"), Y(e.src, t = /*iconsBaseUrl*/
|
|
581
581
|
i[3] + "street.svg") || a(e, "src", t), a(
|
|
582
582
|
e,
|
|
583
583
|
"alt",
|
|
@@ -619,7 +619,7 @@ function vn(i) {
|
|
|
619
619
|
let e, t;
|
|
620
620
|
return {
|
|
621
621
|
c() {
|
|
622
|
-
e =
|
|
622
|
+
e = D("img"), Y(e.src, t = /*iconsBaseUrl*/
|
|
623
623
|
i[3] + "road.svg") || a(e, "src", t), a(
|
|
624
624
|
e,
|
|
625
625
|
"alt",
|
|
@@ -661,7 +661,7 @@ function Ln(i) {
|
|
|
661
661
|
let e, t;
|
|
662
662
|
return {
|
|
663
663
|
c() {
|
|
664
|
-
e =
|
|
664
|
+
e = D("img"), Y(e.src, t = /*iconsBaseUrl*/
|
|
665
665
|
i[3] + "housenumber.svg") || a(e, "src", t), a(
|
|
666
666
|
e,
|
|
667
667
|
"alt",
|
|
@@ -703,7 +703,7 @@ function _n(i) {
|
|
|
703
703
|
let e, t, n, r;
|
|
704
704
|
return {
|
|
705
705
|
c() {
|
|
706
|
-
e =
|
|
706
|
+
e = D("img"), Y(e.src, t = /*imageUrl*/
|
|
707
707
|
i[5]) || a(e, "src", t), a(
|
|
708
708
|
e,
|
|
709
709
|
"alt",
|
|
@@ -750,7 +750,7 @@ function yn(i) {
|
|
|
750
750
|
let e, t;
|
|
751
751
|
return {
|
|
752
752
|
c() {
|
|
753
|
-
e =
|
|
753
|
+
e = D("div"), a(e, "class", "sprite-icon svelte-w9y5n9"), a(e, "style", t = `
|
|
754
754
|
width: ${/*spriteIcon*/
|
|
755
755
|
i[6].width / ne}px;
|
|
756
756
|
height: ${/*spriteIcon*/
|
|
@@ -801,7 +801,7 @@ function Qt(i) {
|
|
|
801
801
|
let e, t;
|
|
802
802
|
return {
|
|
803
803
|
c() {
|
|
804
|
-
e =
|
|
804
|
+
e = D("span"), t = Le(
|
|
805
805
|
/*placeType*/
|
|
806
806
|
i[7]
|
|
807
807
|
), a(e, "class", "secondary svelte-w9y5n9");
|
|
@@ -874,7 +874,7 @@ function wn(i) {
|
|
|
874
874
|
let g = w(i, -1), N = g(i), T = y && Qt(i);
|
|
875
875
|
return {
|
|
876
876
|
c() {
|
|
877
|
-
e =
|
|
877
|
+
e = D("li"), N.c(), c = ee(), s = D("span"), f = D("span"), u = D("span"), h = Le(d), v = ee(), T && T.c(), E = ee(), O = D("span"), S = Le(p), a(u, "class", "primary svelte-w9y5n9"), a(f, "class", "svelte-w9y5n9"), a(O, "class", "line2 svelte-w9y5n9"), a(s, "class", "texts svelte-w9y5n9"), a(e, "tabindex", "-1"), a(e, "role", "option"), a(e, "aria-selected", W = /*style*/
|
|
878
878
|
i[1] === "selected"), a(e, "aria-checked", C = /*style*/
|
|
879
879
|
i[1] === "picked"), a(e, "class", H = it(
|
|
880
880
|
/*style*/
|
|
@@ -944,7 +944,7 @@ function wn(i) {
|
|
|
944
944
|
}
|
|
945
945
|
};
|
|
946
946
|
}
|
|
947
|
-
const gi = devicePixelRatio > 1.25, pt = gi ? "@2x" : "", ne = gi ? 2 : 1;
|
|
947
|
+
const gi = typeof devicePixelRatio > "u" ? 1 : devicePixelRatio > 1.25, pt = gi ? "@2x" : "", ne = gi ? 2 : 1;
|
|
948
948
|
let oe, xe;
|
|
949
949
|
function En(i, e, t) {
|
|
950
950
|
let n, r, l, { feature: c } = e, { style: s = "default" } = e, { showPlaceType: f } = e, { missingIconsCache: u } = e, { iconsBaseUrl: d } = e;
|
|
@@ -1020,7 +1020,7 @@ function pn(i) {
|
|
|
1020
1020
|
let e;
|
|
1021
1021
|
return {
|
|
1022
1022
|
c() {
|
|
1023
|
-
e =
|
|
1023
|
+
e = D("div"), e.innerHTML = '<svg viewBox="0 0 18 18" width="24" height="24" class="svelte-7cmwmc"><path fill="#333" d="M4.4 4.4l.8.8c2.1-2.1 5.5-2.1 7.6 0l.8-.8c-2.5-2.5-6.7-2.5-9.2 0z"></path><path opacity=".1" d="M12.8 12.9c-2.1 2.1-5.5 2.1-7.6 0-2.1-2.1-2.1-5.5 0-7.7l-.8-.8c-2.5 2.5-2.5 6.7 0 9.2s6.6 2.5 9.2 0 2.5-6.6 0-9.2l-.8.8c2.2 2.1 2.2 5.6 0 7.7z"></path></svg>', a(e, "class", "svelte-7cmwmc");
|
|
1024
1024
|
},
|
|
1025
1025
|
m(t, n) {
|
|
1026
1026
|
I(t, e, n);
|
|
@@ -1137,7 +1137,7 @@ async function On(i, e, t) {
|
|
|
1137
1137
|
}
|
|
1138
1138
|
}
|
|
1139
1139
|
const zn = /^(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*([•º°\.:]|D(?:EG)?(?:REES)?)?\s*,?([6-9][0-9])\s*(['′´’\.:]|M(?:IN)?(?:UTES)?)?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*([•º°\.:]|D(?:EG)?(?:REES)?)?\s*,?([6-9][0-9])\s*(['′´’\.:]|M(?:IN)?(?:UTES)?)?\s*(EAST|WEST|[EW])?$/i, Vt = /^([+-]?[0-8]?[0-9])\s+([0-5]?[0-9]\.\d{3,})[\s,]{1,}([+-]?[0-1]?[0-9]?[0-9])\s+([0-5]?[0-9]\.\d{3,})$/, Yt = /^(NORTH|SOUTH|[NS])?[\s]*([+-]?[0-8]?[0-9](?:[\.,]\d{3,}))[\s]*([•º°]?)[\s]*(NORTH|SOUTH|[NS])?[\s]*[,/;]?[\s]*(EAST|WEST|[EW])?[\s]*([+-]?[0-1]?[0-9]?[0-9](?:[\.,]\d{3,}))[\s]*([•º°]?)[\s]*(EAST|WEST|[EW])?$/i, Xt = /^(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*(\.)\s*([0-5]?[0-9])\s*(\.)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*(\.)\s*([0-5]?[0-9])\s*(\.)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(EAST|WEST|[EW])?$/i, Jt = /^(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*(D(?:EG)?(?:REES)?)\s*([0-5]?[0-9])\s*(M(?:IN)?(?:UTES)?)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(S(?:EC)?(?:ONDS)?)?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*(D(?:EG)?(?:REES)?)\s*([0-5]?[0-9])\s*(M(?:IN)?(?:UTES)?)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(S(?:EC)?(?:ONDS)?)\s*(EAST|WEST|[EW])?$/i, xt = /^(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*([•º°\.:]|D(?:EG)?(?:REES)?)?\s*,?([0-5]?[0-9](?:[\.,]\d{1,})?)?\s*(['′´’\.:]|M(?:IN)?(?:UTES)?)?\s*,?((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(''|′′|’’|´´|["″”\.])?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*([•º°\.:]|D(?:EG)?(?:REES)?)?\s*,?([0-5]?[0-9](?:[\.,]\d{1,})?)?\s*(['′´’\.:]|M(?:IN)?(?:UTES)?)?\s*,?((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(''|′′|´´|’’|["″”\.])?\s*(EAST|WEST|[EW])?$/i;
|
|
1140
|
-
function
|
|
1140
|
+
function Rn(i) {
|
|
1141
1141
|
if (!["DMS", "DM", "DD"].includes(i))
|
|
1142
1142
|
throw new Error("invalid format specified");
|
|
1143
1143
|
if (this.decimalCoordinates && this.decimalCoordinates.trim()) {
|
|
@@ -1247,8 +1247,8 @@ function kt(i, e) {
|
|
|
1247
1247
|
decimalLongitude: n,
|
|
1248
1248
|
decimalCoordinates: `${t},${n}`,
|
|
1249
1249
|
originalFormat: c,
|
|
1250
|
-
closeEnough:
|
|
1251
|
-
toCoordinateFormat:
|
|
1250
|
+
closeEnough: Dn,
|
|
1251
|
+
toCoordinateFormat: Rn
|
|
1252
1252
|
});
|
|
1253
1253
|
} else
|
|
1254
1254
|
throw new Error("coordinates pattern match failed");
|
|
@@ -1276,7 +1276,7 @@ function ei(i, e) {
|
|
|
1276
1276
|
const t = Math.abs(i - e);
|
|
1277
1277
|
return Number(t.toFixed(6)) <= 1e-5;
|
|
1278
1278
|
}
|
|
1279
|
-
function
|
|
1279
|
+
function Dn(i) {
|
|
1280
1280
|
if (!i)
|
|
1281
1281
|
throw new Error("coords must be provided");
|
|
1282
1282
|
if (i.includes(",")) {
|
|
@@ -1694,7 +1694,7 @@ function ni(i) {
|
|
|
1694
1694
|
let e, t, n, r, l;
|
|
1695
1695
|
return t = new Nn({}), {
|
|
1696
1696
|
c() {
|
|
1697
|
-
e =
|
|
1697
|
+
e = D("button"), _e(t.$$.fragment), a(e, "type", "button"), a(
|
|
1698
1698
|
e,
|
|
1699
1699
|
"title",
|
|
1700
1700
|
/*reverseButtonTitle*/
|
|
@@ -1757,7 +1757,7 @@ function Hn(i) {
|
|
|
1757
1757
|
}
|
|
1758
1758
|
return {
|
|
1759
1759
|
c() {
|
|
1760
|
-
e =
|
|
1760
|
+
e = D("ul");
|
|
1761
1761
|
for (let u = 0; u < t.length; u += 1)
|
|
1762
1762
|
t[u].c();
|
|
1763
1763
|
a(e, "class", "options svelte-bz0zu3"), a(e, "role", "listbox");
|
|
@@ -1818,7 +1818,7 @@ function Zn(i) {
|
|
|
1818
1818
|
let e, t, n, r, l, c;
|
|
1819
1819
|
return t = new mi({}), {
|
|
1820
1820
|
c() {
|
|
1821
|
-
e =
|
|
1821
|
+
e = D("div"), _e(t.$$.fragment), n = ee(), r = D("div"), l = Le(
|
|
1822
1822
|
/*noResultsMessage*/
|
|
1823
1823
|
i[8]
|
|
1824
1824
|
), a(r, "class", "svelte-bz0zu3"), a(e, "class", "no-results svelte-bz0zu3");
|
|
@@ -1866,10 +1866,10 @@ function Qn(i) {
|
|
|
1866
1866
|
let e, t, n, r, l, c, s, f, u, d, h;
|
|
1867
1867
|
return t = new mi({}), f = new fi({}), {
|
|
1868
1868
|
c() {
|
|
1869
|
-
e =
|
|
1869
|
+
e = D("div"), _e(t.$$.fragment), n = ee(), r = D("div"), l = Le(
|
|
1870
1870
|
/*errorMessage*/
|
|
1871
1871
|
i[7]
|
|
1872
|
-
), c = ee(), s =
|
|
1872
|
+
), c = ee(), s = D("button"), _e(f.$$.fragment), a(r, "class", "svelte-bz0zu3"), a(s, "class", "svelte-bz0zu3"), a(e, "class", "error svelte-bz0zu3");
|
|
1873
1873
|
},
|
|
1874
1874
|
m(v, y) {
|
|
1875
1875
|
I(v, e, y), me(t, e, null), M(e, n), M(e, r), M(r, l), M(e, c), M(e, s), me(f, s, null), u = !0, d || (h = Z(
|
|
@@ -2025,7 +2025,7 @@ function Kn(i) {
|
|
|
2025
2025
|
}
|
|
2026
2026
|
return ~(p = ye(i)) && (S = m[p] = L[p](i)), {
|
|
2027
2027
|
c() {
|
|
2028
|
-
e = ee(), t =
|
|
2028
|
+
e = ee(), t = D("form"), n = D("div"), r = D("button"), _e(l.$$.fragment), c = ee(), s = D("input"), f = ee(), u = D("div"), d = D("button"), _e(h.$$.fragment), v = ee(), w && w.c(), y = ee(), g && g.c(), E = ee(), T && T.c(), O = ee(), S && S.c(), a(r, "class", "search-button svelte-bz0zu3"), a(r, "type", "button"), a(
|
|
2029
2029
|
s,
|
|
2030
2030
|
"placeholder",
|
|
2031
2031
|
/*placeholder*/
|
|
@@ -2239,7 +2239,7 @@ function Vn(i, e, t) {
|
|
|
2239
2239
|
const Ct = [];
|
|
2240
2240
|
let { reverseGeocodingTypes: Qe = Ct } = e, { exhaustiveReverseGeocoding: st = !1 } = e, { excludeTypes: ot = !1 } = e;
|
|
2241
2241
|
const Wt = void 0;
|
|
2242
|
-
let { reverseGeocodingExcludeTypes: Ke = Wt } = e, { zoom: Ve = f } = e, { apiUrl: at = "https://api.maptiler.com/geocoding" } = e, { fetchParameters: lt = {} } = e, { iconsBaseUrl: Ot = "https://cdn.maptiler.com/maptiler-geocoding-control/v2.1.
|
|
2242
|
+
let { reverseGeocodingExcludeTypes: Ke = Wt } = e, { zoom: Ve = f } = e, { apiUrl: at = "https://api.maptiler.com/geocoding" } = e, { fetchParameters: lt = {} } = e, { iconsBaseUrl: Ot = "https://cdn.maptiler.com/maptiler-geocoding-control/v2.1.4-rc1/icons/" } = e, { adjustUrlQuery: ut = () => {
|
|
2243
2243
|
} } = e, { adjustUrl: ct = () => {
|
|
2244
2244
|
} } = e;
|
|
2245
2245
|
function bi(o) {
|
|
@@ -2249,7 +2249,7 @@ function Vn(i, e, t) {
|
|
|
2249
2249
|
re.blur();
|
|
2250
2250
|
}
|
|
2251
2251
|
function zt(o, A = !0, F = !1) {
|
|
2252
|
-
t(1, K = o), A ? (t(15, z = -1),
|
|
2252
|
+
t(1, K = o), A ? (t(15, z = -1), Dt()) : (Ut(void 0, !F, F), setTimeout(() => {
|
|
2253
2253
|
re.focus(), re.select();
|
|
2254
2254
|
}));
|
|
2255
2255
|
}
|
|
@@ -2259,12 +2259,12 @@ function Vn(i, e, t) {
|
|
|
2259
2259
|
function _i() {
|
|
2260
2260
|
t(64, G = []), t(14, b = void 0);
|
|
2261
2261
|
}
|
|
2262
|
-
let k, G, b,
|
|
2262
|
+
let k, G, b, Rt = "", re, z = -1, le, Ye = [], we, Ne, Me, dt, de = !1;
|
|
2263
2263
|
const yi = /* @__PURE__ */ new Set(), be = ci();
|
|
2264
2264
|
$i(() => {
|
|
2265
2265
|
m && (m.setEventHandler(void 0), m.indicateReverse(!1), m.setSelectedMarker(-1), m.setFeatures(void 0, void 0, !1));
|
|
2266
2266
|
});
|
|
2267
|
-
function
|
|
2267
|
+
function Dt(o) {
|
|
2268
2268
|
if (t(17, de = !1), Ne && (clearTimeout(Ne), Ne = void 0), z > -1 && k)
|
|
2269
2269
|
t(14, b = k[z]), t(1, K = b.place_type[0] === "reverse" ? b.place_name : b.place_name.replace(/,.*/, "")), t(19, le = void 0), t(64, G = void 0), t(15, z = -1);
|
|
2270
2270
|
else if (K) {
|
|
@@ -2287,24 +2287,24 @@ function Vn(i, e, t) {
|
|
|
2287
2287
|
const x = new AbortController();
|
|
2288
2288
|
t(20, we = x);
|
|
2289
2289
|
try {
|
|
2290
|
-
const
|
|
2290
|
+
const R = ft(o), De = new URL(at + "/" + encodeURIComponent(R ? R.decimalLongitude + "," + R.decimalLatitude : o) + ".json"), ie = De.searchParams;
|
|
2291
2291
|
g !== void 0 && ie.set("language", Array.isArray(g) ? g.join(",") : g ?? "");
|
|
2292
2292
|
const [bt] = (m == null ? void 0 : m.getCenterAndZoom()) ?? [];
|
|
2293
|
-
let ce = ($ = !
|
|
2293
|
+
let ce = ($ = !R || Qe === Ct ? rt : Qe) == null ? void 0 : $.map((V) => typeof V == "string" ? V : bt === void 0 || (V[0] ?? 0) <= bt && bt < (V[1] ?? 1 / 0) ? V[2] : void 0).filter((V) => V !== void 0);
|
|
2294
2294
|
ce && (ce = [...new Set(ce)], ie.set("types", ce.join(",")));
|
|
2295
|
-
const At = !
|
|
2296
|
-
if (At && ie.set("excludeTypes", String(At)), h && ie.set("bbox", h.map((V) => V.toFixed(6)).join(",")), S && ie.set("country", Array.isArray(S) ? S.join(",") : S), !A && !
|
|
2295
|
+
const At = !R || Ke === Wt ? ot : Ke;
|
|
2296
|
+
if (At && ie.set("excludeTypes", String(At)), h && ie.set("bbox", h.map((V) => V.toFixed(6)).join(",")), S && ie.set("country", Array.isArray(S) ? S.join(",") : S), !A && !R) {
|
|
2297
2297
|
const V = await On(m, ae, x);
|
|
2298
2298
|
V && ie.set("proximity", V), (F || !He) && ie.set("autocomplete", "false"), ie.set("fuzzyMatch", String(w));
|
|
2299
2299
|
}
|
|
2300
2300
|
const Ue = L === T ? N : L;
|
|
2301
|
-
Ue !== void 0 && Ue > 1 && (ce == null ? void 0 : ce.length) !== 1 && console.warn("For reverse geocoding when limit > 1 then types must contain single value."),
|
|
2302
|
-
const Pi =
|
|
2303
|
-
if (Xe ===
|
|
2301
|
+
Ue !== void 0 && Ue > 1 && (ce == null ? void 0 : ce.length) !== 1 && console.warn("For reverse geocoding when limit > 1 then types must contain single value."), R ? (Ue === 1 || Ue !== void 0 && (st || (ce == null ? void 0 : ce.length) === 1)) && ie.set("limit", String(Ue)) : N !== void 0 && ie.set("limit", String(N)), ie.set("key", d), ut(ie), ct(De);
|
|
2302
|
+
const Pi = De.searchParams.get("types") === "" && De.searchParams.get("excludeTypes") !== "true", Xe = De.toString();
|
|
2303
|
+
if (Xe === Rt) {
|
|
2304
2304
|
A ? (E && t(13, k = void 0), t(14, b = Ye[0])) : (t(13, k = Ye), ((ue = k[z]) == null ? void 0 : ue.id) !== (r == null ? void 0 : r.id) && t(15, z = -1));
|
|
2305
2305
|
return;
|
|
2306
2306
|
}
|
|
2307
|
-
|
|
2307
|
+
Rt = Xe;
|
|
2308
2308
|
let Ie;
|
|
2309
2309
|
if (Pi)
|
|
2310
2310
|
Ie = { type: "FeatureCollection", features: [] };
|
|
@@ -2314,29 +2314,29 @@ function Vn(i, e, t) {
|
|
|
2314
2314
|
throw new Error(await V.text());
|
|
2315
2315
|
Ie = await V.json();
|
|
2316
2316
|
}
|
|
2317
|
-
be("response", { url: Xe, featureCollection: Ie }), A ? (E && t(13, k = void 0), t(14, b = Ie.features[0]), Ye = [b]) : (t(13, k = Ie.features.filter(X)),
|
|
2317
|
+
be("response", { url: Xe, featureCollection: Ie }), A ? (E && t(13, k = void 0), t(14, b = Ie.features[0]), Ye = [b]) : (t(13, k = Ie.features.filter(X)), R && k.unshift({
|
|
2318
2318
|
type: "Feature",
|
|
2319
2319
|
properties: {},
|
|
2320
|
-
id: "reverse_" +
|
|
2321
|
-
text:
|
|
2322
|
-
place_name:
|
|
2320
|
+
id: "reverse_" + R.decimalLongitude + "_" + R.decimalLatitude,
|
|
2321
|
+
text: R.decimalLatitude + ", " + R.decimalLongitude,
|
|
2322
|
+
place_name: R.decimalLatitude + ", " + R.decimalLongitude,
|
|
2323
2323
|
place_type: ["reverse"],
|
|
2324
|
-
center: [
|
|
2324
|
+
center: [R.decimalLongitude, R.decimalLatitude],
|
|
2325
2325
|
bbox: [
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2326
|
+
R.decimalLongitude,
|
|
2327
|
+
R.decimalLatitude,
|
|
2328
|
+
R.decimalLongitude,
|
|
2329
|
+
R.decimalLatitude
|
|
2330
2330
|
],
|
|
2331
2331
|
geometry: {
|
|
2332
2332
|
type: "Point",
|
|
2333
|
-
coordinates: [
|
|
2333
|
+
coordinates: [R.decimalLongitude, R.decimalLatitude]
|
|
2334
2334
|
}
|
|
2335
|
-
}), Ye = k, ((ve = k[z]) == null ? void 0 : ve.id) !== (r == null ? void 0 : r.id) && t(15, z = -1),
|
|
2336
|
-
} catch (
|
|
2337
|
-
if (
|
|
2335
|
+
}), Ye = k, ((ve = k[z]) == null ? void 0 : ve.id) !== (r == null ? void 0 : r.id) && t(15, z = -1), R && re.focus());
|
|
2336
|
+
} catch (R) {
|
|
2337
|
+
if (R && typeof R == "object" && "name" in R && R.name === "AbortError")
|
|
2338
2338
|
return;
|
|
2339
|
-
throw
|
|
2339
|
+
throw R;
|
|
2340
2340
|
} finally {
|
|
2341
2341
|
x === we && t(20, we = void 0);
|
|
2342
2342
|
}
|
|
@@ -2348,17 +2348,17 @@ function Vn(i, e, t) {
|
|
|
2348
2348
|
const o = [180, 90, -180, -90], A = !G.some(($) => !$.matching_text);
|
|
2349
2349
|
let F;
|
|
2350
2350
|
for (const $ of G) {
|
|
2351
|
-
const ue =
|
|
2351
|
+
const ue = Re($);
|
|
2352
2352
|
if (F = F === void 0 ? ue : ue === void 0 ? F : Math.max(F, ue), A || !$.matching_text)
|
|
2353
2353
|
for (const ve of [0, 1, 2, 3])
|
|
2354
2354
|
o[ve] = Math[ve < 2 ? "min" : "max"](o[ve], ((x = $.bbox) == null ? void 0 : x[ve]) ?? $.center[ve % 2]);
|
|
2355
2355
|
}
|
|
2356
|
-
m && G.length > 0 && (b && o[0] === o[2] && o[1] === o[3] ? m.flyTo(b.center,
|
|
2356
|
+
m && G.length > 0 && (b && o[0] === o[2] && o[1] === o[3] ? m.flyTo(b.center, Re(b)) : m.fitBounds(Kt(o), 50, F));
|
|
2357
2357
|
}
|
|
2358
2358
|
function gt() {
|
|
2359
|
-
!b || !m || (!b.bbox || b.bbox[0] === b.bbox[2] && b.bbox[1] === b.bbox[3] ? m.flyTo(b.center,
|
|
2359
|
+
!b || !m || (!b.bbox || b.bbox[0] === b.bbox[2] && b.bbox[1] === b.bbox[3] ? m.flyTo(b.center, Re(b)) : m.fitBounds(Kt(b.bbox), 50, Re(b)));
|
|
2360
2360
|
}
|
|
2361
|
-
function
|
|
2361
|
+
function Re(o) {
|
|
2362
2362
|
var F;
|
|
2363
2363
|
if (!o.bbox || o.bbox[0] !== o.bbox[2] && o.bbox[1] !== o.bbox[3])
|
|
2364
2364
|
return;
|
|
@@ -2414,7 +2414,7 @@ function Vn(i, e, t) {
|
|
|
2414
2414
|
}
|
|
2415
2415
|
const Mi = () => t(17, de = !0), Ci = () => t(17, de = !1), Wi = () => t(17, de = !0), Oi = () => t(14, b = void 0), zi = () => {
|
|
2416
2416
|
t(1, K = ""), t(14, b = void 0), re.focus();
|
|
2417
|
-
},
|
|
2417
|
+
}, Ri = () => t(0, te = !te), Di = () => t(19, le = void 0), Ui = (o) => It(o), Ii = (o) => ht(o), Ai = () => {
|
|
2418
2418
|
};
|
|
2419
2419
|
return i.$$set = (o) => {
|
|
2420
2420
|
"class" in o && t(2, u = o.class), "apiKey" in o && t(29, d = o.apiKey), "bbox" in o && t(30, h = o.bbox), "clearButtonTitle" in o && t(3, v = o.clearButtonTitle), "clearOnBlur" in o && t(31, y = o.clearOnBlur), "clearListOnPick" in o && t(32, E = o.clearListOnPick), "keepListOpen" in o && t(4, O = o.keepListOpen), "collapsed" in o && t(5, p = o.collapsed), "country" in o && t(33, S = o.country), "debounceSearch" in o && t(34, W = o.debounceSearch), "enableReverse" in o && t(6, C = o.enableReverse), "errorMessage" in o && t(7, H = o.errorMessage), "filter" in o && t(35, X = o.filter), "flyTo" in o && t(36, Q = o.flyTo), "fuzzyMatch" in o && t(37, w = o.fuzzyMatch), "language" in o && t(38, g = o.language), "limit" in o && t(39, N = o.limit), "reverseGeocodingLimit" in o && t(40, L = o.reverseGeocodingLimit), "mapController" in o && t(41, m = o.mapController), "minLength" in o && t(42, ye = o.minLength), "noResultsMessage" in o && t(8, _ = o.noResultsMessage), "placeholder" in o && t(9, B = o.placeholder), "proximity" in o && t(43, ae = o.proximity), "reverseActive" in o && t(0, te = o.reverseActive), "reverseButtonTitle" in o && t(10, Nt = o.reverseButtonTitle), "searchValue" in o && t(1, K = o.searchValue), "pickedResultStyle" in o && t(44, Ge = o.pickedResultStyle), "showPlaceType" in o && t(11, Mt = o.showPlaceType), "showResultsWhileTyping" in o && t(45, He = o.showResultsWhileTyping), "selectFirst" in o && t(46, Te = o.selectFirst), "flyToSelected" in o && t(47, Ze = o.flyToSelected), "markerOnSelected" in o && t(48, qe = o.markerOnSelected), "types" in o && t(49, rt = o.types), "reverseGeocodingTypes" in o && t(50, Qe = o.reverseGeocodingTypes), "exhaustiveReverseGeocoding" in o && t(51, st = o.exhaustiveReverseGeocoding), "excludeTypes" in o && t(52, ot = o.excludeTypes), "reverseGeocodingExcludeTypes" in o && t(53, Ke = o.reverseGeocodingExcludeTypes), "zoom" in o && t(54, Ve = o.zoom), "apiUrl" in o && t(55, at = o.apiUrl), "fetchParameters" in o && t(56, lt = o.fetchParameters), "iconsBaseUrl" in o && t(12, Ot = o.iconsBaseUrl), "adjustUrlQuery" in o && t(57, ut = o.adjustUrlQuery), "adjustUrl" in o && t(58, ct = o.adjustUrl), "$$scope" in o && t(69, s = o.$$scope);
|
|
@@ -2459,7 +2459,7 @@ function Vn(i, e, t) {
|
|
|
2459
2459
|
}), i.$$.dirty[0] & /*listFeatures, selectedItemIndex*/
|
|
2460
2460
|
40960 && t(66, r = k == null ? void 0 : k[z]), i.$$.dirty[1] & /*mapController, flyTo, flyToSelected*/
|
|
2461
2461
|
66592 | i.$$.dirty[2] & /*selected*/
|
|
2462
|
-
16 && m && r && Q && Ze && m.flyTo(r.center,
|
|
2462
|
+
16 && m && r && Q && Ze && m.flyTo(r.center, Re(r)), i.$$.dirty[1] & /*pickedResultStyle*/
|
|
2463
2463
|
8192 && t(68, n = Ge === "full-geometry-including-polygon-center-marker"), i.$$.dirty[1] & /*markerOnSelected, mapController*/
|
|
2464
2464
|
132096 | i.$$.dirty[2] & /*showPolygonMarker*/
|
|
2465
2465
|
64 && (qe || m == null || m.setFeatures(void 0, void 0, n)), i.$$.dirty[0] & /*picked*/
|
|
@@ -2511,7 +2511,7 @@ function Vn(i, e, t) {
|
|
|
2511
2511
|
le,
|
|
2512
2512
|
we,
|
|
2513
2513
|
yi,
|
|
2514
|
-
|
|
2514
|
+
Dt,
|
|
2515
2515
|
Si,
|
|
2516
2516
|
Ut,
|
|
2517
2517
|
ht,
|
|
@@ -2568,8 +2568,8 @@ function Vn(i, e, t) {
|
|
|
2568
2568
|
Wi,
|
|
2569
2569
|
Oi,
|
|
2570
2570
|
zi,
|
|
2571
|
-
Di,
|
|
2572
2571
|
Ri,
|
|
2572
|
+
Di,
|
|
2573
2573
|
Ui,
|
|
2574
2574
|
Ii,
|
|
2575
2575
|
Ai
|