Repository navigation
Use frustum culling in OSM tile traversal - #4593
Merged
Merged
Conversation
xintongxia
reviewed
May 15, 2020
kylebarron
reviewed
May 18, 2020
| const elevationMax = (zRange && zRange[1] * unitsPerMeter) || 0; | ||
|
|
||
| // Always load at the current zoom level if pitch is small | ||
| const minZ = viewport.pitch <= 60 ? maxZ : 0; |
Collaborator
There was a problem hiding this comment.
Is this necessary to keep in sync with basemaps, e.g. Mapbox GL? I could envision cases where a user might want to relax this to load fewer tiles at moderate pitch, e.g. 40-60 degrees. But I guess relaxing this by default would be a backwards incompatible change.
Collaborator
Author
There was a problem hiding this comment.
This is also what mapbox-gl is doing. Lowering the threshold to 40-50 saves 2-3 tile loads tops, and may have unexpected behavioral changes for existing users (60 is the default maxPitch)
kylebarron
reviewed
May 18, 2020
kylebarron
reviewed
May 18, 2020
Pessimistress
force-pushed
the
x/2d-tile-culling
branch
from
May 26, 2020 21:50
3d2a67e to
6cc65ae
Compare
xintongxia
approved these changes
May 27, 2020
kylebarron
approved these changes
May 27, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For #4482
Change List