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.

coordinate conversion incorrect during animated zooms #1160

Closed

Description

@incanus

Discovered in #1125, when the map is zooming animated (like say after a double-tap zoom in), the geo-to-viewport conversions are vastly out of range, leading to a disappearing user dot until the animation is complete.

You can confirm this with the following patch against 3ed1e7a:

diff --git a/platform/ios/MGLMapView.mm b/platform/ios/MGLMapView.mm
index 49cfdd3..824e826 100644
--- a/platform/ios/MGLMapView.mm
+++ b/platform/ios/MGLMapView.mm
@@ -2117,6 +2117,8 @@ CLLocationCoordinate2D latLngToCoordinate(mbgl::LatLng latLng)
     }
     else
     {
+        NSLog(@"hiding user dot since out of viewport: %@", [NSValue valueWithCGPoint:userPoint]);
+
         self.userLocationAnnotationView.layer.hidden = YES;
     }
 }

First, showing normal out-of-viewport hiding, then showing during animation:

anigif-1427741775

This appears to be down in the projection.hpp C++ level.

Activity

  1. added
    iOS
    on Mar 30, 2015
  2. added this to the iOS Beta 1 milestone on Apr 2, 2015
  3. self-assigned this
    on Apr 2, 2015
  4. incanus commented on Apr 2, 2015

    @incanus
    ContributorAuthor

    @jfirebaugh This could use some 👀 if you've any bandwidth.

  5. jfirebaugh commented on Apr 3, 2015

    @jfirebaugh
    Contributor

    Is it possible this was caused by the same issue as #1181?

  6. incanus commented on Apr 3, 2015

    @incanus
    ContributorAuthor

    I tested this morning after merge just to be sure, and no.

  7. modified the milestones: iOS Beta 1, iOS Beta 2 on Apr 6, 2015
  8. jfirebaugh commented on Apr 29, 2015

    @jfirebaugh
    Contributor

    @ansis, could you take a look at this?

  9. assigned and unassigned on Apr 29, 2015
  10. added a commit that references this issue on Apr 30, 2015
    ed9ef0f
  11. incanus commented on May 1, 2015

    @incanus
    ContributorAuthor

    AGHGHGGH SO GOOD

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