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

-[MGLMapView selectAnnotation:animated:] does not pan map to fit callout view #3249

Closed
1ec5 opened this issue Dec 10, 2015 · 5 comments
Closed
Assignees
Labels
bug iOS Mapbox Maps SDK for iOS MapKit parity For feature parity with MapKit on iOS or macOS

Comments

@1ec5
Copy link
Contributor

1ec5 commented Dec 10, 2015

When YES is passed into -[MKMapView selectAnnotation:animated:], MKMapView automatically pans so that the entire callout view fits in the viewport. Instead, -[MGLMapView selectAnnotation:animated:]’s animated parameter controls whether the callout view fades in.

A fix for this discrepancy may have to wait until we fix #3154 and #2618.

/cc @incanus @friedbunny

@1ec5
Copy link
Contributor Author

1ec5 commented Sep 6, 2017

Now that #6676 has landed, this is no longer blocked.

@1ec5
Copy link
Contributor Author

1ec5 commented Oct 13, 2017

This could just be a matter of calling -showAnnotation: within -selectAnnotation:animated:. However, we’d have to take care not to reenter -selectAnnotation:animated: and cause infinite recursion.

@1ec5
Copy link
Contributor Author

1ec5 commented Oct 13, 2017

-showAnnotation: puts the annotation in the center of the viewport, which for point annotations would lead to an undesirable wandering effect as the user selects various annotations. But we could craft a simple method that pans the map only enough to show the point annotation and its callout.

@1ec5
Copy link
Contributor Author

1ec5 commented Jan 16, 2018

#2600 (comment) illustrates what the fix for this issue might look like inside MGLMapView.

@julianrex
Copy link
Contributor

Closing since this was addressed in #11442

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug iOS Mapbox Maps SDK for iOS MapKit parity For feature parity with MapKit on iOS or macOS
Projects
None yet
Development

No branches or pull requests

4 participants