| | |
| | | * @Author: shuishen 1109946754@qq.com |
| | | * @Date: 2024-10-31 10:47:29 |
| | | * @LastEditors: shuishen 1109946754@qq.com |
| | | * @LastEditTime: 2024-11-23 17:09:04 |
| | | * @LastEditTime: 2024-11-25 15:32:31 |
| | | * @FilePath: \bigScreen\src\pages\layout\components\scomponents\layersControl.vue |
| | | * @Description: |
| | | * |
| | |
| | | { |
| | | url: VITE_APP_BASE + 'newMx/mx/tile_05/tileset.json', |
| | | label: 'tile_05' |
| | | } |
| | | }, |
| | | |
| | | // { |
| | | // url: 'http://localhost:9003/model/ZOebpNa0/tileset.json', |
| | | // label: 'tile_01' |
| | | // }, |
| | | // { |
| | | // url: 'http://localhost:9003/model/QKYdBZ0b/tileset.json', |
| | | // label: 'tile_02' |
| | | // }, |
| | | // { |
| | | // url: 'http://localhost:9003/model/QrimOmf3/tileset.json', |
| | | // label: 'tile_03' |
| | | // }, |
| | | // { |
| | | // url: 'http://localhost:9003/model/S7E9aUgj/tileset.json', |
| | | // label: 'tile_04' |
| | | // }, |
| | | // { |
| | | // url: 'http://localhost:9003/model/WYUq33vu/tileset.json', |
| | | // label: 'tile_05' |
| | | // }, |
| | | ], |
| | | layerName: 'hgyq' |
| | | }, |
| | |
| | | item.method(item.params).then(res => { |
| | | let data = res.data.data.records |
| | | data.forEach(i => { |
| | | let stl = ''; |
| | | let stl = '' |
| | | try { |
| | | let geom = JSON.parse(i.geom); |
| | | let geom = JSON.parse(i.geom) |
| | | if (geom && geom.coordinates && geom.coordinates[0]) { |
| | | stl = geom.coordinates[0][0].map(d => d[0] + ',' + d[1]).join(';'); |
| | | stl = geom.coordinates[0][0].map(d => d[0] + ',' + d[1]).join(';') |
| | | } else { |
| | | console.error('Invalid geom structure'); |
| | | console.error('Invalid geom structure') |
| | | } |
| | | } catch (error) { |
| | | console.error('Failed to parse geom:', error); |
| | | console.error('Failed to parse geom:', error) |
| | | } |
| | | let polygon = new DC.Polygon(stl) |
| | | polygon.setStyle({ |