More options for flyTo, like space around target
- Dominant language
- JavaScript
- Stars
- 15.7k
- Forks
- 3.9k
- Avg merge
- 4d 6h
- Merged PRs (30d)
- 34
Description
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.
Contributor guide
Research direction
Start with the documented viewer.flyTo and Camera.flyTo APIs, focusing on the existing offset, range, duration, and ScreenSpaceCameraController.minimumZoomDistance behavior referenced in the issue and #9620. Clarify which of the requested capabilities is in scope, then define completion around one agreed API behavior and its documented result.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- api, computer-graphics
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100