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.

reduce flyTo time for large distances #5794

Closed

Description

@incanus

Compare starting the map in someplace far away, then locating the user, in both this toolkit and in MapKit (stuttering issues aside, which are due to simulator on desktop):

anigif-1469494534

anigif-1469494519

Ayup.

We should figure out a certain threshold and just snap to the location if greater than it.

/cc @1ec5

Activity

  1. added
    GL JS parity
    performance
    on Jul 26, 2016
  2. removed
    GL JS parity
    on Jul 26, 2016
  3. 1ec5 commented on Jul 26, 2016

    @1ec5
    Contributor

    This was by design in #3589. Snapping to the new location optimizes for informing the user of their current location sooner but at the cost of giving the user less context across long distances. We made the same tradeoff in deciding to animate the user dot in the first place: the dot always lags your actual location by up to a second, but that's preferable to jumping around.

    Also note that MapKit is far from consistent: if you launch a MapKit-powered application on a device, turn on user location tracking, wait until MKMapView zooms into your real location, and simulate a very different location via Xcode, MapKit eases the entire distance without varying the zoom level. The result is what seems like an interminable animation (over a minute to travel from Cupertino to Cincinnati).

  4. 1ec5 commented on Jul 26, 2016

    @1ec5
    Contributor

    All that said, we can cap the flight duration or increase the maximum air velocity. There's plenty of room to experiment with different thresholds.

  5. incanus commented on Jul 26, 2016

    @incanus
    ContributorAuthor

    Also note that MapKit is far from consistent: if you launch a MapKit-powered application on a device, turn on user location tracking, wait until MKMapView zooms into your real location, and simulate a very different location via Xcode, MapKit eases the entire distance without varying the zoom level. The result is what seems like an interminable animation (over a minute to travel from Cupertino to Cincinnati).

    Yeah, but you are simulating there, so it's operating under the assumption that the user really did move that distance and uses its built-in smoothly-animating viewport change.

  6. 1ec5 commented on Jul 26, 2016

    @1ec5
    Contributor

    That's the more realistic scenario, right? I wouldn't really be inclined to optimize for the iOS simulator if it differs from the device.

  7. incanus commented on Jul 27, 2016

    @incanus
    ContributorAuthor

    I don't think that it does differ—I see this frequently on device as well. Here's an example (admittedly on iOS 10 beta though):

    anigif-1469662205

  8. incanus commented on Jul 27, 2016

    @incanus
    ContributorAuthor

    And then our library:

    anigif-1469662585

  9. added
    iOS
    on Apr 14, 2017
  10. added
    archived
    on Nov 8, 2018
  11. stale commented on Nov 27, 2018

    @stale

    This issue has been automatically detected as stale because it has not had recent activity and will be archived. Thank you for your contributions.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    archivediOSperformance

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions