You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
As followup from #10456, MGLMapSnapshotter’s attribution logic is inflexible and needs to be refactored:
MGLSnapshotAttributionOptions goes away.
An MGLAttributionInfoStyle enumeration along the lines of NSFormattingUnitStyle or NSDateFormatterStyle. “Short” for a logo means just the helmet; “short” for an attribution item could mean abbreviation.
-[MGLMapSnapshotter logoImageWithStyle:] returns either the full image or the helmet image.
-[MGLAttributionInfo sizeWithStyle:] determines the size of an individual attribution image, depending on whether it’s abbreviated or written out in full.
-[MGLMapSnapshotter attributionSizeWithLogoStyle:sourceAttributionStyle:] takes two MGLAttributionInfoStyles and returns the size of the attribution.
The snapshot completion handler tries calling -[MGLMapSnapshotter attributionSizeWithLogoStyle:sourceAttributionStyle:] with each permutation of attribution info styles. Once one of the permutations fits the snapshot’s width, it uses -[MGLMapSnapshotter logoImageWithStyle:] and MGLAttributionInfo to put together the attribution.
Activity
fabian-guerra commentedon Dec 4, 2017
Fixed in #10525