Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

flyTo launches into geosynchronous orbit #3296

Description

@1ec5

If I start out at zoom level A and invoke mbgl::Map::flyTo() with a zoom level B, such that B > A, the viewpoint ends up at zoom level A. Moreover, the trajectory isn’t capped at the minimum zoom level. So when flying from San Francisco at about z7 to Washington, D.C., at z18, the zoom level quickly goes into NaN territory:

8.864151
8.864048
8.864014
8.863978
8.863908
<snip>
7.761990
7.715285
7.634145
7.585074
7.440956
7.289616
7.224786
7.116410
7.056992
6.781923
6.344395
6.152671
5.933951
5.434996
1.683239
nan
nan
<snip>
nan
nan
1.752706
4.793166
6.483146
6.859785
7.262993
7.402360
7.712066
7.781944
7.873764
7.889215
7.942035
7.958733
8.016303
8.134719
8.194865
8.200802
8.254453
<snip>
8.867422
8.867423
8.867423
8.867423
8.867423
8.867423
8.867423

/cc @adam-mapbox

Activity

  1. added this to the ios-v3.1.0 milestone on Dec 15, 2015
  2. self-assigned this
    on Dec 15, 2015
  3. lucaswoj commented on Dec 15, 2015

    @lucaswoj
    Contributor

    na

  4. added a commit that references this issue on Dec 15, 2015
    e1854f0
  5. 1ec5 commented on Dec 16, 2015

    @1ec5
    ContributorAuthor

    As @adam-mapbox pointed out, we aren’t calculating quite the right zoom levels. After removing the zoom level clamp I added in #3301, I was able to fly from California to D.C., causing the zoom level to vary from 6.475008 to -8.283377 to 23.004506.

  6. reopened this on Dec 16, 2015
  7. 1ec5 commented on Dec 18, 2015

    @1ec5
    ContributorAuthor

    For my own reference, flyTo() was originally introduced in mapbox/mapbox-gl-js@da42a4a as an implementation of van Wijk ‎2003 “optimal path” animations.

  8. added a commit that references this issue on Dec 20, 2015
    af9de6c
  9. added a commit that references this issue on Dec 20, 2015
    a68589b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions