@@ -216,6 +216,7 @@ export default {
job: '',
chooseStation: null,
chooseLine: null,
+ currentVoyage: null, // 当前选中的航次
// 地图图层基础地址
CesiumHostAddr: ''
}
@@ -384,7 +385,7 @@ export default {
res2.array.forEach(point => {
points.push(Number(point.nav_lon), Number(point.nav_lat))
})
- this.drawLine(index, item.tsy_id, points)
+ this.drawLine(index, item.tsy_id, points, '航次航线')
// 将坐标点添加到航次列表中
item.points = points
})
@@ -404,7 +405,7 @@ export default {
// 格式化坐标点
res.array.forEach(line => {
if (line.start_lon && line.start_lat && line.end_lon && line.end_lat) {
- this.drawLine(index, line.tsy_id, [Number(line.start_lon), Number(line.start_lat), Number(line.end_lon), Number(line.end_lat)])
+ this.drawLine(index, line.tsy_id, [Number(line.start_lon), Number(line.start_lat), Number(line.end_lon), Number(line.end_lat)], '样品航线')
}
})
})
@@ -430,7 +431,7 @@ export default {
res.array.forEach(point => {
points.push(Number(point.track_lon), Number(point.track_lat))
})
- this.drawLine(index, item.tsy_id, points)
+ this.drawLine(index, item.tsy_id, points, '数据样品集航线')
// 将坐标点添加到航次列表中
item.points = points
})
@@ -484,14 +485,17 @@ export default {
const pickedObject = this.viewer.scene.pick(click.position);
this.currenSample = pickedObject.id._id
const type = pickedObject.id._type
- if (type === 'line') {
- this.job = '测线作业'
- } else {
+ if (type === 'point') {
this.job = '站位作业'
+ } else {
+ this.job = '测线作业'
}
this.onSample({
tsy_id: pickedObject.id._id
})
+ if (type === '航次航线') {
+ this.currentVoyage = pickedObject.id._id
+ }
}, Cesium.ScreenSpaceEventType.LEFT_CLICK);
// 叠加叠加影像服务
@@ -532,10 +536,10 @@ export default {
this.viewer.imageryLayers.addImageryProvider(shipline)
},
/* cesium 绘制线 */
- drawLine(index, id, degreeArr) {
+ drawLine(index, id, degreeArr, type) {
this.viewer.entities.add({
id: id,
- type: 'line',
+ type: type,
polyline: { //polyline折线实体
positions: Cesium.Cartesian3.fromDegreesArray(degreeArr),//位置
clampToGround: true, //地表层高度模式,
diff --git a/src/views/dataTransfer/sampleViews/formViews/DataType.vue b/src/views/dataTransfer/sampleViews/formViews/DataType.vue
index f246ae9..deba783 100644
--- a/src/views/dataTransfer/sampleViews/formViews/DataType.vue
+++ b/src/views/dataTransfer/sampleViews/formViews/DataType.vue
@@ -1,5 +1,8 @@
+
+ 上传测线轨迹
+
@@ -10,7 +13,7 @@
-
+
@@ -134,6 +137,11 @@ export default {