-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
reparse overscaled tiles #1005
reparse overscaled tiles #1005
Conversation
|
Also, considering underlying data is the same for overscaled tile and max zoom tile, could we change interpolation so that it doesn't jump when the overscaled tiles are loaded? |
Should we just remove maxzoom for geojson sources? or would it be better to also overscale geojson tiles?
Yes, we should look at this more carefully when all the other labeling stuff is done. |
We could do either way. The advantage of overscaling vs generating new clipped tiles is potentially no jumpy tiles. cc @jfirebaugh |
When the current zoom is past the vectortile source's maxzoom, load overscaled tiles and parse them specifically for the current integer zoom level. This is necessary to: - make layout property functions work - let us place labels only 1 zoom level deep (for performance) Overscaled tile id's have the same x/y/w as their corresponding tiles from the source's maxzoom. For example: currentzoom: 18 maxzoom: 16 The overscaled tile { z: 18, x: 123, y: 456 } loads the real tile { x: 16, x: 123, y: 456 }
47c1fcb
to
55b4b39
Compare
Both tests and rendering tests pass (with mapbox/mapbox-gl-test-suite#17). |
👍 |
Can we get this ported to native? |
@kkaefer I'll start on it soon. issue so that I don't forget: mapbox/mapbox-gl-native#912 |
Also, is this covered by tests? |
mapbox/mapbox-gl-test-suite@28b6a25 adds rendering tests. Is there anything that should be covered by regular tests? |
Can we use a few sample tiles and compare the output of the clipped tile algorithm with the expected result? |
@kkaefer we're not actually clipping the data. It draws an overscaled tile the same way it used to draw it. The only change is that instead of reusing the same tile object, it creates a new tile object. It creates a new tile object so that layout property functions work and so that labelling gets reprocessed for that zoom level. |
This reparses tiles at zoom levels > the sources maxzoom so that layout property functions are applied and label are replaced. mapbox/mapbox-gl-js#1005 and mapbox/mapbox-gl-js@794c1eb
This reparses tiles at zoom levels > the sources maxzoom so that layout property functions are applied and label are replaced. mapbox/mapbox-gl-js#1005 and mapbox/mapbox-gl-js@794c1eb
so that layout property functions are applied correctly and so that label placement is redone js: mapbox/mapbox-gl-js#1005 and mapbox/mapbox-gl-js@440bc02
Fixes #1004
@jfirebaugh this was easier to handle by adding a couple special cases in Source and TileCoord than by loading multiple copies and clipping.
When the current zoom is past the vectortile source's maxzoom, load overscaled tiles and parse them specifically for the current integer zoom level. This is necessary to:
Overscaled tile id's have the same x/y/w as their corresponding tiles from the source's maxzoom.
For example:
currentzoom: 18
maxzoom: 16
The overscaled tile { z: 18, x: 123, y: 456 }
loads the real tile { x: 16, x: 123, y: 456 }