mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-05 19:04:02 +00:00
fix(street-level): IC8 follow-ups for Google Street View
- An open after a failed one is no longer failed by the old panorama's status: only status_changed can reject; position_changed only resolves. - A nearest lookup aborted, timed out or refused while Google's script loads no longer sends its getPanorama request once the script arrives. - A panorama-details lookup that never answers times out after 10 s, cools down and retries; an unmount releases lookups in flight, and their late answers are dropped. - Every Maps loader on a page shares one script load and ready callback, and either can retry a failed script. - OPEN STREET VIEW aimed at the sky opens nothing and says to aim at a street, instead of looking up the camera footprint. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
76db4114ff
commit
10f1986e38
10 files changed
+279
-30
No files matched your search
@@ -155,9 +155,13 @@ export function createGoogleProvider({
|
||||
signal?.throwIfAborted();
|
||||
const filter = context.getFilter();
|
||||
if (filter.pano === 'flat') return null;
|
||||
// Set once the caller has its answer (aborted, timed out, refused):
|
||||
// a lookup still waiting on Google's script then asks nothing.
|
||||
let settled = false;
|
||||
const lookup = (async () => {
|
||||
const lib = await loader.importLibrary('streetView');
|
||||
await getService();
|
||||
if (settled) return null;
|
||||
const { GOOGLE, OUTDOOR } = lib.StreetViewSource;
|
||||
try {
|
||||
const { data } = await service.getPanorama({
|
||||
@@ -177,6 +181,8 @@ export function createGoogleProvider({
|
||||
ms: NEAREST_TIMEOUT_MS,
|
||||
signal,
|
||||
loader,
|
||||
}).finally(() => {
|
||||
settled = true;
|
||||
});
|
||||
const panoId = data?.location?.pano;
|
||||
if (!panoId) return null;
|
||||
|
||||
Reference in new issue
Block a user