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.

Drifting should send -mapView:regionDidChangeAnimated: with animated = YES #2379

Closed

Description

@1ec5

When drift-panning (or drift-pinching etc.), MGLMapViewDelegate should receive the following messages, for consistency with MapKit (which by the way lacks an “is changing” delegate method):

-mapView:regionWillChangeAnimated:, animated = NO
-mapViewRegionIsChanging:
-mapViewRegionIsChanging:
-mapViewRegionIsChanging:
…
-mapView:regionDidChangeAnimated:, animated = YES

Instead, the final -mapView:regionDidChangeAnimated:, has animated = NO.

/cc @jfirebaugh @incanus

Activity

  1. added
    iOS
    on Sep 22, 2015
  2. 1ec5 commented on Oct 20, 2015

    @1ec5
    ContributorAuthor

    -[MGLMapView notifyMapChange:] currently prefills regionChangeDelegateQueue with a didChangeAnimated operation at the time the regionWillChangeAnimated operation is queued, ensuring that the two calls have the same value for animated. But that’s incorrect. Whenever a gesture recognizer initiates a drift animation, it should cancel the prefilled didChangeAnimated operation and create a new one with YES for animated.

  3. incanus commented on Oct 20, 2015

    @incanus
    Contributor

    Is that how MapKit works? In past I've thought of "animated" as meaning "programmatically-induced"; that may be incorrect though.

  4. 1ec5 commented on Oct 20, 2015

    @1ec5
    ContributorAuthor

    I stand corrected: MapKit reports a non-animated change at the end of a drift. It does report an animated change for a double-tap, and so do we. So we’re good here.

  5. added a commit that references this issue on Nov 20, 2015
    f878dd9
  6. self-assigned this
    on Nov 20, 2015
  7. added a commit that references this issue on Nov 25, 2015
    6916675
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugiOS

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions