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相关推荐

  1. vue 报错 Cannot read property ‘__ob__‘ of undefined的解决方法

    vue 报错 Cannot read property '__ob__' of undefined的解决方法 参考文章: (1)vue 报错 Cannot read property '__ob__' ...

  2. 事件监听一直报错Cannot set property 'display' of undefined

    为什么80%的码农都做不了架构师?>>>    css ↓ .wechatBtn {position: relative;} .wechat {position: absolute; ...

  3. DateTimePicker 日期时间选择器报错 Cannot read property ‘getHours‘ of undefined, 无法选中`[__ob_: observer__]`时做判断

    我在一次开发中遇到了这个情况:使用DateTimePicker 日期时间选择器,出现无法选中, 报错 Cannot read property 'getHours' of undefined, 这个原 ...

  4. Vue开启Gzip打包异常:webpack打包报错Cannot read property ‘emit‘ of undefined

    Vue开启Gzip打包异常:webpack打包报错Cannot read property 'emit' of undefined 相关代码 const CompressionPlugin = req ...

  5. vue echarts使用map地图 引入china.js报错Cannot read property ‘echarts’ of undefined

    下载china.js导入项目中引入,会报错Cannot read property 'echarts' of undefined import Echarts from "echarts&q ...

  6. uniapp 小程序报错 Cannot read property ‘forceUpdate‘ of undefined

    uniapp 小程序报错 Cannot read property 'forceUpdate' of undefined 1.问题: 解决:配置小程序的ID manifest.json的文件

  7. js报错- cannot set property xxx of undefined

    case1 报错代码 quizList[index] = currentQuiz; quizList[index].learningItem = item; 报错内容 Cannot read prop ...

  8. vue 报错 Cannot read property ‘_wrapper‘ of undefined

    vue项目中,使用了各种插件和ui库,有时候会出现 Cannot read property '_wrapper' of undefined  这样的报错,一开始还以为是引用的插件报错, 其实是自定义 ...

  9. 微信小程序接入百度统计报错 Cannot read property ‘mtj‘ of undefined

    参考文章微信小程序如何接入百度统计并且自定义事件分析_improvement-CSDN博客_百度统计 自定义事件 接入百度统计,遇到了几个坑 1.第一个坑--微信小程序后台配置了https://hmm ...

最新文章

  1. python使用fpdf2包和pdfrw报包新内容添加到已有的PDF页面上
  2. 正则表达式的20个小应用
  3. 【转】[Java] HashMap使用的示例
  4. .NET Core 3.0及ASP.NET Core 3.0 前瞻
  5. 后缀数组 --- HDU 3518 Boring counting
  6. 使用tp5.1 model返回数据 显示variable type error: array
  7. Centos 启动盘制作与安装以及遇到的问题
  8. JTAG to AXI Master的API函数读写操作
  9. 【JAVA】利用MOM消息队列技术实现分布式随机信号分析系统
  10. 史上最全的大数据学习资源(Awesome Big Data)
  11. 让html img图片垂直居中的三种方法
  12. 访问php网页显示源代码_关于PHP中获取网页源代码的说明
  13. 【云原生-白皮书】简章2:深入理解DevOps+微服务
  14. 决策易贴心黑科技第2波,智能巡店更高效!
  15. 软考-高项-论文-信息系统项目的进度管理
  16. 襄阳2021年高考成绩查询,2021湖北襄阳高考成绩公布时间
  17. 八、cadence ic 5141 ——反相器原理图验证
  18. 【机器学习】在浏览器中训练模型
  19. 字符输入函数详解(getchar的使用)
  20. 小熊的人生回忆(四)

热门文章

  1. 载谭 Binomial Sum:多项式复合、插值与泰勒展开
  2. 966SEO学习网:火车头采集器使用教程(入门+高级)
  3. commons-codec使用简介
  4. 分位数Quantiles
  5. OracleERP表结构--PO模块(1)
  6. 绝对定位和相对定位的研究
  7. 从Page结构来看达梦数据库是不是纯自研
  8. MATLAB—离散一元、二元、多元函数求导求梯度(二维、三维、多维空间)(diff和gradient)
  9. opencv-contours轮廓提取
  10. linux 修改hosts