智慧园区前端大屏
shuishen
2025-01-14 464e77f3676271b53593131b1163b488e3ebcd39
园区范围更新
1 files modified
1 files added
11 ■■■■ changed files
src/assets/json/shape.json 1 ●●●● patch | view | raw | blame | history
src/pages/map/components/scomponents/layersControl.vue 10 ●●●●● patch | view | raw | blame | history
src/assets/json/shape.json
New file
@@ -0,0 +1 @@
{"type":"FeatureCollection","crs":{"type":"name","properties":{"name":"EPSG:4326"}},"features":[{"type":"Feature","id":1,"geometry":{"type":"Polygon","coordinates":[[[116.2775373500001,28.034144850000075],[116.27878189,28.032667520000075],[116.28290176000007,28.035432760000049],[116.27878189,28.040508500000044],[116.27440453000008,28.037894900000026],[116.27320290000011,28.039599430000067],[116.26483440000004,28.03448577000006],[116.26873970000008,28.028879400000051],[116.2775373500001,28.034144850000075]]]},"properties":{"OBJECTID":1,"O_Name":"萨弗隆片区","O_Com":" ","O_LClr":255,"O_LWidth":2,"O_LAlpha":50,"O_AAlpha":50,"O_AClr":65535,"O_Flag":1,"Shape_Length":0.047507259832591367,"Shape_Area":0.00010176463744043366}},{"type":"Feature","id":2,"geometry":{"type":"Polygon","coordinates":[[[116.26607895000006,28.041076670000052],[116.2662935300001,28.040243360000034],[116.26607895000006,28.039599430000067],[116.26569271000005,28.038614600000074],[116.26526356000011,28.03774339000006],[116.26479149000011,28.036644900000056],[116.26461983000002,28.035584280000023],[116.26466274000006,28.034599410000055],[116.26873970000008,28.028879400000051],[116.27135754000005,28.025659400000052],[116.27307415000007,28.024977500000034],[116.27985477000004,28.021189120000031],[116.27766609000003,28.01910545000004],[116.28105640000001,28.016339790000075],[116.28238678000002,28.014900100000034],[116.28371716000004,28.013611940000033],[116.2846183800001,28.012626870000076],[116.28513336000003,28.012058550000063],[116.28637791000006,28.011111360000029],[116.28745079000009,28.010656700000027],[116.28927469000007,28.009595820000072],[116.29041195000002,28.009463210000035],[116.29221439000003,28.009557930000028],[116.29384518000006,28.009804210000027],[116.29457474000003,28.009823150000045],[116.29564762000007,28.009425320000048],[116.2957871000001,28.009993650000069],[116.29610896000008,28.010192570000072],[116.29519701000004,28.011319740000033],[116.29458547000002,28.012143800000047],[116.29343748000008,28.013602470000023],[116.29297614000006,28.014227610000034],[116.29808307000008,28.017627910000044],[116.29663467000012,28.019654780000053],[116.29622698000003,28.020223060000035],[116.29401684000004,28.022666600000036],[116.29127026000003,28.026909530000069],[116.28875971000002,28.032042490000038],[116.28792286000009,28.034031210000023],[116.28732204000005,28.034845630000063],[116.2846183800001,28.033368310000071],[116.27878189,28.040508500000044],[116.28146410000011,28.042478130000063],[116.28152847000001,28.042989460000058],[116.28146410000011,28.04359549000003],[116.28135681000003,28.044106830000032],[116.28058434000002,28.045072670000025],[116.27985477000004,28.045887010000058],[116.27841711000008,28.046758150000073],[116.27680779000002,28.046833900000024],[116.2704563100001,28.043387170000074],[116.26607895000006,28.041076670000052]]]},"properties":{"OBJECTID":2,"O_Name":"工业园","O_Com":" ","O_LClr":33023,"O_LWidth":2,"O_LAlpha":100,"O_AAlpha":0,"O_AClr":16711680,"O_Flag":0,"Shape_Length":0.1199442853981286,"Shape_Area":0.00058042982067483899}},{"type":"Feature","id":3,"geometry":{"type":"Polygon","coordinates":[[[116.28212929000006,27.99711080000003],[116.28203273000008,27.994410880000032],[116.29190326000003,27.99423089000004],[116.29186034000008,27.995206650000057],[116.29187107000007,27.995718220000072],[116.29095912000002,27.995727690000024],[116.29071236000004,27.995547700000031],[116.29049778000001,27.995547700000031],[116.28852367000002,27.995803480000063],[116.28852367000002,27.99710132000007],[116.28212929000006,27.99711080000003]]]},"properties":{"OBJECTID":3,"O_Name":"添光片区","O_Com":" ","O_LClr":255,"O_LWidth":2,"O_LAlpha":50,"O_AAlpha":50,"O_AClr":65535,"O_Flag":1,"Shape_Length":0.025177049693768962,"Shape_Area":2.249447818638487e-05}}]}
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: 2025-01-09 20:03:28
 * @LastEditTime: 2025-01-14 20:24:37
 * @FilePath: \bigScreen\src\pages\map\components\scomponents\layersControl.vue
 * @Description:
 *
@@ -73,7 +73,7 @@
import { getList, getGouQu, updateSpace } from "@/api/space/space"
import { getList as getRiskList } from "@/api/riskSource/riskSource"
import { getPanoramaList } from "@/api/panorama/"
import yqfw from "@/assets/json/yqfw"
import yqfw from "@/assets/json/shape"
// import gsgw from "@/assets/json/gsgw"
// import rqgw from "@/assets/json/rqgw"
import wsgw from "@/assets/json/wsgw"
@@ -808,11 +808,9 @@
          addTileLayers[item.layerName] = new DC.VectorLayer(item.layerName)
          window.$viewer.addLayer(addTileLayers[item.layerName])
          console.log(item.source.geometries, 906666)
          item.source.geometries.forEach(i => {
          item.source.features.forEach(i => {
            let wall = new DC.Wall(
              i.coordinates[0].map(d => [d[0], d[1], 125].join(',')).join(';')
              i.geometry.coordinates[0].map(d => [d[0], d[1], 125].join(',')).join(';')
            )
            wall.setStyle({