diff options
Diffstat (limited to 'platform/darwin/src/MGLAttributionInfo.h')
-rw-r--r-- | platform/darwin/src/MGLAttributionInfo.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/platform/darwin/src/MGLAttributionInfo.h b/platform/darwin/src/MGLAttributionInfo.h index 031a10060f..2e2967a6c6 100644 --- a/platform/darwin/src/MGLAttributionInfo.h +++ b/platform/darwin/src/MGLAttributionInfo.h @@ -8,6 +8,24 @@ NS_ASSUME_NONNULL_BEGIN /** + The attribution info is represented in the longest format available. + */ +typedef NS_ENUM(NSUInteger, MGLAttributionInfoStyle) { + /** + Specifies a short attribution info style. + */ + MGLAttributionInfoStyleShort = 1, + /** + Specifies a medium attribution info style. + */ + MGLAttributionInfoStyleMedium, + /** + Specifies a long attribution info style. + */ + MGLAttributionInfoStyleLong +}; + +/** Information about an attribution statement, usually a copyright or trademark statement, associated with a map content source. */ @@ -59,6 +77,19 @@ MGL_EXPORT */ - (nullable NSURL *)feedbackURLAtCenterCoordinate:(CLLocationCoordinate2D)centerCoordinate zoomLevel:(double)zoomLevel; +/** + Returns a copy of the current `title` formatted accordingly to `style`. + + Example: If `style` = `MGLAttributionInfoStyleShort` and + `MGLAttributionInfo.title` = `OpenStreetMap` then it will format + `MGLAttributionInfo.title` = `OSM` + + @param style The attribution info style. + + @return The `NSAttributedString` styled title. + */ +- (NSAttributedString *)titleWithStyle:(MGLAttributionInfoStyle)style; + @end NS_ASSUME_NONNULL_END |