cesium CLAMP_TO_GROUND 报错 Cannot read property ‘globe‘ of undefined
billboardCollection 需要添加heightReference: Cesium.HeightReference.CLAMP_TO_GROUND
var viewer = new Cesium.Viewer("cesiumContainer", {terrainProvider: new Cesium.EllipsoidTerrainProvider({}),
});
viewer.scene.globe.depthTestAgainstTerrain = true;var billboardCollection = new Cesium.BillboardCollection({});
viewer.scene.primitives.add(billboardCollection);billboardCollection.add({image: "../images/facility.gif",height: 20,width: 20,position: Cesium.Cartesian3.fromDegrees(77.273593, 38.191217),scale: 3.0,pixelOffset: new Cesium.Cartesian2(0.0, -20.0),heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,});
这时就会报错:
解决办法:必须加上scene: viewer.scene
var billboardCollection = viewer.scene.primitives.add(new Cesium.BillboardCollection({scene: viewer.scene,})
);
cesium CLAMP_TO_GROUND 报错 Cannot read property ‘globe‘ of undefined相关推荐
- vue 报错 Cannot read property ‘__ob__‘ of undefined的解决方法
vue 报错 Cannot read property '__ob__' of undefined的解决方法 参考文章: (1)vue 报错 Cannot read property '__ob__' ...
- 事件监听一直报错Cannot set property 'display' of undefined
为什么80%的码农都做不了架构师?>>> css ↓ .wechatBtn {position: relative;} .wechat {position: absolute; ...
- DateTimePicker 日期时间选择器报错 Cannot read property ‘getHours‘ of undefined, 无法选中`[__ob_: observer__]`时做判断
我在一次开发中遇到了这个情况:使用DateTimePicker 日期时间选择器,出现无法选中, 报错 Cannot read property 'getHours' of undefined, 这个原 ...
- Vue开启Gzip打包异常:webpack打包报错Cannot read property ‘emit‘ of undefined
Vue开启Gzip打包异常:webpack打包报错Cannot read property 'emit' of undefined 相关代码 const CompressionPlugin = req ...
- vue echarts使用map地图 引入china.js报错Cannot read property ‘echarts’ of undefined
下载china.js导入项目中引入,会报错Cannot read property 'echarts' of undefined import Echarts from "echarts&q ...
- uniapp 小程序报错 Cannot read property ‘forceUpdate‘ of undefined
uniapp 小程序报错 Cannot read property 'forceUpdate' of undefined 1.问题: 解决:配置小程序的ID manifest.json的文件
- js报错- cannot set property xxx of undefined
case1 报错代码 quizList[index] = currentQuiz; quizList[index].learningItem = item; 报错内容 Cannot read prop ...
- vue 报错 Cannot read property ‘_wrapper‘ of undefined
vue项目中,使用了各种插件和ui库,有时候会出现 Cannot read property '_wrapper' of undefined 这样的报错,一开始还以为是引用的插件报错, 其实是自定义 ...
- 微信小程序接入百度统计报错 Cannot read property ‘mtj‘ of undefined
参考文章微信小程序如何接入百度统计并且自定义事件分析_improvement-CSDN博客_百度统计 自定义事件 接入百度统计,遇到了几个坑 1.第一个坑--微信小程序后台配置了https://hmm ...
最新文章
- python使用fpdf2包和pdfrw报包新内容添加到已有的PDF页面上
- 正则表达式的20个小应用
- 【转】[Java] HashMap使用的示例
- .NET Core 3.0及ASP.NET Core 3.0 前瞻
- 后缀数组 --- HDU 3518 Boring counting
- 使用tp5.1 model返回数据 显示variable type error: array
- Centos 启动盘制作与安装以及遇到的问题
- JTAG to AXI Master的API函数读写操作
- 【JAVA】利用MOM消息队列技术实现分布式随机信号分析系统
- 史上最全的大数据学习资源(Awesome Big Data)
- 让html img图片垂直居中的三种方法
- 访问php网页显示源代码_关于PHP中获取网页源代码的说明
- 【云原生-白皮书】简章2:深入理解DevOps+微服务
- 决策易贴心黑科技第2波,智能巡店更高效!
- 软考-高项-论文-信息系统项目的进度管理
- 襄阳2021年高考成绩查询,2021湖北襄阳高考成绩公布时间
- 八、cadence ic 5141 ——反相器原理图验证
- 【机器学习】在浏览器中训练模型
- 字符输入函数详解(getchar的使用)
- 小熊的人生回忆(四)