当前位置:网站首页>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
边栏推荐
- 安全检测风险
- [300 opencv routines] 241. Scale invariant feature transformation (SIFT)
- 美光起诉联电窃密案宣判:联电被罚1亿元新台币,三名员工被判刑!
- 工具函数:把一个工作区中非空字段值付给另一个工作区相同字段
- Basic concept and classification of i/o equipment
- Knowledge of two-dimensional array
- 2022/07/27 learning notes (Day17) code blocks and internal classes
- At the meeting on June 19, SMIC may set the fastest listing record in China!
- Tear the source code of gateway by hand, and tear the source code of workflow and load balancing today
- Gazebo 控制实例
猜你喜欢

Safety detection risk

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

How the test architects of bat factories interpret various disputes of the test platform
![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

Redis-哨兵模式

Knowledge of two-dimensional array

EWM receiving ECC delivery note verification logic problem

Data problems can also be found if there is a space at the end of the field value of MySQL query criteria

Principle of logistic regression

【游戏】任天堂Nintendo Switch超详细购买/使用指南以及注意事项(根据自己使用持续更新中...)
随机推荐
Huawei responded to the US blockade of the supply chain: they still have to pay for 5g patents
浏览器视频帧操作方法 requestVideoFrameCallback() 简介
2022/07/27 学习笔记 (day17) 代码块和内部类
Spreadsheet export excel table
Hierarchy of file system
2022/07/27 learning notes (Day17) code blocks and internal classes
Arm中国夺权大战的背后:“独立”两年,仍难“自主”?
Vandermond convolution learning notes
Deepening the concept of linear algebra [23] 01 - points coordinate points and vectors vectors
BigDecimal common API
In April, global smartphone shipments fell 41% year-on-year, and Huawei surpassed Samsung to become the world's first for the first time
Redis缓存穿透击穿和雪崩
JS global function method module exports exports
Ford SUV "Mustang" officially went offline, safe and comfortable
美光起诉联电窃密案宣判:联电被罚1亿元新台币,三名员工被判刑!
[C language] file operation
Brief analysis of advantages, disadvantages and development of SAP modules
Principle of logistic regression
华米科技“黄山2号”发布:AI性能提升7倍,功耗降低50%!
安全检测风险