@maptiler/geocoding-control 3.0.0-rc.5 → 3.0.0-rc.6
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/dist/index.js +307 -307
- package/dist/index.js.map +1 -1
- package/dist/index.umd.js +25 -25
- package/dist/index.umd.js.map +1 -1
- package/dist/leaflet.public.js +314 -313
- package/dist/leaflet.public.js.map +1 -1
- package/dist/leaflet.public.umd.js +28 -28
- package/dist/leaflet.public.umd.js.map +1 -1
- package/dist/maplibregl.js +296 -295
- package/dist/maplibregl.js.map +1 -1
- package/dist/maplibregl.umd.js +26 -26
- package/dist/maplibregl.umd.js.map +1 -1
- package/dist/maptilersdk.js +310 -309
- package/dist/maptilersdk.js.map +1 -1
- package/dist/maptilersdk.umd.js +29 -29
- package/dist/maptilersdk.umd.js.map +1 -1
- package/dist/openlayers.public.js +341 -340
- package/dist/openlayers.public.js.map +1 -1
- package/dist/openlayers.public.umd.js +33 -33
- package/dist/openlayers.public.umd.js.map +1 -1
- package/dist/src/controls/leaflet-options.d.ts +11 -1
- package/dist/src/controls/maplibregl-options.d.ts +12 -2
- package/dist/src/controls/openlayers-options.d.ts +11 -1
- package/dist/src/geocoder/geocoder-events.d.ts +1 -0
- package/dist/src/types.d.ts +1 -0
- package/package.json +1 -1
package/dist/maptilersdk.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { css as I, LitElement as O, svg as z, html as m, unsafeCSS as ce, nothing as X } from "lit";
|
|
2
|
-
import { customElement as M, property as p, state as
|
|
3
|
-
import { convert as
|
|
2
|
+
import { customElement as M, property as p, state as k, query as We } from "lit/decorators.js";
|
|
3
|
+
import { convert as Ve } from "geo-coordinates-parser";
|
|
4
4
|
import { classMap as A } from "lit/directives/class-map.js";
|
|
5
|
-
import { repeat as
|
|
5
|
+
import { repeat as qe } from "lit/directives/repeat.js";
|
|
6
6
|
import "@turf/clone";
|
|
7
|
-
import { styleMap as
|
|
8
|
-
import { config as
|
|
9
|
-
import { featureCollection as q, polygon as
|
|
10
|
-
import
|
|
7
|
+
import { styleMap as Ne } from "lit/directives/style-map.js";
|
|
8
|
+
import { config as Ze } from "@maptiler/sdk";
|
|
9
|
+
import { featureCollection as q, polygon as Ke, feature as Qe } from "@turf/helpers";
|
|
10
|
+
import $e from "@turf/union";
|
|
11
11
|
import he from "maplibre-gl";
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
var
|
|
16
|
-
for (var
|
|
17
|
-
(
|
|
18
|
-
return
|
|
12
|
+
import ke from "@turf/bbox";
|
|
13
|
+
import Ye from "@turf/difference";
|
|
14
|
+
import He from "@turf/flatten";
|
|
15
|
+
var Je = Object.getOwnPropertyDescriptor, Xe = (t, e, i, a) => {
|
|
16
|
+
for (var s = a > 1 ? void 0 : a ? Je(e, i) : e, o = t.length - 1, r; o >= 0; o--)
|
|
17
|
+
(r = t[o]) && (s = r(s) || s);
|
|
18
|
+
return s;
|
|
19
19
|
};
|
|
20
20
|
let ee = class extends O {
|
|
21
21
|
render() {
|
|
@@ -34,13 +34,13 @@ ee.styles = I`
|
|
|
34
34
|
fill: var(--color-icon-button);
|
|
35
35
|
}
|
|
36
36
|
`;
|
|
37
|
-
ee =
|
|
37
|
+
ee = Xe([
|
|
38
38
|
M("maptiler-geocode-clear-icon")
|
|
39
39
|
], ee);
|
|
40
|
-
var
|
|
41
|
-
for (var
|
|
42
|
-
(
|
|
43
|
-
return
|
|
40
|
+
var et = Object.getOwnPropertyDescriptor, tt = (t, e, i, a) => {
|
|
41
|
+
for (var s = a > 1 ? void 0 : a ? et(e, i) : e, o = t.length - 1, r; o >= 0; o--)
|
|
42
|
+
(r = t[o]) && (s = r(s) || s);
|
|
43
|
+
return s;
|
|
44
44
|
};
|
|
45
45
|
let te = class extends O {
|
|
46
46
|
render() {
|
|
@@ -59,13 +59,13 @@ te.styles = I`
|
|
|
59
59
|
fill: #e15042;
|
|
60
60
|
}
|
|
61
61
|
`;
|
|
62
|
-
te =
|
|
62
|
+
te = tt([
|
|
63
63
|
M("maptiler-geocode-fail-icon")
|
|
64
64
|
], te);
|
|
65
|
-
var
|
|
66
|
-
for (var
|
|
67
|
-
(
|
|
68
|
-
return
|
|
65
|
+
var it = Object.getOwnPropertyDescriptor, st = (t, e, i, a) => {
|
|
66
|
+
for (var s = a > 1 ? void 0 : a ? it(e, i) : e, o = t.length - 1, r; o >= 0; o--)
|
|
67
|
+
(r = t[o]) && (s = r(s) || s);
|
|
68
|
+
return s;
|
|
69
69
|
};
|
|
70
70
|
let ie = class extends O {
|
|
71
71
|
render() {
|
|
@@ -106,13 +106,13 @@ ie.styles = I`
|
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
108
|
`;
|
|
109
|
-
ie =
|
|
109
|
+
ie = st([
|
|
110
110
|
M("maptiler-geocode-loading-icon")
|
|
111
111
|
], ie);
|
|
112
|
-
var
|
|
113
|
-
for (var
|
|
114
|
-
(
|
|
115
|
-
return
|
|
112
|
+
var rt = Object.getOwnPropertyDescriptor, ot = (t, e, i, a) => {
|
|
113
|
+
for (var s = a > 1 ? void 0 : a ? rt(e, i) : e, o = t.length - 1, r; o >= 0; o--)
|
|
114
|
+
(r = t[o]) && (s = r(s) || s);
|
|
115
|
+
return s;
|
|
116
116
|
};
|
|
117
117
|
let se = class extends O {
|
|
118
118
|
render() {
|
|
@@ -131,13 +131,13 @@ se.styles = I`
|
|
|
131
131
|
fill: var(--color-icon-button);
|
|
132
132
|
}
|
|
133
133
|
`;
|
|
134
|
-
se =
|
|
134
|
+
se = ot([
|
|
135
135
|
M("maptiler-geocode-reverse-geocoding-icon")
|
|
136
136
|
], se);
|
|
137
|
-
var
|
|
138
|
-
for (var
|
|
139
|
-
(
|
|
140
|
-
return
|
|
137
|
+
var at = Object.getOwnPropertyDescriptor, lt = (t, e, i, a) => {
|
|
138
|
+
for (var s = a > 1 ? void 0 : a ? at(e, i) : e, o = t.length - 1, r; o >= 0; o--)
|
|
139
|
+
(r = t[o]) && (s = r(s) || s);
|
|
140
|
+
return s;
|
|
141
141
|
};
|
|
142
142
|
let re = class extends O {
|
|
143
143
|
render() {
|
|
@@ -170,74 +170,74 @@ re.styles = I`
|
|
|
170
170
|
stroke: var(--color-icon-button);
|
|
171
171
|
}
|
|
172
172
|
`;
|
|
173
|
-
re =
|
|
173
|
+
re = lt([
|
|
174
174
|
M("maptiler-geocode-search-icon")
|
|
175
175
|
], re);
|
|
176
|
-
function
|
|
177
|
-
const
|
|
178
|
-
return t ===
|
|
176
|
+
function nt(t, e, i) {
|
|
177
|
+
const a = e[1], s = e[0], o = a - s;
|
|
178
|
+
return t === a && i ? t : ((t - s) % o + o) % o + s;
|
|
179
179
|
}
|
|
180
180
|
function N(t) {
|
|
181
181
|
const e = [...t];
|
|
182
182
|
return e[2] < e[0] && (Math.abs((e[0] + e[2] + 360) / 2) > Math.abs((e[0] - 360 + e[2]) / 2) ? e[0] -= 360 : e[2] += 360), e;
|
|
183
183
|
}
|
|
184
184
|
let U;
|
|
185
|
-
async function
|
|
186
|
-
for (const
|
|
187
|
-
if (!(t && (
|
|
188
|
-
if (
|
|
189
|
-
return
|
|
190
|
-
if (
|
|
191
|
-
if (U &&
|
|
185
|
+
async function ct(t, e, i) {
|
|
186
|
+
for (const a of e ?? [])
|
|
187
|
+
if (!(t && (a.minZoom != null && a.minZoom > t[0] || a.maxZoom != null && a.maxZoom < t[0]))) {
|
|
188
|
+
if (a.type === "fixed")
|
|
189
|
+
return a.coordinates.join(",");
|
|
190
|
+
if (a.type === "client-geolocation")
|
|
191
|
+
if (U && a.cachedLocationExpiry && U.time + a.cachedLocationExpiry > Date.now()) {
|
|
192
192
|
if (U.coords)
|
|
193
193
|
return U.coords;
|
|
194
194
|
} else {
|
|
195
|
-
let
|
|
195
|
+
let s;
|
|
196
196
|
try {
|
|
197
|
-
return
|
|
197
|
+
return s = await new Promise((o, r) => {
|
|
198
198
|
i.signal.addEventListener("abort", () => {
|
|
199
|
-
|
|
199
|
+
r(Error("aborted"));
|
|
200
200
|
}), navigator.geolocation.getCurrentPosition(
|
|
201
|
-
(
|
|
202
|
-
|
|
201
|
+
(u) => {
|
|
202
|
+
o([u.coords.longitude, u.coords.latitude].map((y) => y.toFixed(6)).join(","));
|
|
203
203
|
},
|
|
204
|
-
(
|
|
205
|
-
|
|
204
|
+
(u) => {
|
|
205
|
+
r(u);
|
|
206
206
|
},
|
|
207
|
-
|
|
207
|
+
a
|
|
208
208
|
);
|
|
209
|
-
}),
|
|
209
|
+
}), s;
|
|
210
210
|
} catch {
|
|
211
211
|
} finally {
|
|
212
|
-
|
|
212
|
+
a.cachedLocationExpiry && (U = {
|
|
213
213
|
time: Date.now(),
|
|
214
|
-
coords:
|
|
214
|
+
coords: s
|
|
215
215
|
});
|
|
216
216
|
}
|
|
217
217
|
if (i.signal.aborted)
|
|
218
218
|
return;
|
|
219
219
|
}
|
|
220
|
-
if (
|
|
220
|
+
if (a.type === "server-geolocation")
|
|
221
221
|
return "ip";
|
|
222
|
-
if (t &&
|
|
222
|
+
if (t && a.type === "map-center")
|
|
223
223
|
return t[1].toFixed(6) + "," + t[2].toFixed(6);
|
|
224
224
|
}
|
|
225
225
|
}
|
|
226
|
-
const
|
|
227
|
-
var
|
|
226
|
+
const ht = ".sprite-icon{align-self:center;justify-self:center;opacity:.75;background-repeat:no-repeat}li{text-align:left;cursor:default;display:grid;grid-template-columns:40px 1fr;color:var(--color-text);padding:8px 0;font-size:14px;line-height:18px;min-width:fit-content;outline:0}li:first-child{padding-top:10px}li:last-child{padding-bottom:10px}li.picked{background-color:#e7edff}li.picked .secondary{color:#96a4c7;padding-left:4px}li.picked .line2{color:#96a4c7}li.selected{background-color:#f3f6ff;animation:backAndForth 5s linear infinite}li.selected .primary{color:#2b8bfb}li.selected .secondary{color:#a2adc7;padding-left:4px}li.selected .line2{color:#a2adc7}li>img{align-self:center;justify-self:center;opacity:.75}.texts{padding:0 17px 0 0}.texts>*{white-space:nowrap;display:block;min-width:fit-content}.primary{font-weight:600}.secondary{color:#aeb6c7;padding-left:4px}.line2{color:#aeb6c7}@keyframes backAndForth{0%{transform:translate(0)}10%{transform:translate(0)}45%{transform:translate(calc(-100% + 270px))}55%{transform:translate(calc(-100% + 270px))}90%{transform:translate(0)}to{transform:translate(0)}}";
|
|
227
|
+
var pt = Object.defineProperty, dt = Object.getOwnPropertyDescriptor, Ie = (t) => {
|
|
228
228
|
throw TypeError(t);
|
|
229
|
-
},
|
|
230
|
-
for (var
|
|
231
|
-
(
|
|
232
|
-
return
|
|
233
|
-
},
|
|
234
|
-
const
|
|
235
|
-
let
|
|
229
|
+
}, L = (t, e, i, a) => {
|
|
230
|
+
for (var s = a > 1 ? void 0 : a ? dt(e, i) : e, o = t.length - 1, r; o >= 0; o--)
|
|
231
|
+
(r = t[o]) && (s = (a ? r(e, i, s) : r(s)) || s);
|
|
232
|
+
return a && s && pt(e, i, s), s;
|
|
233
|
+
}, Oe = (t, e, i) => e.has(t) || Ie("Cannot " + i), f = (t, e, i) => (Oe(t, e, "read from private field"), i ? i.call(t) : e.get(t)), ut = (t, e, i) => e.has(t) ? Ie("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, i), E = (t, e, i) => (Oe(t, e, "access private method"), i), d, Z, G, g, Me, Te, pe, oe;
|
|
234
|
+
const Fe = typeof devicePixelRatio > "u" || devicePixelRatio > 1.25, Se = Fe ? "@2x" : "", S = Fe ? 2 : 1;
|
|
235
|
+
let F, Ce, w = class extends O {
|
|
236
236
|
constructor() {
|
|
237
|
-
super(...arguments),
|
|
237
|
+
super(...arguments), ut(this, d), this.itemStyle = "default", this.showPlaceType = "if-needed", this.missingIconsCache = /* @__PURE__ */ new Set(), this.iconsBaseUrl = "", this.index = 0;
|
|
238
238
|
}
|
|
239
239
|
willUpdate(t) {
|
|
240
|
-
t.has("feature") &&
|
|
240
|
+
t.has("feature") && f(this, d, Z) && (this.index = f(this, d, Z).length, E(this, d, pe).call(this));
|
|
241
241
|
}
|
|
242
242
|
render() {
|
|
243
243
|
return m`
|
|
@@ -249,28 +249,28 @@ let T, Ce, k = class extends O {
|
|
|
249
249
|
class=${this.itemStyle}
|
|
250
250
|
@click=${() => this.dispatchEvent(new CustomEvent("select"))}
|
|
251
251
|
>
|
|
252
|
-
${
|
|
252
|
+
${F && this.spriteIcon ? m`
|
|
253
253
|
<div
|
|
254
254
|
class="sprite-icon"
|
|
255
|
-
style=${
|
|
256
|
-
width: `${this.spriteIcon.width /
|
|
257
|
-
height: `${this.spriteIcon.height /
|
|
255
|
+
style=${Ne({
|
|
256
|
+
width: `${this.spriteIcon.width / S}px`,
|
|
257
|
+
height: `${this.spriteIcon.height / S}px`,
|
|
258
258
|
backgroundImage: `url(${this.iconsBaseUrl}sprite${Se}.png)`,
|
|
259
|
-
backgroundPosition: `-${this.spriteIcon.x /
|
|
260
|
-
backgroundSize: `${
|
|
259
|
+
backgroundPosition: `-${this.spriteIcon.x / S}px -${this.spriteIcon.y / S}px`,
|
|
260
|
+
backgroundSize: `${F.width / S}px ${F.height / S}px`
|
|
261
261
|
})}
|
|
262
|
-
title=${
|
|
262
|
+
title=${f(this, d, g)}
|
|
263
263
|
/>
|
|
264
|
-
` : this.imageUrl ? m` <img src=${this.imageUrl} alt=${this.category} title=${
|
|
264
|
+
` : this.imageUrl ? m` <img src=${this.imageUrl} alt=${this.category} title=${f(this, d, g)} @error=${E(this, d, Te)} />` : this.feature?.address ? m` <img src=${this.iconsBaseUrl + "housenumber.svg"} alt=${f(this, d, g)} title=${f(this, d, g)} /> ` : this.feature?.id.startsWith("road.") ? m` <img src=${this.iconsBaseUrl + "road.svg"} alt=${f(this, d, g)} title=${f(this, d, g)} /> ` : this.feature?.id.startsWith("address.") ? m` <img src=${this.iconsBaseUrl + "street.svg"} alt=${f(this, d, g)} title=${f(this, d, g)} /> ` : this.feature?.id.startsWith("postal_code.") ? m` <img src=${this.iconsBaseUrl + "postal_code.svg"} alt=${f(this, d, g)} title=${f(this, d, g)} /> ` : this.feature?.id.startsWith("poi.") ? m` <img src=${this.iconsBaseUrl + "poi.svg"} alt=${f(this, d, g)} title=${f(this, d, g)} /> ` : f(this, d, G) ? m` <img src=${this.iconsBaseUrl + "reverse.svg"} alt=${f(this, d, g)} title=${f(this, d, g)} /> ` : m` <img src=${this.iconsBaseUrl + "area.svg"} alt=${f(this, d, g)} title=${f(this, d, g)} /> `}
|
|
265
265
|
|
|
266
266
|
<span class="texts">
|
|
267
267
|
<span>
|
|
268
|
-
<span class="primary"> ${
|
|
268
|
+
<span class="primary"> ${f(this, d, G) ? this.feature?.place_name : this.feature?.place_name.replace(/,.*/, "")} </span>
|
|
269
269
|
|
|
270
|
-
${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) && !
|
|
270
|
+
${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, G) ? m` <span class="secondary"> ${f(this, d, g)} </span> ` : X}
|
|
271
271
|
</span>
|
|
272
272
|
|
|
273
|
-
<span class="line2"> ${
|
|
273
|
+
<span class="line2"> ${f(this, d, G) ? this.feature?.text : this.feature?.place_name.replace(/[^,]*,?s*/, "")} </span>
|
|
274
274
|
</span>
|
|
275
275
|
</li>
|
|
276
276
|
`;
|
|
@@ -286,72 +286,72 @@ G = function() {
|
|
|
286
286
|
g = function() {
|
|
287
287
|
return this.feature?.properties?.categories?.join(", ") ?? this.feature?.place_type_name?.[0] ?? this.feature?.place_type[0];
|
|
288
288
|
};
|
|
289
|
-
|
|
289
|
+
Me = function() {
|
|
290
290
|
Ce ??= fetch(`${this.iconsBaseUrl}sprite${Se}.json`).then((t) => t.json()).then((t) => {
|
|
291
|
-
|
|
291
|
+
F = t;
|
|
292
292
|
}).catch(() => {
|
|
293
|
-
|
|
293
|
+
F = null;
|
|
294
294
|
});
|
|
295
295
|
};
|
|
296
|
-
|
|
296
|
+
Te = function() {
|
|
297
297
|
this.imageUrl && this.missingIconsCache.add(this.imageUrl), E(this, d, pe).call(this);
|
|
298
298
|
};
|
|
299
299
|
pe = function() {
|
|
300
|
-
|
|
300
|
+
F !== void 0 ? E(this, d, oe).call(this) : (E(this, d, Me).call(this), Ce?.then(() => {
|
|
301
301
|
E(this, d, oe).call(this);
|
|
302
302
|
}));
|
|
303
303
|
};
|
|
304
304
|
oe = function() {
|
|
305
305
|
do {
|
|
306
|
-
if (this.index--, this.category =
|
|
306
|
+
if (this.index--, this.category = f(this, d, Z)?.[this.index], this.spriteIcon = this.category ? F?.icons[this.category] : void 0, this.spriteIcon)
|
|
307
307
|
break;
|
|
308
308
|
this.imageUrl = this.category ? this.iconsBaseUrl + this.category.replace(/ /g, "_") + ".svg" : void 0;
|
|
309
309
|
} while (this.index > -1 && (!this.imageUrl || this.missingIconsCache.has(this.imageUrl)));
|
|
310
310
|
};
|
|
311
|
-
|
|
312
|
-
${ce(
|
|
311
|
+
w.styles = I`
|
|
312
|
+
${ce(ht)}
|
|
313
313
|
`;
|
|
314
|
-
|
|
314
|
+
L([
|
|
315
315
|
p({ type: Object })
|
|
316
|
-
],
|
|
317
|
-
|
|
316
|
+
], w.prototype, "feature", 2);
|
|
317
|
+
L([
|
|
318
318
|
p({ type: String })
|
|
319
|
-
],
|
|
320
|
-
|
|
319
|
+
], w.prototype, "itemStyle", 2);
|
|
320
|
+
L([
|
|
321
321
|
p({ type: String })
|
|
322
|
-
],
|
|
323
|
-
|
|
322
|
+
], w.prototype, "showPlaceType", 2);
|
|
323
|
+
L([
|
|
324
324
|
p({ attribute: !1 })
|
|
325
|
-
],
|
|
326
|
-
|
|
325
|
+
], w.prototype, "missingIconsCache", 2);
|
|
326
|
+
L([
|
|
327
327
|
p({ type: String })
|
|
328
|
-
],
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
],
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
],
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
],
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
],
|
|
341
|
-
|
|
328
|
+
], w.prototype, "iconsBaseUrl", 2);
|
|
329
|
+
L([
|
|
330
|
+
k()
|
|
331
|
+
], w.prototype, "category", 2);
|
|
332
|
+
L([
|
|
333
|
+
k()
|
|
334
|
+
], w.prototype, "imageUrl", 2);
|
|
335
|
+
L([
|
|
336
|
+
k()
|
|
337
|
+
], w.prototype, "spriteIcon", 2);
|
|
338
|
+
L([
|
|
339
|
+
k()
|
|
340
|
+
], w.prototype, "index", 2);
|
|
341
|
+
w = L([
|
|
342
342
|
M("maptiler-geocoder-feature-item")
|
|
343
|
-
],
|
|
344
|
-
const
|
|
345
|
-
var
|
|
343
|
+
], w);
|
|
344
|
+
const ft = "form{font-family:Open Sans,Ubuntu,Helvetica Neue,Arial,Helvetica,sans-serif;position:relative;background-color:#fff;z-index:10;border-radius:4px;margin:0;transition:max-width .25s;box-shadow:0 2px 5px #33335926;--color-text: #444952;--color-icon-button: #444952;pointer-events:all}form,form *,form *:after,form *:before{box-sizing:border-box}form.can-collapse{max-width:29px}form.can-collapse input::placeholder{transition:opacity .25s;opacity:0}form{width:270px;max-width:270px}form:focus-within,form:hover{width:270px;max-width:270px}form input::placeholder,form:focus-within input::placeholder,form:hover input::placeholder{opacity:1}input{font:inherit;font-size:14px;flex-grow:1;min-height:29px;background-color:transparent;color:#444952;white-space:nowrap;overflow:hidden;border:0;margin:0;padding:0}input:focus{color:#444952;outline:0;outline:none;box-shadow:none}ul,div.error,div.no-results{background-color:#fff;border-radius:4px;left:0;list-style:none;margin:0;padding:0;position:absolute;width:100%;top:calc(100% + 6px);overflow:hidden}ul{font-size:14px;line-height:16px;box-shadow:0 5px 10px #33335926}div.error,div.no-results{font:inherit;line-height:18px;font-size:12px;display:flex;gap:16px}div.error{padding:16px;font-weight:600;color:#e25041;background-color:#fbeae8}div.error div{flex-grow:1}div.error maptiler-geocode-fail-icon{flex-shrink:0;width:20px;height:20px}div.error button{flex-shrink:0}div.error button maptiler-geocode-clear-icon{--color-icon-button: #e25041}div.error button:hover maptiler-geocode-clear-icon,div.error button:active maptiler-geocode-clear-icon{--color-icon-button: inherit}div.no-results{padding:14px 24px 14px 16px;font-weight:400;color:#6b7c93;box-shadow:0 5px 10px #33335926}div.no-results maptiler-geocode-fail-icon{margin-top:4px;flex-shrink:0;width:20px;height:20px}ul.options.open-on-top{top:auto;bottom:calc(100% + 6px)}button{padding:0;margin:0;border:0;background-color:transparent;height:auto;width:auto}button:hover{background-color:transparent}button:hover,button:active{--color-icon-button: #2b8bfb}.input-group{display:flex;align-items:stretch;gap:7px;padding-inline:8px;border-radius:4px;overflow:hidden}.input-group:focus-within{outline:#2b8bfb solid 2px}.search-button{flex-shrink:0}.clear-button-container{display:flex;display:none;position:relative;align-items:stretch}.clear-button-container.displayable{display:flex;flex-shrink:0}:host(.maptiler-geocoder):not(:empty){box-shadow:none}:host(.maptiler-geocoder) .input-group{border:white solid 2px}:host(.maptiler-geocoder) .input-group:focus-within{border:#2b8bfb solid 2px;outline:0;outline:none}:host(.maptiler-geocoder) form.can-collapse{max-width:33px}:host(.maptiler-geocoder) form,:host(.maptiler-geocoder) form:focus-within,:host(.maptiler-geocoder) form:hover{width:270px;max-width:270px}:host(.leaflet-geocoder) .input-group{border:white solid 1px}:host(.leaflet-geocoder) form.can-collapse{max-width:30px}";
|
|
345
|
+
var mt = Object.defineProperty, gt = Object.getOwnPropertyDescriptor, Ee = (t) => {
|
|
346
346
|
throw TypeError(t);
|
|
347
|
-
}, c = (t, e, i,
|
|
348
|
-
for (var
|
|
349
|
-
(
|
|
350
|
-
return
|
|
351
|
-
}, de = (t, e, i) => e.has(t) ||
|
|
347
|
+
}, c = (t, e, i, a) => {
|
|
348
|
+
for (var s = a > 1 ? void 0 : a ? gt(e, i) : e, o = t.length - 1, r; o >= 0; o--)
|
|
349
|
+
(r = t[o]) && (s = (a ? r(e, i, s) : r(s)) || s);
|
|
350
|
+
return a && s && mt(e, i, s), s;
|
|
351
|
+
}, de = (t, e, i) => e.has(t) || Ee("Cannot " + i), b = (t, e, i) => (de(t, e, "read from private field"), i ? i.call(t) : e.get(t)), C = (t, e, i) => e.has(t) ? Ee("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, i), W = (t, e, i, a) => (de(t, e, "write to private field"), e.set(t, i), i), h = (t, e, i) => (de(t, e, "access private method"), i), K, V, B, ae, R, l, Q, Pe, Ue, ue, x, fe, Y, me, ge, $, ye, H, Ge, le, Be, Re, ze, je, Ae;
|
|
352
352
|
let n = class extends O {
|
|
353
353
|
constructor() {
|
|
354
|
-
super(...arguments),
|
|
354
|
+
super(...arguments), C(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.focusedDelayed = !1, C(this, K, !1), C(this, V, !1), C(this, B), C(this, ae, /* @__PURE__ */ new Set()), C(this, R);
|
|
355
355
|
}
|
|
356
356
|
firstUpdated() {
|
|
357
357
|
W(this, K, !0);
|
|
@@ -364,7 +364,7 @@ let n = class extends O {
|
|
|
364
364
|
setOptions(t) {
|
|
365
365
|
const e = { ...t };
|
|
366
366
|
for (const i of Object.keys(e))
|
|
367
|
-
|
|
367
|
+
yt.includes(i) || delete e[i];
|
|
368
368
|
Object.assign(this, e);
|
|
369
369
|
}
|
|
370
370
|
/**
|
|
@@ -373,7 +373,7 @@ let n = class extends O {
|
|
|
373
373
|
* @param value text to set
|
|
374
374
|
*/
|
|
375
375
|
setQuery(t) {
|
|
376
|
-
h(this, l, ge).call(this, t), h(this, l, me).call(this);
|
|
376
|
+
h(this, l, ge).call(this, t, { external: !0 }), h(this, l, me).call(this);
|
|
377
377
|
}
|
|
378
378
|
/**
|
|
379
379
|
* Set the content of search input box and immediately submit it.
|
|
@@ -415,19 +415,19 @@ let n = class extends O {
|
|
|
415
415
|
}
|
|
416
416
|
/** @internal */
|
|
417
417
|
handleMapClick(t) {
|
|
418
|
-
this.reverseActive && h(this, l,
|
|
418
|
+
this.reverseActive && h(this, l, Ge).call(this, t);
|
|
419
419
|
}
|
|
420
420
|
willUpdate(t) {
|
|
421
|
-
t.has("error") && this.error && console.error("[MapTilerGeocodingControl] Error:", this.error), t.has("enableReverse") && (this.reverseActive = this.enableReverse === "always"), ["picked"].some((e) => t.has(e)) && this.picked && (this.clearListOnPick && h(this, l, $).call(this), this.selectedItemIndex = -1), ["searchValue", "minLength"].some((e) => t.has(e)) &&
|
|
421
|
+
t.has("error") && this.error && console.error("[MapTilerGeocodingControl] Error:", this.error), t.has("enableReverse") && (this.reverseActive = this.enableReverse === "always"), ["picked"].some((e) => t.has(e)) && this.picked && (this.clearListOnPick && h(this, l, $).call(this), this.selectedItemIndex = -1), ["searchValue", "minLength"].some((e) => t.has(e)) && b(this, l, ue) && (h(this, l, $).call(this), this.error = void 0), ["focused"].some((e) => t.has(e)) && setTimeout(() => {
|
|
422
422
|
this.focusedDelayed = this.focused, this.clearOnBlur && !this.focused && (this.searchValue = "");
|
|
423
|
-
}, 100), ["selectFirst", "listFeatures", "selectedItemIndex", "picked"].some((e) => t.has(e)) && this.selectFirst !== !1 && this.listFeatures?.length && this.selectedItemIndex == -1 && !this.picked && (this.selectedItemIndex = 0), ["listFeatures", "selectedItemIndex"].some((e) => t.has(e)) && h(this, l,
|
|
423
|
+
}, 100), ["selectFirst", "listFeatures", "selectedItemIndex", "picked"].some((e) => t.has(e)) && this.selectFirst !== !1 && this.listFeatures?.length && this.selectedItemIndex == -1 && !this.picked && (this.selectedItemIndex = 0), ["listFeatures", "selectedItemIndex"].some((e) => t.has(e)) && h(this, l, x).call(this, "select", { feature: b(this, l, Q) }), ["picked"].some((e) => t.has(e)) && this.picked && this.picked.id !== t.get("picked")?.id && (this.fetchFullGeometryOnPick && !this.picked.address && this.picked.geometry.type === "Point" && this.picked.place_type[0] !== "reverse" ? h(this, l, H).call(this, this.picked.id, { byId: !0 }) : Promise.resolve()).then(
|
|
424
424
|
() => {
|
|
425
|
-
h(this, l,
|
|
425
|
+
h(this, l, x).call(this, "pick", { feature: this.picked });
|
|
426
426
|
},
|
|
427
427
|
(e) => {
|
|
428
|
-
e && typeof e == "object" && "name" in e && e.name === "AbortError" || (this.error = e, h(this, l,
|
|
428
|
+
e && typeof e == "object" && "name" in e && e.name === "AbortError" || (this.error = e, h(this, l, x).call(this, "pick", { feature: this.picked }));
|
|
429
429
|
}
|
|
430
|
-
), ["listFeatures", "focusedDelayed"].some((e) => t.has(e)) && (
|
|
430
|
+
), ["listFeatures", "focusedDelayed"].some((e) => t.has(e)) && (b(this, l, Pe) ? (h(this, l, x).call(this, "featuresshow"), W(this, V, !0)) : b(this, V) && h(this, l, x).call(this, "featureshide")), ["reverseActive"].some((e) => t.has(e)) && h(this, l, x).call(this, "reversetoggle", { reverse: this.reverseActive });
|
|
431
431
|
}
|
|
432
432
|
render() {
|
|
433
433
|
return m`
|
|
@@ -449,15 +449,15 @@ let n = class extends O {
|
|
|
449
449
|
@blur=${() => this.focused = !1}
|
|
450
450
|
@click=${() => this.focused = !0}
|
|
451
451
|
@keydown=${h(this, l, le)}
|
|
452
|
-
@input=${h(this, l,
|
|
452
|
+
@input=${h(this, l, Be)}
|
|
453
453
|
@change=${() => this.picked = void 0}
|
|
454
454
|
placeholder=${this.placeholder ?? "Search"}
|
|
455
455
|
aria-label=${this.placeholder ?? "Search"}
|
|
456
456
|
/>
|
|
457
457
|
|
|
458
458
|
<div class="clear-button-container ${A({ displayable: this.searchValue !== "" })}">
|
|
459
|
-
${
|
|
460
|
-
<button type="button" @click=${h(this, l,
|
|
459
|
+
${b(this, l, Ue) ? m`<maptiler-geocode-loading-icon></maptiler-geocode-loading-icon>` : m`
|
|
460
|
+
<button type="button" @click=${h(this, l, Ae)} title=${this.clearButtonTitle ?? "clear"}>
|
|
461
461
|
<maptiler-geocode-clear-icon></maptiler-geocode-clear-icon>
|
|
462
462
|
</button>
|
|
463
463
|
`}
|
|
@@ -496,8 +496,8 @@ let n = class extends O {
|
|
|
496
496
|
</div>
|
|
497
497
|
</div>
|
|
498
498
|
` : m`
|
|
499
|
-
<ul class="options ${A({ "open-on-top": this.openListOnTop })}" @mouseleave=${h(this, l,
|
|
500
|
-
${
|
|
499
|
+
<ul class="options ${A({ "open-on-top": this.openListOnTop })}" @mouseleave=${h(this, l, je)} @keydown=${h(this, l, le)} role="listbox">
|
|
500
|
+
${qe(
|
|
501
501
|
this.listFeatures,
|
|
502
502
|
(t) => t.id + (t.address ? "," + t.address : ""),
|
|
503
503
|
(t, e) => m`
|
|
@@ -506,13 +506,13 @@ let n = class extends O {
|
|
|
506
506
|
.showPlaceType=${this.showPlaceType ?? "if-needed"}
|
|
507
507
|
itemStyle=${this.selectedItemIndex === e ? "selected" : this.picked?.id === t.id ? "picked" : "default"}
|
|
508
508
|
@mouseenter=${() => {
|
|
509
|
-
h(this, l,
|
|
509
|
+
h(this, l, ze).call(this, e);
|
|
510
510
|
}}
|
|
511
511
|
@select=${() => {
|
|
512
|
-
h(this, l,
|
|
512
|
+
h(this, l, Re).call(this, t);
|
|
513
513
|
}}
|
|
514
|
-
.missingIconsCache=${
|
|
515
|
-
.iconsBaseUrl=${this.iconsBaseUrl ?? "https://cdn.maptiler.com/maptiler-geocoding-control/v3.0.0-rc.
|
|
514
|
+
.missingIconsCache=${b(this, ae)}
|
|
515
|
+
.iconsBaseUrl=${this.iconsBaseUrl ?? "https://cdn.maptiler.com/maptiler-geocoding-control/v3.0.0-rc.6/icons/"}
|
|
516
516
|
>
|
|
517
517
|
${t.place_name}
|
|
518
518
|
</maptiler-geocoder-feature-item>
|
|
@@ -533,17 +533,17 @@ l = /* @__PURE__ */ new WeakSet();
|
|
|
533
533
|
Q = function() {
|
|
534
534
|
return this.listFeatures?.[this.selectedItemIndex];
|
|
535
535
|
};
|
|
536
|
-
|
|
536
|
+
Pe = function() {
|
|
537
537
|
return !!this.listFeatures?.length && (this.focusedDelayed || this.keepListOpen);
|
|
538
538
|
};
|
|
539
|
-
|
|
539
|
+
Ue = function() {
|
|
540
540
|
return this.abortController !== void 0;
|
|
541
541
|
};
|
|
542
542
|
ue = function() {
|
|
543
543
|
return this.searchValue.length < (this.minLength ?? 2);
|
|
544
544
|
};
|
|
545
|
-
|
|
546
|
-
|
|
545
|
+
x = function(t, ...[e]) {
|
|
546
|
+
b(this, K) && this.dispatchEvent(
|
|
547
547
|
new CustomEvent(t, {
|
|
548
548
|
bubbles: !0,
|
|
549
549
|
composed: !0,
|
|
@@ -552,13 +552,13 @@ v = function(t, ...[e]) {
|
|
|
552
552
|
);
|
|
553
553
|
};
|
|
554
554
|
fe = function(t) {
|
|
555
|
-
t?.preventDefault(), this.focused = !1, clearTimeout(
|
|
555
|
+
t?.preventDefault(), this.focused = !1, clearTimeout(b(this, B)), 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, H).call(this, this.searchValue, { exact: !0, external: t === void 0 }).then(() => {
|
|
556
556
|
this.picked = void 0;
|
|
557
557
|
}).catch((e) => this.error = e);
|
|
558
558
|
};
|
|
559
559
|
Y = function(t) {
|
|
560
560
|
try {
|
|
561
|
-
return
|
|
561
|
+
return Ve(t, 6);
|
|
562
562
|
} catch {
|
|
563
563
|
return !1;
|
|
564
564
|
}
|
|
@@ -568,87 +568,87 @@ me = function() {
|
|
|
568
568
|
this.input.focus(), this.focused = !0, this.input.select();
|
|
569
569
|
});
|
|
570
570
|
};
|
|
571
|
-
ge = function(t) {
|
|
572
|
-
if (this.searchValue = t, h(this, l,
|
|
573
|
-
if (clearTimeout(
|
|
571
|
+
ge = function(t, { external: e = !1 } = {}) {
|
|
572
|
+
if (this.searchValue = t, h(this, l, x).call(this, "querychange", { query: this.searchValue, reverseCoords: h(this, l, Y).call(this, t) }), this.error = void 0, this.picked = void 0, this.showResultsWhileTyping !== !1) {
|
|
573
|
+
if (clearTimeout(b(this, B)), b(this, l, ue))
|
|
574
574
|
return;
|
|
575
|
-
const
|
|
575
|
+
const i = this.searchValue;
|
|
576
576
|
W(this, B, window.setTimeout(() => {
|
|
577
|
-
h(this, l, H).call(this, e).catch((
|
|
577
|
+
h(this, l, H).call(this, i, { external: e }).catch((a) => this.error = a);
|
|
578
578
|
}, this.debounceSearch ?? 200));
|
|
579
579
|
} else
|
|
580
580
|
h(this, l, $).call(this);
|
|
581
581
|
};
|
|
582
582
|
$ = function() {
|
|
583
|
-
this.listFeatures !== void 0 && (this.listFeatures = void 0, h(this, l,
|
|
583
|
+
this.listFeatures !== void 0 && (this.listFeatures = void 0, h(this, l, x).call(this, "featuresclear"));
|
|
584
584
|
};
|
|
585
585
|
ye = function(t) {
|
|
586
|
-
this.searchValue = t, h(this, l,
|
|
586
|
+
this.searchValue = t, h(this, l, x).call(this, "querychange", { query: this.searchValue, reverseCoords: h(this, l, Y).call(this, t) }), this.selectedItemIndex = -1, h(this, l, fe).call(this);
|
|
587
587
|
};
|
|
588
|
-
H = async function(t, { byId: e = !1, exact: i = !1 } = {}) {
|
|
588
|
+
H = async function(t, { byId: e = !1, exact: i = !1, external: a = !1 } = {}) {
|
|
589
589
|
this.error = void 0, this.abortController?.abort();
|
|
590
|
-
const
|
|
591
|
-
this.abortController =
|
|
590
|
+
const s = new AbortController();
|
|
591
|
+
this.abortController = s;
|
|
592
592
|
try {
|
|
593
|
-
const
|
|
594
|
-
this.language !== void 0 &&
|
|
595
|
-
const [
|
|
596
|
-
let
|
|
597
|
-
(
|
|
598
|
-
).filter((
|
|
599
|
-
|
|
600
|
-
const
|
|
601
|
-
if (
|
|
602
|
-
const
|
|
603
|
-
|
|
593
|
+
const o = this.apiUrl ?? "https://api.maptiler.com/geocoding", r = h(this, l, Y).call(this, t), u = new URL(o + "/" + encodeURIComponent(r ? `${r.decimalLongitude},${r.decimalLatitude}` : t) + ".json"), y = u.searchParams;
|
|
594
|
+
this.language !== void 0 && y.set("language", Array.isArray(this.language) ? this.language.join(",") : this.language ?? "");
|
|
595
|
+
const [T] = b(this, R) ?? [void 0];
|
|
596
|
+
let _ = (!r || this.reverseGeocodingTypes === void 0 ? this.types : this.reverseGeocodingTypes)?.map(
|
|
597
|
+
(v) => typeof v == "string" ? v : T === void 0 || (v[0] ?? 0) <= T && T < (v[1] ?? 1 / 0) ? v[2] : void 0
|
|
598
|
+
).filter((v) => v !== void 0);
|
|
599
|
+
_ && (_ = [...new Set(_)], y.set("types", _.join(",")));
|
|
600
|
+
const ve = !r || this.reverseGeocodingExcludeTypes === void 0 ? this.excludeTypes : this.reverseGeocodingExcludeTypes;
|
|
601
|
+
if (ve && y.set("excludeTypes", String(ve)), this.bbox && y.set("bbox", this.bbox.map((v) => v.toFixed(6)).join(",")), this.country && y.set("country", Array.isArray(this.country) ? this.country.join(",") : this.country), this.worldview && y.set("worldview", this.worldview), !e && !r) {
|
|
602
|
+
const v = this.proximity ?? [{ type: "server-geolocation" }], be = await ct(b(this, R), v, s);
|
|
603
|
+
be && y.set("proximity", be), (i || this.showResultsWhileTyping === !1) && y.set("autocomplete", "false"), y.set("fuzzyMatch", String(this.fuzzyMatch !== !1));
|
|
604
604
|
}
|
|
605
|
-
const
|
|
606
|
-
J > 1 &&
|
|
607
|
-
const
|
|
605
|
+
const xe = this.limit ?? 5, J = this.reverseGeocodingLimit ?? xe;
|
|
606
|
+
J > 1 && _?.length !== 1 && console.warn("[MapTilerGeocodingControl] Warning: For reverse geocoding when limit > 1 then types must contain single value."), r ? (J === 1 || this.exhaustiveReverseGeocoding || _?.length === 1) && y.set("limit", String(J)) : y.set("limit", String(xe)), this.apiKey && y.set("key", this.apiKey), this.adjustUrl?.(u);
|
|
607
|
+
const De = u.searchParams.get("types") === "" && u.searchParams.get("excludeTypes") !== "true", j = u.toString();
|
|
608
608
|
if (j === this.lastSearchUrl) {
|
|
609
|
-
e ? (this.clearListOnPick && h(this, l, $).call(this), this.picked = this.cachedFeatures[0]) : (this.listFeatures = this.cachedFeatures, h(this, l,
|
|
609
|
+
e ? (this.clearListOnPick && h(this, l, $).call(this), this.picked = this.cachedFeatures[0]) : (this.listFeatures = this.cachedFeatures, h(this, l, x).call(this, "featureslisted", { features: this.listFeatures, external: a }), this.listFeatures[this.selectedItemIndex]?.id !== b(this, l, Q)?.id && (this.selectedItemIndex = -1));
|
|
610
610
|
return;
|
|
611
611
|
}
|
|
612
|
-
h(this, l,
|
|
612
|
+
h(this, l, x).call(this, "request", { urlObj: u }), this.lastSearchUrl = j;
|
|
613
613
|
let P;
|
|
614
|
-
if (
|
|
614
|
+
if (De)
|
|
615
615
|
P = { type: "FeatureCollection", features: [] };
|
|
616
616
|
else {
|
|
617
|
-
const
|
|
618
|
-
signal:
|
|
617
|
+
const v = await fetch(j, {
|
|
618
|
+
signal: s.signal,
|
|
619
619
|
...this.fetchParameters
|
|
620
620
|
});
|
|
621
|
-
if (!
|
|
622
|
-
throw new Error(await
|
|
623
|
-
P = await
|
|
621
|
+
if (!v.ok)
|
|
622
|
+
throw new Error(await v.text());
|
|
623
|
+
P = await v.json();
|
|
624
624
|
}
|
|
625
|
-
h(this, l,
|
|
625
|
+
h(this, l, x).call(this, "response", { url: j, featureCollection: P }), e ? (this.clearListOnPick && h(this, l, $).call(this), this.picked = P.features[0], this.cachedFeatures = [this.picked]) : (this.listFeatures = P.features.filter(this.filter ?? (() => !0)), r && this.listFeatures.unshift({
|
|
626
626
|
type: "Feature",
|
|
627
627
|
properties: {},
|
|
628
628
|
/* eslint-disable @typescript-eslint/restrict-template-expressions */
|
|
629
|
-
id: `reverse_${
|
|
630
|
-
text: `${
|
|
631
|
-
place_name:
|
|
629
|
+
id: `reverse_${r.decimalLongitude}_${r.decimalLatitude}`,
|
|
630
|
+
text: `${r.decimalLatitude}, ${r.decimalLongitude}`,
|
|
631
|
+
place_name: r.toCoordinateFormat("DMS"),
|
|
632
632
|
/* eslint-enable @typescript-eslint/restrict-template-expressions */
|
|
633
633
|
place_type: ["reverse"],
|
|
634
634
|
place_type_name: ["reverse"],
|
|
635
|
-
center: [
|
|
636
|
-
bbox: [
|
|
635
|
+
center: [r.decimalLongitude, r.decimalLatitude],
|
|
636
|
+
bbox: [r.decimalLongitude, r.decimalLatitude, r.decimalLongitude, r.decimalLatitude],
|
|
637
637
|
geometry: {
|
|
638
638
|
type: "Point",
|
|
639
|
-
coordinates: [
|
|
639
|
+
coordinates: [r.decimalLongitude, r.decimalLatitude]
|
|
640
640
|
}
|
|
641
|
-
}), h(this, l,
|
|
642
|
-
} catch (
|
|
643
|
-
if (
|
|
641
|
+
}), h(this, l, x).call(this, "featureslisted", { features: this.listFeatures, external: a }), this.cachedFeatures = this.listFeatures, this.listFeatures[this.selectedItemIndex]?.id !== b(this, l, Q)?.id && (this.selectedItemIndex = -1), r && this.input.focus());
|
|
642
|
+
} catch (o) {
|
|
643
|
+
if (o && typeof o == "object" && "name" in o && o.name === "AbortError")
|
|
644
644
|
return;
|
|
645
|
-
throw
|
|
645
|
+
throw o;
|
|
646
646
|
} finally {
|
|
647
|
-
|
|
647
|
+
s === this.abortController && (this.abortController = void 0);
|
|
648
648
|
}
|
|
649
649
|
};
|
|
650
|
-
|
|
651
|
-
this.reverseActive = this.enableReverse === "always", h(this, l, $).call(this), this.picked = void 0, h(this, l, ye).call(this, `${t[1].toFixed(6)}, ${
|
|
650
|
+
Ge = function(t) {
|
|
651
|
+
this.reverseActive = this.enableReverse === "always", h(this, l, $).call(this), this.picked = void 0, h(this, l, ye).call(this, `${t[1].toFixed(6)}, ${nt(t[0], [-180, 180], !0).toFixed(6)}`), h(this, l, me).call(this);
|
|
652
652
|
};
|
|
653
653
|
le = function(t) {
|
|
654
654
|
if (!this.listFeatures)
|
|
@@ -656,23 +656,23 @@ le = function(t) {
|
|
|
656
656
|
const e = t.key === "ArrowDown" ? 1 : t.key === "ArrowUp" ? -1 : 0;
|
|
657
657
|
e && (this.input.focus(), this.focused = !0, t.preventDefault(), this.picked && this.selectedItemIndex === -1 && (this.selectedItemIndex = this.listFeatures.findIndex((i) => i.id === this.picked?.id)), this.selectedItemIndex === (this.picked || this.selectFirst !== !1 ? 0 : -1) && e === -1 && (this.selectedItemIndex = this.listFeatures.length), this.selectedItemIndex += e, this.selectedItemIndex >= this.listFeatures.length && (this.selectedItemIndex = -1), this.selectedItemIndex < 0 && (this.picked || this.selectFirst !== !1) && (this.selectedItemIndex = 0));
|
|
658
658
|
};
|
|
659
|
-
|
|
659
|
+
Be = function(t) {
|
|
660
660
|
h(this, l, ge).call(this, t.target.value);
|
|
661
661
|
};
|
|
662
|
-
|
|
662
|
+
Re = function(t) {
|
|
663
663
|
(!this.picked || this.picked.id !== t.id) && (this.picked = t, this.searchValue = t.place_name);
|
|
664
664
|
};
|
|
665
|
-
|
|
665
|
+
ze = function(t) {
|
|
666
666
|
this.selectedItemIndex = t;
|
|
667
667
|
};
|
|
668
|
-
|
|
668
|
+
je = function() {
|
|
669
669
|
(!this.selectFirst || this.picked) && (this.selectedItemIndex = -1);
|
|
670
670
|
};
|
|
671
|
-
|
|
672
|
-
this.searchValue = "", h(this, l,
|
|
671
|
+
Ae = function() {
|
|
672
|
+
this.searchValue = "", h(this, l, x).call(this, "queryclear"), this.picked = void 0, this.input.focus();
|
|
673
673
|
};
|
|
674
674
|
n.styles = I`
|
|
675
|
-
${ce(
|
|
675
|
+
${ce(ft)}
|
|
676
676
|
`;
|
|
677
677
|
c([
|
|
678
678
|
p({ attribute: !1 })
|
|
@@ -786,42 +786,42 @@ c([
|
|
|
786
786
|
p({ type: String })
|
|
787
787
|
], n.prototype, "worldview", 2);
|
|
788
788
|
c([
|
|
789
|
-
|
|
789
|
+
We("input")
|
|
790
790
|
], n.prototype, "input", 2);
|
|
791
791
|
c([
|
|
792
|
-
|
|
792
|
+
k()
|
|
793
793
|
], n.prototype, "searchValue", 2);
|
|
794
794
|
c([
|
|
795
|
-
|
|
795
|
+
k()
|
|
796
796
|
], n.prototype, "listFeatures", 2);
|
|
797
797
|
c([
|
|
798
|
-
|
|
798
|
+
k()
|
|
799
799
|
], n.prototype, "selectedItemIndex", 2);
|
|
800
800
|
c([
|
|
801
|
-
|
|
801
|
+
k()
|
|
802
802
|
], n.prototype, "picked", 2);
|
|
803
803
|
c([
|
|
804
|
-
|
|
804
|
+
k()
|
|
805
805
|
], n.prototype, "cachedFeatures", 2);
|
|
806
806
|
c([
|
|
807
|
-
|
|
807
|
+
k()
|
|
808
808
|
], n.prototype, "lastSearchUrl", 2);
|
|
809
809
|
c([
|
|
810
|
-
|
|
810
|
+
k()
|
|
811
811
|
], n.prototype, "error", 2);
|
|
812
812
|
c([
|
|
813
|
-
|
|
813
|
+
k()
|
|
814
814
|
], n.prototype, "abortController", 2);
|
|
815
815
|
c([
|
|
816
|
-
|
|
816
|
+
k()
|
|
817
817
|
], n.prototype, "focused", 2);
|
|
818
818
|
c([
|
|
819
|
-
|
|
819
|
+
k()
|
|
820
820
|
], n.prototype, "focusedDelayed", 2);
|
|
821
821
|
n = c([
|
|
822
822
|
M("maptiler-geocoder")
|
|
823
823
|
], n);
|
|
824
|
-
const
|
|
824
|
+
const yt = [
|
|
825
825
|
"adjustUrl",
|
|
826
826
|
"apiKey",
|
|
827
827
|
"apiUrl",
|
|
@@ -859,11 +859,11 @@ const gt = [
|
|
|
859
859
|
"types",
|
|
860
860
|
"reverseGeocodingTypes",
|
|
861
861
|
"worldview"
|
|
862
|
-
],
|
|
863
|
-
var
|
|
864
|
-
for (var
|
|
865
|
-
(
|
|
866
|
-
return
|
|
862
|
+
], vt = "svg{display:block;fill:var(--maptiler-geocode-marker-fill, #3170fe);stroke:var(--maptiler-geocode-marker-stroke, #3170fe);height:30px}:host(.marker-selected){z-index:2}:host(.marker-selected) svg path{fill:var(--maptiler-geocode-marker-selected-fill, #98b7ff);stroke:var(--maptiler-geocode-marker-selected-stroke, #3170fe)}:host(.marker-reverse) svg path{fill:var(--maptiler-geocode-marker-reverse-fill, silver);stroke:var(--maptiler-geocode-marker-reverse-stroke, gray)}:host(.marker-interactive){cursor:pointer!important}:host(.marker-fuzzy) svg path{fill:var(--maptiler-geocode-marker-fuzzy-fill, silver);stroke:var(--maptiler-geocode-marker-fuzzy-stroke, gray)}:host(.marker-fuzzy.marker-selected) svg path{fill:var(--maptiler-geocode-marker-selected-fuzzy-fill, #ddd);stroke:var(--maptiler-geocode-marker-selected-fuzzy-stroke, silver)}";
|
|
863
|
+
var xt = Object.getOwnPropertyDescriptor, bt = (t, e, i, a) => {
|
|
864
|
+
for (var s = a > 1 ? void 0 : a ? xt(e, i) : e, o = t.length - 1, r; o >= 0; o--)
|
|
865
|
+
(r = t[o]) && (s = r(s) || s);
|
|
866
|
+
return s;
|
|
867
867
|
};
|
|
868
868
|
let ne = class extends O {
|
|
869
869
|
render() {
|
|
@@ -882,16 +882,16 @@ let ne = class extends O {
|
|
|
882
882
|
}
|
|
883
883
|
};
|
|
884
884
|
ne.styles = I`
|
|
885
|
-
${ce(
|
|
885
|
+
${ce(vt)}
|
|
886
886
|
`;
|
|
887
|
-
ne =
|
|
887
|
+
ne = bt([
|
|
888
888
|
M("maptiler-geocode-marker")
|
|
889
889
|
], ne);
|
|
890
|
-
const
|
|
891
|
-
function
|
|
892
|
-
const e =
|
|
890
|
+
const kt = "@maptiler/geocoding-control", wt = "3.0.0-rc.6";
|
|
891
|
+
function we(t) {
|
|
892
|
+
const e = Ye(
|
|
893
893
|
q([
|
|
894
|
-
|
|
894
|
+
Ke([
|
|
895
895
|
[
|
|
896
896
|
[180, 90],
|
|
897
897
|
[-180, 90],
|
|
@@ -906,22 +906,22 @@ function ke(t) {
|
|
|
906
906
|
if (!e)
|
|
907
907
|
return;
|
|
908
908
|
e.properties = { isMask: !0 };
|
|
909
|
-
const i = N(
|
|
910
|
-
if (
|
|
911
|
-
for (const
|
|
912
|
-
const
|
|
913
|
-
if (
|
|
914
|
-
for (const
|
|
915
|
-
for (const
|
|
916
|
-
|
|
917
|
-
if (
|
|
918
|
-
for (const
|
|
919
|
-
for (const
|
|
920
|
-
|
|
909
|
+
const i = N(ke(t)), a = (i[2] - i[0]) / 360 / 1e3, s = i[0] < -180, o = i[2] > 180, r = He(t);
|
|
910
|
+
if (r.features.length > 1 && (s || o))
|
|
911
|
+
for (const u of r.features) {
|
|
912
|
+
const y = N(ke(u));
|
|
913
|
+
if (o && y[0] < -180 + a)
|
|
914
|
+
for (const T of u.geometry.coordinates)
|
|
915
|
+
for (const _ of T)
|
|
916
|
+
_[0] += 360 - a;
|
|
917
|
+
if (s && y[2] > 180 - a)
|
|
918
|
+
for (const T of u.geometry.coordinates)
|
|
919
|
+
for (const _ of T)
|
|
920
|
+
_[0] -= 360 - a;
|
|
921
921
|
}
|
|
922
|
-
return q([
|
|
922
|
+
return q([r.features.length < 2 ? t : $e(r) ?? t, e]);
|
|
923
923
|
}
|
|
924
|
-
const
|
|
924
|
+
const _t = {
|
|
925
925
|
continental_marine: 4,
|
|
926
926
|
country: 4,
|
|
927
927
|
major_landform: 8,
|
|
@@ -945,7 +945,7 @@ const wt = {
|
|
|
945
945
|
"poi.restaurant": 18,
|
|
946
946
|
"poi.aerodrome": 13
|
|
947
947
|
// TODO add many more
|
|
948
|
-
},
|
|
948
|
+
}, Lt = {
|
|
949
949
|
fill: {
|
|
950
950
|
paint: {
|
|
951
951
|
"fill-color": "#000",
|
|
@@ -964,8 +964,8 @@ const wt = {
|
|
|
964
964
|
},
|
|
965
965
|
filter: ["!", ["has", "isMask"]]
|
|
966
966
|
}
|
|
967
|
-
}, D = "mtlr-gc-full-geom",
|
|
968
|
-
class
|
|
967
|
+
}, D = "mtlr-gc-full-geom", _e = "mtlr-gc-full-geom-fill", Le = "mtlr-gc-full-geom-line", $t = he.Evented, It = he.Marker, Ot = he.Popup;
|
|
968
|
+
class Mt extends $t {
|
|
969
969
|
#e = {};
|
|
970
970
|
#t;
|
|
971
971
|
#i;
|
|
@@ -1055,7 +1055,7 @@ class Ot extends Lt {
|
|
|
1055
1055
|
},
|
|
1056
1056
|
featureslisted: (e) => {
|
|
1057
1057
|
const i = e.detail.features;
|
|
1058
|
-
this.#o = i, this.#p(this.#o, void 0), this.#$(
|
|
1058
|
+
this.#o = i, this.#p(this.#o, void 0), this.#$(e), this.#s("featureslisted", e.detail);
|
|
1059
1059
|
},
|
|
1060
1060
|
featuresclear: () => {
|
|
1061
1061
|
this.#o = void 0, this.#p(void 0, void 0), this.#s("featuresclear");
|
|
@@ -1106,22 +1106,23 @@ class Ot extends Lt {
|
|
|
1106
1106
|
#L(e) {
|
|
1107
1107
|
e.bbox[0] === e.bbox[2] && e.bbox[1] === e.bbox[3] ? this.#x(e.center, this.#h(e)) : this.#b(N(e.bbox), 50, this.#h(e));
|
|
1108
1108
|
}
|
|
1109
|
-
#$(e) {
|
|
1110
|
-
if (!e || e.length === 0 || !this.#d)
|
|
1111
|
-
|
|
1112
|
-
|
|
1109
|
+
#$({ detail: { features: e, external: i } }) {
|
|
1110
|
+
if (!e || e.length === 0 || !this.#d || this.#e.flyToFeatures === !1 || this.#e.flyToFeatures === "never" || !i && (this.#e.flyToFeatures === void 0 || this.#e.flyToFeatures === "external"))
|
|
1111
|
+
return;
|
|
1112
|
+
const a = e.every((r) => r.matching_text), s = e.reduce(
|
|
1113
|
+
(r, u) => a || !u.matching_text ? [Math.min(r[0], u.bbox[0]), Math.min(r[1], u.bbox[1]), Math.max(r[2], u.bbox[2]), Math.max(r[3], u.bbox[3])] : r,
|
|
1113
1114
|
[180, 90, -180, -90]
|
|
1114
|
-
),
|
|
1115
|
-
this.#b(N(
|
|
1115
|
+
), o = e.map((r) => this.#h(r)).filter((r) => r !== void 0).reduce((r, u) => r === void 0 ? u : Math.max(r, u), void 0);
|
|
1116
|
+
this.#b(N(s), 50, o);
|
|
1116
1117
|
}
|
|
1117
1118
|
#h(e) {
|
|
1118
1119
|
if (e.bbox[0] !== e.bbox[2] || e.bbox[1] !== e.bbox[3])
|
|
1119
1120
|
return;
|
|
1120
|
-
const i = e.id.replace(/\..*/, ""),
|
|
1121
|
-
return (Array.isArray(e.properties?.categories) ? e.properties.categories.reduce((
|
|
1122
|
-
const
|
|
1123
|
-
return
|
|
1124
|
-
}, void 0) : void 0) ??
|
|
1121
|
+
const i = e.id.replace(/\..*/, ""), a = this.#e.zoom ?? _t;
|
|
1122
|
+
return (Array.isArray(e.properties?.categories) ? e.properties.categories.reduce((s, o) => {
|
|
1123
|
+
const r = a[i + "." + o];
|
|
1124
|
+
return s === void 0 ? r : r === void 0 ? s : Math.max(s, r);
|
|
1125
|
+
}, void 0) : void 0) ?? a[i];
|
|
1125
1126
|
}
|
|
1126
1127
|
get #d() {
|
|
1127
1128
|
return !!this.#e.flyTo || this.#e.flyTo === void 0;
|
|
@@ -1135,13 +1136,13 @@ class Ot extends Lt {
|
|
|
1135
1136
|
#x(e, i) {
|
|
1136
1137
|
this.#t?.flyTo({ center: e, ...i ? { zoom: i } : {}, ...this.#I });
|
|
1137
1138
|
}
|
|
1138
|
-
#b(e, i,
|
|
1139
|
+
#b(e, i, a) {
|
|
1139
1140
|
this.#t?.fitBounds(
|
|
1140
1141
|
[
|
|
1141
1142
|
[e[0], e[1]],
|
|
1142
1143
|
[e[2], e[3]]
|
|
1143
1144
|
],
|
|
1144
|
-
{ padding: i, ...
|
|
1145
|
+
{ padding: i, ...a ? { maxZoom: a } : {}, ...this.#O }
|
|
1145
1146
|
);
|
|
1146
1147
|
}
|
|
1147
1148
|
#k(e) {
|
|
@@ -1156,62 +1157,62 @@ class Ot extends Lt {
|
|
|
1156
1157
|
#p(e, i) {
|
|
1157
1158
|
if (!this.#t)
|
|
1158
1159
|
return;
|
|
1159
|
-
for (const
|
|
1160
|
-
|
|
1160
|
+
for (const s of this.#l.values())
|
|
1161
|
+
s.remove();
|
|
1161
1162
|
this.#l = /* @__PURE__ */ new Map(), this.#n(void 0);
|
|
1162
|
-
const
|
|
1163
|
+
const a = () => {
|
|
1163
1164
|
if (!i || !this.#t || this.#e.marker === !1 || this.#e.marker === null) return;
|
|
1164
|
-
const
|
|
1165
|
-
|
|
1165
|
+
const s = this.#e.marker instanceof Function ? this.#e.marker(this.#t, i) : this.#f(this.#e.marker).setLngLat(i.center).addTo(this.#t);
|
|
1166
|
+
s && this.#l.set(i, s);
|
|
1166
1167
|
};
|
|
1167
1168
|
if (i?.geometry.type === "GeometryCollection") {
|
|
1168
|
-
const
|
|
1169
|
-
(
|
|
1169
|
+
const s = i.geometry.geometries.filter(
|
|
1170
|
+
(o) => o.type === "Polygon" || o.type === "MultiPolygon"
|
|
1170
1171
|
);
|
|
1171
|
-
if (
|
|
1172
|
-
const
|
|
1173
|
-
if (
|
|
1174
|
-
const
|
|
1175
|
-
|
|
1172
|
+
if (s.length > 0) {
|
|
1173
|
+
const o = $e(q(s.map((r) => Qe(r))));
|
|
1174
|
+
if (o) {
|
|
1175
|
+
const r = we({ ...i, geometry: o.geometry });
|
|
1176
|
+
r && this.#n(r);
|
|
1176
1177
|
}
|
|
1177
1178
|
} else {
|
|
1178
|
-
const
|
|
1179
|
-
(
|
|
1179
|
+
const o = i.geometry.geometries.filter(
|
|
1180
|
+
(r) => r.type === "LineString" || r.type === "MultiLineString"
|
|
1180
1181
|
);
|
|
1181
|
-
|
|
1182
|
+
o.length > 0 && this.#n({
|
|
1182
1183
|
...i,
|
|
1183
|
-
geometry: { type: "GeometryCollection", geometries:
|
|
1184
|
+
geometry: { type: "GeometryCollection", geometries: o }
|
|
1184
1185
|
});
|
|
1185
1186
|
}
|
|
1186
1187
|
} else if (i?.geometry.type.endsWith("Polygon")) {
|
|
1187
|
-
const
|
|
1188
|
-
|
|
1189
|
-
} else i?.geometry.type.endsWith("LineString") ? this.#n(i) : i?.geometry.type.endsWith("Point") &&
|
|
1188
|
+
const s = we(i);
|
|
1189
|
+
s && this.#n(s), this.#e.pickedResultStyle === "full-geometry-including-polygon-center-marker" && a();
|
|
1190
|
+
} else i?.geometry.type.endsWith("LineString") ? this.#n(i) : i?.geometry.type.endsWith("Point") && a();
|
|
1190
1191
|
if (this.#e.showResultMarkers !== !1 && this.#e.showResultMarkers !== null)
|
|
1191
|
-
for (const
|
|
1192
|
-
if (
|
|
1192
|
+
for (const s of e ?? []) {
|
|
1193
|
+
if (s.id === i?.id || s.place_type.includes("reverse"))
|
|
1193
1194
|
continue;
|
|
1194
|
-
let
|
|
1195
|
+
let o;
|
|
1195
1196
|
if (this.#e.showResultMarkers instanceof Function) {
|
|
1196
|
-
if (
|
|
1197
|
+
if (o = this.#e.showResultMarkers(this.#t, s), !o)
|
|
1197
1198
|
continue;
|
|
1198
1199
|
} else
|
|
1199
|
-
|
|
1200
|
-
new
|
|
1200
|
+
o = this.#f(this.#e.showResultMarkers).setLngLat(s.center).setPopup(
|
|
1201
|
+
new Ot({
|
|
1201
1202
|
offset: [1, -27],
|
|
1202
1203
|
closeButton: !1,
|
|
1203
1204
|
closeOnMove: !0,
|
|
1204
1205
|
className: "maptiler-gc-popup"
|
|
1205
|
-
}).setText(
|
|
1206
|
-
).addTo(this.#t),
|
|
1207
|
-
const
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
}),
|
|
1211
|
-
this.#s("markermouseenter", { feature:
|
|
1212
|
-
}),
|
|
1213
|
-
this.#s("markermouseleave", { feature:
|
|
1214
|
-
}),
|
|
1206
|
+
}).setText(s.place_type[0] === "reverse" ? s.place_name : s.place_name.replace(/,.*/, ""))
|
|
1207
|
+
).addTo(this.#t), o.getElement().classList.add("marker-interactive");
|
|
1208
|
+
const r = o.getElement();
|
|
1209
|
+
r.addEventListener("click", (u) => {
|
|
1210
|
+
u.stopPropagation(), this.#s("markerclick", { feature: s, marker: o });
|
|
1211
|
+
}), r.addEventListener("mouseenter", () => {
|
|
1212
|
+
this.#s("markermouseenter", { feature: s, marker: o }), o.togglePopup();
|
|
1213
|
+
}), r.addEventListener("mouseleave", () => {
|
|
1214
|
+
this.#s("markermouseleave", { feature: s, marker: o }), o.togglePopup();
|
|
1215
|
+
}), r.classList.toggle("marker-fuzzy", !!s.matching_text), this.#l.set(s, o);
|
|
1215
1216
|
}
|
|
1216
1217
|
}
|
|
1217
1218
|
#M(e) {
|
|
@@ -1228,14 +1229,14 @@ class Ot extends Lt {
|
|
|
1228
1229
|
!e?.fill && !e?.line || !i && !this.#a || (i ? i.setData(this.#a ?? q([])) : this.#a && this.#t.addSource(D, {
|
|
1229
1230
|
type: "geojson",
|
|
1230
1231
|
data: this.#a
|
|
1231
|
-
}), !this.#t.getLayer(
|
|
1232
|
+
}), !this.#t.getLayer(_e) && e.fill && this.#t.addLayer({
|
|
1232
1233
|
...e.fill,
|
|
1233
|
-
id:
|
|
1234
|
+
id: _e,
|
|
1234
1235
|
type: "fill",
|
|
1235
1236
|
source: D
|
|
1236
|
-
}), !this.#t.getLayer(
|
|
1237
|
+
}), !this.#t.getLayer(Le) && e.line && this.#t.addLayer({
|
|
1237
1238
|
...e.line,
|
|
1238
|
-
id:
|
|
1239
|
+
id: Le,
|
|
1239
1240
|
type: "line",
|
|
1240
1241
|
source: D
|
|
1241
1242
|
}));
|
|
@@ -1244,30 +1245,30 @@ class Ot extends Lt {
|
|
|
1244
1245
|
this.#a = e, this.#u();
|
|
1245
1246
|
}
|
|
1246
1247
|
#f(e) {
|
|
1247
|
-
return typeof e != "object" && (e = { element: this.#t?._container.ownerDocument.createElement("maptiler-geocode-marker"), offset: [1, -13] }), new
|
|
1248
|
+
return typeof e != "object" && (e = { element: this.#t?._container.ownerDocument.createElement("maptiler-geocode-marker"), offset: [1, -13] }), new It(e);
|
|
1248
1249
|
}
|
|
1249
1250
|
#T() {
|
|
1250
1251
|
const { fullGeometryStyle: e } = this.#e;
|
|
1251
|
-
if (e === !0 || e === void 0) return
|
|
1252
|
+
if (e === !0 || e === void 0) return Lt;
|
|
1252
1253
|
if (!(e === !1 || e === null))
|
|
1253
1254
|
return e;
|
|
1254
1255
|
}
|
|
1255
1256
|
}
|
|
1256
|
-
class
|
|
1257
|
+
class Wt extends Mt {
|
|
1257
1258
|
#e;
|
|
1258
1259
|
constructor(e = {}) {
|
|
1259
1260
|
super(e);
|
|
1260
1261
|
}
|
|
1261
1262
|
/** @internal Not to be called directly */
|
|
1262
1263
|
onAdd(e) {
|
|
1263
|
-
this.#e = e, e.telemetry.registerModule(
|
|
1264
|
-
const i = this.getOptions(), { primaryLanguage:
|
|
1265
|
-
if (i.apiKey === void 0 && this.setOptions({ apiKey:
|
|
1266
|
-
const
|
|
1267
|
-
|
|
1264
|
+
this.#e = e, e.telemetry.registerModule(kt, wt);
|
|
1265
|
+
const i = this.getOptions(), { primaryLanguage: a, apiKey: s } = e.getSdkConfig();
|
|
1266
|
+
if (i.apiKey === void 0 && this.setOptions({ apiKey: s }), i.language === void 0) {
|
|
1267
|
+
const r = a.code?.match(/^([a-z]{2,3})($|_|-)/);
|
|
1268
|
+
r && this.setOptions({ language: r[1] });
|
|
1268
1269
|
}
|
|
1269
|
-
const
|
|
1270
|
-
return
|
|
1270
|
+
const o = super.onAdd(e);
|
|
1271
|
+
return o.classList.add("maptiler-ctrl-geocoder"), o.querySelector("maptiler-geocoder")?.classList.add("maptiler-geocoder"), o;
|
|
1271
1272
|
}
|
|
1272
1273
|
/** @internal Not to be called directly */
|
|
1273
1274
|
onRemove() {
|
|
@@ -1277,17 +1278,17 @@ class Dt extends Ot {
|
|
|
1277
1278
|
const i = e.adjustUrl;
|
|
1278
1279
|
super.setOptions({
|
|
1279
1280
|
...e,
|
|
1280
|
-
adjustUrl: (
|
|
1281
|
-
i?.(
|
|
1282
|
-
const
|
|
1283
|
-
(
|
|
1281
|
+
adjustUrl: (a) => {
|
|
1282
|
+
i?.(a);
|
|
1283
|
+
const s = this.getOptions();
|
|
1284
|
+
(Ze.session ? e.session !== !1 : e.session === !0) && this.#e && (!s.apiUrl || new URL(s.apiUrl).host === new URL("https://api.maptiler.com/geocoding").host) && a.searchParams.append("mtsid", this.#e.getMaptilerSessionId());
|
|
1284
1285
|
}
|
|
1285
1286
|
});
|
|
1286
1287
|
}
|
|
1287
1288
|
}
|
|
1288
1289
|
export {
|
|
1289
|
-
|
|
1290
|
-
|
|
1290
|
+
Lt as DEFAULT_GEOMETRY_STYLE,
|
|
1291
|
+
Wt as GeocodingControl,
|
|
1291
1292
|
ee as MaptilerGeocodeClearIconElement,
|
|
1292
1293
|
te as MaptilerGeocodeFailIconElement,
|
|
1293
1294
|
ie as MaptilerGeocodeLoadingIconElement,
|
|
@@ -1295,10 +1296,10 @@ export {
|
|
|
1295
1296
|
se as MaptilerGeocodeReverseGeocodingIconElement,
|
|
1296
1297
|
re as MaptilerGeocodeSearchIconElement,
|
|
1297
1298
|
n as MaptilerGeocoderElement,
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1299
|
+
Wt as MaptilerGeocodingControl,
|
|
1300
|
+
_e as RESULT_LAYER_FILL,
|
|
1301
|
+
Le as RESULT_LAYER_LINE,
|
|
1301
1302
|
D as RESULT_SOURCE,
|
|
1302
|
-
|
|
1303
|
+
_t as ZOOM_DEFAULTS
|
|
1303
1304
|
};
|
|
1304
1305
|
//# sourceMappingURL=maptilersdk.js.map
|