@florasync/leaflet-geokit 0.11.0 → 0.11.1
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/CHANGELOG.md +6 -0
- package/dist/django/index.js +486 -496
- package/dist/django/index.js.map +1 -1
- package/dist/leaflet-geokit.es.js +439 -449
- package/dist/leaflet-geokit.es.js.map +1 -1
- package/dist/leaflet-geokit.external.es.js +14 -23
- package/dist/leaflet-geokit.external.es.js.map +1 -1
- package/dist/leaflet-geokit.umd.js +21 -21
- package/dist/leaflet-geokit.umd.js.map +1 -1
- package/dist/preact/{index-D9ScFTVe.js → index-CFFA4RWo.js} +15 -24
- package/dist/preact/index-CFFA4RWo.js.map +1 -0
- package/dist/preact/index.js +1 -1
- package/dist/preact-bundled/index.js +486 -496
- package/dist/preact-bundled/index.js.map +1 -1
- package/dist/react/{index-D9ScFTVe.js → index-CFFA4RWo.js} +15 -24
- package/dist/react/index-CFFA4RWo.js.map +1 -0
- package/dist/react/index.js +1 -1
- package/dist/react-bundled/index.js +485 -495
- package/dist/react-bundled/index.js.map +1 -1
- package/docs/pmtiles.md +1 -1
- package/docs/release-verification.md +22 -6
- package/package.json +8 -8
- package/dist/preact/index-D9ScFTVe.js.map +0 -1
- package/dist/react/index-D9ScFTVe.js.map +0 -1
|
@@ -16731,14 +16731,16 @@ class sp {
|
|
|
16731
16731
|
n === "move" && ((o = (i = this.activeMoveHandler) == null ? void 0 : i.hasPendingMove) != null && o.call(i)) && ((c = (u = this.activeMoveHandler).cancelMove) == null || c.call(u), this.hideMoveConfirmationUI()), n === "ruler" && this.triggerRulerTool(), n && this.disableActiveToolHandlers();
|
|
16732
16732
|
}
|
|
16733
16733
|
resolveLeaflet(n) {
|
|
16734
|
+
var u;
|
|
16735
|
+
const r = (u = Me.default) != null ? u : Me;
|
|
16734
16736
|
if (!n.useExternalLeaflet)
|
|
16735
|
-
return
|
|
16737
|
+
return r;
|
|
16736
16738
|
if (n.leaflet && qi(n.leaflet))
|
|
16737
16739
|
return this.logger.debug("leaflet-runtime:external-injected"), n.leaflet;
|
|
16738
|
-
const
|
|
16739
|
-
return
|
|
16740
|
+
const o = globalThis.L;
|
|
16741
|
+
return o && qi(o) ? (this.logger.debug("leaflet-runtime:external-global"), o) : (this.logger.warn("leaflet-runtime:external-fallback-bundled", {
|
|
16740
16742
|
message: "External Leaflet requested but Draw APIs were missing; falling back to bundled Leaflet/Draw"
|
|
16741
|
-
}),
|
|
16743
|
+
}), r);
|
|
16742
16744
|
}
|
|
16743
16745
|
// ---------------- Lifecycle ----------------
|
|
16744
16746
|
async init() {
|
|
@@ -17012,28 +17014,17 @@ class sp {
|
|
|
17012
17014
|
async fitBoundsToData(n = 0.05) {
|
|
17013
17015
|
if (!this.map) return;
|
|
17014
17016
|
const r = this.store.bounds();
|
|
17015
|
-
|
|
17016
|
-
const i = r, o = this.L.latLngBounds(i);
|
|
17017
|
-
if (n > 0) {
|
|
17018
|
-
const u = o.getSouthWest(), c = o.getNorthEast(), f = (c.lat - u.lat) * n, g = (c.lng - u.lng) * n, p = this.L.latLngBounds(
|
|
17019
|
-
this.L.latLng(u.lat - f, u.lng - g),
|
|
17020
|
-
this.L.latLng(c.lat + f, c.lng + g)
|
|
17021
|
-
);
|
|
17022
|
-
this.map.fitBounds(p);
|
|
17023
|
-
} else
|
|
17024
|
-
this.map.fitBounds(o);
|
|
17017
|
+
r && await this.fitBounds(r, n);
|
|
17025
17018
|
}
|
|
17026
17019
|
async fitBounds(n, r = 0.05) {
|
|
17027
17020
|
if (!this.map) return;
|
|
17028
|
-
const i =
|
|
17029
|
-
if (
|
|
17030
|
-
|
|
17031
|
-
|
|
17032
|
-
|
|
17033
|
-
|
|
17034
|
-
|
|
17035
|
-
} else
|
|
17036
|
-
this.map.fitBounds(i);
|
|
17021
|
+
const [i, o] = n;
|
|
17022
|
+
if (i[0] === o[0] && i[1] === o[1]) {
|
|
17023
|
+
this.map.setView(i, this.map.getZoom());
|
|
17024
|
+
return;
|
|
17025
|
+
}
|
|
17026
|
+
const u = this.L.latLngBounds(n);
|
|
17027
|
+
this.map.fitBounds(r > 0 ? u.pad(r) : u);
|
|
17037
17028
|
}
|
|
17038
17029
|
async setView(n, r, i) {
|
|
17039
17030
|
this.map && this.map.setView([n, r], i != null ? i : this.map.getZoom());
|