@maptiler/geocoding-control 3.0.0-rc.7 → 3.0.0-rc.8
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/check-version.js +69 -0
- package/dist/check-version.d.ts +1 -0
- package/dist/index.js +9 -9
- package/dist/index.js.map +1 -1
- package/dist/index.umd.js +3 -3
- package/dist/index.umd.js.map +1 -1
- package/dist/leaflet.public.js +9 -9
- package/dist/leaflet.public.js.map +1 -1
- package/dist/leaflet.public.umd.js +3 -3
- package/dist/leaflet.public.umd.js.map +1 -1
- package/dist/maplibregl.js +67 -67
- package/dist/maplibregl.js.map +1 -1
- package/dist/maplibregl.umd.js +4 -4
- package/dist/maplibregl.umd.js.map +1 -1
- package/dist/maptilersdk.js +102 -102
- package/dist/maptilersdk.js.map +1 -1
- package/dist/maptilersdk.umd.js +4 -4
- package/dist/maptilersdk.umd.js.map +1 -1
- package/dist/openlayers.public.js +11 -10
- package/dist/openlayers.public.js.map +1 -1
- package/dist/openlayers.public.umd.js +4 -4
- package/dist/openlayers.public.umd.js.map +1 -1
- package/dist/src/components/clear-icon.d.ts +1 -0
- package/dist/src/components/fail-icon.d.ts +1 -0
- package/dist/src/components/loading-icon.d.ts +1 -0
- package/dist/src/components/marker.d.ts +1 -0
- package/dist/src/components/reverse-geocoding-icon.d.ts +1 -0
- package/dist/src/components/search-icon.d.ts +1 -0
- package/dist/src/controls/maplibregl-control.d.ts +2 -7
- package/dist/src/controls/maplibregl-events.d.ts +2 -3
- package/dist/src/controls/maplibregl-options.d.ts +1 -9
- package/dist/src/geocoder/geocoder-feature-item.d.ts +1 -0
- package/dist/src/geocoder/geocoder.d.ts +1 -0
- package/dist/src/index.d.ts +1 -0
- package/dist/src/leaflet.public.d.ts +1 -0
- package/dist/src/maplibregl.d.ts +1 -0
- package/dist/src/maptilersdk.d.ts +1 -0
- package/dist/src/openlayers.public.d.ts +1 -0
- package/package.json +20 -10
package/dist/maplibregl.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { css as I, LitElement as F, svg as z, html as m, unsafeCSS as
|
|
1
|
+
import { css as I, LitElement as F, svg as z, html as m, unsafeCSS as ce, nothing as J } from "lit";
|
|
2
2
|
import { customElement as O, property as p, state as b, query as De } from "lit/decorators.js";
|
|
3
3
|
import { convert as Ve } from "geo-coordinates-parser";
|
|
4
4
|
import { classMap as W } from "lit/directives/class-map.js";
|
|
@@ -7,7 +7,7 @@ import "@turf/clone";
|
|
|
7
7
|
import { styleMap as Ne } from "lit/directives/style-map.js";
|
|
8
8
|
import { featureCollection as D, polygon as Ze, feature as Qe } from "@turf/helpers";
|
|
9
9
|
import Le from "@turf/union";
|
|
10
|
-
import
|
|
10
|
+
import H from "maplibre-gl";
|
|
11
11
|
import be from "@turf/bbox";
|
|
12
12
|
import Ke from "@turf/difference";
|
|
13
13
|
import Ye from "@turf/flatten";
|
|
@@ -16,7 +16,7 @@ var He = Object.getOwnPropertyDescriptor, Je = (t, e, i, a) => {
|
|
|
16
16
|
(r = t[o]) && (s = r(s) || s);
|
|
17
17
|
return s;
|
|
18
18
|
};
|
|
19
|
-
let
|
|
19
|
+
let X = class extends F {
|
|
20
20
|
render() {
|
|
21
21
|
return z`
|
|
22
22
|
<svg viewBox="0 0 14 14" width="13" height="13">
|
|
@@ -27,21 +27,21 @@ let J = class extends F {
|
|
|
27
27
|
`;
|
|
28
28
|
}
|
|
29
29
|
};
|
|
30
|
-
|
|
30
|
+
X.styles = I`
|
|
31
31
|
svg {
|
|
32
32
|
display: block;
|
|
33
33
|
fill: var(--color-icon-button);
|
|
34
34
|
}
|
|
35
35
|
`;
|
|
36
|
-
|
|
36
|
+
X = Je([
|
|
37
37
|
O("maptiler-geocode-clear-icon")
|
|
38
|
-
],
|
|
38
|
+
], X);
|
|
39
39
|
var Xe = Object.getOwnPropertyDescriptor, et = (t, e, i, a) => {
|
|
40
40
|
for (var s = a > 1 ? void 0 : a ? Xe(e, i) : e, o = t.length - 1, r; o >= 0; o--)
|
|
41
41
|
(r = t[o]) && (s = r(s) || s);
|
|
42
42
|
return s;
|
|
43
43
|
};
|
|
44
|
-
let
|
|
44
|
+
let ee = class extends F {
|
|
45
45
|
render() {
|
|
46
46
|
return z`
|
|
47
47
|
<svg viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
@@ -52,21 +52,21 @@ let X = class extends F {
|
|
|
52
52
|
`;
|
|
53
53
|
}
|
|
54
54
|
};
|
|
55
|
-
|
|
55
|
+
ee.styles = I`
|
|
56
56
|
svg {
|
|
57
57
|
display: block;
|
|
58
58
|
fill: #e15042;
|
|
59
59
|
}
|
|
60
60
|
`;
|
|
61
|
-
|
|
61
|
+
ee = et([
|
|
62
62
|
O("maptiler-geocode-fail-icon")
|
|
63
|
-
],
|
|
63
|
+
], ee);
|
|
64
64
|
var tt = Object.getOwnPropertyDescriptor, it = (t, e, i, a) => {
|
|
65
65
|
for (var s = a > 1 ? void 0 : a ? tt(e, i) : e, o = t.length - 1, r; o >= 0; o--)
|
|
66
66
|
(r = t[o]) && (s = r(s) || s);
|
|
67
67
|
return s;
|
|
68
68
|
};
|
|
69
|
-
let
|
|
69
|
+
let te = class extends F {
|
|
70
70
|
render() {
|
|
71
71
|
return m`
|
|
72
72
|
<div>
|
|
@@ -78,7 +78,7 @@ let ee = class extends F {
|
|
|
78
78
|
`;
|
|
79
79
|
}
|
|
80
80
|
};
|
|
81
|
-
|
|
81
|
+
te.styles = I`
|
|
82
82
|
div {
|
|
83
83
|
position: absolute;
|
|
84
84
|
left: 50%;
|
|
@@ -105,15 +105,15 @@ ee.styles = I`
|
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
107
|
`;
|
|
108
|
-
|
|
108
|
+
te = it([
|
|
109
109
|
O("maptiler-geocode-loading-icon")
|
|
110
|
-
],
|
|
110
|
+
], te);
|
|
111
111
|
var st = Object.getOwnPropertyDescriptor, rt = (t, e, i, a) => {
|
|
112
112
|
for (var s = a > 1 ? void 0 : a ? st(e, i) : e, o = t.length - 1, r; o >= 0; o--)
|
|
113
113
|
(r = t[o]) && (s = r(s) || s);
|
|
114
114
|
return s;
|
|
115
115
|
};
|
|
116
|
-
let
|
|
116
|
+
let ie = class extends F {
|
|
117
117
|
render() {
|
|
118
118
|
return z`
|
|
119
119
|
<svg viewBox="0 0 60.006 21.412" width="14" height="20">
|
|
@@ -124,21 +124,21 @@ let te = class extends F {
|
|
|
124
124
|
`;
|
|
125
125
|
}
|
|
126
126
|
};
|
|
127
|
-
|
|
127
|
+
ie.styles = I`
|
|
128
128
|
svg {
|
|
129
129
|
display: block;
|
|
130
130
|
fill: var(--color-icon-button);
|
|
131
131
|
}
|
|
132
132
|
`;
|
|
133
|
-
|
|
133
|
+
ie = rt([
|
|
134
134
|
O("maptiler-geocode-reverse-geocoding-icon")
|
|
135
|
-
],
|
|
135
|
+
], ie);
|
|
136
136
|
var ot = Object.getOwnPropertyDescriptor, at = (t, e, i, a) => {
|
|
137
137
|
for (var s = a > 1 ? void 0 : a ? ot(e, i) : e, o = t.length - 1, r; o >= 0; o--)
|
|
138
138
|
(r = t[o]) && (s = r(s) || s);
|
|
139
139
|
return s;
|
|
140
140
|
};
|
|
141
|
-
let
|
|
141
|
+
let se = class extends F {
|
|
142
142
|
render() {
|
|
143
143
|
return z`
|
|
144
144
|
<svg
|
|
@@ -153,7 +153,7 @@ let ie = class extends F {
|
|
|
153
153
|
`;
|
|
154
154
|
}
|
|
155
155
|
};
|
|
156
|
-
|
|
156
|
+
se.styles = I`
|
|
157
157
|
circle {
|
|
158
158
|
stroke-width: 1.875;
|
|
159
159
|
fill: none;
|
|
@@ -169,9 +169,9 @@ ie.styles = I`
|
|
|
169
169
|
stroke: var(--color-icon-button);
|
|
170
170
|
}
|
|
171
171
|
`;
|
|
172
|
-
|
|
172
|
+
se = at([
|
|
173
173
|
O("maptiler-geocode-search-icon")
|
|
174
|
-
],
|
|
174
|
+
], se);
|
|
175
175
|
function lt(t, e, i) {
|
|
176
176
|
const a = e[1], s = e[0], o = a - s;
|
|
177
177
|
return t === a && i ? t : ((t - s) % o + o) % o + s;
|
|
@@ -229,7 +229,7 @@ var ht = Object.defineProperty, pt = Object.getOwnPropertyDescriptor, $e = (t) =
|
|
|
229
229
|
for (var s = a > 1 ? void 0 : a ? pt(e, i) : e, o = t.length - 1, r; o >= 0; o--)
|
|
230
230
|
(r = t[o]) && (s = (a ? r(e, i, s) : r(s)) || s);
|
|
231
231
|
return a && s && ht(e, i, s), s;
|
|
232
|
-
}, Ie = (t, e, i) => e.has(t) || $e("Cannot " + i), f = (t, e, i) => (Ie(t, e, "read from private field"), i ? i.call(t) : e.get(t)), dt = (t, e, i) => e.has(t) ? $e("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, i), C = (t, e, i) => (Ie(t, e, "access private method"), i), d, q, B, g, Fe, Oe, he,
|
|
232
|
+
}, Ie = (t, e, i) => e.has(t) || $e("Cannot " + i), f = (t, e, i) => (Ie(t, e, "read from private field"), i ? i.call(t) : e.get(t)), dt = (t, e, i) => e.has(t) ? $e("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, i), C = (t, e, i) => (Ie(t, e, "access private method"), i), d, q, B, g, Fe, Oe, he, re;
|
|
233
233
|
const Te = typeof devicePixelRatio > "u" || devicePixelRatio > 1.25, Me = Te ? "@2x" : "", S = Te ? 2 : 1;
|
|
234
234
|
let M, Se, w = class extends F {
|
|
235
235
|
constructor() {
|
|
@@ -266,7 +266,7 @@ let M, Se, w = class extends F {
|
|
|
266
266
|
<span>
|
|
267
267
|
<span class="primary"> ${f(this, d, B) ? this.feature?.place_name : this.feature?.place_name.replace(/,.*/, "")} </span>
|
|
268
268
|
|
|
269
|
-
${this.showPlaceType === "always" || this.showPlaceType !== "never" && !this.feature?.address && !this.feature?.id.startsWith("road.") && !this.feature?.id.startsWith("address.") && !this.feature?.id.startsWith("postal_code.") && (!this.feature?.id.startsWith("poi.") || !this.imageUrl) && !f(this, d, B) ? m` <span class="secondary"> ${f(this, d, g)} </span> ` :
|
|
269
|
+
${this.showPlaceType === "always" || this.showPlaceType !== "never" && !this.feature?.address && !this.feature?.id.startsWith("road.") && !this.feature?.id.startsWith("address.") && !this.feature?.id.startsWith("postal_code.") && (!this.feature?.id.startsWith("poi.") || !this.imageUrl) && !f(this, d, B) ? m` <span class="secondary"> ${f(this, d, g)} </span> ` : J}
|
|
270
270
|
</span>
|
|
271
271
|
|
|
272
272
|
<span class="line2"> ${f(this, d, B) ? this.feature?.text : this.feature?.place_name.replace(/[^,]*,?s*/, "")} </span>
|
|
@@ -296,11 +296,11 @@ Oe = function() {
|
|
|
296
296
|
this.imageUrl && this.missingIconsCache.add(this.imageUrl), C(this, d, he).call(this);
|
|
297
297
|
};
|
|
298
298
|
he = function() {
|
|
299
|
-
M !== void 0 ? C(this, d,
|
|
300
|
-
C(this, d,
|
|
299
|
+
M !== void 0 ? C(this, d, re).call(this) : (C(this, d, Fe).call(this), Se?.then(() => {
|
|
300
|
+
C(this, d, re).call(this);
|
|
301
301
|
}));
|
|
302
302
|
};
|
|
303
|
-
|
|
303
|
+
re = function() {
|
|
304
304
|
do {
|
|
305
305
|
if (this.index--, this.category = f(this, d, q)?.[this.index], this.spriteIcon = this.category ? M?.icons[this.category] : void 0, this.spriteIcon)
|
|
306
306
|
break;
|
|
@@ -308,7 +308,7 @@ se = function() {
|
|
|
308
308
|
} while (this.index > -1 && (!this.imageUrl || this.missingIconsCache.has(this.imageUrl)));
|
|
309
309
|
};
|
|
310
310
|
w.styles = I`
|
|
311
|
-
${
|
|
311
|
+
${ce(ct)}
|
|
312
312
|
`;
|
|
313
313
|
L([
|
|
314
314
|
p({ type: Object })
|
|
@@ -347,13 +347,13 @@ var ft = Object.defineProperty, mt = Object.getOwnPropertyDescriptor, Ce = (t) =
|
|
|
347
347
|
for (var s = a > 1 ? void 0 : a ? mt(e, i) : e, o = t.length - 1, r; o >= 0; o--)
|
|
348
348
|
(r = t[o]) && (s = (a ? r(e, i, s) : r(s)) || s);
|
|
349
349
|
return a && s && ft(e, i, s), s;
|
|
350
|
-
}, pe = (t, e, i) => e.has(t) || Ce("Cannot " + i), k = (t, e, i) => (pe(t, e, "read from private field"), i ? i.call(t) : e.get(t)), U = (t, e, i) => e.has(t) ? Ce("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, i),
|
|
350
|
+
}, pe = (t, e, i) => e.has(t) || Ce("Cannot " + i), k = (t, e, i) => (pe(t, e, "read from private field"), i ? i.call(t) : e.get(t)), U = (t, e, i) => e.has(t) ? Ce("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, i), oe = (t, e, i, a) => (pe(t, e, "write to private field"), e.set(t, i), i), h = (t, e, i) => (pe(t, e, "access private method"), i), N, G, ae, R, l, Z, Ee, de, x, ue, Q, fe, me, $, ge, K, Pe, le, Ue, Be, Ge, Re, ze, je, We;
|
|
351
351
|
let n = class extends F {
|
|
352
352
|
constructor() {
|
|
353
|
-
super(...arguments), U(this, l), this.clearListOnPick = !1, this.clearOnBlur = !1, this.collapsed = !1, this.excludeTypes = !1, this.exhaustiveReverseGeocoding = !1, this.fetchFullGeometryOnPick = !1, this.keepListOpen = !1, this.openListOnTop = !1, this.reverseActive = !1, this.searchValue = "", this.selectedItemIndex = -1, this.cachedFeatures = [], this.lastSearchUrl = "", this.focused = !1, this.isFeatureListVisible = !1, this.isFeatureListInteractedWith = !1, U(this, N, !1), U(this, G), U(this,
|
|
353
|
+
super(...arguments), U(this, l), this.clearListOnPick = !1, this.clearOnBlur = !1, this.collapsed = !1, this.excludeTypes = !1, this.exhaustiveReverseGeocoding = !1, this.fetchFullGeometryOnPick = !1, this.keepListOpen = !1, this.openListOnTop = !1, this.reverseActive = !1, this.searchValue = "", this.selectedItemIndex = -1, this.cachedFeatures = [], this.lastSearchUrl = "", this.focused = !1, this.isFeatureListVisible = !1, this.isFeatureListInteractedWith = !1, U(this, N, !1), U(this, G), U(this, ae, /* @__PURE__ */ new Set()), U(this, R);
|
|
354
354
|
}
|
|
355
355
|
firstUpdated() {
|
|
356
|
-
|
|
356
|
+
oe(this, N, !0);
|
|
357
357
|
}
|
|
358
358
|
/**
|
|
359
359
|
* Set the options of this instance.
|
|
@@ -380,7 +380,7 @@ let n = class extends F {
|
|
|
380
380
|
* @param value text to set and submit
|
|
381
381
|
*/
|
|
382
382
|
submitQuery(t) {
|
|
383
|
-
h(this, l, ge).call(this, t);
|
|
383
|
+
h(this, l, ge).call(this, t, { external: !0 });
|
|
384
384
|
}
|
|
385
385
|
/**
|
|
386
386
|
* Clear search result list.
|
|
@@ -410,7 +410,7 @@ let n = class extends F {
|
|
|
410
410
|
}
|
|
411
411
|
/** @internal */
|
|
412
412
|
handleMapChange(t) {
|
|
413
|
-
|
|
413
|
+
oe(this, R, t);
|
|
414
414
|
}
|
|
415
415
|
/** @internal */
|
|
416
416
|
handleMapClick(t) {
|
|
@@ -445,7 +445,7 @@ let n = class extends F {
|
|
|
445
445
|
@focus=${() => this.focused = !0}
|
|
446
446
|
@blur=${() => this.focused = !1}
|
|
447
447
|
@click=${() => this.focused = !0}
|
|
448
|
-
@keydown=${h(this, l,
|
|
448
|
+
@keydown=${h(this, l, le)}
|
|
449
449
|
@input=${h(this, l, Ue)}
|
|
450
450
|
@change=${() => this.picked = void 0}
|
|
451
451
|
placeholder=${this.placeholder ?? "Search"}
|
|
@@ -469,7 +469,7 @@ let n = class extends F {
|
|
|
469
469
|
>
|
|
470
470
|
<maptiler-geocode-reverse-geocoding-icon></maptiler-geocode-reverse-geocoding-icon>
|
|
471
471
|
</button>
|
|
472
|
-
` :
|
|
472
|
+
` : J}
|
|
473
473
|
|
|
474
474
|
<!-- <slot /> -->
|
|
475
475
|
</div>
|
|
@@ -484,7 +484,7 @@ let n = class extends F {
|
|
|
484
484
|
<maptiler-geocode-clear-icon></maptiler-geocode-clear-icon>
|
|
485
485
|
</button>
|
|
486
486
|
</div>
|
|
487
|
-
` : !this.focused && !this.isFeatureListInteractedWith && !this.keepListOpen || this.listFeatures === void 0 ?
|
|
487
|
+
` : !this.focused && !this.isFeatureListInteractedWith && !this.keepListOpen || this.listFeatures === void 0 ? J : this.listFeatures.length === 0 ? m`
|
|
488
488
|
<div class="no-results">
|
|
489
489
|
<maptiler-geocode-fail-icon></maptiler-geocode-fail-icon>
|
|
490
490
|
|
|
@@ -498,7 +498,7 @@ let n = class extends F {
|
|
|
498
498
|
@pointerleave=${h(this, l, Re)}
|
|
499
499
|
@pointerdown=${h(this, l, ze)}
|
|
500
500
|
@pointerup=${h(this, l, je)}
|
|
501
|
-
@keydown=${h(this, l,
|
|
501
|
+
@keydown=${h(this, l, le)}
|
|
502
502
|
role="listbox"
|
|
503
503
|
>
|
|
504
504
|
${qe(
|
|
@@ -515,8 +515,8 @@ let n = class extends F {
|
|
|
515
515
|
@select=${() => {
|
|
516
516
|
h(this, l, Be).call(this, t);
|
|
517
517
|
}}
|
|
518
|
-
.missingIconsCache=${k(this,
|
|
519
|
-
.iconsBaseUrl=${this.iconsBaseUrl ?? "https://cdn.maptiler.com/maptiler-geocoding-control/v3.0.0-rc.
|
|
518
|
+
.missingIconsCache=${k(this, ae)}
|
|
519
|
+
.iconsBaseUrl=${this.iconsBaseUrl ?? "https://cdn.maptiler.com/maptiler-geocoding-control/v3.0.0-rc.8/icons/"}
|
|
520
520
|
/>
|
|
521
521
|
`
|
|
522
522
|
)}
|
|
@@ -528,7 +528,7 @@ let n = class extends F {
|
|
|
528
528
|
};
|
|
529
529
|
N = /* @__PURE__ */ new WeakMap();
|
|
530
530
|
G = /* @__PURE__ */ new WeakMap();
|
|
531
|
-
|
|
531
|
+
ae = /* @__PURE__ */ new WeakMap();
|
|
532
532
|
R = /* @__PURE__ */ new WeakMap();
|
|
533
533
|
l = /* @__PURE__ */ new WeakSet();
|
|
534
534
|
Z = function() {
|
|
@@ -549,10 +549,10 @@ x = function(t, ...[e]) {
|
|
|
549
549
|
})
|
|
550
550
|
);
|
|
551
551
|
};
|
|
552
|
-
ue = function(t) {
|
|
553
|
-
t?.preventDefault(), this.focused = !1, clearTimeout(k(this, G)), this.selectedItemIndex > -1 && this.listFeatures ? (this.picked = this.listFeatures[this.selectedItemIndex], this.searchValue = this.picked.place_type[0] === "reverse" ? this.picked.place_name : this.picked.place_name.replace(/,.*/, ""), this.error = void 0, this.selectedItemIndex = -1) : this.searchValue && h(this, l, K).call(this, this.searchValue, { exact: !0, external:
|
|
552
|
+
ue = function(t, { external: e = !1 } = {}) {
|
|
553
|
+
t?.preventDefault(), this.focused = !1, clearTimeout(k(this, G)), this.selectedItemIndex > -1 && this.listFeatures ? (this.picked = this.listFeatures[this.selectedItemIndex], this.searchValue = this.picked.place_type[0] === "reverse" ? this.picked.place_name : this.picked.place_name.replace(/,.*/, ""), this.error = void 0, this.selectedItemIndex = -1) : this.searchValue && h(this, l, K).call(this, this.searchValue, { exact: !0, external: e }).then(() => {
|
|
554
554
|
this.picked = void 0;
|
|
555
|
-
}).catch((
|
|
555
|
+
}).catch((i) => this.error = i);
|
|
556
556
|
};
|
|
557
557
|
Q = function(t) {
|
|
558
558
|
try {
|
|
@@ -571,7 +571,7 @@ me = function(t, { external: e = !1 } = {}) {
|
|
|
571
571
|
if (clearTimeout(k(this, G)), k(this, l, de))
|
|
572
572
|
return;
|
|
573
573
|
const i = this.searchValue;
|
|
574
|
-
|
|
574
|
+
oe(this, G, window.setTimeout(() => {
|
|
575
575
|
h(this, l, K).call(this, i, { external: e }).catch((a) => this.error = a);
|
|
576
576
|
}, this.debounceSearch ?? 200));
|
|
577
577
|
} else
|
|
@@ -580,8 +580,8 @@ me = function(t, { external: e = !1 } = {}) {
|
|
|
580
580
|
$ = function() {
|
|
581
581
|
this.listFeatures !== void 0 && (this.listFeatures = void 0, h(this, l, x).call(this, "featuresclear"));
|
|
582
582
|
};
|
|
583
|
-
ge = function(t) {
|
|
584
|
-
this.searchValue = t, h(this, l, x).call(this, "querychange", { query: this.searchValue, reverseCoords: h(this, l, Q).call(this, t) }), this.selectedItemIndex = -1, h(this, l, ue).call(this);
|
|
583
|
+
ge = function(t, { external: e = !1 } = {}) {
|
|
584
|
+
this.searchValue = t, h(this, l, x).call(this, "querychange", { query: this.searchValue, reverseCoords: h(this, l, Q).call(this, t) }), this.selectedItemIndex = -1, h(this, l, ue).call(this, void 0, { external: e });
|
|
585
585
|
};
|
|
586
586
|
K = async function(t, { byId: e = !1, exact: i = !1, external: a = !1 } = {}) {
|
|
587
587
|
this.error = void 0, this.abortController?.abort();
|
|
@@ -625,8 +625,8 @@ K = async function(t, { byId: e = !1, exact: i = !1, external: a = !1 } = {}) {
|
|
|
625
625
|
properties: {},
|
|
626
626
|
/* eslint-disable @typescript-eslint/restrict-template-expressions */
|
|
627
627
|
id: `reverse_${r.decimalLongitude}_${r.decimalLatitude}`,
|
|
628
|
-
|
|
629
|
-
|
|
628
|
+
place_name: `${r.decimalLatitude}, ${r.decimalLongitude}`,
|
|
629
|
+
text: r.toCoordinateFormat("DMS"),
|
|
630
630
|
/* eslint-enable @typescript-eslint/restrict-template-expressions */
|
|
631
631
|
place_type: ["reverse"],
|
|
632
632
|
place_type_name: ["reverse"],
|
|
@@ -648,7 +648,7 @@ K = async function(t, { byId: e = !1, exact: i = !1, external: a = !1 } = {}) {
|
|
|
648
648
|
Pe = function(t) {
|
|
649
649
|
this.reverseActive = this.enableReverse === "always", h(this, l, $).call(this), this.picked = void 0, h(this, l, ge).call(this, `${t[1].toFixed(6)}, ${lt(t[0], [-180, 180], !0).toFixed(6)}`), h(this, l, fe).call(this);
|
|
650
650
|
};
|
|
651
|
-
|
|
651
|
+
le = function(t) {
|
|
652
652
|
if (!this.listFeatures)
|
|
653
653
|
return;
|
|
654
654
|
const e = t.key === "ArrowDown" ? 1 : t.key === "ArrowUp" ? -1 : 0;
|
|
@@ -678,7 +678,7 @@ We = function() {
|
|
|
678
678
|
this.searchValue = "", h(this, l, x).call(this, "queryclear"), this.picked = void 0, this.input.focus();
|
|
679
679
|
};
|
|
680
680
|
n.styles = I`
|
|
681
|
-
${
|
|
681
|
+
${ce(ut)}
|
|
682
682
|
`;
|
|
683
683
|
c([
|
|
684
684
|
p({ attribute: !1 })
|
|
@@ -874,7 +874,7 @@ var vt = Object.getOwnPropertyDescriptor, xt = (t, e, i, a) => {
|
|
|
874
874
|
(r = t[o]) && (s = r(s) || s);
|
|
875
875
|
return s;
|
|
876
876
|
};
|
|
877
|
-
let
|
|
877
|
+
let ne = class extends F {
|
|
878
878
|
render() {
|
|
879
879
|
return z`
|
|
880
880
|
<svg
|
|
@@ -890,12 +890,12 @@ let le = class extends F {
|
|
|
890
890
|
`;
|
|
891
891
|
}
|
|
892
892
|
};
|
|
893
|
-
|
|
894
|
-
${
|
|
893
|
+
ne.styles = I`
|
|
894
|
+
${ce(yt)}
|
|
895
895
|
`;
|
|
896
|
-
|
|
896
|
+
ne = xt([
|
|
897
897
|
O("maptiler-geocode-marker")
|
|
898
|
-
],
|
|
898
|
+
], ne);
|
|
899
899
|
function ke(t) {
|
|
900
900
|
const e = Ke(
|
|
901
901
|
D([
|
|
@@ -972,8 +972,8 @@ const bt = {
|
|
|
972
972
|
},
|
|
973
973
|
filter: ["!", ["has", "isMask"]]
|
|
974
974
|
}
|
|
975
|
-
}, A = "mtlr-gc-full-geom", we = "mtlr-gc-full-geom-fill", _e = "mtlr-gc-full-geom-line"
|
|
976
|
-
class
|
|
975
|
+
}, A = "mtlr-gc-full-geom", we = "mtlr-gc-full-geom-fill", _e = "mtlr-gc-full-geom-line";
|
|
976
|
+
class Ut extends H.Evented {
|
|
977
977
|
#e = {};
|
|
978
978
|
#t;
|
|
979
979
|
#i;
|
|
@@ -1206,7 +1206,7 @@ class Rt extends wt {
|
|
|
1206
1206
|
continue;
|
|
1207
1207
|
} else
|
|
1208
1208
|
o = this.#f(this.#e.showResultMarkers).setLngLat(s.center).setPopup(
|
|
1209
|
-
new
|
|
1209
|
+
new H.Popup({
|
|
1210
1210
|
offset: [1, -27],
|
|
1211
1211
|
closeButton: !1,
|
|
1212
1212
|
closeOnMove: !0,
|
|
@@ -1253,7 +1253,7 @@ class Rt extends wt {
|
|
|
1253
1253
|
this.#a = e, this.#u();
|
|
1254
1254
|
}
|
|
1255
1255
|
#f(e) {
|
|
1256
|
-
return typeof e != "object" && (e = { element: this.#t?._container.ownerDocument.createElement("maptiler-geocode-marker"), offset: [1, -13] }), new
|
|
1256
|
+
return typeof e != "object" && (e = { element: this.#t?._container.ownerDocument.createElement("maptiler-geocode-marker"), offset: [1, -13] }), new H.Marker(e);
|
|
1257
1257
|
}
|
|
1258
1258
|
#T() {
|
|
1259
1259
|
const { fullGeometryStyle: e } = this.#e;
|
|
@@ -1264,14 +1264,14 @@ class Rt extends wt {
|
|
|
1264
1264
|
}
|
|
1265
1265
|
export {
|
|
1266
1266
|
kt as DEFAULT_GEOMETRY_STYLE,
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1267
|
+
Ut as GeocodingControl,
|
|
1268
|
+
Ut as MaplibreglGeocodingControl,
|
|
1269
|
+
X as MaptilerGeocodeClearIconElement,
|
|
1270
|
+
ee as MaptilerGeocodeFailIconElement,
|
|
1271
|
+
te as MaptilerGeocodeLoadingIconElement,
|
|
1272
|
+
ne as MaptilerGeocodeMarkerElement,
|
|
1273
|
+
ie as MaptilerGeocodeReverseGeocodingIconElement,
|
|
1274
|
+
se as MaptilerGeocodeSearchIconElement,
|
|
1275
1275
|
n as MaptilerGeocoderElement,
|
|
1276
1276
|
we as RESULT_LAYER_FILL,
|
|
1277
1277
|
_e as RESULT_LAYER_LINE,
|