mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-12 16:52:50 +00:00
fix intermittent issues with Bing Streetside API
sometimes the API returns data in a format not matching the documented format (see https://learn.microsoft.com/en-us/bingmaps/articles/getting-streetside-tiles-from-imagery-metadata). see https://github.com/openstreetmap/iD/issues/10341#issuecomment-2275724738 closes #10341
This commit is contained in:
@@ -114,14 +114,18 @@ function loadNextTilePage(which, url, tile) {
|
||||
const bubbleId = bubble.imageUrl;
|
||||
if (cache.points[bubbleId]) return null; // skip duplicates
|
||||
|
||||
const loc = [bubble.lon, bubble.lat];
|
||||
// workaround for https://github.com/openstreetmap/iD/issues/10341#issuecomment-2275724738
|
||||
const loc = [
|
||||
bubble.lon || bubble.longitude,
|
||||
bubble.lat || bubble.latitude
|
||||
];
|
||||
const d = {
|
||||
loc: loc,
|
||||
key: bubbleId,
|
||||
imageUrl: bubble.imageUrl.replace('{subdomain}',
|
||||
bubble.imageUrlSubdomains[0]
|
||||
),
|
||||
ca: bubble.he,
|
||||
ca: bubble.he || bubble.heading,
|
||||
captured_at: bubble.vintageEnd,
|
||||
captured_by: 'microsoft',
|
||||
pano: true,
|
||||
|
||||
Reference in New Issue
Block a user