From 65d4f562eb0eb48f99f0856cf68a14d8bbb46b2e Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Wed, 25 Dec 2024 11:02:07 +0800
Subject: [PATCH] 园区范围、雨水管网加载
---
src/pages/map/components/scomponents/layersControl.vue | 34 +++++++++++++++++++++++++---------
1 files changed, 25 insertions(+), 9 deletions(-)
diff --git a/src/pages/map/components/scomponents/layersControl.vue b/src/pages/map/components/scomponents/layersControl.vue
index d90e07e..ca20d1b 100644
--- a/src/pages/map/components/scomponents/layersControl.vue
+++ b/src/pages/map/components/scomponents/layersControl.vue
@@ -2,7 +2,7 @@
* @Author: shuishen 1109946754@qq.com
* @Date: 2024-10-31 10:47:29
* @LastEditors: shuishen 1109946754@qq.com
- * @LastEditTime: 2024-12-24 17:17:34
+ * @LastEditTime: 2024-12-25 10:59:51
* @FilePath: \bigScreen\src\pages\map\components\scomponents\layersControl.vue
* @Description:
*
@@ -73,7 +73,7 @@
import { getList, getGouQu } from "@/api/space/space"
import { getList as getRiskList } from "@/api/riskSource/riskSource"
import { getPanoramaList } from "@/api/panorama/"
-import yqfw_01 from "@/assets/json/yqfw_01"
+import yqfw from "@/assets/json/yqfw"
// import gsgw from "@/assets/json/gsgw"
// import rqgw from "@/assets/json/rqgw"
import wsgw from "@/assets/json/wsgw"
@@ -369,6 +369,7 @@
},
{
+ parentId: '3',
id: '3-7',
label: '洼地',
type: 'layer',
@@ -385,6 +386,7 @@
},
{
+ parentId: '3',
id: '3-8',
label: '桥梁',
type: 'layer',
@@ -398,6 +400,18 @@
className: 'xfs-box',
showPanel: false,
layerName: 'ql'
+ },
+
+ {
+ parentId: '3',
+ id: '3-9',
+ label: '雨水管网',
+ type: 'layer',
+ subType: 'geojsonPipe',
+ layerName: 'ysgw',
+ source: ysgw,
+ color: DC.Color.CYAN.withAlpha(0.9),
+ height: 60,
},
]
},
@@ -536,7 +550,7 @@
type: 'layer',
subType: 'geojsonWall',
layerName: 'yqfw',
- source: yqfw_01
+ source: yqfw
},
{
@@ -759,9 +773,11 @@
addTileLayers[item.layerName] = new DC.VectorLayer(item.layerName)
window.$viewer.addLayer(addTileLayers[item.layerName])
- item.source.features.forEach(i => {
+ console.log(item.source.geometries, 906666)
+
+ item.source.geometries.forEach(i => {
let wall = new DC.Wall(
- i.geometry.coordinates[0].map(d => [d[0], d[1], 125].join(',')).join(';')
+ i.coordinates[0].map(d => [d[0], d[1], 125].join(',')).join(';')
)
wall.setStyle({
@@ -791,14 +807,14 @@
}
return positions
}
-
- item.source.features.forEach(i => {
+ console.log(item.source.geometries, 465465)
+ item.source.geometries.forEach(i => {
let polylineVolume = new DC.PolylineVolume(
- i.geometry.coordinates.map(d => [d[0], d[1], item.height].join(',')).join(';'),
+ i.coordinates.map(d => [d[0], d[1], item.height].join(',')).join(';'),
computeCircle(1.6)
)
- if (i.properties.RefName.indexOf('拟建') != -1) {
+ if ('properties' in i && i.properties?.RefName.indexOf('拟建') != -1) {
polylineVolume.setStyle({
material: DC.Color.fromBytes(255, 0, 0, 230)
})
--
Gitblit v1.9.3