Avoid automatic zoom in when changing to 2D view

Every time we change from Globe 3D View to the 2D view cesium zooms a little bit into the map when the transformation is finished. We have to zoom out to see the whole map. Is there any way to change this behavior?

This can be seen here: https://sandcastle.cesium.com/

Thanks

@mmrj9

Thank you very much for sharing this with the community! I had never noticed this behavior before.

Does this video showcase what you are trying to highlight with your post? I am currently not aware of any quick fixes that will prevent this behavior. Do other community members have any suggestions? One idea would be to automatically move the Camera object closer to the globe when the user switches from 2D view to 3D view. Let me know what you think!

-Sam

@sam.rothstein

Hi Sam,

The problem is the automatic zooming in and not the zooming out.
As you can see in that video, one second after 3D to 2D view transformation is finished, the map automatically zooms in a little bit. With this zoom in there is a part of the plane that stays hidden and you can only see it by zooming out.

Cheers

@mmrj9

I believe that I see the behavior that you are referring to. It appears that the zooming in only occurs on one frame. I suspect that manually adjusting the Camera position and rotation after transitioning from 3D to 2D would be your best option.

-Sam

-Sam