当前位置:网站首页>cesium listens to map zoom or zoom to control whether the content added on the map is displayed
cesium listens to map zoom or zoom to control whether the content added on the map is displayed
2022-08-10 05:48:00 【Why can't I get enough to eat?】
Controlling the display and hiding of entities according to the height of the viewing angle, the specific effects are as follows:

The main code is as follows:
// Monitor map zoom or zoom to control whether the content added on the map is displayedcontrolVisible() {viewer.camera.changed.addEventListener(function() {//View change monitoringvar currentMagnitude = viewer.camera.getMagnitude();if (currentMagnitude > 13000000) {for (let i = 0; i < viewer.entities.values.length; i++) {viewer.entities.values[i].show = false;}} else {for (let i = 0; i < viewer.entities.values.length; i++) {viewer.entities.values[i].show = true;}}});},边栏推荐
猜你喜欢
随机推荐
PyTorch 入门之旅
Pony语言学习(七)——表达式(Expressions)语法(单篇向)
AWR1843型号毫米波雷达使用
作业实验四
笔记1
微信小程序wx.writeBLECharacteristicValue汉字转buffer问题
【el和template区别】
智能合约和去中心化应用DAPP
操作表 函数的使用
2021-07-09
kaggle小白必看:小白常见的2个错误解决方案
MySql constraints
Chain Reading|The latest and most complete digital collection sales calendar-08.02
链读好文:Jeff Garzik 推出 Web3 制作公司
数据库 笔记 创建数据库、表 备份
Content related to ZigBee network devices
在yolov5的网络结构中添加注意力机制模块
毫米波雷达数据集Scorp使用
GtkD开发之路
WSTP初体验









