Skip to content
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

Increase map tilt to 85 degrees #1909

Open
mtpdog opened this issue Dec 4, 2023 · 6 comments
Open

Increase map tilt to 85 degrees #1909

mtpdog opened this issue Dec 4, 2023 · 6 comments

Comments

@mtpdog
Copy link

mtpdog commented Dec 4, 2023

Is your feature request related to a problem? Please describe.
Current tilt limitation (60 degrees) does not allow to see a full perspective without zooming out. Mapbox doesn't have such a limitation.

Describe the solution you'd like
Remove tilt limitation.

Describe alternatives you've considered
Keep as is

Additional context
Add any other context or screenshots about the feature request here.

@louwers louwers added the enhancement New feature or request label Dec 4, 2023
@wipfli
Copy link
Contributor

wipfli commented Dec 5, 2023

We increased the maximum allowed value in MapLibre GL JS.

@louwers
Copy link
Collaborator

louwers commented Dec 5, 2023

@wipfli I searched for an issue / PR but couldn't find one. Do you know what it was changed to?

@wipfli
Copy link
Contributor

wipfli commented Dec 5, 2023

I think the trick is to look for "pitch" and not for "tilt"

image

@wipfli
Copy link
Contributor

wipfli commented Dec 5, 2023

maplibre/maplibre-gl-js#574

@louwers louwers changed the title Increase map tilt to 90 degrees Increase map tilt to 85 degrees Dec 5, 2023
@mindthefish
Copy link

I tried to set it to 85 by changing constexpr double PITCH_MAX = M_PI / 3; to constexpr double PITCH_MAX = 1.4835; // 85 degrees for testing in https://github.com/maplibre/maplibre-native/blob/27cd95337156b1cd6268165273d6147535e50244/include/mbgl/util/constants.hpp#L35C39-L35C39

I was still not able to tilt with gesture, then I found if (fabs(fingerSlopeAngle) < MLNHorizontalTiltToleranceDegrees && fabs(gestureSlopeAngle) > 60.0 ) in https://github.com/maplibre/maplibre-native/blob/27cd95337156b1cd6268165273d6147535e50244/platform/ios/src/MLNMapView.mm#L2641C9-L2641C9
Changing it to if (fabs(fingerSlopeAngle) < MLNHorizontalTiltToleranceDegrees && fabs(gestureSlopeAngle) > mbgl::util::rad2deg(mbgl::util::PITCH_MAX) ) made it possible to tilt further, but the map rendering at around 70 degrees is breaking.
Would anyone happen to have an idea on how to proceed?

@louwers
Copy link
Collaborator

louwers commented Nov 28, 2024

Allowing lower zoom level tiles to load in the distance would help with this: #2958

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants