Skip to content

Commit aab62e7

Browse files
stepankuzminmourner
authored andcommitted
Add ImageProvider (internal-2363)
1 parent f229beb commit aab62e7

File tree

13 files changed

+485
-282
lines changed

13 files changed

+485
-282
lines changed

debug/landmark-icons.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
},
4444
'mapbox-landmarks': {
4545
type: 'raster-array',
46-
url: 'mapbox://mapbox.mbx-landmark-icons-v1-staging',
46+
url: 'mapbox://mapbox.mapbox-landmark-icons-v1',
4747
}
4848
};
4949

src/data/mrt/mrt.esm.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -899,7 +899,9 @@ class MapboxRasterLayer {
899899
default:
900900
throw new MRTError(`Invalid band \`${JSON.stringify(band)}\`. Expected string or integer.`);
901901
}
902-
throw new MRTError(`Band not found: ${JSON.stringify(band)}`);
902+
903+
// If we reach here, the band was not found
904+
return {blockIndex: -1, blockBandIndex: -1};
903905
}
904906

905907
/**
@@ -974,6 +976,10 @@ class MapboxRasterLayer {
974976
blockBandIndex
975977
} = this.getBlockForBand(band);
976978

979+
if (blockIndex < 0) {
980+
throw new MRTError(`Band not found: ${JSON.stringify(band)}`);
981+
}
982+
977983
/** @type {Uint8Array} */
978984
const blockData = this._decodedBlocks.get(blockIndex.toString());
979985
if (!blockData) {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy