public boolean wantRotate ( double displayWidth , double displayHeight ) { getMapArea ( bb ) ; // current world bounding box boolean aspectDisplay = displayHeight < displayWidth ; boolean aspectWorldBB = bb . getHeight ( ) < bb . getWidth ( ) ; return ( aspectDisplay ^ aspectWorldBB ) ; // aspects are different }
calculate if we want to rotate based on aspect ratio