@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
|
@@ -5116,14 +5116,16 @@ class Ga {
|
|
|
5116
5116
|
t === "move" && ((r = (o = this.activeMoveHandler) == null ? void 0 : o.hasPendingMove) != null && r.call(o)) && ((n = (a = this.activeMoveHandler).cancelMove) == null || n.call(a), this.hideMoveConfirmationUI()), t === "ruler" && this.triggerRulerTool(), t && this.disableActiveToolHandlers();
|
|
5117
5117
|
}
|
|
5118
5118
|
resolveLeaflet(t) {
|
|
5119
|
+
var a;
|
|
5120
|
+
const e = (a = P.default) != null ? a : P;
|
|
5119
5121
|
if (!t.useExternalLeaflet)
|
|
5120
|
-
return
|
|
5122
|
+
return e;
|
|
5121
5123
|
if (t.leaflet && Ze(t.leaflet))
|
|
5122
5124
|
return this.logger.debug("leaflet-runtime:external-injected"), t.leaflet;
|
|
5123
|
-
const
|
|
5124
|
-
return
|
|
5125
|
+
const r = globalThis.L;
|
|
5126
|
+
return r && Ze(r) ? (this.logger.debug("leaflet-runtime:external-global"), r) : (this.logger.warn("leaflet-runtime:external-fallback-bundled", {
|
|
5125
5127
|
message: "External Leaflet requested but Draw APIs were missing; falling back to bundled Leaflet/Draw"
|
|
5126
|
-
}),
|
|
5128
|
+
}), e);
|
|
5127
5129
|
}
|
|
5128
5130
|
// ---------------- Lifecycle ----------------
|
|
5129
5131
|
async init() {
|
|
@@ -5397,28 +5399,17 @@ class Ga {
|
|
|
5397
5399
|
async fitBoundsToData(t = 0.05) {
|
|
5398
5400
|
if (!this.map) return;
|
|
5399
5401
|
const e = this.store.bounds();
|
|
5400
|
-
|
|
5401
|
-
const o = e, r = this.L.latLngBounds(o);
|
|
5402
|
-
if (t > 0) {
|
|
5403
|
-
const a = r.getSouthWest(), n = r.getNorthEast(), s = (n.lat - a.lat) * t, l = (n.lng - a.lng) * t, c = this.L.latLngBounds(
|
|
5404
|
-
this.L.latLng(a.lat - s, a.lng - l),
|
|
5405
|
-
this.L.latLng(n.lat + s, n.lng + l)
|
|
5406
|
-
);
|
|
5407
|
-
this.map.fitBounds(c);
|
|
5408
|
-
} else
|
|
5409
|
-
this.map.fitBounds(r);
|
|
5402
|
+
e && await this.fitBounds(e, t);
|
|
5410
5403
|
}
|
|
5411
5404
|
async fitBounds(t, e = 0.05) {
|
|
5412
5405
|
if (!this.map) return;
|
|
5413
|
-
const o =
|
|
5414
|
-
if (
|
|
5415
|
-
|
|
5416
|
-
|
|
5417
|
-
|
|
5418
|
-
|
|
5419
|
-
|
|
5420
|
-
} else
|
|
5421
|
-
this.map.fitBounds(o);
|
|
5406
|
+
const [o, r] = t;
|
|
5407
|
+
if (o[0] === r[0] && o[1] === r[1]) {
|
|
5408
|
+
this.map.setView(o, this.map.getZoom());
|
|
5409
|
+
return;
|
|
5410
|
+
}
|
|
5411
|
+
const a = this.L.latLngBounds(t);
|
|
5412
|
+
this.map.fitBounds(e > 0 ? a.pad(e) : a);
|
|
5422
5413
|
}
|
|
5423
5414
|
async setView(t, e, o) {
|
|
5424
5415
|
this.map && this.map.setView([t, e], o != null ? o : this.map.getZoom());
|
|
@@ -8547,4 +8538,4 @@ export {
|
|
|
8547
8538
|
Rt as normalizeGeoJSON,
|
|
8548
8539
|
ft as validateGeoJSON
|
|
8549
8540
|
};
|
|
8550
|
-
//# sourceMappingURL=index-
|
|
8541
|
+
//# sourceMappingURL=index-CFFA4RWo.js.map
|