Browse Source

渲染优化

lbj
sd 2 months ago
parent
commit
d83e909825
  1. 2
      ruoyi-admin/src/main/resources/application-druid.yml
  2. 37
      ruoyi-ui/src/views/cesiumMap/index.vue

2
ruoyi-admin/src/main/resources/application-druid.yml

@ -8,7 +8,7 @@ spring:
master:
url: jdbc:mysql://localhost:3306/ry?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
username: root
password: A20040303ctw!
password: 123456
# 从库数据源
slave:
# 从数据源开关/默认关闭

37
ruoyi-ui/src/views/cesiumMap/index.vue

@ -492,7 +492,7 @@ export default {
}, false),
width: 3,
material: Cesium.Color.fromCssColorString('#800080'),
clampToGround: true
arcType: Cesium.ArcType.NONE
}
});
}
@ -700,7 +700,7 @@ export default {
positions: linePositions,
width: 3,
material: Cesium.Color.fromCssColorString('#008aff'),
clampToGround: true,
arcType: Cesium.ArcType.NONE,
disableDepthTestDistance: Number.POSITIVE_INFINITY
}
});
@ -1110,7 +1110,7 @@ export default {
finalPathPositions.push(exit);
this.viewer.entities.add({
id: `hold-line-${routeId}-${i}`,
polyline: { positions: [entry, ...arcPoints.slice(1), exit], width: 8, material: Cesium.Color.ORANGE, clampToGround: true, zIndex: 20 },
polyline: { positions: [entry, ...arcPoints.slice(1), exit], width: 8, material: Cesium.Color.ORANGE, arcType: Cesium.ArcType.NONE, zIndex: 20 },
properties: { routeId: routeId }
});
lastPos = exit;
@ -1127,7 +1127,7 @@ export default {
const arcPoints = this.computeArcPositions(lastPos, currPos, nextLogical, radius);
this.viewer.entities.add({
id: `arc-line-${routeId}-${i}`,
polyline: { positions: arcPoints, width: lineWidth, material: lineMaterial, clampToGround: true, zIndex: 20 },
polyline: { positions: arcPoints, width: lineWidth, material: lineMaterial, arcType: Cesium.ArcType.NONE, zIndex: 20 },
properties: { routeId: routeId }
});
// 线dbId wp.id
@ -1178,7 +1178,7 @@ export default {
positions: finalPathPositions,
width: lineWidth,
material: lineMaterial,
clampToGround: true,
arcType: Cesium.ArcType.NONE,
zIndex: 1
},
properties: {isMissionRouteLine: true, routeId: routeId}
@ -1735,7 +1735,7 @@ export default {
console.log('Cesium离线二维地图已加载')
// 1.
this.viewer.scene.postProcessStages.fxaa.enabled = true
this.viewer.scene.postProcessStages.fxaa.enabled = true
this.handler = new Cesium.ScreenSpaceEventHandler(this.viewer.scene.canvas);
this.handler.setInputAction((click) => {
//
@ -2506,7 +2506,7 @@ export default {
positions: this.drawingPoints,
width: this.defaultStyles.line.width,
material: Cesium.Color.fromCssColorString(this.defaultStyles.line.color),
clampToGround: true
arcType: Cesium.ArcType.NONE
}
});
}
@ -2524,7 +2524,7 @@ export default {
color: Cesium.Color.fromCssColorString(this.defaultStyles.line.color),
dashLength: 16
}),
clampToGround: true
arcType: Cesium.ArcType.NONE
}
});
}
@ -2707,9 +2707,7 @@ export default {
}
return Cesium.Rectangle.fromDegrees(0, 0, 0, 0);
}, false),
//
material: Cesium.Color.fromCssColorString(this.defaultStyles.rectangle.color).withAlpha(this.defaultStyles.rectangle.opacity),
clampToGround: true //
material: Cesium.Color.fromCssColorString(this.defaultStyles.rectangle.color).withAlpha(this.defaultStyles.rectangle.opacity)
},
//
polyline: {
@ -2788,8 +2786,7 @@ export default {
//
rectangle: {
coordinates: rect,
material: Cesium.Color.fromCssColorString(this.defaultStyles.rectangle.color).withAlpha(this.defaultStyles.rectangle.opacity),
clampToGround: true
material: Cesium.Color.fromCssColorString(this.defaultStyles.rectangle.color).withAlpha(this.defaultStyles.rectangle.opacity)
},
//
polyline: {
@ -3717,7 +3714,7 @@ export default {
positions: positions,
width: this.defaultStyles.line.width,
material: Cesium.Color.fromCssColorString(this.defaultStyles.line.color),
clampToGround: true
arcType: Cesium.ArcType.NONE
}
})
const entityData = {
@ -3751,9 +3748,7 @@ export default {
//
polygon: {
hierarchy: new Cesium.PolygonHierarchy(polygonPositions),
//
material: Cesium.Color.TRANSPARENT,
clampToGround: true
material: Cesium.Color.TRANSPARENT
},
//
polyline: {
@ -4483,7 +4478,7 @@ export default {
positions: linePositions,
width: 3,
material: Cesium.Color.fromCssColorString(color),
clampToGround: true
arcType: Cesium.ArcType.NONE
},
label: {
text: entityData.label || '线',
@ -4886,7 +4881,7 @@ export default {
positions: newPositions,
width: selectedLineEntity.width,
material: Cesium.Color.fromCssColorString(selectedLineEntity.color),
clampToGround: true
arcType: Cesium.ArcType.NONE
}
})
// 线
@ -5093,13 +5088,13 @@ export default {
semiMinorAxis: radiusInMeters,
semiMajorAxis: radiusInMeters,
material: Cesium.Color.RED.withAlpha(0),
clampToGround: true
arcType: Cesium.ArcType.NONE
},
polyline: {
positions: circlePositions,
width: 2,
material: Cesium.Color.RED,
clampToGround: true
arcType: Cesium.ArcType.NONE
}
});

Loading…
Cancel
Save