-
Notifications
You must be signed in to change notification settings - Fork 301
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
Allow to zoom to any layer or object3D from the viewer #1906
Comments
Hi, thanks for the suggestion ! There is a method in In any case, it would indeed be nice to have it available in the I shall investigate a bit more on this and let you know of my findings. |
I agree with you that we don't need a
Yes actually there is and I used the same logic to zoom to a bounding box in #1904. However, I think we still need a method to zoom to a bounding box for several reasons:
|
We could implement the possibility to pass bounding box as third parameter of transformCameraToLookAtTarget. |
I think that an helpful API enhancement would be to add a
zoomTo
method toView
that could either take a layer id or an object3D as parameter.To zoom to a layer, we could use the
boundingBox
attribute of layers (see #1903 ) and the CameraUtils methods (see #1904).To zoom to a 3D object, we could also use CameraUtils methods after computing the Object3D bounding box with something like this:
MapBox and Cesium have a similar API for this usecase (
map.zoomTo()
orviewer.zoomTo()
respectively) and it's actually quite useful.The text was updated successfully, but these errors were encountered: