@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
|
@@ -391,7 +391,7 @@ let l = class extends O {
|
|
|
391
391
|
* @param value text to set and submit
|
|
392
392
|
*/
|
|
393
393
|
submitQuery(t) {
|
|
394
|
-
h(this, n, ge).call(this, t);
|
|
394
|
+
h(this, n, ge).call(this, t, { external: !0 });
|
|
395
395
|
}
|
|
396
396
|
/**
|
|
397
397
|
* Clear search result list.
|
|
@@ -527,7 +527,7 @@ let l = class extends O {
|
|
|
527
527
|
h(this, n, je).call(this, t);
|
|
528
528
|
}}
|
|
529
529
|
.missingIconsCache=${w(this, ae)}
|
|
530
|
-
.iconsBaseUrl=${this.iconsBaseUrl ?? "https://cdn.maptiler.com/maptiler-geocoding-control/v3.0.0-rc.
|
|
530
|
+
.iconsBaseUrl=${this.iconsBaseUrl ?? "https://cdn.maptiler.com/maptiler-geocoding-control/v3.0.0-rc.8/icons/"}
|
|
531
531
|
/>
|
|
532
532
|
`
|
|
533
533
|
)}
|
|
@@ -560,10 +560,10 @@ x = function(t, ...[e]) {
|
|
|
560
560
|
})
|
|
561
561
|
);
|
|
562
562
|
};
|
|
563
|
-
ue = function(t) {
|
|
564
|
-
t?.preventDefault(), this.focused = !1, clearTimeout(w(this, j)), 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, n, K).call(this, this.searchValue, { exact: !0, external:
|
|
563
|
+
ue = function(t, { external: e = !1 } = {}) {
|
|
564
|
+
t?.preventDefault(), this.focused = !1, clearTimeout(w(this, j)), 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, n, K).call(this, this.searchValue, { exact: !0, external: e }).then(() => {
|
|
565
565
|
this.picked = void 0;
|
|
566
|
-
}).catch((
|
|
566
|
+
}).catch((i) => this.error = i);
|
|
567
567
|
};
|
|
568
568
|
Q = function(t) {
|
|
569
569
|
try {
|
|
@@ -591,8 +591,8 @@ me = function(t, { external: e = !1 } = {}) {
|
|
|
591
591
|
I = function() {
|
|
592
592
|
this.listFeatures !== void 0 && (this.listFeatures = void 0, h(this, n, x).call(this, "featuresclear"));
|
|
593
593
|
};
|
|
594
|
-
ge = function(t) {
|
|
595
|
-
this.searchValue = t, h(this, n, x).call(this, "querychange", { query: this.searchValue, reverseCoords: h(this, n, Q).call(this, t) }), this.selectedItemIndex = -1, h(this, n, ue).call(this);
|
|
594
|
+
ge = function(t, { external: e = !1 } = {}) {
|
|
595
|
+
this.searchValue = t, h(this, n, x).call(this, "querychange", { query: this.searchValue, reverseCoords: h(this, n, Q).call(this, t) }), this.selectedItemIndex = -1, h(this, n, ue).call(this, void 0, { external: e });
|
|
596
596
|
};
|
|
597
597
|
K = async function(t, { byId: e = !1, exact: i = !1, external: o = !1 } = {}) {
|
|
598
598
|
this.error = void 0, this.abortController?.abort();
|
|
@@ -636,8 +636,8 @@ K = async function(t, { byId: e = !1, exact: i = !1, external: o = !1 } = {}) {
|
|
|
636
636
|
properties: {},
|
|
637
637
|
/* eslint-disable @typescript-eslint/restrict-template-expressions */
|
|
638
638
|
id: `reverse_${a.decimalLongitude}_${a.decimalLatitude}`,
|
|
639
|
-
|
|
640
|
-
|
|
639
|
+
place_name: `${a.decimalLatitude}, ${a.decimalLongitude}`,
|
|
640
|
+
text: a.toCoordinateFormat("DMS"),
|
|
641
641
|
/* eslint-enable @typescript-eslint/restrict-template-expressions */
|
|
642
642
|
place_type: ["reverse"],
|
|
643
643
|
place_type_name: ["reverse"],
|
|
@@ -965,7 +965,7 @@ const Bt = {
|
|
|
965
965
|
"poi.aerodrome": 13
|
|
966
966
|
// TODO add many more
|
|
967
967
|
}, Gt = (t) => (e) => {
|
|
968
|
-
const i = t.iconsBaseUrl ?? "https://cdn.maptiler.com/maptiler-geocoding-control/v3.0.0-rc.
|
|
968
|
+
const i = t.iconsBaseUrl ?? "https://cdn.maptiler.com/maptiler-geocoding-control/v3.0.0-rc.8/icons/", o = e.getProperties(), s = e.getGeometry()?.getType(), r = o.isMask ? 0 : s === "LineString" || s === "MultiLineString" ? 3 : 2;
|
|
969
969
|
return new ht({
|
|
970
970
|
stroke: o.isMask ? void 0 : new Fe({
|
|
971
971
|
color: "#3170fe",
|
|
@@ -1048,6 +1048,7 @@ class li extends Ye {
|
|
|
1048
1048
|
#g;
|
|
1049
1049
|
/** Layer used for showing results */
|
|
1050
1050
|
#l;
|
|
1051
|
+
// eslint-disable-line @typescript-eslint/no-explicit-any
|
|
1051
1052
|
/** Source connected to layer used for showing results */
|
|
1052
1053
|
#s;
|
|
1053
1054
|
/** Last marker the mouse was over, used to detech mouseover and mouseleave events on markers */
|