当前位置:网站首页>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;}}});},
边栏推荐
猜你喜欢
随机推荐
transaction, storage engine
Chain Reading | The latest and most complete digital collection calendar-07.28
Index Notes【】【】
ORACLE system table space SYSTEM is full and cannot expand table space problem solving process
用Pytorch从0到1实现逻辑回归
毫米波雷达数据集Scorp使用
关于cfar检测的学习及仿真
wiki confluence 安装
R语言:修改chart.Correlation()函数绘制相关性图——完美出图
Batch add watermark to pictures batch scale pictures to specified size
几种绘制时间线图的方法
The latest and most complete digital collection sales calendar-07.27
WSTP初体验
pytorch框架学习(2)使用GPU训练
小程序学习笔记:小程序组件间通信方式
图纸怎么折?(A0,A1,A2,A3の图纸如何折成A4大小)
YOLOv5 PyQt5(一起制作YOLOv5的GUI界面)
索引笔记【】【】
链读|最新最全的数字藏品发售日历-07.29
GtkD开发之路