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

More options for flyTo, like space around target #10410

Open
SentretC opened this issue May 30, 2022 · 1 comment
Open

More options for flyTo, like space around target #10410

SentretC opened this issue May 30, 2022 · 1 comment

Comments

@SentretC
Copy link

For aesthetic reasons, it's sometimes desirable to have some space around the target after calling viewer.flyTo. This can be achieved with the offset option, but it's hard to determine the appropriate offset for targets of different sizes.
The API document says: "If the range is zero, a range will be computed such that the whole bounding sphere is visible."
Maybe we can have a rangeMultiplier kind of option that applies to the calculated range?
Or just expose a function that returns the bounding sphere of all those types of targets and let us do whatever we want to it.

Also, I don't want to get too close when the target is small. It would be nice if flyTo respects ScreenSpaceCameraController.minimumZoomDistance as requested by #9620, but I prefer a separate option (allowing the user to further zoom in if they like).

One more thing, doc for Camera.flyTo says that if duration is omitted, "Cesium attempts to calculate an ideal duration based on the distance to be traveled by the flight." This is a cool feature, but to me the calculated duration is kind of long. I hope I can specify a multiplier to the calculated duration, rather than a constant custom duration.

@ggetz
Copy link
Contributor

ggetz commented May 31, 2022

Hi @SentretC, we agree that the current API is not as flexible or easy-to-use as possible. This specific feedback is helpful. We're hoping to revise the camera API in a wholistic way in the near future, and would likely consider these as a part of that effort.

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