Skip to content

Commit

Permalink
fix intermittent issues with Bing Streetside API
Browse files Browse the repository at this point in the history
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 #10341 (comment)

closes #10341
  • Loading branch information
tyrasd committed Aug 8, 2024
1 parent 43dab66 commit 9e239df
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ _Breaking developer changes, which may affect downstream projects or sites that
#### :scissors: Operations
#### :camera: Street-Level
* Add Panoramax as new street level imagery provider ([#9941], thanks [@mattiapezzotti])
* Fix intermittent issues with Bing Streetside sometimes returning API results in a undocumented format ([#10341])
#### :white_check_mark: Validation
* Drop deprecated validation service _ImproveOSM_ ([#10302], thanks [@arch0345])
#### :bug: Bugfixes
Expand Down
8 changes: 6 additions & 2 deletions modules/services/streetside.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 9e239df

Please sign in to comment.