zhihao-ui 1.3.55 → 1.3.57
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/{BaseInfo-Bz9HbxrR.js → BaseInfo-ehtLJvVF.js} +1 -1
- package/dist/es/{BaseItem-YGnpIugn.js → BaseItem-6LMSv4Je.js} +3 -3
- package/dist/es/{Button-DSjKm2wO.js → Button-DlEYWX3X.js} +2 -2
- package/dist/es/CascaderLoadMore-DKTvm00E.js +287 -0
- package/dist/es/DatePicker-CymT2gjS.js +63 -0
- package/dist/es/{DetailHeader-lzEy7t5Y.js → DetailHeader-DlAjiYhV.js} +3 -3
- package/dist/es/{DetailSubTitle-DfqGXyKI.js → DetailSubTitle-OH6TMyKI.js} +2 -2
- package/dist/es/{Dialog-MVXB7s2S.js → Dialog-B_Psb_wh.js} +3 -3
- package/dist/es/{DiyDataTable-Yp1HvbS1.js → DiyDataTable-DRuRQedj.js} +33 -33
- package/dist/es/{EditInfoPair-BXF1tV3S.js → EditInfoPair-B3TKNnnl.js} +3 -3
- package/dist/es/{FileWrapper-CqbiXynu.js → FileWrapper-bVyPV48o.js} +4 -4
- package/dist/es/{Grid-CDS9IrCA.js → Grid-CLU3cdzX.js} +2 -2
- package/dist/es/{InfoPair-jRjF91Ro.js → InfoPair-nPqi45Ys.js} +3 -3
- package/dist/es/Input-DjQtffZg.js +91 -0
- package/dist/es/{Loading-C9Te67Gr.js → Loading-CDxuHkdt.js} +2 -2
- package/dist/es/{Map-BoN5eeEB.js → Map-CmcmvvxF.js} +945 -908
- package/dist/es/{MessageBox-BzwToZ0E.js → MessageBox-kkpNeAii.js} +2 -2
- package/dist/es/{MoneyInput-oY4Jr4Du.js → MoneyInput-ZLGQmpLk.js} +5 -5
- package/dist/es/{PageHeadPanel-oLoxYR29.js → PageHeadPanel-DsEeXTgj.js} +2 -2
- package/dist/es/{Table-BU_pHf2Y.js → Table-gFH87j_O.js} +6 -6
- package/dist/es/{ToolTips-H93PrmYL.js → ToolTips-BRjrysPf.js} +3 -3
- package/dist/es/index.js +23 -23
- package/dist/es/{utils-DRDkj6ga.js → utils-B-n1yx0L.js} +3 -3
- package/dist/es/{vendor-CxcudVpO.js → vendor-DkGhDRdQ.js} +51 -50
- package/dist/index.css +1 -1
- package/dist/types/components/CascaderLoadMore/CascaderLoadMore.vue.d.ts +0 -3
- package/dist/types/components/CascaderLoadMore/index.d.ts +0 -6
- package/dist/types/components/DatePicker/DatePicker.vue.d.ts +2 -0
- package/dist/types/components/DatePicker/index.d.ts +9 -0
- package/dist/types/components/DiyDataTable/DiyDataTable.vue.d.ts +1 -0
- package/dist/types/components/DiyDataTable/index.d.ts +3 -0
- package/dist/types/components/DiyDataTable/type.d.ts +2 -0
- package/dist/types/components/InputNumber/InputNumber.vue.d.ts +2 -0
- package/dist/types/components/InputNumber/index.d.ts +5 -0
- package/dist/types/components/Map/Map.vue.d.ts +2 -0
- package/dist/types/components/Map/function/position.d.ts +5 -0
- package/dist/types/components/Map/index.d.ts +6 -0
- package/dist/umd/index.css +1 -1
- package/dist/umd/index.umd.cjs +33 -33
- package/package.json +1 -1
- package/dist/es/CascaderLoadMore-BwYi7PBx.js +0 -287
- package/dist/es/DatePicker-BkKUo2v1.js +0 -57
- package/dist/es/Input-CJadFglX.js +0 -88
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { defineComponent as nt, openBlock as rt, createElementBlock as lt, createElementVNode as et, ref as
|
|
2
|
-
import { S as
|
|
3
|
-
import { _ as ct } from "./Button-
|
|
4
|
-
import { w as to } from "./utils-
|
|
1
|
+
import { defineComponent as nt, openBlock as rt, createElementBlock as lt, createElementVNode as et, ref as fe, computed as Be, h as me, createVNode as tt, render as At, reactive as Zt, onMounted as Wt, onUnmounted as Gt } from "vue";
|
|
2
|
+
import { S as Ht, M as ft, T as Re, X as $e, t as ae, V as Yt, u as Bt, 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 xe, P as ie, A as Ae, B as kt, L as qe, G as jt, H as ht, I as ue, J as be, K as ye, N as Ee, Q as Ke, R as Pe, U as Kt, W as _t, Y as Qt, Z as Jt, _ as je, $ as ot, a0 as mt, a1 as Ut, a2 as It, a3 as eo } from "./vendor-DkGhDRdQ.js";
|
|
3
|
+
import { _ as ct } from "./Button-DlEYWX3X.js";
|
|
4
|
+
import { w as to } from "./utils-B-n1yx0L.js";
|
|
5
5
|
const oo = { id: "scale-line-container" }, no = /* @__PURE__ */ nt({
|
|
6
6
|
__name: "scaleLine",
|
|
7
7
|
setup(e, { expose: r }) {
|
|
8
8
|
return r({
|
|
9
|
-
setScaleLine: (l,
|
|
10
|
-
|
|
11
|
-
const
|
|
12
|
-
units:
|
|
9
|
+
setScaleLine: (l, d) => {
|
|
10
|
+
d || (d = "metric");
|
|
11
|
+
const c = new Ht({
|
|
12
|
+
units: d
|
|
13
13
|
}), s = document.getElementById("scale-line-container");
|
|
14
|
-
s && (
|
|
14
|
+
s && (c.setTarget(s), l.addControl(c));
|
|
15
15
|
}
|
|
16
|
-
}), (l,
|
|
16
|
+
}), (l, d) => (rt(), lt("div", oo));
|
|
17
17
|
}
|
|
18
18
|
}), ro = /* @__PURE__ */ ct(no, [["__scopeId", "data-v-2bc5dee8"]]), lo = { class: "zoom" }, so = /* @__PURE__ */ nt({
|
|
19
19
|
__name: "zoomControl",
|
|
@@ -28,17 +28,17 @@ const oo = { id: "scale-line-container" }, no = /* @__PURE__ */ nt({
|
|
|
28
28
|
console.log("props", r);
|
|
29
29
|
const o = () => {
|
|
30
30
|
console.log("props");
|
|
31
|
-
const { setZoom:
|
|
31
|
+
const { setZoom: d, getZoom: c, getInstall: s } = r.mapInstance.methods;
|
|
32
32
|
if (!s()) return;
|
|
33
|
-
const
|
|
34
|
-
|
|
33
|
+
const k = c();
|
|
34
|
+
k && d(k + 1);
|
|
35
35
|
}, l = () => {
|
|
36
|
-
const { setZoom:
|
|
36
|
+
const { setZoom: d, getZoom: c, getInstall: s } = r.mapInstance.methods;
|
|
37
37
|
if (!s()) return;
|
|
38
|
-
const
|
|
39
|
-
|
|
38
|
+
const k = c();
|
|
39
|
+
k && d(k - 1);
|
|
40
40
|
};
|
|
41
|
-
return (
|
|
41
|
+
return (d, c) => (rt(), lt("div", lo, [
|
|
42
42
|
et("div", {
|
|
43
43
|
class: "button big-button",
|
|
44
44
|
onClick: o
|
|
@@ -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", de = {
|
|
53
53
|
// 地图默认层级
|
|
54
54
|
default: 13,
|
|
55
55
|
// 地图缩放最小层级
|
|
@@ -70,95 +70,95 @@ const oo = { id: "scale-line-container" }, no = /* @__PURE__ */ nt({
|
|
|
70
70
|
// 墨卡托投影坐标 渲染坐标
|
|
71
71
|
mercator: "EPSG:3857"
|
|
72
72
|
}, co = [114.84, 30.52], pt = "https://static.zhihaoscm.cn/", _e = 2003750834e-2;
|
|
73
|
-
var
|
|
73
|
+
var Me = ((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))(Me || {}), 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
|
-
const e =
|
|
76
|
-
var
|
|
77
|
-
return (
|
|
78
|
-
},
|
|
75
|
+
const e = fe(), r = () => e.value, o = () => r().getView(), l = () => {
|
|
76
|
+
var f;
|
|
77
|
+
return (f = o()) == null ? void 0 : f.getZoom();
|
|
78
|
+
}, d = (f) => {
|
|
79
79
|
var M;
|
|
80
|
-
(M = o()) == null || M.setZoom(
|
|
81
|
-
},
|
|
82
|
-
var
|
|
83
|
-
(
|
|
80
|
+
(M = o()) == null || M.setZoom(f);
|
|
81
|
+
}, c = (f, M) => {
|
|
82
|
+
var $;
|
|
83
|
+
($ = o()) == null || $.setCenter(ae([f, M]));
|
|
84
84
|
}, s = () => {
|
|
85
85
|
var M;
|
|
86
|
-
const
|
|
87
|
-
return Xt(
|
|
86
|
+
const f = (M = o()) == null ? void 0 : M.getCenter();
|
|
87
|
+
return Xt(f);
|
|
88
88
|
}, w = () => {
|
|
89
|
-
var
|
|
90
|
-
return (
|
|
91
|
-
},
|
|
92
|
-
const
|
|
93
|
-
return M && (
|
|
94
|
-
},
|
|
89
|
+
var f;
|
|
90
|
+
return (f = r()) == null ? void 0 : f.getSize();
|
|
91
|
+
}, k = () => {
|
|
92
|
+
const f = window.navigator.userAgent, M = /iPad|iPhone|iPod/.test(f), $ = /Safari/.test(f) && !/CriOS/.test(f), V = /(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(f);
|
|
93
|
+
return M && ($ || V);
|
|
94
|
+
}, x = new ft(), t = (f, M) => {
|
|
95
95
|
n(M);
|
|
96
|
-
const
|
|
96
|
+
const $ = {
|
|
97
97
|
zoom: M.zoom,
|
|
98
|
-
center:
|
|
99
|
-
minZoom:
|
|
100
|
-
maxZoom:
|
|
98
|
+
center: ae(M.center),
|
|
99
|
+
minZoom: de.min,
|
|
100
|
+
maxZoom: de.max,
|
|
101
101
|
constrainResolution: !0,
|
|
102
102
|
enableRotation: !1,
|
|
103
103
|
multiWorld: !0
|
|
104
104
|
};
|
|
105
|
-
let
|
|
106
|
-
target:
|
|
107
|
-
controls:
|
|
105
|
+
let V = {
|
|
106
|
+
target: f,
|
|
107
|
+
controls: Bt({
|
|
108
108
|
zoom: !1
|
|
109
109
|
}),
|
|
110
110
|
layers: [
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
111
|
+
x.get("vectorTile"),
|
|
112
|
+
x.get("vectorTileMark"),
|
|
113
|
+
x.get("satelliteImgTile"),
|
|
114
|
+
x.get("satelliteImgTileMark")
|
|
115
115
|
],
|
|
116
|
-
view: new
|
|
116
|
+
view: new Yt($)
|
|
117
117
|
};
|
|
118
|
-
const
|
|
119
|
-
if (
|
|
118
|
+
const i = new ft(V);
|
|
119
|
+
if (k()) {
|
|
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 g = new st({
|
|
122
|
+
handleEvent: function(p) {
|
|
123
|
+
if (p.type === "dblclick") {
|
|
124
|
+
console.log("IOS Browser---dblclick"), p.originalEvent.preventDefault();
|
|
125
|
+
const h = i.getView(), C = h.getZoom();
|
|
126
|
+
return h.setZoom(C + 1), !1;
|
|
127
127
|
}
|
|
128
128
|
return !0;
|
|
129
129
|
}
|
|
130
130
|
});
|
|
131
|
-
|
|
131
|
+
i.addInteraction(g);
|
|
132
132
|
}
|
|
133
|
-
e.value =
|
|
134
|
-
}, n = (
|
|
135
|
-
|
|
136
|
-
source: new $e({ url:
|
|
137
|
-
visible:
|
|
133
|
+
e.value = i;
|
|
134
|
+
}, n = (f) => {
|
|
135
|
+
x.set("vectorTile", new Re({
|
|
136
|
+
source: new $e({ url: Me.vectorTile }),
|
|
137
|
+
visible: f.layerType === "vector",
|
|
138
138
|
zIndex: 0,
|
|
139
139
|
preload: 1,
|
|
140
140
|
className: "vector"
|
|
141
|
-
})),
|
|
142
|
-
source: new $e({ url:
|
|
143
|
-
visible:
|
|
141
|
+
})), x.set("vectorTileMark", new Re({
|
|
142
|
+
source: new $e({ url: Me.vectorTileMark }),
|
|
143
|
+
visible: f.layerType === "vector",
|
|
144
144
|
zIndex: 1,
|
|
145
145
|
preload: 1,
|
|
146
146
|
className: "vector"
|
|
147
|
-
})),
|
|
148
|
-
source: new $e({ url:
|
|
149
|
-
visible:
|
|
147
|
+
})), x.set("satelliteImgTile", new Re({
|
|
148
|
+
source: new $e({ url: Me.satelliteImgTile }),
|
|
149
|
+
visible: f.layerType === "satellite",
|
|
150
150
|
zIndex: 0,
|
|
151
151
|
preload: 1,
|
|
152
152
|
className: "satellite"
|
|
153
|
-
})),
|
|
154
|
-
source: new $e({ url:
|
|
155
|
-
visible:
|
|
153
|
+
})), x.set("satelliteImgTileMark", new Re({
|
|
154
|
+
source: new $e({ url: Me.satelliteImgTileMark }),
|
|
155
|
+
visible: f.layerType === "satellite",
|
|
156
156
|
zIndex: 1,
|
|
157
157
|
preload: 1,
|
|
158
158
|
className: "satellite"
|
|
159
|
-
})),
|
|
160
|
-
source: new $e({ url:
|
|
161
|
-
visible:
|
|
159
|
+
})), x.set("greenMark", new Re({
|
|
160
|
+
source: new $e({ url: Me.greenTile }),
|
|
161
|
+
visible: f.showGreenLayer,
|
|
162
162
|
zIndex: 2,
|
|
163
163
|
className: "greenTile"
|
|
164
164
|
}));
|
|
@@ -167,8 +167,8 @@ function ao() {
|
|
|
167
167
|
getInstall: r,
|
|
168
168
|
getView: o,
|
|
169
169
|
getZoom: l,
|
|
170
|
-
setZoom:
|
|
171
|
-
setCenter:
|
|
170
|
+
setZoom: d,
|
|
171
|
+
setCenter: c,
|
|
172
172
|
getCenter: s,
|
|
173
173
|
getSize: w,
|
|
174
174
|
initMap: t,
|
|
@@ -179,50 +179,50 @@ const at = function(e, r) {
|
|
|
179
179
|
const o = Number(r) / 6e5;
|
|
180
180
|
return [Number(e) / 6e5, o];
|
|
181
181
|
}, uo = (e, r) => {
|
|
182
|
-
const o =
|
|
182
|
+
const o = ae(e), l = r * 1e3, d = [
|
|
183
183
|
o[0] - l,
|
|
184
184
|
o[1] - l,
|
|
185
185
|
o[0] + l,
|
|
186
186
|
o[1] + l
|
|
187
|
-
],
|
|
187
|
+
], c = qt(d, le.mercator, le.data);
|
|
188
188
|
return {
|
|
189
|
-
leftTopPoint: { lng:
|
|
190
|
-
rightTopPoint: { lng:
|
|
191
|
-
rightBottomPoint: { lng:
|
|
192
|
-
leftBottomPoint: { lng:
|
|
189
|
+
leftTopPoint: { lng: c[0], lat: c[3] },
|
|
190
|
+
rightTopPoint: { lng: c[2], lat: c[3] },
|
|
191
|
+
rightBottomPoint: { lng: c[2], lat: c[1] },
|
|
192
|
+
leftBottomPoint: { lng: c[0], lat: c[1] }
|
|
193
193
|
};
|
|
194
194
|
}, go = function(e, r) {
|
|
195
195
|
const l = it(e);
|
|
196
|
-
let
|
|
196
|
+
let d = "";
|
|
197
197
|
switch (console.log(r, ze), r) {
|
|
198
198
|
case ze.M:
|
|
199
|
-
|
|
199
|
+
d = Math.round(l * 100) / 100 + " m";
|
|
200
200
|
break;
|
|
201
201
|
case ze.KM:
|
|
202
|
-
|
|
202
|
+
d = Math.round(l / 1e3 * 100) / 100 + " km";
|
|
203
203
|
break;
|
|
204
204
|
case ze.NM:
|
|
205
|
-
|
|
205
|
+
d = (Math.round(l / 1e3 * 100) / 100 / 1.852).toFixed(2) + " nm";
|
|
206
206
|
break;
|
|
207
207
|
}
|
|
208
|
-
return
|
|
208
|
+
return d;
|
|
209
209
|
};
|
|
210
210
|
function fo(e) {
|
|
211
211
|
const r = e[0] * _e / 180;
|
|
212
212
|
let o = Math.log(Math.tan((90 + e[1]) * Math.PI / 360)) / (Math.PI / 180);
|
|
213
213
|
return o = o * _e / 180, [r, o];
|
|
214
214
|
}
|
|
215
|
-
function
|
|
215
|
+
function Te(e = "") {
|
|
216
216
|
let r = e.replace(/&?/g, "&");
|
|
217
217
|
return r = r.replace(/&#x([0-9a-fA-F]+);?/g, (o, l) => {
|
|
218
|
-
const
|
|
219
|
-
return String.fromCodePoint(
|
|
218
|
+
const d = parseInt(l, 16);
|
|
219
|
+
return String.fromCodePoint(d);
|
|
220
220
|
}), r;
|
|
221
221
|
}
|
|
222
222
|
const vt = (e) => {
|
|
223
223
|
const r = new Ve({
|
|
224
224
|
font: "Normal 14px map-iconfont",
|
|
225
|
-
text:
|
|
225
|
+
text: Te(e),
|
|
226
226
|
fill: new ce({ color: "#fff" }),
|
|
227
227
|
offsetY: -14
|
|
228
228
|
});
|
|
@@ -232,32 +232,32 @@ const vt = (e) => {
|
|
|
232
232
|
});
|
|
233
233
|
}, yt = (e, r = "lonlat") => {
|
|
234
234
|
const o = { lon: 0, lat: 0 }, l = e[0] / _e * 180;
|
|
235
|
-
let
|
|
236
|
-
return
|
|
235
|
+
let d = e[1] / _e * 180;
|
|
236
|
+
return d = 180 / Math.PI * (2 * Math.atan(Math.exp(d * Math.PI / 180)) - Math.PI / 2), o.lon = l, o.lat = d, r === "lonlat" ? o : [l, d];
|
|
237
237
|
}, ho = (e) => {
|
|
238
|
-
const r = bt.duration(e, "minutes"), o = Math.floor(r.asDays()), l = r.hours(),
|
|
239
|
-
let
|
|
240
|
-
return l !== 0 && (
|
|
238
|
+
const r = bt.duration(e, "minutes"), o = Math.floor(r.asDays()), l = r.hours(), d = r.minutes();
|
|
239
|
+
let c = `${String(d).padStart(2, "0")}分`;
|
|
240
|
+
return l !== 0 && (c = `${String(l).padStart(2, "0")}时${c}`), o !== 0 && (c = `${String(o).padStart(2, "0")}天${c}`), c;
|
|
241
241
|
}, mo = (e, r) => {
|
|
242
242
|
let o = null;
|
|
243
243
|
const l = async (t) => {
|
|
244
244
|
if (!e || (console.log("vehicleInfo", t), !(t != null && t.lon && (t != null && t.lat)))) return;
|
|
245
245
|
const n = Math.abs(Number(t.lon)) > 180 ? at(t.lon, t.lat) : [t.lon, t.lat];
|
|
246
|
-
|
|
247
|
-
const
|
|
248
|
-
|
|
249
|
-
},
|
|
250
|
-
const
|
|
251
|
-
o || (o = new
|
|
246
|
+
d(t, ae(n));
|
|
247
|
+
const f = e == null ? void 0 : e.getView(), M = new ie(n);
|
|
248
|
+
f.setCenter(Ae(M.getCoordinates(), le.data, le.mercator));
|
|
249
|
+
}, d = (t, n) => {
|
|
250
|
+
const f = `${pt}map/car-icon.gif`;
|
|
251
|
+
o || (o = new xe({
|
|
252
252
|
element: document.createElement("div"),
|
|
253
253
|
positioning: "center-center",
|
|
254
254
|
stopEvent: !1
|
|
255
255
|
// 允许交互事件穿透
|
|
256
256
|
}), e.addOverlay(o));
|
|
257
257
|
const M = o.getElement();
|
|
258
|
-
M.style.backgroundImage = `url(${
|
|
259
|
-
const
|
|
260
|
-
M.style.transform = `rotate(${
|
|
258
|
+
M.style.backgroundImage = `url(${f})`, M.style.width = "80px", M.style.height = "80px";
|
|
259
|
+
const $ = (t == null ? void 0 : t.drc) || "";
|
|
260
|
+
M.style.transform = `rotate(${$}deg)`, M.style.backgroundSize = "cover", o == null || o.setPosition(n);
|
|
261
261
|
};
|
|
262
262
|
return {
|
|
263
263
|
location: l,
|
|
@@ -265,8 +265,8 @@ const vt = (e) => {
|
|
|
265
265
|
const t = o == null ? void 0 : o.getElement();
|
|
266
266
|
t && (t.innerHTML = "");
|
|
267
267
|
},
|
|
268
|
-
renderTrack: (t, n,
|
|
269
|
-
r.render(t, n,
|
|
268
|
+
renderTrack: (t, n, f) => {
|
|
269
|
+
r.render(t, n, f, "truck", 1e3);
|
|
270
270
|
},
|
|
271
271
|
setCenter: (t) => {
|
|
272
272
|
r.setCenter(t);
|
|
@@ -279,177 +279,177 @@ const vt = (e) => {
|
|
|
279
279
|
}
|
|
280
280
|
};
|
|
281
281
|
};
|
|
282
|
-
var Ct = /* @__PURE__ */ ((e) => (e[e.发动机使用中 = 0] = "发动机使用中", e[e.锚泊 = 1] = "锚泊", e[e.未操作 = 2] = "未操作", e[e.操纵能力受限 = 3] = "操纵能力受限", e[e.吃水受限 = 4] = "吃水受限", e[e.系泊 = 5] = "系泊", e[e.搁浅 = 6] = "搁浅", e[e.从事捕捞 = 7] = "从事捕捞", e[e.航行中 = 8] = "航行中", e[e.留作将来修正导航状态 = 9] = "留作将来修正导航状态", e[e.高速船留用 = 10] = "高速船留用", e[e.机动船尾推作业 = 11] = "机动船尾推作业", e[e.机动船顶推或侧推作业 = 12] = "机动船顶推或侧推作业", e[e.飞翼船留用 = 13] = "飞翼船留用", e[e.现行的 = 14] = "现行的", e[e.未定义 = 15] = "未定义", e))(Ct || {}),
|
|
282
|
+
var Ct = /* @__PURE__ */ ((e) => (e[e.发动机使用中 = 0] = "发动机使用中", e[e.锚泊 = 1] = "锚泊", e[e.未操作 = 2] = "未操作", e[e.操纵能力受限 = 3] = "操纵能力受限", e[e.吃水受限 = 4] = "吃水受限", e[e.系泊 = 5] = "系泊", e[e.搁浅 = 6] = "搁浅", e[e.从事捕捞 = 7] = "从事捕捞", e[e.航行中 = 8] = "航行中", e[e.留作将来修正导航状态 = 9] = "留作将来修正导航状态", e[e.高速船留用 = 10] = "高速船留用", e[e.机动船尾推作业 = 11] = "机动船尾推作业", e[e.机动船顶推或侧推作业 = 12] = "机动船顶推或侧推作业", e[e.飞翼船留用 = 13] = "飞翼船留用", e[e.现行的 = 14] = "现行的", e[e.未定义 = 15] = "未定义", e))(Ct || {}), ge = /* @__PURE__ */ ((e) => (e.left = "left", e.right = "right", e.front = "front", e.up = "up", e.down = "down", e.back = "back", e))(ge || {});
|
|
283
283
|
const vo = (e) => {
|
|
284
284
|
const r = /* @__PURE__ */ new Map(), o = {};
|
|
285
285
|
let l = null;
|
|
286
|
-
const
|
|
287
|
-
let
|
|
288
|
-
const s = document.createElement("div"), w = new
|
|
286
|
+
const d = "--";
|
|
287
|
+
let c = null;
|
|
288
|
+
const s = document.createElement("div"), w = new xe({
|
|
289
289
|
element: s,
|
|
290
290
|
positioning: "top-left",
|
|
291
291
|
className: "track-label-popup"
|
|
292
292
|
});
|
|
293
|
-
let
|
|
294
|
-
const
|
|
295
|
-
var
|
|
296
|
-
for (
|
|
297
|
-
const
|
|
298
|
-
|
|
293
|
+
let k, x, t, n, f, M = !1, $ = Date.now(), V, i = 0, g = null, p = 20;
|
|
294
|
+
const h = 8, C = [], q = (a) => {
|
|
295
|
+
var m;
|
|
296
|
+
for (C.unshift(a); C.length > h; ) {
|
|
297
|
+
const v = C.pop(), b = r.get(v);
|
|
298
|
+
b && ((m = b.getSource()) == null || m.clear(), e == null || e.removeLayer(b), r.delete(v), delete o[v]);
|
|
299
299
|
}
|
|
300
300
|
};
|
|
301
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
|
|
306
|
-
J(l,
|
|
305
|
+
const a = L(l, o[l]);
|
|
306
|
+
J(l, a);
|
|
307
307
|
}
|
|
308
|
-
}, 100), T = () => l && o[l] && r.get(l).getVisible(), L = (
|
|
309
|
-
let
|
|
310
|
-
const
|
|
311
|
-
return
|
|
312
|
-
if (Number(
|
|
313
|
-
const [O,
|
|
314
|
-
|
|
308
|
+
}, 100), T = () => l && o[l] && r.get(l).getVisible(), L = (a, m) => {
|
|
309
|
+
let v = [];
|
|
310
|
+
const b = Math.max(1, Math.floor(m.length / p));
|
|
311
|
+
return v = m.filter((N, F) => F % b === 0).map((N, F) => {
|
|
312
|
+
if (Number(N.lon) > 180 || Number(N.lat) > 180) {
|
|
313
|
+
const [O, B] = at(N.lon, N.lat);
|
|
314
|
+
N.lon = O, N.lat = B;
|
|
315
315
|
}
|
|
316
|
-
return
|
|
317
|
-
}),
|
|
318
|
-
(
|
|
319
|
-
(
|
|
316
|
+
return N.center = [N.lon, N.lat], N.centerPoint = fo(N.center), N.time = bt(N.createdAt).format("YYYY-MM-DD HH:mm:ss"), N.id = a, N.index = F, N;
|
|
317
|
+
}), v.filter(
|
|
318
|
+
(N, F, O) => F === O.findIndex(
|
|
319
|
+
(B) => Math.abs(B.lon - N.lon) < 1e-6 && Math.abs(B.lat - N.lat) < 1e-6
|
|
320
320
|
)
|
|
321
321
|
);
|
|
322
|
-
},
|
|
323
|
-
if (!e || JSON.stringify(o[
|
|
322
|
+
}, R = async (a, m, v, b = "ship", y = 200) => {
|
|
323
|
+
if (!e || JSON.stringify(o[a]) === JSON.stringify(m) && l === a || (m = m == null ? void 0 : m.reverse(), w && b === "ship" && (e != null && e.getOverlays().getArray().includes(w) || e.addOverlay(w)), (m == null ? void 0 : m.length) < 2))
|
|
324
324
|
return;
|
|
325
|
-
|
|
326
|
-
const z = Object.keys(o).findIndex((
|
|
327
|
-
A =
|
|
328
|
-
}, X = (
|
|
329
|
-
const
|
|
330
|
-
return new
|
|
331
|
-
source:
|
|
325
|
+
q(a), l = a, o[a] = m, p = y;
|
|
326
|
+
const z = Object.keys(o).findIndex((N) => N === a) || 0;
|
|
327
|
+
A = v || K[z > 10 ? 10 : z], await W(), await dt(l);
|
|
328
|
+
}, X = (a) => {
|
|
329
|
+
const m = new ye();
|
|
330
|
+
return new be({
|
|
331
|
+
source: m,
|
|
332
332
|
visible: !1,
|
|
333
333
|
// 默认隐藏
|
|
334
|
-
className: `track-layer-${
|
|
334
|
+
className: `track-layer-${a}`,
|
|
335
335
|
renderBuffer: 1024,
|
|
336
336
|
properties: { layerType: re.TRACK },
|
|
337
337
|
zIndex: 10
|
|
338
338
|
});
|
|
339
|
-
}, Z = (
|
|
340
|
-
r.forEach((
|
|
341
|
-
var
|
|
342
|
-
const
|
|
343
|
-
|
|
344
|
-
}), l =
|
|
339
|
+
}, Z = (a) => {
|
|
340
|
+
r.forEach((m, v) => {
|
|
341
|
+
var y;
|
|
342
|
+
const b = v === a;
|
|
343
|
+
m.getVisible() !== b && (m.setVisible(b), e.getLayers().getArray().includes(m) || e.addLayer(m), b || (y = m.getSource()) == null || y.clear());
|
|
344
|
+
}), l = a;
|
|
345
345
|
}, W = async () => {
|
|
346
|
-
const
|
|
347
|
-
if (!r.has(
|
|
348
|
-
const z = X(
|
|
349
|
-
r.set(
|
|
346
|
+
const a = l;
|
|
347
|
+
if (!r.has(a)) {
|
|
348
|
+
const z = X(a);
|
|
349
|
+
r.set(a, z);
|
|
350
350
|
}
|
|
351
|
-
await Z(
|
|
352
|
-
const
|
|
353
|
-
if (!(
|
|
354
|
-
let
|
|
355
|
-
|
|
356
|
-
const
|
|
357
|
-
|
|
358
|
-
}, G = (
|
|
359
|
-
const
|
|
351
|
+
await Z(a);
|
|
352
|
+
const m = A || "", v = o[a] || [];
|
|
353
|
+
if (!(v && v.length > 1)) return [];
|
|
354
|
+
let b = [];
|
|
355
|
+
b = L(a, v);
|
|
356
|
+
const y = b.map((z) => z.centerPoint);
|
|
357
|
+
b.length >= 2 && await G(a, y, m);
|
|
358
|
+
}, G = (a, m, v) => {
|
|
359
|
+
const b = new qe(m), y = r.get(a).getSource(), z = y.getFeatureById(a);
|
|
360
360
|
if (z)
|
|
361
|
-
z.setGeometry(
|
|
361
|
+
z.setGeometry(b), z.setId(a), z.setStyle(_(v)), g = z;
|
|
362
362
|
else {
|
|
363
|
-
const
|
|
364
|
-
|
|
363
|
+
const N = new ue({ geometry: b });
|
|
364
|
+
N.setId(a), N.set("type", "line"), N.setStyle(_(v)), y.addFeature(N), g = N;
|
|
365
365
|
}
|
|
366
|
-
return
|
|
367
|
-
}, _ = (
|
|
368
|
-
stroke: new
|
|
369
|
-
color:
|
|
366
|
+
return g;
|
|
367
|
+
}, _ = (a) => new ee({
|
|
368
|
+
stroke: new Ee({
|
|
369
|
+
color: a,
|
|
370
370
|
width: 2
|
|
371
371
|
})
|
|
372
|
-
}),
|
|
372
|
+
}), u = (a, m, v) => {
|
|
373
373
|
try {
|
|
374
|
-
const
|
|
375
|
-
if (
|
|
376
|
-
e.getTargetElement().style.cursor =
|
|
377
|
-
const
|
|
378
|
-
z && (s.querySelector(".popup-content"), s.innerHTML =
|
|
374
|
+
const b = a == null ? void 0 : a.get("data");
|
|
375
|
+
if (a && b && m === "hover") {
|
|
376
|
+
e.getTargetElement().style.cursor = b ? "pointer" : "";
|
|
377
|
+
const y = E(b), z = v == null ? void 0 : v.coordinate;
|
|
378
|
+
z && (s.querySelector(".popup-content"), s.innerHTML = y, w == null || w.setPosition(z));
|
|
379
379
|
} else
|
|
380
380
|
w && w.setPosition(void 0);
|
|
381
|
-
} catch (
|
|
382
|
-
console.error("handleTrackMapEvent",
|
|
381
|
+
} catch (b) {
|
|
382
|
+
console.error("handleTrackMapEvent", b);
|
|
383
383
|
}
|
|
384
|
-
}, E = (
|
|
385
|
-
if (!(
|
|
386
|
-
let
|
|
387
|
-
return
|
|
384
|
+
}, E = (a) => {
|
|
385
|
+
if (!(a != null && a.time)) return;
|
|
386
|
+
let m = "";
|
|
387
|
+
return a != null && a.stayTime && (m = `
|
|
388
388
|
<div class="item w-100">
|
|
389
389
|
<div class="item-label">停泊时间约</div>
|
|
390
|
-
<div class="item-item">${ho(Number(
|
|
390
|
+
<div class="item-item">${ho(Number(a.stayTime))}</div>
|
|
391
391
|
</div>
|
|
392
392
|
`), `
|
|
393
393
|
<div class="track-point-popup">
|
|
394
394
|
<div class="item">
|
|
395
395
|
<div class="item-label">状态</div>
|
|
396
|
-
<div class="item-item">${
|
|
396
|
+
<div class="item-item">${a != null && a.sailStatus ? Ct[a.sailStatus] : d}</div>
|
|
397
397
|
</div>
|
|
398
398
|
<div class="item">
|
|
399
399
|
<div class="item-label">航速</div>
|
|
400
|
-
<div class="item-item">${
|
|
400
|
+
<div class="item-item">${a.speed || d}</div>
|
|
401
401
|
</div>
|
|
402
402
|
<div class="item">
|
|
403
403
|
<div class="item-label">艏向</div>
|
|
404
|
-
<div class="item-item">${
|
|
404
|
+
<div class="item-item">${a.hdg || d}</div>
|
|
405
405
|
</div>
|
|
406
406
|
<div class="item">
|
|
407
407
|
<div class="item-label">航向</div>
|
|
408
|
-
<div class="item-item">${
|
|
408
|
+
<div class="item-item">${a.cog || d}</div>
|
|
409
409
|
</div>
|
|
410
410
|
<div class="item">
|
|
411
411
|
<div class="item-label">经度</div>
|
|
412
|
-
<div class="item-item">${
|
|
412
|
+
<div class="item-item">${a.lon || d}</div>
|
|
413
413
|
</div>
|
|
414
414
|
<div class="item">
|
|
415
415
|
<div class="item-label">纬度</div>
|
|
416
|
-
<div class="item-item">${
|
|
416
|
+
<div class="item-item">${a.lat || d}</div>
|
|
417
417
|
</div>
|
|
418
418
|
<div class="item w-100">
|
|
419
419
|
<div class="item-label">时间</div>
|
|
420
|
-
<div class="item-item">${
|
|
420
|
+
<div class="item-item">${a.time}</div>
|
|
421
421
|
</div>
|
|
422
|
-
${
|
|
422
|
+
${m ?? m}
|
|
423
423
|
</div>`;
|
|
424
|
-
}, D = (
|
|
425
|
-
const
|
|
426
|
-
const O = e.getPixelFromCoordinate(
|
|
424
|
+
}, D = (a) => {
|
|
425
|
+
const v = a.map((F) => {
|
|
426
|
+
const O = e.getPixelFromCoordinate(ae(F.center));
|
|
427
427
|
return {
|
|
428
|
-
...
|
|
429
|
-
original:
|
|
428
|
+
...F,
|
|
429
|
+
original: F,
|
|
430
430
|
pixel: O,
|
|
431
431
|
distance: 0
|
|
432
432
|
// 先初始化,后续计算
|
|
433
433
|
};
|
|
434
434
|
});
|
|
435
|
-
let
|
|
436
|
-
|
|
437
|
-
for (let
|
|
438
|
-
const O =
|
|
439
|
-
|
|
435
|
+
let b = 0;
|
|
436
|
+
v[0].distance = 0;
|
|
437
|
+
for (let F = 1; F < v.length; F++) {
|
|
438
|
+
const O = v[F - 1].pixel, B = v[F].pixel, ne = B[0] - O[0], P = B[1] - O[1];
|
|
439
|
+
b += Math.sqrt(ne * ne + P * P), v[F].distance = b;
|
|
440
440
|
}
|
|
441
|
-
const
|
|
442
|
-
(
|
|
441
|
+
const y = v.filter(
|
|
442
|
+
(F, O) => O === 0 || O === v.length - 1
|
|
443
443
|
), z = [];
|
|
444
|
-
for (let
|
|
445
|
-
const O =
|
|
446
|
-
if (z.push(O),
|
|
447
|
-
const
|
|
448
|
-
for (let
|
|
449
|
-
const Q = O.distance +
|
|
450
|
-
if (Q >=
|
|
451
|
-
const oe =
|
|
452
|
-
|
|
444
|
+
for (let F = 0; F < y.length; F++) {
|
|
445
|
+
const O = y[F];
|
|
446
|
+
if (z.push(O), F < y.length - 1) {
|
|
447
|
+
const B = y[F + 1], ne = B.distance - O.distance, P = Math.floor(ne / 100);
|
|
448
|
+
for (let j = 1; j <= P; j++) {
|
|
449
|
+
const Q = O.distance + j * 100;
|
|
450
|
+
if (Q >= B.distance) break;
|
|
451
|
+
const oe = H(
|
|
452
|
+
v,
|
|
453
453
|
Q
|
|
454
454
|
);
|
|
455
455
|
oe && z.push(oe);
|
|
@@ -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((F) => [F.distance.toFixed(2), F])).values()
|
|
461
|
+
).map((F) => ({
|
|
462
|
+
...F.original,
|
|
463
463
|
// 优先保留原始数据
|
|
464
|
-
...
|
|
464
|
+
...F,
|
|
465
465
|
// 覆盖坐标等计算属性
|
|
466
|
-
coord:
|
|
466
|
+
coord: F.coord,
|
|
467
467
|
// 确保使用插值后的坐标
|
|
468
|
-
pixel:
|
|
469
|
-
distance:
|
|
468
|
+
pixel: F.pixel,
|
|
469
|
+
distance: F.distance
|
|
470
470
|
}));
|
|
471
471
|
};
|
|
472
|
-
function
|
|
473
|
-
for (let
|
|
474
|
-
const
|
|
475
|
-
if (
|
|
476
|
-
const z = (
|
|
472
|
+
function H(a, m) {
|
|
473
|
+
for (let v = 1; v < a.length; v++) {
|
|
474
|
+
const b = a[v - 1], y = a[v];
|
|
475
|
+
if (m >= b.distance && m <= y.distance) {
|
|
476
|
+
const z = (m - b.distance) / (y.distance - b.distance), N = b.pixel[0] + z * (y.pixel[0] - b.pixel[0]), F = b.pixel[1] + z * (y.pixel[1] - b.pixel[1]), O = e == null ? void 0 : e.getCoordinateFromPixel([N, F]);
|
|
477
477
|
return {
|
|
478
|
-
...
|
|
478
|
+
...b,
|
|
479
479
|
// 继承前一个点的属性(可调整)
|
|
480
480
|
coord: O,
|
|
481
|
-
pixel: [
|
|
482
|
-
distance:
|
|
481
|
+
pixel: [N, F],
|
|
482
|
+
distance: m,
|
|
483
483
|
original: void 0
|
|
484
484
|
// 明确标记为插值生成点
|
|
485
485
|
};
|
|
@@ -487,59 +487,59 @@ const vo = (e) => {
|
|
|
487
487
|
}
|
|
488
488
|
return null;
|
|
489
489
|
}
|
|
490
|
-
const J = async (
|
|
491
|
-
const
|
|
492
|
-
console.log("simplifiedPoints",
|
|
493
|
-
const
|
|
494
|
-
r.get(
|
|
495
|
-
}, U = (
|
|
496
|
-
const
|
|
497
|
-
geometry: new ie(
|
|
498
|
-
data:
|
|
490
|
+
const J = async (a, m) => {
|
|
491
|
+
const v = D(m);
|
|
492
|
+
console.log("simplifiedPoints", v.length, "list", m.length);
|
|
493
|
+
const b = v.map((F) => U(F)), y = v.map((F) => ve(F, A)), z = Pt(a, v, m, A);
|
|
494
|
+
r.get(a).getSource().addFeatures([...b, ...y, ...z]);
|
|
495
|
+
}, U = (a) => {
|
|
496
|
+
const m = new ue({
|
|
497
|
+
geometry: new ie(a.centerPoint),
|
|
498
|
+
data: a
|
|
499
499
|
});
|
|
500
|
-
|
|
501
|
-
let
|
|
502
|
-
...
|
|
500
|
+
m.set("type", "track_point"), m.set("trackId", a.id), m.set("data", a);
|
|
501
|
+
let v = [
|
|
502
|
+
...Ze(a, A)
|
|
503
503
|
];
|
|
504
|
-
return (
|
|
505
|
-
}, te = window.devicePixelRatio || 1,
|
|
506
|
-
let
|
|
507
|
-
function he(
|
|
508
|
-
const
|
|
509
|
-
if (
|
|
510
|
-
return
|
|
511
|
-
if (!
|
|
512
|
-
|
|
504
|
+
return (a.index === 0 || a.index === o[a.id].length - 1) && (v = [...Ft(a)], m.set("type", "track_begin")), a.state !== void 0 && a.state !== null && (v = [...We(a)], m.set("type", "track_icon")), m.setStyle(v), m;
|
|
505
|
+
}, te = window.devicePixelRatio || 1, Y = /* @__PURE__ */ new Map();
|
|
506
|
+
let S = null, se = null;
|
|
507
|
+
function he(a, m) {
|
|
508
|
+
const v = `${a}`;
|
|
509
|
+
if (Y.has(v))
|
|
510
|
+
return Y.get(v);
|
|
511
|
+
if (!S) {
|
|
512
|
+
S = document.createElement("canvas");
|
|
513
513
|
try {
|
|
514
|
-
se =
|
|
514
|
+
se = S.getContext("2d", {
|
|
515
515
|
willReadFrequently: !0
|
|
516
516
|
});
|
|
517
517
|
} catch (gt) {
|
|
518
|
-
console.log("e", gt), se =
|
|
518
|
+
console.log("e", gt), se = S.getContext("2d");
|
|
519
519
|
}
|
|
520
520
|
}
|
|
521
|
-
const
|
|
522
|
-
if (!
|
|
523
|
-
|
|
524
|
-
const z = 2,
|
|
525
|
-
|
|
526
|
-
const
|
|
527
|
-
let oe = 0, we = 0,
|
|
528
|
-
oe =
|
|
529
|
-
const
|
|
530
|
-
|
|
531
|
-
const
|
|
532
|
-
return
|
|
521
|
+
const b = S, y = se;
|
|
522
|
+
if (!y) return "";
|
|
523
|
+
b.width = 0, b.height = 0;
|
|
524
|
+
const z = 2, N = 8, F = 16, O = window.devicePixelRatio || 1, B = "500 12px Arial";
|
|
525
|
+
y.font = B;
|
|
526
|
+
const P = y.measureText(a).width, j = N + P + N, Q = z + 14 + z;
|
|
527
|
+
let oe = 0, we = 0, pe = 0, Ce = 0, Oe = 0, Fe = 0, Le = 0, Se = 0;
|
|
528
|
+
oe = F + j, we = F + Q, pe = j, Ce = Q, Oe = j + F, Fe = 0, Le = 0, Se = F, b.width = Math.round(oe * O), b.height = Math.round(we * O), y.scale(O, O), y.clearRect(0, 0, oe, we), y.beginPath(), y.moveTo(pe, Ce), y.lineTo(Oe, Fe), y.strokeStyle = m || "#FFF", y.lineWidth = 1, y.stroke(), y.fillStyle = "#FFF", y.fillRect(Le, Se, j, Q), y.strokeStyle = m || "#FFF", y.lineWidth = 1, y.strokeRect(Le, Se, j, Q), y.font = B, y.textBaseline = "middle";
|
|
529
|
+
const He = Se + z / 2 + Q / 2;
|
|
530
|
+
y.strokeStyle = "#ffffff", y.lineWidth = 1, y.strokeText(a, Le + N, He), y.fillStyle = "#000000", y.fillText(a, Le + N, He);
|
|
531
|
+
const Ye = b.toDataURL("image/png");
|
|
532
|
+
return Y.set(v, Ye), Ye;
|
|
533
533
|
}
|
|
534
|
-
const ve = (
|
|
535
|
-
const
|
|
536
|
-
geometry: new ie(
|
|
537
|
-
data:
|
|
534
|
+
const ve = (a, m) => {
|
|
535
|
+
const v = he(a.time, m), b = new ue({
|
|
536
|
+
geometry: new ie(a.centerPoint),
|
|
537
|
+
data: a
|
|
538
538
|
});
|
|
539
|
-
|
|
540
|
-
const
|
|
539
|
+
b.set("type", "track_point_label");
|
|
540
|
+
const y = new ee({
|
|
541
541
|
image: new Pe({
|
|
542
|
-
src:
|
|
542
|
+
src: v,
|
|
543
543
|
anchor: [1, 0],
|
|
544
544
|
displacement: [0, 0],
|
|
545
545
|
scale: 1 / te,
|
|
@@ -548,236 +548,236 @@ const vo = (e) => {
|
|
|
548
548
|
}),
|
|
549
549
|
zIndex: 100
|
|
550
550
|
});
|
|
551
|
-
return
|
|
552
|
-
}, Qe = (
|
|
553
|
-
const
|
|
554
|
-
|
|
555
|
-
|
|
551
|
+
return b.setStyle(y), b;
|
|
552
|
+
}, Qe = (a) => {
|
|
553
|
+
const m = r.get(a).getSource();
|
|
554
|
+
m.forEachFeature((v) => {
|
|
555
|
+
v.get("type") !== "line" && m.removeFeature(v);
|
|
556
556
|
});
|
|
557
|
-
},
|
|
557
|
+
}, Ze = (a, m) => [
|
|
558
558
|
new ee({
|
|
559
559
|
// 扩大交互热区
|
|
560
560
|
image: new Ke({
|
|
561
|
-
stroke: new
|
|
561
|
+
stroke: new Ee({ color: "rgba(0, 0, 0, 0.01)", width: 20 }),
|
|
562
562
|
radius: 3
|
|
563
563
|
})
|
|
564
564
|
}),
|
|
565
565
|
// 轨迹点样式
|
|
566
566
|
new ee({
|
|
567
567
|
image: new Ke({
|
|
568
|
-
fill: new ce({ color:
|
|
569
|
-
stroke: new
|
|
568
|
+
fill: new ce({ color: m }),
|
|
569
|
+
stroke: new Ee({ color: "#fff", width: 2 }),
|
|
570
570
|
radius: 3
|
|
571
571
|
})
|
|
572
572
|
})
|
|
573
573
|
// textStyle,
|
|
574
|
-
], We = (
|
|
575
|
-
const
|
|
574
|
+
], We = (a) => {
|
|
575
|
+
const m = "#E31818", v = "#1890FF", b = "", y = new ee({
|
|
576
576
|
text: new Ve({
|
|
577
577
|
font: "Normal 22px map-iconfont",
|
|
578
|
-
text:
|
|
578
|
+
text: Te(b),
|
|
579
579
|
offsetY: -10,
|
|
580
580
|
fill: new ce({
|
|
581
|
-
color: Number(
|
|
581
|
+
color: Number(a.state) === 0 ? m : Number(a.state) === 1 ? v : ""
|
|
582
582
|
})
|
|
583
583
|
}),
|
|
584
584
|
zIndex: 99
|
|
585
|
-
}),
|
|
586
|
-
return Number(
|
|
587
|
-
}, Pt = (
|
|
588
|
-
const
|
|
589
|
-
z || (
|
|
590
|
-
const
|
|
585
|
+
}), N = vt(""), O = vt(""), B = [];
|
|
586
|
+
return Number(a.state) === 0 ? B.push(N) : Number(a.state) === 1 && B.push(O), B.push(y), B;
|
|
587
|
+
}, Pt = (a, m, v, b) => {
|
|
588
|
+
const y = m || [], z = m.length;
|
|
589
|
+
z || (y.push(v[0]), y.push(v[v.length - 1]));
|
|
590
|
+
const N = new Set(m.map((O) => `${O.centerPoint[0]},${O.centerPoint[1]}`)), F = [];
|
|
591
591
|
for (let O = 0; O < z - 1; O++) {
|
|
592
|
-
let
|
|
593
|
-
const ne =
|
|
594
|
-
if (
|
|
595
|
-
|
|
592
|
+
let B;
|
|
593
|
+
const ne = m[O], P = (m[O + 1].index + ne.index) / 2;
|
|
594
|
+
if (P % 2 === 0)
|
|
595
|
+
B = v[P].centerPoint;
|
|
596
596
|
else {
|
|
597
|
-
const
|
|
598
|
-
if (
|
|
599
|
-
const [oe, we] =
|
|
600
|
-
|
|
597
|
+
const j = v[Math.floor(P)], Q = v[Math.ceil(P)];
|
|
598
|
+
if (j && Q) {
|
|
599
|
+
const [oe, we] = j.centerPoint, [pe, Ce] = Q.centerPoint;
|
|
600
|
+
B = [(oe + pe) / 2, (we + Ce) / 2];
|
|
601
601
|
}
|
|
602
602
|
}
|
|
603
|
-
if (
|
|
604
|
-
const
|
|
605
|
-
if (
|
|
606
|
-
const Q = new
|
|
607
|
-
geometry: new ie(
|
|
603
|
+
if (B) {
|
|
604
|
+
const j = `${B[0]},${B[1]}`;
|
|
605
|
+
if (!N.has(j)) {
|
|
606
|
+
const Q = new ue({
|
|
607
|
+
geometry: new ie(B)
|
|
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
|
-
text:
|
|
614
|
-
fill: new ce({ color:
|
|
613
|
+
text: Te(""),
|
|
614
|
+
fill: new ce({ color: b }),
|
|
615
615
|
rotation: ut(
|
|
616
|
-
|
|
617
|
-
|
|
616
|
+
m[O].center,
|
|
617
|
+
m[O + 1].center
|
|
618
618
|
) * (Math.PI / 180)
|
|
619
619
|
})
|
|
620
620
|
})
|
|
621
|
-
),
|
|
621
|
+
), F.push(Q), N.add(j);
|
|
622
622
|
}
|
|
623
623
|
}
|
|
624
624
|
}
|
|
625
|
-
return
|
|
626
|
-
}, dt = (
|
|
627
|
-
var z,
|
|
628
|
-
const
|
|
629
|
-
if (!
|
|
630
|
-
const
|
|
631
|
-
if (!
|
|
625
|
+
return F;
|
|
626
|
+
}, dt = (a) => {
|
|
627
|
+
var z, N;
|
|
628
|
+
const m = e.getView(), v = (z = r == null ? void 0 : r.get(a)) == null ? void 0 : z.getSource(), b = g || (a ? v == null ? void 0 : v.getFeatureById(a) : null);
|
|
629
|
+
if (!b) return;
|
|
630
|
+
const y = (N = b == null ? void 0 : b.getGeometry()) == null ? void 0 : N.getExtent();
|
|
631
|
+
if (!y || y[0] === y[2] || y[1] === y[3]) {
|
|
632
632
|
console.warn("Invalid track extent");
|
|
633
633
|
return;
|
|
634
634
|
}
|
|
635
635
|
try {
|
|
636
|
-
const
|
|
637
|
-
if (
|
|
638
|
-
const
|
|
639
|
-
|
|
636
|
+
const F = y[2] - y[0], O = y[3] - y[1], B = 1e-4;
|
|
637
|
+
if (F < B || O < B) {
|
|
638
|
+
const P = [(y[0] + y[2]) / 2, (y[1] + y[3]) / 2];
|
|
639
|
+
m.setCenter(P);
|
|
640
640
|
return;
|
|
641
641
|
}
|
|
642
|
-
const ne = jt(
|
|
643
|
-
|
|
644
|
-
maxZoom:
|
|
642
|
+
const ne = jt(y, Math.max(F, O) * 0.1);
|
|
643
|
+
m.fit(ne, {
|
|
644
|
+
maxZoom: de.max,
|
|
645
645
|
padding: [30, 30, 30, 30]
|
|
646
646
|
// 添加边距
|
|
647
647
|
});
|
|
648
|
-
} catch (
|
|
649
|
-
console.error("setTrackViewCenter error:",
|
|
648
|
+
} catch (F) {
|
|
649
|
+
console.error("setTrackViewCenter error:", F);
|
|
650
650
|
}
|
|
651
|
-
}, Ft = (
|
|
652
|
-
const
|
|
651
|
+
}, Ft = (a) => {
|
|
652
|
+
const m = "", y = a.index === 0 ? "#fcdc3f" : "#ff0000";
|
|
653
653
|
return [new ee({
|
|
654
654
|
text: new Ve({
|
|
655
655
|
font: "Normal 14px map-iconfont",
|
|
656
|
-
text:
|
|
657
|
-
fill: new ce({ color:
|
|
656
|
+
text: Te(m),
|
|
657
|
+
fill: new ce({ color: y })
|
|
658
658
|
}),
|
|
659
659
|
zIndex: 101
|
|
660
660
|
})];
|
|
661
661
|
}, St = () => {
|
|
662
|
-
console.log("清除所有的轨迹-----"), Ge(), r.forEach((
|
|
663
|
-
var
|
|
664
|
-
(
|
|
665
|
-
}), Object.keys(o).forEach((
|
|
666
|
-
r.delete(
|
|
662
|
+
console.log("清除所有的轨迹-----"), Ge(), r.forEach((m) => {
|
|
663
|
+
var v;
|
|
664
|
+
(v = m.getSource()) == null || v.clear(), e == null || e.removeLayer(m);
|
|
665
|
+
}), Object.keys(o).forEach((m) => {
|
|
666
|
+
r.delete(m), delete o[m];
|
|
667
667
|
});
|
|
668
|
-
}, Nt = (
|
|
669
|
-
const
|
|
670
|
-
|
|
671
|
-
const
|
|
672
|
-
for (let
|
|
673
|
-
const
|
|
674
|
-
|
|
668
|
+
}, Nt = (a) => {
|
|
669
|
+
const m = r.get(a || l);
|
|
670
|
+
m == null || m.setVisible(!1);
|
|
671
|
+
const v = e.getOverlays().getArray();
|
|
672
|
+
for (let b = 0; b < v.length; ) {
|
|
673
|
+
const y = v[b];
|
|
674
|
+
y.get("class") === "track-label-overlay" ? (y.setPosition(void 0), y.dispose()) : b++;
|
|
675
675
|
}
|
|
676
676
|
Ge();
|
|
677
|
-
}, Rt = (
|
|
678
|
-
const
|
|
679
|
-
id:
|
|
677
|
+
}, Rt = (a, m = ze.NM) => {
|
|
678
|
+
const v = {
|
|
679
|
+
id: a,
|
|
680
680
|
length: "--"
|
|
681
|
-
},
|
|
682
|
-
(
|
|
683
|
-
), z = new qe(
|
|
684
|
-
return
|
|
685
|
-
}, $t = (
|
|
686
|
-
Vt(String(
|
|
687
|
-
}, Vt = (
|
|
688
|
-
const
|
|
689
|
-
|
|
681
|
+
}, y = (o[a] || []).map(
|
|
682
|
+
(N) => Ae([N.lon, N.lat], le.data, le.mercator)
|
|
683
|
+
), z = new qe(y);
|
|
684
|
+
return v.length = go(z, m) || "--", v;
|
|
685
|
+
}, $t = (a, m) => {
|
|
686
|
+
Vt(String(a), m);
|
|
687
|
+
}, Vt = (a, m) => {
|
|
688
|
+
const v = o[String(a)], b = v == null ? void 0 : v.map((y) => [y.lon, y.lat]);
|
|
689
|
+
b && Dt(b, m);
|
|
690
690
|
}, Je = new ee({
|
|
691
691
|
text: new Ve({
|
|
692
692
|
font: "700 20px map-iconfont",
|
|
693
|
-
text:
|
|
693
|
+
text: Te(""),
|
|
694
694
|
fill: new ce({ color: "#ff0000" }),
|
|
695
695
|
rotation: 0
|
|
696
696
|
// 初始旋转角度
|
|
697
697
|
})
|
|
698
|
-
}), zt = (
|
|
699
|
-
var
|
|
700
|
-
const
|
|
701
|
-
if (
|
|
698
|
+
}), zt = (a, m) => {
|
|
699
|
+
var P, j;
|
|
700
|
+
const v = Number(50 * m), b = ((P = a.frameState) == null ? void 0 : P.time) ?? Date.now(), y = b - $;
|
|
701
|
+
if (i = (i + v * y / 1e6) % 2, $ = b, i >= 1) {
|
|
702
702
|
Ge();
|
|
703
703
|
return;
|
|
704
704
|
}
|
|
705
|
-
const z =
|
|
706
|
-
|
|
707
|
-
),
|
|
708
|
-
|
|
709
|
-
),
|
|
710
|
-
|
|
711
|
-
),
|
|
712
|
-
yt(
|
|
713
|
-
yt(
|
|
705
|
+
const z = x.getCoordinateAt(
|
|
706
|
+
i > 1 ? 2 - i : i
|
|
707
|
+
), N = x.getCoordinateAt(
|
|
708
|
+
i > 1 ? i - 0.01 : i
|
|
709
|
+
), F = x.getCoordinateAt(
|
|
710
|
+
i > 1 ? 2 - i : i + 0.01
|
|
711
|
+
), B = ut(
|
|
712
|
+
yt(N, "array"),
|
|
713
|
+
yt(F, "array")
|
|
714
714
|
) * Math.PI / 180;
|
|
715
|
-
(
|
|
716
|
-
const ne = Kt(
|
|
715
|
+
(j = Je.getText()) == null || j.setRotation(B), n.setCoordinates(z);
|
|
716
|
+
const ne = Kt(a);
|
|
717
717
|
ne.setStyle(Je), ne.drawGeometry(n), e == null || e.render();
|
|
718
718
|
}, Ot = () => {
|
|
719
|
-
var
|
|
720
|
-
M = !0,
|
|
719
|
+
var a;
|
|
720
|
+
M = !0, $ = Date.now(), i = 0, n = ((a = t.getGeometry()) == null ? void 0 : a.clone()) || new ie([0, 0]), c && (V == null || V.on("postrender", c)), f == null || f.setGeometry(void 0);
|
|
721
721
|
}, Ge = () => {
|
|
722
|
-
M && (M = !1,
|
|
723
|
-
}, Dt = (
|
|
724
|
-
M && Ge(),
|
|
722
|
+
M && (M = !1, f == null || f.setGeometry(void 0), c && V && V.un("postrender", c), V && (e == null || e.removeLayer(V)), V = null, f = null);
|
|
723
|
+
}, Dt = (a, m) => {
|
|
724
|
+
M && Ge(), k = new ht({
|
|
725
725
|
factor: 1e6
|
|
726
|
-
}).writeGeometry(new qe(
|
|
726
|
+
}).writeGeometry(new qe(a)), x = new ht({
|
|
727
727
|
factor: 1e6
|
|
728
|
-
}).readGeometry(
|
|
728
|
+
}).readGeometry(k, {
|
|
729
729
|
dataProjection: le.data,
|
|
730
730
|
featureProjection: le.mercator
|
|
731
|
-
}), t = new
|
|
731
|
+
}), t = new ue({
|
|
732
732
|
type: "icon",
|
|
733
|
-
geometry: new ie(
|
|
733
|
+
geometry: new ie(x.getFirstCoordinate())
|
|
734
734
|
});
|
|
735
|
-
const
|
|
736
|
-
n =
|
|
735
|
+
const v = t.getGeometry();
|
|
736
|
+
n = v ? v.clone() : new ie([0, 0]), f = new ue({
|
|
737
737
|
type: "geoMarker",
|
|
738
738
|
style: Je,
|
|
739
739
|
geometry: n
|
|
740
|
-
}),
|
|
740
|
+
}), V = new be({
|
|
741
741
|
source: new ye({
|
|
742
|
-
features: [
|
|
742
|
+
features: [f]
|
|
743
743
|
})
|
|
744
|
-
}), e == null || e.addLayer(
|
|
745
|
-
}, ut = (
|
|
746
|
-
function
|
|
747
|
-
return 180 * (
|
|
744
|
+
}), e == null || e.addLayer(V), c = (b) => zt(b, m), Ot();
|
|
745
|
+
}, ut = (a, m, v) => {
|
|
746
|
+
function b(P) {
|
|
747
|
+
return 180 * (P % (2 * Math.PI)) / Math.PI;
|
|
748
748
|
}
|
|
749
|
-
function
|
|
750
|
-
return
|
|
749
|
+
function y(P) {
|
|
750
|
+
return P % 360 * Math.PI / 180;
|
|
751
751
|
}
|
|
752
|
-
function z(
|
|
753
|
-
var
|
|
754
|
-
if (!
|
|
755
|
-
if (!Array.isArray(
|
|
756
|
-
if ((
|
|
757
|
-
return
|
|
758
|
-
if (
|
|
752
|
+
function z(P) {
|
|
753
|
+
var j;
|
|
754
|
+
if (!P) throw new Error("Coordinate is required");
|
|
755
|
+
if (!Array.isArray(P)) {
|
|
756
|
+
if ((P == null ? void 0 : P.type) === "Feature" && (P == null ? void 0 : P.geometry) !== null && ((j = P == null ? void 0 : P.geometry) == null ? void 0 : j.type) === "Point")
|
|
757
|
+
return P == null ? void 0 : P.geometry.coordinates;
|
|
758
|
+
if (P.type === "Point") return (P == null ? void 0 : P.coordinates) || [];
|
|
759
759
|
}
|
|
760
|
-
if (Array.isArray(
|
|
761
|
-
return
|
|
760
|
+
if (Array.isArray(P) && P.length >= 2 && !Array.isArray(P[0]) && !Array.isArray(P[1]))
|
|
761
|
+
return P;
|
|
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 N(P, j, Q = {}) {
|
|
767
767
|
if (Q.final)
|
|
768
|
-
return function(
|
|
769
|
-
return (
|
|
770
|
-
}(
|
|
771
|
-
const oe = z(
|
|
772
|
-
return
|
|
768
|
+
return function(He, Ye) {
|
|
769
|
+
return (N(Ye, He) + 180) % 360;
|
|
770
|
+
}(P, j);
|
|
771
|
+
const oe = z(P), we = z(j), pe = y(oe[0]), Ce = y(we[0]), Oe = y(oe[1]), Fe = y(we[1]), Le = Math.sin(Ce - pe) * Math.cos(Fe), Se = Math.cos(Oe) * Math.sin(Fe) - Math.sin(Oe) * Math.cos(Fe) * Math.cos(Ce - pe);
|
|
772
|
+
return b(Math.atan2(Le, Se));
|
|
773
773
|
}
|
|
774
|
-
function
|
|
775
|
-
return !isNaN(
|
|
774
|
+
function F(P) {
|
|
775
|
+
return !isNaN(P) && P !== null && !Array.isArray(P);
|
|
776
776
|
}
|
|
777
|
-
function O(
|
|
778
|
-
return
|
|
777
|
+
function O(P, j = {}, Q = {}) {
|
|
778
|
+
return P || console.log("Coordinates are required"), Array.isArray(P) || console.log("Coordinates must be an Array"), P.length < 2 && console.log("Coordinates must be at least 2 numbers long"), (!F(P[0]) || !F(P[1])) && console.log("Coordinates must contain numbers"), B({ type: "Point", coordinates: P }, j, Q);
|
|
779
779
|
}
|
|
780
|
-
function
|
|
780
|
+
function B(P, j = {}, Q = {}) {
|
|
781
781
|
const oe = {
|
|
782
782
|
type: "Feature",
|
|
783
783
|
id: "",
|
|
@@ -785,26 +785,26 @@ 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 =
|
|
788
|
+
return Q.id !== void 0 && (oe.id = Q.id), Q.bbox && (oe.bbox = Q.bbox), oe.properties = j, oe.geometry = P, oe;
|
|
789
789
|
}
|
|
790
|
-
const ne =
|
|
790
|
+
const ne = N(O(a), O(m), v);
|
|
791
791
|
return ne < 0 ? 360 + ne : ne;
|
|
792
792
|
};
|
|
793
793
|
return {
|
|
794
|
-
render:
|
|
794
|
+
render: R,
|
|
795
795
|
remove: St,
|
|
796
796
|
play: $t,
|
|
797
797
|
setCenter: dt,
|
|
798
798
|
close: Nt,
|
|
799
799
|
getLength: Rt,
|
|
800
|
-
handleTrackMapEvent:
|
|
800
|
+
handleTrackMapEvent: u,
|
|
801
801
|
reRenderTrackLine: I,
|
|
802
802
|
getTrackStatus: T
|
|
803
803
|
};
|
|
804
804
|
};
|
|
805
805
|
function yo(e) {
|
|
806
806
|
console.log("useShipOverlay", e);
|
|
807
|
-
const r =
|
|
807
|
+
const r = fe(null), o = Be(() => ({
|
|
808
808
|
"--overlay-color": "#FFF",
|
|
809
809
|
"--bg-color1": e.colors && e.colors[0] ? e.colors[0] : "#ffffff",
|
|
810
810
|
// 默认第一个颜色
|
|
@@ -812,7 +812,7 @@ function yo(e) {
|
|
|
812
812
|
"--bg-color": "#ffffff",
|
|
813
813
|
position: "relative",
|
|
814
814
|
"pointer-events": "none"
|
|
815
|
-
})), l =
|
|
815
|
+
})), l = Be(() => {
|
|
816
816
|
var s;
|
|
817
817
|
return {
|
|
818
818
|
position: "relative",
|
|
@@ -833,12 +833,12 @@ function yo(e) {
|
|
|
833
833
|
animation: e.selected ? e.colors && ((s = e.colors) == null ? void 0 : s.length) >= 2 ? "blink-dual 2s ease-in-out infinite" : "blink-single 1.5s ease-in-out infinite" : "none"
|
|
834
834
|
// "animation": props.selected ? 'blink 1.5s ease-in-out infinite' : 'none', // 动画开关
|
|
835
835
|
};
|
|
836
|
-
}),
|
|
836
|
+
}), d = Be(() => ({
|
|
837
837
|
width: "14px",
|
|
838
838
|
height: "14px",
|
|
839
839
|
margin: "1px 5px 1px 1px",
|
|
840
840
|
"background-color": "var(--attention-bg)"
|
|
841
|
-
})),
|
|
841
|
+
})), c = Be(() => ({
|
|
842
842
|
position: "absolute",
|
|
843
843
|
top: "0px",
|
|
844
844
|
color: "var(--overlay-color)",
|
|
@@ -863,7 +863,7 @@ function yo(e) {
|
|
|
863
863
|
},
|
|
864
864
|
[
|
|
865
865
|
me("div", {
|
|
866
|
-
style: e.selected ?
|
|
866
|
+
style: e.selected ? d.value : {}
|
|
867
867
|
}, ""),
|
|
868
868
|
me("div", {
|
|
869
869
|
class: "text",
|
|
@@ -902,7 +902,7 @@ function yo(e) {
|
|
|
902
902
|
),
|
|
903
903
|
me("svg", {
|
|
904
904
|
class: "ship-overlay-line",
|
|
905
|
-
style:
|
|
905
|
+
style: c.value,
|
|
906
906
|
viewBox: "0 0 20 20",
|
|
907
907
|
xmlns: "http://www.w3.org/2000/svg"
|
|
908
908
|
}, [
|
|
@@ -919,54 +919,54 @@ function yo(e) {
|
|
|
919
919
|
}
|
|
920
920
|
const wo = (e) => {
|
|
921
921
|
const { spd: r, hdg: o, cog: l } = e;
|
|
922
|
-
return r ? o !== null && +o != 511 && l !== null ? l - +o >= 3 ?
|
|
922
|
+
return r ? o !== null && +o != 511 && l !== null ? l - +o >= 3 ? ge.right : l - +o <= -3 ? ge.left : ge.front : ge.front : "";
|
|
923
923
|
}, Ne = (e, r) => {
|
|
924
|
-
const { shipData: o } = r.getProperties(), l = Lt(e),
|
|
925
|
-
return xo(r,
|
|
924
|
+
const { shipData: o } = r.getProperties(), l = Lt(e), d = Mt(e, o, l);
|
|
925
|
+
return xo(r, d, l);
|
|
926
926
|
}, Lt = (e) => {
|
|
927
927
|
const r = e == null ? void 0 : e.getView().getZoom();
|
|
928
|
-
return r && r <=
|
|
928
|
+
return r && r <= de.shipModelMax && r >= de.shipTriggleMin ? "ship" : "triangle";
|
|
929
929
|
}, Mt = (e, r, o) => {
|
|
930
930
|
if (o === "ship") {
|
|
931
|
-
const { len: l, wid:
|
|
931
|
+
const { len: l, wid: d } = r, c = 97, s = 20, k = 1 / (e == null ? void 0 : e.getView().getResolution()), x = l * k / c, t = d * k / s, n = Math.min(x, t);
|
|
932
932
|
return n < 0.2 ? 0.2 : n > 2 ? 2 : n;
|
|
933
933
|
}
|
|
934
|
-
return
|
|
934
|
+
return de.scaleNum;
|
|
935
935
|
}, xo = (e, r, o) => {
|
|
936
|
-
const { color: l, direct:
|
|
936
|
+
const { color: l, direct: d, isHighlight: c, 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
|
-
src:
|
|
940
|
-
scale: r ||
|
|
939
|
+
src: k(),
|
|
940
|
+
scale: r || de.scaleNum,
|
|
941
941
|
anchor: [0.5, 0.5],
|
|
942
942
|
rotation: w * Math.PI / 180,
|
|
943
943
|
rotateWithView: !1
|
|
944
944
|
})
|
|
945
945
|
});
|
|
946
|
-
function
|
|
947
|
-
return `data:image/svg+xml;utf8,${encodeURIComponent(
|
|
946
|
+
function k() {
|
|
947
|
+
return `data:image/svg+xml;utf8,${encodeURIComponent(x())}`;
|
|
948
948
|
}
|
|
949
|
-
function
|
|
949
|
+
function x() {
|
|
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">
|
|
953
953
|
<path d="M30.8843 12.6777L2.21343 21.7067C1.75559 21.8509 1.28947 21.509 1.28947 21.029L1.28947 2.97103C1.28947 2.49102 1.75558 2.14913 2.21342 2.29331L30.8843 11.3223C31.5471 11.531 31.5471 12.469 30.8843 12.6777Z"
|
|
954
|
-
fill="${l}" stroke="${
|
|
954
|
+
fill="${l}" stroke="${c ? "#FF2424" : "black"}" stroke-width="${c ? "2" : "0.578947"}" />
|
|
955
955
|
<!--path船航向左边或者向前-->
|
|
956
|
-
${
|
|
956
|
+
${d === ge.left && `<path d="M30 12L40 12L40 8" stroke="${c ? "#FF2424" : "black"}" stroke-width="2"/>`}
|
|
957
957
|
<!--path船航向右边-->
|
|
958
|
-
${
|
|
958
|
+
${d === ge.right && `<path d="M30 12L40 12L40 16" stroke="${c ? "#FF2424" : "black"}" stroke-width="2"/>`}
|
|
959
959
|
<!--path黑线无左右-->
|
|
960
|
-
${
|
|
960
|
+
${d === ge.front && `<path d="M30 12L40 12" stroke="${c ? "#FF2424" : "black"}" stroke-width="1.5"/>`}
|
|
961
961
|
</svg>
|
|
962
962
|
`;
|
|
963
963
|
case "ship":
|
|
964
964
|
return `<svg width="97" height="20" viewBox="0 0 97 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
965
965
|
<path d="M0.289474 17.3433L0.289474 2.65655C0.289474 2.28572 0.574654 1.97725 0.944343 1.9482L22.0544 0.289473L67.5204 0.289473C67.6295 0.289473 67.7372 0.314613 67.835 0.362943L86.0565 9.3629C86.5844 9.6236 86.5844 10.3763 86.0565 10.637L67.835 19.6371C67.7372 19.6854 67.6295 19.7105 67.5203 19.7105L22.0544 19.7105L0.944343 18.0517C0.574653 18.0226 0.289474 17.7142 0.289474 17.3433Z"
|
|
966
|
-
fill="${l}" stroke="${
|
|
967
|
-
${
|
|
968
|
-
${
|
|
969
|
-
${
|
|
966
|
+
fill="${l}" stroke="${c ? "#FF2424" : "black"}" stroke-width="${c ? "4" : "0.578947"}"/>
|
|
967
|
+
${d === ge.left && `<path d="M86 10L96 10L96 6" stroke="${c ? "#FF2424" : "black"}" stroke-width="1.5"/>`}
|
|
968
|
+
${d === ge.right && `<path d="M86 10L96 10L96 14" stroke="${c ? "#FF2424" : "black"}" stroke-width="1.5"/>`}
|
|
969
|
+
${d === ge.front && `<path d="M86 10L96 10" stroke="${c ? "#FF2424" : "black"}" stroke-width="1.5"/>`}
|
|
970
970
|
</svg>
|
|
971
971
|
`;
|
|
972
972
|
default:
|
|
@@ -974,15 +974,15 @@ const wo = (e) => {
|
|
|
974
974
|
}
|
|
975
975
|
}
|
|
976
976
|
}, bo = (e, r) => {
|
|
977
|
-
const o = Lt(e), l = Mt(e, r, o),
|
|
978
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="${
|
|
977
|
+
const o = Lt(e), l = Mt(e, r, o), d = o === "ship" ? 109 : 49, c = `
|
|
978
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="${d}" height="${d}" viewBox="0 0 49 49" fill="none">
|
|
979
979
|
<path d="M1.99982 46.9998L1.99982 1.99982L46.9998 1.99982L46.9998 46.9998L1.99982 46.9998Z" fill="#FF2424" fill-opacity="0.2"/>
|
|
980
980
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M19.9998 0.5V3.5L3.49976 3.5V20H0.499756V0.500002L19.9998 0.5ZM45.4998 3.5H28.9998V0.5H48.4998V20H45.4998V3.5ZM48.4998 29L48.4998 48.5H28.9998V45.5H45.4998L45.4998 29H48.4998ZM3.49976 45.5L3.49976 29H0.499756L0.499758 48.5L19.9998 48.5V45.5L3.49976 45.5Z" fill="#FF2424"/>
|
|
981
981
|
</svg>
|
|
982
982
|
`;
|
|
983
983
|
return new ee({
|
|
984
984
|
image: new Pe({
|
|
985
|
-
src: `data:image/svg+xml;utf8,${encodeURIComponent(
|
|
985
|
+
src: `data:image/svg+xml;utf8,${encodeURIComponent(c)}`,
|
|
986
986
|
scale: l,
|
|
987
987
|
anchorXUnits: "fraction",
|
|
988
988
|
anchorYUnits: "fraction"
|
|
@@ -991,7 +991,7 @@ const wo = (e) => {
|
|
|
991
991
|
};
|
|
992
992
|
function ko(e, r, o, l) {
|
|
993
993
|
if (r) {
|
|
994
|
-
const
|
|
994
|
+
const d = new xe({
|
|
995
995
|
element: o,
|
|
996
996
|
positioning: "top-left",
|
|
997
997
|
id: "label-" + (l == null ? void 0 : l.id),
|
|
@@ -1000,29 +1000,29 @@ function ko(e, r, o, l) {
|
|
|
1000
1000
|
position: r,
|
|
1001
1001
|
className: l != null && l.blinking ? "ship-label-overlay-blinking" : "ship-label-overlay"
|
|
1002
1002
|
});
|
|
1003
|
-
|
|
1003
|
+
d.set("class", "zh-map-ship-overlay"), e.addOverlay(d);
|
|
1004
1004
|
}
|
|
1005
1005
|
}
|
|
1006
1006
|
const po = (e, r) => {
|
|
1007
|
-
const { lon: o, lat: l, blinking:
|
|
1008
|
-
o && l && ko(e,
|
|
1007
|
+
const { lon: o, lat: l, blinking: d } = r, c = Tt(r);
|
|
1008
|
+
o && l && ko(e, ae([o, l]), c, { ...r, blinking: d });
|
|
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:
|
|
1012
|
+
const { lon: o, lat: l, blinking: d, blinkingColors: c, name: s } = e, w = tt({
|
|
1013
1013
|
setup() {
|
|
1014
1014
|
return yo({
|
|
1015
1015
|
position: [o + 2e-3, l + 2e-3],
|
|
1016
|
-
selected:
|
|
1016
|
+
selected: d,
|
|
1017
1017
|
name: s,
|
|
1018
|
-
colors:
|
|
1018
|
+
colors: c || [],
|
|
1019
1019
|
existDevice: e == null ? void 0 : e.existDevice,
|
|
1020
1020
|
existMobile: e == null ? void 0 : e.existMobile,
|
|
1021
1021
|
existWaterGauge: e == null ? void 0 : e.existWaterGauge
|
|
1022
1022
|
});
|
|
1023
1023
|
}
|
|
1024
1024
|
});
|
|
1025
|
-
return
|
|
1025
|
+
return At(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;
|
|
@@ -1041,9 +1041,9 @@ function Co() {
|
|
|
1041
1041
|
const Lo = window.devicePixelRatio || 1, Ue = /* @__PURE__ */ new Map();
|
|
1042
1042
|
let De = null, Ie = null;
|
|
1043
1043
|
function Mo(e, r, o = "left-bottom", l = 10) {
|
|
1044
|
-
const
|
|
1045
|
-
if (Ue.has(
|
|
1046
|
-
return Ue.get(
|
|
1044
|
+
const d = `${e}-${r.join(",")}-${o}-${l}`;
|
|
1045
|
+
if (Ue.has(d))
|
|
1046
|
+
return Ue.get(d);
|
|
1047
1047
|
if (!De) {
|
|
1048
1048
|
De = document.createElement("canvas");
|
|
1049
1049
|
try {
|
|
@@ -1054,50 +1054,50 @@ function Mo(e, r, o = "left-bottom", l = 10) {
|
|
|
1054
1054
|
console.log("e", _), Ie = De.getContext("2d");
|
|
1055
1055
|
}
|
|
1056
1056
|
}
|
|
1057
|
-
const
|
|
1057
|
+
const c = De, s = Ie;
|
|
1058
1058
|
if (!s) return "";
|
|
1059
|
-
|
|
1060
|
-
const w = 2,
|
|
1059
|
+
c.width = 0, c.height = 0;
|
|
1060
|
+
const w = 2, k = 4, x = 16, t = window.devicePixelRatio || 1, n = "500 12px Arial", f = "12px map-iconfont";
|
|
1061
1061
|
s.font = n;
|
|
1062
|
-
const
|
|
1063
|
-
s.font =
|
|
1064
|
-
const
|
|
1065
|
-
let
|
|
1066
|
-
switch (
|
|
1062
|
+
const $ = s.measureText(e).width;
|
|
1063
|
+
s.font = f;
|
|
1064
|
+
const V = r.map((_) => ({ width: s.measureText(Te(_)).width, height: 14 })), i = V.reduce((_, u) => _ + u.width, 0), g = r.length * l, p = k + $ + i + g + k, h = w + 14 + w * 2;
|
|
1065
|
+
let C, q, A = 0, K = 0, I = 0, T = 0, L = 0, R = 0;
|
|
1066
|
+
switch (C = x + p, o) {
|
|
1067
1067
|
case "right-top":
|
|
1068
|
-
|
|
1068
|
+
q = x + h, A = 0, K = x + h, I = x, T = 0, L = x, R = 0;
|
|
1069
1069
|
break;
|
|
1070
1070
|
case "right-middle":
|
|
1071
|
-
|
|
1071
|
+
q = h, A = 0, K = h / 2, I = x, T = h / 2, L = x, R = 0;
|
|
1072
1072
|
break;
|
|
1073
1073
|
case "right-bottom":
|
|
1074
|
-
|
|
1074
|
+
q = x + h, A = 0, K = 0, I = x, T = x, L = x, R = x;
|
|
1075
1075
|
break;
|
|
1076
1076
|
case "left-top":
|
|
1077
|
-
|
|
1077
|
+
q = x + h, A = p, K = x, I = p + x, T = h + x, L = 0, R = 0;
|
|
1078
1078
|
break;
|
|
1079
1079
|
case "left-middle":
|
|
1080
|
-
|
|
1080
|
+
q = h, A = p, K = h / 2, I = p + x, T = h / 2, L = 0, R = 0;
|
|
1081
1081
|
break;
|
|
1082
1082
|
case "left-bottom":
|
|
1083
|
-
|
|
1083
|
+
q = x + h, A = p, K = h, I = p + x, T = 0, L = 0, R = x;
|
|
1084
1084
|
break;
|
|
1085
1085
|
}
|
|
1086
|
-
|
|
1087
|
-
const X =
|
|
1088
|
-
s.strokeStyle = "#ffffff", s.lineWidth = 1, s.strokeText(e, L +
|
|
1089
|
-
let Z = L +
|
|
1090
|
-
const W =
|
|
1091
|
-
r.length > 0 && r.forEach((_,
|
|
1092
|
-
s.fillText(
|
|
1086
|
+
q = q + w, c.width = Math.round(C * t), c.height = Math.round(q * t), s.scale(t, t), s.clearRect(0, 0, C, q), s.beginPath(), s.moveTo(A, K), s.lineTo(I, T), s.strokeStyle = "#FFF", s.lineWidth = 1, s.stroke(), s.fillStyle = "#FFF", s.fillRect(L, R, p, h), s.font = n, s.textBaseline = "middle";
|
|
1087
|
+
const X = R + w / 2 + h / 2;
|
|
1088
|
+
s.strokeStyle = "#ffffff", s.lineWidth = 1, s.strokeText(e, L + k, X), s.fillStyle = "#000000", s.fillText(e, L + k, X), s.font = f, s.fillStyle = "#3370ff";
|
|
1089
|
+
let Z = L + k + $ + l;
|
|
1090
|
+
const W = R + h / 2;
|
|
1091
|
+
r.length > 0 && r.forEach((_, u) => {
|
|
1092
|
+
s.fillText(Te(_), Z, W), Z += V[u].width + l;
|
|
1093
1093
|
});
|
|
1094
|
-
const G =
|
|
1095
|
-
return Ue.set(
|
|
1094
|
+
const G = c.toDataURL("image/png");
|
|
1095
|
+
return Ue.set(d, G), G;
|
|
1096
1096
|
}
|
|
1097
1097
|
const xt = (e, r) => {
|
|
1098
|
-
const { name: o, rightIcons: l, selected:
|
|
1098
|
+
const { name: o, rightIcons: l, selected: d } = e.getProperties(), c = r !== 1 ? Co() : "right-top", s = Mo(o, l, c);
|
|
1099
1099
|
let w = [0, 0];
|
|
1100
|
-
switch (
|
|
1100
|
+
switch (c) {
|
|
1101
1101
|
case "right-top":
|
|
1102
1102
|
w = [0, 1];
|
|
1103
1103
|
break;
|
|
@@ -1126,50 +1126,50 @@ const xt = (e, r) => {
|
|
|
1126
1126
|
anchorXUnits: "fraction",
|
|
1127
1127
|
anchorYUnits: "fraction"
|
|
1128
1128
|
}),
|
|
1129
|
-
zIndex:
|
|
1129
|
+
zIndex: d ? 100 : 10
|
|
1130
1130
|
});
|
|
1131
1131
|
}, To = (e) => {
|
|
1132
1132
|
let r = null, o = null;
|
|
1133
|
-
const l = new ye(),
|
|
1133
|
+
const l = new ye(), d = new _t({
|
|
1134
1134
|
source: l,
|
|
1135
1135
|
className: "zh-map--ship-layer",
|
|
1136
1136
|
renderBuffer: 300,
|
|
1137
1137
|
zIndex: 101,
|
|
1138
1138
|
properties: { layerType: re.SHIP }
|
|
1139
|
-
}),
|
|
1140
|
-
source:
|
|
1139
|
+
}), c = new ye(), s = new be({
|
|
1140
|
+
source: c,
|
|
1141
1141
|
className: "zh-map--ship-label-layer",
|
|
1142
1142
|
zIndex: 102,
|
|
1143
1143
|
updateWhileInteracting: !1,
|
|
1144
1144
|
updateWhileAnimating: !1,
|
|
1145
1145
|
properties: { layerType: re.SHIP },
|
|
1146
1146
|
declutter: !0
|
|
1147
|
-
}), w = new ye(),
|
|
1147
|
+
}), w = new ye(), k = new be({
|
|
1148
1148
|
source: w,
|
|
1149
1149
|
className: "zh-map--ship-selected-layer",
|
|
1150
1150
|
zIndex: 999
|
|
1151
1151
|
});
|
|
1152
|
-
e == null || e.addLayer(
|
|
1153
|
-
let
|
|
1154
|
-
const
|
|
1155
|
-
if (!
|
|
1152
|
+
e == null || e.addLayer(d), e == null || e.addLayer(s), e == null || e.addLayer(k);
|
|
1153
|
+
let x = null, t = null, n = null, f = null, M = "", $ = {}, V = {};
|
|
1154
|
+
const i = (u) => {
|
|
1155
|
+
if (!u || !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 D =
|
|
1159
|
-
D.length === 0 ?
|
|
1158
|
+
const D = u.filter((H) => H.id === E);
|
|
1159
|
+
D.length === 0 ? u.push(o) : o = D[0];
|
|
1160
1160
|
}
|
|
1161
|
-
|
|
1162
|
-
},
|
|
1163
|
-
var
|
|
1164
|
-
const E = (o == null ? void 0 : o.id) || (r == null ? void 0 : r.get("id")), D =
|
|
1161
|
+
C(), W(u), p();
|
|
1162
|
+
}, g = (u) => {
|
|
1163
|
+
var S;
|
|
1164
|
+
const E = (o == null ? void 0 : o.id) || (r == null ? void 0 : r.get("id")), D = ae([u == null ? void 0 : u.lon, u == null ? void 0 : u.lat]), H = ((S = V[u.id]) == null ? void 0 : S.blinkColors) || [], U = H[H.length - 1] || u.fill || "#04C900", te = wo(u), Y = new ue({
|
|
1165
1165
|
geometry: new ie(D),
|
|
1166
1166
|
// 船舶数据
|
|
1167
|
-
shipData:
|
|
1168
|
-
id:
|
|
1169
|
-
name:
|
|
1170
|
-
selected:
|
|
1167
|
+
shipData: u,
|
|
1168
|
+
id: u.id,
|
|
1169
|
+
name: u.cnname || u.enname || u.name || u.id || "未命名船舶",
|
|
1170
|
+
selected: u.id === E,
|
|
1171
1171
|
// 图标
|
|
1172
|
-
rightIcons: wt(
|
|
1172
|
+
rightIcons: wt(u),
|
|
1173
1173
|
// 船舶颜色
|
|
1174
1174
|
color: U,
|
|
1175
1175
|
// 船艏向的方向
|
|
@@ -1177,201 +1177,203 @@ const xt = (e, r) => {
|
|
|
1177
1177
|
// 高亮
|
|
1178
1178
|
isHighlight: !1
|
|
1179
1179
|
});
|
|
1180
|
-
return
|
|
1181
|
-
},
|
|
1180
|
+
return Y.set("clickGeometry", new Jt(D)), Y;
|
|
1181
|
+
}, p = () => {
|
|
1182
1182
|
if (o && e && o) {
|
|
1183
1183
|
w.getFeatures().length > 0 && w.clear();
|
|
1184
|
-
const
|
|
1185
|
-
geometry: new ie(
|
|
1184
|
+
const u = ae([o == null ? void 0 : o.lon, o == null ? void 0 : o.lat]), E = new ue({
|
|
1185
|
+
geometry: new ie(u),
|
|
1186
1186
|
id: o.id
|
|
1187
1187
|
});
|
|
1188
|
-
|
|
1188
|
+
setTimeout(() => {
|
|
1189
|
+
E.setStyle(bo(e, o)), w.addFeature(E);
|
|
1190
|
+
}, 300);
|
|
1189
1191
|
}
|
|
1190
|
-
},
|
|
1191
|
-
if (
|
|
1192
|
+
}, h = (u) => {
|
|
1193
|
+
if (u === "start") {
|
|
1192
1194
|
const E = () => {
|
|
1193
1195
|
const D = w.getFeatures();
|
|
1194
|
-
l.getFeatures().forEach((
|
|
1196
|
+
l.getFeatures().forEach((H) => {
|
|
1195
1197
|
var U, te;
|
|
1196
|
-
const J = Ne(e,
|
|
1197
|
-
if (
|
|
1198
|
-
const
|
|
1199
|
-
if (
|
|
1198
|
+
const J = Ne(e, H);
|
|
1199
|
+
if (H.setStyle(J), H.get("id") === (o == null ? void 0 : o.id) && D && D[0]) {
|
|
1200
|
+
const Y = D[0], S = Y == null ? void 0 : Y.getStyle();
|
|
1201
|
+
if (S && (S != null && S.getImage())) {
|
|
1200
1202
|
const se = (U = J.getImage()) == null ? void 0 : U.getScale();
|
|
1201
|
-
se && ((te =
|
|
1203
|
+
se && ((te = S.getImage()) == null || te.setScale(se));
|
|
1202
1204
|
}
|
|
1203
1205
|
}
|
|
1204
|
-
}),
|
|
1206
|
+
}), f = requestAnimationFrame(E);
|
|
1205
1207
|
};
|
|
1206
1208
|
E();
|
|
1207
1209
|
}
|
|
1208
|
-
|
|
1209
|
-
},
|
|
1210
|
-
e && l && (
|
|
1211
|
-
},
|
|
1212
|
-
const
|
|
1213
|
-
if (
|
|
1214
|
-
for (let E = 0; E <
|
|
1215
|
-
const D =
|
|
1210
|
+
u === "end" && f && (cancelAnimationFrame(f), f = null);
|
|
1211
|
+
}, C = () => {
|
|
1212
|
+
e && l && (q(), l.clear(), c.clear(), w.clear(), h("end"));
|
|
1213
|
+
}, q = () => {
|
|
1214
|
+
const u = e.getOverlays().getArray().filter((E) => E.get("class") == "zh-map-ship-overlay");
|
|
1215
|
+
if (u && u.length > 0)
|
|
1216
|
+
for (let E = 0; E < u.length; E++) {
|
|
1217
|
+
const D = u[E];
|
|
1216
1218
|
D.setPosition(void 0), e.removeOverlay(D), D.dispose();
|
|
1217
1219
|
}
|
|
1218
|
-
}, A = (
|
|
1219
|
-
|
|
1220
|
-
const D = e.getOverlays().getArray(),
|
|
1221
|
-
for (const J in
|
|
1222
|
-
const U =
|
|
1223
|
-
if (te &&
|
|
1224
|
-
const
|
|
1225
|
-
|
|
1220
|
+
}, A = (u, E) => {
|
|
1221
|
+
$ = u, V = E;
|
|
1222
|
+
const D = e.getOverlays().getArray(), H = l.getFeatures();
|
|
1223
|
+
for (const J in $) {
|
|
1224
|
+
const U = $[J], te = D.find((S) => (S == null ? void 0 : S.getId()) === "label-" + J), Y = H.find((S) => J === S.get("id"));
|
|
1225
|
+
if (te && Y) {
|
|
1226
|
+
const S = E[J].blinkColors || [], { shipData: se, name: he, color: ve } = Y.getProperties();
|
|
1227
|
+
Y.set("blinking", U), S[(S == null ? void 0 : S.length) - 1] && ve !== S[(S == null ? void 0 : S.length) - 1] && (Y.set("color", S[(S == null ? void 0 : S.length) - 1] || ""), Y.setStyle(Ne(e, Y)));
|
|
1226
1228
|
const Qe = {
|
|
1227
1229
|
...se,
|
|
1228
1230
|
blinking: U,
|
|
1229
|
-
blinkingColors:
|
|
1231
|
+
blinkingColors: S || [],
|
|
1230
1232
|
name: he + "(" + E[J].shipState + ")"
|
|
1231
|
-
},
|
|
1232
|
-
|
|
1233
|
+
}, Ze = te.getElement(), We = Tt(Qe);
|
|
1234
|
+
Ze && Ze !== We && te.setElement(We);
|
|
1233
1235
|
}
|
|
1234
1236
|
}
|
|
1235
|
-
}, K = (
|
|
1237
|
+
}, K = (u) => {
|
|
1236
1238
|
if (!e) return;
|
|
1237
|
-
const E = l.getFeatures(), D =
|
|
1238
|
-
|
|
1239
|
-
te.set(
|
|
1239
|
+
const E = l.getFeatures(), D = c.getFeatures(), H = r ? r.get("id") : "", J = E.filter((S) => S.get("id") !== H), U = D == null ? void 0 : D.filter((S) => S.get("id") !== H), te = /* @__PURE__ */ new Map();
|
|
1240
|
+
u.forEach((S) => {
|
|
1241
|
+
te.set(S.id, !0);
|
|
1240
1242
|
});
|
|
1241
|
-
const
|
|
1242
|
-
J.forEach((
|
|
1243
|
-
const se =
|
|
1243
|
+
const Y = e.getOverlays().getArray();
|
|
1244
|
+
J.forEach((S) => {
|
|
1245
|
+
const se = S.get("id");
|
|
1244
1246
|
if (!te.has(se))
|
|
1245
|
-
|
|
1247
|
+
S.setStyle([]);
|
|
1246
1248
|
else {
|
|
1247
|
-
const ve =
|
|
1248
|
-
(ve == null ? void 0 : ve.length) == 0 &&
|
|
1249
|
+
const ve = S.getStyle();
|
|
1250
|
+
(ve == null ? void 0 : ve.length) == 0 && S.setStyle(Ne(e, S));
|
|
1249
1251
|
}
|
|
1250
|
-
const he =
|
|
1252
|
+
const he = Y.find((ve) => ve.getId() === "label-" + se);
|
|
1251
1253
|
he && he.setPosition(void 0);
|
|
1252
|
-
}), U.forEach((
|
|
1253
|
-
const se =
|
|
1254
|
+
}), U.forEach((S) => {
|
|
1255
|
+
const se = S.get("id");
|
|
1254
1256
|
if (!te.has(se))
|
|
1255
|
-
|
|
1257
|
+
S.setStyle([]);
|
|
1256
1258
|
else {
|
|
1257
|
-
const he =
|
|
1258
|
-
(he == null ? void 0 : he.length) == 0 &&
|
|
1259
|
+
const he = S.getStyle();
|
|
1260
|
+
(he == null ? void 0 : he.length) == 0 && S.setStyle(xt(S, u.length));
|
|
1259
1261
|
}
|
|
1260
1262
|
});
|
|
1261
|
-
}, I = (
|
|
1262
|
-
if (
|
|
1263
|
-
console.log("选中",
|
|
1264
|
-
const E = l.getFeatures().find((
|
|
1265
|
-
E && (r = E), D && D.set("selected", !0), o =
|
|
1263
|
+
}, I = (u) => {
|
|
1264
|
+
if (u) {
|
|
1265
|
+
console.log("选中", u);
|
|
1266
|
+
const E = l.getFeatures().find((H) => H.get("id") === u.id), D = c.getFeatures().find((H) => H.get("id") === u.id);
|
|
1267
|
+
E && (r = E), D && D.set("selected", !0), o = u, p();
|
|
1266
1268
|
} else
|
|
1267
1269
|
console.log("取消选中"), o = null, r = null, X();
|
|
1268
|
-
}, T = (
|
|
1269
|
-
t =
|
|
1270
|
-
}, L = Qt((
|
|
1270
|
+
}, T = (u, E, D) => {
|
|
1271
|
+
t = u, n = E, x = D, console.log("setShipLabelStatus", x, t, n);
|
|
1272
|
+
}, L = Qt((u, E, D) => {
|
|
1271
1273
|
try {
|
|
1272
|
-
if (
|
|
1273
|
-
const
|
|
1274
|
-
if (E === "click" && (I(
|
|
1275
|
-
M && M !== J &&
|
|
1274
|
+
if (u) {
|
|
1275
|
+
const H = u.get("shipData"), J = u.get("id");
|
|
1276
|
+
if (E === "click" && (I(H), D && D(J)), E === "hover") {
|
|
1277
|
+
M && M !== J && R(), M = J;
|
|
1276
1278
|
const U = l.getFeatures().find((te) => te.get("id") === M);
|
|
1277
1279
|
U == null || U.set("isHighlight", !0), U == null || U.setStyle(Ne(e, U));
|
|
1278
1280
|
}
|
|
1279
1281
|
} else
|
|
1280
|
-
|
|
1281
|
-
} catch (
|
|
1282
|
-
console.log("handleShipMapEvent",
|
|
1282
|
+
R();
|
|
1283
|
+
} catch (H) {
|
|
1284
|
+
console.log("handleShipMapEvent", H);
|
|
1283
1285
|
}
|
|
1284
|
-
}, 10),
|
|
1285
|
-
const
|
|
1286
|
-
M = null,
|
|
1286
|
+
}, 10), R = () => {
|
|
1287
|
+
const u = M ? l.getFeatures().find((E) => E.get("id") === M) : null;
|
|
1288
|
+
M = null, u == null || u.set("isHighlight", !1), u == null || u.setStyle(Ne(e, u));
|
|
1287
1289
|
}, X = () => {
|
|
1288
1290
|
try {
|
|
1289
1291
|
w.clear();
|
|
1290
|
-
} catch (
|
|
1291
|
-
console.log(
|
|
1292
|
+
} catch (u) {
|
|
1293
|
+
console.log(u);
|
|
1292
1294
|
}
|
|
1293
|
-
}, Z = (
|
|
1294
|
-
const D =
|
|
1295
|
+
}, Z = (u, E) => {
|
|
1296
|
+
const D = ae([u == null ? void 0 : u.lon, u == null ? void 0 : u.lat]), H = new ue({
|
|
1295
1297
|
geometry: new ie(D),
|
|
1296
|
-
name:
|
|
1298
|
+
name: u.cnname || u.enname || u.name || u.id || "未命名船舶",
|
|
1297
1299
|
// 图标
|
|
1298
|
-
rightIcons: wt(
|
|
1299
|
-
selected: (
|
|
1300
|
-
shipData:
|
|
1300
|
+
rightIcons: wt(u),
|
|
1301
|
+
selected: (u == null ? void 0 : u.id) === (o == null ? void 0 : o.id),
|
|
1302
|
+
shipData: u
|
|
1301
1303
|
});
|
|
1302
|
-
|
|
1303
|
-
const J = xt(
|
|
1304
|
-
return
|
|
1305
|
-
}, W = (
|
|
1306
|
-
const E = e.getView().getZoom(), D = [],
|
|
1307
|
-
|
|
1308
|
-
const
|
|
1309
|
-
|
|
1310
|
-
}), (n !== null ? n : (o == null ? void 0 : o.id) &&
|
|
1311
|
-
_(
|
|
1312
|
-
}), o && (
|
|
1313
|
-
G(
|
|
1304
|
+
H.set("id", u.id);
|
|
1305
|
+
const J = xt(H, E);
|
|
1306
|
+
return H.setStyle(J), H;
|
|
1307
|
+
}, W = (u) => {
|
|
1308
|
+
const E = e.getView().getZoom(), D = [], H = [];
|
|
1309
|
+
u.forEach((Y) => {
|
|
1310
|
+
const S = g(Y);
|
|
1311
|
+
S.setStyle(Ne(e, S)), l.addFeature(S), $[Y.id] && D.push(Y), (o == null ? void 0 : o.id) == Y.id && (o = Y), !$[Y.id] && (o == null ? void 0 : o.id) !== Y.id && H.push(Y);
|
|
1312
|
+
}), (n !== null ? n : (o == null ? void 0 : o.id) && $[o == null ? void 0 : o.id] || E && E >= de.shipModelMin) && D.map((Y) => {
|
|
1313
|
+
_(Y);
|
|
1314
|
+
}), o && (x !== null ? x : !0) && !$[o == null ? void 0 : o.id] && G(o, u), (t !== null ? t : E && E >= de.shipModelMin) && H.map((Y) => {
|
|
1315
|
+
G(Y, u);
|
|
1314
1316
|
});
|
|
1315
|
-
}, G = (
|
|
1316
|
-
const D = Z(
|
|
1317
|
-
|
|
1318
|
-
}, _ = (
|
|
1319
|
-
if (
|
|
1320
|
-
const E =
|
|
1321
|
-
...
|
|
1317
|
+
}, G = (u, E) => {
|
|
1318
|
+
const D = Z(u, E.length);
|
|
1319
|
+
c.addFeature(D);
|
|
1320
|
+
}, _ = (u) => {
|
|
1321
|
+
if (u.id && V[u == null ? void 0 : u.id]) {
|
|
1322
|
+
const E = V[u == null ? void 0 : u.id] || {}, D = (E == null ? void 0 : E.blinkColors) || [], H = (E == null ? void 0 : E.shipState) || "", J = (u.cnname || u.enname || u.name || u.id || "未命名船舶") + "(" + H + ")", U = {
|
|
1323
|
+
...u,
|
|
1322
1324
|
name: J,
|
|
1323
|
-
blinking:
|
|
1325
|
+
blinking: $[u.id],
|
|
1324
1326
|
blinkingColors: D || []
|
|
1325
1327
|
};
|
|
1326
1328
|
po(e, U);
|
|
1327
1329
|
}
|
|
1328
1330
|
};
|
|
1329
1331
|
return {
|
|
1330
|
-
render:
|
|
1332
|
+
render: i,
|
|
1331
1333
|
selected: I,
|
|
1332
1334
|
filter: K,
|
|
1333
1335
|
blinking: A,
|
|
1334
|
-
clear:
|
|
1336
|
+
clear: C,
|
|
1335
1337
|
setLableStatus: T,
|
|
1336
1338
|
handleShipMapEvent: L,
|
|
1337
|
-
changeShipScale:
|
|
1339
|
+
changeShipScale: h
|
|
1338
1340
|
};
|
|
1339
1341
|
}, Eo = (e) => {
|
|
1340
|
-
const r = () => e == null ? void 0 : e.getLayers(), o =
|
|
1341
|
-
o.value =
|
|
1342
|
-
const
|
|
1343
|
-
|
|
1344
|
-
(t.className_ === "vector" || t.className_ === "satellite") && t.setVisible(t.className_ ===
|
|
1342
|
+
const r = () => e == null ? void 0 : e.getLayers(), o = fe("vector"), l = () => o.value, d = (k) => {
|
|
1343
|
+
o.value = k;
|
|
1344
|
+
const x = r();
|
|
1345
|
+
x && (x == null || x.getArray().forEach((t) => {
|
|
1346
|
+
(t.className_ === "vector" || t.className_ === "satellite") && t.setVisible(t.className_ === k);
|
|
1345
1347
|
}));
|
|
1346
|
-
},
|
|
1348
|
+
}, c = fe(!1);
|
|
1347
1349
|
return {
|
|
1348
1350
|
getLayers: r,
|
|
1349
|
-
getGreenTileVisible: () =>
|
|
1350
|
-
setGreenTileVisible: (
|
|
1351
|
-
if (
|
|
1352
|
-
if (
|
|
1353
|
-
const
|
|
1354
|
-
if (!
|
|
1351
|
+
getGreenTileVisible: () => c.value,
|
|
1352
|
+
setGreenTileVisible: (k) => {
|
|
1353
|
+
if (k !== c.value) {
|
|
1354
|
+
if (k) {
|
|
1355
|
+
const x = r();
|
|
1356
|
+
if (!x.getArray().find((n) => n.className_ === "greenTile")) {
|
|
1355
1357
|
const n = new Re({
|
|
1356
|
-
source: new $e({ url:
|
|
1357
|
-
visible:
|
|
1358
|
+
source: new $e({ url: Me.greenTile }),
|
|
1359
|
+
visible: k,
|
|
1358
1360
|
zIndex: 2,
|
|
1359
1361
|
className: "greenTile"
|
|
1360
1362
|
});
|
|
1361
|
-
|
|
1363
|
+
x.push(n);
|
|
1362
1364
|
}
|
|
1363
1365
|
} else {
|
|
1364
|
-
const
|
|
1365
|
-
t &&
|
|
1366
|
+
const x = r(), t = x.getArray().find((n) => n.className_ === "greenTile");
|
|
1367
|
+
t && x.remove(t);
|
|
1366
1368
|
}
|
|
1367
|
-
|
|
1369
|
+
c.value = k;
|
|
1368
1370
|
}
|
|
1369
1371
|
},
|
|
1370
1372
|
getShowLayerType: l,
|
|
1371
|
-
setShowLayerType:
|
|
1373
|
+
setShowLayerType: d
|
|
1372
1374
|
};
|
|
1373
1375
|
}, Po = () => {
|
|
1374
|
-
const e =
|
|
1376
|
+
const e = fe();
|
|
1375
1377
|
return {
|
|
1376
1378
|
setProps: (l) => {
|
|
1377
1379
|
e.value = l;
|
|
@@ -1380,44 +1382,47 @@ const xt = (e, r) => {
|
|
|
1380
1382
|
};
|
|
1381
1383
|
}, Fo = (e) => {
|
|
1382
1384
|
const r = "zh-map-location-layer";
|
|
1383
|
-
let o
|
|
1384
|
-
const
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1385
|
+
let o;
|
|
1386
|
+
const l = new ye();
|
|
1387
|
+
let d = null, c = null;
|
|
1388
|
+
const s = (i) => {
|
|
1389
|
+
if (!(!i || i.length === 0)) {
|
|
1390
|
+
if (l.clear(), c) {
|
|
1391
|
+
const g = i.find((p) => p.id === (c == null ? void 0 : c.id));
|
|
1392
|
+
g ? c = g : i.push(c);
|
|
1389
1393
|
}
|
|
1390
|
-
|
|
1391
|
-
w(
|
|
1392
|
-
}), o || (o = new
|
|
1394
|
+
i.forEach((g) => {
|
|
1395
|
+
w(g);
|
|
1396
|
+
}), o || (o = new be({
|
|
1393
1397
|
className: r,
|
|
1394
1398
|
source: l,
|
|
1395
1399
|
zIndex: 100
|
|
1396
1400
|
}), e == null || e.addLayer(o));
|
|
1397
1401
|
}
|
|
1398
|
-
}, w = (
|
|
1399
|
-
const
|
|
1400
|
-
geometry: new ie(
|
|
1402
|
+
}, w = (i) => {
|
|
1403
|
+
const g = e == null ? void 0 : e.getView().getZoom(), [p, h] = i.latLon.split(","), C = new ue({
|
|
1404
|
+
geometry: new ie(ae([Number(p), Number(h)]))
|
|
1401
1405
|
});
|
|
1402
|
-
C.setStyle(
|
|
1403
|
-
},
|
|
1404
|
-
let
|
|
1405
|
-
src:
|
|
1406
|
-
|
|
1406
|
+
C.setStyle(k(i, g, i.id === (c == null ? void 0 : c.id))), C.set("loactionData", i), l.addFeature(C);
|
|
1407
|
+
}, k = (i, g, p) => {
|
|
1408
|
+
let h = {
|
|
1409
|
+
src: p && i.selectedPath || i.defaultPath
|
|
1410
|
+
};
|
|
1411
|
+
i != null && i.width && (i != null && i.height) ? h = {
|
|
1412
|
+
...h,
|
|
1413
|
+
width: i.width,
|
|
1414
|
+
height: i.height
|
|
1415
|
+
} : h = {
|
|
1416
|
+
...h,
|
|
1417
|
+
scale: 0.5 * g / 10
|
|
1407
1418
|
};
|
|
1408
|
-
x != null && x.width && (x != null && x.height) && (m = {
|
|
1409
|
-
...m,
|
|
1410
|
-
width: x.width,
|
|
1411
|
-
height: x.height,
|
|
1412
|
-
scale: 1
|
|
1413
|
-
});
|
|
1414
1419
|
let C = {
|
|
1415
|
-
image: new Pe(
|
|
1420
|
+
image: new Pe(h)
|
|
1416
1421
|
};
|
|
1417
|
-
return
|
|
1422
|
+
return i.name && (C = {
|
|
1418
1423
|
...C,
|
|
1419
1424
|
text: new Ve({
|
|
1420
|
-
text:
|
|
1425
|
+
text: i.name,
|
|
1421
1426
|
font: "12px sans-serif",
|
|
1422
1427
|
fill: new ce({
|
|
1423
1428
|
color: "#000000"
|
|
@@ -1428,37 +1433,61 @@ const xt = (e, r) => {
|
|
|
1428
1433
|
offsetY: 30
|
|
1429
1434
|
})
|
|
1430
1435
|
}), new ee(C);
|
|
1431
|
-
},
|
|
1432
|
-
if (
|
|
1433
|
-
const
|
|
1434
|
-
l.getFeatures().forEach((
|
|
1435
|
-
|
|
1436
|
+
}, x = () => {
|
|
1437
|
+
if (d) {
|
|
1438
|
+
const i = d.get("loactionData").id;
|
|
1439
|
+
l.getFeatures().forEach((g) => {
|
|
1440
|
+
g.get("loactionData").id !== i && l.removeFeature(g);
|
|
1436
1441
|
});
|
|
1437
1442
|
} else
|
|
1438
1443
|
l.clear();
|
|
1439
1444
|
}, t = () => {
|
|
1440
|
-
var
|
|
1441
|
-
const
|
|
1445
|
+
var h;
|
|
1446
|
+
const i = d == null ? void 0 : d.get("loactionData"), g = (h = e == null ? void 0 : e.getView()) == null ? void 0 : h.getZoom();
|
|
1442
1447
|
l.getFeatures().forEach((C) => {
|
|
1443
|
-
C.get("loactionData").id ===
|
|
1444
|
-
}),
|
|
1445
|
-
}, n = (
|
|
1446
|
-
|
|
1447
|
-
},
|
|
1448
|
-
var
|
|
1449
|
-
if (
|
|
1450
|
-
const
|
|
1451
|
-
|
|
1448
|
+
C.get("loactionData").id === i.id && (C == null || C.setStyle(k(i, g, !1)));
|
|
1449
|
+
}), c = null, d = null;
|
|
1450
|
+
}, n = (i) => {
|
|
1451
|
+
i ? (f(), M(i)) : t();
|
|
1452
|
+
}, f = () => {
|
|
1453
|
+
var i;
|
|
1454
|
+
if (d) {
|
|
1455
|
+
const g = d.get("loactionData"), p = (i = e == null ? void 0 : e.getView()) == null ? void 0 : i.getZoom();
|
|
1456
|
+
d.setStyle(k(g, p, !1));
|
|
1452
1457
|
}
|
|
1453
|
-
}, M = (
|
|
1454
|
-
const
|
|
1455
|
-
|
|
1458
|
+
}, M = (i) => {
|
|
1459
|
+
const g = l.getFeatures();
|
|
1460
|
+
c = i, d = g.find((p) => p.get("loactionData").id === i.id);
|
|
1456
1461
|
};
|
|
1457
1462
|
return {
|
|
1458
1463
|
render: s,
|
|
1464
|
+
renderHtml: (i, g, p, h) => {
|
|
1465
|
+
const C = document.createElement("div");
|
|
1466
|
+
C.innerHTML = p;
|
|
1467
|
+
let q = {
|
|
1468
|
+
element: C,
|
|
1469
|
+
// 覆盖层的DOM元素
|
|
1470
|
+
positioning: "top-center",
|
|
1471
|
+
// 相对于位置点的定位
|
|
1472
|
+
stopEvent: !1,
|
|
1473
|
+
// 是否阻止事件传播
|
|
1474
|
+
offset: [0, -20],
|
|
1475
|
+
id: "position-" + i
|
|
1476
|
+
};
|
|
1477
|
+
h && (q = {
|
|
1478
|
+
...q,
|
|
1479
|
+
...h
|
|
1480
|
+
});
|
|
1481
|
+
const A = new xe(q);
|
|
1482
|
+
A.setPosition(ae(g)), e.addOverlay(A);
|
|
1483
|
+
},
|
|
1484
|
+
removeHtml: (i) => {
|
|
1485
|
+
const g = e.getOverlays().getArray().find((p) => p.getId() === "position-" + i);
|
|
1486
|
+
g && (g.setPosition(void 0), e.removeOverlay(g));
|
|
1487
|
+
},
|
|
1459
1488
|
selected: n,
|
|
1460
1489
|
clearSelected: t,
|
|
1461
|
-
clear:
|
|
1490
|
+
clear: x
|
|
1462
1491
|
};
|
|
1463
1492
|
}, So = (e) => {
|
|
1464
1493
|
e.getInteractions().forEach((r) => {
|
|
@@ -1468,23 +1497,23 @@ const xt = (e, r) => {
|
|
|
1468
1497
|
e.getInteractions().forEach((r) => {
|
|
1469
1498
|
r instanceof st && r.setActive(!0);
|
|
1470
1499
|
});
|
|
1471
|
-
},
|
|
1500
|
+
}, ke = (e, r) => {
|
|
1472
1501
|
const o = e.getViewport();
|
|
1473
1502
|
o && (o.style.cursor = r);
|
|
1474
1503
|
}, Ro = (e, r) => {
|
|
1475
|
-
const o =
|
|
1504
|
+
const o = fe([]), l = fe("km"), d = (T) => {
|
|
1476
1505
|
l.value = T;
|
|
1477
1506
|
};
|
|
1478
|
-
let
|
|
1507
|
+
let c, s = "close";
|
|
1479
1508
|
const w = () => {
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
}),
|
|
1509
|
+
ke(e, "crosshair"), t(), So(e), e.on("pointermove", M), e.getViewport().addEventListener("mouseout", () => {
|
|
1510
|
+
c && c.classList.add("hidden");
|
|
1511
|
+
}), V(), s = "open";
|
|
1483
1512
|
};
|
|
1484
|
-
let
|
|
1513
|
+
let k, x;
|
|
1485
1514
|
const t = () => {
|
|
1486
|
-
|
|
1487
|
-
source:
|
|
1515
|
+
k = new ye(), x = new be({
|
|
1516
|
+
source: k,
|
|
1488
1517
|
zIndex: 1e3,
|
|
1489
1518
|
style: {
|
|
1490
1519
|
"fill-color": "rgba(255, 255, 255, 0.2)",
|
|
@@ -1493,32 +1522,32 @@ const xt = (e, r) => {
|
|
|
1493
1522
|
"circle-radius": 7,
|
|
1494
1523
|
"circle-fill-color": "#ffcc33"
|
|
1495
1524
|
}
|
|
1496
|
-
}), e == null || e.addLayer(
|
|
1525
|
+
}), e == null || e.addLayer(x);
|
|
1497
1526
|
};
|
|
1498
|
-
let n,
|
|
1527
|
+
let n, f;
|
|
1499
1528
|
const M = (T) => {
|
|
1500
1529
|
if (T.dragging)
|
|
1501
1530
|
return;
|
|
1502
1531
|
let L = "点击选择起点";
|
|
1503
|
-
n && (L = "单击继续,双击结束"),
|
|
1532
|
+
n && (L = "单击继续,双击结束"), c && (c.innerHTML = L, f.setPosition(T.coordinate), c.classList.remove("hidden"));
|
|
1504
1533
|
};
|
|
1505
|
-
let
|
|
1506
|
-
const
|
|
1507
|
-
|
|
1508
|
-
source:
|
|
1534
|
+
let $;
|
|
1535
|
+
const V = () => {
|
|
1536
|
+
$ = new je({
|
|
1537
|
+
source: k,
|
|
1509
1538
|
type: "LineString",
|
|
1510
1539
|
style: new ee({
|
|
1511
1540
|
fill: new ce({
|
|
1512
1541
|
color: "rgba(255, 255, 255, 0.2)"
|
|
1513
1542
|
}),
|
|
1514
|
-
stroke: new
|
|
1543
|
+
stroke: new Ee({
|
|
1515
1544
|
color: "rgba(255,204,51)",
|
|
1516
1545
|
lineDash: [10, 10],
|
|
1517
1546
|
width: 2
|
|
1518
1547
|
}),
|
|
1519
1548
|
image: new Ke({
|
|
1520
1549
|
radius: 5,
|
|
1521
|
-
stroke: new
|
|
1550
|
+
stroke: new Ee({
|
|
1522
1551
|
color: "rgba(0, 0, 0, 0.7)"
|
|
1523
1552
|
}),
|
|
1524
1553
|
fill: new ce({
|
|
@@ -1528,140 +1557,140 @@ const xt = (e, r) => {
|
|
|
1528
1557
|
}),
|
|
1529
1558
|
// 添加条件函数,判断是否应该出发点绘制
|
|
1530
1559
|
condition: (L) => L.originalEvent.target.tagName !== "DIV"
|
|
1531
|
-
}), e == null || e.addInteraction(
|
|
1560
|
+
}), e == null || e.addInteraction($), h(), C();
|
|
1532
1561
|
let T;
|
|
1533
|
-
|
|
1562
|
+
$.on("drawstart", function(L) {
|
|
1534
1563
|
var X;
|
|
1535
|
-
n = L.feature, n.set("randomId",
|
|
1536
|
-
let
|
|
1564
|
+
n = L.feature, n.set("randomId", i());
|
|
1565
|
+
let R;
|
|
1537
1566
|
T = (X = n.getGeometry()) == null ? void 0 : X.on("change", function(Z) {
|
|
1538
1567
|
const W = Z.target, G = Et(W, l.value);
|
|
1539
|
-
|
|
1568
|
+
R = W.getLastCoordinate(), g && G && (g.innerHTML = G), p.setPosition(R);
|
|
1540
1569
|
});
|
|
1541
|
-
}),
|
|
1542
|
-
var L,
|
|
1543
|
-
if (
|
|
1544
|
-
const Z = (n == null ? void 0 : n.get("randomId")) ||
|
|
1545
|
-
o.value.push({ id: Z, value:
|
|
1570
|
+
}), $.on("drawend", function() {
|
|
1571
|
+
var L, R, X;
|
|
1572
|
+
if (g && (g.className = "ol-tooltip ol-tooltip-static ol-tooltip-measure"), g != null && g.innerHTML) {
|
|
1573
|
+
const Z = (n == null ? void 0 : n.get("randomId")) || i();
|
|
1574
|
+
o.value.push({ id: Z, value: g == null ? void 0 : g.innerHTML }), g.innerHTML = `${g.innerHTML}<div class="ol-tooltip-delete-button" data-id="${Z}"><i class="map-iconfont icon-delete"></i></div>`;
|
|
1546
1575
|
}
|
|
1547
1576
|
(L = document.querySelector(".ol-selectable:has(.ol-tooltip-delete-button):last-child .ol-tooltip-delete-button")) == null || L.addEventListener("click", (Z) => {
|
|
1548
1577
|
var G;
|
|
1549
1578
|
Z.preventDefault(), Z.stopPropagation();
|
|
1550
1579
|
const W = (G = Z.target) == null ? void 0 : G.getAttribute("data-id");
|
|
1551
1580
|
W && A(W);
|
|
1552
|
-
}),
|
|
1581
|
+
}), p.setOffset([0, -7]), n = null, g = null, h(), T && ot(T), (X = (R = r.getProps()) == null ? void 0 : R.lineDrawEnd) == null || X.call(R, o.value);
|
|
1553
1582
|
});
|
|
1554
|
-
},
|
|
1555
|
-
let
|
|
1556
|
-
const
|
|
1557
|
-
|
|
1558
|
-
element:
|
|
1583
|
+
}, i = () => Math.random().toString(36).substring(2, 9);
|
|
1584
|
+
let g, p;
|
|
1585
|
+
const h = () => {
|
|
1586
|
+
g != null && g.parentNode && g.parentNode.removeChild(g), g = document.createElement("div"), g.className = "ol-tooltip ol-tooltip-measure", p = new xe({
|
|
1587
|
+
element: g,
|
|
1559
1588
|
offset: [0, -15],
|
|
1560
1589
|
positioning: "bottom-center",
|
|
1561
1590
|
stopEvent: !1,
|
|
1562
1591
|
insertFirst: !1
|
|
1563
|
-
}), e == null || e.addOverlay(
|
|
1564
|
-
},
|
|
1565
|
-
|
|
1592
|
+
}), e == null || e.addOverlay(p);
|
|
1593
|
+
}, C = () => {
|
|
1594
|
+
c != null && c.parentNode && c.parentNode.removeChild(c), c = document.createElement("div"), c.className = "ol-tooltip hidden", c.addEventListener("click", (T) => {
|
|
1566
1595
|
T.preventDefault(), T.stopPropagation();
|
|
1567
|
-
}),
|
|
1568
|
-
element:
|
|
1596
|
+
}), f = new xe({
|
|
1597
|
+
element: c,
|
|
1569
1598
|
offset: [15, 0],
|
|
1570
1599
|
positioning: "center-left"
|
|
1571
|
-
}), e == null || e.addOverlay(
|
|
1572
|
-
},
|
|
1600
|
+
}), e == null || e.addOverlay(f);
|
|
1601
|
+
}, q = () => {
|
|
1573
1602
|
o.value.forEach((T, L) => {
|
|
1574
1603
|
var Z, W;
|
|
1575
|
-
const
|
|
1576
|
-
|
|
1577
|
-
const X =
|
|
1578
|
-
X[L] &&
|
|
1579
|
-
}), K(), No(e), s = "close",
|
|
1604
|
+
const R = document.querySelectorAll(".ol-tooltip.ol-tooltip-static.ol-tooltip-measure");
|
|
1605
|
+
R[L] && ((W = (Z = R[L]) == null ? void 0 : Z.parentNode) == null || W.removeChild(R[L]));
|
|
1606
|
+
const X = k.getFeatures();
|
|
1607
|
+
X[L] && k.removeFeature(X[L]);
|
|
1608
|
+
}), K(), No(e), s = "close", ke(e, "grab");
|
|
1580
1609
|
}, A = (T) => {
|
|
1581
|
-
var
|
|
1610
|
+
var R, X, Z, W;
|
|
1582
1611
|
const L = o.value.findIndex((G) => G.id === T);
|
|
1583
1612
|
if (L !== -1) {
|
|
1584
1613
|
o.value.splice(L, 1);
|
|
1585
1614
|
const G = document.querySelectorAll(".ol-tooltip.ol-tooltip-static.ol-tooltip-measure");
|
|
1586
|
-
G[L] && ((X = (
|
|
1587
|
-
const _ =
|
|
1588
|
-
_[L] &&
|
|
1615
|
+
G[L] && ((X = (R = G[L]) == null ? void 0 : R.parentNode) == null || X.removeChild(G[L]));
|
|
1616
|
+
const _ = k.getFeatures();
|
|
1617
|
+
_[L] && k.removeFeature(_[L]);
|
|
1589
1618
|
}
|
|
1590
1619
|
(W = (Z = r.getProps()) == null ? void 0 : Z.lineDrawEnd) == null || W.call(Z, o.value);
|
|
1591
1620
|
}, K = () => {
|
|
1592
1621
|
if (o.value = [], document.querySelectorAll(".ol-tooltip.ol-tooltip-static").forEach((T) => {
|
|
1593
1622
|
var L;
|
|
1594
1623
|
(L = T == null ? void 0 : T.parentNode) == null || L.removeChild(T);
|
|
1595
|
-
}),
|
|
1596
|
-
const T = e.getInteractions().getArray().find((L) => mt(L) === mt(
|
|
1624
|
+
}), k == null || k.clear(), $) {
|
|
1625
|
+
const T = e.getInteractions().getArray().find((L) => mt(L) === mt($));
|
|
1597
1626
|
T && e.removeInteraction(T);
|
|
1598
1627
|
}
|
|
1599
|
-
e.removeLayer(
|
|
1628
|
+
e.removeLayer(x), c != null && c.parentNode && c.parentNode.removeChild(c), g != null && g.parentNode && g.parentNode.removeChild(g);
|
|
1600
1629
|
};
|
|
1601
1630
|
return {
|
|
1602
1631
|
open: w,
|
|
1603
|
-
close:
|
|
1632
|
+
close: q,
|
|
1604
1633
|
deleteLine: A,
|
|
1605
|
-
setUnit:
|
|
1634
|
+
setUnit: d,
|
|
1606
1635
|
getState: () => s
|
|
1607
1636
|
};
|
|
1608
1637
|
}, Et = (e, r) => {
|
|
1609
1638
|
const l = it(e);
|
|
1610
|
-
let
|
|
1639
|
+
let d = "";
|
|
1611
1640
|
switch (r) {
|
|
1612
1641
|
case "m":
|
|
1613
|
-
|
|
1642
|
+
d = `${Math.round(l * 100) / 100} m`;
|
|
1614
1643
|
break;
|
|
1615
1644
|
case "km":
|
|
1616
|
-
|
|
1645
|
+
d = `${Math.round(l / 1e3 * 100) / 100} km`;
|
|
1617
1646
|
break;
|
|
1618
1647
|
case "nm":
|
|
1619
|
-
|
|
1648
|
+
d = (Math.round(l / 1e3 * 100) / 100 / 1.852).toFixed(2) + " nm";
|
|
1620
1649
|
break;
|
|
1621
1650
|
}
|
|
1622
|
-
return
|
|
1651
|
+
return d;
|
|
1623
1652
|
}, $o = (e, r) => {
|
|
1624
|
-
let o, l,
|
|
1625
|
-
const
|
|
1626
|
-
K(),
|
|
1653
|
+
let o, l, d = "close";
|
|
1654
|
+
const c = () => {
|
|
1655
|
+
K(), d = "open", s(), ke(e, "crosshair");
|
|
1627
1656
|
}, s = () => {
|
|
1628
|
-
|
|
1657
|
+
x(), p(), q(), $();
|
|
1629
1658
|
};
|
|
1630
|
-
let w = null,
|
|
1631
|
-
const
|
|
1632
|
-
if (w &&
|
|
1633
|
-
const T = new ye(), L = new
|
|
1659
|
+
let w = null, k = null;
|
|
1660
|
+
const x = () => {
|
|
1661
|
+
if (w && k) return;
|
|
1662
|
+
const T = new ye(), L = new be({
|
|
1634
1663
|
source: T,
|
|
1635
1664
|
style: new ee({
|
|
1636
|
-
stroke: new
|
|
1665
|
+
stroke: new Ee({
|
|
1637
1666
|
color: "#fbcc33",
|
|
1638
1667
|
width: 2
|
|
1639
1668
|
})
|
|
1640
1669
|
}),
|
|
1641
1670
|
zIndex: 1e3
|
|
1642
1671
|
});
|
|
1643
|
-
w = L,
|
|
1644
|
-
|
|
1672
|
+
w = L, k = T, e.on("pointermove", n), e.addLayer(L), e.on(["dblclick"], function(R) {
|
|
1673
|
+
f && (R.stopPropagation(), R.preventDefault());
|
|
1645
1674
|
});
|
|
1646
1675
|
};
|
|
1647
1676
|
let t;
|
|
1648
1677
|
const n = (T) => {
|
|
1649
1678
|
if (T.dragging) return;
|
|
1650
1679
|
const L = t ? "单击继续,双击结束" : "点击选择起点";
|
|
1651
|
-
|
|
1680
|
+
h && (h.innerHTML = L, C.setPosition(T.coordinate));
|
|
1652
1681
|
};
|
|
1653
|
-
let
|
|
1654
|
-
const
|
|
1682
|
+
let f, M = !1;
|
|
1683
|
+
const $ = () => {
|
|
1655
1684
|
if (o) {
|
|
1656
|
-
|
|
1685
|
+
h != null && h.parentNode && h.parentNode.removeChild(h);
|
|
1657
1686
|
const T = o.getGeometry();
|
|
1658
1687
|
if (!T) return;
|
|
1659
|
-
const L =
|
|
1660
|
-
|
|
1688
|
+
const L = V(T, "nm");
|
|
1689
|
+
i && (i.innerHTML = `
|
|
1661
1690
|
<span class="text">面积:${L}${M ? '<span class="error pl-12">超出可以绘画的距离</span>' : ""}</span>
|
|
1662
|
-
`),
|
|
1663
|
-
const
|
|
1664
|
-
if (
|
|
1691
|
+
`), i && (i.innerHTML += '<span class="delete-icon" ><i class="map-iconfont icon-delete" /></div>');
|
|
1692
|
+
const R = T.getCoordinates(), X = R[0][R[0].length - 2];
|
|
1693
|
+
if (g.setPosition(X), w) {
|
|
1665
1694
|
const W = w.getSource();
|
|
1666
1695
|
W && o && (W.clear(), W.addFeature(o));
|
|
1667
1696
|
}
|
|
@@ -1676,12 +1705,12 @@ const xt = (e, r) => {
|
|
|
1676
1705
|
e == null || e.getView().setCenter(Z);
|
|
1677
1706
|
return;
|
|
1678
1707
|
}
|
|
1679
|
-
|
|
1708
|
+
f = new je({
|
|
1680
1709
|
type: "Polygon",
|
|
1681
|
-
source:
|
|
1710
|
+
source: k,
|
|
1682
1711
|
trace: !0,
|
|
1683
1712
|
style: [new ee({
|
|
1684
|
-
stroke: new
|
|
1713
|
+
stroke: new Ee({
|
|
1685
1714
|
color: "rgba(255, 255, 255, 1)",
|
|
1686
1715
|
width: 1.5,
|
|
1687
1716
|
lineDash: [10, 10]
|
|
@@ -1701,23 +1730,23 @@ const xt = (e, r) => {
|
|
|
1701
1730
|
return new eo(L);
|
|
1702
1731
|
}
|
|
1703
1732
|
})]
|
|
1704
|
-
}), e == null || e.addInteraction(
|
|
1733
|
+
}), e == null || e.addInteraction(f), f.on("drawstart", (T) => {
|
|
1705
1734
|
var L;
|
|
1706
|
-
t = T.feature, l = (L = t.getGeometry()) == null ? void 0 : L.on("change", (
|
|
1707
|
-
const X =
|
|
1735
|
+
t = T.feature, l = (L = t.getGeometry()) == null ? void 0 : L.on("change", (R) => {
|
|
1736
|
+
const X = R.target, Z = V(X, "nm"), G = X.getCoordinates()[0], _ = new qe([G[G.length - 2], G[G.length - 1]]), u = Et(_, "nm");
|
|
1708
1737
|
if (M = Number(it(_) / 1e3) > 150, !Z) return;
|
|
1709
1738
|
const E = '<span class="error pl-4">超出可以绘画的距离</span>';
|
|
1710
|
-
|
|
1739
|
+
i && (i.innerHTML = `
|
|
1711
1740
|
<div class="text">
|
|
1712
1741
|
面积:${Z}
|
|
1713
1742
|
${M ? E : ""}
|
|
1714
1743
|
</div>
|
|
1715
|
-
`),
|
|
1744
|
+
`), h && (h.innerHTML = `
|
|
1716
1745
|
<div class="text">
|
|
1717
1746
|
面积:${Z}
|
|
1718
1747
|
</div>
|
|
1719
1748
|
<div class="text ${M ? "error" : ""}">
|
|
1720
|
-
线段 ${G.length - 2}: ${
|
|
1749
|
+
线段 ${G.length - 2}: ${u}
|
|
1721
1750
|
${M ? E : ""}
|
|
1722
1751
|
|
|
1723
1752
|
</div>
|
|
@@ -1726,65 +1755,65 @@ const xt = (e, r) => {
|
|
|
1726
1755
|
</div>
|
|
1727
1756
|
`);
|
|
1728
1757
|
});
|
|
1729
|
-
}),
|
|
1758
|
+
}), f.on("drawend", (T) => {
|
|
1730
1759
|
var Z, W, G, _;
|
|
1731
1760
|
if (!T.feature.getGeometry()) return;
|
|
1732
|
-
|
|
1733
|
-
const
|
|
1734
|
-
if (
|
|
1735
|
-
const
|
|
1736
|
-
(G = (W = r.getProps()) == null ? void 0 : W.areaDrawEnd) == null || G.call(W,
|
|
1761
|
+
i && !o && (i.innerHTML += '<span class="delete-icon"><i class="map-iconfont icon-delete" /></div>'), o = T.feature, g.setOffset([10, 0]);
|
|
1762
|
+
const R = T.feature.getGeometry().getCoordinates(), X = R[0][R[0].length - 2];
|
|
1763
|
+
if (g.setPosition(X), h != null && h.parentNode && h.parentNode.removeChild(h), (Z = r.getProps()) != null && Z.areaDrawEnd) {
|
|
1764
|
+
const u = R[0].map((E) => Ae(E, le.mercator, le.data));
|
|
1765
|
+
(G = (W = r.getProps()) == null ? void 0 : W.areaDrawEnd) == null || G.call(W, u);
|
|
1737
1766
|
}
|
|
1738
|
-
|
|
1767
|
+
f && (f.setActive(!1), e == null || e.removeInteraction(f), (e == null ? void 0 : e.getInteractions()).forEach((E) => {
|
|
1739
1768
|
E instanceof je && (E.setActive(!1), e == null || e.removeInteraction(E));
|
|
1740
1769
|
})), l && ot(l), (_ = document.querySelector(".delete-icon")) == null || _.addEventListener("click", () => {
|
|
1741
|
-
var
|
|
1742
|
-
A(), (E = (
|
|
1770
|
+
var u, E;
|
|
1771
|
+
A(), (E = (u = r.getProps()) == null ? void 0 : u.areaDrawEnd) == null || E.call(u, []);
|
|
1743
1772
|
});
|
|
1744
1773
|
});
|
|
1745
|
-
},
|
|
1746
|
-
const
|
|
1774
|
+
}, V = (T, L) => {
|
|
1775
|
+
const R = Ut(T);
|
|
1747
1776
|
switch (L) {
|
|
1748
1777
|
case "km":
|
|
1749
|
-
return
|
|
1778
|
+
return R > 1e4 ? Math.round(R / 1e6 * 100) / 100 + " km<sup>2</sup>" : Math.round(R * 100) / 100 + " m<sup>2</sup>";
|
|
1750
1779
|
case "nm":
|
|
1751
|
-
return
|
|
1780
|
+
return R > 1e4 ? Math.round(R / 1e6 / Math.pow(1.852, 2) * 100) / 100 + " nm<sup>2</sup>" : Math.round(R * 100) / 100 + " m<sup>2</sup>";
|
|
1752
1781
|
}
|
|
1753
1782
|
};
|
|
1754
|
-
let
|
|
1755
|
-
const
|
|
1756
|
-
|
|
1757
|
-
element:
|
|
1783
|
+
let i, g;
|
|
1784
|
+
const p = () => {
|
|
1785
|
+
i != null && i.parentNode && i.parentNode.removeChild(i), i = document.createElement("div"), i.style.display = "flex", i.className = "ol-tooltip ol-tooltip-draw-polygon", g = new xe({
|
|
1786
|
+
element: i,
|
|
1758
1787
|
offset: [0, -15],
|
|
1759
1788
|
positioning: "bottom-center",
|
|
1760
1789
|
stopEvent: !1,
|
|
1761
1790
|
insertFirst: !1
|
|
1762
|
-
}), e == null || e.addOverlay(
|
|
1791
|
+
}), e == null || e.addOverlay(g);
|
|
1763
1792
|
};
|
|
1764
|
-
let
|
|
1765
|
-
const
|
|
1766
|
-
|
|
1793
|
+
let h, C;
|
|
1794
|
+
const q = () => {
|
|
1795
|
+
h != null && h.parentNode && h.parentNode.removeChild(h), h = document.createElement("div"), h.className = "ol-tooltip ol-help-tooltip", h.addEventListener("click", (T) => {
|
|
1767
1796
|
T.preventDefault(), T.stopPropagation();
|
|
1768
|
-
}),
|
|
1769
|
-
element:
|
|
1797
|
+
}), C = new xe({
|
|
1798
|
+
element: h,
|
|
1770
1799
|
offset: [15, 0],
|
|
1771
1800
|
positioning: "center-left"
|
|
1772
|
-
}), e == null || e.addOverlay(
|
|
1801
|
+
}), e == null || e.addOverlay(C);
|
|
1773
1802
|
}, A = () => {
|
|
1774
|
-
o = null,
|
|
1803
|
+
o = null, c();
|
|
1775
1804
|
}, K = () => {
|
|
1776
|
-
|
|
1805
|
+
d = "close", e.un("pointermove", n), t = null, f && (f.abortDrawing(), console.log("abortDrawing"), f.setActive(!1), (e == null ? void 0 : e.getInteractions()).forEach((L) => {
|
|
1777
1806
|
L instanceof je && (L.setActive(!1), e == null || e.removeInteraction(L));
|
|
1778
|
-
}),
|
|
1807
|
+
}), f = null), l && ot(l), l = void 0, k == null || k.clear(), k = null, w && e.getAllLayers().includes(w) && (e.removeLayer(w), w = null), h != null && h.parentElement && (h.innerHTML = "", h.parentElement.removeChild(h), h = null), i != null && i.parentElement && (i.innerHTML = "", i.parentElement.removeChild(i), i = null), C && e.removeOverlay(C), g && e.removeOverlay(g), ke(e, "grab");
|
|
1779
1808
|
};
|
|
1780
1809
|
return {
|
|
1781
|
-
open:
|
|
1810
|
+
open: c,
|
|
1782
1811
|
close: K,
|
|
1783
1812
|
reset: A,
|
|
1784
|
-
getState: () =>
|
|
1813
|
+
getState: () => d
|
|
1785
1814
|
};
|
|
1786
1815
|
}, Vo = "zh-map-port-layer", zo = (e) => {
|
|
1787
|
-
const r = new ye(), o = new
|
|
1816
|
+
const r = new ye(), o = new be({
|
|
1788
1817
|
className: Vo,
|
|
1789
1818
|
source: r,
|
|
1790
1819
|
zIndex: 100,
|
|
@@ -1793,46 +1822,46 @@ const xt = (e, r) => {
|
|
|
1793
1822
|
properties: { layerType: re.PORT }
|
|
1794
1823
|
});
|
|
1795
1824
|
e == null || e.addLayer(o);
|
|
1796
|
-
let l = null,
|
|
1797
|
-
const
|
|
1798
|
-
if (!
|
|
1799
|
-
if (r.clear(),
|
|
1800
|
-
const
|
|
1801
|
-
|
|
1825
|
+
let l = null, d = null;
|
|
1826
|
+
const c = (i, g = !0) => {
|
|
1827
|
+
if (!i || i.length === 0) return;
|
|
1828
|
+
if (r.clear(), d) {
|
|
1829
|
+
const h = i.find((C) => C.id === (d == null ? void 0 : d.id));
|
|
1830
|
+
h ? d = h : i.push(d);
|
|
1802
1831
|
}
|
|
1803
|
-
const
|
|
1804
|
-
|
|
1805
|
-
const [
|
|
1806
|
-
geometry: new ie(
|
|
1807
|
-
portData:
|
|
1808
|
-
id:
|
|
1809
|
-
select:
|
|
1810
|
-
showTitle:
|
|
1832
|
+
const p = [];
|
|
1833
|
+
i.forEach((h) => {
|
|
1834
|
+
const [C, q] = h.latLon.split(","), A = new ue({
|
|
1835
|
+
geometry: new ie(ae([Number(C), Number(q)])),
|
|
1836
|
+
portData: h,
|
|
1837
|
+
id: h.id,
|
|
1838
|
+
select: h.id === (d == null ? void 0 : d.id),
|
|
1839
|
+
showTitle: h.id === (d == null ? void 0 : d.id) || g
|
|
1811
1840
|
}), K = t(A);
|
|
1812
|
-
A.setStyle(K),
|
|
1813
|
-
}), r.addFeatures(
|
|
1841
|
+
A.setStyle(K), p.push(A);
|
|
1842
|
+
}), r.addFeatures(p);
|
|
1814
1843
|
};
|
|
1815
1844
|
let s = null, w = null;
|
|
1816
|
-
const
|
|
1845
|
+
const k = /* @__PURE__ */ new Map(), x = (i, g) => {
|
|
1817
1846
|
s || (s = document.createElement("canvas"), w = s.getContext("2d", {
|
|
1818
1847
|
willReadFrequently: !0
|
|
1819
1848
|
}));
|
|
1820
|
-
const
|
|
1821
|
-
if (
|
|
1822
|
-
return
|
|
1823
|
-
const
|
|
1824
|
-
if (!
|
|
1825
|
-
|
|
1826
|
-
const
|
|
1827
|
-
|
|
1828
|
-
const L =
|
|
1829
|
-
|
|
1849
|
+
const p = `${i}-${g}`;
|
|
1850
|
+
if (k.has(p))
|
|
1851
|
+
return k.get(p);
|
|
1852
|
+
const h = s, C = w;
|
|
1853
|
+
if (!C) return "";
|
|
1854
|
+
h.width = 0, h.height = 0;
|
|
1855
|
+
const q = 2, A = 8, K = window.devicePixelRatio || 1, I = "12px sans-serif";
|
|
1856
|
+
C.font = I;
|
|
1857
|
+
const L = C.measureText(i).width, R = A + L + A, X = q + 12 + q * 2;
|
|
1858
|
+
h.width = Math.round(R * K), h.height = Math.round(X * K), C.scale(K, K), C.clearRect(0, 0, R, X), C.fillStyle = g ? "#F32D2D" : "#FFF", C.beginPath(), C.roundRect(0, 0, R, X, 4), C.fill(), C.font = I, C.textBaseline = "middle";
|
|
1830
1859
|
const Z = X / 2;
|
|
1831
|
-
|
|
1832
|
-
const W =
|
|
1833
|
-
return
|
|
1834
|
-
}, t = (
|
|
1835
|
-
const { select:
|
|
1860
|
+
C.strokeStyle = g ? "#000" : "#ffffff", C.lineWidth = 1, C.strokeText(i, A, Z), C.fillStyle = g ? "#FFF" : "#000000", C.fillText(i, A, Z);
|
|
1861
|
+
const W = h.toDataURL("image/png");
|
|
1862
|
+
return k.set(p, W), W;
|
|
1863
|
+
}, t = (i) => {
|
|
1864
|
+
const { select: g, showTitle: p } = i.getProperties(), h = (L) => `<svg width="46" height="46" viewBox="0 0 46 46" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
1836
1865
|
<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
1866
|
<g clip-path="url(#clip0_10059_122082)">
|
|
1838
1867
|
<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"/>
|
|
@@ -1843,22 +1872,22 @@ const xt = (e, r) => {
|
|
|
1843
1872
|
</clipPath>
|
|
1844
1873
|
</defs>
|
|
1845
1874
|
</svg>
|
|
1846
|
-
`,
|
|
1875
|
+
`, C = () => `data:image/svg+xml;utf8,${encodeURIComponent(h(g ? "#F32D2D" : "#3370FF"))}`, q = e.getView().getZoom(), A = i.get("portData"), K = window.devicePixelRatio || 1, I = new ee({
|
|
1847
1876
|
image: new Pe({
|
|
1848
|
-
src:
|
|
1849
|
-
scale: 0.5 *
|
|
1877
|
+
src: C(),
|
|
1878
|
+
scale: 0.5 * q / 10
|
|
1850
1879
|
}),
|
|
1851
|
-
zIndex:
|
|
1880
|
+
zIndex: g ? 110 : 100
|
|
1852
1881
|
}), T = new ee({
|
|
1853
1882
|
image: new Pe({
|
|
1854
|
-
src:
|
|
1883
|
+
src: x(A.shortName, g),
|
|
1855
1884
|
anchor: [0.5, 0.5],
|
|
1856
1885
|
displacement: [0, -30],
|
|
1857
1886
|
scale: 1 / K,
|
|
1858
1887
|
anchorXUnits: "fraction",
|
|
1859
1888
|
anchorYUnits: "fraction"
|
|
1860
1889
|
}),
|
|
1861
|
-
zIndex:
|
|
1890
|
+
zIndex: g ? 110 : 100
|
|
1862
1891
|
// text: new Text({
|
|
1863
1892
|
// text: port.shortName,
|
|
1864
1893
|
// font: '12px sans-serif',
|
|
@@ -1871,66 +1900,66 @@ const xt = (e, r) => {
|
|
|
1871
1900
|
// offsetY: 30,
|
|
1872
1901
|
// }),
|
|
1873
1902
|
});
|
|
1874
|
-
return !
|
|
1903
|
+
return !p && !g ? I : [I, T];
|
|
1875
1904
|
}, n = () => {
|
|
1876
1905
|
if (r)
|
|
1877
1906
|
if (l) {
|
|
1878
1907
|
console.log("清除非选中的港口");
|
|
1879
|
-
const
|
|
1880
|
-
r.getFeatures().forEach((
|
|
1881
|
-
|
|
1908
|
+
const i = l.get("portData").id;
|
|
1909
|
+
r.getFeatures().forEach((g) => {
|
|
1910
|
+
g.get("portData").id !== i && r.removeFeature(g);
|
|
1882
1911
|
});
|
|
1883
1912
|
} else
|
|
1884
1913
|
console.log("清除所有港口", r), r == null || r.clear();
|
|
1885
|
-
},
|
|
1914
|
+
}, f = (i) => {
|
|
1886
1915
|
if (r) {
|
|
1887
|
-
if (!
|
|
1916
|
+
if (!i)
|
|
1888
1917
|
return M();
|
|
1889
|
-
(l == null ? void 0 : l.get("portData").id) !==
|
|
1918
|
+
(l == null ? void 0 : l.get("portData").id) !== i.id && (M(), $(i));
|
|
1890
1919
|
}
|
|
1891
1920
|
}, M = () => {
|
|
1892
|
-
var
|
|
1921
|
+
var i;
|
|
1893
1922
|
if (l) {
|
|
1894
|
-
const
|
|
1895
|
-
|
|
1923
|
+
const g = l == null ? void 0 : l.get("portData"), p = (i = r.getFeatures()) == null ? void 0 : i.find((h) => h.get("portData").id === g.id);
|
|
1924
|
+
p && (p.set("select", !1), p.setStyle(t(p)), l = null, d = null);
|
|
1896
1925
|
}
|
|
1897
|
-
},
|
|
1926
|
+
}, $ = (i) => {
|
|
1898
1927
|
if (!r) return;
|
|
1899
|
-
const
|
|
1900
|
-
|
|
1928
|
+
const g = r.getFeatures();
|
|
1929
|
+
d = i, l = g.find((p) => p.get("portData").id === i.id), l && (l.set("select", !0), l.setStyle(t(l)));
|
|
1901
1930
|
};
|
|
1902
1931
|
return {
|
|
1903
|
-
render:
|
|
1932
|
+
render: c,
|
|
1904
1933
|
clear: n,
|
|
1905
|
-
selected:
|
|
1906
|
-
handlePortHover: (
|
|
1907
|
-
|
|
1934
|
+
selected: f,
|
|
1935
|
+
handlePortHover: (i) => {
|
|
1936
|
+
i && i.get("portData") ? ke(e, "pointer") : ke(e, "grab");
|
|
1908
1937
|
}
|
|
1909
1938
|
};
|
|
1910
|
-
}, Oo = (e, r, o, l,
|
|
1939
|
+
}, Oo = (e, r, o, l, d, c, s) => {
|
|
1911
1940
|
const w = e.getInstall();
|
|
1912
1941
|
w.on("moveend", () => {
|
|
1913
|
-
var n,
|
|
1942
|
+
var n, f;
|
|
1914
1943
|
try {
|
|
1915
1944
|
const M = e.getZoom();
|
|
1916
|
-
(
|
|
1945
|
+
(f = (n = r.getProps()).mapMoveEnd) == null || f.call(n, M), M >= de.min && M <= de.max && o.reRenderTrackLine(), l.changeShipScale("end");
|
|
1917
1946
|
} catch (M) {
|
|
1918
1947
|
console.log("moveend---catch", M);
|
|
1919
1948
|
}
|
|
1920
1949
|
});
|
|
1921
|
-
const
|
|
1950
|
+
const k = {
|
|
1922
1951
|
[re.PORT]: null,
|
|
1923
1952
|
[re.SHIP]: null,
|
|
1924
1953
|
[re.TRACK]: null
|
|
1925
|
-
},
|
|
1954
|
+
}, x = (n, f, M) => {
|
|
1926
1955
|
switch (n) {
|
|
1927
1956
|
case re.SHIP:
|
|
1928
|
-
l == null || l.handleShipMapEvent(
|
|
1957
|
+
l == null || l.handleShipMapEvent(f, "hover");
|
|
1929
1958
|
break;
|
|
1930
1959
|
case re.PORT:
|
|
1931
1960
|
break;
|
|
1932
1961
|
case re.TRACK:
|
|
1933
|
-
o == null || o.handleTrackMapEvent(
|
|
1962
|
+
o == null || o.handleTrackMapEvent(f, "hover", M);
|
|
1934
1963
|
break;
|
|
1935
1964
|
}
|
|
1936
1965
|
}, t = (n) => {
|
|
@@ -1946,21 +1975,21 @@ const xt = (e, r) => {
|
|
|
1946
1975
|
}
|
|
1947
1976
|
};
|
|
1948
1977
|
w.on("pointermove", (n) => {
|
|
1949
|
-
if (s.getState() !== "open" &&
|
|
1978
|
+
if (s.getState() !== "open" && c.getState() !== "open" && !w.getView().getAnimating())
|
|
1950
1979
|
try {
|
|
1951
|
-
let
|
|
1952
|
-
const
|
|
1953
|
-
|
|
1980
|
+
let f = !1, M = !1;
|
|
1981
|
+
const $ = w.getLayers().getArray().filter((V) => V.get("layerType"));
|
|
1982
|
+
$ && $.length > 0 && $.forEach((V) => {
|
|
1954
1983
|
if (M) return;
|
|
1955
|
-
const
|
|
1956
|
-
layerFilter: (
|
|
1984
|
+
const i = w == null ? void 0 : w.getEventPixel(n.originalEvent), g = V == null ? void 0 : V.get("layerType"), p = w == null ? void 0 : w.forEachFeatureAtPixel(i, (h) => h, {
|
|
1985
|
+
layerFilter: (h) => h === V,
|
|
1957
1986
|
// 严格图层过滤
|
|
1958
1987
|
hitTolerance: 5
|
|
1959
1988
|
});
|
|
1960
|
-
|
|
1961
|
-
}),
|
|
1962
|
-
} catch (
|
|
1963
|
-
console.log("pointermove----",
|
|
1989
|
+
p !== k[g] && (k[g] && t(g, k[g]), k[g] = p, p && (x(g, p, n), M = !0)), p && (f = !0);
|
|
1990
|
+
}), f ? ke(w, "pointer") : ke(w, "grab");
|
|
1991
|
+
} catch (f) {
|
|
1992
|
+
console.log("pointermove----", f);
|
|
1964
1993
|
}
|
|
1965
1994
|
}), w.on("movestart", () => {
|
|
1966
1995
|
try {
|
|
@@ -1969,92 +1998,92 @@ const xt = (e, r) => {
|
|
|
1969
1998
|
console.log("movestart---catch", n);
|
|
1970
1999
|
}
|
|
1971
2000
|
}), w.on("click", kt((n) => {
|
|
1972
|
-
if (s.getState() !== "open" &&
|
|
2001
|
+
if (s.getState() !== "open" && c.getState() !== "open" && !w.getView().getAnimating())
|
|
1973
2002
|
try {
|
|
1974
|
-
let
|
|
1975
|
-
const M = w.getLayers().getArray().filter((
|
|
1976
|
-
M && M.length > 0 && M.forEach((
|
|
1977
|
-
var
|
|
1978
|
-
if (
|
|
1979
|
-
const
|
|
1980
|
-
if (
|
|
1981
|
-
return
|
|
2003
|
+
let f = !1;
|
|
2004
|
+
const M = w.getLayers().getArray().filter(($) => $.get("layerType"));
|
|
2005
|
+
M && M.length > 0 && M.forEach(($) => {
|
|
2006
|
+
var g, p, h;
|
|
2007
|
+
if (f) return;
|
|
2008
|
+
const V = w == null ? void 0 : w.getEventPixel(n.originalEvent), i = w == null ? void 0 : w.forEachFeatureAtPixel(V, (C) => {
|
|
2009
|
+
if (C.get("shipData") || C.get("portData"))
|
|
2010
|
+
return C;
|
|
1982
2011
|
}, {
|
|
1983
|
-
layerFilter: (
|
|
2012
|
+
layerFilter: (C) => C === $,
|
|
1984
2013
|
// 严格图层过滤
|
|
1985
2014
|
hitTolerance: 10
|
|
1986
2015
|
});
|
|
1987
|
-
if (
|
|
1988
|
-
if (
|
|
1989
|
-
console.log("trackManager.getTrackStatus()---", o.getTrackStatus()), o.getTrackStatus() || l.handleShipMapEvent(
|
|
1990
|
-
else if (
|
|
1991
|
-
const
|
|
1992
|
-
|
|
2016
|
+
if (i) {
|
|
2017
|
+
if (i != null && i.get("shipData"))
|
|
2018
|
+
console.log("trackManager.getTrackStatus()---", o.getTrackStatus()), o.getTrackStatus() || l.handleShipMapEvent(i, "click", (g = r.getProps()) == null ? void 0 : g.selectShip);
|
|
2019
|
+
else if (i != null && i.get("portData")) {
|
|
2020
|
+
const C = i == null ? void 0 : i.get("portData");
|
|
2021
|
+
d.selected(C), (h = (p = r.getProps()) == null ? void 0 : p.selectPort) == null || h.call(p, C);
|
|
1993
2022
|
}
|
|
1994
|
-
|
|
2023
|
+
f = !0, n.preventDefault(), n.stopPropagation();
|
|
1995
2024
|
}
|
|
1996
2025
|
});
|
|
1997
|
-
} catch (
|
|
1998
|
-
console.log("pointermove----",
|
|
2026
|
+
} catch (f) {
|
|
2027
|
+
console.log("pointermove----", f);
|
|
1999
2028
|
}
|
|
2000
2029
|
}, 150));
|
|
2001
2030
|
}, Do = () => {
|
|
2002
|
-
const e =
|
|
2031
|
+
const e = Zt([]);
|
|
2003
2032
|
return {
|
|
2004
|
-
createInstance: (l,
|
|
2005
|
-
const
|
|
2006
|
-
|
|
2007
|
-
const s =
|
|
2008
|
-
|
|
2009
|
-
const
|
|
2010
|
-
Oo(
|
|
2011
|
-
const
|
|
2012
|
-
const
|
|
2013
|
-
return [
|
|
2014
|
-
},
|
|
2033
|
+
createInstance: (l, d) => {
|
|
2034
|
+
const c = ao();
|
|
2035
|
+
c.initMap(l, d);
|
|
2036
|
+
const s = c.getInstall(), w = Eo(s), k = Po();
|
|
2037
|
+
k.setProps(d), w.setShowLayerType(d.layerType), w.setGreenTileVisible(d.showGreenLayer);
|
|
2038
|
+
const x = vo(s), t = mo(s, x), n = To(s), f = Fo(s), M = Ro(s, k), $ = $o(s, k), V = zo(s);
|
|
2039
|
+
Oo(c, k, x, n, V, M, $);
|
|
2040
|
+
const i = () => {
|
|
2041
|
+
const p = s.getView().calculateExtent(c.getSize()), h = Ae([p[0], p[1]], le.mercator, le.data), C = Ae([p[2], p[3]], le.mercator, le.data);
|
|
2042
|
+
return [h[0], h[1], C[0], C[1]];
|
|
2043
|
+
}, g = {
|
|
2015
2044
|
id: Symbol("map-instance"),
|
|
2016
2045
|
innerMap: null,
|
|
2017
|
-
map:
|
|
2046
|
+
map: c.getInstall(),
|
|
2018
2047
|
destroy: () => {
|
|
2019
|
-
e.splice(e.indexOf(
|
|
2048
|
+
e.splice(e.indexOf(g), 1);
|
|
2020
2049
|
},
|
|
2021
2050
|
methods: {
|
|
2022
|
-
...
|
|
2051
|
+
...c,
|
|
2023
2052
|
layer: w,
|
|
2024
2053
|
ship: n,
|
|
2025
|
-
track:
|
|
2054
|
+
track: x,
|
|
2026
2055
|
carTrack: t,
|
|
2027
2056
|
port: {
|
|
2028
|
-
render:
|
|
2029
|
-
clear:
|
|
2030
|
-
selected:
|
|
2057
|
+
render: V.render,
|
|
2058
|
+
clear: V.clear,
|
|
2059
|
+
selected: V.selected
|
|
2031
2060
|
},
|
|
2032
|
-
position:
|
|
2061
|
+
position: f,
|
|
2033
2062
|
drawLine: M,
|
|
2034
|
-
drawPolygon:
|
|
2063
|
+
drawPolygon: $,
|
|
2035
2064
|
// 子模块
|
|
2036
2065
|
utils: {
|
|
2037
|
-
getCalculateExtent:
|
|
2066
|
+
getCalculateExtent: i,
|
|
2038
2067
|
convertSixHundredThousandToLatLng: at,
|
|
2039
2068
|
calculateCirclePoints: uo
|
|
2040
2069
|
}
|
|
2041
2070
|
}
|
|
2042
2071
|
};
|
|
2043
|
-
return e.push(
|
|
2072
|
+
return e.push(g), g;
|
|
2044
2073
|
},
|
|
2045
2074
|
destroyInstance: (l) => {
|
|
2046
|
-
const
|
|
2047
|
-
|
|
2075
|
+
const d = e.findIndex((c) => c.id === l);
|
|
2076
|
+
d > -1 && (e[d].destroy(), e.splice(d, 1));
|
|
2048
2077
|
},
|
|
2049
2078
|
destroyAll: () => {
|
|
2050
2079
|
e.forEach((l) => l.destroy()), e.splice(0, e.length);
|
|
2051
2080
|
},
|
|
2052
2081
|
getAllInstances: () => [...e]
|
|
2053
2082
|
};
|
|
2054
|
-
},
|
|
2083
|
+
}, Ao = { class: "zh-map-box" }, Zo = /* @__PURE__ */ nt({
|
|
2055
2084
|
__name: "Map",
|
|
2056
2085
|
props: {
|
|
2057
|
-
zoom: { default:
|
|
2086
|
+
zoom: { default: de.default },
|
|
2058
2087
|
center: { default: co },
|
|
2059
2088
|
layerType: { default: "vector" },
|
|
2060
2089
|
showGreenLayer: { type: Boolean, default: !1 },
|
|
@@ -2077,24 +2106,24 @@ const xt = (e, r) => {
|
|
|
2077
2106
|
});
|
|
2078
2107
|
}
|
|
2079
2108
|
o();
|
|
2080
|
-
const l =
|
|
2109
|
+
const l = fe(), d = fe(), c = Do(), s = fe(), w = e, k = fe({
|
|
2081
2110
|
getInstall() {
|
|
2082
2111
|
}
|
|
2083
2112
|
});
|
|
2084
2113
|
Wt(() => {
|
|
2085
2114
|
var t;
|
|
2086
|
-
s.value =
|
|
2087
|
-
|
|
2115
|
+
s.value = c.createInstance(l.value, w), k.value = s.value.methods, (t = d.value) == null || t.setScaleLine(s.value.map, w.scaleLineUnit), window.addEventListener("nativeDoubleTap", function() {
|
|
2116
|
+
x();
|
|
2088
2117
|
});
|
|
2089
2118
|
});
|
|
2090
|
-
function
|
|
2091
|
-
var n,
|
|
2119
|
+
function x() {
|
|
2120
|
+
var n, f;
|
|
2092
2121
|
let t = (n = s.value) == null ? void 0 : n.methods.getZoom();
|
|
2093
|
-
(
|
|
2122
|
+
(f = s.value) == null || f.methods.setZoom(t + 1);
|
|
2094
2123
|
}
|
|
2095
2124
|
return Gt(() => {
|
|
2096
2125
|
var t, n;
|
|
2097
|
-
|
|
2126
|
+
c.destroyInstance((t = s == null ? void 0 : s.value) == null ? void 0 : t.id), (n = s.value) == null || n.destroy();
|
|
2098
2127
|
}), r({
|
|
2099
2128
|
getZoom: () => {
|
|
2100
2129
|
var t;
|
|
@@ -2113,16 +2142,16 @@ const xt = (e, r) => {
|
|
|
2113
2142
|
return (t = s.value) == null ? void 0 : t.methods.getView();
|
|
2114
2143
|
},
|
|
2115
2144
|
setCenter: (t, n) => {
|
|
2116
|
-
var
|
|
2117
|
-
return (
|
|
2145
|
+
var f;
|
|
2146
|
+
return (f = s.value) == null ? void 0 : f.methods.setCenter(t, n);
|
|
2118
2147
|
},
|
|
2119
2148
|
getSize: () => {
|
|
2120
2149
|
var t;
|
|
2121
2150
|
return (t = s.value) == null ? void 0 : t.methods.getSize();
|
|
2122
2151
|
},
|
|
2123
2152
|
getCenter: (t, n) => {
|
|
2124
|
-
var
|
|
2125
|
-
return (
|
|
2153
|
+
var f;
|
|
2154
|
+
return (f = s.value) == null ? void 0 : f.methods.getCenter();
|
|
2126
2155
|
},
|
|
2127
2156
|
layer: {
|
|
2128
2157
|
setGreenTileVisible: (t) => {
|
|
@@ -2222,8 +2251,8 @@ const xt = (e, r) => {
|
|
|
2222
2251
|
},
|
|
2223
2252
|
port: {
|
|
2224
2253
|
render: (t, n) => {
|
|
2225
|
-
var
|
|
2226
|
-
return (
|
|
2254
|
+
var f;
|
|
2255
|
+
return (f = s.value) == null ? void 0 : f.methods.port.render(t, n);
|
|
2227
2256
|
},
|
|
2228
2257
|
clear: () => {
|
|
2229
2258
|
var t;
|
|
@@ -2250,6 +2279,14 @@ const xt = (e, r) => {
|
|
|
2250
2279
|
clear: () => {
|
|
2251
2280
|
var t;
|
|
2252
2281
|
return (t = s.value) == null ? void 0 : t.methods.position.clear();
|
|
2282
|
+
},
|
|
2283
|
+
renderHtml: (...t) => {
|
|
2284
|
+
var n;
|
|
2285
|
+
return (n = s.value) == null ? void 0 : n.methods.position.renderHtml(...t);
|
|
2286
|
+
},
|
|
2287
|
+
removeHtml: (...t) => {
|
|
2288
|
+
var n;
|
|
2289
|
+
return (n = s.value) == null ? void 0 : n.methods.position.removeHtml(...t);
|
|
2253
2290
|
}
|
|
2254
2291
|
},
|
|
2255
2292
|
drawLine: {
|
|
@@ -2299,11 +2336,11 @@ const xt = (e, r) => {
|
|
|
2299
2336
|
return (n = s.value) == null ? void 0 : n.methods.utils.convertSixHundredThousandToLatLng(...t);
|
|
2300
2337
|
},
|
|
2301
2338
|
calculateCirclePoints: (t, n) => {
|
|
2302
|
-
var
|
|
2303
|
-
return (
|
|
2339
|
+
var f;
|
|
2340
|
+
return (f = s.value) == null ? void 0 : f.methods.utils.calculateCirclePoints(t, n);
|
|
2304
2341
|
}
|
|
2305
2342
|
}
|
|
2306
|
-
}), (t, n) => (rt(), lt("div",
|
|
2343
|
+
}), (t, n) => (rt(), lt("div", Ao, [
|
|
2307
2344
|
et("div", {
|
|
2308
2345
|
id: "map",
|
|
2309
2346
|
ref_key: "zhMapRef",
|
|
@@ -2312,7 +2349,7 @@ const xt = (e, r) => {
|
|
|
2312
2349
|
}, null, 512),
|
|
2313
2350
|
tt(ro, {
|
|
2314
2351
|
ref_key: "scaleLineRef",
|
|
2315
|
-
ref:
|
|
2352
|
+
ref: d
|
|
2316
2353
|
}, null, 512),
|
|
2317
2354
|
tt(io, {
|
|
2318
2355
|
ref: "zoomControlRef",
|
|
@@ -2320,7 +2357,7 @@ const xt = (e, r) => {
|
|
|
2320
2357
|
}, null, 8, ["map-instance"])
|
|
2321
2358
|
]));
|
|
2322
2359
|
}
|
|
2323
|
-
}), Wo = /* @__PURE__ */ ct(
|
|
2360
|
+
}), Wo = /* @__PURE__ */ ct(Zo, [["__scopeId", "data-v-ec9700a3"]]), Xo = to(Wo);
|
|
2324
2361
|
export {
|
|
2325
2362
|
Xo as Z
|
|
2326
2363
|
};
|