| | |
| | | * @Author: shuishen 1109946754@qq.com |
| | | * @Date: 2022-08-18 17:00:30 |
| | | * @LastEditors: shuishen 1109946754@qq.com |
| | | * @LastEditTime: 2023-03-16 16:54:09 |
| | | * @LastEditTime: 2023-03-17 08:55:29 |
| | | * @FilePath: \srs-police-affairs\src\components\map\index.vue |
| | | * @Description: 公用地图组件 |
| | | * |
| | |
| | | |
| | | <script> |
| | | let tile3DUrl = '' |
| | | let floorEntitysLayers = null |
| | | let flootEntitysEntites = null |
| | | |
| | | if (process.env.NODE_ENV == 'development') { |
| | | // 开发 |
| | |
| | | sdTilesetLayer: null |
| | | } |
| | | |
| | | let flootEntitysEntites = null |
| | | |
| | | const ysLabels = [ |
| | | 'EPSG:4490_test:0', |
| | |
| | | }) |
| | | |
| | | // 原生Cesium加载多边体 |
| | | let floorEntitysLayers = new global.DC.Namespace.Cesium.CustomDataSource("floorEntitysLayers") |
| | | global.viewer.dataSources.add(floorEntitysLayers) |
| | | flootEntitysEntites = floorEntitysLayers.entities |
| | | |
| | | |
| | | // let floorPositions = positions.reduce((prev, curr, index, arr) => { |
| | | // curr.forEach(item => { |
| | |
| | | that.flytoLayer(params.polygonName, params.duration) |
| | | }) |
| | | |
| | | this.$EventBus.$on('showHouse3D', (params) => { |
| | | that.showHouse3D(params.positions, params.minHeight, params.maxHeight) |
| | | this.$EventBus.$on('showThreeDimensions', (params) => { |
| | | that.showThreeDimensions(params.positions, params.minHeight, params.maxHeight) |
| | | }) |
| | | |
| | | this.$EventBus.$on('clearHouse3D', () => { |
| | |
| | | * @param {*} positions 建筑范围坐标 |
| | | * @param {*} |
| | | */ |
| | | showHouse3D (positions, minHeight, maxHeight) { |
| | | console.log('showHouse3D被调用!',positions,111); |
| | | if(flootEntitysEntites!=null){ |
| | | showThreeDimensions (positions, minHeight, maxHeight) { |
| | | if (flootEntitysEntites == null) { |
| | | floorEntitysLayers = new global.DC.Namespace.Cesium.CustomDataSource("floorEntitysLayers") |
| | | global.viewer.dataSources.add(floorEntitysLayers) |
| | | flootEntitysEntites = floorEntitysLayers.entities |
| | | } else { |
| | | flootEntitysEntites.removeAll() |
| | | } |
| | | let housePositions = JSON.parse(positions).coordinates[0] |