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

Pitch improvements #37

Merged
merged 7 commits into from
Jun 12, 2024
Merged

Pitch improvements #37

merged 7 commits into from
Jun 12, 2024

Conversation

hactar
Copy link
Collaborator

@hactar hactar commented May 13, 2024

The current pitch implementation manipulates pitch via minPitch and maxPitch. This has two issues:

  • You can't simply set pitch to something like 60, but continue to allow the user unrestricted pitching
  • This way of changing pitch does not allow for animation

I've split pitch into pitch and pitchRange to allow pitching and restriction separately.

Note, on initial load, functions in our DSL are being called with MLNMapView's frame being .zero. This is bad: the maplibre camera uses the frame for its calculations, for at .zero, they are wrong - there might be other stuff depending on this too. I've worked around this issue by not using the camera for the .zero case, but maybe we should investigate if we can have MLNMapView having a none .zero frame on first load - no idea if this is possible but might make these workarounds obsolete and solve potential other problems on first load.

@ianthetechie
Copy link
Collaborator

Thanks @hactar! I just need to do a bit of testing, but the code looks good + I understand and generally agree with the workarounds. Hopefully merging this soon :)

@Patrick-Kladek Patrick-Kladek mentioned this pull request Jun 7, 2024
5 tasks
@ianthetechie
Copy link
Collaborator

Sorry I've been a bottleneck on this; I'm going to merge and can always handle any issues discovered in testing later. I know you guys are using this as well, so sorry for blocking 😅

@ianthetechie ianthetechie merged commit 780730d into maplibre:main Jun 12, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants