标记便签移除距离控制,仅保留视野内判断

This commit is contained in:
2026-09-19 13:32:42 +08:00
parent 199ef8f892
commit 37b7923849
-2
View File
@@ -313,12 +313,10 @@ export class CesiumGlobe {
_updateMarkerLayer() {
const scene = this.viewer.scene;
const camera = scene.camera;
const outOfRange = camera.positionCartographic.height > 8e6; // 最远 8000 km 内显示
for (const m of this.markers) {
const el = m.el;
if (!el) continue;
if (outOfRange) { el.style.display = 'none'; continue; }
const win = Cesium.SceneTransforms.worldToWindowCoordinates(scene, m.position);
if (!win) { el.style.display = 'none'; continue; }