How to reposition camera from 3D view to 2D view top view and centered my background image?

I am working on switching 2D to 3D view and vice versa. So from 3D view I want to switch to 2d view and reposition my camera on top view and center my background image. Is anyone can give me a hint or guide how to do it ? Appreciate it ! Thanks!

Hi there,

Can you be more specific about what you mean by background image?

If it’s an imagery provider, you can use Viewer.flyTo.

Hello @Gabby_Getz

Thanks for the reply. Yes I figured it out then what if I want to switch from 2d to 3d with same zoom level and camera position? 2d is imagery provider and 3d is a Cesium3D Tileset.

Thanks for the clarification @humanAlphabet.

I think I would use BoundingSpheres in the case. You can access the bounding sphere of a 3D tileset and zoom to it with an offset. I would save the reference to the tileset’s boundingSphere and use in both 3D and 2D.