This commit is contained in:
gcw_IJ7DAiVL
2025-09-10 09:34:52 +08:00
parent 935846d7f2
commit 3e7ccea682
3 changed files with 22 additions and 34 deletions

View File

@ -1,26 +1,26 @@
[ [
{ {
"id": 1, "id": 1,
"width": 30, "width": 7,
"load": 500, "load": 3,
"minTurnRadius": 5 "minTurnRadius": 5
}, },
{ {
"id": 2, "id": 2,
"width": 10, "width": 11,
"load": 600, "load": 1,
"minTurnRadius": 6 "minTurnRadius": 6
}, },
{ {
"id": 3, "id": 3,
"width": 40, "width": 8,
"load": 700, "load": 7,
"minTurnRadius": 10 "minTurnRadius": 10
}, },
{ {
"id": 4, "id": 4,
"width": 20, "width": 10,
"load": 700, "load": 5,
"minTurnRadius": 2 "minTurnRadius": 2
} }
] ]

View File

@ -1,38 +1,22 @@
{ {
"startPoint": "114.262694,27.786216", "startPoint": "114.26344,27.800982",
"endPoint": "114.274729,27.777062", "endPoint": "114.284668,27.794961",
"viaPoints": [ "viaPoints": [
{ {
"time": "1694352000000", "time": "1694352000000",
"points": "114.263233,27.777047" "points": "114.272329,27.797299"
},
{
"time": "1694352001000",
"points": "114.265512,27.789935"
},
{
"time": "1694352002000",
"points": "114.256863,27.780437"
} }
], ],
"avoidPoints": [ "avoidPoints": [
{ {
"time": "1694352003000", "time": "1694352003000",
"points": "114.261166,27.800982" "points": "114.27882,27.792857"
},
{
"time": "1694352004000",
"points": "114.251312,27.786932"
} }
], ],
"avoidAreas": [ "avoidAreas": [
{ {
"time": "1694352005000", "time": "1694352005000",
"points": "[[114.267217,27.777566,0],[114.276695,27.78048,0],[114.276001,27.772547,0],[114.276001,27.772486,0]]" "points": "[[114.272797,27.7935,0],[114.27268,27.794201,0],[114.27537,27.795838,0]]"
},
{
"time": "1694352006000",
"points": "[[114.272317,27.786501,0],[114.281341,27.79818,0],[114.290389,27.779594,0],[114.284888,27.773934,0]]"
} }
] ]
} }

View File

@ -181,9 +181,9 @@ export default {
tableData: [], tableData: [],
multipleSelection: [], multipleSelection: [],
inputform: { inputform: {
width: '', width: 0,
load: '', load: 0,
minTurnRadius: '', minTurnRadius: 0,
}, },
form: { form: {
startPoint: '', startPoint: '',
@ -962,10 +962,13 @@ export default {
const nextNode = pathNodes[j + 1] const nextNode = pathNodes[j + 1]
const segment = this.roadNetworkGeoJSON.features.find( const segment = this.roadNetworkGeoJSON.features.find(
(f) => (f) =>
(f.properties.FNODE_ == currentNode && ((f.properties.FNODE_ == currentNode &&
f.properties.TNODE_ == nextNode) || f.properties.TNODE_ == nextNode) ||
(f.properties.FNODE_ == nextNode && (f.properties.FNODE_ == nextNode &&
f.properties.TNODE_ == currentNode) f.properties.TNODE_ == currentNode) )&&
f.properties.载重吨 >= this.inputform.load &&
f.properties.宽度 >= this.inputform.width &&
f.properties.曲率半 <= this.inputform.minTurnRadius
) )
if (segment) { if (segment) {
fullPath.push(...segment.geometry.coordinates[0]) fullPath.push(...segment.geometry.coordinates[0])
@ -1023,6 +1026,7 @@ export default {
// 单独的路径绘制方法 // 单独的路径绘制方法
drawPath(path) { drawPath(path) {
const positions = path const positions = path
if (positions.fullPath.length == 0) return
const polyline = new window.mars3d.graphic.PolylinePrimitive({ const polyline = new window.mars3d.graphic.PolylinePrimitive({
positions: positions.fullPath, positions: positions.fullPath,
style: { style: {