From d07e5b5f51b190cc7798c46249e99485172ecc22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Minh=20Nguye=CC=82=CC=83n?= Date: Wed, 20 Apr 2016 00:46:14 -0700 Subject: [PATCH] [ios, osx] Use HTML links in documentation Replaced Markdown syntax with HTML syntax for hyperlinks in documentation comments. HTML links work both inside Xcode (whether Objective-C or Swift) and on the Web (via jazzy). Fixes #3961. Cherry-picked from de0705c7ede7fea5980ed220a1160085630bd89e. --- platform/darwin/include/MGLAccountManager.h | 15 +++++---- platform/darwin/include/MGLOfflineStorage.h | 6 ++-- platform/ios/CHANGELOG.md | 1 + platform/ios/include/MGLMapView.h | 33 +++++++++--------- platform/ios/src/MGLCompactCalloutView.h | 2 +- platform/osx/include/MGLMapView.h | 37 +++++++++++---------- 6 files changed, 49 insertions(+), 45 deletions(-) diff --git a/platform/darwin/include/MGLAccountManager.h b/platform/darwin/include/MGLAccountManager.h index 5cf729ef3..63440046f 100644 --- a/platform/darwin/include/MGLAccountManager.h +++ b/platform/darwin/include/MGLAccountManager.h @@ -13,15 +13,16 @@ NS_ASSUME_NONNULL_BEGIN #pragma mark Authorizing Access /** - Set the [Mapbox access token](https://www.mapbox.com/help/define-access-token/) + Set the + Mapbox access token to be used by all instances of MGLMapView in the current application. Mapbox-hosted vector tiles and styles require an API access token, which you can obtain from the - [Mapbox account page](https://www.mapbox.com/studio/account/tokens/). Access - tokens associate requests to Mapbox’s vector tile and style APIs with your - Mapbox account. They also deter other developers from using your styles without - your permission. + Mapbox account page. + Access tokens associate requests to Mapbox’s vector tile and style APIs with + your Mapbox account. They also deter other developers from using your styles + without your permission. @param accessToken A Mapbox access token. Calling this method with a value of `nil` has no effect. @@ -37,8 +38,8 @@ NS_ASSUME_NONNULL_BEGIN /** Returns the - [Mapbox access token](https://www.mapbox.com/help/define-access-token/) in use - by instances of MGLMapView in the current application. + Mapbox access token + in use by instances of MGLMapView in the current application. */ + (nullable NSString *)accessToken; diff --git a/platform/darwin/include/MGLOfflineStorage.h b/platform/darwin/include/MGLOfflineStorage.h index 5544663d3..20cc521f2 100644 --- a/platform/darwin/include/MGLOfflineStorage.h +++ b/platform/darwin/include/MGLOfflineStorage.h @@ -211,9 +211,9 @@ typedef void (^MGLOfflinePackRemovalCompletionHandler)(NSError * _Nullable error attempt to download additional tiles until already downloaded tiles are removed by calling the `-removePack:withCompletionHandler:` method. - @note The [Mapbox Terms of Service](https://www.mapbox.com/tos/) prohibits - changing or bypassing this limit without permission from Mapbox. Contact - your Mapbox sales representative to have the limit raised. + @note The Mapbox Terms of Service + prohibits changing or bypassing this limit without permission from Mapbox. + Contact your Mapbox sales representative to have the limit raised. */ - (void)setMaximumAllowedMapboxTiles:(uint64_t)maximumCount; diff --git a/platform/ios/CHANGELOG.md b/platform/ios/CHANGELOG.md index 7ef2fc616..b560535be 100644 --- a/platform/ios/CHANGELOG.md +++ b/platform/ios/CHANGELOG.md @@ -6,6 +6,7 @@ Mapbox welcomes participation and contributions from everyone. If you’d like - Fixed a hang that could occur if the host application attempts to set user defaults on a background queue. ([#4745](https://github.com/mapbox/mapbox-gl-native/pull/4745)) - User location heading updates now resume properly when an app becomes active again. ([#4674](https://github.com/mapbox/mapbox-gl-native/pull/4674)) +- Fixed an issue causing hyperlinks in the documentation to be displayed as raw Markdown syntax when viewed in Xcode’s Quick Help popover or sidebar. ([#4760](https://github.com/mapbox/mapbox-gl-native/pull/4760)) ## 3.2.0 diff --git a/platform/ios/include/MGLMapView.h b/platform/ios/include/MGLMapView.h index 1a17507ae..bfc1d3c67 100644 --- a/platform/ios/include/MGLMapView.h +++ b/platform/ios/include/MGLMapView.h @@ -52,23 +52,24 @@ typedef NS_OPTIONS(NSUInteger, MGLMapDebugMaskOptions) { viewpoints, and present information in the form of annotations and overlays. The map view loads scalable vector tiles that conform to the - [Mapbox Vector Tile Specification](https://github.com/mapbox/vector-tile-spec). + Mapbox Vector Tile Specification. It styles them with a style that conforms to the - [Mapbox GL style specification](https://www.mapbox.com/mapbox-gl-style-spec/). - Such styles can be designed in [Mapbox Studio](https://www.mapbox.com/studio/) - and hosted on mapbox.com. + Mapbox GL style specification. + Such styles can be designed in + Mapbox Studio and hosted on + mapbox.com. A collection of Mapbox-hosted styles is available through the `MGLStyle` class. These basic styles use - [Mapbox Streets](https://www.mapbox.com/developers/vector-tiles/mapbox-streets) - or [Mapbox Satellite](https://www.mapbox.com/satellite/) data sources, but - you can specify a custom style that makes use of your own data. + Mapbox Streets + or Mapbox Satellite data + sources, but you can specify a custom style that makes use of your own data. Mapbox-hosted vector tiles and styles require an API access token, which you can obtain from the - [Mapbox account page](https://www.mapbox.com/studio/account/tokens/). Access - tokens associate requests to Mapbox's vector tile and style APIs with your - Mapbox account. They also deter other developers from using your styles + Mapbox account page. + Access tokens associate requests to Mapbox's vector tile and style APIs with + your Mapbox account. They also deter other developers from using your styles without your permission. @note You are responsible for getting permission to use the map data and for @@ -146,7 +147,7 @@ IB_DESIGNABLE @note The Mapbox terms of service, which governs the use of Mapbox-hosted vector tiles and styles, - [requires](https://www.mapbox.com/help/mapbox-logo/) most Mapbox + requires most Mapbox customers to display the Mapbox logo. If this applies to you, do not hide this view or change its contents. */ @@ -158,18 +159,18 @@ IB_DESIGNABLE @note The Mapbox terms of service, which governs the use of Mapbox-hosted vector tiles and styles, - [requires](https://www.mapbox.com/help/attribution/) these copyright - notices to accompany any map that features Mapbox-designed styles, + requires these + copyright notices to accompany any map that features Mapbox-designed styles, OpenStreetMap data, or other Mapbox data such as satellite or terrain data. If that applies to this map view, do not hide this view or remove any notices from it. @note You are additionally - [required](https://www.mapbox.com/help/telemetry-opt-out-for-users/) to - provide users with the option to disable anonymous usage and location + required + to provide users with the option to disable anonymous usage and location sharing (telemetry). If this view is hidden, you must implement this setting elsewhere in your app or via `Settings.bundle`. See our - [website](https://www.mapbox.com/ios-sdk/#telemetry_opt_out) for + website for implementation help. */ @property (nonatomic, readonly) UIButton *attributionButton; diff --git a/platform/ios/src/MGLCompactCalloutView.h b/platform/ios/src/MGLCompactCalloutView.h index 5f8edd921..ebe27c842 100644 --- a/platform/ios/src/MGLCompactCalloutView.h +++ b/platform/ios/src/MGLCompactCalloutView.h @@ -2,7 +2,7 @@ #import "MGLCalloutView.h" /** - A concrete implementation of `MGLCalloutView` based on [SMCalloutView](https://github.com/nfarina/calloutview). This callout view displays the represented annotation’s title, subtitle, and accessory views in a compact, two-line layout. + A concrete implementation of `MGLCalloutView` based on SMCalloutView. This callout view displays the represented annotation’s title, subtitle, and accessory views in a compact, two-line layout. */ @interface MGLCompactCalloutView : SMCalloutView diff --git a/platform/osx/include/MGLMapView.h b/platform/osx/include/MGLMapView.h index ca55ba7cd..f6ba86fb0 100644 --- a/platform/osx/include/MGLMapView.h +++ b/platform/osx/include/MGLMapView.h @@ -37,23 +37,24 @@ typedef NS_OPTIONS(NSUInteger, MGLMapDebugMaskOptions) { viewpoints, and present information in the form of annotations and overlays. The map view loads scalable vector tiles that conform to the - [Mapbox Vector Tile Specification](https://github.com/mapbox/vector-tile-spec). + Mapbox Vector Tile Specification. It styles them with a style that conforms to the - [Mapbox GL style specification](https://www.mapbox.com/mapbox-gl-style-spec/). - Such styles can be designed in [Mapbox Studio](https://www.mapbox.com/studio/) - and hosted on mapbox.com. + Mapbox GL style specification. + Such styles can be designed in + Mapbox Studio and hosted on + mapbox.com. A collection of Mapbox-hosted styles is available through the MGLStyle class. These basic styles use - [Mapbox Streets](https://www.mapbox.com/developers/vector-tiles/mapbox-streets) - or [Mapbox Satellite](https://www.mapbox.com/satellite/) data sources, but - you can specify a custom style that makes use of your own data. + Mapbox Streets + or Mapbox Satellite data + sources, but you can specify a custom style that makes use of your own data. Mapbox-hosted vector tiles and styles require an API access token, which you can obtain from the - [Mapbox account page](https://www.mapbox.com/studio/account/tokens/). Access - tokens associate requests to Mapbox’s vector tile and style APIs with your - Mapbox account. They also deter other developers from using your styles + Mapbox account page. + Access tokens associate requests to Mapbox’s vector tile and style APIs with + your Mapbox account. They also deter other developers from using your styles without your permission. @note You are responsible for getting permission to use the map data and for @@ -128,9 +129,9 @@ IB_DESIGNABLE @note The Mapbox terms of service, which governs the use of Mapbox-hosted vector tiles and styles, - [requires](https://www.mapbox.com/help/mapbox-logo/) most Mapbox - customers to display the Mapbox logo. If this applies to you, do not - hide this view or change its contents. */ + requires most + Mapbox customers to display the Mapbox logo. If this applies to you, do + not hide this view or change its contents. */ @property (nonatomic, readonly) NSImageView *logoView; /** A view showing legally required copyright notices, positioned along the @@ -138,11 +139,11 @@ IB_DESIGNABLE @note The Mapbox terms of service, which governs the use of Mapbox-hosted vector tiles and styles, - [requires](https://www.mapbox.com/help/attribution/) these copyright - notices to accompany any map that features Mapbox-designed styles, - OpenStreetMap data, or other Mapbox data such as satellite or terrain - data. If that applies to this map view, do not hide this view or remove - any notices from it. */ + requires these + copyright notices to accompany any map that features Mapbox-designed + styles, OpenStreetMap data, or other Mapbox data such as satellite or + terrain data. If that applies to this map view, do not hide this view or + remove any notices from it. */ @property (nonatomic, readonly) NSView *attributionView; #pragma mark Manipulating the viewpoint