Open c3-victor-mao opened 6 months ago
Thanks for the suggestion @c3-victor-mao. Would it make sense for your use case to be able to set DEFAULT_HEIGHT
directly? Exposing that property may be the simplest solution in my mind.
@ggetz thanks for the response! After thinking and discussing with my team, here are our thoughts:
No Terrain Provider:
DEFAULT_HEIGHT
) position. This makes sense!DEFAULT_HEIGHT
for flexibility.Terrain Provider:
DEFAULT_HEIGHT
) position.max(terrain provider elevation, Z)
+ DEFAULT_HEIGHT
) position.DEFAULT_HEIGHT
for flexibility.The ability to set DEFAULT_HEIGHT
would solve technically solve our use case in that we could set the DEFAULT_HEIGHT
to the desired Z-position above the terrain provider elevation before the Fly To action is executed. But it seems a bit tedious to do so before the GeoCoder Camera FlyTo.
What are your thoughts on the proposed behavior?
Feature
Context
While implementing a Custom Geocoder in Cesium 1.115, we noticed the Geocoder Camera FlyTo would always zoom in very close to the ground. With the normal Camera FlyTo, we are able to specify a
Cartesian3
with a Z position for the camera so that all our objects would be in the camera's final field of view. We wanted the same for the Custom Geocoder but noticed that theGeocoderViewModel.js
code would always place the camera height at the terrain provider elevation plusDEFAULT_HEIGHT
(1000m) without considering theCartesian3
Z-position.Code References
DEFAULT_HEIGHT
to the terrain provider elevation: GeocoderViewModel.js#L359Feature Request
If the terrain provider is removed, then the Z-position is respected. However, is there a way to be able to position the camera at a certain Z-position, even if there is a terrain provider?
Maybe something like this for GeocoderViewModel.js#L356-L362:
Or maybe this can be a flag passed into the Geocoder?
If this is a valid request, then we'd be happy to open a PR for this with your direction :)