Browse Source

渲染优化

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

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

@ -8,14 +8,14 @@ spring:
master: master:
url: jdbc:mysql://localhost:3306/ry?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 url: jdbc:mysql://localhost:3306/ry?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
username: root username: root
password: A20040303ctw! password: 123456
# 从库数据源 # 从库数据源
slave: slave:
# 从数据源开关/默认关闭 # 从数据源开关/默认关闭
enabled: false enabled: false
url: url:
username: username:
password: password:
# 初始连接数 # 初始连接数
initialSize: 5 initialSize: 5
# 最小连接池数量 # 最小连接池数量
@ -39,7 +39,7 @@ spring:
testWhileIdle: true testWhileIdle: true
testOnBorrow: false testOnBorrow: false
testOnReturn: false testOnReturn: false
webStatFilter: webStatFilter:
enabled: true enabled: true
statViewServlet: statViewServlet:
enabled: true enabled: true
@ -58,4 +58,4 @@ spring:
merge-sql: true merge-sql: true
wall: wall:
config: config:
multi-statement-allow: true multi-statement-allow: true

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

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

Loading…
Cancel
Save