Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a bunch of internal links in iOS documentation #2738

Merged
merged 4 commits into from
Aug 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions platform/darwin/scripts/generate-style-code.js
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ global.propertyDoc = function (propertyName, property, layerType, kind) {
let layoutProperties = spec[`layout_${layerType}`] || [];
let paintProperties = spec[`paint_${layerType}`] || [];
if (symbol in layoutProperties || symbol in paintProperties) {
return '`MLN' + camelize(layerType) + 'StyleLayer.' + camelizeWithLeadingLowercase(symbol) + '`';
return '``MLN' + camelize(layerType) + 'StyleLayer/' + camelizeWithLeadingLowercase(symbol) + '``';
}
}
if ('values' in property && Object.keys(property.values).indexOf(symbol) !== -1) {
Expand Down Expand Up @@ -508,11 +508,11 @@ global.describeType = function (property) {
case 'translate':
return '`CGVector`';
case 'position':
return '`MLNSphericalPosition`';
return '``MLNSphericalPosition``';
case 'anchor':
return '`MLNTextAnchor` array';
return '``MLNTextAnchor`` array';
case 'mode':
return '`MLNTextWritingMode` array';
return '``MLNTextWritingMode`` array';
default:
return 'array';
}
Expand Down Expand Up @@ -593,7 +593,7 @@ global.describeValue = function (value, property, layerType) {
case 'translate':
return 'an `NSValue` object containing a `CGVector` struct set to' + ` ${formatNumber(value[0])}${units} rightward and ${formatNumber(value[1])}${units} downward`;
case 'position':
return 'an `MLNSphericalPosition` struct set to' + ` ${formatNumber(value[0])} radial, ${formatNumber(value[1])} azimuthal and ${formatNumber(value[2])} polar`;
return 'an ``MLNSphericalPosition`` struct set to' + ` ${formatNumber(value[0])} radial, ${formatNumber(value[1])} azimuthal and ${formatNumber(value[2])} polar`;
default:
return 'the array `' + value.join('`, `') + '`';
}
Expand Down
34 changes: 17 additions & 17 deletions platform/darwin/scripts/style-spec-overrides-v8.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions platform/darwin/src/MLNAnnotation.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
NS_ASSUME_NONNULL_BEGIN

/**
The `MLNAnnotation` protocol is used to provide annotation-related information
The ``MLNAnnotation`` protocol is used to provide annotation-related information
to a map view. To use this protocol, you adopt it in any custom objects that
store or represent annotation data. Each object then serves as the source of
information about a single map annotation and provides critical information,
Expand All @@ -20,7 +20,7 @@ NS_ASSUME_NONNULL_BEGIN
#### Related examples
TODO: Annotation models
TODO: Annotation views, learn how to add objects that follow the
`MLNAnnotation` protocol
``MLNAnnotation`` protocol
*/
@protocol MLNAnnotation <NSObject>

Expand Down
26 changes: 13 additions & 13 deletions platform/darwin/src/MLNAttributedExpression.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@

NS_ASSUME_NONNULL_BEGIN

/** Options for `MLNAttributedExpression.attributes`. */
/** Options for ``MLNAttributedExpression/attributes``. */
typedef NSString *MLNAttributedExpressionKey NS_TYPED_ENUM;

/** The font name string array expression used to format the text. */
FOUNDATION_EXTERN MLN_EXPORT MLNAttributedExpressionKey const MLNFontNamesAttribute;

/** The font scale number expression relative to `MLNSymbolStyleLayer.textFontSize` used to format
/** The font scale number expression relative to ``MLNSymbolStyleLayer/textFontSize`` used to format
* the text. */
FOUNDATION_EXTERN MLN_EXPORT MLNAttributedExpressionKey const MLNFontScaleAttribute;

/** The font color expression used to format the text. */
FOUNDATION_EXTERN MLN_EXPORT MLNAttributedExpressionKey const MLNFontColorAttribute;

/**
An `MLNAttributedExpression` object associates text formatting attibutes (such as font size or
An ``MLNAttributedExpression`` object associates text formatting attibutes (such as font size or
font names) to an `NSExpression`.

### Example
Expand Down Expand Up @@ -44,9 +44,9 @@ MLN_EXPORT
The formatting attributes dictionary.
Key | Value Type
--- | ---
`MLNFontNamesAttribute` | An `NSExpression` evaluating to an `NSString` array.
`MLNFontScaleAttribute` | An `NSExpression` evaluating to an `NSNumber` value.
`MLNFontColorAttribute` | An `NSExpression` evaluating to an `UIColor`.
``MLNFontNamesAttribute`` | An `NSExpression` evaluating to an `NSString` array.
``MLNFontScaleAttribute`` | An `NSExpression` evaluating to an `NSNumber` value.
``MLNFontColorAttribute`` | An `NSExpression` evaluating to an `UIColor`.

*/
@property (strong, nonatomic, readonly)
Expand All @@ -56,38 +56,38 @@ MLN_EXPORT
The formatting attributes dictionary.
Key | Value Type
--- | ---
`MLNFontNamesAttribute` | An `NSExpression` evaluating to an `NSString` array.
`MLNFontScaleAttribute` | An `NSExpression` evaluating to an `NSNumber` value.
`MLNFontColorAttribute` | An `NSExpression` evaluating to an `NSColor` on macos.
``MLNFontNamesAttribute`` | An `NSExpression` evaluating to an `NSString` array.
``MLNFontScaleAttribute`` | An `NSExpression` evaluating to an `NSNumber` value.
``MLNFontColorAttribute`` | An `NSExpression` evaluating to an `NSColor` on macos.
*/
@property (strong, nonatomic, readonly)
NSDictionary<MLNAttributedExpressionKey, NSExpression *> *attributes;
#endif

/**
Returns an `MLNAttributedExpression` object initialized with an expression and no attribute
Returns an ``MLNAttributedExpression`` object initialized with an expression and no attribute
information.
*/
- (instancetype)initWithExpression:(NSExpression *)expression;

/**
Returns an `MLNAttributedExpression` object initialized with an expression and text format
Returns an ``MLNAttributedExpression`` object initialized with an expression and text format
attributes.
*/
- (instancetype)
initWithExpression:(NSExpression *)expression
attributes:(nonnull NSDictionary<MLNAttributedExpressionKey, NSExpression *> *)attrs;

/**
Creates an `MLNAttributedExpression` object initialized with an expression and the format
Creates an ``MLNAttributedExpression`` object initialized with an expression and the format
attributes for font names and font size.
*/
+ (instancetype)attributedExpression:(NSExpression *)expression
fontNames:(nullable NSArray<NSString *> *)fontNames
fontScale:(nullable NSNumber *)fontScale;

/**
Creates an `MLNAttributedExpression` object initialized with an expression and the format
Creates an ``MLNAttributedExpression`` object initialized with an expression and the format
attributes dictionary.
*/
+ (instancetype)
Expand Down
4 changes: 2 additions & 2 deletions platform/darwin/src/MLNAttributionInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ MLN_EXPORT
/**
Returns a copy of the current `title` formatted accordingly to `style`.

Example: If the `style` property is set to `MLNAttributionInfoStyleShort` and the
`title` property is set to `OpenStreetMap`, then this method returns `OSM`.
Example: If the `style` property is set to ``MLNAttributionInfoStyle/MLNAttributionInfoStyleShort``
and the `title` property is set to `OpenStreetMap`, then this method returns `OSM`.

@param style The attribution info style.

Expand Down
6 changes: 3 additions & 3 deletions platform/darwin/src/MLNClockDirectionFormatter.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
NS_ASSUME_NONNULL_BEGIN

/**
The `MLNClockDirectionFormatter` class provides properly formatted descriptions
The ``MLNClockDirectionFormatter`` class provides properly formatted descriptions
of headings relative to the user, known as <i>clock positions</i>. For
example, a value of `90` may be formatted as “3 o’clock”, depending on the
locale.

Use this class to create localized heading strings when displaying directions
relative to the user’s current location and heading. To format a direction
irrespective of the user’s orientation, use `MLNCompassDirectionFormatter`
irrespective of the user’s orientation, use ``MLNCompassDirectionFormatter``
instead.
*/
MLN_EXPORT
Expand All @@ -37,7 +37,7 @@ MLN_EXPORT
- (NSString *)stringFromDirection:(CLLocationDirection)direction;

/**
This method is not supported for the `MLNDirectionFormatter` class.
This method is not supported for the ``MLNClockDirectionFormatter`` class.
*/
- (BOOL)getObjectValue:(out id __nullable *__nullable)obj
forString:(NSString *)string
Expand Down
12 changes: 6 additions & 6 deletions platform/darwin/src/MLNCluster.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ FOUNDATION_EXTERN MLN_EXPORT const NSUInteger MLNClusterIdentifierInvalid;

/**
A protocol that feature subclasses (i.e. those already conforming to
the `MLNFeature` protocol) conform to if they represent clusters.
the ``MLNFeature`` protocol) conform to if they represent clusters.

Currently the only class that conforms to `MLNCluster` is
`MLNPointFeatureCluster` (a subclass of `MLNPointFeature`).
Currently the only class that conforms to ``MLNCluster`` is
``MLNPointFeatureCluster`` (a subclass of ``MLNPointFeatureCluster``).

To check if a feature is a cluster, check conformity to `MLNCluster`, for
To check if a feature is a cluster, check conformity to ``MLNCluster``, for
example:

```swift
Expand All @@ -32,8 +32,8 @@ FOUNDATION_EXTERN MLN_EXPORT const NSUInteger MLNClusterIdentifierInvalid;
throw ExampleError.featureIsNotACluster
}

// Currently the only supported class that conforms to `MLNCluster` is
// `MLNPointFeatureCluster`
// Currently the only supported class that conforms to ``MLNCluster`` is
// ``MLNPointFeatureCluster``
guard cluster is MLNPointFeatureCluster else {
throw ExampleError.unexpectedFeatureType
}
Expand Down
6 changes: 3 additions & 3 deletions platform/darwin/src/MLNCompassDirectionFormatter.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
NS_ASSUME_NONNULL_BEGIN

/**
The `MLNCompassDirectionFormatter` class provides properly formatted
The ``MLNCompassDirectionFormatter`` class provides properly formatted
descriptions of absolute headings. For example, a value of `90` may be
formatted as “east”, depending on the locale.

Use this class to create localized heading strings when displaying directions
irrespective of the user’s current location. To format a direction relative to
the user’s current location, use `MLNClockDirectionFormatter` instead.
the user’s current location, use ``MLNClockDirectionFormatter`` instead.
*/
MLN_EXPORT
@interface MLNCompassDirectionFormatter : NSFormatter
Expand All @@ -34,7 +34,7 @@ MLN_EXPORT
- (NSString *)stringFromDirection:(CLLocationDirection)direction;

/**
This method is not supported for the `MLNDirectionFormatter` class.
This method is not supported for the ``MLNCompassDirectionFormatter`` class.
*/
- (BOOL)getObjectValue:(out id __nullable *__nullable)obj
forString:(NSString *)string
Expand Down
62 changes: 31 additions & 31 deletions platform/darwin/src/MLNComputedShapeSource.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,33 +9,33 @@ NS_ASSUME_NONNULL_BEGIN

/**
An `NSNumber` object containing a Boolean value; specifies whether the shape of
an `MLNComputedShapeSource` should be wrapped to accomodate coordinates with
an ``MLNComputedShapeSource`` should be wrapped to accomodate coordinates with
longitudes beyond −180 and 180. The default value is `NO`.

Setting this option to `YES` affects rendering performance.

This option is used with the `MLNComputedShapeSource` class; it is ignored when
creating an `MLNShapeSource` object.
This option is used with the ``MLNComputedShapeSource`` class; it is ignored when
creating an ``MLNShapeSource`` object.
*/
FOUNDATION_EXTERN MLN_EXPORT const MLNShapeSourceOption MLNShapeSourceOptionWrapsCoordinates;

/**
An `NSNumber` object containing a Boolean value; specifies whether the shape of
an `MLNComputedShapeSource` should be clipped at the edge of each tile. The
an ``MLNComputedShapeSource`` should be clipped at the edge of each tile. The
default value is `NO`.

Setting this option to `YES` affects rendering performance. Use this option to
clip `MLNPolyline`s and `MLNPolygon`s at tile boundaries without artifacts.
clip ``MLNPolyline``s and ``MLNPolyline``s at tile boundaries without artifacts.

This option is used with the `MLNComputedShapeSource` class; it is ignored when
creating an `MLNShapeSource` object.
This option is used with the ``MLNComputedShapeSource`` class; it is ignored when
creating an ``MLNShapeSource`` object.
*/
FOUNDATION_EXTERN MLN_EXPORT const MLNShapeSourceOption MLNShapeSourceOptionClipsCoordinates;

FOUNDATION_EXTERN MLN_EXPORT MLNExceptionName const MLNInvalidDatasourceException;

/**
Data source for `MLNComputedShapeSource`. This protocol defines two optional methods for fetching
Data source for ``MLNComputedShapeSource``. This protocol defines two optional methods for fetching
data, one based on tile coordinates, and one based on a bounding box. Classes that implement this
protocol must implement one, and only one of the methods. Methods on this protocol will not be
called on main thread, they will be called on the caller's `requestQueue`.
Expand Down Expand Up @@ -66,23 +66,23 @@ FOUNDATION_EXTERN MLN_EXPORT MLNExceptionName const MLNInvalidDatasourceExceptio
@end

/**
`MLNComputedShapeSource` is a map content source that supplies vector shapes,
``MLNComputedShapeSource`` is a map content source that supplies vector shapes,
one tile at a time, to be shown on the map on demand. You implement a class
conforming to the `MLNComputedShapeSourceDataSource` protocol that returns
instances of `MLNShape` or `MLNFeature`, then add a computed shape source to an
`MLNStyle` object along with an `MLNVectorStyleLayer` object. The vector style
conforming to the ``MLNComputedShapeSourceDataSource`` protocol that returns
instances of ``MLNShape`` or ``MLNShape``, then add a computed shape source to an
``MLNStyle`` object along with an ``MLNStyle`` object. The vector style
layer defines the appearance of any content supplied by the computed shape
source.

`MLNComputedShapeSource` is similar to `MLNShapeSource` but is optimized for
``MLNComputedShapeSource`` is similar to ``MLNComputedShapeSource`` but is optimized for
data sets that change dynamically or are too large to fit completely in memory.
It is also useful for data that is divided into tiles in a format other than
<a href="https://www.mapbox.com/vector-tiles/">Mapbox Vector Tiles</a>. For
<a href="http://geojson.org/">GeoJSON</a> data, use the `MLNShapeSource` class.
For static tiles or Mapbox Vector Tiles, use the `MLNVectorTileSource` class.
<a href="http://geojson.org/">GeoJSON</a> data, use the ``MLNShapeSource`` class.
For static tiles or Mapbox Vector Tiles, use the ``MLNVectorTileSource`` class.

You can add and remove sources dynamically using methods such as
`-[MLNStyle addSource:]` and `-[MLNStyle sourceWithIdentifier:]`. This class
``MLNStyle/addSource:`` and ``MLNStyle/sourceWithIdentifier:``. This class
cannot be represented in a style JSON file; you must add it ot the style at
runtime.
*/
Expand All @@ -96,11 +96,11 @@ MLN_EXPORT
specification</a>.

This class supports the following options:
`MLNShapeSourceOptionMinimumZoomLevel`, `MLNShapeSourceOptionMaximumZoomLevel`,
`MLNShapeSourceOptionBuffer`,
`MLNShapeSourceOptionSimplificationTolerance`,
`MLNShapeSourceOptionWrapsCoordinates`, and
`MLNShapeSourceOptionClipsCoordinates`. Shapes provided by a computed
``MLNShapeSourceOptionMinimumZoomLevel``, ``MLNShapeSourceOptionMinimumZoomLevel``,
``MLNShapeSourceOptionBuffer``,
``MLNShapeSourceOptionSimplificationTolerance``,
``MLNShapeSourceOptionWrapsCoordinates``, and
``MLNShapeSourceOptionClipsCoordinates``. Shapes provided by a computed
shape source cannot be clustered.

@param identifier A string that uniquely identifies the source.
Expand All @@ -117,11 +117,11 @@ MLN_EXPORT
specification</a>.

This class supports the following options:
`MLNShapeSourceOptionMinimumZoomLevel`, `MLNShapeSourceOptionMaximumZoomLevel`,
`MLNShapeSourceOptionBuffer`,
`MLNShapeSourceOptionSimplificationTolerance`,
`MLNShapeSourceOptionWrapsCoordinates`, and
`MLNShapeSourceOptionClipsCoordinates`. Shapes provided by a computed shape
``MLNShapeSourceOptionMinimumZoomLevel``, ``MLNShapeSourceOptionMinimumZoomLevel``,
``MLNShapeSourceOptionBuffer``,
``MLNShapeSourceOptionSimplificationTolerance``,
``MLNShapeSourceOptionWrapsCoordinates``, and
``MLNShapeSourceOptionClipsCoordinates``. Shapes provided by a computed shape
source cannot be clustered.

@param identifier A string that uniquely identifies the source.
Expand All @@ -134,14 +134,14 @@ MLN_EXPORT
/**
Invalidates all the features and properties intersecting with or contained in
the specified bounds. New fetch requests will immediately be invoked on the
`MLNComputedShapeSourceDataSource`.
``MLNComputedShapeSourceDataSource``.
@param bounds Coordinate bounds to invalidate.
*/
- (void)invalidateBounds:(MLNCoordinateBounds)bounds;

/**
Invalidates all the feautres and properties of a given tile. A new fetch request
will immediately be invoked on the `MLNComputedShapeSourceDataSource`.
will immediately be invoked on the ``MLNComputedShapeSourceDataSource``.
@param x Tile X coordinate.
@param y Tile Y coordinate.
@param zoomLevel Tile zoom level.
Expand All @@ -151,7 +151,7 @@ MLN_EXPORT
/**
Set a new set of features for a tile. This method can be invkoed from background threads.
For best performance, use this method only to update tiles that have already been requested
through `MLNComputedShapeSourceDataSource.`
through ``MLNComputedShapeSourceDataSource/``
@param features Features for the tile.
@param x Tile X coordinate.
@param y Tile Y coordinate.
Expand All @@ -163,8 +163,8 @@ MLN_EXPORT
zoomLevel:(NSUInteger)zoomLevel;

/**
An object that implements the `MLNComputedShapeSourceDataSource` protocol that will be queried for
tile data.
An object that implements the ``MLNComputedShapeSourceDataSource`` protocol that will be queried
for tile data.
*/
@property (nonatomic, weak, nullable) id<MLNComputedShapeSourceDataSource> dataSource;

Expand Down
4 changes: 2 additions & 2 deletions platform/darwin/src/MLNCoordinateFormatter.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
NS_ASSUME_NONNULL_BEGIN

/**
The `MLNCoordinateFormatter` class provides properly formatted descriptions of
The ``MLNCoordinateFormatter`` class provides properly formatted descriptions of
geographic coordinate pairs. Use this class to create localized coordinate
strings when displaying location information to users.
*/
Expand Down Expand Up @@ -47,7 +47,7 @@ MLN_EXPORT
- (NSString *)stringFromCoordinate:(CLLocationCoordinate2D)coordinate;

/**
This method is not supported for the `MLNCoordinateFormatter` class.
This method is not supported for the ``MLNCoordinateFormatter`` class.
*/
- (BOOL)getObjectValue:(out id __nullable *__nullable)obj
forString:(NSString *)string
Expand Down
Loading
Loading