zhihao-ui 1.3.54 → 1.3.55
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/{BaseItem-DQKOTeth.js → BaseItem-YGnpIugn.js} +1 -1
- package/dist/es/{CascaderLoadMore-CdndYSd1.js → CascaderLoadMore-BwYi7PBx.js} +84 -79
- package/dist/es/{DatePicker-BSdiMSHq.js → DatePicker-BkKUo2v1.js} +1 -1
- package/dist/es/{DetailHeader-BaVN1zZA.js → DetailHeader-lzEy7t5Y.js} +1 -1
- package/dist/es/{DetailSubTitle-BMIe2Qwe.js → DetailSubTitle-DfqGXyKI.js} +1 -1
- package/dist/es/DiyDataTable-Yp1HvbS1.js +367 -0
- package/dist/es/{EditInfoPair-Zed59i0Z.js → EditInfoPair-BXF1tV3S.js} +1 -1
- package/dist/es/{FileWrapper-DwYXt2R_.js → FileWrapper-CqbiXynu.js} +1 -1
- package/dist/es/{Grid-CCcxjfAs.js → Grid-CDS9IrCA.js} +1 -1
- package/dist/es/{InfoPair-DbQZtDZ4.js → InfoPair-jRjF91Ro.js} +1 -1
- package/dist/es/{Map-rM-FhwBq.js → Map-BoN5eeEB.js} +712 -705
- package/dist/es/{MoneyInput-Cildlxii.js → MoneyInput-oY4Jr4Du.js} +1 -1
- package/dist/es/Table-BU_pHf2Y.js +1180 -0
- package/dist/es/index.js +14 -14
- package/dist/index.css +1 -1
- package/dist/types/components/DiyDataTable/DiyDataTable.vue.d.ts +2 -1
- package/dist/types/components/DiyDataTable/index.d.ts +6 -3
- package/dist/types/components/DiyDataTable/type.d.ts +3 -1
- package/dist/umd/index.css +1 -1
- package/dist/umd/index.umd.cjs +31 -31
- package/package.json +1 -1
- package/dist/es/DiyDataTable-Bi4KyAh2.js +0 -366
- package/dist/es/Table-BcTA1mjZ.js +0 -1177
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as nt, openBlock as rt, createElementBlock as lt, createElementVNode as et, ref as ge, computed as He, h as me, createVNode as tt, render as
|
|
2
|
-
import { S as Yt, M as ft, T as Re, X as $e, t as fe, V as Bt, u as Ht, D as st, v as Xt, j as bt, w as it, x as qt, y as Ve, F as
|
|
1
|
+
import { defineComponent as nt, openBlock as rt, createElementBlock as lt, createElementVNode as et, ref as ge, computed as He, h as me, createVNode as tt, render as Zt, reactive as At, onMounted as Wt, onUnmounted as Gt } from "vue";
|
|
2
|
+
import { S as Yt, M as ft, T as Re, X as $e, t as fe, V as Bt, u as Ht, D as st, v as Xt, j as bt, w as it, x as qt, y as Ve, F as ce, z as ee, O as Ee, P as ie, A as Ze, B as kt, L as qe, C as jt, G as ht, H as de, I as xe, J as ye, K as Te, N as Ke, Q as Pe, R as Kt, U as _t, W as Qt, Y as Jt, Z as je, _ as ot, $ as mt, a0 as Ut, a1 as It, a2 as eo } from "./vendor-CxcudVpO.js";
|
|
3
3
|
import { _ as ct } from "./Button-DSjKm2wO.js";
|
|
4
4
|
import { w as to } from "./utils-DRDkj6ga.js";
|
|
5
5
|
const oo = { id: "scale-line-container" }, no = /* @__PURE__ */ nt({
|
|
@@ -49,7 +49,7 @@ const oo = { id: "scale-line-container" }, no = /* @__PURE__ */ nt({
|
|
|
49
49
|
}, " - ")
|
|
50
50
|
]));
|
|
51
51
|
}
|
|
52
|
-
}), io = /* @__PURE__ */ ct(so, [["__scopeId", "data-v-78a81741"]]), Xe = "a6e8f78974f2581f2ca00485b40c948f",
|
|
52
|
+
}), io = /* @__PURE__ */ ct(so, [["__scopeId", "data-v-78a81741"]]), Xe = "a6e8f78974f2581f2ca00485b40c948f", ae = {
|
|
53
53
|
// 地图默认层级
|
|
54
54
|
default: 13,
|
|
55
55
|
// 地图缩放最小层级
|
|
@@ -64,101 +64,101 @@ const oo = { id: "scale-line-container" }, no = /* @__PURE__ */ nt({
|
|
|
64
64
|
shipModelMax: 18,
|
|
65
65
|
//根据原系统canvas图片转换svg长宽比例计算缩放值
|
|
66
66
|
scaleNum: 0.555
|
|
67
|
-
},
|
|
67
|
+
}, le = {
|
|
68
68
|
// 经纬度 源数据 地理坐标 WGS84
|
|
69
69
|
data: "EPSG:4326",
|
|
70
70
|
// 墨卡托投影坐标 渲染坐标
|
|
71
71
|
mercator: "EPSG:3857"
|
|
72
72
|
}, co = [114.84, 30.52], pt = "https://static.zhihaoscm.cn/", _e = 2003750834e-2;
|
|
73
|
-
var Le = ((e) => (e.vectorTile = `https://t0.tianditu.gov.cn/vec_w/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=vec&TILEMATRIXSET=w&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}&tk=${Xe}`, e.vectorTileMark = `https://t0.tianditu.gov.cn/cva_w/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=cva&TILEMATRIXSET=w&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}&tk=${Xe}`, e.satelliteImgTile = `https://t0.tianditu.gov.cn/img_w/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=img&TILEMATRIXSET=w&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}&tk=${Xe}`, e.satelliteImgTileMark = `https://t0.tianditu.gov.cn/cia_w/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=cia&TILEMATRIXSET=w&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}&tk=${Xe}`, e.greenTile = `${pt}/map/tile/{z}/{x}/{y}.png`, e))(Le || {}), ze = /* @__PURE__ */ ((e) => (e[e.M = 1] = "M", e[e.KM = 2] = "KM", e[e.NM = 3] = "NM", e))(ze || {}),
|
|
73
|
+
var Le = ((e) => (e.vectorTile = `https://t0.tianditu.gov.cn/vec_w/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=vec&TILEMATRIXSET=w&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}&tk=${Xe}`, e.vectorTileMark = `https://t0.tianditu.gov.cn/cva_w/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=cva&TILEMATRIXSET=w&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}&tk=${Xe}`, e.satelliteImgTile = `https://t0.tianditu.gov.cn/img_w/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=img&TILEMATRIXSET=w&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}&tk=${Xe}`, e.satelliteImgTileMark = `https://t0.tianditu.gov.cn/cia_w/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=cia&TILEMATRIXSET=w&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}&tk=${Xe}`, e.greenTile = `${pt}/map/tile/{z}/{x}/{y}.png`, e))(Le || {}), ze = /* @__PURE__ */ ((e) => (e[e.M = 1] = "M", e[e.KM = 2] = "KM", e[e.NM = 3] = "NM", e))(ze || {}), re = /* @__PURE__ */ ((e) => (e.PORT = "port", e.SHIP = "ship", e.TRACK = "track", e))(re || {});
|
|
74
74
|
function ao() {
|
|
75
75
|
const e = ge(), r = () => e.value, o = () => r().getView(), l = () => {
|
|
76
|
-
var
|
|
77
|
-
return (
|
|
78
|
-
}, a = (
|
|
79
|
-
var
|
|
80
|
-
(
|
|
81
|
-
}, i = (
|
|
82
|
-
var
|
|
83
|
-
(
|
|
76
|
+
var g;
|
|
77
|
+
return (g = o()) == null ? void 0 : g.getZoom();
|
|
78
|
+
}, a = (g) => {
|
|
79
|
+
var M;
|
|
80
|
+
(M = o()) == null || M.setZoom(g);
|
|
81
|
+
}, i = (g, M) => {
|
|
82
|
+
var x;
|
|
83
|
+
(x = o()) == null || x.setCenter(fe([g, M]));
|
|
84
84
|
}, s = () => {
|
|
85
|
-
var
|
|
86
|
-
const
|
|
87
|
-
return Xt(
|
|
88
|
-
},
|
|
89
|
-
var
|
|
90
|
-
return (
|
|
85
|
+
var M;
|
|
86
|
+
const g = (M = o()) == null ? void 0 : M.getCenter();
|
|
87
|
+
return Xt(g);
|
|
88
|
+
}, w = () => {
|
|
89
|
+
var g;
|
|
90
|
+
return (g = r()) == null ? void 0 : g.getSize();
|
|
91
91
|
}, p = () => {
|
|
92
|
-
const
|
|
93
|
-
return
|
|
94
|
-
},
|
|
95
|
-
|
|
96
|
-
const
|
|
97
|
-
zoom:
|
|
98
|
-
center: fe(
|
|
99
|
-
minZoom:
|
|
100
|
-
maxZoom:
|
|
92
|
+
const g = window.navigator.userAgent, M = /iPad|iPhone|iPod/.test(g), x = /Safari/.test(g) && !/CriOS/.test(g), P = /(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(g);
|
|
93
|
+
return M && (x || P);
|
|
94
|
+
}, b = new ft(), t = (g, M) => {
|
|
95
|
+
n(M);
|
|
96
|
+
const x = {
|
|
97
|
+
zoom: M.zoom,
|
|
98
|
+
center: fe(M.center),
|
|
99
|
+
minZoom: ae.min,
|
|
100
|
+
maxZoom: ae.max,
|
|
101
101
|
constrainResolution: !0,
|
|
102
102
|
enableRotation: !1,
|
|
103
103
|
multiWorld: !0
|
|
104
104
|
};
|
|
105
|
-
let
|
|
106
|
-
target:
|
|
105
|
+
let P = {
|
|
106
|
+
target: g,
|
|
107
107
|
controls: Ht({
|
|
108
108
|
zoom: !1
|
|
109
109
|
}),
|
|
110
110
|
layers: [
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
111
|
+
b.get("vectorTile"),
|
|
112
|
+
b.get("vectorTileMark"),
|
|
113
|
+
b.get("satelliteImgTile"),
|
|
114
|
+
b.get("satelliteImgTileMark")
|
|
115
115
|
],
|
|
116
|
-
view: new Bt(
|
|
116
|
+
view: new Bt(x)
|
|
117
117
|
};
|
|
118
|
-
const u = new ft(
|
|
118
|
+
const u = new ft(P);
|
|
119
119
|
if (p()) {
|
|
120
120
|
console.log("IOS Browser");
|
|
121
|
-
const
|
|
122
|
-
handleEvent: function(
|
|
123
|
-
if (
|
|
124
|
-
console.log("IOS Browser---dblclick"),
|
|
125
|
-
const
|
|
126
|
-
return
|
|
121
|
+
const m = new st({
|
|
122
|
+
handleEvent: function(C) {
|
|
123
|
+
if (C.type === "dblclick") {
|
|
124
|
+
console.log("IOS Browser---dblclick"), C.originalEvent.preventDefault();
|
|
125
|
+
const y = u.getView(), R = y.getZoom();
|
|
126
|
+
return y.setZoom(R + 1), !1;
|
|
127
127
|
}
|
|
128
128
|
return !0;
|
|
129
129
|
}
|
|
130
130
|
});
|
|
131
|
-
u.addInteraction(
|
|
131
|
+
u.addInteraction(m);
|
|
132
132
|
}
|
|
133
133
|
e.value = u;
|
|
134
|
-
},
|
|
135
|
-
|
|
134
|
+
}, n = (g) => {
|
|
135
|
+
b.set("vectorTile", new Re({
|
|
136
136
|
source: new $e({ url: Le.vectorTile }),
|
|
137
|
-
visible:
|
|
137
|
+
visible: g.layerType === "vector",
|
|
138
138
|
zIndex: 0,
|
|
139
139
|
preload: 1,
|
|
140
140
|
className: "vector"
|
|
141
|
-
})),
|
|
141
|
+
})), b.set("vectorTileMark", new Re({
|
|
142
142
|
source: new $e({ url: Le.vectorTileMark }),
|
|
143
|
-
visible:
|
|
143
|
+
visible: g.layerType === "vector",
|
|
144
144
|
zIndex: 1,
|
|
145
145
|
preload: 1,
|
|
146
146
|
className: "vector"
|
|
147
|
-
})),
|
|
147
|
+
})), b.set("satelliteImgTile", new Re({
|
|
148
148
|
source: new $e({ url: Le.satelliteImgTile }),
|
|
149
|
-
visible:
|
|
149
|
+
visible: g.layerType === "satellite",
|
|
150
150
|
zIndex: 0,
|
|
151
151
|
preload: 1,
|
|
152
152
|
className: "satellite"
|
|
153
|
-
})),
|
|
153
|
+
})), b.set("satelliteImgTileMark", new Re({
|
|
154
154
|
source: new $e({ url: Le.satelliteImgTileMark }),
|
|
155
|
-
visible:
|
|
155
|
+
visible: g.layerType === "satellite",
|
|
156
156
|
zIndex: 1,
|
|
157
157
|
preload: 1,
|
|
158
158
|
className: "satellite"
|
|
159
|
-
})),
|
|
159
|
+
})), b.set("greenMark", new Re({
|
|
160
160
|
source: new $e({ url: Le.greenTile }),
|
|
161
|
-
visible:
|
|
161
|
+
visible: g.showGreenLayer,
|
|
162
162
|
zIndex: 2,
|
|
163
163
|
className: "greenTile"
|
|
164
164
|
}));
|
|
@@ -170,9 +170,9 @@ function ao() {
|
|
|
170
170
|
setZoom: a,
|
|
171
171
|
setCenter: i,
|
|
172
172
|
getCenter: s,
|
|
173
|
-
getSize:
|
|
174
|
-
initMap:
|
|
175
|
-
setBaseLayerMap:
|
|
173
|
+
getSize: w,
|
|
174
|
+
initMap: t,
|
|
175
|
+
setBaseLayerMap: n
|
|
176
176
|
};
|
|
177
177
|
}
|
|
178
178
|
const at = function(e, r) {
|
|
@@ -184,7 +184,7 @@ const at = function(e, r) {
|
|
|
184
184
|
o[1] - l,
|
|
185
185
|
o[0] + l,
|
|
186
186
|
o[1] + l
|
|
187
|
-
], i = qt(a,
|
|
187
|
+
], i = qt(a, le.mercator, le.data);
|
|
188
188
|
return {
|
|
189
189
|
leftTopPoint: { lng: i[0], lat: i[3] },
|
|
190
190
|
rightTopPoint: { lng: i[2], lat: i[3] },
|
|
@@ -223,7 +223,7 @@ const vt = (e) => {
|
|
|
223
223
|
const r = new Ve({
|
|
224
224
|
font: "Normal 14px map-iconfont",
|
|
225
225
|
text: Me(e),
|
|
226
|
-
fill: new
|
|
226
|
+
fill: new ce({ color: "#fff" }),
|
|
227
227
|
offsetY: -14
|
|
228
228
|
});
|
|
229
229
|
return new ee({
|
|
@@ -240,42 +240,42 @@ const vt = (e) => {
|
|
|
240
240
|
return l !== 0 && (i = `${String(l).padStart(2, "0")}时${i}`), o !== 0 && (i = `${String(o).padStart(2, "0")}天${i}`), i;
|
|
241
241
|
}, mo = (e, r) => {
|
|
242
242
|
let o = null;
|
|
243
|
-
const l = async (
|
|
244
|
-
if (!e || (console.log("vehicleInfo",
|
|
245
|
-
const
|
|
246
|
-
a(
|
|
247
|
-
const
|
|
248
|
-
|
|
249
|
-
}, a = (
|
|
250
|
-
const
|
|
243
|
+
const l = async (t) => {
|
|
244
|
+
if (!e || (console.log("vehicleInfo", t), !(t != null && t.lon && (t != null && t.lat)))) return;
|
|
245
|
+
const n = Math.abs(Number(t.lon)) > 180 ? at(t.lon, t.lat) : [t.lon, t.lat];
|
|
246
|
+
a(t, fe(n));
|
|
247
|
+
const g = e == null ? void 0 : e.getView(), M = new ie(n);
|
|
248
|
+
g.setCenter(Ze(M.getCoordinates(), le.data, le.mercator));
|
|
249
|
+
}, a = (t, n) => {
|
|
250
|
+
const g = `${pt}map/car-icon.gif`;
|
|
251
251
|
o || (o = new Ee({
|
|
252
252
|
element: document.createElement("div"),
|
|
253
253
|
positioning: "center-center",
|
|
254
254
|
stopEvent: !1
|
|
255
255
|
// 允许交互事件穿透
|
|
256
256
|
}), e.addOverlay(o));
|
|
257
|
-
const
|
|
258
|
-
|
|
259
|
-
const
|
|
260
|
-
|
|
257
|
+
const M = o.getElement();
|
|
258
|
+
M.style.backgroundImage = `url(${g})`, M.style.width = "80px", M.style.height = "80px";
|
|
259
|
+
const x = (t == null ? void 0 : t.drc) || "";
|
|
260
|
+
M.style.transform = `rotate(${x}deg)`, M.style.backgroundSize = "cover", o == null || o.setPosition(n);
|
|
261
261
|
};
|
|
262
262
|
return {
|
|
263
263
|
location: l,
|
|
264
264
|
remove: () => {
|
|
265
|
-
const
|
|
266
|
-
|
|
265
|
+
const t = o == null ? void 0 : o.getElement();
|
|
266
|
+
t && (t.innerHTML = "");
|
|
267
267
|
},
|
|
268
|
-
renderTrack: (
|
|
269
|
-
r.render(
|
|
268
|
+
renderTrack: (t, n, g) => {
|
|
269
|
+
r.render(t, n, g, "truck", 1e3);
|
|
270
270
|
},
|
|
271
|
-
setCenter: (
|
|
272
|
-
r.setCenter(
|
|
271
|
+
setCenter: (t) => {
|
|
272
|
+
r.setCenter(t);
|
|
273
273
|
},
|
|
274
274
|
closeTrack: () => {
|
|
275
275
|
r.close();
|
|
276
276
|
},
|
|
277
|
-
playTrack: (
|
|
278
|
-
r.play(
|
|
277
|
+
playTrack: (t, n) => {
|
|
278
|
+
r.play(t, n);
|
|
279
279
|
}
|
|
280
280
|
};
|
|
281
281
|
};
|
|
@@ -285,62 +285,62 @@ const vo = (e) => {
|
|
|
285
285
|
let l = null;
|
|
286
286
|
const a = "--";
|
|
287
287
|
let i = null;
|
|
288
|
-
const s = document.createElement("div"),
|
|
288
|
+
const s = document.createElement("div"), w = new Ee({
|
|
289
289
|
element: s,
|
|
290
290
|
positioning: "top-left",
|
|
291
291
|
className: "track-label-popup"
|
|
292
292
|
});
|
|
293
|
-
let p, t, n,
|
|
294
|
-
const
|
|
295
|
-
var
|
|
296
|
-
for (R.unshift(c); R.length >
|
|
293
|
+
let p, b, t, n, g, M = !1, x = Date.now(), P, u = 0, m = null, C = 20;
|
|
294
|
+
const y = 8, R = [], j = (c) => {
|
|
295
|
+
var f;
|
|
296
|
+
for (R.unshift(c); R.length > y; ) {
|
|
297
297
|
const h = R.pop(), k = r.get(h);
|
|
298
|
-
k && ((
|
|
298
|
+
k && ((f = k.getSource()) == null || f.clear(), e == null || e.removeLayer(k), r.delete(h), delete o[h]);
|
|
299
299
|
}
|
|
300
300
|
};
|
|
301
|
-
let
|
|
301
|
+
let A = "";
|
|
302
302
|
const K = ["#ff0000", "#00ff00", "#0079ff", "#ffa500", "#800080", "#008080", "#ffc0cb", "#800000", "#000080", "#808000"], I = kt(async () => {
|
|
303
303
|
if (l && o[l] && r.get(l).getVisible()) {
|
|
304
304
|
console.log("reRenderTrackLine------------"), await Qe(l);
|
|
305
|
-
const c =
|
|
305
|
+
const c = L(l, o[l]);
|
|
306
306
|
J(l, c);
|
|
307
307
|
}
|
|
308
|
-
}, 100), T = () => l && o[l] && r.get(l).getVisible(),
|
|
308
|
+
}, 100), T = () => l && o[l] && r.get(l).getVisible(), L = (c, f) => {
|
|
309
309
|
let h = [];
|
|
310
|
-
const k = Math.max(1, Math.floor(
|
|
311
|
-
return h =
|
|
310
|
+
const k = Math.max(1, Math.floor(f.length / C));
|
|
311
|
+
return h = f.filter(($, S) => S % k === 0).map(($, S) => {
|
|
312
312
|
if (Number($.lon) > 180 || Number($.lat) > 180) {
|
|
313
313
|
const [O, H] = at($.lon, $.lat);
|
|
314
314
|
$.lon = O, $.lat = H;
|
|
315
315
|
}
|
|
316
|
-
return $.center = [$.lon, $.lat], $.centerPoint = fo($.center), $.time = bt($.createdAt).format("YYYY-MM-DD HH:mm:ss"), $.id = c, $.index =
|
|
316
|
+
return $.center = [$.lon, $.lat], $.centerPoint = fo($.center), $.time = bt($.createdAt).format("YYYY-MM-DD HH:mm:ss"), $.id = c, $.index = S, $;
|
|
317
317
|
}), h.filter(
|
|
318
|
-
($,
|
|
318
|
+
($, S, O) => S === O.findIndex(
|
|
319
319
|
(H) => Math.abs(H.lon - $.lon) < 1e-6 && Math.abs(H.lat - $.lat) < 1e-6
|
|
320
320
|
)
|
|
321
321
|
);
|
|
322
|
-
}, V = async (c,
|
|
323
|
-
if (!e || JSON.stringify(o[c]) === JSON.stringify(
|
|
322
|
+
}, V = async (c, f, h, k = "ship", v = 200) => {
|
|
323
|
+
if (!e || JSON.stringify(o[c]) === JSON.stringify(f) && l === c || (f = f == null ? void 0 : f.reverse(), w && k === "ship" && (e != null && e.getOverlays().getArray().includes(w) || e.addOverlay(w)), (f == null ? void 0 : f.length) < 2))
|
|
324
324
|
return;
|
|
325
|
-
j(c), l = c, o[c] =
|
|
325
|
+
j(c), l = c, o[c] = f, C = v;
|
|
326
326
|
const z = Object.keys(o).findIndex(($) => $ === c) || 0;
|
|
327
|
-
|
|
327
|
+
A = h || K[z > 10 ? 10 : z], await W(), await dt(l);
|
|
328
328
|
}, X = (c) => {
|
|
329
|
-
const
|
|
329
|
+
const f = new ye();
|
|
330
330
|
return new xe({
|
|
331
|
-
source:
|
|
331
|
+
source: f,
|
|
332
332
|
visible: !1,
|
|
333
333
|
// 默认隐藏
|
|
334
334
|
className: `track-layer-${c}`,
|
|
335
335
|
renderBuffer: 1024,
|
|
336
|
-
properties: { layerType:
|
|
336
|
+
properties: { layerType: re.TRACK },
|
|
337
337
|
zIndex: 10
|
|
338
338
|
});
|
|
339
|
-
},
|
|
340
|
-
r.forEach((
|
|
339
|
+
}, Z = (c) => {
|
|
340
|
+
r.forEach((f, h) => {
|
|
341
341
|
var v;
|
|
342
342
|
const k = h === c;
|
|
343
|
-
|
|
343
|
+
f.getVisible() !== k && (f.setVisible(k), e.getLayers().getArray().includes(f) || e.addLayer(f), k || (v = f.getSource()) == null || v.clear());
|
|
344
344
|
}), l = c;
|
|
345
345
|
}, W = async () => {
|
|
346
346
|
const c = l;
|
|
@@ -348,43 +348,43 @@ const vo = (e) => {
|
|
|
348
348
|
const z = X(c);
|
|
349
349
|
r.set(c, z);
|
|
350
350
|
}
|
|
351
|
-
await
|
|
352
|
-
const
|
|
351
|
+
await Z(c);
|
|
352
|
+
const f = A || "", h = o[c] || [];
|
|
353
353
|
if (!(h && h.length > 1)) return [];
|
|
354
354
|
let k = [];
|
|
355
|
-
k =
|
|
355
|
+
k = L(c, h);
|
|
356
356
|
const v = k.map((z) => z.centerPoint);
|
|
357
|
-
k.length >= 2 && await G(c, v,
|
|
358
|
-
}, G = (c,
|
|
359
|
-
const k = new qe(
|
|
357
|
+
k.length >= 2 && await G(c, v, f);
|
|
358
|
+
}, G = (c, f, h) => {
|
|
359
|
+
const k = new qe(f), v = r.get(c).getSource(), z = v.getFeatureById(c);
|
|
360
360
|
if (z)
|
|
361
|
-
z.setGeometry(k), z.setId(c), z.setStyle(_(h)),
|
|
361
|
+
z.setGeometry(k), z.setId(c), z.setStyle(_(h)), m = z;
|
|
362
362
|
else {
|
|
363
363
|
const $ = new de({ geometry: k });
|
|
364
|
-
$.setId(c), $.set("type", "line"), $.setStyle(_(h)), v.addFeature($),
|
|
364
|
+
$.setId(c), $.set("type", "line"), $.setStyle(_(h)), v.addFeature($), m = $;
|
|
365
365
|
}
|
|
366
|
-
return
|
|
366
|
+
return m;
|
|
367
367
|
}, _ = (c) => new ee({
|
|
368
368
|
stroke: new Te({
|
|
369
369
|
color: c,
|
|
370
370
|
width: 2
|
|
371
371
|
})
|
|
372
|
-
}), d = (c,
|
|
372
|
+
}), d = (c, f, h) => {
|
|
373
373
|
try {
|
|
374
374
|
const k = c == null ? void 0 : c.get("data");
|
|
375
|
-
if (c && k &&
|
|
375
|
+
if (c && k && f === "hover") {
|
|
376
376
|
e.getTargetElement().style.cursor = k ? "pointer" : "";
|
|
377
377
|
const v = E(k), z = h == null ? void 0 : h.coordinate;
|
|
378
|
-
z && (s.querySelector(".popup-content"), s.innerHTML = v,
|
|
378
|
+
z && (s.querySelector(".popup-content"), s.innerHTML = v, w == null || w.setPosition(z));
|
|
379
379
|
} else
|
|
380
|
-
|
|
380
|
+
w && w.setPosition(void 0);
|
|
381
381
|
} catch (k) {
|
|
382
382
|
console.error("handleTrackMapEvent", k);
|
|
383
383
|
}
|
|
384
384
|
}, E = (c) => {
|
|
385
385
|
if (!(c != null && c.time)) return;
|
|
386
|
-
let
|
|
387
|
-
return c != null && c.stayTime && (
|
|
386
|
+
let f = "";
|
|
387
|
+
return c != null && c.stayTime && (f = `
|
|
388
388
|
<div class="item w-100">
|
|
389
389
|
<div class="item-label">停泊时间约</div>
|
|
390
390
|
<div class="item-item">${ho(Number(c.stayTime))}</div>
|
|
@@ -419,14 +419,14 @@ const vo = (e) => {
|
|
|
419
419
|
<div class="item-label">时间</div>
|
|
420
420
|
<div class="item-item">${c.time}</div>
|
|
421
421
|
</div>
|
|
422
|
-
${
|
|
422
|
+
${f ?? f}
|
|
423
423
|
</div>`;
|
|
424
|
-
},
|
|
425
|
-
const h = c.map((
|
|
426
|
-
const O = e.getPixelFromCoordinate(fe(
|
|
424
|
+
}, D = (c) => {
|
|
425
|
+
const h = c.map((S) => {
|
|
426
|
+
const O = e.getPixelFromCoordinate(fe(S.center));
|
|
427
427
|
return {
|
|
428
|
-
...
|
|
429
|
-
original:
|
|
428
|
+
...S,
|
|
429
|
+
original: S,
|
|
430
430
|
pixel: O,
|
|
431
431
|
distance: 0
|
|
432
432
|
// 先初始化,后续计算
|
|
@@ -434,18 +434,18 @@ const vo = (e) => {
|
|
|
434
434
|
});
|
|
435
435
|
let k = 0;
|
|
436
436
|
h[0].distance = 0;
|
|
437
|
-
for (let
|
|
438
|
-
const O = h[
|
|
439
|
-
k += Math.sqrt(ne * ne +
|
|
437
|
+
for (let S = 1; S < h.length; S++) {
|
|
438
|
+
const O = h[S - 1].pixel, H = h[S].pixel, ne = H[0] - O[0], F = H[1] - O[1];
|
|
439
|
+
k += Math.sqrt(ne * ne + F * F), h[S].distance = k;
|
|
440
440
|
}
|
|
441
441
|
const v = h.filter(
|
|
442
|
-
(
|
|
442
|
+
(S, O) => O === 0 || O === h.length - 1
|
|
443
443
|
), z = [];
|
|
444
|
-
for (let
|
|
445
|
-
const O = v[
|
|
446
|
-
if (z.push(O),
|
|
447
|
-
const H = v[
|
|
448
|
-
for (let q = 1; q <=
|
|
444
|
+
for (let S = 0; S < v.length; S++) {
|
|
445
|
+
const O = v[S];
|
|
446
|
+
if (z.push(O), S < v.length - 1) {
|
|
447
|
+
const H = v[S + 1], ne = H.distance - O.distance, F = Math.floor(ne / 100);
|
|
448
|
+
for (let q = 1; q <= F; q++) {
|
|
449
449
|
const Q = O.distance + q * 100;
|
|
450
450
|
if (Q >= H.distance) break;
|
|
451
451
|
const oe = Y(
|
|
@@ -457,29 +457,29 @@ const vo = (e) => {
|
|
|
457
457
|
}
|
|
458
458
|
}
|
|
459
459
|
return Array.from(
|
|
460
|
-
new Map(z.map((
|
|
461
|
-
).map((
|
|
462
|
-
...
|
|
460
|
+
new Map(z.map((S) => [S.distance.toFixed(2), S])).values()
|
|
461
|
+
).map((S) => ({
|
|
462
|
+
...S.original,
|
|
463
463
|
// 优先保留原始数据
|
|
464
|
-
...
|
|
464
|
+
...S,
|
|
465
465
|
// 覆盖坐标等计算属性
|
|
466
|
-
coord:
|
|
466
|
+
coord: S.coord,
|
|
467
467
|
// 确保使用插值后的坐标
|
|
468
|
-
pixel:
|
|
469
|
-
distance:
|
|
468
|
+
pixel: S.pixel,
|
|
469
|
+
distance: S.distance
|
|
470
470
|
}));
|
|
471
471
|
};
|
|
472
|
-
function Y(c,
|
|
472
|
+
function Y(c, f) {
|
|
473
473
|
for (let h = 1; h < c.length; h++) {
|
|
474
474
|
const k = c[h - 1], v = c[h];
|
|
475
|
-
if (
|
|
476
|
-
const z = (
|
|
475
|
+
if (f >= k.distance && f <= v.distance) {
|
|
476
|
+
const z = (f - k.distance) / (v.distance - k.distance), $ = k.pixel[0] + z * (v.pixel[0] - k.pixel[0]), S = k.pixel[1] + z * (v.pixel[1] - k.pixel[1]), O = e == null ? void 0 : e.getCoordinateFromPixel([$, S]);
|
|
477
477
|
return {
|
|
478
478
|
...k,
|
|
479
479
|
// 继承前一个点的属性(可调整)
|
|
480
480
|
coord: O,
|
|
481
|
-
pixel: [$,
|
|
482
|
-
distance:
|
|
481
|
+
pixel: [$, S],
|
|
482
|
+
distance: f,
|
|
483
483
|
original: void 0
|
|
484
484
|
// 明确标记为插值生成点
|
|
485
485
|
};
|
|
@@ -487,53 +487,53 @@ const vo = (e) => {
|
|
|
487
487
|
}
|
|
488
488
|
return null;
|
|
489
489
|
}
|
|
490
|
-
const J = async (c,
|
|
491
|
-
const h =
|
|
492
|
-
console.log("simplifiedPoints", h.length, "list",
|
|
493
|
-
const k = h.map((
|
|
490
|
+
const J = async (c, f) => {
|
|
491
|
+
const h = D(f);
|
|
492
|
+
console.log("simplifiedPoints", h.length, "list", f.length);
|
|
493
|
+
const k = h.map((S) => U(S)), v = h.map((S) => ve(S, A)), z = Pt(c, h, f, A);
|
|
494
494
|
r.get(c).getSource().addFeatures([...k, ...v, ...z]);
|
|
495
495
|
}, U = (c) => {
|
|
496
|
-
const
|
|
497
|
-
geometry: new
|
|
496
|
+
const f = new de({
|
|
497
|
+
geometry: new ie(c.centerPoint),
|
|
498
498
|
data: c
|
|
499
499
|
});
|
|
500
|
-
|
|
500
|
+
f.set("type", "track_point"), f.set("trackId", c.id), f.set("data", c);
|
|
501
501
|
let h = [
|
|
502
|
-
...
|
|
502
|
+
...Ae(c, A)
|
|
503
503
|
];
|
|
504
|
-
return (c.index === 0 || c.index === o[c.id].length - 1) && (h = [...Ft(c)],
|
|
504
|
+
return (c.index === 0 || c.index === o[c.id].length - 1) && (h = [...Ft(c)], f.set("type", "track_begin")), c.state !== void 0 && c.state !== null && (h = [...We(c)], f.set("type", "track_icon")), f.setStyle(h), f;
|
|
505
505
|
}, te = window.devicePixelRatio || 1, B = /* @__PURE__ */ new Map();
|
|
506
|
-
let
|
|
507
|
-
function he(c,
|
|
506
|
+
let N = null, se = null;
|
|
507
|
+
function he(c, f) {
|
|
508
508
|
const h = `${c}`;
|
|
509
509
|
if (B.has(h))
|
|
510
510
|
return B.get(h);
|
|
511
|
-
if (!
|
|
512
|
-
|
|
511
|
+
if (!N) {
|
|
512
|
+
N = document.createElement("canvas");
|
|
513
513
|
try {
|
|
514
|
-
|
|
514
|
+
se = N.getContext("2d", {
|
|
515
515
|
willReadFrequently: !0
|
|
516
516
|
});
|
|
517
517
|
} catch (gt) {
|
|
518
|
-
console.log("e", gt),
|
|
518
|
+
console.log("e", gt), se = N.getContext("2d");
|
|
519
519
|
}
|
|
520
520
|
}
|
|
521
|
-
const k =
|
|
521
|
+
const k = N, v = se;
|
|
522
522
|
if (!v) return "";
|
|
523
523
|
k.width = 0, k.height = 0;
|
|
524
|
-
const z = 2, $ = 8,
|
|
524
|
+
const z = 2, $ = 8, S = 16, O = window.devicePixelRatio || 1, H = "500 12px Arial";
|
|
525
525
|
v.font = H;
|
|
526
|
-
const
|
|
526
|
+
const F = v.measureText(c).width, q = $ + F + $, Q = z + 14 + z;
|
|
527
527
|
let oe = 0, we = 0, ke = 0, pe = 0, Oe = 0, Fe = 0, Ce = 0, Se = 0;
|
|
528
|
-
oe =
|
|
528
|
+
oe = S + q, we = S + Q, ke = q, pe = Q, Oe = q + S, Fe = 0, Ce = 0, Se = S, k.width = Math.round(oe * O), k.height = Math.round(we * O), v.scale(O, O), v.clearRect(0, 0, oe, we), v.beginPath(), v.moveTo(ke, pe), v.lineTo(Oe, Fe), v.strokeStyle = f || "#FFF", v.lineWidth = 1, v.stroke(), v.fillStyle = "#FFF", v.fillRect(Ce, Se, q, Q), v.strokeStyle = f || "#FFF", v.lineWidth = 1, v.strokeRect(Ce, Se, q, Q), v.font = H, v.textBaseline = "middle";
|
|
529
529
|
const Ye = Se + z / 2 + Q / 2;
|
|
530
530
|
v.strokeStyle = "#ffffff", v.lineWidth = 1, v.strokeText(c, Ce + $, Ye), v.fillStyle = "#000000", v.fillText(c, Ce + $, Ye);
|
|
531
531
|
const Be = k.toDataURL("image/png");
|
|
532
532
|
return B.set(h, Be), Be;
|
|
533
533
|
}
|
|
534
|
-
const ve = (c,
|
|
535
|
-
const h = he(c.time,
|
|
536
|
-
geometry: new
|
|
534
|
+
const ve = (c, f) => {
|
|
535
|
+
const h = he(c.time, f), k = new de({
|
|
536
|
+
geometry: new ie(c.centerPoint),
|
|
537
537
|
data: c
|
|
538
538
|
});
|
|
539
539
|
k.set("type", "track_point_label");
|
|
@@ -550,11 +550,11 @@ const vo = (e) => {
|
|
|
550
550
|
});
|
|
551
551
|
return k.setStyle(v), k;
|
|
552
552
|
}, Qe = (c) => {
|
|
553
|
-
const
|
|
554
|
-
|
|
555
|
-
h.get("type") !== "line" &&
|
|
553
|
+
const f = r.get(c).getSource();
|
|
554
|
+
f.forEachFeature((h) => {
|
|
555
|
+
h.get("type") !== "line" && f.removeFeature(h);
|
|
556
556
|
});
|
|
557
|
-
},
|
|
557
|
+
}, Ae = (c, f) => [
|
|
558
558
|
new ee({
|
|
559
559
|
// 扩大交互热区
|
|
560
560
|
image: new Ke({
|
|
@@ -565,36 +565,36 @@ const vo = (e) => {
|
|
|
565
565
|
// 轨迹点样式
|
|
566
566
|
new ee({
|
|
567
567
|
image: new Ke({
|
|
568
|
-
fill: new
|
|
568
|
+
fill: new ce({ color: f }),
|
|
569
569
|
stroke: new Te({ color: "#fff", width: 2 }),
|
|
570
570
|
radius: 3
|
|
571
571
|
})
|
|
572
572
|
})
|
|
573
573
|
// textStyle,
|
|
574
574
|
], We = (c) => {
|
|
575
|
-
const
|
|
575
|
+
const f = "#E31818", h = "#1890FF", k = "", v = new ee({
|
|
576
576
|
text: new Ve({
|
|
577
577
|
font: "Normal 22px map-iconfont",
|
|
578
578
|
text: Me(k),
|
|
579
579
|
offsetY: -10,
|
|
580
|
-
fill: new
|
|
581
|
-
color: Number(c.state) === 0 ?
|
|
580
|
+
fill: new ce({
|
|
581
|
+
color: Number(c.state) === 0 ? f : Number(c.state) === 1 ? h : ""
|
|
582
582
|
})
|
|
583
583
|
}),
|
|
584
584
|
zIndex: 99
|
|
585
585
|
}), $ = vt(""), O = vt(""), H = [];
|
|
586
586
|
return Number(c.state) === 0 ? H.push($) : Number(c.state) === 1 && H.push(O), H.push(v), H;
|
|
587
|
-
}, Pt = (c,
|
|
588
|
-
const v =
|
|
587
|
+
}, Pt = (c, f, h, k) => {
|
|
588
|
+
const v = f || [], z = f.length;
|
|
589
589
|
z || (v.push(h[0]), v.push(h[h.length - 1]));
|
|
590
|
-
const $ = new Set(
|
|
590
|
+
const $ = new Set(f.map((O) => `${O.centerPoint[0]},${O.centerPoint[1]}`)), S = [];
|
|
591
591
|
for (let O = 0; O < z - 1; O++) {
|
|
592
592
|
let H;
|
|
593
|
-
const ne =
|
|
594
|
-
if (
|
|
595
|
-
H = h[
|
|
593
|
+
const ne = f[O], F = (f[O + 1].index + ne.index) / 2;
|
|
594
|
+
if (F % 2 === 0)
|
|
595
|
+
H = h[F].centerPoint;
|
|
596
596
|
else {
|
|
597
|
-
const q = h[Math.floor(
|
|
597
|
+
const q = h[Math.floor(F)], Q = h[Math.ceil(F)];
|
|
598
598
|
if (q && Q) {
|
|
599
599
|
const [oe, we] = q.centerPoint, [ke, pe] = Q.centerPoint;
|
|
600
600
|
H = [(oe + ke) / 2, (we + pe) / 2];
|
|
@@ -604,28 +604,28 @@ const vo = (e) => {
|
|
|
604
604
|
const q = `${H[0]},${H[1]}`;
|
|
605
605
|
if (!$.has(q)) {
|
|
606
606
|
const Q = new de({
|
|
607
|
-
geometry: new
|
|
607
|
+
geometry: new ie(H)
|
|
608
608
|
});
|
|
609
609
|
Q.set("type", "track_arrow"), Q.setStyle(
|
|
610
610
|
new ee({
|
|
611
611
|
text: new Ve({
|
|
612
612
|
font: "700 12px map-iconfont",
|
|
613
613
|
text: Me(""),
|
|
614
|
-
fill: new
|
|
614
|
+
fill: new ce({ color: k }),
|
|
615
615
|
rotation: ut(
|
|
616
|
-
|
|
617
|
-
|
|
616
|
+
f[O].center,
|
|
617
|
+
f[O + 1].center
|
|
618
618
|
) * (Math.PI / 180)
|
|
619
619
|
})
|
|
620
620
|
})
|
|
621
|
-
),
|
|
621
|
+
), S.push(Q), $.add(q);
|
|
622
622
|
}
|
|
623
623
|
}
|
|
624
624
|
}
|
|
625
|
-
return
|
|
625
|
+
return S;
|
|
626
626
|
}, dt = (c) => {
|
|
627
627
|
var z, $;
|
|
628
|
-
const
|
|
628
|
+
const f = e.getView(), h = (z = r == null ? void 0 : r.get(c)) == null ? void 0 : z.getSource(), k = m || (c ? h == null ? void 0 : h.getFeatureById(c) : null);
|
|
629
629
|
if (!k) return;
|
|
630
630
|
const v = ($ = k == null ? void 0 : k.getGeometry()) == null ? void 0 : $.getExtent();
|
|
631
631
|
if (!v || v[0] === v[2] || v[1] === v[3]) {
|
|
@@ -633,151 +633,151 @@ const vo = (e) => {
|
|
|
633
633
|
return;
|
|
634
634
|
}
|
|
635
635
|
try {
|
|
636
|
-
const
|
|
637
|
-
if (
|
|
638
|
-
const
|
|
639
|
-
|
|
636
|
+
const S = v[2] - v[0], O = v[3] - v[1], H = 1e-4;
|
|
637
|
+
if (S < H || O < H) {
|
|
638
|
+
const F = [(v[0] + v[2]) / 2, (v[1] + v[3]) / 2];
|
|
639
|
+
f.setCenter(F);
|
|
640
640
|
return;
|
|
641
641
|
}
|
|
642
|
-
const ne = jt(v, Math.max(
|
|
643
|
-
|
|
644
|
-
maxZoom:
|
|
642
|
+
const ne = jt(v, Math.max(S, O) * 0.1);
|
|
643
|
+
f.fit(ne, {
|
|
644
|
+
maxZoom: ae.max,
|
|
645
645
|
padding: [30, 30, 30, 30]
|
|
646
646
|
// 添加边距
|
|
647
647
|
});
|
|
648
|
-
} catch (
|
|
649
|
-
console.error("setTrackViewCenter error:",
|
|
648
|
+
} catch (S) {
|
|
649
|
+
console.error("setTrackViewCenter error:", S);
|
|
650
650
|
}
|
|
651
651
|
}, Ft = (c) => {
|
|
652
|
-
const
|
|
652
|
+
const f = "", v = c.index === 0 ? "#fcdc3f" : "#ff0000";
|
|
653
653
|
return [new ee({
|
|
654
654
|
text: new Ve({
|
|
655
655
|
font: "Normal 14px map-iconfont",
|
|
656
|
-
text: Me(
|
|
657
|
-
fill: new
|
|
656
|
+
text: Me(f),
|
|
657
|
+
fill: new ce({ color: v })
|
|
658
658
|
}),
|
|
659
659
|
zIndex: 101
|
|
660
660
|
})];
|
|
661
661
|
}, St = () => {
|
|
662
|
-
console.log("清除所有的轨迹-----"), Ge(), r.forEach((
|
|
662
|
+
console.log("清除所有的轨迹-----"), Ge(), r.forEach((f) => {
|
|
663
663
|
var h;
|
|
664
|
-
(h =
|
|
665
|
-
}), Object.keys(o).forEach((
|
|
666
|
-
r.delete(
|
|
664
|
+
(h = f.getSource()) == null || h.clear(), e == null || e.removeLayer(f);
|
|
665
|
+
}), Object.keys(o).forEach((f) => {
|
|
666
|
+
r.delete(f), delete o[f];
|
|
667
667
|
});
|
|
668
668
|
}, Nt = (c) => {
|
|
669
|
-
const
|
|
670
|
-
|
|
669
|
+
const f = r.get(c || l);
|
|
670
|
+
f == null || f.setVisible(!1);
|
|
671
671
|
const h = e.getOverlays().getArray();
|
|
672
672
|
for (let k = 0; k < h.length; ) {
|
|
673
673
|
const v = h[k];
|
|
674
674
|
v.get("class") === "track-label-overlay" ? (v.setPosition(void 0), v.dispose()) : k++;
|
|
675
675
|
}
|
|
676
676
|
Ge();
|
|
677
|
-
}, Rt = (c,
|
|
677
|
+
}, Rt = (c, f = ze.NM) => {
|
|
678
678
|
const h = {
|
|
679
679
|
id: c,
|
|
680
680
|
length: "--"
|
|
681
681
|
}, v = (o[c] || []).map(
|
|
682
|
-
($) =>
|
|
682
|
+
($) => Ze([$.lon, $.lat], le.data, le.mercator)
|
|
683
683
|
), z = new qe(v);
|
|
684
|
-
return h.length = go(z,
|
|
685
|
-
}, $t = (c,
|
|
686
|
-
Vt(String(c),
|
|
687
|
-
}, Vt = (c,
|
|
684
|
+
return h.length = go(z, f) || "--", h;
|
|
685
|
+
}, $t = (c, f) => {
|
|
686
|
+
Vt(String(c), f);
|
|
687
|
+
}, Vt = (c, f) => {
|
|
688
688
|
const h = o[String(c)], k = h == null ? void 0 : h.map((v) => [v.lon, v.lat]);
|
|
689
|
-
k &&
|
|
689
|
+
k && Dt(k, f);
|
|
690
690
|
}, Je = new ee({
|
|
691
691
|
text: new Ve({
|
|
692
692
|
font: "700 20px map-iconfont",
|
|
693
693
|
text: Me(""),
|
|
694
|
-
fill: new
|
|
694
|
+
fill: new ce({ color: "#ff0000" }),
|
|
695
695
|
rotation: 0
|
|
696
696
|
// 初始旋转角度
|
|
697
697
|
})
|
|
698
|
-
}), zt = (c,
|
|
699
|
-
var
|
|
700
|
-
const h = Number(50 *
|
|
701
|
-
if (u = (u + h * v / 1e6) % 2,
|
|
698
|
+
}), zt = (c, f) => {
|
|
699
|
+
var F, q;
|
|
700
|
+
const h = Number(50 * f), k = ((F = c.frameState) == null ? void 0 : F.time) ?? Date.now(), v = k - x;
|
|
701
|
+
if (u = (u + h * v / 1e6) % 2, x = k, u >= 1) {
|
|
702
702
|
Ge();
|
|
703
703
|
return;
|
|
704
704
|
}
|
|
705
|
-
const z =
|
|
705
|
+
const z = b.getCoordinateAt(
|
|
706
706
|
u > 1 ? 2 - u : u
|
|
707
|
-
), $ =
|
|
707
|
+
), $ = b.getCoordinateAt(
|
|
708
708
|
u > 1 ? u - 0.01 : u
|
|
709
|
-
),
|
|
709
|
+
), S = b.getCoordinateAt(
|
|
710
710
|
u > 1 ? 2 - u : u + 0.01
|
|
711
711
|
), H = ut(
|
|
712
712
|
yt($, "array"),
|
|
713
|
-
yt(
|
|
713
|
+
yt(S, "array")
|
|
714
714
|
) * Math.PI / 180;
|
|
715
|
-
(q = Je.getText()) == null || q.setRotation(H),
|
|
715
|
+
(q = Je.getText()) == null || q.setRotation(H), n.setCoordinates(z);
|
|
716
716
|
const ne = Kt(c);
|
|
717
|
-
ne.setStyle(Je), ne.drawGeometry(
|
|
717
|
+
ne.setStyle(Je), ne.drawGeometry(n), e == null || e.render();
|
|
718
718
|
}, Ot = () => {
|
|
719
719
|
var c;
|
|
720
|
-
|
|
720
|
+
M = !0, x = Date.now(), u = 0, n = ((c = t.getGeometry()) == null ? void 0 : c.clone()) || new ie([0, 0]), i && (P == null || P.on("postrender", i)), g == null || g.setGeometry(void 0);
|
|
721
721
|
}, Ge = () => {
|
|
722
|
-
|
|
723
|
-
},
|
|
724
|
-
|
|
722
|
+
M && (M = !1, g == null || g.setGeometry(void 0), i && P && P.un("postrender", i), P && (e == null || e.removeLayer(P)), P = null, g = null);
|
|
723
|
+
}, Dt = (c, f) => {
|
|
724
|
+
M && Ge(), p = new ht({
|
|
725
725
|
factor: 1e6
|
|
726
|
-
}).writeGeometry(new qe(c)),
|
|
726
|
+
}).writeGeometry(new qe(c)), b = new ht({
|
|
727
727
|
factor: 1e6
|
|
728
728
|
}).readGeometry(p, {
|
|
729
|
-
dataProjection:
|
|
730
|
-
featureProjection:
|
|
731
|
-
}),
|
|
729
|
+
dataProjection: le.data,
|
|
730
|
+
featureProjection: le.mercator
|
|
731
|
+
}), t = new de({
|
|
732
732
|
type: "icon",
|
|
733
|
-
geometry: new
|
|
733
|
+
geometry: new ie(b.getFirstCoordinate())
|
|
734
734
|
});
|
|
735
|
-
const h =
|
|
736
|
-
|
|
735
|
+
const h = t.getGeometry();
|
|
736
|
+
n = h ? h.clone() : new ie([0, 0]), g = new de({
|
|
737
737
|
type: "geoMarker",
|
|
738
738
|
style: Je,
|
|
739
|
-
geometry:
|
|
740
|
-
}),
|
|
739
|
+
geometry: n
|
|
740
|
+
}), P = new xe({
|
|
741
741
|
source: new ye({
|
|
742
|
-
features: [
|
|
742
|
+
features: [g]
|
|
743
743
|
})
|
|
744
|
-
}), e == null || e.addLayer(
|
|
745
|
-
}, ut = (c,
|
|
746
|
-
function k(
|
|
747
|
-
return 180 * (
|
|
744
|
+
}), e == null || e.addLayer(P), i = (k) => zt(k, f), Ot();
|
|
745
|
+
}, ut = (c, f, h) => {
|
|
746
|
+
function k(F) {
|
|
747
|
+
return 180 * (F % (2 * Math.PI)) / Math.PI;
|
|
748
748
|
}
|
|
749
|
-
function v(
|
|
750
|
-
return
|
|
749
|
+
function v(F) {
|
|
750
|
+
return F % 360 * Math.PI / 180;
|
|
751
751
|
}
|
|
752
|
-
function z(
|
|
752
|
+
function z(F) {
|
|
753
753
|
var q;
|
|
754
|
-
if (!
|
|
755
|
-
if (!Array.isArray(
|
|
756
|
-
if ((
|
|
757
|
-
return
|
|
758
|
-
if (
|
|
754
|
+
if (!F) throw new Error("Coordinate is required");
|
|
755
|
+
if (!Array.isArray(F)) {
|
|
756
|
+
if ((F == null ? void 0 : F.type) === "Feature" && (F == null ? void 0 : F.geometry) !== null && ((q = F == null ? void 0 : F.geometry) == null ? void 0 : q.type) === "Point")
|
|
757
|
+
return F == null ? void 0 : F.geometry.coordinates;
|
|
758
|
+
if (F.type === "Point") return (F == null ? void 0 : F.coordinates) || [];
|
|
759
759
|
}
|
|
760
|
-
if (Array.isArray(
|
|
761
|
-
return
|
|
760
|
+
if (Array.isArray(F) && F.length >= 2 && !Array.isArray(F[0]) && !Array.isArray(F[1]))
|
|
761
|
+
return F;
|
|
762
762
|
throw new Error(
|
|
763
763
|
"Coordinate must be GeoJSON Point or an Array of numbers"
|
|
764
764
|
);
|
|
765
765
|
}
|
|
766
|
-
function $(
|
|
766
|
+
function $(F, q, Q = {}) {
|
|
767
767
|
if (Q.final)
|
|
768
768
|
return function(Ye, Be) {
|
|
769
769
|
return ($(Be, Ye) + 180) % 360;
|
|
770
|
-
}(
|
|
771
|
-
const oe = z(
|
|
770
|
+
}(F, q);
|
|
771
|
+
const oe = z(F), we = z(q), ke = v(oe[0]), pe = v(we[0]), Oe = v(oe[1]), Fe = v(we[1]), Ce = Math.sin(pe - ke) * Math.cos(Fe), Se = Math.cos(Oe) * Math.sin(Fe) - Math.sin(Oe) * Math.cos(Fe) * Math.cos(pe - ke);
|
|
772
772
|
return k(Math.atan2(Ce, Se));
|
|
773
773
|
}
|
|
774
|
-
function F
|
|
775
|
-
return !isNaN(
|
|
774
|
+
function S(F) {
|
|
775
|
+
return !isNaN(F) && F !== null && !Array.isArray(F);
|
|
776
776
|
}
|
|
777
|
-
function O(
|
|
778
|
-
return
|
|
777
|
+
function O(F, q = {}, Q = {}) {
|
|
778
|
+
return F || console.log("Coordinates are required"), Array.isArray(F) || console.log("Coordinates must be an Array"), F.length < 2 && console.log("Coordinates must be at least 2 numbers long"), (!S(F[0]) || !S(F[1])) && console.log("Coordinates must contain numbers"), H({ type: "Point", coordinates: F }, q, Q);
|
|
779
779
|
}
|
|
780
|
-
function H(
|
|
780
|
+
function H(F, q = {}, Q = {}) {
|
|
781
781
|
const oe = {
|
|
782
782
|
type: "Feature",
|
|
783
783
|
id: "",
|
|
@@ -785,9 +785,9 @@ const vo = (e) => {
|
|
|
785
785
|
bbox: {},
|
|
786
786
|
geometry: {}
|
|
787
787
|
};
|
|
788
|
-
return Q.id !== void 0 && (oe.id = Q.id), Q.bbox && (oe.bbox = Q.bbox), oe.properties = q, oe.geometry =
|
|
788
|
+
return Q.id !== void 0 && (oe.id = Q.id), Q.bbox && (oe.bbox = Q.bbox), oe.properties = q, oe.geometry = F, oe;
|
|
789
789
|
}
|
|
790
|
-
const ne = $(O(c), O(
|
|
790
|
+
const ne = $(O(c), O(f), h);
|
|
791
791
|
return ne < 0 ? 360 + ne : ne;
|
|
792
792
|
};
|
|
793
793
|
return {
|
|
@@ -925,28 +925,28 @@ const wo = (e) => {
|
|
|
925
925
|
return xo(r, a, l);
|
|
926
926
|
}, Lt = (e) => {
|
|
927
927
|
const r = e == null ? void 0 : e.getView().getZoom();
|
|
928
|
-
return r && r <=
|
|
928
|
+
return r && r <= ae.shipModelMax && r >= ae.shipTriggleMin ? "ship" : "triangle";
|
|
929
929
|
}, Mt = (e, r, o) => {
|
|
930
930
|
if (o === "ship") {
|
|
931
|
-
const { len: l, wid: a } = r, i = 97, s = 20, p = 1 / (e == null ? void 0 : e.getView().getResolution()),
|
|
932
|
-
return
|
|
931
|
+
const { len: l, wid: a } = r, i = 97, s = 20, p = 1 / (e == null ? void 0 : e.getView().getResolution()), b = l * p / i, t = a * p / s, n = Math.min(b, t);
|
|
932
|
+
return n < 0.2 ? 0.2 : n > 2 ? 2 : n;
|
|
933
933
|
}
|
|
934
|
-
return
|
|
934
|
+
return ae.scaleNum;
|
|
935
935
|
}, xo = (e, r, o) => {
|
|
936
|
-
const { color: l, direct: a, isHighlight: i, shipData: s } = e.getProperties(),
|
|
936
|
+
const { color: l, direct: a, isHighlight: i, shipData: s } = e.getProperties(), w = ((s == null ? void 0 : s.cog) - 90 + 360) % 360;
|
|
937
937
|
return new ee({
|
|
938
938
|
image: new Pe({
|
|
939
939
|
src: p(),
|
|
940
|
-
scale: r ||
|
|
940
|
+
scale: r || ae.scaleNum,
|
|
941
941
|
anchor: [0.5, 0.5],
|
|
942
|
-
rotation:
|
|
942
|
+
rotation: w * Math.PI / 180,
|
|
943
943
|
rotateWithView: !1
|
|
944
944
|
})
|
|
945
945
|
});
|
|
946
946
|
function p() {
|
|
947
|
-
return `data:image/svg+xml;utf8,${encodeURIComponent(
|
|
947
|
+
return `data:image/svg+xml;utf8,${encodeURIComponent(b())}`;
|
|
948
948
|
}
|
|
949
|
-
function
|
|
949
|
+
function b() {
|
|
950
950
|
switch (o) {
|
|
951
951
|
case "triangle":
|
|
952
952
|
return `<svg width="41" height="24" viewBox="0 0 41 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
@@ -1009,7 +1009,7 @@ const po = (e, r) => {
|
|
|
1009
1009
|
}, Tt = (e) => {
|
|
1010
1010
|
const r = document.createElement("div");
|
|
1011
1011
|
r.className = "ship-overlay-box", r.style.position = "relative";
|
|
1012
|
-
const { lon: o, lat: l, blinking: a, blinkingColors: i, name: s } = e,
|
|
1012
|
+
const { lon: o, lat: l, blinking: a, blinkingColors: i, name: s } = e, w = tt({
|
|
1013
1013
|
setup() {
|
|
1014
1014
|
return yo({
|
|
1015
1015
|
position: [o + 2e-3, l + 2e-3],
|
|
@@ -1022,7 +1022,7 @@ const po = (e, r) => {
|
|
|
1022
1022
|
});
|
|
1023
1023
|
}
|
|
1024
1024
|
});
|
|
1025
|
-
return
|
|
1025
|
+
return Zt(w, r), r;
|
|
1026
1026
|
}, wt = (e) => {
|
|
1027
1027
|
const r = [];
|
|
1028
1028
|
return e.existDevice && r.push(""), e.existMobile && r.push(""), e.existWaterGauge && r.push(""), r;
|
|
@@ -1039,88 +1039,88 @@ function Co() {
|
|
|
1039
1039
|
return e[Math.floor(Math.random() * e.length)];
|
|
1040
1040
|
}
|
|
1041
1041
|
const Lo = window.devicePixelRatio || 1, Ue = /* @__PURE__ */ new Map();
|
|
1042
|
-
let
|
|
1042
|
+
let De = null, Ie = null;
|
|
1043
1043
|
function Mo(e, r, o = "left-bottom", l = 10) {
|
|
1044
1044
|
const a = `${e}-${r.join(",")}-${o}-${l}`;
|
|
1045
1045
|
if (Ue.has(a))
|
|
1046
1046
|
return Ue.get(a);
|
|
1047
|
-
if (!
|
|
1048
|
-
|
|
1047
|
+
if (!De) {
|
|
1048
|
+
De = document.createElement("canvas");
|
|
1049
1049
|
try {
|
|
1050
|
-
Ie =
|
|
1050
|
+
Ie = De.getContext("2d", {
|
|
1051
1051
|
willReadFrequently: !0
|
|
1052
1052
|
});
|
|
1053
1053
|
} catch (_) {
|
|
1054
|
-
console.log("e", _), Ie =
|
|
1054
|
+
console.log("e", _), Ie = De.getContext("2d");
|
|
1055
1055
|
}
|
|
1056
1056
|
}
|
|
1057
|
-
const i =
|
|
1057
|
+
const i = De, s = Ie;
|
|
1058
1058
|
if (!s) return "";
|
|
1059
1059
|
i.width = 0, i.height = 0;
|
|
1060
|
-
const
|
|
1061
|
-
s.font =
|
|
1062
|
-
const
|
|
1063
|
-
s.font =
|
|
1064
|
-
const
|
|
1065
|
-
let R, j,
|
|
1066
|
-
switch (R =
|
|
1060
|
+
const w = 2, p = 4, b = 16, t = window.devicePixelRatio || 1, n = "500 12px Arial", g = "12px map-iconfont";
|
|
1061
|
+
s.font = n;
|
|
1062
|
+
const x = s.measureText(e).width;
|
|
1063
|
+
s.font = g;
|
|
1064
|
+
const P = r.map((_) => ({ width: s.measureText(Me(_)).width, height: 14 })), u = P.reduce((_, d) => _ + d.width, 0), m = r.length * l, C = p + x + u + m + p, y = w + 14 + w * 2;
|
|
1065
|
+
let R, j, A = 0, K = 0, I = 0, T = 0, L = 0, V = 0;
|
|
1066
|
+
switch (R = b + C, o) {
|
|
1067
1067
|
case "right-top":
|
|
1068
|
-
j =
|
|
1068
|
+
j = b + y, A = 0, K = b + y, I = b, T = 0, L = b, V = 0;
|
|
1069
1069
|
break;
|
|
1070
1070
|
case "right-middle":
|
|
1071
|
-
j =
|
|
1071
|
+
j = y, A = 0, K = y / 2, I = b, T = y / 2, L = b, V = 0;
|
|
1072
1072
|
break;
|
|
1073
1073
|
case "right-bottom":
|
|
1074
|
-
j =
|
|
1074
|
+
j = b + y, A = 0, K = 0, I = b, T = b, L = b, V = b;
|
|
1075
1075
|
break;
|
|
1076
1076
|
case "left-top":
|
|
1077
|
-
j =
|
|
1077
|
+
j = b + y, A = C, K = b, I = C + b, T = y + b, L = 0, V = 0;
|
|
1078
1078
|
break;
|
|
1079
1079
|
case "left-middle":
|
|
1080
|
-
j =
|
|
1080
|
+
j = y, A = C, K = y / 2, I = C + b, T = y / 2, L = 0, V = 0;
|
|
1081
1081
|
break;
|
|
1082
1082
|
case "left-bottom":
|
|
1083
|
-
j =
|
|
1083
|
+
j = b + y, A = C, K = y, I = C + b, T = 0, L = 0, V = b;
|
|
1084
1084
|
break;
|
|
1085
1085
|
}
|
|
1086
|
-
j = j +
|
|
1087
|
-
const X = V +
|
|
1088
|
-
s.strokeStyle = "#ffffff", s.lineWidth = 1, s.strokeText(e,
|
|
1089
|
-
let
|
|
1090
|
-
const W = V +
|
|
1086
|
+
j = j + w, i.width = Math.round(R * t), i.height = Math.round(j * t), s.scale(t, t), s.clearRect(0, 0, R, j), s.beginPath(), s.moveTo(A, K), s.lineTo(I, T), s.strokeStyle = "#FFF", s.lineWidth = 1, s.stroke(), s.fillStyle = "#FFF", s.fillRect(L, V, C, y), s.font = n, s.textBaseline = "middle";
|
|
1087
|
+
const X = V + w / 2 + y / 2;
|
|
1088
|
+
s.strokeStyle = "#ffffff", s.lineWidth = 1, s.strokeText(e, L + p, X), s.fillStyle = "#000000", s.fillText(e, L + p, X), s.font = g, s.fillStyle = "#3370ff";
|
|
1089
|
+
let Z = L + p + x + l;
|
|
1090
|
+
const W = V + y / 2;
|
|
1091
1091
|
r.length > 0 && r.forEach((_, d) => {
|
|
1092
|
-
s.fillText(Me(_),
|
|
1092
|
+
s.fillText(Me(_), Z, W), Z += P[d].width + l;
|
|
1093
1093
|
});
|
|
1094
1094
|
const G = i.toDataURL("image/png");
|
|
1095
1095
|
return Ue.set(a, G), G;
|
|
1096
1096
|
}
|
|
1097
1097
|
const xt = (e, r) => {
|
|
1098
1098
|
const { name: o, rightIcons: l, selected: a } = e.getProperties(), i = r !== 1 ? Co() : "right-top", s = Mo(o, l, i);
|
|
1099
|
-
let
|
|
1099
|
+
let w = [0, 0];
|
|
1100
1100
|
switch (i) {
|
|
1101
1101
|
case "right-top":
|
|
1102
|
-
|
|
1102
|
+
w = [0, 1];
|
|
1103
1103
|
break;
|
|
1104
1104
|
case "right-middle":
|
|
1105
|
-
|
|
1105
|
+
w = [0, 0.5];
|
|
1106
1106
|
break;
|
|
1107
1107
|
case "right-bottom":
|
|
1108
|
-
|
|
1108
|
+
w = [0, 0];
|
|
1109
1109
|
break;
|
|
1110
1110
|
case "left-top":
|
|
1111
|
-
|
|
1111
|
+
w = [1, 1];
|
|
1112
1112
|
break;
|
|
1113
1113
|
case "left-middle":
|
|
1114
|
-
|
|
1114
|
+
w = [1, 0.5];
|
|
1115
1115
|
break;
|
|
1116
1116
|
case "left-bottom":
|
|
1117
|
-
|
|
1117
|
+
w = [1, 0];
|
|
1118
1118
|
break;
|
|
1119
1119
|
}
|
|
1120
1120
|
return new ee({
|
|
1121
1121
|
image: new Pe({
|
|
1122
1122
|
src: s,
|
|
1123
|
-
anchor:
|
|
1123
|
+
anchor: w,
|
|
1124
1124
|
displacement: [0, 0],
|
|
1125
1125
|
scale: 1 / Lo,
|
|
1126
1126
|
anchorXUnits: "fraction",
|
|
@@ -1135,34 +1135,34 @@ const xt = (e, r) => {
|
|
|
1135
1135
|
className: "zh-map--ship-layer",
|
|
1136
1136
|
renderBuffer: 300,
|
|
1137
1137
|
zIndex: 101,
|
|
1138
|
-
properties: { layerType:
|
|
1138
|
+
properties: { layerType: re.SHIP }
|
|
1139
1139
|
}), i = new ye(), s = new xe({
|
|
1140
1140
|
source: i,
|
|
1141
1141
|
className: "zh-map--ship-label-layer",
|
|
1142
1142
|
zIndex: 102,
|
|
1143
1143
|
updateWhileInteracting: !1,
|
|
1144
1144
|
updateWhileAnimating: !1,
|
|
1145
|
-
properties: { layerType:
|
|
1145
|
+
properties: { layerType: re.SHIP },
|
|
1146
1146
|
declutter: !0
|
|
1147
|
-
}),
|
|
1148
|
-
source:
|
|
1147
|
+
}), w = new ye(), p = new xe({
|
|
1148
|
+
source: w,
|
|
1149
1149
|
className: "zh-map--ship-selected-layer",
|
|
1150
1150
|
zIndex: 999
|
|
1151
1151
|
});
|
|
1152
1152
|
e == null || e.addLayer(a), e == null || e.addLayer(s), e == null || e.addLayer(p);
|
|
1153
|
-
let
|
|
1153
|
+
let b = null, t = null, n = null, g = null, M = "", x = {}, P = {};
|
|
1154
1154
|
const u = (d) => {
|
|
1155
1155
|
if (!d || !e) return;
|
|
1156
1156
|
const E = (o == null ? void 0 : o.id) || (r == null ? void 0 : r.get("id"));
|
|
1157
1157
|
if (o) {
|
|
1158
|
-
const
|
|
1159
|
-
|
|
1158
|
+
const D = d.filter((Y) => Y.id === E);
|
|
1159
|
+
D.length === 0 ? d.push(o) : o = D[0];
|
|
1160
1160
|
}
|
|
1161
|
-
R(), W(d),
|
|
1162
|
-
},
|
|
1163
|
-
var
|
|
1164
|
-
const E = (o == null ? void 0 : o.id) || (r == null ? void 0 : r.get("id")),
|
|
1165
|
-
geometry: new
|
|
1161
|
+
R(), W(d), C();
|
|
1162
|
+
}, m = (d) => {
|
|
1163
|
+
var N;
|
|
1164
|
+
const E = (o == null ? void 0 : o.id) || (r == null ? void 0 : r.get("id")), D = fe([d == null ? void 0 : d.lon, d == null ? void 0 : d.lat]), Y = ((N = P[d.id]) == null ? void 0 : N.blinkColors) || [], U = Y[Y.length - 1] || d.fill || "#04C900", te = wo(d), B = new de({
|
|
1165
|
+
geometry: new ie(D),
|
|
1166
1166
|
// 船舶数据
|
|
1167
1167
|
shipData: d,
|
|
1168
1168
|
id: d.id,
|
|
@@ -1177,103 +1177,103 @@ const xt = (e, r) => {
|
|
|
1177
1177
|
// 高亮
|
|
1178
1178
|
isHighlight: !1
|
|
1179
1179
|
});
|
|
1180
|
-
return B.set("clickGeometry", new Jt(
|
|
1181
|
-
},
|
|
1180
|
+
return B.set("clickGeometry", new Jt(D)), B;
|
|
1181
|
+
}, C = () => {
|
|
1182
1182
|
if (o && e && o) {
|
|
1183
|
-
|
|
1183
|
+
w.getFeatures().length > 0 && w.clear();
|
|
1184
1184
|
const d = fe([o == null ? void 0 : o.lon, o == null ? void 0 : o.lat]), E = new de({
|
|
1185
|
-
geometry: new
|
|
1185
|
+
geometry: new ie(d),
|
|
1186
1186
|
id: o.id
|
|
1187
1187
|
});
|
|
1188
|
-
E.setStyle(bo(e, o)),
|
|
1188
|
+
E.setStyle(bo(e, o)), w.addFeature(E);
|
|
1189
1189
|
}
|
|
1190
|
-
},
|
|
1190
|
+
}, y = (d) => {
|
|
1191
1191
|
if (d === "start") {
|
|
1192
1192
|
const E = () => {
|
|
1193
|
-
const
|
|
1193
|
+
const D = w.getFeatures();
|
|
1194
1194
|
l.getFeatures().forEach((Y) => {
|
|
1195
1195
|
var U, te;
|
|
1196
1196
|
const J = Ne(e, Y);
|
|
1197
|
-
if (Y.setStyle(J), Y.get("id") === (o == null ? void 0 : o.id) &&
|
|
1198
|
-
const B =
|
|
1199
|
-
if (
|
|
1200
|
-
const
|
|
1201
|
-
|
|
1197
|
+
if (Y.setStyle(J), Y.get("id") === (o == null ? void 0 : o.id) && D && D[0]) {
|
|
1198
|
+
const B = D[0], N = B == null ? void 0 : B.getStyle();
|
|
1199
|
+
if (N && (N != null && N.getImage())) {
|
|
1200
|
+
const se = (U = J.getImage()) == null ? void 0 : U.getScale();
|
|
1201
|
+
se && ((te = N.getImage()) == null || te.setScale(se));
|
|
1202
1202
|
}
|
|
1203
1203
|
}
|
|
1204
|
-
}),
|
|
1204
|
+
}), g = requestAnimationFrame(E);
|
|
1205
1205
|
};
|
|
1206
1206
|
E();
|
|
1207
1207
|
}
|
|
1208
|
-
d === "end" &&
|
|
1208
|
+
d === "end" && g && (cancelAnimationFrame(g), g = null);
|
|
1209
1209
|
}, R = () => {
|
|
1210
|
-
e && l && (j(), l.clear(), i.clear(),
|
|
1210
|
+
e && l && (j(), l.clear(), i.clear(), w.clear(), y("end"));
|
|
1211
1211
|
}, j = () => {
|
|
1212
1212
|
const d = e.getOverlays().getArray().filter((E) => E.get("class") == "zh-map-ship-overlay");
|
|
1213
1213
|
if (d && d.length > 0)
|
|
1214
1214
|
for (let E = 0; E < d.length; E++) {
|
|
1215
|
-
const
|
|
1216
|
-
|
|
1215
|
+
const D = d[E];
|
|
1216
|
+
D.setPosition(void 0), e.removeOverlay(D), D.dispose();
|
|
1217
1217
|
}
|
|
1218
|
-
},
|
|
1219
|
-
|
|
1220
|
-
const
|
|
1221
|
-
for (const J in
|
|
1222
|
-
const U =
|
|
1218
|
+
}, A = (d, E) => {
|
|
1219
|
+
x = d, P = E;
|
|
1220
|
+
const D = e.getOverlays().getArray(), Y = l.getFeatures();
|
|
1221
|
+
for (const J in x) {
|
|
1222
|
+
const U = x[J], te = D.find((N) => (N == null ? void 0 : N.getId()) === "label-" + J), B = Y.find((N) => J === N.get("id"));
|
|
1223
1223
|
if (te && B) {
|
|
1224
|
-
const
|
|
1225
|
-
B.set("blinking", U),
|
|
1224
|
+
const N = E[J].blinkColors || [], { shipData: se, name: he, color: ve } = B.getProperties();
|
|
1225
|
+
B.set("blinking", U), N[(N == null ? void 0 : N.length) - 1] && ve !== N[(N == null ? void 0 : N.length) - 1] && (B.set("color", N[(N == null ? void 0 : N.length) - 1] || ""), B.setStyle(Ne(e, B)));
|
|
1226
1226
|
const Qe = {
|
|
1227
|
-
...
|
|
1227
|
+
...se,
|
|
1228
1228
|
blinking: U,
|
|
1229
|
-
blinkingColors:
|
|
1229
|
+
blinkingColors: N || [],
|
|
1230
1230
|
name: he + "(" + E[J].shipState + ")"
|
|
1231
|
-
},
|
|
1232
|
-
|
|
1231
|
+
}, Ae = te.getElement(), We = Tt(Qe);
|
|
1232
|
+
Ae && Ae !== We && te.setElement(We);
|
|
1233
1233
|
}
|
|
1234
1234
|
}
|
|
1235
1235
|
}, K = (d) => {
|
|
1236
1236
|
if (!e) return;
|
|
1237
|
-
const E = l.getFeatures(),
|
|
1238
|
-
d.forEach((
|
|
1239
|
-
te.set(
|
|
1237
|
+
const E = l.getFeatures(), D = i.getFeatures(), Y = r ? r.get("id") : "", J = E.filter((N) => N.get("id") !== Y), U = D == null ? void 0 : D.filter((N) => N.get("id") !== Y), te = /* @__PURE__ */ new Map();
|
|
1238
|
+
d.forEach((N) => {
|
|
1239
|
+
te.set(N.id, !0);
|
|
1240
1240
|
});
|
|
1241
1241
|
const B = e.getOverlays().getArray();
|
|
1242
|
-
J.forEach((
|
|
1243
|
-
const
|
|
1244
|
-
if (!te.has(
|
|
1245
|
-
|
|
1242
|
+
J.forEach((N) => {
|
|
1243
|
+
const se = N.get("id");
|
|
1244
|
+
if (!te.has(se))
|
|
1245
|
+
N.setStyle([]);
|
|
1246
1246
|
else {
|
|
1247
|
-
const ve =
|
|
1248
|
-
(ve == null ? void 0 : ve.length) == 0 &&
|
|
1247
|
+
const ve = N.getStyle();
|
|
1248
|
+
(ve == null ? void 0 : ve.length) == 0 && N.setStyle(Ne(e, N));
|
|
1249
1249
|
}
|
|
1250
|
-
const he = B.find((ve) => ve.getId() === "label-" +
|
|
1250
|
+
const he = B.find((ve) => ve.getId() === "label-" + se);
|
|
1251
1251
|
he && he.setPosition(void 0);
|
|
1252
|
-
}), U.forEach((
|
|
1253
|
-
const
|
|
1254
|
-
if (!te.has(
|
|
1255
|
-
|
|
1252
|
+
}), U.forEach((N) => {
|
|
1253
|
+
const se = N.get("id");
|
|
1254
|
+
if (!te.has(se))
|
|
1255
|
+
N.setStyle([]);
|
|
1256
1256
|
else {
|
|
1257
|
-
const he =
|
|
1258
|
-
(he == null ? void 0 : he.length) == 0 &&
|
|
1257
|
+
const he = N.getStyle();
|
|
1258
|
+
(he == null ? void 0 : he.length) == 0 && N.setStyle(xt(N, d.length));
|
|
1259
1259
|
}
|
|
1260
1260
|
});
|
|
1261
1261
|
}, I = (d) => {
|
|
1262
1262
|
if (d) {
|
|
1263
1263
|
console.log("选中", d);
|
|
1264
|
-
const E = l.getFeatures().find((Y) => Y.get("id") === d.id),
|
|
1265
|
-
E && (r = E),
|
|
1264
|
+
const E = l.getFeatures().find((Y) => Y.get("id") === d.id), D = i.getFeatures().find((Y) => Y.get("id") === d.id);
|
|
1265
|
+
E && (r = E), D && D.set("selected", !0), o = d, C();
|
|
1266
1266
|
} else
|
|
1267
1267
|
console.log("取消选中"), o = null, r = null, X();
|
|
1268
|
-
}, T = (d, E,
|
|
1269
|
-
|
|
1270
|
-
},
|
|
1268
|
+
}, T = (d, E, D) => {
|
|
1269
|
+
t = d, n = E, b = D, console.log("setShipLabelStatus", b, t, n);
|
|
1270
|
+
}, L = Qt((d, E, D) => {
|
|
1271
1271
|
try {
|
|
1272
1272
|
if (d) {
|
|
1273
1273
|
const Y = d.get("shipData"), J = d.get("id");
|
|
1274
|
-
if (E === "click" && (I(Y),
|
|
1275
|
-
|
|
1276
|
-
const U = l.getFeatures().find((te) => te.get("id") ===
|
|
1274
|
+
if (E === "click" && (I(Y), D && D(J)), E === "hover") {
|
|
1275
|
+
M && M !== J && V(), M = J;
|
|
1276
|
+
const U = l.getFeatures().find((te) => te.get("id") === M);
|
|
1277
1277
|
U == null || U.set("isHighlight", !0), U == null || U.setStyle(Ne(e, U));
|
|
1278
1278
|
}
|
|
1279
1279
|
} else
|
|
@@ -1282,17 +1282,17 @@ const xt = (e, r) => {
|
|
|
1282
1282
|
console.log("handleShipMapEvent", Y);
|
|
1283
1283
|
}
|
|
1284
1284
|
}, 10), V = () => {
|
|
1285
|
-
const d =
|
|
1286
|
-
|
|
1285
|
+
const d = M ? l.getFeatures().find((E) => E.get("id") === M) : null;
|
|
1286
|
+
M = null, d == null || d.set("isHighlight", !1), d == null || d.setStyle(Ne(e, d));
|
|
1287
1287
|
}, X = () => {
|
|
1288
1288
|
try {
|
|
1289
|
-
|
|
1289
|
+
w.clear();
|
|
1290
1290
|
} catch (d) {
|
|
1291
1291
|
console.log(d);
|
|
1292
1292
|
}
|
|
1293
|
-
},
|
|
1294
|
-
const
|
|
1295
|
-
geometry: new
|
|
1293
|
+
}, Z = (d, E) => {
|
|
1294
|
+
const D = fe([d == null ? void 0 : d.lon, d == null ? void 0 : d.lat]), Y = new de({
|
|
1295
|
+
geometry: new ie(D),
|
|
1296
1296
|
name: d.cnname || d.enname || d.name || d.id || "未命名船舶",
|
|
1297
1297
|
// 图标
|
|
1298
1298
|
rightIcons: wt(d),
|
|
@@ -1303,25 +1303,25 @@ const xt = (e, r) => {
|
|
|
1303
1303
|
const J = xt(Y, E);
|
|
1304
1304
|
return Y.setStyle(J), Y;
|
|
1305
1305
|
}, W = (d) => {
|
|
1306
|
-
const E = e.getView().getZoom(),
|
|
1306
|
+
const E = e.getView().getZoom(), D = [], Y = [];
|
|
1307
1307
|
d.forEach((B) => {
|
|
1308
|
-
const
|
|
1309
|
-
|
|
1310
|
-
}), (
|
|
1308
|
+
const N = m(B);
|
|
1309
|
+
N.setStyle(Ne(e, N)), l.addFeature(N), x[B.id] && D.push(B), (o == null ? void 0 : o.id) == B.id && (o = B), !x[B.id] && (o == null ? void 0 : o.id) !== B.id && Y.push(B);
|
|
1310
|
+
}), (n !== null ? n : (o == null ? void 0 : o.id) && x[o == null ? void 0 : o.id] || E && E >= ae.shipModelMin) && D.map((B) => {
|
|
1311
1311
|
_(B);
|
|
1312
|
-
}), o && (
|
|
1312
|
+
}), o && (b !== null ? b : !0) && !x[o == null ? void 0 : o.id] && G(o, d), (t !== null ? t : E && E >= ae.shipModelMin) && Y.map((B) => {
|
|
1313
1313
|
G(B, d);
|
|
1314
1314
|
});
|
|
1315
1315
|
}, G = (d, E) => {
|
|
1316
|
-
const
|
|
1317
|
-
i.addFeature(
|
|
1316
|
+
const D = Z(d, E.length);
|
|
1317
|
+
i.addFeature(D);
|
|
1318
1318
|
}, _ = (d) => {
|
|
1319
|
-
if (d.id &&
|
|
1320
|
-
const E =
|
|
1319
|
+
if (d.id && P[d == null ? void 0 : d.id]) {
|
|
1320
|
+
const E = P[d == null ? void 0 : d.id] || {}, D = (E == null ? void 0 : E.blinkColors) || [], Y = (E == null ? void 0 : E.shipState) || "", J = (d.cnname || d.enname || d.name || d.id || "未命名船舶") + "(" + Y + ")", U = {
|
|
1321
1321
|
...d,
|
|
1322
1322
|
name: J,
|
|
1323
|
-
blinking:
|
|
1324
|
-
blinkingColors:
|
|
1323
|
+
blinking: x[d.id],
|
|
1324
|
+
blinkingColors: D || []
|
|
1325
1325
|
};
|
|
1326
1326
|
po(e, U);
|
|
1327
1327
|
}
|
|
@@ -1330,18 +1330,18 @@ const xt = (e, r) => {
|
|
|
1330
1330
|
render: u,
|
|
1331
1331
|
selected: I,
|
|
1332
1332
|
filter: K,
|
|
1333
|
-
blinking:
|
|
1333
|
+
blinking: A,
|
|
1334
1334
|
clear: R,
|
|
1335
1335
|
setLableStatus: T,
|
|
1336
|
-
handleShipMapEvent:
|
|
1337
|
-
changeShipScale:
|
|
1336
|
+
handleShipMapEvent: L,
|
|
1337
|
+
changeShipScale: y
|
|
1338
1338
|
};
|
|
1339
1339
|
}, Eo = (e) => {
|
|
1340
1340
|
const r = () => e == null ? void 0 : e.getLayers(), o = ge("vector"), l = () => o.value, a = (p) => {
|
|
1341
1341
|
o.value = p;
|
|
1342
|
-
const
|
|
1343
|
-
|
|
1344
|
-
(
|
|
1342
|
+
const b = r();
|
|
1343
|
+
b && (b == null || b.getArray().forEach((t) => {
|
|
1344
|
+
(t.className_ === "vector" || t.className_ === "satellite") && t.setVisible(t.className_ === p);
|
|
1345
1345
|
}));
|
|
1346
1346
|
}, i = ge(!1);
|
|
1347
1347
|
return {
|
|
@@ -1350,19 +1350,19 @@ const xt = (e, r) => {
|
|
|
1350
1350
|
setGreenTileVisible: (p) => {
|
|
1351
1351
|
if (p !== i.value) {
|
|
1352
1352
|
if (p) {
|
|
1353
|
-
const
|
|
1354
|
-
if (!
|
|
1355
|
-
const
|
|
1353
|
+
const b = r();
|
|
1354
|
+
if (!b.getArray().find((n) => n.className_ === "greenTile")) {
|
|
1355
|
+
const n = new Re({
|
|
1356
1356
|
source: new $e({ url: Le.greenTile }),
|
|
1357
1357
|
visible: p,
|
|
1358
1358
|
zIndex: 2,
|
|
1359
1359
|
className: "greenTile"
|
|
1360
1360
|
});
|
|
1361
|
-
|
|
1361
|
+
b.push(n);
|
|
1362
1362
|
}
|
|
1363
1363
|
} else {
|
|
1364
|
-
const
|
|
1365
|
-
|
|
1364
|
+
const b = r(), t = b.getArray().find((n) => n.className_ === "greenTile");
|
|
1365
|
+
t && b.remove(t);
|
|
1366
1366
|
}
|
|
1367
1367
|
i.value = p;
|
|
1368
1368
|
}
|
|
@@ -1381,84 +1381,84 @@ const xt = (e, r) => {
|
|
|
1381
1381
|
}, Fo = (e) => {
|
|
1382
1382
|
const r = "zh-map-location-layer";
|
|
1383
1383
|
let o, l, a = null, i = null;
|
|
1384
|
-
const s = (
|
|
1385
|
-
if (!(!
|
|
1384
|
+
const s = (x) => {
|
|
1385
|
+
if (!(!x || x.length === 0)) {
|
|
1386
1386
|
if (l || (l = new ye()), l.clear(), i) {
|
|
1387
|
-
const
|
|
1388
|
-
|
|
1387
|
+
const P = x.find((u) => u.id === (i == null ? void 0 : i.id));
|
|
1388
|
+
P ? i = P : x.push(i);
|
|
1389
1389
|
}
|
|
1390
|
-
|
|
1391
|
-
|
|
1390
|
+
x.forEach((P) => {
|
|
1391
|
+
w(P);
|
|
1392
1392
|
}), o || (o = new xe({
|
|
1393
1393
|
className: r,
|
|
1394
1394
|
source: l,
|
|
1395
1395
|
zIndex: 100
|
|
1396
1396
|
}), e == null || e.addLayer(o));
|
|
1397
1397
|
}
|
|
1398
|
-
},
|
|
1399
|
-
const
|
|
1400
|
-
geometry: new
|
|
1398
|
+
}, w = (x) => {
|
|
1399
|
+
const P = e == null ? void 0 : e.getView().getZoom(), [u, m] = x.latLon.split(","), C = new de({
|
|
1400
|
+
geometry: new ie(fe([Number(u), Number(m)]))
|
|
1401
1401
|
});
|
|
1402
|
-
|
|
1403
|
-
}, p = (
|
|
1404
|
-
let
|
|
1405
|
-
src: u &&
|
|
1406
|
-
scale: 0.5 *
|
|
1402
|
+
C.setStyle(p(x, P, x.id === (i == null ? void 0 : i.id))), C.set("loactionData", x), l.addFeature(C);
|
|
1403
|
+
}, p = (x, P, u) => {
|
|
1404
|
+
let m = {
|
|
1405
|
+
src: u && x.selectedPath || x.defaultPath,
|
|
1406
|
+
scale: 0.5 * P / 10
|
|
1407
1407
|
};
|
|
1408
|
-
|
|
1409
|
-
...
|
|
1410
|
-
width:
|
|
1411
|
-
height:
|
|
1408
|
+
x != null && x.width && (x != null && x.height) && (m = {
|
|
1409
|
+
...m,
|
|
1410
|
+
width: x.width,
|
|
1411
|
+
height: x.height,
|
|
1412
1412
|
scale: 1
|
|
1413
1413
|
});
|
|
1414
|
-
let
|
|
1415
|
-
image: new Pe(
|
|
1414
|
+
let C = {
|
|
1415
|
+
image: new Pe(m)
|
|
1416
1416
|
};
|
|
1417
|
-
return
|
|
1418
|
-
...
|
|
1417
|
+
return x.name && (C = {
|
|
1418
|
+
...C,
|
|
1419
1419
|
text: new Ve({
|
|
1420
|
-
text:
|
|
1420
|
+
text: x.name,
|
|
1421
1421
|
font: "12px sans-serif",
|
|
1422
|
-
fill: new
|
|
1422
|
+
fill: new ce({
|
|
1423
1423
|
color: "#000000"
|
|
1424
1424
|
}),
|
|
1425
|
-
backgroundFill: new
|
|
1425
|
+
backgroundFill: new ce({
|
|
1426
1426
|
color: "#FFFFFF"
|
|
1427
1427
|
}),
|
|
1428
1428
|
offsetY: 30
|
|
1429
1429
|
})
|
|
1430
|
-
}), new ee(
|
|
1431
|
-
},
|
|
1430
|
+
}), new ee(C);
|
|
1431
|
+
}, b = () => {
|
|
1432
1432
|
if (a) {
|
|
1433
|
-
const
|
|
1434
|
-
l.getFeatures().forEach((
|
|
1435
|
-
|
|
1433
|
+
const x = a.get("loactionData").id;
|
|
1434
|
+
l.getFeatures().forEach((P) => {
|
|
1435
|
+
P.get("loactionData").id !== x && l.removeFeature(P);
|
|
1436
1436
|
});
|
|
1437
1437
|
} else
|
|
1438
1438
|
l.clear();
|
|
1439
|
-
},
|
|
1440
|
-
var x;
|
|
1441
|
-
const m = a == null ? void 0 : a.get("loactionData"), N = (x = e == null ? void 0 : e.getView()) == null ? void 0 : x.getZoom();
|
|
1442
|
-
l.getFeatures().forEach((L) => {
|
|
1443
|
-
L.get("loactionData").id === m.id && (L == null || L.setStyle(p(m, N, !1)));
|
|
1444
|
-
}), i = null, a = null;
|
|
1445
|
-
}, w = (m) => {
|
|
1446
|
-
m ? (y(), C(m)) : n();
|
|
1447
|
-
}, y = () => {
|
|
1439
|
+
}, t = () => {
|
|
1448
1440
|
var m;
|
|
1441
|
+
const x = a == null ? void 0 : a.get("loactionData"), P = (m = e == null ? void 0 : e.getView()) == null ? void 0 : m.getZoom();
|
|
1442
|
+
l.getFeatures().forEach((C) => {
|
|
1443
|
+
C.get("loactionData").id === x.id && (C == null || C.setStyle(p(x, P, !1)));
|
|
1444
|
+
}), i = null, a = null;
|
|
1445
|
+
}, n = (x) => {
|
|
1446
|
+
x ? (g(), M(x)) : t();
|
|
1447
|
+
}, g = () => {
|
|
1448
|
+
var x;
|
|
1449
1449
|
if (a) {
|
|
1450
|
-
const
|
|
1451
|
-
a.setStyle(p(
|
|
1450
|
+
const P = a.get("loactionData"), u = (x = e == null ? void 0 : e.getView()) == null ? void 0 : x.getZoom();
|
|
1451
|
+
a.setStyle(p(P, u, !1));
|
|
1452
1452
|
}
|
|
1453
|
-
},
|
|
1454
|
-
const
|
|
1455
|
-
i =
|
|
1453
|
+
}, M = (x) => {
|
|
1454
|
+
const P = l.getFeatures();
|
|
1455
|
+
i = x, a = P.find((u) => u.get("loactionData").id === x.id);
|
|
1456
1456
|
};
|
|
1457
1457
|
return {
|
|
1458
1458
|
render: s,
|
|
1459
|
-
selected:
|
|
1460
|
-
clearSelected:
|
|
1461
|
-
clear:
|
|
1459
|
+
selected: n,
|
|
1460
|
+
clearSelected: t,
|
|
1461
|
+
clear: b
|
|
1462
1462
|
};
|
|
1463
1463
|
}, So = (e) => {
|
|
1464
1464
|
e.getInteractions().forEach((r) => {
|
|
@@ -1476,14 +1476,14 @@ const xt = (e, r) => {
|
|
|
1476
1476
|
l.value = T;
|
|
1477
1477
|
};
|
|
1478
1478
|
let i, s = "close";
|
|
1479
|
-
const
|
|
1480
|
-
be(e, "crosshair"),
|
|
1479
|
+
const w = () => {
|
|
1480
|
+
be(e, "crosshair"), t(), So(e), e.on("pointermove", M), e.getViewport().addEventListener("mouseout", () => {
|
|
1481
1481
|
i && i.classList.add("hidden");
|
|
1482
|
-
}),
|
|
1482
|
+
}), P(), s = "open";
|
|
1483
1483
|
};
|
|
1484
|
-
let p,
|
|
1485
|
-
const
|
|
1486
|
-
p = new ye(),
|
|
1484
|
+
let p, b;
|
|
1485
|
+
const t = () => {
|
|
1486
|
+
p = new ye(), b = new xe({
|
|
1487
1487
|
source: p,
|
|
1488
1488
|
zIndex: 1e3,
|
|
1489
1489
|
style: {
|
|
@@ -1493,22 +1493,22 @@ const xt = (e, r) => {
|
|
|
1493
1493
|
"circle-radius": 7,
|
|
1494
1494
|
"circle-fill-color": "#ffcc33"
|
|
1495
1495
|
}
|
|
1496
|
-
}), e == null || e.addLayer(
|
|
1496
|
+
}), e == null || e.addLayer(b);
|
|
1497
1497
|
};
|
|
1498
|
-
let
|
|
1499
|
-
const
|
|
1498
|
+
let n, g;
|
|
1499
|
+
const M = (T) => {
|
|
1500
1500
|
if (T.dragging)
|
|
1501
1501
|
return;
|
|
1502
|
-
let
|
|
1503
|
-
|
|
1502
|
+
let L = "点击选择起点";
|
|
1503
|
+
n && (L = "单击继续,双击结束"), i && (i.innerHTML = L, g.setPosition(T.coordinate), i.classList.remove("hidden"));
|
|
1504
1504
|
};
|
|
1505
|
-
let
|
|
1506
|
-
const
|
|
1507
|
-
|
|
1505
|
+
let x;
|
|
1506
|
+
const P = () => {
|
|
1507
|
+
x = new je({
|
|
1508
1508
|
source: p,
|
|
1509
1509
|
type: "LineString",
|
|
1510
1510
|
style: new ee({
|
|
1511
|
-
fill: new
|
|
1511
|
+
fill: new ce({
|
|
1512
1512
|
color: "rgba(255, 255, 255, 0.2)"
|
|
1513
1513
|
}),
|
|
1514
1514
|
stroke: new Te({
|
|
@@ -1521,87 +1521,87 @@ const xt = (e, r) => {
|
|
|
1521
1521
|
stroke: new Te({
|
|
1522
1522
|
color: "rgba(0, 0, 0, 0.7)"
|
|
1523
1523
|
}),
|
|
1524
|
-
fill: new
|
|
1524
|
+
fill: new ce({
|
|
1525
1525
|
color: "rgba(255, 255, 255, 0.2)"
|
|
1526
1526
|
})
|
|
1527
1527
|
})
|
|
1528
1528
|
}),
|
|
1529
1529
|
// 添加条件函数,判断是否应该出发点绘制
|
|
1530
|
-
condition: (
|
|
1531
|
-
}), e == null || e.addInteraction(
|
|
1530
|
+
condition: (L) => L.originalEvent.target.tagName !== "DIV"
|
|
1531
|
+
}), e == null || e.addInteraction(x), y(), R();
|
|
1532
1532
|
let T;
|
|
1533
|
-
|
|
1533
|
+
x.on("drawstart", function(L) {
|
|
1534
1534
|
var X;
|
|
1535
|
-
|
|
1535
|
+
n = L.feature, n.set("randomId", u());
|
|
1536
1536
|
let V;
|
|
1537
|
-
T = (X =
|
|
1538
|
-
const W =
|
|
1539
|
-
V = W.getLastCoordinate(),
|
|
1537
|
+
T = (X = n.getGeometry()) == null ? void 0 : X.on("change", function(Z) {
|
|
1538
|
+
const W = Z.target, G = Et(W, l.value);
|
|
1539
|
+
V = W.getLastCoordinate(), m && G && (m.innerHTML = G), C.setPosition(V);
|
|
1540
1540
|
});
|
|
1541
|
-
}),
|
|
1542
|
-
var
|
|
1543
|
-
if (
|
|
1544
|
-
const
|
|
1545
|
-
o.value.push({ id:
|
|
1541
|
+
}), x.on("drawend", function() {
|
|
1542
|
+
var L, V, X;
|
|
1543
|
+
if (m && (m.className = "ol-tooltip ol-tooltip-static ol-tooltip-measure"), m != null && m.innerHTML) {
|
|
1544
|
+
const Z = (n == null ? void 0 : n.get("randomId")) || u();
|
|
1545
|
+
o.value.push({ id: Z, value: m == null ? void 0 : m.innerHTML }), m.innerHTML = `${m.innerHTML}<div class="ol-tooltip-delete-button" data-id="${Z}"><i class="map-iconfont icon-delete"></i></div>`;
|
|
1546
1546
|
}
|
|
1547
|
-
(
|
|
1547
|
+
(L = document.querySelector(".ol-selectable:has(.ol-tooltip-delete-button):last-child .ol-tooltip-delete-button")) == null || L.addEventListener("click", (Z) => {
|
|
1548
1548
|
var G;
|
|
1549
|
-
|
|
1550
|
-
const W = (G =
|
|
1551
|
-
W &&
|
|
1552
|
-
}),
|
|
1549
|
+
Z.preventDefault(), Z.stopPropagation();
|
|
1550
|
+
const W = (G = Z.target) == null ? void 0 : G.getAttribute("data-id");
|
|
1551
|
+
W && A(W);
|
|
1552
|
+
}), C.setOffset([0, -7]), n = null, m = null, y(), T && ot(T), (X = (V = r.getProps()) == null ? void 0 : V.lineDrawEnd) == null || X.call(V, o.value);
|
|
1553
1553
|
});
|
|
1554
1554
|
}, u = () => Math.random().toString(36).substring(2, 9);
|
|
1555
|
-
let
|
|
1556
|
-
const
|
|
1557
|
-
|
|
1558
|
-
element:
|
|
1555
|
+
let m, C;
|
|
1556
|
+
const y = () => {
|
|
1557
|
+
m != null && m.parentNode && m.parentNode.removeChild(m), m = document.createElement("div"), m.className = "ol-tooltip ol-tooltip-measure", C = new Ee({
|
|
1558
|
+
element: m,
|
|
1559
1559
|
offset: [0, -15],
|
|
1560
1560
|
positioning: "bottom-center",
|
|
1561
1561
|
stopEvent: !1,
|
|
1562
1562
|
insertFirst: !1
|
|
1563
|
-
}), e == null || e.addOverlay(
|
|
1563
|
+
}), e == null || e.addOverlay(C);
|
|
1564
1564
|
}, R = () => {
|
|
1565
1565
|
i != null && i.parentNode && i.parentNode.removeChild(i), i = document.createElement("div"), i.className = "ol-tooltip hidden", i.addEventListener("click", (T) => {
|
|
1566
1566
|
T.preventDefault(), T.stopPropagation();
|
|
1567
|
-
}),
|
|
1567
|
+
}), g = new Ee({
|
|
1568
1568
|
element: i,
|
|
1569
1569
|
offset: [15, 0],
|
|
1570
1570
|
positioning: "center-left"
|
|
1571
|
-
}), e == null || e.addOverlay(
|
|
1571
|
+
}), e == null || e.addOverlay(g);
|
|
1572
1572
|
}, j = () => {
|
|
1573
|
-
o.value.forEach((T,
|
|
1574
|
-
var
|
|
1573
|
+
o.value.forEach((T, L) => {
|
|
1574
|
+
var Z, W;
|
|
1575
1575
|
const V = document.querySelectorAll(".ol-tooltip.ol-tooltip-static.ol-tooltip-measure");
|
|
1576
|
-
V[
|
|
1576
|
+
V[L] && ((W = (Z = V[L]) == null ? void 0 : Z.parentNode) == null || W.removeChild(V[L]));
|
|
1577
1577
|
const X = p.getFeatures();
|
|
1578
|
-
X[
|
|
1578
|
+
X[L] && p.removeFeature(X[L]);
|
|
1579
1579
|
}), K(), No(e), s = "close", be(e, "grab");
|
|
1580
|
-
},
|
|
1581
|
-
var V, X,
|
|
1582
|
-
const
|
|
1583
|
-
if (
|
|
1584
|
-
o.value.splice(
|
|
1580
|
+
}, A = (T) => {
|
|
1581
|
+
var V, X, Z, W;
|
|
1582
|
+
const L = o.value.findIndex((G) => G.id === T);
|
|
1583
|
+
if (L !== -1) {
|
|
1584
|
+
o.value.splice(L, 1);
|
|
1585
1585
|
const G = document.querySelectorAll(".ol-tooltip.ol-tooltip-static.ol-tooltip-measure");
|
|
1586
|
-
G[
|
|
1586
|
+
G[L] && ((X = (V = G[L]) == null ? void 0 : V.parentNode) == null || X.removeChild(G[L]));
|
|
1587
1587
|
const _ = p.getFeatures();
|
|
1588
|
-
_[
|
|
1588
|
+
_[L] && p.removeFeature(_[L]);
|
|
1589
1589
|
}
|
|
1590
|
-
(W = (
|
|
1590
|
+
(W = (Z = r.getProps()) == null ? void 0 : Z.lineDrawEnd) == null || W.call(Z, o.value);
|
|
1591
1591
|
}, K = () => {
|
|
1592
1592
|
if (o.value = [], document.querySelectorAll(".ol-tooltip.ol-tooltip-static").forEach((T) => {
|
|
1593
|
-
var
|
|
1594
|
-
(
|
|
1595
|
-
}), p == null || p.clear(),
|
|
1596
|
-
const T = e.getInteractions().getArray().find((
|
|
1593
|
+
var L;
|
|
1594
|
+
(L = T == null ? void 0 : T.parentNode) == null || L.removeChild(T);
|
|
1595
|
+
}), p == null || p.clear(), x) {
|
|
1596
|
+
const T = e.getInteractions().getArray().find((L) => mt(L) === mt(x));
|
|
1597
1597
|
T && e.removeInteraction(T);
|
|
1598
1598
|
}
|
|
1599
|
-
e.removeLayer(
|
|
1599
|
+
e.removeLayer(b), i != null && i.parentNode && i.parentNode.removeChild(i), m != null && m.parentNode && m.parentNode.removeChild(m);
|
|
1600
1600
|
};
|
|
1601
1601
|
return {
|
|
1602
|
-
open:
|
|
1602
|
+
open: w,
|
|
1603
1603
|
close: j,
|
|
1604
|
-
deleteLine:
|
|
1604
|
+
deleteLine: A,
|
|
1605
1605
|
setUnit: a,
|
|
1606
1606
|
getState: () => s
|
|
1607
1607
|
};
|
|
@@ -1625,12 +1625,12 @@ const xt = (e, r) => {
|
|
|
1625
1625
|
const i = () => {
|
|
1626
1626
|
K(), a = "open", s(), be(e, "crosshair");
|
|
1627
1627
|
}, s = () => {
|
|
1628
|
-
|
|
1628
|
+
b(), C(), j(), x();
|
|
1629
1629
|
};
|
|
1630
|
-
let
|
|
1631
|
-
const
|
|
1632
|
-
if (
|
|
1633
|
-
const T = new ye(),
|
|
1630
|
+
let w = null, p = null;
|
|
1631
|
+
const b = () => {
|
|
1632
|
+
if (w && p) return;
|
|
1633
|
+
const T = new ye(), L = new xe({
|
|
1634
1634
|
source: T,
|
|
1635
1635
|
style: new ee({
|
|
1636
1636
|
stroke: new Te({
|
|
@@ -1640,43 +1640,43 @@ const xt = (e, r) => {
|
|
|
1640
1640
|
}),
|
|
1641
1641
|
zIndex: 1e3
|
|
1642
1642
|
});
|
|
1643
|
-
|
|
1644
|
-
|
|
1643
|
+
w = L, p = T, e.on("pointermove", n), e.addLayer(L), e.on(["dblclick"], function(V) {
|
|
1644
|
+
g && (V.stopPropagation(), V.preventDefault());
|
|
1645
1645
|
});
|
|
1646
1646
|
};
|
|
1647
|
-
let
|
|
1648
|
-
const
|
|
1647
|
+
let t;
|
|
1648
|
+
const n = (T) => {
|
|
1649
1649
|
if (T.dragging) return;
|
|
1650
|
-
const
|
|
1651
|
-
|
|
1650
|
+
const L = t ? "单击继续,双击结束" : "点击选择起点";
|
|
1651
|
+
y && (y.innerHTML = L, R.setPosition(T.coordinate));
|
|
1652
1652
|
};
|
|
1653
|
-
let
|
|
1654
|
-
const
|
|
1653
|
+
let g, M = !1;
|
|
1654
|
+
const x = () => {
|
|
1655
1655
|
if (o) {
|
|
1656
|
-
|
|
1656
|
+
y != null && y.parentNode && y.parentNode.removeChild(y);
|
|
1657
1657
|
const T = o.getGeometry();
|
|
1658
1658
|
if (!T) return;
|
|
1659
|
-
const
|
|
1659
|
+
const L = P(T, "nm");
|
|
1660
1660
|
u && (u.innerHTML = `
|
|
1661
|
-
<span class="text">面积:${
|
|
1661
|
+
<span class="text">面积:${L}${M ? '<span class="error pl-12">超出可以绘画的距离</span>' : ""}</span>
|
|
1662
1662
|
`), u && (u.innerHTML += '<span class="delete-icon" ><i class="map-iconfont icon-delete" /></div>');
|
|
1663
1663
|
const V = T.getCoordinates(), X = V[0][V[0].length - 2];
|
|
1664
|
-
if (
|
|
1665
|
-
const W =
|
|
1664
|
+
if (m.setPosition(X), w) {
|
|
1665
|
+
const W = w.getSource();
|
|
1666
1666
|
W && o && (W.clear(), W.addFeature(o));
|
|
1667
1667
|
}
|
|
1668
1668
|
setTimeout(() => {
|
|
1669
1669
|
var W;
|
|
1670
1670
|
(W = document.querySelector(".delete-icon")) == null || W.addEventListener("click", () => {
|
|
1671
1671
|
var G, _;
|
|
1672
|
-
console.log("delete"),
|
|
1672
|
+
console.log("delete"), A(), (_ = (G = r.getProps()) == null ? void 0 : G.areaDrawEnd) == null || _.call(G, []);
|
|
1673
1673
|
});
|
|
1674
1674
|
}, 0);
|
|
1675
|
-
const
|
|
1676
|
-
e == null || e.getView().setCenter(
|
|
1675
|
+
const Z = It(o.getGeometry().getExtent());
|
|
1676
|
+
e == null || e.getView().setCenter(Z);
|
|
1677
1677
|
return;
|
|
1678
1678
|
}
|
|
1679
|
-
|
|
1679
|
+
g = new je({
|
|
1680
1680
|
type: "Polygon",
|
|
1681
1681
|
source: p,
|
|
1682
1682
|
trace: !0,
|
|
@@ -1686,39 +1686,39 @@ const xt = (e, r) => {
|
|
|
1686
1686
|
width: 1.5,
|
|
1687
1687
|
lineDash: [10, 10]
|
|
1688
1688
|
}),
|
|
1689
|
-
fill: new
|
|
1689
|
+
fill: new ce({
|
|
1690
1690
|
color: "rgba(255, 255, 255, 0.25)"
|
|
1691
1691
|
})
|
|
1692
1692
|
}), new ee({
|
|
1693
1693
|
image: new Ke({
|
|
1694
1694
|
radius: 5,
|
|
1695
|
-
fill: new
|
|
1695
|
+
fill: new ce({
|
|
1696
1696
|
color: "rgb(51,112,255, 1)"
|
|
1697
1697
|
})
|
|
1698
1698
|
}),
|
|
1699
1699
|
geometry: function(T) {
|
|
1700
|
-
const
|
|
1701
|
-
return new eo(
|
|
1700
|
+
const L = T.getGeometry().getCoordinates();
|
|
1701
|
+
return new eo(L);
|
|
1702
1702
|
}
|
|
1703
1703
|
})]
|
|
1704
|
-
}), e == null || e.addInteraction(
|
|
1705
|
-
var
|
|
1706
|
-
|
|
1707
|
-
const X = V.target,
|
|
1708
|
-
if (
|
|
1704
|
+
}), e == null || e.addInteraction(g), g.on("drawstart", (T) => {
|
|
1705
|
+
var L;
|
|
1706
|
+
t = T.feature, l = (L = t.getGeometry()) == null ? void 0 : L.on("change", (V) => {
|
|
1707
|
+
const X = V.target, Z = P(X, "nm"), G = X.getCoordinates()[0], _ = new qe([G[G.length - 2], G[G.length - 1]]), d = Et(_, "nm");
|
|
1708
|
+
if (M = Number(it(_) / 1e3) > 150, !Z) return;
|
|
1709
1709
|
const E = '<span class="error pl-4">超出可以绘画的距离</span>';
|
|
1710
1710
|
u && (u.innerHTML = `
|
|
1711
1711
|
<div class="text">
|
|
1712
|
-
面积:${
|
|
1713
|
-
${
|
|
1712
|
+
面积:${Z}
|
|
1713
|
+
${M ? E : ""}
|
|
1714
1714
|
</div>
|
|
1715
|
-
`),
|
|
1715
|
+
`), y && (y.innerHTML = `
|
|
1716
1716
|
<div class="text">
|
|
1717
|
-
面积:${
|
|
1717
|
+
面积:${Z}
|
|
1718
1718
|
</div>
|
|
1719
|
-
<div class="text ${
|
|
1719
|
+
<div class="text ${M ? "error" : ""}">
|
|
1720
1720
|
线段 ${G.length - 2}: ${d}
|
|
1721
|
-
${
|
|
1721
|
+
${M ? E : ""}
|
|
1722
1722
|
|
|
1723
1723
|
</div>
|
|
1724
1724
|
<div>
|
|
@@ -1726,61 +1726,61 @@ const xt = (e, r) => {
|
|
|
1726
1726
|
</div>
|
|
1727
1727
|
`);
|
|
1728
1728
|
});
|
|
1729
|
-
}),
|
|
1730
|
-
var
|
|
1729
|
+
}), g.on("drawend", (T) => {
|
|
1730
|
+
var Z, W, G, _;
|
|
1731
1731
|
if (!T.feature.getGeometry()) return;
|
|
1732
|
-
u && !o && (u.innerHTML += '<span class="delete-icon"><i class="map-iconfont icon-delete" /></div>'), o = T.feature,
|
|
1732
|
+
u && !o && (u.innerHTML += '<span class="delete-icon"><i class="map-iconfont icon-delete" /></div>'), o = T.feature, m.setOffset([10, 0]);
|
|
1733
1733
|
const V = T.feature.getGeometry().getCoordinates(), X = V[0][V[0].length - 2];
|
|
1734
|
-
if (
|
|
1735
|
-
const d = V[0].map((E) =>
|
|
1734
|
+
if (m.setPosition(X), y != null && y.parentNode && y.parentNode.removeChild(y), (Z = r.getProps()) != null && Z.areaDrawEnd) {
|
|
1735
|
+
const d = V[0].map((E) => Ze(E, le.mercator, le.data));
|
|
1736
1736
|
(G = (W = r.getProps()) == null ? void 0 : W.areaDrawEnd) == null || G.call(W, d);
|
|
1737
1737
|
}
|
|
1738
|
-
|
|
1738
|
+
g && (g.setActive(!1), e == null || e.removeInteraction(g), (e == null ? void 0 : e.getInteractions()).forEach((E) => {
|
|
1739
1739
|
E instanceof je && (E.setActive(!1), e == null || e.removeInteraction(E));
|
|
1740
1740
|
})), l && ot(l), (_ = document.querySelector(".delete-icon")) == null || _.addEventListener("click", () => {
|
|
1741
1741
|
var d, E;
|
|
1742
|
-
|
|
1742
|
+
A(), (E = (d = r.getProps()) == null ? void 0 : d.areaDrawEnd) == null || E.call(d, []);
|
|
1743
1743
|
});
|
|
1744
1744
|
});
|
|
1745
|
-
},
|
|
1745
|
+
}, P = (T, L) => {
|
|
1746
1746
|
const V = Ut(T);
|
|
1747
|
-
switch (
|
|
1747
|
+
switch (L) {
|
|
1748
1748
|
case "km":
|
|
1749
1749
|
return V > 1e4 ? Math.round(V / 1e6 * 100) / 100 + " km<sup>2</sup>" : Math.round(V * 100) / 100 + " m<sup>2</sup>";
|
|
1750
1750
|
case "nm":
|
|
1751
1751
|
return V > 1e4 ? Math.round(V / 1e6 / Math.pow(1.852, 2) * 100) / 100 + " nm<sup>2</sup>" : Math.round(V * 100) / 100 + " m<sup>2</sup>";
|
|
1752
1752
|
}
|
|
1753
1753
|
};
|
|
1754
|
-
let u,
|
|
1755
|
-
const
|
|
1756
|
-
u != null && u.parentNode && u.parentNode.removeChild(u), u = document.createElement("div"), u.style.display = "flex", u.className = "ol-tooltip ol-tooltip-draw-polygon",
|
|
1754
|
+
let u, m;
|
|
1755
|
+
const C = () => {
|
|
1756
|
+
u != null && u.parentNode && u.parentNode.removeChild(u), u = document.createElement("div"), u.style.display = "flex", u.className = "ol-tooltip ol-tooltip-draw-polygon", m = new Ee({
|
|
1757
1757
|
element: u,
|
|
1758
1758
|
offset: [0, -15],
|
|
1759
1759
|
positioning: "bottom-center",
|
|
1760
1760
|
stopEvent: !1,
|
|
1761
1761
|
insertFirst: !1
|
|
1762
|
-
}), e == null || e.addOverlay(
|
|
1762
|
+
}), e == null || e.addOverlay(m);
|
|
1763
1763
|
};
|
|
1764
|
-
let
|
|
1764
|
+
let y, R;
|
|
1765
1765
|
const j = () => {
|
|
1766
|
-
|
|
1766
|
+
y != null && y.parentNode && y.parentNode.removeChild(y), y = document.createElement("div"), y.className = "ol-tooltip ol-help-tooltip", y.addEventListener("click", (T) => {
|
|
1767
1767
|
T.preventDefault(), T.stopPropagation();
|
|
1768
1768
|
}), R = new Ee({
|
|
1769
|
-
element:
|
|
1769
|
+
element: y,
|
|
1770
1770
|
offset: [15, 0],
|
|
1771
1771
|
positioning: "center-left"
|
|
1772
1772
|
}), e == null || e.addOverlay(R);
|
|
1773
|
-
},
|
|
1773
|
+
}, A = () => {
|
|
1774
1774
|
o = null, i();
|
|
1775
1775
|
}, K = () => {
|
|
1776
|
-
a = "close", e.un("pointermove",
|
|
1777
|
-
|
|
1778
|
-
}),
|
|
1776
|
+
a = "close", e.un("pointermove", n), t = null, g && (g.abortDrawing(), console.log("abortDrawing"), g.setActive(!1), (e == null ? void 0 : e.getInteractions()).forEach((L) => {
|
|
1777
|
+
L instanceof je && (L.setActive(!1), e == null || e.removeInteraction(L));
|
|
1778
|
+
}), g = null), l && ot(l), l = void 0, p == null || p.clear(), p = null, w && e.getAllLayers().includes(w) && (e.removeLayer(w), w = null), y != null && y.parentElement && (y.innerHTML = "", y.parentElement.removeChild(y), y = null), u != null && u.parentElement && (u.innerHTML = "", u.parentElement.removeChild(u), u = null), R && e.removeOverlay(R), m && e.removeOverlay(m), be(e, "grab");
|
|
1779
1779
|
};
|
|
1780
1780
|
return {
|
|
1781
1781
|
open: i,
|
|
1782
1782
|
close: K,
|
|
1783
|
-
reset:
|
|
1783
|
+
reset: A,
|
|
1784
1784
|
getState: () => a
|
|
1785
1785
|
};
|
|
1786
1786
|
}, Vo = "zh-map-port-layer", zo = (e) => {
|
|
@@ -1790,50 +1790,50 @@ const xt = (e, r) => {
|
|
|
1790
1790
|
zIndex: 100,
|
|
1791
1791
|
updateWhileInteracting: !0,
|
|
1792
1792
|
updateWhileAnimating: !0,
|
|
1793
|
-
properties: { layerType:
|
|
1793
|
+
properties: { layerType: re.PORT }
|
|
1794
1794
|
});
|
|
1795
1795
|
e == null || e.addLayer(o);
|
|
1796
1796
|
let l = null, a = null;
|
|
1797
|
-
const i = (u,
|
|
1797
|
+
const i = (u, m = !0) => {
|
|
1798
1798
|
if (!u || u.length === 0) return;
|
|
1799
1799
|
if (r.clear(), a) {
|
|
1800
|
-
const
|
|
1801
|
-
|
|
1800
|
+
const y = u.find((R) => R.id === (a == null ? void 0 : a.id));
|
|
1801
|
+
y ? a = y : u.push(a);
|
|
1802
1802
|
}
|
|
1803
|
-
const
|
|
1804
|
-
u.forEach((
|
|
1805
|
-
const [R, j] =
|
|
1806
|
-
geometry: new
|
|
1807
|
-
portData:
|
|
1808
|
-
id:
|
|
1809
|
-
select:
|
|
1810
|
-
showTitle:
|
|
1811
|
-
}), K =
|
|
1812
|
-
|
|
1813
|
-
}), r.addFeatures(
|
|
1803
|
+
const C = [];
|
|
1804
|
+
u.forEach((y) => {
|
|
1805
|
+
const [R, j] = y.latLon.split(","), A = new de({
|
|
1806
|
+
geometry: new ie(fe([Number(R), Number(j)])),
|
|
1807
|
+
portData: y,
|
|
1808
|
+
id: y.id,
|
|
1809
|
+
select: y.id === (a == null ? void 0 : a.id),
|
|
1810
|
+
showTitle: y.id === (a == null ? void 0 : a.id) || m
|
|
1811
|
+
}), K = t(A);
|
|
1812
|
+
A.setStyle(K), C.push(A);
|
|
1813
|
+
}), r.addFeatures(C);
|
|
1814
1814
|
};
|
|
1815
|
-
let s = null,
|
|
1816
|
-
const p = /* @__PURE__ */ new Map(),
|
|
1817
|
-
s || (s = document.createElement("canvas"),
|
|
1815
|
+
let s = null, w = null;
|
|
1816
|
+
const p = /* @__PURE__ */ new Map(), b = (u, m) => {
|
|
1817
|
+
s || (s = document.createElement("canvas"), w = s.getContext("2d", {
|
|
1818
1818
|
willReadFrequently: !0
|
|
1819
1819
|
}));
|
|
1820
|
-
const
|
|
1821
|
-
if (p.has(
|
|
1822
|
-
return p.get(
|
|
1823
|
-
const
|
|
1820
|
+
const C = `${u}-${m}`;
|
|
1821
|
+
if (p.has(C))
|
|
1822
|
+
return p.get(C);
|
|
1823
|
+
const y = s, R = w;
|
|
1824
1824
|
if (!R) return "";
|
|
1825
|
-
|
|
1826
|
-
const j = 2,
|
|
1825
|
+
y.width = 0, y.height = 0;
|
|
1826
|
+
const j = 2, A = 8, K = window.devicePixelRatio || 1, I = "12px sans-serif";
|
|
1827
1827
|
R.font = I;
|
|
1828
|
-
const
|
|
1829
|
-
|
|
1830
|
-
const
|
|
1831
|
-
R.strokeStyle =
|
|
1832
|
-
const W =
|
|
1833
|
-
return p.set(
|
|
1834
|
-
},
|
|
1835
|
-
const { select:
|
|
1836
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M22.6563 44.9304C22.5453 44.8844 22.4445 44.817 22.3595 44.7321C22.3595 44.7321 9.36986 31.7424 9.32952 31.6913C7.09059 29.0791 5.64794 25.8802 5.17255 22.4736C4.69716 19.0671 5.20896 15.5957 6.64728 12.471C8.08561 9.34625 10.3902 6.69909 13.2878 4.84325C16.1855 2.98741 19.5548 2.00068 22.9965 2C26.4381 1.99932 29.8078 2.98473 32.7062 4.83943C35.6046 6.69414 37.9102 9.34039 39.3498 12.4646C40.7893 15.5888 41.3025 19.0599 40.8284 22.4666C40.3544 25.8734 38.913 29.0729 36.6751 31.686C36.6401 31.737 23.6531 44.7321 23.6531 44.7321C23.5682 44.817 23.4674 44.8844 23.3564 44.9304C23.2454 44.9763 23.1265 45 23.0063 45C22.8862 45 22.7673 44.9763 22.6563 44.9304Z" fill="${
|
|
1828
|
+
const L = R.measureText(u).width, V = A + L + A, X = j + 12 + j * 2;
|
|
1829
|
+
y.width = Math.round(V * K), y.height = Math.round(X * K), R.scale(K, K), R.clearRect(0, 0, V, X), R.fillStyle = m ? "#F32D2D" : "#FFF", R.beginPath(), R.roundRect(0, 0, V, X, 4), R.fill(), R.font = I, R.textBaseline = "middle";
|
|
1830
|
+
const Z = X / 2;
|
|
1831
|
+
R.strokeStyle = m ? "#000" : "#ffffff", R.lineWidth = 1, R.strokeText(u, A, Z), R.fillStyle = m ? "#FFF" : "#000000", R.fillText(u, A, Z);
|
|
1832
|
+
const W = y.toDataURL("image/png");
|
|
1833
|
+
return p.set(C, W), W;
|
|
1834
|
+
}, t = (u) => {
|
|
1835
|
+
const { select: m, showTitle: C } = u.getProperties(), y = (L) => `<svg width="46" height="46" viewBox="0 0 46 46" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
1836
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M22.6563 44.9304C22.5453 44.8844 22.4445 44.817 22.3595 44.7321C22.3595 44.7321 9.36986 31.7424 9.32952 31.6913C7.09059 29.0791 5.64794 25.8802 5.17255 22.4736C4.69716 19.0671 5.20896 15.5957 6.64728 12.471C8.08561 9.34625 10.3902 6.69909 13.2878 4.84325C16.1855 2.98741 19.5548 2.00068 22.9965 2C26.4381 1.99932 29.8078 2.98473 32.7062 4.83943C35.6046 6.69414 37.9102 9.34039 39.3498 12.4646C40.7893 15.5888 41.3025 19.0599 40.8284 22.4666C40.3544 25.8734 38.913 29.0729 36.6751 31.686C36.6401 31.737 23.6531 44.7321 23.6531 44.7321C23.5682 44.817 23.4674 44.8844 23.3564 44.9304C23.2454 44.9763 23.1265 45 23.0063 45C22.8862 45 22.7673 44.9763 22.6563 44.9304Z" fill="${L}"/>
|
|
1837
1837
|
<g clip-path="url(#clip0_10059_122082)">
|
|
1838
1838
|
<path d="M34.8624 22.8687L32.5874 25.6313L33.4812 25.7125C33.4812 25.7125 30.5562 28.0687 27.9562 28.2312C25.3562 28.3937 24.1374 24.9 24.1374 24.9V19.1312H27.6312V17.425H24.2999V15.15C25.7624 14.6625 26.7374 13.2812 26.7374 11.6562C26.7374 9.625 25.1124 8 23.0812 8H22.9999C20.9687 8 19.3437 9.625 19.3437 11.6562C19.3437 13.2812 20.3999 14.6625 21.7812 15.15V17.425H18.4499V19.1312H21.9437V24.9C21.9437 24.9 20.6437 28.3125 18.0437 28.2312C15.4437 28.0687 12.5187 25.7125 12.5187 25.7125L13.4124 25.6313L11.0562 22.8687L10.2437 26.2812L11.2187 26.0375C11.2187 26.0375 13.1687 29.5313 16.1749 30.8313C19.1812 32.2125 22.1874 33.9187 22.8374 34C23.4874 33.9187 26.4937 32.2125 29.4187 30.8313C32.3437 29.45 34.3749 26.0375 34.3749 26.0375L35.3499 26.2812L34.8624 22.8687ZM23.0812 13.6875C21.9437 13.6875 21.0499 12.7937 21.0499 11.6562C21.0499 10.6 21.9437 9.70625 22.9999 9.70625H23.0812C24.1374 9.70625 25.0312 10.6 25.0312 11.6562C25.1124 12.7937 24.1374 13.6875 23.0812 13.6875Z" fill="white"/>
|
|
1839
1839
|
</g>
|
|
@@ -1843,22 +1843,22 @@ const xt = (e, r) => {
|
|
|
1843
1843
|
</clipPath>
|
|
1844
1844
|
</defs>
|
|
1845
1845
|
</svg>
|
|
1846
|
-
`, R = () => `data:image/svg+xml;utf8,${encodeURIComponent(
|
|
1846
|
+
`, R = () => `data:image/svg+xml;utf8,${encodeURIComponent(y(m ? "#F32D2D" : "#3370FF"))}`, j = e.getView().getZoom(), A = u.get("portData"), K = window.devicePixelRatio || 1, I = new ee({
|
|
1847
1847
|
image: new Pe({
|
|
1848
1848
|
src: R(),
|
|
1849
1849
|
scale: 0.5 * j / 10
|
|
1850
1850
|
}),
|
|
1851
|
-
zIndex:
|
|
1851
|
+
zIndex: m ? 110 : 100
|
|
1852
1852
|
}), T = new ee({
|
|
1853
1853
|
image: new Pe({
|
|
1854
|
-
src:
|
|
1854
|
+
src: b(A.shortName, m),
|
|
1855
1855
|
anchor: [0.5, 0.5],
|
|
1856
1856
|
displacement: [0, -30],
|
|
1857
1857
|
scale: 1 / K,
|
|
1858
1858
|
anchorXUnits: "fraction",
|
|
1859
1859
|
anchorYUnits: "fraction"
|
|
1860
1860
|
}),
|
|
1861
|
-
zIndex:
|
|
1861
|
+
zIndex: m ? 110 : 100
|
|
1862
1862
|
// text: new Text({
|
|
1863
1863
|
// text: port.shortName,
|
|
1864
1864
|
// font: '12px sans-serif',
|
|
@@ -1871,168 +1871,167 @@ const xt = (e, r) => {
|
|
|
1871
1871
|
// offsetY: 30,
|
|
1872
1872
|
// }),
|
|
1873
1873
|
});
|
|
1874
|
-
return !
|
|
1875
|
-
},
|
|
1874
|
+
return !C && !m ? I : [I, T];
|
|
1875
|
+
}, n = () => {
|
|
1876
1876
|
if (r)
|
|
1877
1877
|
if (l) {
|
|
1878
1878
|
console.log("清除非选中的港口");
|
|
1879
1879
|
const u = l.get("portData").id;
|
|
1880
|
-
r.getFeatures().forEach((
|
|
1881
|
-
|
|
1880
|
+
r.getFeatures().forEach((m) => {
|
|
1881
|
+
m.get("portData").id !== u && r.removeFeature(m);
|
|
1882
1882
|
});
|
|
1883
1883
|
} else
|
|
1884
1884
|
console.log("清除所有港口", r), r == null || r.clear();
|
|
1885
|
-
},
|
|
1885
|
+
}, g = (u) => {
|
|
1886
1886
|
if (r) {
|
|
1887
1887
|
if (!u)
|
|
1888
|
-
return
|
|
1889
|
-
(l == null ? void 0 : l.get("portData").id) !== u.id && (
|
|
1888
|
+
return M();
|
|
1889
|
+
(l == null ? void 0 : l.get("portData").id) !== u.id && (M(), x(u));
|
|
1890
1890
|
}
|
|
1891
|
-
},
|
|
1891
|
+
}, M = () => {
|
|
1892
1892
|
var u;
|
|
1893
1893
|
if (l) {
|
|
1894
|
-
const
|
|
1895
|
-
|
|
1894
|
+
const m = l == null ? void 0 : l.get("portData"), C = (u = r.getFeatures()) == null ? void 0 : u.find((y) => y.get("portData").id === m.id);
|
|
1895
|
+
C && (C.set("select", !1), C.setStyle(t(C)), l = null, a = null);
|
|
1896
1896
|
}
|
|
1897
|
-
},
|
|
1897
|
+
}, x = (u) => {
|
|
1898
1898
|
if (!r) return;
|
|
1899
|
-
const
|
|
1900
|
-
a = u, l =
|
|
1899
|
+
const m = r.getFeatures();
|
|
1900
|
+
a = u, l = m.find((C) => C.get("portData").id === u.id), l && (l.set("select", !0), l.setStyle(t(l)));
|
|
1901
1901
|
};
|
|
1902
1902
|
return {
|
|
1903
1903
|
render: i,
|
|
1904
|
-
clear:
|
|
1905
|
-
selected:
|
|
1904
|
+
clear: n,
|
|
1905
|
+
selected: g,
|
|
1906
1906
|
handlePortHover: (u) => {
|
|
1907
1907
|
u && u.get("portData") ? be(e, "pointer") : be(e, "grab");
|
|
1908
1908
|
}
|
|
1909
1909
|
};
|
|
1910
1910
|
}, Oo = (e, r, o, l, a, i, s) => {
|
|
1911
|
-
const
|
|
1912
|
-
|
|
1913
|
-
var
|
|
1911
|
+
const w = e.getInstall();
|
|
1912
|
+
w.on("moveend", () => {
|
|
1913
|
+
var n, g;
|
|
1914
1914
|
try {
|
|
1915
|
-
const
|
|
1916
|
-
(
|
|
1917
|
-
} catch (
|
|
1918
|
-
console.log("moveend---catch",
|
|
1915
|
+
const M = e.getZoom();
|
|
1916
|
+
(g = (n = r.getProps()).mapMoveEnd) == null || g.call(n, M), M >= ae.min && M <= ae.max && o.reRenderTrackLine(), l.changeShipScale("end");
|
|
1917
|
+
} catch (M) {
|
|
1918
|
+
console.log("moveend---catch", M);
|
|
1919
1919
|
}
|
|
1920
1920
|
});
|
|
1921
1921
|
const p = {
|
|
1922
|
-
[
|
|
1923
|
-
[
|
|
1924
|
-
[
|
|
1925
|
-
},
|
|
1926
|
-
switch (
|
|
1927
|
-
case
|
|
1928
|
-
l == null || l.handleShipMapEvent(
|
|
1922
|
+
[re.PORT]: null,
|
|
1923
|
+
[re.SHIP]: null,
|
|
1924
|
+
[re.TRACK]: null
|
|
1925
|
+
}, b = (n, g, M) => {
|
|
1926
|
+
switch (n) {
|
|
1927
|
+
case re.SHIP:
|
|
1928
|
+
l == null || l.handleShipMapEvent(g, "hover");
|
|
1929
1929
|
break;
|
|
1930
|
-
case
|
|
1930
|
+
case re.PORT:
|
|
1931
1931
|
break;
|
|
1932
|
-
case
|
|
1933
|
-
o == null || o.handleTrackMapEvent(
|
|
1932
|
+
case re.TRACK:
|
|
1933
|
+
o == null || o.handleTrackMapEvent(g, "hover", M);
|
|
1934
1934
|
break;
|
|
1935
1935
|
}
|
|
1936
|
-
},
|
|
1937
|
-
switch (
|
|
1938
|
-
case
|
|
1936
|
+
}, t = (n) => {
|
|
1937
|
+
switch (n) {
|
|
1938
|
+
case re.PORT:
|
|
1939
1939
|
break;
|
|
1940
|
-
case
|
|
1940
|
+
case re.SHIP:
|
|
1941
1941
|
l == null || l.handleShipMapEvent(null, "hover");
|
|
1942
1942
|
break;
|
|
1943
|
-
case
|
|
1943
|
+
case re.TRACK:
|
|
1944
1944
|
o == null || o.handleTrackMapEvent(null, "hover");
|
|
1945
1945
|
break;
|
|
1946
1946
|
}
|
|
1947
1947
|
};
|
|
1948
|
-
|
|
1949
|
-
if (s.getState() !== "open" && i.getState() !== "open" && !
|
|
1948
|
+
w.on("pointermove", (n) => {
|
|
1949
|
+
if (s.getState() !== "open" && i.getState() !== "open" && !w.getView().getAnimating())
|
|
1950
1950
|
try {
|
|
1951
|
-
let
|
|
1952
|
-
const
|
|
1953
|
-
|
|
1954
|
-
if (
|
|
1955
|
-
const
|
|
1956
|
-
layerFilter: (
|
|
1951
|
+
let g = !1, M = !1;
|
|
1952
|
+
const x = w.getLayers().getArray().filter((P) => P.get("layerType"));
|
|
1953
|
+
x && x.length > 0 && x.forEach((P) => {
|
|
1954
|
+
if (M) return;
|
|
1955
|
+
const u = w == null ? void 0 : w.getEventPixel(n.originalEvent), m = P == null ? void 0 : P.get("layerType"), C = w == null ? void 0 : w.forEachFeatureAtPixel(u, (y) => y, {
|
|
1956
|
+
layerFilter: (y) => y === P,
|
|
1957
1957
|
// 严格图层过滤
|
|
1958
1958
|
hitTolerance: 5
|
|
1959
1959
|
});
|
|
1960
|
-
|
|
1961
|
-
});
|
|
1962
|
-
} catch (
|
|
1963
|
-
console.log("pointermove----",
|
|
1960
|
+
C !== p[m] && (p[m] && t(m, p[m]), p[m] = C, C && (b(m, C, n), M = !0)), C && (g = !0);
|
|
1961
|
+
}), g ? be(w, "pointer") : be(w, "grab");
|
|
1962
|
+
} catch (g) {
|
|
1963
|
+
console.log("pointermove----", g);
|
|
1964
1964
|
}
|
|
1965
|
-
}),
|
|
1965
|
+
}), w.on("movestart", () => {
|
|
1966
1966
|
try {
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
console.log("movestart---catch", w);
|
|
1967
|
+
l.changeShipScale("start");
|
|
1968
|
+
} catch (n) {
|
|
1969
|
+
console.log("movestart---catch", n);
|
|
1971
1970
|
}
|
|
1972
|
-
}),
|
|
1973
|
-
if (s.getState() !== "open" && i.getState() !== "open" && !
|
|
1971
|
+
}), w.on("click", kt((n) => {
|
|
1972
|
+
if (s.getState() !== "open" && i.getState() !== "open" && !w.getView().getAnimating())
|
|
1974
1973
|
try {
|
|
1975
|
-
let
|
|
1976
|
-
const
|
|
1977
|
-
|
|
1978
|
-
var
|
|
1979
|
-
if (
|
|
1980
|
-
const
|
|
1974
|
+
let g = !1;
|
|
1975
|
+
const M = w.getLayers().getArray().filter((x) => x.get("layerType"));
|
|
1976
|
+
M && M.length > 0 && M.forEach((x) => {
|
|
1977
|
+
var m, C, y;
|
|
1978
|
+
if (g) return;
|
|
1979
|
+
const P = w == null ? void 0 : w.getEventPixel(n.originalEvent), u = w == null ? void 0 : w.forEachFeatureAtPixel(P, (R) => {
|
|
1981
1980
|
if (R.get("shipData") || R.get("portData"))
|
|
1982
1981
|
return R;
|
|
1983
1982
|
}, {
|
|
1984
|
-
layerFilter: (R) => R ===
|
|
1983
|
+
layerFilter: (R) => R === x,
|
|
1985
1984
|
// 严格图层过滤
|
|
1986
1985
|
hitTolerance: 10
|
|
1987
1986
|
});
|
|
1988
1987
|
if (u) {
|
|
1989
1988
|
if (u != null && u.get("shipData"))
|
|
1990
|
-
console.log("trackManager.getTrackStatus()---", o.getTrackStatus()), o.getTrackStatus() || l.handleShipMapEvent(u, "click", (
|
|
1989
|
+
console.log("trackManager.getTrackStatus()---", o.getTrackStatus()), o.getTrackStatus() || l.handleShipMapEvent(u, "click", (m = r.getProps()) == null ? void 0 : m.selectShip);
|
|
1991
1990
|
else if (u != null && u.get("portData")) {
|
|
1992
1991
|
const R = u == null ? void 0 : u.get("portData");
|
|
1993
|
-
a.selected(R), (
|
|
1992
|
+
a.selected(R), (y = (C = r.getProps()) == null ? void 0 : C.selectPort) == null || y.call(C, R);
|
|
1994
1993
|
}
|
|
1995
|
-
|
|
1994
|
+
g = !0, n.preventDefault(), n.stopPropagation();
|
|
1996
1995
|
}
|
|
1997
1996
|
});
|
|
1998
|
-
} catch (
|
|
1999
|
-
console.log("pointermove----",
|
|
1997
|
+
} catch (g) {
|
|
1998
|
+
console.log("pointermove----", g);
|
|
2000
1999
|
}
|
|
2001
2000
|
}, 150));
|
|
2002
|
-
},
|
|
2003
|
-
const e =
|
|
2001
|
+
}, Do = () => {
|
|
2002
|
+
const e = At([]);
|
|
2004
2003
|
return {
|
|
2005
2004
|
createInstance: (l, a) => {
|
|
2006
2005
|
const i = ao();
|
|
2007
2006
|
i.initMap(l, a);
|
|
2008
|
-
const s = i.getInstall(),
|
|
2009
|
-
p.setProps(a),
|
|
2010
|
-
const
|
|
2011
|
-
Oo(i, p,
|
|
2007
|
+
const s = i.getInstall(), w = Eo(s), p = Po();
|
|
2008
|
+
p.setProps(a), w.setShowLayerType(a.layerType), w.setGreenTileVisible(a.showGreenLayer);
|
|
2009
|
+
const b = vo(s), t = mo(s, b), n = To(s), g = Fo(s), M = Ro(s, p), x = $o(s, p), P = zo(s);
|
|
2010
|
+
Oo(i, p, b, n, P, M, x);
|
|
2012
2011
|
const u = () => {
|
|
2013
|
-
const
|
|
2014
|
-
return [
|
|
2015
|
-
},
|
|
2012
|
+
const C = s.getView().calculateExtent(i.getSize()), y = Ze([C[0], C[1]], le.mercator, le.data), R = Ze([C[2], C[3]], le.mercator, le.data);
|
|
2013
|
+
return [y[0], y[1], R[0], R[1]];
|
|
2014
|
+
}, m = {
|
|
2016
2015
|
id: Symbol("map-instance"),
|
|
2017
2016
|
innerMap: null,
|
|
2018
2017
|
map: i.getInstall(),
|
|
2019
2018
|
destroy: () => {
|
|
2020
|
-
e.splice(e.indexOf(
|
|
2019
|
+
e.splice(e.indexOf(m), 1);
|
|
2021
2020
|
},
|
|
2022
2021
|
methods: {
|
|
2023
2022
|
...i,
|
|
2024
|
-
layer:
|
|
2025
|
-
ship:
|
|
2026
|
-
track:
|
|
2027
|
-
carTrack:
|
|
2023
|
+
layer: w,
|
|
2024
|
+
ship: n,
|
|
2025
|
+
track: b,
|
|
2026
|
+
carTrack: t,
|
|
2028
2027
|
port: {
|
|
2029
|
-
render:
|
|
2030
|
-
clear:
|
|
2031
|
-
selected:
|
|
2028
|
+
render: P.render,
|
|
2029
|
+
clear: P.clear,
|
|
2030
|
+
selected: P.selected
|
|
2032
2031
|
},
|
|
2033
|
-
position:
|
|
2034
|
-
drawLine:
|
|
2035
|
-
drawPolygon:
|
|
2032
|
+
position: g,
|
|
2033
|
+
drawLine: M,
|
|
2034
|
+
drawPolygon: x,
|
|
2036
2035
|
// 子模块
|
|
2037
2036
|
utils: {
|
|
2038
2037
|
getCalculateExtent: u,
|
|
@@ -2041,7 +2040,7 @@ const xt = (e, r) => {
|
|
|
2041
2040
|
}
|
|
2042
2041
|
}
|
|
2043
2042
|
};
|
|
2044
|
-
return e.push(
|
|
2043
|
+
return e.push(m), m;
|
|
2045
2044
|
},
|
|
2046
2045
|
destroyInstance: (l) => {
|
|
2047
2046
|
const a = e.findIndex((i) => i.id === l);
|
|
@@ -2052,10 +2051,10 @@ const xt = (e, r) => {
|
|
|
2052
2051
|
},
|
|
2053
2052
|
getAllInstances: () => [...e]
|
|
2054
2053
|
};
|
|
2055
|
-
},
|
|
2054
|
+
}, Zo = { class: "zh-map-box" }, Ao = /* @__PURE__ */ nt({
|
|
2056
2055
|
__name: "Map",
|
|
2057
2056
|
props: {
|
|
2058
|
-
zoom: { default:
|
|
2057
|
+
zoom: { default: ae.default },
|
|
2059
2058
|
center: { default: co },
|
|
2060
2059
|
layerType: { default: "vector" },
|
|
2061
2060
|
showGreenLayer: { type: Boolean, default: !1 },
|
|
@@ -2078,14 +2077,22 @@ const xt = (e, r) => {
|
|
|
2078
2077
|
});
|
|
2079
2078
|
}
|
|
2080
2079
|
o();
|
|
2081
|
-
const l = ge(), a = ge(), i =
|
|
2080
|
+
const l = ge(), a = ge(), i = Do(), s = ge(), w = e, p = ge({
|
|
2082
2081
|
getInstall() {
|
|
2083
2082
|
}
|
|
2084
2083
|
});
|
|
2085
|
-
|
|
2084
|
+
Wt(() => {
|
|
2086
2085
|
var t;
|
|
2087
|
-
s.value = i.createInstance(l.value,
|
|
2088
|
-
|
|
2086
|
+
s.value = i.createInstance(l.value, w), p.value = s.value.methods, (t = a.value) == null || t.setScaleLine(s.value.map, w.scaleLineUnit), window.addEventListener("nativeDoubleTap", function() {
|
|
2087
|
+
b();
|
|
2088
|
+
});
|
|
2089
|
+
});
|
|
2090
|
+
function b() {
|
|
2091
|
+
var n, g;
|
|
2092
|
+
let t = (n = s.value) == null ? void 0 : n.methods.getZoom();
|
|
2093
|
+
(g = s.value) == null || g.methods.setZoom(t + 1);
|
|
2094
|
+
}
|
|
2095
|
+
return Gt(() => {
|
|
2089
2096
|
var t, n;
|
|
2090
2097
|
i.destroyInstance((t = s == null ? void 0 : s.value) == null ? void 0 : t.id), (n = s.value) == null || n.destroy();
|
|
2091
2098
|
}), r({
|
|
@@ -2106,16 +2113,16 @@ const xt = (e, r) => {
|
|
|
2106
2113
|
return (t = s.value) == null ? void 0 : t.methods.getView();
|
|
2107
2114
|
},
|
|
2108
2115
|
setCenter: (t, n) => {
|
|
2109
|
-
var
|
|
2110
|
-
return (
|
|
2116
|
+
var g;
|
|
2117
|
+
return (g = s.value) == null ? void 0 : g.methods.setCenter(t, n);
|
|
2111
2118
|
},
|
|
2112
2119
|
getSize: () => {
|
|
2113
2120
|
var t;
|
|
2114
2121
|
return (t = s.value) == null ? void 0 : t.methods.getSize();
|
|
2115
2122
|
},
|
|
2116
2123
|
getCenter: (t, n) => {
|
|
2117
|
-
var
|
|
2118
|
-
return (
|
|
2124
|
+
var g;
|
|
2125
|
+
return (g = s.value) == null ? void 0 : g.methods.getCenter();
|
|
2119
2126
|
},
|
|
2120
2127
|
layer: {
|
|
2121
2128
|
setGreenTileVisible: (t) => {
|
|
@@ -2215,8 +2222,8 @@ const xt = (e, r) => {
|
|
|
2215
2222
|
},
|
|
2216
2223
|
port: {
|
|
2217
2224
|
render: (t, n) => {
|
|
2218
|
-
var
|
|
2219
|
-
return (
|
|
2225
|
+
var g;
|
|
2226
|
+
return (g = s.value) == null ? void 0 : g.methods.port.render(t, n);
|
|
2220
2227
|
},
|
|
2221
2228
|
clear: () => {
|
|
2222
2229
|
var t;
|
|
@@ -2292,11 +2299,11 @@ const xt = (e, r) => {
|
|
|
2292
2299
|
return (n = s.value) == null ? void 0 : n.methods.utils.convertSixHundredThousandToLatLng(...t);
|
|
2293
2300
|
},
|
|
2294
2301
|
calculateCirclePoints: (t, n) => {
|
|
2295
|
-
var
|
|
2296
|
-
return (
|
|
2302
|
+
var g;
|
|
2303
|
+
return (g = s.value) == null ? void 0 : g.methods.utils.calculateCirclePoints(t, n);
|
|
2297
2304
|
}
|
|
2298
2305
|
}
|
|
2299
|
-
}), (t, n) => (rt(), lt("div",
|
|
2306
|
+
}), (t, n) => (rt(), lt("div", Zo, [
|
|
2300
2307
|
et("div", {
|
|
2301
2308
|
id: "map",
|
|
2302
2309
|
ref_key: "zhMapRef",
|
|
@@ -2313,7 +2320,7 @@ const xt = (e, r) => {
|
|
|
2313
2320
|
}, null, 8, ["map-instance"])
|
|
2314
2321
|
]));
|
|
2315
2322
|
}
|
|
2316
|
-
}), Wo = /* @__PURE__ */ ct(
|
|
2323
|
+
}), Wo = /* @__PURE__ */ ct(Ao, [["__scopeId", "data-v-79736a19"]]), Xo = to(Wo);
|
|
2317
2324
|
export {
|
|
2318
2325
|
Xo as Z
|
|
2319
2326
|
};
|