maplibre-gl-js
maplibre-gl-js copied to clipboard
Make showTileBoundaries prefer a vector source
Fixes #833
I don't know why the render test doesn't trip. Manual test:

The render test doesn't trip because it's a raster maxzoom of 1 and a vector maxzoom of 14.
This adds a test with raster maxzoom of 17. Old behavior was to show tile boundaries for the raster source, and 0 kB. New behavior is to show tile boundaries and byte sizes for the vector tiles.
Bundle size report:
Size Change: +52 B Total Size Before: 204 kB Total Size After: 204 kB
| Output file | Before | After | Change |
|---|---|---|---|
| maplibre-gl.js | 195 kB | 195 kB | +52 B |
| maplibre-gl.css | 9.03 kB | 9.03 kB | 0 B |
ℹ️ View Details
No major changes
Can you please add tests and update the changelog.md file?
Done, done.
I note that https://github.com/maplibre/maplibre-gl-js/blob/main/CONTRIBUTING.md#changelog-conventions indicates to put changelog entries in the pull request.
Any change for a unit test?
Could factor out the logic to an exported function in either painter.ts or draw_debug.ts, then invoke it with various Maps and assert that it returns the desired SourceCache.
The logic is currently inside a single 155-line function named render.
Exporting the show tile boundaries to a different method/file and testing it would be great, thanks!
Any updates on this?
I think I can find some time this week.
Any updates on this? I would really like to push this forward...
@jleedev any news?
Thanks for the code review.