function show3DCoordinates(){
//地图底部工具栏显示地图坐标信息
var elementbottom = document.createElement("div");
$(".cesium-viewer").append(elementbottom);
elementbottom.style.width = "100%";
elementbottom.style.height = "30px";
elementbottom.style.background = "rgba(0,0,0,0.5)";
elementbottom.style.position = "absolute";
elementbottom.style.bottom = "0px";
elementbottom.style.cursor = "default";
var coordinatesDiv = document.getElementById("map_coordinates");
if (coordinatesDiv) {
coordinatesDiv.style.display = "block";
}
else {
coordinatesDiv = document.createElement("div");
coordinatesDiv.id = "map_coordinates";
coordinatesDiv.style.zIndex = "50";
coordinatesDiv.style.bottom = "1px";
coordinatesDiv.style.height = "29px";
coordinatesDiv.style.position = "absolute";
coordinatesDiv.style.overflow = "hidden";
coordinatesDiv.style.textAlign
cesium 跟踪鼠标移动 获取鼠标当前地理坐标信息
最新推荐文章于 2025-07-09 16:31:23 发布
本文介绍了一个JavaScript函数,它在Cesium地图中实现了一个底部工具栏,用于实时显示地图的3D坐标、视角高度和模型高度。通过鼠标移动触发坐标更新,适合GIS应用开发者了解用户位置数据。

1266

被折叠的 条评论
为什么被折叠?



