MGLAttributionInfo
@interface MGLAttributionInfo : NSObject
Information about an attribution statement, usually a copyright or trademark statement, associated with a map content source.
-
Returns an initialized attribution info object with the given title and URL.
Declaration
Objective-C
- (nonnull instancetype)initWithTitle:(nonnull NSAttributedString *)title URL:(nullable NSURL *)URL;Parameters
titleThe attribution statement’s title.
URLA URL to more information about the entity named in the attribution.
Return Value
An initialized attribution info object.
-
The attribution statement’s attributed title text.
Declaration
Objective-C
@property (nonatomic, assign, unsafe_unretained, readwrite) NSAttributedString *_Nonnull title;Swift
var title: NSAttributedString { get set } -
The URL to more information about the entity named in the attribution.
If this property is set, the attribution statement should be displayed as a hyperlink or action button. Otherwise, if it is
nil, the attribution statement should be displayed as plain text.Declaration
Objective-C
@property (nonatomic, assign, unsafe_unretained, readwrite, nullable) NSURL *URL;Swift
var url: URL? { get set } -
A Boolean value indicating whether the attribution statement is a shortcut to a feedback tool.
If this property is set, the statement should be treated as a way for the user to provide feedback rather than an attribution statement.
Declaration
Objective-C
@property (nonatomic, assign, unsafe_unretained, readwrite, getter=isFeedbackLink) BOOL feedbackLink;Swift
var isFeedbackLink: Bool { get set } -
Returns a copy of the
URLproperty modified to account for the given center coordinate and zoom level.Declaration
Objective-C
- (nullable NSURL *)feedbackURLAtCenterCoordinate: (CLLocationCoordinate2D)centerCoordinate zoomLevel:(double)zoomLevel;Swift
func feedbackURL(atCenter centerCoordinate: CLLocationCoordinate2D, zoomLevel: Double) -> URL?Parameters
centerCoordinateThe map’s center coordinate.
zoomLevelThe map’s zoom level. See the
MGLMapView.zoomLevelproperty for more information.Return Value
A modified URL containing a fragment that points to the specified viewport. If the
feedbackLinkproperty is set toNO, this method returnsnil. -
Returns a copy of the current
titleformatted accordingly tostyle.Example: If the
styleproperty is set toMGLAttributionInfoStyleShortand thetitleproperty is set toOpenStreetMap, then this method returnsOSM.Declaration
Objective-C
- (nonnull NSAttributedString *)titleWithStyle:(MGLAttributionInfoStyle)style;Swift
func title(with style: MGLAttributionInfoStyle) -> NSAttributedStringParameters
styleThe attribution info style.
Return Value
The
NSAttributedStringstyled title.
Install in Dash
MGLAttributionInfo Class Reference