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 has been 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.
As followup from #10456, MGLMapSnapshotter’s attribution logic is inflexible and needs to be refactored:
MGLAttributionInfoStyle
enumeration along the lines ofNSFormattingUnitStyle
orNSDateFormatterStyle
. “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 twoMGLAttributionInfoStyle
s and returns the size of the attribution.-[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./cc @fabian-guerra @lilykaiser
The text was updated successfully, but these errors were encountered: