-
-
Notifications
You must be signed in to change notification settings - Fork 169
Update leafletRasterLayer to dispatch empty image if no raster data
#620
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…turns an empty array (no raster data); run npm audit fix
|
How can I reproduce the original issue? |
|
Example web page/app demonstrating the problem included below. The |
|
This archive is gzipped PNGs that has a header indicating PNG data, can you please generate a correct archive with TileCompression=None and TileType=PNG so we can eliminate other issues with loading the example? |
|
Editing the header in the PMTiles generates a file that returns broken images in the browser. I tried building a PMTiles database from scratch, converting it from an MBTiles database of raster images (produced by the tilezen/go-tilepacks This was done using a freshly compiled instance of the Step 1: Convert MBTiles to PMTiles Step 2: Show new PMTiles data Step 3: Show new PMTiles header data Step 4: Edit header to set "tile_compression" = "none" and "tile_type" = "png": Step 5: Show updated PMTiles data When I try to load the newly edit PMTiles database in the application (above) this is what I see:
|
|
No tool should ever write PNGs with gzip compression applied as it is a waste of CPU cycles. Can you provide |
|
SQLite database is here: https://static.sfomuseum.org/aerial/193X.db The images should not be compressed as this was addressed in the The SQLite databases we generate are created with a call like this: Note: This is not 193X. It is the example from our internal docs but it's the template we use for all SQLite databases derived from |
|
This is a SQLite database of PNG images, but the Instead of doing |
|
Because the current setup produces PMTiles databases that work fine, save for not triggering the "load" event, and |
* Update js/src/adapters.ts to dispatch empty image if source.getZxy returns an empty array (no raster data); run npm audit fix * js: simplify leaflet missing tile case [#620] --------- Co-authored-by: thisisaaronland <thisisaaronland@localhost>
|
Merged in #624 The default for an |
|
4.3.1 released on https://www.npmjs.com/package/pmtiles |
|
Published 4.3.2 with the fix |
|
Confirmed that 4.3.2 works as expected. Thanks! |



leafletRasterLayerto dispatch empty image ifsource.getZxyreturns an empty array (no raster data).npm audit fixThis change means that the
donecallback is always invoked, which is dispatched by the Leaflet.GridLayer_tileReadythus ensuring that the layer's "load" event will be fired correctly.