Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

viewer.flyTo on billboards breaks zoom limits #5573

Closed
cguldner opened this issue Jun 30, 2017 · 5 comments · Fixed by #5668
Closed

viewer.flyTo on billboards breaks zoom limits #5573

cguldner opened this issue Jun 30, 2017 · 5 comments · Fixed by #5668

Comments

@cguldner
Copy link
Contributor

cguldner commented Jun 30, 2017

I feel like this may have been mentioned before, but the flyTo method doesn't respect the zoom limits. For my case particularly it is zooming in way closer than the desired max zoom for billboards, but I'm guessing it isn't limited to that.

In addition, if you fly to a billboard, it seems to break the max zoom, because after that, you can zoom to any zoom level in both 2D and 3D, and it won't restrict you. It doesn't break the min zoom, so you can't zoom out infinitely, but you can seemingly zoom in infinitely

@cguldner cguldner changed the title viewer.flyTo doesn't respect zoom limits for billboards viewer.flyTo on billboards breaks zoom limits Jun 30, 2017
@pjcozzi
Copy link
Contributor

pjcozzi commented Jul 5, 2017

Thanks for the report, @burn123. Do you have a minimal code example to reproduce this?

@cguldner
Copy link
Contributor Author

cguldner commented Jul 6, 2017

@pjcozzi
Here is a basic example. Look at the drill-down picking section.
In our app, it was on a marker/billboard, so it allowed us to then be able to zoom to any zoom level. In the example, it seems that it then changes how zoomed in you can be to wherever it flew

@pjcozzi
Copy link
Contributor

pjcozzi commented Jul 6, 2017

Thanks for the prompt response!

@cguldner
Copy link
Contributor Author

cguldner commented Jul 22, 2017

@pjcozzi I realized that the code example I gave didn't actually contain the code that shows it is broken.
This is an updated example.

@cguldner
Copy link
Contributor Author

I traced the issue some, and I realized that part of the problem, specifically why the minimum zoom is broken, is this line of Viewer.js:

controller.minimumZoomDistance = Math.min(controller.minimumZoomDistance, boundingSphere.radius * 0.5);

I'm not sure why the minimum zoom would be updated programmatically, because this should be something left up to the user in my opinion. Also, maximumZoomDistance is never updated in this way, which makes me think that this was some code that was useful at one point, but no longer is, and wasn't removed properly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants