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

[ios] vary annotation bounds fit padding based on view size #3407

Merged
merged 1 commit into from
Dec 24, 2015

Conversation

friedbunny
Copy link
Contributor

-[MGLMapView showAnnotations:animated:] hardcoded the edge inset to 100 points on all sides, which meant that views with height or width <=200 points would max-zoom into the center point of the bounds, not show the entire bounds.

This fix varies the edge padding based on the map view's frame size — if it's less than the default padding, use a fraction of the map view's frame's height/width as inset padding.

Fix #3392, #3110.

/cc @1ec5

@friedbunny friedbunny added bug iOS Mapbox Maps SDK for iOS labels Dec 24, 2015
@friedbunny friedbunny added this to the ios-v3.1.0 milestone Dec 24, 2015
@friedbunny
Copy link
Contributor Author

So tiny!

simulator screen shot dec 23 2015 7 57 18 pm

@1ec5
Copy link
Contributor

1ec5 commented Dec 24, 2015

👍

@friedbunny friedbunny merged commit 2aa1e5c into master Dec 24, 2015
@friedbunny friedbunny deleted the 3392-vary-annotation-bounds-fit-padding branch December 24, 2015 15:24
@friedbunny friedbunny self-assigned this Jan 9, 2016
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"showAnnotations:animated:" bug in small map
3 participants