maplibre-gl-js icon indicating copy to clipboard operation
maplibre-gl-js copied to clipboard

Make showTileBoundaries prefer a vector source

Open jleedev opened this issue 3 years ago • 7 comments

Fixes #833

jleedev avatar Jul 26 '22 11:07 jleedev

I don't know why the render test doesn't trip. Manual test:

Screenshot 2022-07-26 07 24 36

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.

jleedev avatar Jul 26 '22 11:07 jleedev

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

github-actions[bot] avatar Jul 26 '22 11:07 github-actions[bot]

Can you please add tests and update the changelog.md file?

HarelM avatar Jul 26 '22 11:07 HarelM

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.

jleedev avatar Jul 26 '22 15:07 jleedev

Any change for a unit test?

HarelM avatar Jul 26 '22 16:07 HarelM

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.

jleedev avatar Jul 26 '22 16:07 jleedev

Exporting the show tile boundaries to a different method/file and testing it would be great, thanks!

HarelM avatar Aug 01 '22 14:08 HarelM

Any updates on this?

HarelM avatar Aug 21 '22 13:08 HarelM

I think I can find some time this week.

jleedev avatar Aug 21 '22 14:08 jleedev

Any updates on this? I would really like to push this forward...

HarelM avatar Aug 29 '22 10:08 HarelM

@jleedev any news?

HarelM avatar Sep 08 '22 18:09 HarelM

Thanks for the code review.

jleedev avatar Sep 10 '22 13:09 jleedev