cesium-navigation
cesium-navigation copied to clipboard
ZoomScale should be setable
If there is a terrain Model loaded, then the scale for zoom in and zoomout is too big. So if i click on zoomIn it will send me directly to the ground of the terrain and it is at this time not really movable.
So it would be nice to set the zoom scale - i think it use 2.0 / 3.0 - or to calculate it depending on the used elevation model.
The problem in 3D with terrain data is that the distance from the camera to the ellipsoid is used and so 2/3 of that may reach the ground (of the terrain not of the ellipsoid). So instead of using the point on the elliposid one should use the focus point on the actual terrain. Providing a way to change the default scale factors for zooming in and out might be helpful in some cases but as long as the previously described problem is not fixed it wouldn't be that helpful.
I am working on a general solution for zooming so that it works in 2D, Columbus (see #17) and 3D view as well as taking the terrain into account.
I've just created a pull request. Until then you can check it out at my repository or directly try the demo: http://larcius.github.io/cesium-navigation/
Gabriel,I merged your pull requests.Thanks,Alberto-----Original Message-----From: Gabriel Cordes [email protected]: alberto-acevedo/cesium-navigation [email protected]: Wed, Apr 13, 2016 6:24 pmSubject: Re: [alberto-acevedo/cesium-navigation] ZoomScale should be setable (#19)
I've just created a pull request. Until then you can check it out at my repository or directly try the demo: http://larcius.github.io/cesium-navigation/
—You are receiving this because you are subscribed to this thread.Reply to this email directly or view it on GitHub
For me it works now with the newest version. But it only set the new viewpoint. It would nice to have a fly to the new viewpoint.
yes, I totally agree with you. I tried to use Camera.flyTo but sometimes it didn't work as expected (even though the destination is correct). So I decided to commit a more stable version where zooming works but without an animation. Do you want to give it a try, @strech345 ? Have a look at / start at https://github.com/alberto-acevedo/cesium-navigation/blob/master/Source/ViewModels/ZoomNavigationControl.js#L120
I've just commented the flyTo part out. Don't forget the orientation because without it the view changes to top-down north-up.
Dear @strech345 , I've just made a pull request where zooming now works with animation (but only in 3D and if no entity is tracked). Furthermore tracked entities are now supported. Because of movements of entities zooming is performed without animation if one is tracked. Just check out my demo page: http://larcius.github.io/cesium-navigation/