zhihao-ui 1.2.36 → 1.2.37
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/es/{BaseInfo-C4sgm12k.js → BaseInfo-BjqSNfhB.js} +1 -1
- package/dist/es/{BaseItem-DwoIxH38.js → BaseItem-Da1CQtVm.js} +3 -3
- package/dist/es/{Button-BbUxF68h.js → Button-CKHqdHWj.js} +2 -2
- package/dist/es/{DatePicker-BkfvEDok.js → DatePicker-BOkpRWph.js} +3 -3
- package/dist/es/{DetailHeader-CmvLT5jU.js → DetailHeader-CL5Fin_g.js} +3 -3
- package/dist/es/{DetailSubTitle-BXjqx7Gl.js → DetailSubTitle-Derdb7AV.js} +2 -2
- package/dist/es/{Dialog-CiO2p3lS.js → Dialog-CGN6pFzA.js} +3 -3
- package/dist/es/{DiyDataTable-02Fvx4gj.js → DiyDataTable-CUbUe8NL.js} +4 -4
- package/dist/es/{EditInfoPair-2lOiJK1x.js → EditInfoPair-Dd_u_yvQ.js} +3 -3
- package/dist/es/{FileWrapper-oSb83fz-.js → FileWrapper-CGoXaXk9.js} +4 -4
- package/dist/es/{Grid-CHKAGBr9.js → Grid-Dr8kPvc8.js} +2 -2
- package/dist/es/{InfoPair-CDbyplp2.js → InfoPair-B2VzU1pL.js} +3 -3
- package/dist/es/{Input-CWfFyiHL.js → Input-DbqCWZ3K.js} +3 -3
- package/dist/es/{Loading-nlPpGN-L.js → Loading-Dimy_7_w.js} +2 -2
- package/dist/es/{Map-DngWgfIX.js → Map-BLVl3XBl.js} +1033 -1007
- package/dist/es/{MessageBox-DJR9qhIT.js → MessageBox-B54tNjcZ.js} +2 -2
- package/dist/es/{MoneyInput-BGmF3L2m.js → MoneyInput-uw4tR9WE.js} +8 -8
- package/dist/es/{PageHeadPanel-Bw6wb6jF.js → PageHeadPanel-CgR9a7c6.js} +2 -2
- package/dist/es/{Table-D8EshRWb.js → Table-BdySjJta.js} +5 -5
- package/dist/es/{ToolTips-Beib4mGU.js → ToolTips-BHQkWmMR.js} +6 -6
- package/dist/es/index.js +23 -23
- package/dist/es/{utils-hD_p7bGY.js → utils-DUHqvTHl.js} +1 -1
- package/dist/es/{vendor-Bonn9k5m.js → vendor-B7FHttiN.js} +229 -228
- package/dist/index.css +1 -1
- package/dist/types/components/Map/components/scaleLine.vue.d.ts +2 -2
- package/dist/types/components/Map/components/toolPanel.vue.d.ts +2 -2
- package/dist/types/components/Map/interface/entity/render.d.ts +1 -1
- package/dist/types/components/Map/render/canvasRender/renderCustomOverlay.d.ts +3 -3
- package/dist/types/components/Map/render/canvasRender/renderShipStyle.d.ts +1 -2
- package/dist/types/components/Map/render/canvasRender/renderTrackStyle.d.ts +1 -2
- package/dist/types/components/Map/render/drawPolygon.d.ts +1 -2
- package/dist/types/components/Map/render/renderDashboard.d.ts +1 -2
- package/dist/types/components/Map/render/renderMarker.d.ts +1 -1
- package/dist/types/components/Map/render/renderShip.d.ts +4 -5
- package/dist/types/components/Map/render/renderTrack.d.ts +1 -1
- package/dist/types/components/Map/render/renderTruck.d.ts +1 -2
- package/dist/types/components/Map/utils/store.d.ts +3 -2
- package/dist/umd/index.css +1 -1
- package/dist/umd/index.umd.cjs +17 -17
- package/package.json +1 -1
|
@@ -48445,7 +48445,167 @@ function fW(t) {
|
|
|
48445
48445
|
e = (32 | t & 31) + 63, n += String.fromCharCode(e), t >>= 5;
|
|
48446
48446
|
return e = t + 63, n += String.fromCharCode(e), n;
|
|
48447
48447
|
}
|
|
48448
|
-
const Af =
|
|
48448
|
+
const Af = "units", gW = [1, 2, 5], xl = 25.4 / 0.28;
|
|
48449
|
+
class KV extends Lh {
|
|
48450
|
+
/**
|
|
48451
|
+
* @param {Options} [options] Scale line options.
|
|
48452
|
+
*/
|
|
48453
|
+
constructor(e) {
|
|
48454
|
+
e = e || {};
|
|
48455
|
+
const n = document.createElement("div");
|
|
48456
|
+
n.style.pointerEvents = "none", super({
|
|
48457
|
+
element: n,
|
|
48458
|
+
render: e.render,
|
|
48459
|
+
target: e.target
|
|
48460
|
+
}), this.on, this.once, this.un;
|
|
48461
|
+
const i = e.className !== void 0 ? e.className : e.bar ? "ol-scale-bar" : "ol-scale-line";
|
|
48462
|
+
this.innerElement_ = document.createElement("div"), this.innerElement_.className = i + "-inner", this.element.className = i + " " + Nu, this.element.appendChild(this.innerElement_), this.viewState_ = null, this.minWidth_ = e.minWidth !== void 0 ? e.minWidth : 64, this.maxWidth_ = e.maxWidth, this.renderedVisible_ = !1, this.renderedWidth_ = void 0, this.renderedHTML_ = "", this.addChangeListener(Af, this.handleUnitsChanged_), this.setUnits(e.units || "metric"), this.scaleBar_ = e.bar || !1, this.scaleBarSteps_ = e.steps || 4, this.scaleBarText_ = e.text || !1, this.dpi_ = e.dpi || void 0;
|
|
48463
|
+
}
|
|
48464
|
+
/**
|
|
48465
|
+
* Return the units to use in the scale line.
|
|
48466
|
+
* @return {Units} The units
|
|
48467
|
+
* to use in the scale line.
|
|
48468
|
+
* @observable
|
|
48469
|
+
* @api
|
|
48470
|
+
*/
|
|
48471
|
+
getUnits() {
|
|
48472
|
+
return this.get(Af);
|
|
48473
|
+
}
|
|
48474
|
+
/**
|
|
48475
|
+
* @private
|
|
48476
|
+
*/
|
|
48477
|
+
handleUnitsChanged_() {
|
|
48478
|
+
this.updateElement_();
|
|
48479
|
+
}
|
|
48480
|
+
/**
|
|
48481
|
+
* Set the units to use in the scale line.
|
|
48482
|
+
* @param {Units} units The units to use in the scale line.
|
|
48483
|
+
* @observable
|
|
48484
|
+
* @api
|
|
48485
|
+
*/
|
|
48486
|
+
setUnits(e) {
|
|
48487
|
+
this.set(Af, e);
|
|
48488
|
+
}
|
|
48489
|
+
/**
|
|
48490
|
+
* Specify the dpi of output device such as printer.
|
|
48491
|
+
* @param {number|undefined} dpi The dpi of output device.
|
|
48492
|
+
* @api
|
|
48493
|
+
*/
|
|
48494
|
+
setDpi(e) {
|
|
48495
|
+
this.dpi_ = e;
|
|
48496
|
+
}
|
|
48497
|
+
/**
|
|
48498
|
+
* @private
|
|
48499
|
+
*/
|
|
48500
|
+
updateElement_() {
|
|
48501
|
+
const e = this.viewState_;
|
|
48502
|
+
if (!e) {
|
|
48503
|
+
this.renderedVisible_ && (this.element.style.display = "none", this.renderedVisible_ = !1);
|
|
48504
|
+
return;
|
|
48505
|
+
}
|
|
48506
|
+
const n = e.center, i = e.projection, r = this.getUnits(), s = r == "degrees" ? "degrees" : "m";
|
|
48507
|
+
let o = md(
|
|
48508
|
+
i,
|
|
48509
|
+
e.resolution,
|
|
48510
|
+
n,
|
|
48511
|
+
s
|
|
48512
|
+
);
|
|
48513
|
+
const a = this.minWidth_ * (this.dpi_ || xl) / xl, l = this.maxWidth_ !== void 0 ? this.maxWidth_ * (this.dpi_ || xl) / xl : void 0;
|
|
48514
|
+
let u = a * o, c = "";
|
|
48515
|
+
if (r == "degrees") {
|
|
48516
|
+
const w = ja.degrees;
|
|
48517
|
+
u *= w, u < w / 60 ? (c = "″", o *= 3600) : u < w ? (c = "′", o *= 60) : c = "°";
|
|
48518
|
+
} else if (r == "imperial")
|
|
48519
|
+
u < 0.9144 ? (c = "in", o /= 0.0254) : u < 1609.344 ? (c = "ft", o /= 0.3048) : (c = "mi", o /= 1609.344);
|
|
48520
|
+
else if (r == "nautical")
|
|
48521
|
+
o /= 1852, c = "NM";
|
|
48522
|
+
else if (r == "metric")
|
|
48523
|
+
u < 1e-6 ? (c = "nm", o *= 1e9) : u < 1e-3 ? (c = "μm", o *= 1e6) : u < 1 ? (c = "mm", o *= 1e3) : u < 1e3 ? c = "m" : (c = "km", o /= 1e3);
|
|
48524
|
+
else if (r == "us")
|
|
48525
|
+
u < 0.9144 ? (c = "in", o *= 39.37) : u < 1609.344 ? (c = "ft", o /= 0.30480061) : (c = "mi", o /= 1609.3472);
|
|
48526
|
+
else
|
|
48527
|
+
throw new Error("Invalid units");
|
|
48528
|
+
let d = 3 * Math.floor(Math.log(a * o) / Math.log(10)), h, p, f, m, _, y;
|
|
48529
|
+
for (; ; ) {
|
|
48530
|
+
f = Math.floor(d / 3);
|
|
48531
|
+
const w = Math.pow(10, f);
|
|
48532
|
+
if (h = gW[(d % 3 + 3) % 3] * w, p = Math.round(h / o), isNaN(p)) {
|
|
48533
|
+
this.element.style.display = "none", this.renderedVisible_ = !1;
|
|
48534
|
+
return;
|
|
48535
|
+
}
|
|
48536
|
+
if (l !== void 0 && p >= l) {
|
|
48537
|
+
h = m, p = _, f = y;
|
|
48538
|
+
break;
|
|
48539
|
+
} else if (p >= a)
|
|
48540
|
+
break;
|
|
48541
|
+
m = h, _ = p, y = f, ++d;
|
|
48542
|
+
}
|
|
48543
|
+
const E = this.scaleBar_ ? this.createScaleBar(p, h, c) : h.toFixed(f < 0 ? -f : 0) + " " + c;
|
|
48544
|
+
this.renderedHTML_ != E && (this.innerElement_.innerHTML = E, this.renderedHTML_ = E), this.renderedWidth_ != p && (this.innerElement_.style.width = p + "px", this.renderedWidth_ = p), this.renderedVisible_ || (this.element.style.display = "", this.renderedVisible_ = !0);
|
|
48545
|
+
}
|
|
48546
|
+
/**
|
|
48547
|
+
* @private
|
|
48548
|
+
* @param {number} width The current width of the scalebar.
|
|
48549
|
+
* @param {number} scale The current scale.
|
|
48550
|
+
* @param {string} suffix The suffix to append to the scale text.
|
|
48551
|
+
* @return {string} The stringified HTML of the scalebar.
|
|
48552
|
+
*/
|
|
48553
|
+
createScaleBar(e, n, i) {
|
|
48554
|
+
const r = this.getScaleForResolution(), s = r < 1 ? Math.round(1 / r).toLocaleString() + " : 1" : "1 : " + Math.round(r).toLocaleString(), o = this.scaleBarSteps_, a = e / o, l = [this.createMarker("absolute")];
|
|
48555
|
+
for (let c = 0; c < o; ++c) {
|
|
48556
|
+
const d = c % 2 === 0 ? "ol-scale-singlebar-odd" : "ol-scale-singlebar-even";
|
|
48557
|
+
l.push(
|
|
48558
|
+
`<div><div class="ol-scale-singlebar ${d}" style="width: ${a}px;"></div>` + this.createMarker("relative") + // render text every second step, except when only 2 steps
|
|
48559
|
+
(c % 2 === 0 || o === 2 ? this.createStepText(c, e, !1, n, i) : "") + "</div>"
|
|
48560
|
+
);
|
|
48561
|
+
}
|
|
48562
|
+
return l.push(this.createStepText(o, e, !0, n, i)), (this.scaleBarText_ ? `<div class="ol-scale-text" style="width: ${e}px;">` + s + "</div>" : "") + l.join("");
|
|
48563
|
+
}
|
|
48564
|
+
/**
|
|
48565
|
+
* Creates a marker at given position
|
|
48566
|
+
* @param {'absolute'|'relative'} position The position, absolute or relative
|
|
48567
|
+
* @return {string} The stringified div containing the marker
|
|
48568
|
+
*/
|
|
48569
|
+
createMarker(e) {
|
|
48570
|
+
return `<div class="ol-scale-step-marker" style="position: ${e}; top: ${e === "absolute" ? 3 : -10}px;"></div>`;
|
|
48571
|
+
}
|
|
48572
|
+
/**
|
|
48573
|
+
* Creates the label for a marker marker at given position
|
|
48574
|
+
* @param {number} i The iterator
|
|
48575
|
+
* @param {number} width The width the scalebar will currently use
|
|
48576
|
+
* @param {boolean} isLast Flag indicating if we add the last step text
|
|
48577
|
+
* @param {number} scale The current scale for the whole scalebar
|
|
48578
|
+
* @param {string} suffix The suffix for the scale
|
|
48579
|
+
* @return {string} The stringified div containing the step text
|
|
48580
|
+
*/
|
|
48581
|
+
createStepText(e, n, i, r, s) {
|
|
48582
|
+
const a = (e === 0 ? 0 : Math.round(r / this.scaleBarSteps_ * e * 100) / 100) + (e === 0 ? "" : " " + s), l = e === 0 ? -3 : n / this.scaleBarSteps_ * -1, u = e === 0 ? 0 : n / this.scaleBarSteps_ * 2;
|
|
48583
|
+
return `<div class="ol-scale-step-text" style="margin-left: ${l}px;text-align: ${e === 0 ? "left" : "center"};min-width: ${u}px;left: ${i ? n + "px" : "unset"};">` + a + "</div>";
|
|
48584
|
+
}
|
|
48585
|
+
/**
|
|
48586
|
+
* Returns the appropriate scale for the given resolution and units.
|
|
48587
|
+
* @return {number} The appropriate scale.
|
|
48588
|
+
*/
|
|
48589
|
+
getScaleForResolution() {
|
|
48590
|
+
const e = md(
|
|
48591
|
+
this.viewState_.projection,
|
|
48592
|
+
this.viewState_.resolution,
|
|
48593
|
+
this.viewState_.center,
|
|
48594
|
+
"m"
|
|
48595
|
+
), n = this.dpi_ || xl, i = 1e3 / 25.4;
|
|
48596
|
+
return e * i * n;
|
|
48597
|
+
}
|
|
48598
|
+
/**
|
|
48599
|
+
* Update the scale line element.
|
|
48600
|
+
* @param {import("../MapEvent.js").default} mapEvent Map event.
|
|
48601
|
+
* @override
|
|
48602
|
+
*/
|
|
48603
|
+
render(e) {
|
|
48604
|
+
const n = e.frameState;
|
|
48605
|
+
n ? this.viewState_ = n.viewState : this.viewState_ = null, this.updateElement_();
|
|
48606
|
+
}
|
|
48607
|
+
}
|
|
48608
|
+
const Of = {
|
|
48449
48609
|
/**
|
|
48450
48610
|
* Triggered when a tile starts loading.
|
|
48451
48611
|
* @event module:ol/source/Tile.TileSourceEvent#tileloadstart
|
|
@@ -48855,9 +49015,9 @@ class YC {
|
|
|
48855
49015
|
}
|
|
48856
49016
|
function WC(t) {
|
|
48857
49017
|
let e = t.getDefaultTileGrid();
|
|
48858
|
-
return e || (e =
|
|
49018
|
+
return e || (e = _W(t), t.setDefaultTileGrid(e)), e;
|
|
48859
49019
|
}
|
|
48860
|
-
function
|
|
49020
|
+
function pW(t, e, n) {
|
|
48861
49021
|
const i = e[0], r = t.getTileCoordCenter(e), s = Pv(n);
|
|
48862
49022
|
if (!Va(s, r)) {
|
|
48863
49023
|
const o = gt(s), a = Math.ceil(
|
|
@@ -48867,7 +49027,7 @@ function gW(t, e, n) {
|
|
|
48867
49027
|
}
|
|
48868
49028
|
return e;
|
|
48869
49029
|
}
|
|
48870
|
-
function
|
|
49030
|
+
function mW(t, e, n, i) {
|
|
48871
49031
|
i = i !== void 0 ? i : "top-left";
|
|
48872
49032
|
const r = VC(t, e, n);
|
|
48873
49033
|
return new YC({
|
|
@@ -48877,7 +49037,7 @@ function pW(t, e, n, i) {
|
|
|
48877
49037
|
tileSize: n
|
|
48878
49038
|
});
|
|
48879
49039
|
}
|
|
48880
|
-
function
|
|
49040
|
+
function vW(t) {
|
|
48881
49041
|
const e = t || {}, n = e.extent || tn("EPSG:3857").getExtent(), i = {
|
|
48882
49042
|
extent: n,
|
|
48883
49043
|
minZoom: e.minZoom,
|
|
@@ -48900,9 +49060,9 @@ function VC(t, e, n, i) {
|
|
|
48900
49060
|
a[l] = i / Math.pow(2, l);
|
|
48901
49061
|
return a;
|
|
48902
49062
|
}
|
|
48903
|
-
function
|
|
49063
|
+
function _W(t, e, n, i) {
|
|
48904
49064
|
const r = Pv(t);
|
|
48905
|
-
return
|
|
49065
|
+
return mW(r, e, n, i);
|
|
48906
49066
|
}
|
|
48907
49067
|
function Pv(t) {
|
|
48908
49068
|
t = tn(t);
|
|
@@ -48913,7 +49073,7 @@ function Pv(t) {
|
|
|
48913
49073
|
}
|
|
48914
49074
|
return e;
|
|
48915
49075
|
}
|
|
48916
|
-
class
|
|
49076
|
+
class yW extends jw {
|
|
48917
49077
|
/**
|
|
48918
49078
|
* @param {Options} options SourceTile source options.
|
|
48919
49079
|
*/
|
|
@@ -49021,7 +49181,7 @@ class _W extends jw {
|
|
|
49021
49181
|
*/
|
|
49022
49182
|
getTileCoordForTileUrlFunction(e, n) {
|
|
49023
49183
|
const i = n !== void 0 ? n : this.getProjection(), r = n !== void 0 ? this.getTileGridForProjection(i) : this.tileGrid || this.getTileGridForProjection(i);
|
|
49024
|
-
return this.getWrapX() && i.isGlobal() && (e =
|
|
49184
|
+
return this.getWrapX() && i.isGlobal() && (e = pW(r, e, i)), AG(e, r) ? e : null;
|
|
49025
49185
|
}
|
|
49026
49186
|
/**
|
|
49027
49187
|
* Remove all cached reprojected tiles from the source. The next render cycle will create new tiles.
|
|
@@ -49036,7 +49196,7 @@ class _W extends jw {
|
|
|
49036
49196
|
this.clear(), super.refresh();
|
|
49037
49197
|
}
|
|
49038
49198
|
}
|
|
49039
|
-
class
|
|
49199
|
+
class bW extends wr {
|
|
49040
49200
|
/**
|
|
49041
49201
|
* @param {string} type Type.
|
|
49042
49202
|
* @param {import("../Tile.js").default} tile The tile.
|
|
@@ -49045,9 +49205,9 @@ class yW extends wr {
|
|
|
49045
49205
|
super(e), this.tile = n;
|
|
49046
49206
|
}
|
|
49047
49207
|
}
|
|
49048
|
-
const
|
|
49049
|
-
function
|
|
49050
|
-
return t.replace(
|
|
49208
|
+
const EW = /\{z\}/g, wW = /\{x\}/g, CW = /\{y\}/g, SW = /\{-y\}/g;
|
|
49209
|
+
function xW(t, e, n, i, r) {
|
|
49210
|
+
return t.replace(EW, e.toString()).replace(wW, n.toString()).replace(CW, i.toString()).replace(SW, function() {
|
|
49051
49211
|
if (r === void 0)
|
|
49052
49212
|
throw new Error(
|
|
49053
49213
|
"If the URL template has a {-y} placeholder, the grid extent must be known"
|
|
@@ -49055,7 +49215,7 @@ function SW(t, e, n, i, r) {
|
|
|
49055
49215
|
return (r - i).toString();
|
|
49056
49216
|
});
|
|
49057
49217
|
}
|
|
49058
|
-
function
|
|
49218
|
+
function TW(t) {
|
|
49059
49219
|
const e = [];
|
|
49060
49220
|
let n = /\{([a-z])-([a-z])\}/.exec(t);
|
|
49061
49221
|
if (n) {
|
|
@@ -49073,7 +49233,7 @@ function xW(t) {
|
|
|
49073
49233
|
}
|
|
49074
49234
|
return e.push(t), e;
|
|
49075
49235
|
}
|
|
49076
|
-
function
|
|
49236
|
+
function RW(t, e) {
|
|
49077
49237
|
return (
|
|
49078
49238
|
/**
|
|
49079
49239
|
* @param {import("./tilecoord.js").TileCoord} tileCoord Tile Coordinate.
|
|
@@ -49090,17 +49250,17 @@ function TW(t, e) {
|
|
|
49090
49250
|
const a = e.getFullTileRange(o);
|
|
49091
49251
|
a && (s = a.getHeight() - 1);
|
|
49092
49252
|
}
|
|
49093
|
-
return
|
|
49253
|
+
return xW(t, o, n[1], n[2], s);
|
|
49094
49254
|
}
|
|
49095
49255
|
);
|
|
49096
49256
|
}
|
|
49097
|
-
function
|
|
49257
|
+
function PW(t, e) {
|
|
49098
49258
|
const n = t.length, i = new Array(n);
|
|
49099
49259
|
for (let r = 0; r < n; ++r)
|
|
49100
|
-
i[r] =
|
|
49101
|
-
return
|
|
49260
|
+
i[r] = RW(t[r], e);
|
|
49261
|
+
return IW(i);
|
|
49102
49262
|
}
|
|
49103
|
-
function
|
|
49263
|
+
function IW(t) {
|
|
49104
49264
|
return t.length === 1 ? t[0] : (
|
|
49105
49265
|
/**
|
|
49106
49266
|
* @param {import("./tilecoord.js").TileCoord} tileCoord Tile Coordinate.
|
|
@@ -49116,7 +49276,7 @@ function PW(t) {
|
|
|
49116
49276
|
}
|
|
49117
49277
|
);
|
|
49118
49278
|
}
|
|
49119
|
-
class Iv extends
|
|
49279
|
+
class Iv extends yW {
|
|
49120
49280
|
/**
|
|
49121
49281
|
* @param {Options} options Image tile options.
|
|
49122
49282
|
*/
|
|
@@ -49176,7 +49336,7 @@ class Iv extends _W {
|
|
|
49176
49336
|
e.target
|
|
49177
49337
|
), i = it(n), r = n.getState();
|
|
49178
49338
|
let s;
|
|
49179
|
-
r == Ce.LOADING ? (this.tileLoadingKeys_[i] = !0, s =
|
|
49339
|
+
r == Ce.LOADING ? (this.tileLoadingKeys_[i] = !0, s = Of.TILELOADSTART) : i in this.tileLoadingKeys_ && (delete this.tileLoadingKeys_[i], s = r == Ce.ERROR ? Of.TILELOADERROR : r == Ce.LOADED ? Of.TILELOADEND : void 0), s != null && this.dispatchEvent(new bW(s, n));
|
|
49180
49340
|
}
|
|
49181
49341
|
/**
|
|
49182
49342
|
* Deprecated. Use an ImageTile source instead.
|
|
@@ -49203,7 +49363,7 @@ class Iv extends _W {
|
|
|
49203
49363
|
* @api
|
|
49204
49364
|
*/
|
|
49205
49365
|
setUrl(e) {
|
|
49206
|
-
const n =
|
|
49366
|
+
const n = TW(e);
|
|
49207
49367
|
this.urls = n, this.setUrls(n);
|
|
49208
49368
|
}
|
|
49209
49369
|
/**
|
|
@@ -49216,7 +49376,7 @@ class Iv extends _W {
|
|
|
49216
49376
|
this.urls = e;
|
|
49217
49377
|
const n = e.join(`
|
|
49218
49378
|
`);
|
|
49219
|
-
this.generateTileUrlFunction_ ? this.setTileUrlFunction(
|
|
49379
|
+
this.generateTileUrlFunction_ ? this.setTileUrlFunction(PW(e, this.tileGrid), n) : this.setKey(n);
|
|
49220
49380
|
}
|
|
49221
49381
|
/**
|
|
49222
49382
|
* @param {import("../tilecoord.js").TileCoord} tileCoord Tile coordinate.
|
|
@@ -49227,7 +49387,7 @@ class Iv extends _W {
|
|
|
49227
49387
|
tileUrlFunction(e, n, i) {
|
|
49228
49388
|
}
|
|
49229
49389
|
}
|
|
49230
|
-
class
|
|
49390
|
+
class MW extends Iv {
|
|
49231
49391
|
/**
|
|
49232
49392
|
* @param {!Options} options Image tile options.
|
|
49233
49393
|
*/
|
|
@@ -49238,7 +49398,7 @@ class IW extends Iv {
|
|
|
49238
49398
|
projection: e.projection,
|
|
49239
49399
|
state: e.state,
|
|
49240
49400
|
tileGrid: e.tileGrid,
|
|
49241
|
-
tileLoadFunction: e.tileLoadFunction ? e.tileLoadFunction :
|
|
49401
|
+
tileLoadFunction: e.tileLoadFunction ? e.tileLoadFunction : DW,
|
|
49242
49402
|
tilePixelRatio: e.tilePixelRatio,
|
|
49243
49403
|
tileUrlFunction: e.tileUrlFunction,
|
|
49244
49404
|
url: e.url,
|
|
@@ -49389,16 +49549,16 @@ class IW extends Iv {
|
|
|
49389
49549
|
}
|
|
49390
49550
|
}
|
|
49391
49551
|
}
|
|
49392
|
-
function
|
|
49552
|
+
function DW(t, e) {
|
|
49393
49553
|
t.getImage().src = e;
|
|
49394
49554
|
}
|
|
49395
|
-
class
|
|
49555
|
+
class XV extends MW {
|
|
49396
49556
|
/**
|
|
49397
49557
|
* @param {Options} [options] XYZ options.
|
|
49398
49558
|
*/
|
|
49399
49559
|
constructor(e) {
|
|
49400
49560
|
e = e || {};
|
|
49401
|
-
const n = e.projection !== void 0 ? e.projection : "EPSG:3857", i = e.tileGrid !== void 0 ? e.tileGrid :
|
|
49561
|
+
const n = e.projection !== void 0 ? e.projection : "EPSG:3857", i = e.tileGrid !== void 0 ? e.tileGrid : vW({
|
|
49402
49562
|
extent: Pv(n),
|
|
49403
49563
|
maxResolution: e.maxResolution,
|
|
49404
49564
|
maxZoom: e.maxZoom,
|
|
@@ -49432,166 +49592,6 @@ class KV extends IW {
|
|
|
49432
49592
|
return this.gutter_;
|
|
49433
49593
|
}
|
|
49434
49594
|
}
|
|
49435
|
-
const Of = "units", DW = [1, 2, 5], xl = 25.4 / 0.28;
|
|
49436
|
-
class XV extends Lh {
|
|
49437
|
-
/**
|
|
49438
|
-
* @param {Options} [options] Scale line options.
|
|
49439
|
-
*/
|
|
49440
|
-
constructor(e) {
|
|
49441
|
-
e = e || {};
|
|
49442
|
-
const n = document.createElement("div");
|
|
49443
|
-
n.style.pointerEvents = "none", super({
|
|
49444
|
-
element: n,
|
|
49445
|
-
render: e.render,
|
|
49446
|
-
target: e.target
|
|
49447
|
-
}), this.on, this.once, this.un;
|
|
49448
|
-
const i = e.className !== void 0 ? e.className : e.bar ? "ol-scale-bar" : "ol-scale-line";
|
|
49449
|
-
this.innerElement_ = document.createElement("div"), this.innerElement_.className = i + "-inner", this.element.className = i + " " + Nu, this.element.appendChild(this.innerElement_), this.viewState_ = null, this.minWidth_ = e.minWidth !== void 0 ? e.minWidth : 64, this.maxWidth_ = e.maxWidth, this.renderedVisible_ = !1, this.renderedWidth_ = void 0, this.renderedHTML_ = "", this.addChangeListener(Of, this.handleUnitsChanged_), this.setUnits(e.units || "metric"), this.scaleBar_ = e.bar || !1, this.scaleBarSteps_ = e.steps || 4, this.scaleBarText_ = e.text || !1, this.dpi_ = e.dpi || void 0;
|
|
49450
|
-
}
|
|
49451
|
-
/**
|
|
49452
|
-
* Return the units to use in the scale line.
|
|
49453
|
-
* @return {Units} The units
|
|
49454
|
-
* to use in the scale line.
|
|
49455
|
-
* @observable
|
|
49456
|
-
* @api
|
|
49457
|
-
*/
|
|
49458
|
-
getUnits() {
|
|
49459
|
-
return this.get(Of);
|
|
49460
|
-
}
|
|
49461
|
-
/**
|
|
49462
|
-
* @private
|
|
49463
|
-
*/
|
|
49464
|
-
handleUnitsChanged_() {
|
|
49465
|
-
this.updateElement_();
|
|
49466
|
-
}
|
|
49467
|
-
/**
|
|
49468
|
-
* Set the units to use in the scale line.
|
|
49469
|
-
* @param {Units} units The units to use in the scale line.
|
|
49470
|
-
* @observable
|
|
49471
|
-
* @api
|
|
49472
|
-
*/
|
|
49473
|
-
setUnits(e) {
|
|
49474
|
-
this.set(Of, e);
|
|
49475
|
-
}
|
|
49476
|
-
/**
|
|
49477
|
-
* Specify the dpi of output device such as printer.
|
|
49478
|
-
* @param {number|undefined} dpi The dpi of output device.
|
|
49479
|
-
* @api
|
|
49480
|
-
*/
|
|
49481
|
-
setDpi(e) {
|
|
49482
|
-
this.dpi_ = e;
|
|
49483
|
-
}
|
|
49484
|
-
/**
|
|
49485
|
-
* @private
|
|
49486
|
-
*/
|
|
49487
|
-
updateElement_() {
|
|
49488
|
-
const e = this.viewState_;
|
|
49489
|
-
if (!e) {
|
|
49490
|
-
this.renderedVisible_ && (this.element.style.display = "none", this.renderedVisible_ = !1);
|
|
49491
|
-
return;
|
|
49492
|
-
}
|
|
49493
|
-
const n = e.center, i = e.projection, r = this.getUnits(), s = r == "degrees" ? "degrees" : "m";
|
|
49494
|
-
let o = md(
|
|
49495
|
-
i,
|
|
49496
|
-
e.resolution,
|
|
49497
|
-
n,
|
|
49498
|
-
s
|
|
49499
|
-
);
|
|
49500
|
-
const a = this.minWidth_ * (this.dpi_ || xl) / xl, l = this.maxWidth_ !== void 0 ? this.maxWidth_ * (this.dpi_ || xl) / xl : void 0;
|
|
49501
|
-
let u = a * o, c = "";
|
|
49502
|
-
if (r == "degrees") {
|
|
49503
|
-
const w = ja.degrees;
|
|
49504
|
-
u *= w, u < w / 60 ? (c = "″", o *= 3600) : u < w ? (c = "′", o *= 60) : c = "°";
|
|
49505
|
-
} else if (r == "imperial")
|
|
49506
|
-
u < 0.9144 ? (c = "in", o /= 0.0254) : u < 1609.344 ? (c = "ft", o /= 0.3048) : (c = "mi", o /= 1609.344);
|
|
49507
|
-
else if (r == "nautical")
|
|
49508
|
-
o /= 1852, c = "NM";
|
|
49509
|
-
else if (r == "metric")
|
|
49510
|
-
u < 1e-6 ? (c = "nm", o *= 1e9) : u < 1e-3 ? (c = "μm", o *= 1e6) : u < 1 ? (c = "mm", o *= 1e3) : u < 1e3 ? c = "m" : (c = "km", o /= 1e3);
|
|
49511
|
-
else if (r == "us")
|
|
49512
|
-
u < 0.9144 ? (c = "in", o *= 39.37) : u < 1609.344 ? (c = "ft", o /= 0.30480061) : (c = "mi", o /= 1609.3472);
|
|
49513
|
-
else
|
|
49514
|
-
throw new Error("Invalid units");
|
|
49515
|
-
let d = 3 * Math.floor(Math.log(a * o) / Math.log(10)), h, p, f, m, _, y;
|
|
49516
|
-
for (; ; ) {
|
|
49517
|
-
f = Math.floor(d / 3);
|
|
49518
|
-
const w = Math.pow(10, f);
|
|
49519
|
-
if (h = DW[(d % 3 + 3) % 3] * w, p = Math.round(h / o), isNaN(p)) {
|
|
49520
|
-
this.element.style.display = "none", this.renderedVisible_ = !1;
|
|
49521
|
-
return;
|
|
49522
|
-
}
|
|
49523
|
-
if (l !== void 0 && p >= l) {
|
|
49524
|
-
h = m, p = _, f = y;
|
|
49525
|
-
break;
|
|
49526
|
-
} else if (p >= a)
|
|
49527
|
-
break;
|
|
49528
|
-
m = h, _ = p, y = f, ++d;
|
|
49529
|
-
}
|
|
49530
|
-
const E = this.scaleBar_ ? this.createScaleBar(p, h, c) : h.toFixed(f < 0 ? -f : 0) + " " + c;
|
|
49531
|
-
this.renderedHTML_ != E && (this.innerElement_.innerHTML = E, this.renderedHTML_ = E), this.renderedWidth_ != p && (this.innerElement_.style.width = p + "px", this.renderedWidth_ = p), this.renderedVisible_ || (this.element.style.display = "", this.renderedVisible_ = !0);
|
|
49532
|
-
}
|
|
49533
|
-
/**
|
|
49534
|
-
* @private
|
|
49535
|
-
* @param {number} width The current width of the scalebar.
|
|
49536
|
-
* @param {number} scale The current scale.
|
|
49537
|
-
* @param {string} suffix The suffix to append to the scale text.
|
|
49538
|
-
* @return {string} The stringified HTML of the scalebar.
|
|
49539
|
-
*/
|
|
49540
|
-
createScaleBar(e, n, i) {
|
|
49541
|
-
const r = this.getScaleForResolution(), s = r < 1 ? Math.round(1 / r).toLocaleString() + " : 1" : "1 : " + Math.round(r).toLocaleString(), o = this.scaleBarSteps_, a = e / o, l = [this.createMarker("absolute")];
|
|
49542
|
-
for (let c = 0; c < o; ++c) {
|
|
49543
|
-
const d = c % 2 === 0 ? "ol-scale-singlebar-odd" : "ol-scale-singlebar-even";
|
|
49544
|
-
l.push(
|
|
49545
|
-
`<div><div class="ol-scale-singlebar ${d}" style="width: ${a}px;"></div>` + this.createMarker("relative") + // render text every second step, except when only 2 steps
|
|
49546
|
-
(c % 2 === 0 || o === 2 ? this.createStepText(c, e, !1, n, i) : "") + "</div>"
|
|
49547
|
-
);
|
|
49548
|
-
}
|
|
49549
|
-
return l.push(this.createStepText(o, e, !0, n, i)), (this.scaleBarText_ ? `<div class="ol-scale-text" style="width: ${e}px;">` + s + "</div>" : "") + l.join("");
|
|
49550
|
-
}
|
|
49551
|
-
/**
|
|
49552
|
-
* Creates a marker at given position
|
|
49553
|
-
* @param {'absolute'|'relative'} position The position, absolute or relative
|
|
49554
|
-
* @return {string} The stringified div containing the marker
|
|
49555
|
-
*/
|
|
49556
|
-
createMarker(e) {
|
|
49557
|
-
return `<div class="ol-scale-step-marker" style="position: ${e}; top: ${e === "absolute" ? 3 : -10}px;"></div>`;
|
|
49558
|
-
}
|
|
49559
|
-
/**
|
|
49560
|
-
* Creates the label for a marker marker at given position
|
|
49561
|
-
* @param {number} i The iterator
|
|
49562
|
-
* @param {number} width The width the scalebar will currently use
|
|
49563
|
-
* @param {boolean} isLast Flag indicating if we add the last step text
|
|
49564
|
-
* @param {number} scale The current scale for the whole scalebar
|
|
49565
|
-
* @param {string} suffix The suffix for the scale
|
|
49566
|
-
* @return {string} The stringified div containing the step text
|
|
49567
|
-
*/
|
|
49568
|
-
createStepText(e, n, i, r, s) {
|
|
49569
|
-
const a = (e === 0 ? 0 : Math.round(r / this.scaleBarSteps_ * e * 100) / 100) + (e === 0 ? "" : " " + s), l = e === 0 ? -3 : n / this.scaleBarSteps_ * -1, u = e === 0 ? 0 : n / this.scaleBarSteps_ * 2;
|
|
49570
|
-
return `<div class="ol-scale-step-text" style="margin-left: ${l}px;text-align: ${e === 0 ? "left" : "center"};min-width: ${u}px;left: ${i ? n + "px" : "unset"};">` + a + "</div>";
|
|
49571
|
-
}
|
|
49572
|
-
/**
|
|
49573
|
-
* Returns the appropriate scale for the given resolution and units.
|
|
49574
|
-
* @return {number} The appropriate scale.
|
|
49575
|
-
*/
|
|
49576
|
-
getScaleForResolution() {
|
|
49577
|
-
const e = md(
|
|
49578
|
-
this.viewState_.projection,
|
|
49579
|
-
this.viewState_.resolution,
|
|
49580
|
-
this.viewState_.center,
|
|
49581
|
-
"m"
|
|
49582
|
-
), n = this.dpi_ || xl, i = 1e3 / 25.4;
|
|
49583
|
-
return e * i * n;
|
|
49584
|
-
}
|
|
49585
|
-
/**
|
|
49586
|
-
* Update the scale line element.
|
|
49587
|
-
* @param {import("../MapEvent.js").default} mapEvent Map event.
|
|
49588
|
-
* @override
|
|
49589
|
-
*/
|
|
49590
|
-
render(e) {
|
|
49591
|
-
const n = e.frameState;
|
|
49592
|
-
n ? this.viewState_ = n.viewState : this.viewState_ = null, this.updateElement_();
|
|
49593
|
-
}
|
|
49594
|
-
}
|
|
49595
49595
|
var ZV = {
|
|
49596
49596
|
name: "zh-cn",
|
|
49597
49597
|
el: {
|
|
@@ -51028,61 +51028,62 @@ ms(Av, {
|
|
|
51028
51028
|
Ve.mount(new nV());
|
|
51029
51029
|
Ve.mount(Av, kv);
|
|
51030
51030
|
export {
|
|
51031
|
-
|
|
51031
|
+
AV as $,
|
|
51032
51032
|
LV as A,
|
|
51033
|
-
|
|
51033
|
+
Rh as B,
|
|
51034
51034
|
$u as C,
|
|
51035
51035
|
$V as D,
|
|
51036
51036
|
RV as E,
|
|
51037
51037
|
Bo as F,
|
|
51038
|
-
|
|
51039
|
-
|
|
51038
|
+
jV as G,
|
|
51039
|
+
NV as H,
|
|
51040
51040
|
Ah as I,
|
|
51041
|
-
|
|
51042
|
-
|
|
51041
|
+
HV as J,
|
|
51042
|
+
zV as K,
|
|
51043
51043
|
hr as L,
|
|
51044
51044
|
_h as M,
|
|
51045
|
-
|
|
51045
|
+
KV as N,
|
|
51046
51046
|
WV as O,
|
|
51047
51047
|
us as P,
|
|
51048
51048
|
Lu as Q,
|
|
51049
|
-
|
|
51049
|
+
it as R,
|
|
51050
51050
|
or as S,
|
|
51051
51051
|
nv as T,
|
|
51052
|
-
|
|
51052
|
+
eo as U,
|
|
51053
51053
|
U8 as V,
|
|
51054
51054
|
UV as W,
|
|
51055
|
-
|
|
51056
|
-
|
|
51057
|
-
|
|
51058
|
-
|
|
51055
|
+
VV as X,
|
|
51056
|
+
XV as Y,
|
|
51057
|
+
GV as Z,
|
|
51058
|
+
es as _,
|
|
51059
51059
|
$e as a,
|
|
51060
|
-
|
|
51061
|
-
|
|
51062
|
-
|
|
51063
|
-
|
|
51064
|
-
|
|
51065
|
-
|
|
51066
|
-
|
|
51067
|
-
|
|
51068
|
-
|
|
51069
|
-
|
|
51070
|
-
|
|
51071
|
-
|
|
51072
|
-
|
|
51073
|
-
|
|
51074
|
-
|
|
51075
|
-
|
|
51076
|
-
|
|
51077
|
-
|
|
51078
|
-
|
|
51079
|
-
|
|
51080
|
-
|
|
51081
|
-
|
|
51082
|
-
|
|
51083
|
-
|
|
51084
|
-
|
|
51085
|
-
|
|
51060
|
+
ol as a0,
|
|
51061
|
+
er as a1,
|
|
51062
|
+
Dr as a2,
|
|
51063
|
+
xb as a3,
|
|
51064
|
+
Xn as a4,
|
|
51065
|
+
hp as a5,
|
|
51066
|
+
uV as a6,
|
|
51067
|
+
IV as a7,
|
|
51068
|
+
gV as a8,
|
|
51069
|
+
PV as a9,
|
|
51070
|
+
CV as aa,
|
|
51071
|
+
xV as ab,
|
|
51072
|
+
SV as ac,
|
|
51073
|
+
qA as ad,
|
|
51074
|
+
Ve as ae,
|
|
51075
|
+
$a as af,
|
|
51076
|
+
fV as ag,
|
|
51077
|
+
TV as ah,
|
|
51078
|
+
mV as ai,
|
|
51079
|
+
ZV as aj,
|
|
51080
|
+
pV as ak,
|
|
51081
|
+
dV as al,
|
|
51082
|
+
AP as am,
|
|
51083
|
+
Ks as an,
|
|
51084
|
+
cV as ao,
|
|
51085
|
+
Yd as ap,
|
|
51086
|
+
lV as aq,
|
|
51086
51087
|
No as b,
|
|
51087
51088
|
bV as c,
|
|
51088
51089
|
hV as d,
|