'20191207'
Showing
7 changed files
with
60 additions
and
28 deletions
This diff is collapsed.
Click to expand it.
| ... | @@ -9,8 +9,8 @@ | ... | @@ -9,8 +9,8 @@ |
| 9 | "lint": "vue-cli-service lint" | 9 | "lint": "vue-cli-service lint" |
| 10 | }, | 10 | }, |
| 11 | "dependencies": { | 11 | "dependencies": { |
| 12 | "ant-design-vue": "^1.4.8", | ||
| 12 | "core-js": "^3.4.3", | 13 | "core-js": "^3.4.3", |
| 13 | "element-ui": "^2.13.0", | ||
| 14 | "vue": "^2.6.10", | 14 | "vue": "^2.6.10", |
| 15 | "vue-router": "^3.1.3" | 15 | "vue-router": "^3.1.3" |
| 16 | }, | 16 | }, | ... | ... |
| ... | @@ -6,7 +6,7 @@ | ... | @@ -6,7 +6,7 @@ |
| 6 | * 3、使用Popup来弹出倾斜摄影覆盖面的信息 | 6 | * 3、使用Popup来弹出倾斜摄影覆盖面的信息 |
| 7 | * @Date: 2019-12-03 22:52:56 | 7 | * @Date: 2019-12-03 22:52:56 |
| 8 | * @LastEditors: jiangbotao | 8 | * @LastEditors: jiangbotao |
| 9 | * @LastEditTime: 2019-12-05 21:30:15 | 9 | * @LastEditTime: 2019-12-07 11:56:15 |
| 10 | * @FilePath: \superglobevue\src\components\viewer.vue | 10 | * @FilePath: \superglobevue\src\components\viewer.vue |
| 11 | --> | 11 | --> |
| 12 | <template> | 12 | <template> |
| ... | @@ -127,7 +127,23 @@ export default { | ... | @@ -127,7 +127,23 @@ export default { |
| 127 | queryByPoint(queryPoint); | 127 | queryByPoint(queryPoint); |
| 128 | }, Cesium.ScreenSpaceEventType.LEFT_CLICK); | 128 | }, Cesium.ScreenSpaceEventType.LEFT_CLICK); |
| 129 | 129 | ||
| 130 | $("#close").click(function(){ // 关闭气泡 | 130 | var ellipsoid = this.viewer.scene.globe.ellipsoid; |
| 131 | handler.setInputAction(function(e) { | ||
| 132 | var cartesian = smviewer.camera.pickEllipsoid(e.endPosition, ellipsoid); | ||
| 133 | if(cartesian){ | ||
| 134 | //将笛卡尔三维坐标转为地图坐标(弧度) | ||
| 135 | var cartographic = scene.globe.ellipsoid.cartesianToCartographic(cartesian); | ||
| 136 | //将地图坐标(弧度)转为十进制的度数 | ||
| 137 | var lat_String = Cesium.Math.toDegrees(cartographic.latitude).toFixed(4); | ||
| 138 | var log_String = Cesium.Math.toDegrees(cartographic.longitude).toFixed(4); | ||
| 139 | var alti_String = (smviewer.camera.positionCartographic.height).toFixed(2); | ||
| 140 | $('.ant-layout-footer').text('经度 : ' + log_String +' | 纬度 : ' + lat_String + ' | 高度 : ' + alti_String); | ||
| 141 | } | ||
| 142 | }, Cesium.ScreenSpaceEventType.MOUSE_MOVE); | ||
| 143 | |||
| 144 | $("#close").click(function(){ | ||
| 145 | // 关闭气泡 | ||
| 146 | smviewer.entities.removeAll(); | ||
| 131 | $("#bubble").hide(); | 147 | $("#bubble").hide(); |
| 132 | }); | 148 | }); |
| 133 | // 每一帧都去计算气泡的正确位置 | 149 | // 每一帧都去计算气泡的正确位置 |
| ... | @@ -221,7 +237,11 @@ export default { | ... | @@ -221,7 +237,11 @@ export default { |
| 221 | top: 180px; | 237 | top: 180px; |
| 222 | } | 238 | } |
| 223 | .bubble { | 239 | .bubble { |
| 224 | padding: 10px; | 240 | padding: 5px; |
| 225 | border-radius: 10px; | 241 | border-radius: 5px; |
| 242 | } | ||
| 243 | #tab { | ||
| 244 | height: unset; | ||
| 245 | text-align: left; | ||
| 226 | } | 246 | } |
| 227 | </style> | 247 | </style> | ... | ... |
| ... | @@ -2,7 +2,7 @@ | ... | @@ -2,7 +2,7 @@ |
| 2 | * @Author: jiangbotao | 2 | * @Author: jiangbotao |
| 3 | * @Date: 2019-12-03 22:52:56 | 3 | * @Date: 2019-12-03 22:52:56 |
| 4 | * @LastEditors: jiangbotao | 4 | * @LastEditors: jiangbotao |
| 5 | * @LastEditTime: 2019-12-04 22:23:44 | 5 | * @LastEditTime: 2019-12-07 12:44:32 |
| 6 | * @FilePath: \superglobevue\src\components\viewer.vue | 6 | * @FilePath: \superglobevue\src\components\viewer.vue |
| 7 | --> | 7 | --> |
| 8 | <template> | 8 | <template> | ... | ... |
| ... | @@ -2,17 +2,17 @@ | ... | @@ -2,17 +2,17 @@ |
| 2 | * @Author: jiangbotao | 2 | * @Author: jiangbotao |
| 3 | * @Date: 2019-12-03 22:31:08 | 3 | * @Date: 2019-12-03 22:31:08 |
| 4 | * @LastEditors: jiangbotao | 4 | * @LastEditors: jiangbotao |
| 5 | * @LastEditTime: 2019-12-05 11:16:09 | 5 | * @LastEditTime: 2019-12-07 11:44:35 |
| 6 | * @FilePath: \superglobevue\src\main.js | 6 | * @FilePath: \superglobevue\src\main.js |
| 7 | */ | 7 | */ |
| 8 | import Vue from 'vue' | 8 | import Vue from 'vue' |
| 9 | import ElementUI from 'element-ui' | 9 | import Antd from 'ant-design-vue' |
| 10 | import 'element-ui/lib/theme-chalk/index.css' | 10 | import App from './App' |
| 11 | import App from './App.vue' | 11 | import 'ant-design-vue/dist/antd.css' |
| 12 | import router from './router' | 12 | import router from './router' |
| 13 | 13 | ||
| 14 | Vue.config.productionTip = false | 14 | Vue.config.productionTip = false |
| 15 | Vue.use(ElementUI) | 15 | Vue.use(Antd) |
| 16 | 16 | ||
| 17 | new Vue({ | 17 | new Vue({ |
| 18 | router, | 18 | router, | ... | ... |
| ... | @@ -2,23 +2,23 @@ | ... | @@ -2,23 +2,23 @@ |
| 2 | * @Author: jiangbotao | 2 | * @Author: jiangbotao |
| 3 | * @Date: 2019-12-03 22:31:08 | 3 | * @Date: 2019-12-03 22:31:08 |
| 4 | * @LastEditors: jiangbotao | 4 | * @LastEditors: jiangbotao |
| 5 | * @LastEditTime: 2019-12-05 21:29:53 | 5 | * @LastEditTime: 2019-12-07 12:44:47 |
| 6 | * @FilePath: \superglobevue\src\views\Home.vue | 6 | * @FilePath: \superglobevue\src\views\Home.vue |
| 7 | --> | 7 | --> |
| 8 | <template> | 8 | <template> |
| 9 | <el-container> | 9 | <a-layout> |
| 10 | <el-header style="height: 50px;"> | 10 | <a-layout-header> |
| 11 | <i class="el-icon-s-opportunity"></i> 三维地理信息系统 | 11 | <a-icon type="global" /> 三维地理信息系统 |
| 12 | </el-header> | 12 | </a-layout-header> |
| 13 | <el-main style="padding: 0px;"> | 13 | <a-layout-content style="padding: 0px;"> |
| 14 | <viewer></viewer> | 14 | <viewer></viewer> |
| 15 | </el-main> | 15 | </a-layout-content> |
| 16 | <el-footer style="height: 22px;">Footer</el-footer> | 16 | <a-layout-footer style="height: 22px;">Footer</a-layout-footer> |
| 17 | </el-container> | 17 | </a-layout> |
| 18 | </template> | 18 | </template> |
| 19 | 19 | ||
| 20 | <script> | 20 | <script> |
| 21 | import viewer from "@/components/viewer_s3m_wz.vue"; | 21 | import viewer from "@/components/viewer_s3m_single.vue"; |
| 22 | 22 | ||
| 23 | export default { | 23 | export default { |
| 24 | name: "home", | 24 | name: "home", |
| ... | @@ -34,20 +34,20 @@ export default { | ... | @@ -34,20 +34,20 @@ export default { |
| 34 | </script> | 34 | </script> |
| 35 | 35 | ||
| 36 | <style scoped> | 36 | <style scoped> |
| 37 | .el-header { | 37 | .ant-layout-header { |
| 38 | height: 50px; | 38 | height: 60px; |
| 39 | top: 0px; | 39 | top: 0px; |
| 40 | position: absolute; | 40 | position: absolute; |
| 41 | width: 100%; | 41 | width: 100%; |
| 42 | background-color: #2d8cf0; | 42 | background-color: #2d8cf0; |
| 43 | color: white; | 43 | color: white; |
| 44 | text-align: left; | 44 | text-align: left; |
| 45 | padding: 10px 0px; | 45 | padding: 0px 0px; |
| 46 | padding-left: 10px; | 46 | padding-left: 10px; |
| 47 | z-index: 99; | 47 | z-index: 99; |
| 48 | font-size: 20pt; | 48 | font-size: 18pt; |
| 49 | } | 49 | } |
| 50 | .el-footer { | 50 | .ant-layout-footer { |
| 51 | height: 22px; | 51 | height: 22px; |
| 52 | bottom: 0px; | 52 | bottom: 0px; |
| 53 | position: absolute; | 53 | position: absolute; | ... | ... |
| ... | @@ -2,7 +2,7 @@ | ... | @@ -2,7 +2,7 @@ |
| 2 | * @Author: jiangbotao | 2 | * @Author: jiangbotao |
| 3 | * @Date: 2019-12-03 22:40:09 | 3 | * @Date: 2019-12-03 22:40:09 |
| 4 | * @LastEditors: jiangbotao | 4 | * @LastEditors: jiangbotao |
| 5 | * @LastEditTime: 2019-12-04 08:09:04 | 5 | * @LastEditTime: 2019-12-07 11:50:48 |
| 6 | * @FilePath: \superglobevue\vue.config.js | 6 | * @FilePath: \superglobevue\vue.config.js |
| 7 | */ | 7 | */ |
| 8 | module.exports = { | 8 | module.exports = { |
| ... | @@ -16,5 +16,17 @@ module.exports = { | ... | @@ -16,5 +16,17 @@ module.exports = { |
| 16 | port:7000, | 16 | port:7000, |
| 17 | hot: true, | 17 | hot: true, |
| 18 | openPage: 'index.html' | 18 | openPage: 'index.html' |
| 19 | } | 19 | }, |
| 20 | css: { | ||
| 21 | loaderOptions: { | ||
| 22 | less: { | ||
| 23 | modifyVars: { | ||
| 24 | 'primary-color': '#1DA57A', | ||
| 25 | 'link-color': '#1DA57A', | ||
| 26 | 'border-radius-base': '2px', | ||
| 27 | }, | ||
| 28 | javascriptEnabled: true | ||
| 29 | } | ||
| 30 | } | ||
| 31 | } | ||
| 20 | } | 32 | } |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
-
Please register or sign in to post a comment