<!-- * @Author: your name * @Date: 2021-05-13 21:02:13 * @LastEditTime: 2021-05-17 21:28:28 * @LastEditors: Please set LastEditors * @Description: In User Settings Edit * @FilePath: \cesium-vue\src\components\PointEntity\index.vue --> <template> <div></div> </template> <script> import * as Cesium from "cesium/Cesium" export default { props: { viewer: Object }, mounted() { this.init(); }, methods: { init() { let planyEntity = new Cesium.PolygonGraphics({ }) let plane = this.viewer.entities.add({ polygon: { hierarchy: {// 定义多边形及其孔的线性环的层次结构 positions: Cesium.Cartesian3.fromDegreesArray([ -99.0, 30.0, -85.0, 30.0, -85.0, 40.0, -99.0, 40.0 ]), holes: [ { positions: Cesium.Cartesian3.fromDegreesArray([ -97.0, 31.0, -97.0, 39.0, -87.0, 39.0, -87.0, 31.0 ]), holes: [ { positions: Cesium.Cartesian3.fromDegreesArray([ -95.0, 33.0, -89.0, 33.0, -89.0, 37.0, -95.0, 37.0 ]), holes: [ { positions: Cesium.Cartesian3.fromDegreesArray([ -93.0, 34.0, -91.0, 34.0, -91.0, 36.0, -93.0, 36.0 ]) } ] } ] } ] }, material: Cesium.Color.GREEN.withAlpha(0.5), height: 0, outline: true, closeTop: true, closeBottom: true, extrudedHeight: 1000000, extrudedHeightReference: Cesium.HeightReference.CLAMP_TO_EGDE } }) this.viewer.zoomTo(plane) } } } </script> <style> </style>
正文
08-Cesium polygon多边形
文章版权声明:除非注明,否则均为
譬如朝露_策温技术开发工作室博客原创文章,转载或复制请以超链接形式并注明出处。
发表评论
侧栏公告
寄语
譬如朝露博客是一个分享前端知识的网站,联系方式11523518。
热评文章
标签列表
热门文章
友情链接