diff options
Diffstat (limited to 'platform/darwin/src/MGLAttributionInfo.h')
-rw-r--r-- | platform/darwin/src/MGLAttributionInfo.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/platform/darwin/src/MGLAttributionInfo.h b/platform/darwin/src/MGLAttributionInfo.h index 031a10060f..1de37c3b24 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,18 @@ MGL_EXPORT */ - (nullable NSURL *)feedbackURLAtCenterCoordinate:(CLLocationCoordinate2D)centerCoordinate zoomLevel:(double)zoomLevel; +/** + Returns a copy of the current `title` formatted accordingly to `style`. + + Example: If the `style` property is set to `MGLAttributionInfoStyleShort` and the + `title` property is set to `OpenStreetMap`, then this method returns `OSM`. + + @param style The attribution info style. + + @return The `NSAttributedString` styled title. + */ +- (NSAttributedString *)titleWithStyle:(MGLAttributionInfoStyle)style; + @end NS_ASSUME_NONNULL_END |