I am trying to set up a map view where panning is only enabled when the user zooms in. In order to achieve this I need to get the current zoom level of the camera. I checked this thread but it does not work for 2D view. Any ideas?
I found a way which seems to be working fine at the moment.
I compute the view rectangle at the beginning, then compare it with the new one to see if it changed.
var bounds = viewer.scene.camera.computeViewRectangle();
if( !Cesium.Rectangle.equals(bounds, viewer.scene.camera.computeViewRectangle()) ){
....
}