-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Feature request: camera elevation #3552
Comments
First of all, any Specifically, imagine you want to set a camera that comfortably clears the tallest building in a city. You could do it in one line by saying you want a camera with a certain altitude. Or you can guess and check until you come up with the right zoom level. But guessing and checking only works if you hard-code a specific city and a specific building.
The Mapbox iOS and macOS SDKs have an implementation of the requested feature in the |
@1ec5 I agree with what you wrote but I understood the request slightly differently. You're thinking about the altitude of the camera but I think @IvanSanchez is asking about the altitude of the point the camera is looking at. This fits in which the current Right now you can only say "look at the point at 0m above ground level at [-79.3, 43.6]" but the suggestion is to support saying "look at the point at 100m above ground level at [-79.3, 43.6]". I think this makes sense to support. Changing the Tile loading might automatically adapt or it might need some changes. And once that is working, if you set it to something too high for the current zoom it will try to load too many tiles. We need a temporary limit on this. The level-of-detail tile loading we need to implement for pitched view should let us remove this limit eventually. |
Yes, yes, yes, yes. Sorry if I was unclear in my first explanation. The main use case I have in mind is being able to perform |
Hey @ansis, @IvanSanchez, has there been any more exploration of this approach? Am currently working on |
Hi everyone, I'm thinking about something similar for an app I'm working on. I'm animating airline flights and I'm wanting to make it roughly POV from the airplane. I was hoping for an |
Voting up for this feature. |
I've hacked together some code to workaround the lack of core support @1ec5 and @ansis raise good points in #3552 (comment) and #3552 (comment)
True. My suggestion would be when passing a
Hmm, but won't that then mean that |
See also #6093 |
The free camera, via FreeCamerOptions now allows defining the position of the camera with elevation, but the |
PROBLEM DESCRIPTION MY QUESTION |
Hey, what about |
Motivation
With extruded geometries, there are use cases where the focus should be on a specific elevation.
The most obvious is to focus on a building rooftop with a call to
Map#flyTo
. With more 3D data, users might want to have a control to travel "up" and "down" besides moving N-S-W-E.Design
I suggest a new property in
CameraOptions
, namedheight
orelevation
, e.g.:Implementation
I guess the internal camera state shall store the camera elevation somewhere, and modify the 3D transform matrix as appropriate.
This might change the viewport bounds, so the calculations for the tile ranges might change as well (my knowledge of the internals of this project is low, so I don't know if the 3D transform matrix is reused for this purpose).
Any easing function for the camera state (
flyTo
animations and the like) shall also ease and interpolate the elevation.The text was updated successfully, but these errors were encountered: