| | |
| | | * @Author: shuishen 1109946754@qq.com |
| | | * @Date: 2022-08-18 17:00:30 |
| | | * @LastEditors: shuishen 1109946754@qq.com |
| | | * @LastEditTime: 2022-12-08 10:02:24 |
| | | * @LastEditTime: 2022-12-08 11:22:32 |
| | | * @FilePath: \srs-police-affairs\src\components\map\index.vue |
| | | * @Description: 公用地图组件 |
| | | * |
| | |
| | | // ) |
| | | |
| | | // 设置地图初始位置,角度等 |
| | | global.viewer.camera.setView({ |
| | | // Cesium的坐标是以地心为原点,一向指向南美洲,一向指向亚洲,一向指向北极州 |
| | | // fromDegrees()方法,将经纬度和高程转换为世界坐标 |
| | | destination: global.DC.Namespace.Cesium.Cartesian3.fromDegrees( |
| | | 116.112550, 28.196631, 50000 |
| | | ), |
| | | orientation: { |
| | | // 指向 |
| | | heading: global.DC.Namespace.Cesium.Math.toRadians(0, 0), |
| | | // 视角 |
| | | pitch: global.DC.Namespace.Cesium.Math.toRadians(-45), |
| | | roll: 0.0 |
| | | } |
| | | // global.viewer.camera.setView({ |
| | | // // Cesium的坐标是以地心为原点,一向指向南美洲,一向指向亚洲,一向指向北极州 |
| | | // // fromDegrees()方法,将经纬度和高程转换为世界坐标 |
| | | // destination: global.DC.Namespace.Cesium.Cartesian3.fromDegrees( |
| | | // 116.112550, 28.196631, 50000 |
| | | // ), |
| | | // orientation: { |
| | | // // 指向 |
| | | // heading: global.DC.Namespace.Cesium.Math.toRadians(0, 0), |
| | | // // 视角 |
| | | // pitch: global.DC.Namespace.Cesium.Math.toRadians(-45), |
| | | // roll: 0.0 |
| | | // } |
| | | // }) |
| | | |
| | | let sqTitleLayer = new global.DC.TilesetLayer('sqTitleLayer') |
| | | global.viewer.addLayer(sqTitleLayer) |
| | | let sqTileset = new global.DC.Tileset( |
| | | 'http://192.168.0.112:18080/sf3d/361102/model/wanda/tileset.json' |
| | | ) |
| | | sqTileset.setHeight(0) |
| | | sqTitleLayer.addOverlay(sqTileset) |
| | | |
| | | sqTileset.on(global.DC.MouseEventType.CLICK, (e) => { |
| | | console.log(e) |
| | | }) |
| | | |
| | | |
| | | global.viewer.flyTo(sqTileset) |
| | | |
| | | global.viewer.use(new global.DC.Measure()) |
| | | |