Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Tiles LOD: load and render based on zoom when displayed #15230

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

astojilj
Copy link
Contributor

@astojilj astojilj commented Jul 26, 2019

lod

Attached video shows 70 degree pitch on iPadMini2: ipadmini270degpitch.mp4.zip

Fixes #9037, #15163

* center of the screen, max pitch is further capped by Transform::getMaxPitchForEdgeInsets.
* We set the max to 70 to keep the limit constant with small padding.
*/
constexpr double PITCH_MAX = 70 * DEG2RAD;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI, the iOS map SDK is currently using this constant to fake a tilted annotation view specifically for the user dot / user puck:

// The pitch intensity represents how much the map view is actually pitched compared to
// what is possible. The value will range from 0% (not pitched at all) to 100% (pitched as much
// as the map view will allow). The map view's maximum pitch is defined in `mbgl::util::PITCH_MAX`.
CGFloat pitchIntensity = pitch / MGLDegreesFromRadians(mbgl::util::PITCH_MAX);

Though something like mapbox/ios-sdk-examples#111 (comment) would be a much sounder approach long-term: #10498.

@friedbunny friedbunny added Core The cross-platform C++ core, aka mbgl needs changelog Indicates PR needs a changelog entry prior to merging. rendering performance Speed, stability, CPU usage, memory usage, or power usage labels Jul 29, 2019
@chloekraw chloekraw added this to the release-queso milestone Aug 1, 2019
@astojilj astojilj changed the base branch from astojilj-near-horizon to master August 5, 2019 17:29
Unit test verifies that, with different camera parameters combinations LOD tile cover covers all tiles returned by single level tileCover.
@astojilj
Copy link
Contributor Author

Update:
@arindam1993 is planning to implement this first in mapbox-gl-js.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Core The cross-platform C++ core, aka mbgl needs changelog Indicates PR needs a changelog entry prior to merging. performance Speed, stability, CPU usage, memory usage, or power usage rendering
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Load lower resolution tiles for tilted views
4 participants