当前位置:网站首页>Cesium add dynamic pop-up
Cesium add dynamic pop-up
2022-07-28 01:21:00 【Yue Yan Shao Falcon】

The realization principle is actually entity+div;
var viewer=ysc.createNormalCesium("cesiumContainer",{});
var handler = new Cesium.ScreenSpaceEventHandler(viewer.scene.canvas);
handler.setInputAction(function(e) {
var cartesian = viewer.camera.pickEllipsoid(e.position, viewer.scene.globe.ellipsoid);
var cartographic = Cesium.Cartographic.fromCartesian(cartesian);
var lon = Cesium.Math.toDegrees(cartographic.longitude).toFixed(5);// rounding Keep five digits after the decimal point
var lat = Cesium.Math.toDegrees(cartographic.latitude).toFixed(5);// rounding Keep five digits after the decimal point
// var height = Math.ceil(viewer.camera.positionCartographic.height); // Get the camera height
if (cartesian) {
/** main */
var data={
lon:lon,
lat:lat,
element:$("#one"),//html Elements
addEntity:true,// The default is false, If false Without adding entities , The following entity attributes are not needed , This is the time boxHeightMax But if you want, don't . It represents the geographic coordinate height of the pop-up starting point
boxHeight:20000,// The height of the middle cube
boxHeightDif:500,// The height growth difference of the middle cube , The bigger, the faster
boxHeightMax:40000,// The maximum height of the middle Cube
boxSide:10000,// The side length of the cube
boxMaterial:Cesium.Color.DEEPSKYBLUE.withAlpha(0.5),
circleSize:30000,// Size of big circle , The size of the small circle defaults to half
};
ysc.showDynamicLayer(viewer,data,function (){ // Callback function Change the contents of the pop-up window ;
$("#one").find(".main").html("hello world!"+Math.random()*10000);
});
/** main */
}
},Cesium.ScreenSpaceEventType.LEFT_CLICK);
viewer.camera.flyTo({
destination : Cesium.Cartesian3.fromDegrees(117.16, 32.71, 150000.0)
});Details visible Yue Yan Shao Falcon
边栏推荐
- Ford SUV "Mustang" officially went offline, safe and comfortable
- Basic use of calculation attributes
- Flutter 通话界面UI
- I want to get 20K after 3 years of experience, but I haven't got it for half a month?
- Shaanxi Yuanjie semiconductor, a laser chip manufacturer, was invested by 8 investment institutions including GF Securities and CITIC Securities
- 二维数组相关知识
- 工具函数:把一个工作区中非空字段值付给另一个工作区相同字段
- 美光起诉联电窃密案宣判:联电被罚1亿元新台币,三名员工被判刑!
- Go language variable
- 闻泰科技收购安世半导体剩余股权获得无条件通过
猜你喜欢

Gossip: an initially perfect FS is as impractical as the first version of the program requiring no bugs

Interface test practical project 02: read interface test documents and practice

Starfish Os打造的元宇宙生态,跟MetaBell的合作只是开始

The cooperation between starfish OS and metabell is just the beginning

Anfulai embedded weekly report no. 275: 2022.07.18--2022.07.24

ABAP CDs table function introduction and examples

If asynchronous processing is implemented according to the framework

字节月薪28K,分享一波我的自动化测试经验....

彻底搞懂kubernetes调度框架与插件
![Deepening the concept of linear algebra [23] 01 - points coordinate points and vectors vectors](/img/9e/267ab60455e859afac3727eff32803.png)
Deepening the concept of linear algebra [23] 01 - points coordinate points and vectors vectors
随机推荐
C language programming | single dog topic explanation
力挺吴雄昂!Arm中国管理层发公开信:对莫须有的指控感到震惊和愤怒!
Brief analysis of advantages, disadvantages and development of SAP modules
如何让数字零售承接起流量时代和留量时代的发展重任,或许才是关键所在
晶方科技:光刻机厂商ASML为公司参与并购的Anteryon公司的最主要客户之一
Swoole内存-table详解
Huami technology "Huangshan No.2" release: AI performance is improved by 7 times, and power consumption is reduced by 50%!
Rviz uses arbotix to control robot motion
Node red interacts with tdengine
What is the reason for Chinese garbled code when dataworks transmits data to MySQL
ABAP CDs table function introduction and examples
I/O设备的基本概念及分类
S-RPN: Sampling-balanced region proposal network for small crop pest detection
Shenzhen Huaqiang announced that it plans to invest no more than 20million yuan in BYD semiconductor
糟糕程序员的20个坏习惯
Gazebo 控制实例
Deepening the concept of linear algebra [23] 01 - points coordinate points and vectors vectors
Use of swarm task task
从功能测试到自动化测试,月薪突破30K+,我的6年测开经验。
Basic concept and classification of i/o equipment