-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Combination of padding and pitch lead to unexpected results #16490
Comments
I'll need to split this: 1. asymmetric viewport Hope this would clarify the asymmetric viewport design: #15163 (comment) In short: One could get to the previous behavior by offsetting viewport center and not using padding #15163 (comment). 2. performance
Related to performance, we have LOD integrated #16335 but it is not yet taken into use for this case, apparently. Let's track the status at #15163. |
Thank you very much for explanation of the design, that helped. However, what's not clear why the pitch is changing when I specify padding. I am quite convinced that there is a difference in ~10 degrees in my case. Or did I miss something in your explanation? |
It is in collapsed section of this comment #15163 (comment). Expanding it here:
|
When repeating your exercise, I took new screenshots with and without padding. Placed a center on a shown object (tree indicating park) and pasted left top quarter of the map taken without any padding on image with padding. As you can see, results are different. While on the bottom, pasted section matches (so zoom is the same), following the streets on the vertical border you could quickly see the discrepancy. Strangely, though, I would read that the pitch is lower here in the pasted area (in the map without padding). Or do we have some kind of curvature effects towards the top of the map? |
Platform: Linux, Qt 5.14
Mapbox SDK version: git master; d4af66e
Summary
When adding non-zero padding to the camera, there is interaction between zoom and pitch settings that is not expected (shown below). With zero pitch, zoom stays the same regardless of of the padding, as expected.
As it is shown below, effective pitch becomes larger than 60 degrees making the application slow and unresponsive.
This issue was not present in QMapboxGL incorporated into Qt as a location module.
In this application (Pure Maps), padding is used to push the center of the map towards button when the user is navigating. While just exploring, padding is set to small leading to the map center being in the center as well.
Steps to trigger behavior
Expected behavior
Despite padding, scale and pitch would be the same as in the map without padding.
Actual behavior
Results are dramatically different and it is not clear how to compensate for it.
Map without padding, zoom 16, pitch 60 degrees:
Map with larger padding, zoom 16, pitch 60 degrees:
Map with larger padding, zoom and pitch found to match map without padding:
To match the map without padding, I changed zoom and pitch in the map with padding. Result was zoom ~16.6 and pitch ~52 degrees
The text was updated successfully, but these errors were encountered: