gis-leaflet-helper 2.1.25 → 2.1.27
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.
|
@@ -6531,25 +6531,27 @@ const Pr = /* @__PURE__ */ br(M), Ar = /* @__PURE__ */ xr({
|
|
|
6531
6531
|
},
|
|
6532
6532
|
initEvt() {
|
|
6533
6533
|
this.map.on("mousemove", (i) => {
|
|
6534
|
-
this.lat = i.latlng.lat, this.lng = i.latlng.lng, this._latlngContainer && (this._latlngContainer.innerHTML = `<b>${this.langDic[this.lang].coordinate}:</b>${this.getCoordinate(this.lng)},${this.getCoordinate(this.lat)}`);
|
|
6534
|
+
this.lat = i.latlng.lat, this.lng = i.latlng.lng, this._latlngContainer && (this._latlngContainer.innerHTML = `<b>${this.langDic[this.lang].coordinate}:</b>${this.getCoordinate(this.lng, "lng")},${this.getCoordinate(this.lat, "lat")}`);
|
|
6535
6535
|
}), this.map.on("zoomend", () => {
|
|
6536
6536
|
this.zoom = this.map.getZoom(), this._levelContainer && (this._levelContainer.innerHTML = `<b>${this.langDic[this.lang].zoomLevel}:</b>${this.zoom + 1}`);
|
|
6537
6537
|
}), this.options.showFPS && this.calcFPS();
|
|
6538
6538
|
},
|
|
6539
|
-
getCoordinate(i) {
|
|
6539
|
+
getCoordinate(i, s = "lng") {
|
|
6540
6540
|
switch (this.options.coordinateUnit) {
|
|
6541
6541
|
case "decimal":
|
|
6542
6542
|
return i.toFixed(6);
|
|
6543
6543
|
case "radian":
|
|
6544
6544
|
return (i * Math.PI / 180).toFixed(10);
|
|
6545
6545
|
case "degrees":
|
|
6546
|
-
return this._formatDeg(i);
|
|
6546
|
+
return this._formatDeg(i, s);
|
|
6547
6547
|
}
|
|
6548
6548
|
},
|
|
6549
|
-
_formatDeg(i) {
|
|
6550
|
-
const
|
|
6551
|
-
let
|
|
6552
|
-
|
|
6549
|
+
_formatDeg(i, s) {
|
|
6550
|
+
const n = parseFloat(i), r = parseInt(n);
|
|
6551
|
+
let o = "";
|
|
6552
|
+
s === "lng" ? o = r > 0 ? "E" : "W" : s === "lat" && (o = r > 0 ? "N" : "S");
|
|
6553
|
+
let l = parseInt((n - r) * 60), f = (n - r) * 3600 - l * 60;
|
|
6554
|
+
return r + "°" + l + "′" + f.toFixed(2) + "″" + o;
|
|
6553
6555
|
},
|
|
6554
6556
|
calcFPS() {
|
|
6555
6557
|
if (this.frames++, this.frames >= 30) {
|
|
@@ -6756,7 +6758,8 @@ function ea(i, s, n) {
|
|
|
6756
6758
|
}
|
|
6757
6759
|
M.Map.addInitHook("addHandler", "drawHandler", Cr);
|
|
6758
6760
|
M.Map.addInitHook(function() {
|
|
6759
|
-
|
|
6761
|
+
var i, s, n;
|
|
6762
|
+
(i = this.options.eagleMapControl) != null && i.show && (this.eagleMapControl = new ba(this.options.eagleMapControl), this.addControl(this.eagleMapControl)), (s = this.options.statusBarControl) != null && s.show && (this.statusBarControl = new wa(this.options.statusBarControl), this.addControl(this.statusBarControl)), (n = this.options.scaleControl) != null && n.show && (this.scaleControl = new M.Control.Scale(
|
|
6760
6763
|
Object.assign(
|
|
6761
6764
|
{
|
|
6762
6765
|
position: "bottomleft",
|
|
@@ -10532,7 +10535,7 @@ function Ef(i) {
|
|
|
10532
10535
|
},
|
|
10533
10536
|
setCursor(n = "default") {
|
|
10534
10537
|
const r = this.getContainer();
|
|
10535
|
-
["auto", "pointer", "crosshair", "move", "text", "wait", "help", "grab", "default"].includes(n) ? r.style.cursor = `${n}` : r.style.cursor =
|
|
10538
|
+
["auto", "pointer", "crosshair", "move", "text", "wait", "help", "grab", "default"].includes(n) ? r.style.cursor = `${n}` : r.style.cursor = `url(${n}), auto`;
|
|
10536
10539
|
},
|
|
10537
10540
|
flyTo(n, r = 0, o = { animate: !1 }) {
|
|
10538
10541
|
n instanceof M.Marker ? (n = n._latlng, M.Map.prototype.flyTo.call(this, n, r || this.getZoom(), o)) : n instanceof M.Path || n instanceof M.FeatureGroup ? (n = n.getBounds(), M.Map.prototype.flyToBounds.call(this, n, o)) : M.Map.prototype.flyTo.call(this, n, r || this.getZoom(), o);
|