Skip to content

Commit

Permalink
Fix duplicate Bing map attributions. (#7408)
Browse files Browse the repository at this point in the history
(cherry picked from commit dbbdc0a)
  • Loading branch information
pmconne authored and mergify[bot] committed Nov 20, 2024
1 parent 82b3697 commit 4bc475c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
10 changes: 10 additions & 0 deletions common/changes/@itwin/core-frontend/master_2024-11-20-15-45.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@itwin/core-frontend",
"comment": "Fix duplicate Bing map attributions.",
"type": "none"
}
],
"packageName": "@itwin/core-frontend"
}
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,12 @@ export class BingMapsImageryLayerProvider extends MapLayerImageryProvider {
for (const tile of tiles) {
if (tile instanceof MapTile) {
// compare to the set of Bing attributions that we have not yet matched.
for (const attribution of unmatchedSet) {
if (attribution && attribution.matchesTile(tile, this._mapTilingScheme)) {
for (let iAttr = 0; iAttr < unmatchedSet.length; iAttr++) {
const attribution = unmatchedSet[iAttr];
if (attribution.matchesTile(tile, this._mapTilingScheme)) {
matchingAttributions.push(attribution);
unmatchedSet.splice(iAttr, 1);
break;
}
}
}
Expand Down

0 comments on commit 4bc475c

Please sign in to comment.