fix leafletRasterLayer: empty tiles have display:none [#620] (#627)

This commit is contained in:
Brandon Liu
2025-12-26 16:02:20 +08:00
committed by GitHub
parent 5c84faafa3
commit 2fa87ea9bb
8 changed files with 12 additions and 7 deletions

View File

@@ -56,6 +56,8 @@ export const leafletRasterLayer = (source: PMTiles, options: unknown) => {
const blob = new Blob([arr.data], { type: mimeType });
const imageUrl = window.URL.createObjectURL(blob);
el.src = imageUrl;
} else {
el.style.display = "none";
}
el.cancel = undefined;
done(undefined, el);