Keep street imagery and picked coverage across Cesium and Navara

This commit is contained in:
German Khokhlov committed 2026-11-03 04:13:26 +04:00
1 parent 75df3389f3
commit b98cbeebf2
20 files changed
+561 -62

No files matched your search

+3 -3
View File
@@ -1,10 +1,10 @@
import * as geo from '../../geo/index.js';
import { GROUND_CLICK_MAX_HEIGHT_M } from './policy.js';
import { cameraHeightAboveGround } from './view.js';
import { cameraHeightAboveGround, cameraLocation } from './view.js';
/** Whether the camera is low enough for a click on the ground to mean a street. */
export function groundClickHeightOk(viewer) {
if (!viewer?.camera?.positionCartographic) return false;
if (!cameraLocation(viewer)) return false;
return cameraHeightAboveGround(viewer) <= GROUND_CLICK_MAX_HEIGHT_M;
}
@@ -32,7 +32,7 @@ export function createGroundClick({ state, openNearest, isAvailable }) {
)
.map((entry) => entry.def.id);
if (!providerIds.length) return false;
const position = scenePick.pickGroundPosition(state.viewer, screenPosition);
const position = state.viewer.engine ? state.viewer.engine.picker.pickGlobe(screenPosition) : scenePick.pickGroundPosition(state.viewer, screenPosition);
const carto = position && geo.cartographic.fromCartesian(position);
if (!carto) return false;
return openNearest(