mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-15 15:52:21 +00:00
Keep traffic vehicles and road flow across globe switches
This commit is contained in:
1 parent
4e09559337
commit
75df3389f3
20 files changed
+586
-109
No files matched your search
@@ -270,12 +270,12 @@ export function createIngestion({
|
||||
layerState._viewHeightEstimate = 0;
|
||||
const centerLat = (clamped.south + clamped.north) / 2;
|
||||
const centerLon = (clamped.west + clamped.east) / 2;
|
||||
const scene = layerState._viewer?.scene;
|
||||
const scene = layerState._trafficScene?.() ?? layerState._viewer?.scene;
|
||||
const location = geo.cartographic.fromDegrees(centerLon, centerLat);
|
||||
let estimated = services.ground?.cachedGroundFloor?.(centerLat, centerLon);
|
||||
if (!Number.isFinite(estimated)) {
|
||||
try {
|
||||
estimated = scene?.globe?.show
|
||||
estimated = scene?.engine ? scene.sampleHeight(location) : scene?.globe?.show
|
||||
? scene.globe.getHeight?.(location)
|
||||
: scene?.sampleHeightSupported
|
||||
? scene.sampleHeight(location, [layerState._pointCollection])
|
||||
|
||||
Reference in new issue
Block a user