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.

Programmatic animations fail to recalculate zoom-dependent properties #2946

Closed

Description

@johnnewman

Animating a region change sometimes doesn't redraw the map's streets/text for the correct level. When zoomed into Chicago and animating to the state of New York, the map initially renders like below:

newyork1

After slightly pinch zooming, the map will redraw itself at the correct level:

newyork2

This happens when calling setCenterCoordinate:zoomLevel:animated: with YES for animated. We've seen it on v2.1.2 and v3.0.0-pre4.

Activity

  1. added
    iOS
    on Nov 5, 2015
  2. 1ec5 commented on Nov 5, 2015

    @1ec5
    Contributor

    This would be caused by MGLMapView issuing an update() of type Update::Render instead of Update::Zoom.

    /cc @incanus @jfirebaugh

  3. 1ec5 commented on Nov 5, 2015

    @1ec5
    Contributor

    Reproduces with the following code:

    [self.mapView setCenterCoordinate:CLLocationCoordinate2DMake(41.87542, -87.62497) zoomLevel:18 animated:NO];

    then:

    [self.mapView setCenterCoordinate:CLLocationCoordinate2DMake(42.908, -75.388) zoomLevel:6 animated:YES];
  4. 1ec5 commented on Nov 5, 2015

    @1ec5
    Contributor

    -setCenterCoordinate:zoomLevel:animated: uses easeTo(), which does use Update::Zoom at every step along the way, just like the pinch gesture recognizer. So I’m not sure what’s missing.

  5. added this to the ios-v3.0.0 milestone on Nov 5, 2015
  6. changed the title [-]iOS GL - Animating region change can cause map to draw incorrect details[/-] [+]Programmatic animations fail to recalculate zoom-dependent properties[/+] on Nov 5, 2015
  7. self-assigned this
    on Nov 5, 2015
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

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions