-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Use frustum culling in OSM tile traversal #4593
Conversation
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; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
)
3d2a67e
to
6cc65ae
Compare
For #4482
Change List