@teeechina/teee-map 0.0.35 → 0.0.36
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/teee-map.mjs +131 -1
- package/dist/teee-map.umd.js +2 -2
- package/package.json +1 -1
package/dist/teee-map.mjs
CHANGED
|
@@ -41139,7 +41139,7 @@ var qt = class {
|
|
|
41139
41139
|
srcSignal: e.srcSignal,
|
|
41140
41140
|
destSignal: e.destSignal
|
|
41141
41141
|
};
|
|
41142
|
-
this.pathInfoRecords.
|
|
41142
|
+
this.pathInfoRecords.push(n);
|
|
41143
41143
|
}), this.pathInfoRecords.length === 0) return;
|
|
41144
41144
|
this.changePathState(this.pathInfoRecords), this.pathInfoRecords.length > 1 ? (console.log("请左键单击选择目标进路"), this.teeeMap.map.on("click", this.boundHandlePathClick)) : this.teeeMap.map.off("click", this.boundHandlePathClick);
|
|
41145
41145
|
let t = this.pathInfoRecords[this.pathInfoRecords.length - 1];
|
|
@@ -52493,6 +52493,136 @@ var ic = class e {
|
|
|
52493
52493
|
};
|
|
52494
52494
|
this.initMap(a), this.ctcTool = new Bs.ctc(this), this.ctcMenu = new Bs.ctcMenu(this), this.ctcClick = new Bs.ctcClick(this);
|
|
52495
52495
|
}
|
|
52496
|
+
createSscsGraphMap(e) {
|
|
52497
|
+
let t = {
|
|
52498
|
+
normal: {
|
|
52499
|
+
color: "#1C5AFF",
|
|
52500
|
+
strokeColor: "#31E5FF"
|
|
52501
|
+
},
|
|
52502
|
+
reverse: {
|
|
52503
|
+
color: "#FFB400",
|
|
52504
|
+
strokeColor: "#31E5FF"
|
|
52505
|
+
},
|
|
52506
|
+
lock: {
|
|
52507
|
+
color: "#00C853",
|
|
52508
|
+
strokeColor: "#31E5FF"
|
|
52509
|
+
},
|
|
52510
|
+
fault: {
|
|
52511
|
+
color: "#E4002B",
|
|
52512
|
+
strokeColor: "#FFD700"
|
|
52513
|
+
},
|
|
52514
|
+
selected: {
|
|
52515
|
+
color: "#FFD700",
|
|
52516
|
+
strokeColor: "#FFFFFF"
|
|
52517
|
+
}
|
|
52518
|
+
}, n = (e, n) => [
|
|
52519
|
+
"match",
|
|
52520
|
+
["feature-state", "state"],
|
|
52521
|
+
...Object.entries(t).flatMap(([t, n]) => [t, e(n)]),
|
|
52522
|
+
n
|
|
52523
|
+
], r = {
|
|
52524
|
+
id: "sscs_graph",
|
|
52525
|
+
source: {
|
|
52526
|
+
type: "vector",
|
|
52527
|
+
tiles: [e],
|
|
52528
|
+
scheme: "tms",
|
|
52529
|
+
promoteId: "code"
|
|
52530
|
+
},
|
|
52531
|
+
layers: [
|
|
52532
|
+
{
|
|
52533
|
+
id: "sscs_graph_line",
|
|
52534
|
+
type: "line",
|
|
52535
|
+
source: "sscs_graph",
|
|
52536
|
+
"source-layer": "cdst_trfc_line",
|
|
52537
|
+
paint: {
|
|
52538
|
+
"line-color": "orange",
|
|
52539
|
+
"line-width": 2
|
|
52540
|
+
}
|
|
52541
|
+
},
|
|
52542
|
+
{
|
|
52543
|
+
id: "sscs_graph_point",
|
|
52544
|
+
type: "circle",
|
|
52545
|
+
source: "sscs_graph",
|
|
52546
|
+
"source-layer": "cdst_trfc_point",
|
|
52547
|
+
paint: {
|
|
52548
|
+
"circle-color": n((e) => e.color, "#1C5AFF"),
|
|
52549
|
+
"circle-radius": [
|
|
52550
|
+
"interpolate",
|
|
52551
|
+
["linear"],
|
|
52552
|
+
["zoom"],
|
|
52553
|
+
10,
|
|
52554
|
+
5,
|
|
52555
|
+
13,
|
|
52556
|
+
15,
|
|
52557
|
+
22,
|
|
52558
|
+
20
|
|
52559
|
+
],
|
|
52560
|
+
"circle-opacity": .9,
|
|
52561
|
+
"circle-stroke-color": n((e) => e.strokeColor, "#31E5FF"),
|
|
52562
|
+
"circle-stroke-width": 2,
|
|
52563
|
+
"circle-blur": .2
|
|
52564
|
+
}
|
|
52565
|
+
},
|
|
52566
|
+
{
|
|
52567
|
+
id: "sscs_graph_line_label",
|
|
52568
|
+
type: "symbol",
|
|
52569
|
+
source: "sscs_graph",
|
|
52570
|
+
"source-layer": "cdst_trfc_line",
|
|
52571
|
+
minzoom: 10,
|
|
52572
|
+
layout: {
|
|
52573
|
+
"text-field": ["get", "name_abb"],
|
|
52574
|
+
"symbol-placement": "line",
|
|
52575
|
+
"text-rotation-alignment": "map",
|
|
52576
|
+
"text-size": [
|
|
52577
|
+
"interpolate",
|
|
52578
|
+
["linear"],
|
|
52579
|
+
["zoom"],
|
|
52580
|
+
10,
|
|
52581
|
+
8,
|
|
52582
|
+
22,
|
|
52583
|
+
15
|
|
52584
|
+
]
|
|
52585
|
+
},
|
|
52586
|
+
paint: {
|
|
52587
|
+
"text-color": "#333333",
|
|
52588
|
+
"text-halo-color": "#ffffff",
|
|
52589
|
+
"text-halo-width": 1.5
|
|
52590
|
+
}
|
|
52591
|
+
},
|
|
52592
|
+
{
|
|
52593
|
+
id: "sscs_graph_point_label",
|
|
52594
|
+
type: "symbol",
|
|
52595
|
+
source: "sscs_graph",
|
|
52596
|
+
"source-layer": "cdst_trfc_point",
|
|
52597
|
+
minzoom: 10,
|
|
52598
|
+
layout: {
|
|
52599
|
+
"text-field": ["get", "name"],
|
|
52600
|
+
"text-size": [
|
|
52601
|
+
"interpolate",
|
|
52602
|
+
["linear"],
|
|
52603
|
+
["zoom"],
|
|
52604
|
+
10,
|
|
52605
|
+
5,
|
|
52606
|
+
13,
|
|
52607
|
+
9,
|
|
52608
|
+
22,
|
|
52609
|
+
15
|
|
52610
|
+
],
|
|
52611
|
+
"text-max-width": 3
|
|
52612
|
+
},
|
|
52613
|
+
paint: { "text-color": "white" }
|
|
52614
|
+
}
|
|
52615
|
+
]
|
|
52616
|
+
};
|
|
52617
|
+
this.initMap(r);
|
|
52618
|
+
}
|
|
52619
|
+
setSscsPointState(e, t) {
|
|
52620
|
+
this.map.setFeatureState({
|
|
52621
|
+
source: "sscs_graph",
|
|
52622
|
+
sourceLayer: "cdst_trfc_point",
|
|
52623
|
+
id: e
|
|
52624
|
+
}, { state: t });
|
|
52625
|
+
}
|
|
52496
52626
|
createGeomMap(e, t, n) {
|
|
52497
52627
|
this.mapConfigs = Vs.geom(e, t, n);
|
|
52498
52628
|
let r = L.geom(this.mapConfigs.sourceUrl), i = V.geom(this.mapConfigs), a = {
|