mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-17 16:52:20 +00:00
Street Level: polar look-at, a bounded terrain wait, takeovers during the flight
- The look-at longitude wraps fully, so a tilted camera at a pole gives a point on the globe. The strict off-globe check on street_level is undone: points are clamped again, as before. - A posted view that fails is answered, and the views behind it still apply. - A posted view waits at most 2 s for the terrain under its camera, then keeps its own estimate. - A camera taken during that wait stays where it is: the rest of the view applies, and only its photos stand down. - show_street_level keeps a search or a press on the globe made during its own flight: it adopts only its own navigation stamps on landing, and a gesture is never forgiven.
This commit is contained in:
1 parent
ae66d07575
commit
0ebc09079d
8 files changed
+193
-79
No files matched your search
@@ -208,21 +208,6 @@ test('street-level photos travel in the link, light their source and bring their
|
||||
assert.equal(streetLevelFromParams(new URLSearchParams('sl=bing,1,2')), null);
|
||||
assert.equal(streetLevelFromParams(new URLSearchParams('lat=1')), null);
|
||||
assert.equal(createView({ camera: { lat: 1, lon: 2 } }).street_level, null);
|
||||
// A point off the globe is refused, like an unknown source.
|
||||
for (const bad of [
|
||||
{ lat: 95, lon: 2 },
|
||||
{ lat: 48, lon: 200 },
|
||||
{ lat: Number.NaN, lon: 2 },
|
||||
])
|
||||
assert.throws(
|
||||
() =>
|
||||
createView({
|
||||
camera: { lat: 1, lon: 2 },
|
||||
street_level: { provider: 'mapillary', ...bad },
|
||||
}),
|
||||
TypeError,
|
||||
JSON.stringify(bad),
|
||||
);
|
||||
// Half a point is not mixed with the camera's other half.
|
||||
const half = createView({
|
||||
camera: { lat: 1, lon: 2 },
|
||||
|
||||
Reference in new issue
Block a user