From d544da140b395eb4592d8185cf1f61fc9ce82e8d Mon Sep 17 00:00:00 2001 From: Bart Louwers Date: Tue, 20 Aug 2024 17:30:22 +0200 Subject: [PATCH] Fix a bunch of internal links in iOS documentation (#2738) --- .../darwin/scripts/generate-style-code.js | 10 +- .../scripts/style-spec-overrides-v8.json | 34 +-- platform/darwin/src/MLNAnnotation.h | 4 +- platform/darwin/src/MLNAttributedExpression.h | 26 +- platform/darwin/src/MLNAttributionInfo.h | 4 +- .../darwin/src/MLNClockDirectionFormatter.h | 6 +- platform/darwin/src/MLNCluster.h | 12 +- .../darwin/src/MLNCompassDirectionFormatter.h | 6 +- platform/darwin/src/MLNComputedShapeSource.h | 62 ++--- platform/darwin/src/MLNCoordinateFormatter.h | 4 +- platform/darwin/src/MLNCustomStyleLayer.mm | 12 +- platform/darwin/src/MLNDefaultStyle.h | 2 +- platform/darwin/src/MLNDistanceFormatter.h | 2 +- platform/darwin/src/MLNFeature.h | 161 +++++------ platform/darwin/src/MLNFeature_Private.h | 10 +- platform/darwin/src/MLNForegroundStyleLayer.h | 12 +- platform/darwin/src/MLNGeometry.h | 22 +- platform/darwin/src/MLNImageSource.h | 20 +- platform/darwin/src/MLNLight.h.ejs | 8 +- platform/darwin/src/MLNLight_Private.h | 4 +- platform/darwin/src/MLNLocationManager.h | 36 +-- platform/darwin/src/MLNLoggingConfiguration.h | 7 +- platform/darwin/src/MLNMapCamera.h | 2 +- platform/darwin/src/MLNMapSnapshotter.h | 4 +- platform/darwin/src/MLNMultiPoint.h | 28 +- platform/darwin/src/MLNNetworkConfiguration.h | 18 +- platform/darwin/src/MLNOfflinePack.h | 37 +-- platform/darwin/src/MLNOfflinePack.mm | 2 +- platform/darwin/src/MLNOfflineRegion.h | 4 +- platform/darwin/src/MLNOfflineStorage.h | 24 +- platform/darwin/src/MLNOverlay.h | 2 +- platform/darwin/src/MLNPointAnnotation.h | 28 +- platform/darwin/src/MLNPointCollection.h | 24 +- platform/darwin/src/MLNPolygon.h | 46 ++-- platform/darwin/src/MLNPolyline.h | 8 +- platform/darwin/src/MLNRasterDEMSource.h | 18 +- platform/darwin/src/MLNRasterTileSource.h | 30 +-- .../darwin/src/MLNRendererConfiguration.h | 2 +- platform/darwin/src/MLNSettings.h | 6 +- platform/darwin/src/MLNSettings_Private.h | 2 +- platform/darwin/src/MLNShape.h | 48 ++-- platform/darwin/src/MLNShapeCollection.h | 28 +- platform/darwin/src/MLNShapeOfflineRegion.h | 6 +- platform/darwin/src/MLNShapeSource.h | 150 +++++------ platform/darwin/src/MLNShapeSource_Private.h | 6 +- platform/darwin/src/MLNShape_Private.h | 4 +- platform/darwin/src/MLNSource.h | 18 +- platform/darwin/src/MLNSource_Private.h | 10 +- platform/darwin/src/MLNStyle.h | 143 +++------- platform/darwin/src/MLNStyleLayer.h | 18 +- platform/darwin/src/MLNStyleLayer.h.ejs | 22 +- platform/darwin/src/MLNStyleLayer_Private.h | 4 +- .../darwin/src/MLNTilePyramidOfflineRegion.h | 6 +- platform/darwin/src/MLNTileServerOptions.h | 2 +- platform/darwin/src/MLNTileSource.h | 34 +-- platform/darwin/src/MLNTypes.h | 12 +- platform/darwin/src/MLNVectorStyleLayer.h | 12 +- platform/darwin/src/MLNVectorTileSource.h | 32 +-- platform/darwin/src/MLNVectorTileSource.mm | 2 +- .../darwin/src/NSExpression+MLNAdditions.h | 14 +- .../darwin/src/NSPredicate+MLNAdditions.h | 2 +- platform/darwin/src/NSValue+MLNAdditions.h | 16 +- platform/darwin/src/native_apple_interface.m | 2 +- .../test/MLNDocumentationExampleTests.swift | 4 +- .../test/MLNRendererConfigurationTests.m | 14 +- ...MLNNetworkConfigurationIntegrationTests.mm | 2 +- .../Sources/BuildingLightExample.swift | 2 +- platform/ios/src/MLNAnnotationImage.h | 4 +- platform/ios/src/MLNAnnotationView.h | 8 +- platform/ios/src/MLNCalloutView.h | 16 +- platform/ios/src/MLNCameraChangeReason.h | 37 ++- platform/ios/src/MLNCompactCalloutView.h | 2 +- platform/ios/src/MLNMapProjection.h | 4 +- platform/ios/src/MLNMapView.h | 255 ++++++++---------- platform/ios/src/MLNMapView.mm | 6 +- platform/ios/src/MLNMapViewDelegate.h | 55 ++-- platform/ios/src/MLNUserLocation.h | 6 +- .../ios/src/MLNUserLocationAnnotationView.h | 4 +- .../ios/vendor/SMCalloutView/SMCalloutView.h | 2 +- platform/macos/src/MLNAnnotationImage.h | 4 +- platform/macos/src/MLNAttributionButton.h | 2 +- platform/macos/src/MLNMapView.h | 108 +++----- platform/macos/src/MLNMapView.mm | 2 +- platform/macos/src/MLNMapViewDelegate.h | 12 +- 84 files changed, 873 insertions(+), 1016 deletions(-) diff --git a/platform/darwin/scripts/generate-style-code.js b/platform/darwin/scripts/generate-style-code.js index a926089c3..6aa34d629 100644 --- a/platform/darwin/scripts/generate-style-code.js +++ b/platform/darwin/scripts/generate-style-code.js @@ -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) { @@ -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'; } @@ -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('`, `') + '`'; } diff --git a/platform/darwin/scripts/style-spec-overrides-v8.json b/platform/darwin/scripts/style-spec-overrides-v8.json index 7daf53880..882707b93 100644 --- a/platform/darwin/scripts/style-spec-overrides-v8.json +++ b/platform/darwin/scripts/style-spec-overrides-v8.json @@ -1,47 +1,47 @@ { - "light-cocoa-doc": "An `MLNLight` object represents the light source for extruded geometries in `MLNStyle`.\n\n### Example\n```swift\n```\n\n#### Related examples\nSee the Adjust light of 3D buildings to learn how to create and modify the light source for 3D geometries.", + "light-cocoa-doc": "An ``MLNLight`` object represents the light source for extruded geometries in ``MLNLight``.\n\n### Example\n```swift\n```\n\n#### Related examples\nSee the Adjust light of 3D buildings to learn how to create and modify the light source for 3D geometries.", "light": { "position": { - "doc": "Position of the `MLNLight` source relative to lit (extruded) geometries, in a `MLNSphericalPosition` struct [radial coordinate, azimuthal angle, polar angle] where radial indicates the distance from the center of the base of an object to its light, azimuthal indicates the position of the light relative to 0° (0° when `MLNLight.anchor` is set to `MLNLightAnchorViewport` corresponds to the top of the viewport, or 0° when `MLNLight.anchor` is set to `MLNLightAnchorMap` corresponds to due north, and degrees proceed clockwise), and polar indicates the height of the light (from 0°, directly above, to 180°, directly below).", - "examples": "See the Adjust light of 3D buildings example to learn how to create and modify the position of value of an `MLNLight` object for 3D geometries." + "doc": "Position of the ``MLNLight`` source relative to lit (extruded) geometries, in a ``MLNLight`` struct [radial coordinate, azimuthal angle, polar angle] where radial indicates the distance from the center of the base of an object to its light, azimuthal indicates the position of the light relative to 0° (0° when ``MLNLight/anchor`` is set to ``MLNLight`` corresponds to the top of the viewport, or 0° when ``MLNLight/anchor`` is set to ``MLNLight`` corresponds to due north, and degrees proceed clockwise), and polar indicates the height of the light (from 0°, directly above, to 180°, directly below).", + "examples": "See the Adjust light of 3D buildings example to learn how to create and modify the position of value of an ``MLNLight`` object for 3D geometries." } }, "layer": { "type": { "values": { "fill": { - "doc": "An `MLNFillStyleLayer` is a style layer that renders one or more filled (and optionally stroked) polygons on the map.\n\nUse a fill style layer to configure the visual appearance of polygon or multipolygon features. These features can come from vector tiles loaded by an `MLNVectorTileSource` object, or they can be `MLNPolygon`, `MLNPolygonFeature`, `MLNMultiPolygon`, or `MLNMultiPolygonFeature` instances in an `MLNShapeSource` or `MLNComputedShapeSource` object.", - "examples": "See the Select a feature within a layer example to learn how to use a `TERNARY` expression to modify the `fillOpacity` of an `MLNFillStyleLayer` object. See the Add a pattern to a polygon example to learn how to use an image to add pattern to the features styled by a `MLNFillStyleLayer`." + "doc": "An ``MLNFillStyleLayer`` is a style layer that renders one or more filled (and optionally stroked) polygons on the map.\n\nUse a fill style layer to configure the visual appearance of polygon or multipolygon features. These features can come from vector tiles loaded by an ``MLNFillStyleLayer`` object, or they can be ``MLNFillStyleLayer``, ``MLNFillStyleLayer``, ``MLNFillStyleLayer``, or ``MLNFillStyleLayer`` instances in an ``MLNFillStyleLayer`` or ``MLNFillStyleLayer`` object.", + "examples": "See the Select a feature within a layer example to learn how to use a `TERNARY` expression to modify the `fillOpacity` of an ``MLNFillStyleLayer`` object. See the Add a pattern to a polygon example to learn how to use an image to add pattern to the features styled by a ``MLNFillStyleLayer``." }, "fill-extrusion": { - "doc": "An `MLNFillExtrusionStyleLayer` is a style layer that renders one or more 3D extruded polygons on the map.\n\nUse a fill-extrusion style layer to configure the visual appearance of polygon or multipolygon features. These features can come from vector tiles loaded by an `MLNVectorTileSource` object, or they can be `MLNPolygon`, `MLNPolygonFeature`, `MLNMultiPolygon`, or `MLNMultiPolygonFeature` instances in an `MLNShapeSource` or `MLNComputedShapeSource` object.", + "doc": "An ``MLNFillExtrusionStyleLayer`` is a style layer that renders one or more 3D extruded polygons on the map.\n\nUse a fill-extrusion style layer to configure the visual appearance of polygon or multipolygon features. These features can come from vector tiles loaded by an ``MLNFillExtrusionStyleLayer`` object, or they can be ``MLNFillExtrusionStyleLayer``, ``MLNFillExtrusionStyleLayer``, ``MLNFillExtrusionStyleLayer``, or ``MLNFillExtrusionStyleLayer`` instances in an ``MLNFillExtrusionStyleLayer`` or ``MLNFillExtrusionStyleLayer`` object.", "examples": "See the Display 3D buildings example to learn how to add and style 3D layers on a map." }, "line": { - "doc": "An `MLNLineStyleLayer` is a style layer that renders one or more stroked polylines on the map.\n\nUse a line style layer to configure the visual appearance of polyline or multipolyline features. These features can come from vector tiles loaded by an `MLNVectorTileSource` object, or they can be `MLNPolyline`, `MLNPolylineFeature`, `MLNMultiPolyline`, or `MLNMultiPolylineFeature` instances in an `MLNShapeSource` or `MLNComputedShapeSource` object.", - "examples": "See the Add multiple shapes from a single shape source example to learn how to add a line to your map using this style layer. See the Add a line style layer from GeoJSON example to learn how to add and style line data to an `MLNMapView` object at runtime." + "doc": "An ``MLNLineStyleLayer`` is a style layer that renders one or more stroked polylines on the map.\n\nUse a line style layer to configure the visual appearance of polyline or multipolyline features. These features can come from vector tiles loaded by an ``MLNLineStyleLayer`` object, or they can be ``MLNLineStyleLayer``, ``MLNLineStyleLayer``, ``MLNLineStyleLayer``, or ``MLNLineStyleLayer`` instances in an ``MLNLineStyleLayer`` or ``MLNLineStyleLayer`` object.", + "examples": "See the Add multiple shapes from a single shape source example to learn how to add a line to your map using this style layer. See the Add a line style layer from GeoJSON example to learn how to add and style line data to an ``MLNMapView`` object at runtime." }, "symbol": { - "doc": "An `MLNSymbolStyleLayer` is a style layer that renders icon and text labels at points or along lines on the map.\n\nUse a symbol style layer to configure the visual appearance of feature labels. These features can come from vector tiles loaded by an `MLNVectorTileSource` object, or they can be `MLNShape` or `MLNFeature` instances in an `MLNShapeSource` or `MLNComputedShapeSource` object.", + "doc": "An ``MLNSymbolStyleLayer`` is a style layer that renders icon and text labels at points or along lines on the map.\n\nUse a symbol style layer to configure the visual appearance of feature labels. These features can come from vector tiles loaded by an ``MLNSymbolStyleLayer`` object, or they can be ``MLNSymbolStyleLayer`` or ``MLNSymbolStyleLayer`` instances in an ``MLNSymbolStyleLayer`` or ``MLNSymbolStyleLayer`` object.", "examples": "See the Dynamically style interactive points and Use images to cluster point data examples learn how to style data on your map using this layer." }, "circle": { - "doc": "An `MLNCircleStyleLayer` is a style layer that renders one or more filled circles on the map.\n\nUse a circle style layer to configure the visual appearance of point or point collection features. These features can come from vector tiles loaded by an `MLNVectorTileSource` object, or they can be `MLNPointAnnotation`, `MLNPointFeature`, `MLNPointCollection`, or `MLNPointCollectionFeature` instances in an `MLNShapeSource` or `MLNComputedShapeSource` object.\n\nA circle style layer renders circles whose radii are measured in screen units. To display circles on the map whose radii correspond to real-world distances, use many-sided regular polygons and configure their appearance using an `MLNFillStyleLayer` object.", + "doc": "An ``MLNCircleStyleLayer`` is a style layer that renders one or more filled circles on the map.\n\nUse a circle style layer to configure the visual appearance of point or point collection features. These features can come from vector tiles loaded by an ``MLNCircleStyleLayer`` object, or they can be ``MLNCircleStyleLayer``, ``MLNCircleStyleLayer``, ``MLNCircleStyleLayer``, or ``MLNCircleStyleLayer`` instances in an ``MLNCircleStyleLayer`` or ``MLNCircleStyleLayer`` object.\n\nA circle style layer renders circles whose radii are measured in screen units. To display circles on the map whose radii correspond to real-world distances, use many-sided regular polygons and configure their appearance using an ``MLNCircleStyleLayer`` object.", "examples": "See the Data-driven circles, Add multiple shapes from a single shape source, and Cluster point data examples to learn how to add circles to your map using this style layer." }, "heatmap": { - "doc": "An `MLNHeatmapStyleLayer` is a style layer that renders a heatmap.\n\nA heatmap visualizes the spatial distribution of a large, dense set of point data, using color to avoid cluttering the map with individual points at low zoom levels. The points are weighted by an attribute you specify. Use a heatmap style layer in conjunction with point or point collection features. These features can come from vector tiles loaded by an `MLNVectorTileSource` object, or they can be `MLNPointAnnotation`, `MLNPointFeature`, `MLNPointCollection`, or `MLNPointCollectionFeature` instances in an `MLNShapeSource` or `MLNComputedShapeSource` object.\n\nConsider accompanying a heatmap style layer with an `MLNCircleStyleLayer` or `MLNSymbolStyleLayer` at high zoom levels. If you are unsure whether the point data in an `MLNShapeSource` is dense enough to warrant a heatmap, you can alternatively cluster the source using the `MLNShapeSourceOptionClustered` option and render the data using an `MLNCircleStyleLayer` or `MLNSymbolStyleLayer`.", + "doc": "An ``MLNHeatmapStyleLayer`` is a style layer that renders a heatmap.\n\nA heatmap visualizes the spatial distribution of a large, dense set of point data, using color to avoid cluttering the map with individual points at low zoom levels. The points are weighted by an attribute you specify. Use a heatmap style layer in conjunction with point or point collection features. These features can come from vector tiles loaded by an ``MLNHeatmapStyleLayer`` object, or they can be ``MLNHeatmapStyleLayer``, ``MLNHeatmapStyleLayer``, ``MLNHeatmapStyleLayer``, or ``MLNHeatmapStyleLayer`` instances in an ``MLNHeatmapStyleLayer`` or ``MLNHeatmapStyleLayer`` object.\n\nConsider accompanying a heatmap style layer with an ``MLNHeatmapStyleLayer`` or ``MLNHeatmapStyleLayer`` at high zoom levels. If you are unsure whether the point data in an ``MLNHeatmapStyleLayer`` is dense enough to warrant a heatmap, you can alternatively cluster the source using the ``MLNHeatmapStyleLayer`` option and render the data using an ``MLNHeatmapStyleLayer`` or ``MLNHeatmapStyleLayer``.", "examples": "See the Create a heatmap layer example to learn how to add this style layer to your map." }, "raster": { - "doc": "An `MLNRasterStyleLayer` is a style layer that renders georeferenced raster imagery on the map, especially raster tiles.\n\nUse a raster style layer to configure the color parameters of raster tiles loaded by an `MLNRasterTileSource` object or raster images loaded by an `MLNImageSource` object. For example, you could use a raster style layer to render Mapbox Satellite imagery, a raster tile set uploaded to Mapbox Studio, or a raster map authored in TileMill, the classic Mapbox Editor, or Mapbox Studio Classic.\n\nRaster images may also be used as icons or patterns in a style layer. To register an image for use as an icon or pattern, use the `-[MLNStyle setImage:forName:]` method. To configure a point annotation’s image, use the `MLNAnnotationImage` class.", + "doc": "An ``MLNRasterStyleLayer`` is a style layer that renders georeferenced raster imagery on the map, especially raster tiles.\n\nUse a raster style layer to configure the color parameters of raster tiles loaded by an ``MLNRasterStyleLayer`` object or raster images loaded by an ``MLNRasterStyleLayer`` object. For example, you could use a raster style layer to render Mapbox Satellite imagery, a raster tile set uploaded to Mapbox Studio, or a raster map authored in TileMill, the classic Mapbox Editor, or Mapbox Studio Classic.\n\nRaster images may also be used as icons or patterns in a style layer. To register an image for use as an icon or pattern, use the ``MLNStyle/setImage:forName:`` method. To configure a point annotation’s image, use the ``MLNRasterStyleLayer`` class.", "examples": "See the Add an image and Add raster imagery examples to learn how to add imagery with this style layer." }, "hillshade": { - "doc": "An `MLNHillshadeStyleLayer` is a style layer that renders raster digital elevation model (DEM) tiles on the map.\n\nUse a hillshade style layer to configure the color parameters of raster tiles loaded by an `MLNRasterDEMSource` object. For example, you could use a hillshade style layer to render Mapbox Terrain-RGB data.\n\nTo display posterized hillshading based on vector shapes, as with the Mapbox Terrain source, use an `MLNVectorTileSource` object in conjunction with several `MLNFillStyleLayer` objects." + "doc": "An ``MLNHillshadeStyleLayer`` is a style layer that renders raster digital elevation model (DEM) tiles on the map.\n\nUse a hillshade style layer to configure the color parameters of raster tiles loaded by an ``MLNHillshadeStyleLayer`` object. For example, you could use a hillshade style layer to render Mapbox Terrain-RGB data.\n\nTo display posterized hillshading based on vector shapes, as with the Mapbox Terrain source, use an ``MLNHillshadeStyleLayer`` object in conjunction with several ``MLNHillshadeStyleLayer`` objects." }, "background": { - "doc": "An `MLNBackgroundStyleLayer` is a style layer that covers the entire map. Use a background style layer to configure a color or pattern to show below all other map content. If the style’s other layers use the Mapbox Streets source, the background style layer is responsible for drawing land, whereas the oceans and other bodies of water are drawn by `MLNFillStyleLayer` objects.\n\nA background style layer is typically the bottommost layer in a style, because it covers the entire map and can occlude any layers below it. You can therefore access it by getting the last item in the `MLNStyle.layers` array.\n\nIf the background style layer is transparent or omitted from the style, any portion of the map view that does not show another style layer is transparent." + "doc": "An ``MLNBackgroundStyleLayer`` is a style layer that covers the entire map. Use a background style layer to configure a color or pattern to show below all other map content. If the style’s other layers use the Mapbox Streets source, the background style layer is responsible for drawing land, whereas the oceans and other bodies of water are drawn by ``MLNBackgroundStyleLayer`` objects.\n\nA background style layer is typically the bottommost layer in a style, because it covers the entire map and can occlude any layers below it. You can therefore access it by getting the last item in the ``MLNStyle/layers`` array.\n\nIf the background style layer is transparent or omitted from the style, any portion of the map view that does not show another style layer is transparent." } } } @@ -67,11 +67,11 @@ "doc": "Offset distance of icon from its anchor." }, "icon-image": { - "doc": "Name of a style image to use for drawing an image background.\n\nUse the `+[MLNStyle setImage:forName:]` method to associate an image with a name that you can set this property to.\n\nWithin a constant string value, a feature attribute name enclosed in curly braces (e.g., `{token}`) is replaced with the value of the named attribute. Tokens inside non-constant expressions are ignored; instead, use `mgl_join:` and key path expressions.", + "doc": "Name of a style image to use for drawing an image background.\n\nUse the ``MLNStyle/setImage:forName:`` method to associate an image with a name that you can set this property to.\n\nWithin a constant string value, a feature attribute name enclosed in curly braces (e.g., `{token}`) is replaced with the value of the named attribute. Tokens inside non-constant expressions are ignored; instead, use `mgl_join:` and key path expressions.", "examples": "See the Use images to cluster point data example to learn how to dynamically set your icons with an expression." }, "symbol-avoid-edges": { - "doc": "Whether symbols in this layer avoid colliding with symbols in adjacent tiles.\n\nIf this property is set to `true`, symbols in this layer avoid crossing the edge of a tile. You should set this property to `true` if the backing vector tiles don’t have enough padding to prevent collisions, or if this layer’s `symbolPlacement` property is set to `MLNSymbolPlacementPoint` but this layer is above a symbol layer whose `symbolPlacement` property is set to `MLNSymbolPlacementLine`. You do not need to enable this property to prevent clipped labels at tile boundaries." + "doc": "Whether symbols in this layer avoid colliding with symbols in adjacent tiles.\n\nIf this property is set to `true`, symbols in this layer avoid crossing the edge of a tile. You should set this property to `true` if the backing vector tiles don’t have enough padding to prevent collisions, or if this layer’s `symbolPlacement` property is set to ``MLNSymbolPlacement/MLNSymbolPlacementPoint`` but this layer is above a symbol layer whose `symbolPlacement` property is set to ``MLNSymbolPlacement/MLNSymbolPlacementPoint``. You do not need to enable this property to prevent clipped labels at tile boundaries." }, "text-field": { "doc": "Value to use for a text label.\n\nWithin a constant string value, a feature attribute name enclosed in curly braces (e.g., `{token}`) is replaced with the value of the named attribute. Tokens inside non-constant expressions are ignored; instead, use `mgl_join:` and key path expressions.", @@ -115,7 +115,7 @@ }, "paint_line": { "line-gradient": { - "doc": "The color gradient with which the line will be drawn. This property only has an effect on lines defined by an `MLNShapeSource` whose `MLNShapeSourceOptionLineDistanceMetrics` option is set to `YES`." + "doc": "The color gradient with which the line will be drawn. This property only has an effect on lines defined by an ``MLNShapeSource`` whose ``MLNShapeSource`` option is set to `YES`." }, "line-pattern": { "doc": "Name of image in style images to use for drawing image lines. For seamless patterns, image width must be a factor of two (2, 4, 8, ..., 512)." diff --git a/platform/darwin/src/MLNAnnotation.h b/platform/darwin/src/MLNAnnotation.h index 62568f4ea..f4a919f1b 100644 --- a/platform/darwin/src/MLNAnnotation.h +++ b/platform/darwin/src/MLNAnnotation.h @@ -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, @@ -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 diff --git a/platform/darwin/src/MLNAttributedExpression.h b/platform/darwin/src/MLNAttributedExpression.h index 1250ae8a6..f2a327098 100644 --- a/platform/darwin/src/MLNAttributedExpression.h +++ b/platform/darwin/src/MLNAttributedExpression.h @@ -2,13 +2,13 @@ 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; @@ -16,7 +16,7 @@ FOUNDATION_EXTERN MLN_EXPORT MLNAttributedExpressionKey const MLNFontScaleAttrib 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 @@ -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) @@ -56,22 +56,22 @@ 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 *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) @@ -79,7 +79,7 @@ MLN_EXPORT attributes:(nonnull NSDictionary *)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 @@ -87,7 +87,7 @@ MLN_EXPORT 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) diff --git a/platform/darwin/src/MLNAttributionInfo.h b/platform/darwin/src/MLNAttributionInfo.h index 94107384c..0e03022d3 100644 --- a/platform/darwin/src/MLNAttributionInfo.h +++ b/platform/darwin/src/MLNAttributionInfo.h @@ -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. diff --git a/platform/darwin/src/MLNClockDirectionFormatter.h b/platform/darwin/src/MLNClockDirectionFormatter.h index ce30a7be5..fa67c07ca 100644 --- a/platform/darwin/src/MLNClockDirectionFormatter.h +++ b/platform/darwin/src/MLNClockDirectionFormatter.h @@ -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 clock positions. 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 @@ -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 diff --git a/platform/darwin/src/MLNCluster.h b/platform/darwin/src/MLNCluster.h index 93a1ffd42..fffc34bf5 100644 --- a/platform/darwin/src/MLNCluster.h +++ b/platform/darwin/src/MLNCluster.h @@ -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 @@ -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 } diff --git a/platform/darwin/src/MLNCompassDirectionFormatter.h b/platform/darwin/src/MLNCompassDirectionFormatter.h index a76ca9e44..8b9ea52c1 100644 --- a/platform/darwin/src/MLNCompassDirectionFormatter.h +++ b/platform/darwin/src/MLNCompassDirectionFormatter.h @@ -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 @@ -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 diff --git a/platform/darwin/src/MLNComputedShapeSource.h b/platform/darwin/src/MLNComputedShapeSource.h index 2703ff4ff..42f5dd65e 100644 --- a/platform/darwin/src/MLNComputedShapeSource.h +++ b/platform/darwin/src/MLNComputedShapeSource.h @@ -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`. @@ -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 Mapbox Vector Tiles. For - GeoJSON data, use the `MLNShapeSource` class. - For static tiles or Mapbox Vector Tiles, use the `MLNVectorTileSource` class. + GeoJSON 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. */ @@ -96,11 +96,11 @@ MLN_EXPORT specification. 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. @@ -117,11 +117,11 @@ MLN_EXPORT specification. 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. @@ -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. @@ -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. @@ -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 dataSource; diff --git a/platform/darwin/src/MLNCoordinateFormatter.h b/platform/darwin/src/MLNCoordinateFormatter.h index bc5ab24ee..cbb694822 100644 --- a/platform/darwin/src/MLNCoordinateFormatter.h +++ b/platform/darwin/src/MLNCoordinateFormatter.h @@ -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. */ @@ -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 diff --git a/platform/darwin/src/MLNCustomStyleLayer.mm b/platform/darwin/src/MLNCustomStyleLayer.mm index 7bcb69dab..d88ddb020 100644 --- a/platform/darwin/src/MLNCustomStyleLayer.mm +++ b/platform/darwin/src/MLNCustomStyleLayer.mm @@ -20,7 +20,7 @@ class MLNCustomLayerHost; /** - An `MLNCustomStyleLayer` is a style layer that is rendered by OpenGL / Metal code that + An ``MLNCustomStyleLayer`` is a style layer that is rendered by OpenGL / Metal code that you provide. By default, this class does nothing. You can subclass this class to provide @@ -29,10 +29,10 @@ class MLNCustomLayerHost; `-drawInMapView:withContext:` methods. You can access an existing MLNCustomStyleLayer using the - `-[MLNStyle layerWithIdentifier:]` method if you know its identifier; - otherwise, find it using the `MLNStyle.layers` property. You can also create a + ``MLNStyle/layerWithIdentifier:`` method if you know its identifier; + otherwise, find it using the ``MLNStyle/layers`` property. You can also create a new MLNCustomStyleLayer and add it to the style using a method such as - `-[MLNStyle addLayer:]`. + ``MLNStyle/addLayer:``. @warning This API is undocumented and therefore unsupported. It may change at any time without notice. @@ -59,8 +59,8 @@ class MLNCustomLayerHost; Returns an MLNCustomStyleLayer style layer object initialized with the given identifier. After initializing and configuring the style layer, add it to a map view’s - style using the `-[MLNStyle addLayer:]` or - `-[MLNStyle insertLayer:belowLayer:]` method. + style using the ``MLNStyle/addLayer:`` or + ``MLNStyle/insertLayer:belowLayer:`` method. @param identifier A string that uniquely identifies the layer in the style to which it is added. diff --git a/platform/darwin/src/MLNDefaultStyle.h b/platform/darwin/src/MLNDefaultStyle.h index eb582c658..5122edd73 100644 --- a/platform/darwin/src/MLNDefaultStyle.h +++ b/platform/darwin/src/MLNDefaultStyle.h @@ -5,7 +5,7 @@ NS_ASSUME_NONNULL_BEGIN /** - The `MLNDefaultStyle` defines the predefined vendor style + The ``MLNDefaultStyle`` defines the predefined vendor style */ MLN_EXPORT @interface MLNDefaultStyle : NSObject diff --git a/platform/darwin/src/MLNDistanceFormatter.h b/platform/darwin/src/MLNDistanceFormatter.h index 4f18f4448..7abc53fc6 100644 --- a/platform/darwin/src/MLNDistanceFormatter.h +++ b/platform/darwin/src/MLNDistanceFormatter.h @@ -6,7 +6,7 @@ NS_ASSUME_NONNULL_BEGIN /** - `MLNDistanceFormatter` implements a formatter object meant to be used for + ``MLNDistanceFormatter`` implements a formatter object meant to be used for geographic distances. The user’s current locale will be used by default but it can be overriden by changing the locale property of the numberFormatter. */ diff --git a/platform/darwin/src/MLNFeature.h b/platform/darwin/src/MLNFeature.h index a3815ac41..4b17c4a7e 100644 --- a/platform/darwin/src/MLNFeature.h +++ b/platform/darwin/src/MLNFeature.h @@ -11,31 +11,31 @@ NS_ASSUME_NONNULL_BEGIN /** - The `MLNFeature` protocol is used to provide details about geographic features - contained in an `MLNShapeSource` or `MLNVectorTileSource` object. Each concrete - subclass of `MLNShape` in turn has a subclass that conforms to this protocol. A + The ``MLNFeature`` protocol is used to provide details about geographic features + contained in an ``MLNShapeSource`` or ``MLNVectorTileSource`` object. Each concrete + subclass of ``MLNShape`` in turn has a subclass that conforms to this protocol. A feature object associates a shape with an optional identifier and attributes. You can add custom data to display on the map by creating feature objects and - adding them to an `MLNShapeSource` using the - `-[MLNShapeSource initWithIdentifier:shape:options:]` method or - `MLNShapeSource.shape` property. + adding them to an ``MLNShapeSource`` using the + ``MLNShapeSource/initWithIdentifier:shape:options:`` method or + ``MLNShapeSource/shape`` property. In addition to adding data to the map, you can also extract data from the map: - `-[MLNMapView visibleFeaturesAtPoint:]` and related methods return feature + ``MLNMapView/visibleFeaturesAtPoint:`` and related methods return feature objects that correspond to features in the source. This enables you to inspect - the properties of features in vector tiles loaded by `MLNVectorTileSource` + the properties of features in vector tiles loaded by ``MLNVectorTileSource`` objects. You also reuse these feature objects as overlay annotations. - While it is possible to add `MLNFeature`-conforming objects to the map as - annotations using `-[MLNMapView addAnnotations:]` and related methods, doing so + While it is possible to add ``MLNFeature``-conforming objects to the map as + annotations using ``MLNMapView/addAnnotations:`` and related methods, doing so has trade-offs: - - Features added as annotations will not have `identifier` or `attributes` + - Features added as annotations will not have ``identifier`` or ``attributes`` properties when used with feature querying. - Features added as annotations become interactive. Taps and selection can be - handled in `-[MLNMapViewDelegate mapView:didSelectAnnotation:]`. + handled in ``MLNMapViewDelegate/mapView:didSelectAnnotation:``. */ @protocol MLNFeature @@ -43,12 +43,12 @@ NS_ASSUME_NONNULL_BEGIN An object that uniquely identifies the feature in its containing content source. - You can configure an `MLNVectorStyleLayer` object to include or exclude a - specific feature in an `MLNShapeSource` or `MLNVectorTileSource`. In the - `MLNVectorStyleLayer.predicate` property, compare the special `$id` attribute + You can configure an ``MLNVectorStyleLayer`` object to include or exclude a + specific feature in an ``MLNShapeSource`` or ``MLNVectorTileSource``. In the + ``MLNVectorStyleLayer/predicate`` property, compare the special `$id` attribute to the feature’s identifier. - In vector tiles loaded by `MLNVectorTileSource` objects, the identifier + In vector tiles loaded by ``MLNVectorTileSource`` objects, the identifier corresponds to the feature identifier @@ -57,27 +57,16 @@ NS_ASSUME_NONNULL_BEGIN floating-point number, or string. These data types are mapped to instances of the following Foundation classes: - - - - - - - - -
In the tile sourceThis property
Integer NSNumber (use the - unsignedLongLongValue or longLongValue property)
Floating-point number NSNumber (use the doubleValue - property)
String NSString
+ | In the tile source | This property | + |---------------------------|-------------------------------------------------------------------------------| + | Integer | `NSNumber` (use the `unsignedLongLongValue` or `longLongValue` + property) | | Floating-point number | `NSNumber` (use the `doubleValue` property) | | + String | `NSString` | - For details about the identifiers used in most Mapbox-provided styles, consult - the - Mapbox Streets - layer reference. - - The identifier should be set before adding the feature to an `MLNShapeSource` + The identifier should be set before adding the feature to an ``MLNShapeSource`` object; setting it afterwards has no effect on the map’s contents. While it is possible to change this value on feature instances obtained from - `-[MLNMapView visibleFeaturesAtPoint:]` and related methods, doing so likewise + ``MLNMapView/visibleFeaturesAtPoint:`` and related methods, doing so likewise has no effect on the map’s contents. */ @property (nonatomic, copy, nullable) id identifier; @@ -85,71 +74,59 @@ NS_ASSUME_NONNULL_BEGIN /** A dictionary of attributes for this feature. - You can configure an `MLNVectorStyleLayer` object to include or exclude a - specific feature in an `MLNShapeSource` or `MLNVectorTileSource`. In the - `MLNVectorStyleLayer.predicate` property, compare a key of the attribute + You can configure an ``MLNVectorStyleLayer`` object to include or exclude a + specific feature in an ``MLNShapeSource`` or ``MLNVectorTileSource``. In the + ``MLNVectorStyleLayer/predicate`` property, compare a key of the attribute dictionary to the value you want to include. For example, if you want an - `MLNLineStyleLayer` object to display only important features, you might assign + ``MLNLineStyleLayer`` object to display only important features, you might assign a value above 50 to the important features’ `importance` attribute, then set - `MLNVectorStyleLayer.predicate` to an `NSPredicate` with the format + ``MLNVectorStyleLayer/predicate`` to an + [`NSPredicate`](https://developer.apple.com/documentation/foundation/nspredicate) with the format `importance > 50`. - You can also configure many layout and paint attributes of an `MLNStyleLayer` + You can also configure many layout and paint attributes of an ``MLNStyleLayer`` object to match the value of an attribute in this dictionary whenever it renders this feature. For example, if you display features in an - `MLNShapeSource` using an `MLNCircleStyleLayer`, you can assign a `halfway` + ``MLNShapeSource`` using an ``MLNCircleStyleLayer``, you can assign a `halfway` attribute to each of the source’s features, then set - `MLNCircleStyleLayer.circleRadius` to an expression for the key path `halfway`. + ``MLNCircleStyleLayer/circleRadius`` to an expression for the key path `halfway`. - The `MLNSymbolStyleLayer.text` and `MLNSymbolStyleLayer.iconImageName` + The ``MLNSymbolStyleLayer/text`` and ``MLNSymbolStyleLayer/iconImageName`` properties allow you to use attributes yet another way. For example, to label - features in an `MLNShapeSource` object by their names, you can assign a `name` + features in an ``MLNShapeSource`` object by their names, you can assign a `name` attribute to each of the source’s features, then set - `MLNSymbolStyleLayer.text` to an expression for the constant string value + ``MLNSymbolStyleLayer/text`` to an expression for the constant string value `{name}`. See the Predicates and Expressions guide for more information about expressions. - In vector tiles loaded by `MLNVectorTileSource` objects, the keys and values of + In vector tiles loaded by ``MLNVectorTileSource`` objects, the keys and values of each feature’s attribute dictionary are determined by the source. Each attribute name is a string, while each attribute value may be a null value, Boolean value, integer, floating-point number, or string. These data types are mapped to instances of the following Foundation classes: - - - - - - - - - -
In the tile sourceIn this dictionary
Null NSNull
Boolean NSNumber (use the boolValue - property)
Integer NSNumber (use the - unsignedLongLongValue or longLongValue property)
Floating-point number NSNumber (use the doubleValue - property)
String NSString
+ | In the tile source | In this dictionary | + |---------------------------|-------------------------------------------------------------------------------| + | Null | `NSNull` | | Boolean | `NSNumber` (use the + `boolValue` property) | | Integer | + `NSNumber` (use the `unsignedLongLongValue` or `longLongValue` property) | | Floating-point + number | `NSNumber` (use the `doubleValue` property) | | + String | `NSString` | - For details about the attribute names and values found in Mapbox-provided - vector tile sources, consult the - Mapbox Streets - and - Mapbox Terrain - layer references. - - When adding a feature to an `MLNShapeSource`, use the same Foundation types + When adding a feature to an ``MLNShapeSource``, use the same Foundation types listed above for each attribute value. In addition to the Foundation types, you may also set an attribute to an `NSColor` (macOS) or `UIColor` (iOS), which will be converted into its CSS string representation - when the feature is added to an `MLNShapeSource`. This can be convenient when + when the feature is added to an ``MLNShapeSource``. This can be convenient when using the attribute to supply a value for a color-typed layout or paint attribute via a key path expression. Note that while it is possible to change this value on feature - instances obtained from `-[MLNMapView visibleFeaturesAtPoint:]` and related + instances obtained from ``MLNMapView/visibleFeaturesAtPoint:`` and related methods, there will be no effect on the map. Setting this value can be useful - when the feature instance is used to initialize an `MLNShapeSource` and that + when the feature instance is used to initialize an ``MLNShapeSource`` and that source is added to the map and styled. */ @property (nonatomic, copy) NSDictionary *attributes; @@ -157,26 +134,26 @@ NS_ASSUME_NONNULL_BEGIN /** Returns the feature attribute for the given attribute name. - See the `attributes` property’s documentation for details on keys and values + See the ``attributes`` property’s documentation for details on keys and values associated with this method. */ - (nullable id)attributeForKey:(NSString *)key; /** Returns a dictionary that can be serialized as a GeoJSON Feature representation - of an instance of an `MLNFeature` subclass. + of an instance of an ``MLNFeature`` subclass. The dictionary includes a `geometry` key corresponding to the receiver’s underlying geometry data, a `properties` key corresponding to the receiver’s `attributes` property, and an `id` key corresponding to the receiver’s - `identifier` property. + ``identifier` property. */ - (NSDictionary *)geoJSONDictionary; @end /** - An `MLNEmptyFeature` object associates an empty shape with an optional + An ``MLNEmptyFeature`` object associates an empty shape with an optional identifier and attributes. */ MLN_EXPORT @@ -184,22 +161,21 @@ MLN_EXPORT @end /** - An `MLNPointFeature` object associates a point shape with an optional + An ``MLNPointFeature`` object associates a point shape with an optional identifier and attributes. #### Related examples - TODO: Dynamically style interactive points, learn how to initialize - `MLNPointFeature` objects and add them to your map. + - */ MLN_EXPORT @interface MLNPointFeature : MLNPointAnnotation @end /** - An `MLNPointFeatureCluster` object associates a point shape (with an optional + An ``MLNPointFeatureCluster`` object associates a point shape (with an optional identifier and attributes) and represents a point cluster. - @see `MLNCluster` + @see ``MLNCluster`` #### Related examples TODO: Clustering point data, learn how to initialize @@ -210,7 +186,7 @@ MLN_EXPORT @end /** - An `MLNPolylineFeature` object associates a polyline shape with an optional + An ``MLNPolylineFeature`` object associates a polyline shape with an optional identifier and attributes. A polyline feature is known as a @@ -218,15 +194,14 @@ MLN_EXPORT feature in GeoJSON. #### Related examples - TODO: Add a line annotation from GeoJSON, learn how to initialize an - `MLNPolylineFeature` and add it to an `MLNMapView` object. + - */ MLN_EXPORT @interface MLNPolylineFeature : MLNPolyline @end /** - An `MLNPolygonFeature` object associates a polygon shape with an optional + An ``MLNPolygonFeature`` object associates a polygon shape with an optional identifier and attributes. */ MLN_EXPORT @@ -234,7 +209,7 @@ MLN_EXPORT @end /** - An `MLNPointCollectionFeature` object associates a point collection with an + An ``MLNPointCollectionFeature`` object associates a point collection with an optional identifier and attributes. A point collection feature is known as a @@ -249,7 +224,7 @@ MLN_EXPORT @compatibility_alias MLNMultiPointFeature MLNPointCollectionFeature; /** - An `MLNMultiPolylineFeature` object associates a multipolyline shape with an + An ``MLNMultiPolylineFeature`` object associates a multipolyline shape with an optional identifier and attributes. A multipolyline feature is known as a @@ -261,7 +236,7 @@ MLN_EXPORT @end /** - An `MLNMultiPolygonFeature` object associates a multipolygon shape with an + An ``MLNMultiPolygonFeature`` object associates a multipolygon shape with an optional identifier and attributes. */ MLN_EXPORT @@ -269,14 +244,14 @@ MLN_EXPORT @end /** - An `MLNShapeCollectionFeature` object associates a shape collection with an + An ``MLNShapeCollectionFeature`` object associates a shape collection with an optional identifier and attributes. - `MLNShapeCollectionFeature` is most commonly used to add multiple shapes to a - single `MLNShapeSource`. Configure the appearance of an `MLNSource`’s shape - collection collectively using an `MLNSymbolStyleLayer` object, or use multiple - instances of `MLNCircleStyleLayer`, `MLNFillStyleLayer`, and - `MLNLineStyleLayer` to configure the appearance of each kind of shape inside + ``MLNShapeCollectionFeature`` is most commonly used to add multiple shapes to a + single ``MLNShapeSource``. Configure the appearance of an ``MLNSource``’s shape + collection collectively using an ``MLNSymbolStyleLayer`` object, or use multiple + instances of ``MLNCircleStyleLayer``, ``MLNFillStyleLayer``, and + ``MLNLineStyleLayer`` to configure the appearance of each kind of shape inside the collection. A shape collection feature is known as a @@ -285,7 +260,7 @@ MLN_EXPORT #### Related examples TODO: Add multiple shapes from a single shape source, learn how to - add shape data to your map using an `MLNShapeCollectionFeature` object. + add shape data to your map using an ``MLNShapeCollectionFeature`` object. */ MLN_EXPORT @interface MLNShapeCollectionFeature : MLNShapeCollection diff --git a/platform/darwin/src/MLNFeature_Private.h b/platform/darwin/src/MLNFeature_Private.h index d792e270c..365341f40 100644 --- a/platform/darwin/src/MLNFeature_Private.h +++ b/platform/darwin/src/MLNFeature_Private.h @@ -9,7 +9,7 @@ NS_ASSUME_NONNULL_BEGIN /** - Returns an array of `MLNFeature` objects converted from the given vector of + Returns an array of ``MLNFeature`` objects converted from the given vector of vector tile features. */ MLN_EXPORT @@ -17,7 +17,7 @@ NSArray *> *MLNFeaturesFromMBGLFeatures( const std::vector &features); /** - Returns an array of `MLNFeature` objects converted from the given vector of + Returns an array of ``MLNFeature`` objects converted from the given vector of vector tile features. */ MLN_EXPORT @@ -25,13 +25,13 @@ NSArray *> *MLNFeaturesFromMBGLFeatures( const std::vector &features); /** - Returns an `MLNFeature` object converted from the given mbgl::GeoJSONFeature + Returns an ``MLNFeature`` object converted from the given mbgl::GeoJSONFeature */ MLN_EXPORT id MLNFeatureFromMBGLFeature(const mbgl::GeoJSONFeature &feature); /** - Returns an `MLNShape` representing the given geojson. The shape can be + Returns an ``MLNShape`` representing the given geojson. The shape can be a feature, a collection of features, or a geometry. */ MLNShape *MLNShapeFromGeoJSON(const mapbox::geojson::geojson &geojson); @@ -45,7 +45,7 @@ mbgl::GeoJSONFeature mbglFeature(mbgl::GeoJSONFeature feature, id identifier, NSDictionary *attributes); /** - Returns an `NSDictionary` representation of an `MLNFeature`. + Returns an `NSDictionary` representation of an ``MLNFeature``. */ NSDictionary *NSDictionaryFeatureForGeometry(NSDictionary *geometry, NSDictionary *attributes, diff --git a/platform/darwin/src/MLNForegroundStyleLayer.h b/platform/darwin/src/MLNForegroundStyleLayer.h index 3bd909330..8a6fae051 100644 --- a/platform/darwin/src/MLNForegroundStyleLayer.h +++ b/platform/darwin/src/MLNForegroundStyleLayer.h @@ -8,13 +8,13 @@ NS_ASSUME_NONNULL_BEGIN @class MLNSource; /** - `MLNForegroundStyleLayer` is an abstract superclass for style layers whose - content is defined by an `MLNSource` object. + ``MLNForegroundStyleLayer`` is an abstract superclass for style layers whose + content is defined by an ``MLNSource`` object. - Create instances of `MLNRasterStyleLayer`, `MLNHillshadeStyleLayer`, and the - concrete subclasses of `MLNVectorStyleLayer` in order to use - `MLNForegroundStyleLayer`'s methods. Do not create instances of - `MLNForegroundStyleLayer` directly, and do not create your own subclasses of + Create instances of ``MLNRasterStyleLayer``, ``MLNRasterStyleLayer``, and the + concrete subclasses of ``MLNVectorStyleLayer`` in order to use + ``MLNForegroundStyleLayer``'s methods. Do not create instances of + ``MLNForegroundStyleLayer`` directly, and do not create your own subclasses of this class. */ MLN_EXPORT diff --git a/platform/darwin/src/MLNGeometry.h b/platform/darwin/src/MLNGeometry.h index de1fc55dc..941bc6bf8 100644 --- a/platform/darwin/src/MLNGeometry.h +++ b/platform/darwin/src/MLNGeometry.h @@ -6,11 +6,11 @@ NS_ASSUME_NONNULL_BEGIN -/** Defines the area spanned by an `MLNCoordinateBounds`. */ +/** Defines the area spanned by an ``MLNCoordinateBounds``. */ typedef struct __attribute__((objc_boxable)) MLNCoordinateSpan { - /** Latitudes spanned by an `MLNCoordinateBounds`. */ + /** Latitudes spanned by an ``MLNCoordinateBounds``. */ CLLocationDegrees latitudeDelta; - /** Longitudes spanned by an `MLNCoordinateBounds`. */ + /** Longitudes spanned by an ``MLNCoordinateBounds``. */ CLLocationDegrees longitudeDelta; } MLNCoordinateSpan; @@ -33,7 +33,7 @@ typedef struct MLNMatrix4 { } MLNMatrix4; /** - Creates a new `MLNCoordinateSpan` from the given latitudinal and longitudinal + Creates a new ``MLNCoordinateSpan`` from the given latitudinal and longitudinal deltas. */ NS_INLINE MLNCoordinateSpan MLNCoordinateSpanMake(CLLocationDegrees latitudeDelta, @@ -45,7 +45,7 @@ NS_INLINE MLNCoordinateSpan MLNCoordinateSpanMake(CLLocationDegrees latitudeDelt } /** - Creates a new `MLNMapPoint` from the given X and Y coordinates, and zoom level. + Creates a new ``MLNMapPoint`` from the given X and Y coordinates, and zoom level. */ NS_INLINE MLNMapPoint MLNMapPointMake(CGFloat x, CGFloat y, CGFloat zoomLevel) { MLNMapPoint point; @@ -78,7 +78,7 @@ typedef struct __attribute__((objc_boxable)) MLNCoordinateBounds { /** A quadrilateral area as measured on a two-dimensional map projection. - `MLNCoordinateQuad` differs from `MLNCoordinateBounds` in that it allows + ``MLNCoordinateQuad`` differs from ``MLNCoordinateQuad`` in that it allows representation of non-axis aligned bounds and non-rectangular quadrilaterals. The coordinates are described in counter clockwise order from top left. */ @@ -94,7 +94,7 @@ typedef struct MLNCoordinateQuad { } MLNCoordinateQuad; /** - Creates a new `MLNCoordinateBounds` structure from the given southwest and + Creates a new ``MLNCoordinateBounds`` structure from the given southwest and northeast coordinates. */ NS_INLINE MLNCoordinateBounds MLNCoordinateBoundsMake(CLLocationCoordinate2D sw, @@ -106,7 +106,7 @@ NS_INLINE MLNCoordinateBounds MLNCoordinateBoundsMake(CLLocationCoordinate2D sw, } /** - Creates a new `MLNCoordinateQuad` structure from the given top left, + Creates a new ``MLNCoordinateQuad`` structure from the given top left, bottom left, bottom right, and top right coordinates. */ NS_INLINE MLNCoordinateQuad MLNCoordinateQuadMake(CLLocationCoordinate2D topLeft, @@ -122,7 +122,7 @@ NS_INLINE MLNCoordinateQuad MLNCoordinateQuadMake(CLLocationCoordinate2D topLeft } /** - Creates a new `MLNCoordinateQuad` structure from the given `MLNCoordinateBounds`. + Creates a new ``MLNCoordinateQuad`` structure from the given ``MLNCoordinateQuad``. The returned quad uses the bounds' northeast coordinate as the top right, and the southwest coordinate at the bottom left. */ @@ -156,7 +156,7 @@ NS_INLINE BOOL MLNCoordinateBoundsIntersectsCoordinateBounds(MLNCoordinateBounds #### Related examples TODO: Restrict map panning to an area, learn how to use - `MLNCoordinateInCoordinateBounds` to determine if a point is within, or + ``MLNCoordinateInCoordinateBounds`` to determine if a point is within, or intersects, a given bounding box. */ NS_INLINE BOOL MLNCoordinateInCoordinateBounds(CLLocationCoordinate2D coordinate, @@ -189,7 +189,7 @@ NS_INLINE MLNCoordinateBounds MLNCoordinateBoundsOffset(MLNCoordinateBounds boun /** Returns `YES` if the coordinate bounds covers no area. - @note A bounds may be empty but have a non-zero coordinate span (e.g., when its + > Note: A bounds may be empty but have a non-zero coordinate span (e.g., when its northeast point lies due north of its southwest point). */ NS_INLINE BOOL MLNCoordinateBoundsIsEmpty(MLNCoordinateBounds bounds) { diff --git a/platform/darwin/src/MLNImageSource.h b/platform/darwin/src/MLNImageSource.h index cd46ee16e..e562891d9 100644 --- a/platform/darwin/src/MLNImageSource.h +++ b/platform/darwin/src/MLNImageSource.h @@ -8,27 +8,27 @@ NS_ASSUME_NONNULL_BEGIN MLN_EXPORT /** - `MLNImageSource` is a content source that is used for a georeferenced raster + ``MLNImageSource`` is a content source that is used for a georeferenced raster image to be shown on the map. The georeferenced image scales and rotates as the user zooms and rotates the map. Images may also be used as icons or patterns in a style layer. To register an image for use as an icon or pattern, - use the `-[MLNStyle setImage:forName:]` method. To configure a point - annotation’s image, use the `MLNAnnotationImage` class. + use the ``MLNStyle/setImage:forName:`` method. To configure a point + annotation’s image, use the ``MLNAnnotationImage`` class. The geographic location of the raster image content, supplied with - `MLNCoordinateQuad`, can be non-axis aligned. - `MLNImageSource` supports raster content from `NSURL`, `NSImage` (macOS), or + ``MLNCoordinateQuad``, can be non-axis aligned. + ``MLNImageSource`` supports raster content from `NSURL`, `NSImage` (macOS), or `UIImage` (iOS). - An image source is added to an `MLNStyle` object along with one or more - `MLNRasterStyleLayer` objects. Use a raster style layer to control the + An image source is added to an ``MLNStyle`` object along with one or more + ``MLNRasterStyleLayer`` objects. Use a raster style layer to control the appearance of content supplied by the image source. Each image source defined by the style JSON file is represented at runtime by an - `MLNImageSource` object that you can use to initialize new style layers. You + ``MLNImageSource`` object that you can use to initialize new style layers. You can also add and remove sources dynamically using methods such as - `-[MLNStyle addSource:]` and `-[MLNStyle sourceWithIdentifier:]`. + ``MLNStyle/addSource:`` and ``MLNStyle/sourceWithIdentifier:``. ### Example @@ -43,7 +43,7 @@ MLN_EXPORT ``` #### Related examples - TODO: Add an image, learn how to add an image to your map using `MLNImageSource`. + TODO: Add an image, learn how to add an image to your map using ``MLNImageSource``. */ MLN_EXPORT @interface MLNImageSource : MLNSource diff --git a/platform/darwin/src/MLNLight.h.ejs b/platform/darwin/src/MLNLight.h.ejs index 73fd0afd8..00c56b8bf 100644 --- a/platform/darwin/src/MLNLight.h.ejs +++ b/platform/darwin/src/MLNLight.h.ejs @@ -36,8 +36,8 @@ typedef NS_ENUM(NSUInteger, MLNLight<%- camelize(property.name) %>) { typedef struct __attribute__((objc_boxable)) MLNSphericalPosition { /** Distance from the center of the base of an object to its light. */ CGFloat radial; - /** Position of the light relative to 0° (0° when `MLNLight.anchor` is set to viewport corresponds - to the top of the viewport, or 0° when `MLNLight.anchor` is set to map corresponds to due north, + /** Position of the light relative to 0° (0° when ``MLNLight/anchor`` is set to viewport corresponds + to the top of the viewport, or 0° when ``MLNLight/anchor`` is set to map corresponds to due north, and degrees proceed clockwise). */ CLLocationDirection azimuthal; /** Indicates the height of the light (from 0°, directly above, to 180°, directly below). */ @@ -45,13 +45,13 @@ typedef struct __attribute__((objc_boxable)) MLNSphericalPosition { } MLNSphericalPosition; /** - Creates a new `MLNSphericalPosition` from the given radial, azimuthal, polar. + Creates a new ``MLNSphericalPosition`` from the given radial, azimuthal, polar. @param radial The radial coordinate. @param azimuthal The azimuthal angle. @param polar The polar angle. - @return Returns a `MLNSphericalPosition` struct containing the position attributes. + @return Returns a ``MLNSphericalPosition`` struct containing the position attributes. */ NS_INLINE MLNSphericalPosition MLNSphericalPositionMake(CGFloat radial, CLLocationDirection azimuthal, CLLocationDirection polar) { MLNSphericalPosition position; diff --git a/platform/darwin/src/MLNLight_Private.h b/platform/darwin/src/MLNLight_Private.h index 4882bb810..f2c6f451d 100644 --- a/platform/darwin/src/MLNLight_Private.h +++ b/platform/darwin/src/MLNLight_Private.h @@ -11,12 +11,12 @@ class Light; @interface MLNLight (Private) /** - Initializes and returns a `MLNLight` associated with a style's light. + Initializes and returns a ``MLNLight`` associated with a style's light. */ - (instancetype)initWithMBGLLight:(const mbgl::style::Light *)mbglLight; /** - Returns an `mbgl::style::Light` representation of the `MLNLight`. + Returns an `mbgl::style::Light` representation of the ``MLNLight``. */ - (mbgl::style::Light)mbglLight; diff --git a/platform/darwin/src/MLNLocationManager.h b/platform/darwin/src/MLNLocationManager.h index 760f5e96c..d0b5a6f78 100644 --- a/platform/darwin/src/MLNLocationManager.h +++ b/platform/darwin/src/MLNLocationManager.h @@ -6,15 +6,15 @@ NS_ASSUME_NONNULL_BEGIN @protocol MLNLocationManagerDelegate; /** - The `MLNLocationManager` protocol defines a set of methods that a class must - implement in order to serve as the location manager of an `MLNMapView`. A location + The ``MLNLocationManager`` protocol defines a set of methods that a class must + implement in order to serve as the location manager of an ``MLNMapView``. A location manager is responsible for notifying the map view about location-related events, such as a change in the user’s location. This protocol is similar to the Core Location framework’s `CLLocationManager` class, but your implementation does not need to be based on `CLLocationManager`. - To receive location updates from an object that conforms to the `MLNLocationManager` - protocol, use the optional methods available in the `MLNLocationManagerDelegate` protocol. + To receive location updates from an object that conforms to the ``MLNLocationManager`` + protocol, use the optional methods available in the ``MLNLocationManagerDelegate`` protocol. */ @protocol MLNLocationManager @@ -26,7 +26,7 @@ NS_ASSUME_NONNULL_BEGIN Specifies the minimum distance (measured in meters) a device must move horizontally before a location update is generated. - The default value of this property is `kCLDistanceFilterNone` when `MLNMapView` uses its + The default value of this property is `kCLDistanceFilterNone` when ``MLNMapView`` uses its default location manager. @see `CLLocationManager.distanceFilter` @@ -42,10 +42,10 @@ NS_ASSUME_NONNULL_BEGIN /** Specifies the accuracy of the location data. - The default value is `kCLLocationAccuracyBest` when `MLNMapView` uses its + The default value is `kCLLocationAccuracyBest` when ``MLNMapView`` uses its default location manager. - @note Determining a location with greater accuracy requires more time and more power. + > Note: Determining a location with greater accuracy requires more time and more power. @see `CLLocationManager.desiredAccuracy` */ @@ -62,9 +62,9 @@ NS_ASSUME_NONNULL_BEGIN /** Specifies the level of location accuracy the Maps SDK has permission to use. - @note If the value of this property is `CLAccuracyAuthorizationFullAccuracy`, you can set the - `MLNLocationManager.desiredAccuracy` property to any value. If the value is - `CLAccuracyAuthorizationReducedAccuracy`, setting `MLNLocationManager.desiredAccuracy` to a value + > Note: If the value of this property is `CLAccuracyAuthorizationFullAccuracy`, you can set the + ``MLNLocationManager/desiredAccuracy`` property to any value. If the value is + `CLAccuracyAuthorizationReducedAccuracy`, setting ``MLNLocationManager/desiredAccuracy`` to a value other than` kCLLocationAccuracyReduced` has no effect on the location information. */ - (CLAccuracyAuthorization)accuracyAuthorization API_AVAILABLE(ios(14)); @@ -76,7 +76,7 @@ NS_ASSUME_NONNULL_BEGIN The location manager uses this property as a cue to determine when location updates may be automatically paused. - The default value is `CLActivityTypeOther` when `MLNMapView` uses its + The default value is `CLActivityTypeOther` when ``MLNMapView`` uses its default location manager. @see `CLLocationManager.activityType` @@ -95,7 +95,7 @@ NS_ASSUME_NONNULL_BEGIN Requests the user's permission to temporarily use location update services with full accuracy. - @note If the user turned off location accuracy you may use this method to + > Note: If the user turned off location accuracy you may use this method to request full accuracy for a session. */ - (void)requestTemporaryFullAccuracyAuthorizationWithPurposeKey:(NSString *)purposeKey @@ -107,8 +107,8 @@ NS_ASSUME_NONNULL_BEGIN /** The delegate to receive location updates. - Do not set the location manager’s delegate yourself. `MLNMapView` sets this property - after the location manager becomes `MLNMapView`’s location manager. + Do not set the location manager’s delegate yourself. ``MLNMapView`` sets this property + after the location manager becomes ``MLNMapView``’s location manager. */ @property (nonatomic, weak) id delegate; @@ -171,9 +171,9 @@ NS_ASSUME_NONNULL_BEGIN @end /** - The `MLNLocationManagerDelegate` protocol defines a set of methods that respond - to location updates from an `MLNLocationManager` object that is serving as the - location manager of an `MLNMapView`. + The ``MLNLocationManagerDelegate`` protocol defines a set of methods that respond + to location updates from an ``MLNLocationManager`` object that is serving as the + location manager of an ``MLNMapView``. */ @protocol MLNLocationManagerDelegate @@ -185,7 +185,7 @@ NS_ASSUME_NONNULL_BEGIN @param manager The location manager reporting the update. @param locations An array of `CLLocation` objects in chronological order, with the last object representing the most recent location. This array - contains multiple `CLLocation` objects when `MLNMapView` uses its + contains multiple `CLLocation` objects when ``MLNMapView`` uses its default location manager. */ - (void)locationManager:(id)manager diff --git a/platform/darwin/src/MLNLoggingConfiguration.h b/platform/darwin/src/MLNLoggingConfiguration.h index 8d6be8e94..ac6c2c98c 100644 --- a/platform/darwin/src/MLNLoggingConfiguration.h +++ b/platform/darwin/src/MLNLoggingConfiguration.h @@ -51,7 +51,8 @@ typedef NS_ENUM(NSInteger, MLNLoggingLevel) { }; /** - A block to be called once `loggingLevel` is set to a higher value than `MLNLoggingLevelNone`. + A block to be called once `loggingLevel` is set to a higher value than + ``MLNLoggingLevel/MLNLoggingLevelNone``. @param loggingLevel The message logging level. @param filePath The description of the file and method for the calling message. @@ -62,7 +63,7 @@ typedef void (^MLNLoggingBlockHandler)(MLNLoggingLevel loggingLevel, NSString *f NSUInteger line, NSString *message); /** - The `MLNLoggingConfiguration` object provides a global way to set this SDK logging levels + The ``MLNLoggingConfiguration`` object provides a global way to set this SDK logging levels and logging handler. */ MLN_EXPORT @@ -81,7 +82,7 @@ MLN_EXPORT /** The logging level. - The default value is `MLNLoggingLevelNone`. + The default value is ``MLNLoggingLevel/MLNLoggingLevelNone``. Setting this property includes logging levels less than or equal to the setted value. */ diff --git a/platform/darwin/src/MLNMapCamera.h b/platform/darwin/src/MLNMapCamera.h index 437a437d4..cc52c83d4 100644 --- a/platform/darwin/src/MLNMapCamera.h +++ b/platform/darwin/src/MLNMapCamera.h @@ -7,7 +7,7 @@ NS_ASSUME_NONNULL_BEGIN /** - An `MLNMapCamera` object represents a viewpoint from which the user observes + An ``MLNMapCamera`` object represents a viewpoint from which the user observes some point on an ``MLNMapView``. #### Related examples diff --git a/platform/darwin/src/MLNMapSnapshotter.h b/platform/darwin/src/MLNMapSnapshotter.h index b2ba073c4..e0c6c6461 100644 --- a/platform/darwin/src/MLNMapSnapshotter.h +++ b/platform/darwin/src/MLNMapSnapshotter.h @@ -227,7 +227,7 @@ typedef void (^MLNMapSnapshotCompletionHandler)(MLNMapSnapshot *_Nullable snapsh #### Related examples TODO: Create a static map snapshot, learn how to use the - `MLNMapSnapshotter` to generate a static image based on an `MLNMapView` + ``MLNMapSnapshotter`` to generate a static image based on an ``MLNMapSnapshotter`` object's style, camera, and view bounds. */ MLN_EXPORT @@ -267,7 +267,7 @@ MLN_EXPORT /** Starts the snapshot creation and executes the specified blocks with the result on the specified queue. Use this option if you want to add custom drawing on - top of the resulting `MLNMapSnapshot`. + top of the resulting ``MLNMapSnapshot``. @param overlayHandler The block to call after the base map finishes drawing but before certain built-in overlays draw. The block can use Core Graphics to diff --git a/platform/darwin/src/MLNMultiPoint.h b/platform/darwin/src/MLNMultiPoint.h index ff52480ac..0bc716e23 100644 --- a/platform/darwin/src/MLNMultiPoint.h +++ b/platform/darwin/src/MLNMultiPoint.h @@ -7,16 +7,16 @@ NS_ASSUME_NONNULL_BEGIN /** - The `MLNMultiPoint` class is an abstract superclass used to define shapes + The ``MLNMultiPoint`` class is an abstract superclass used to define shapes composed of multiple vertices. - Create instances of `MLNPolyline` or `MLNPolygon` in order to use - properties of `MLNMultiPoint`. Do not create instances of `MLNMultiPoint` + Create instances of ``MLNPolyline`` or ``MLNPolyline`` in order to use + properties of ``MLNMultiPoint``. Do not create instances of ``MLNMultiPoint`` directly and do not create your own subclasses of this class. You can use the method and properties of this class to access information about the vertices of the line or polygon. - Do not confuse `MLNMultiPoint` with `MLNPointCollection`, which represents a + Do not confuse ``MLNMultiPoint`` with ``MLNMultiPoint``, which represents a collection of related but disconnected points. */ MLN_EXPORT @@ -62,8 +62,8 @@ MLN_EXPORT Inserts the given vertices into the shape. If the shape is currently visible on the map as an annotation, it is redrawn - immediately. If the shape is part of an `MLNShapeSource` object, you must - explicitly set the `MLNShapeSource.shape` property in order for any style + immediately. If the shape is part of an ``MLNShapeSource`` object, you must + explicitly set the ``MLNShapeSource/shape`` property in order for any style layers that use the source to be redrawn. @param coords The array of coordinates to insert into the shape. The data in @@ -80,8 +80,8 @@ MLN_EXPORT Appends the given vertices to the shape. If the shape is currently visible on the map as an annotation, it is redrawn - immediately. If the shape is part of an `MLNShapeSource` object, you must - explicitly set the `MLNShapeSource.shape` property in order for any style + immediately. If the shape is part of an ``MLNShapeSource`` object, you must + explicitly set the ``MLNShapeSource/shape`` property in order for any style layers that use the source to be redrawn. @param coords The array of coordinates to add to the shape. The data in this @@ -95,8 +95,8 @@ MLN_EXPORT vertices from a given C array. If the shape is currently visible on the map as an annotation, it is redrawn - immediately. If the shape is part of an `MLNShapeSource` object, you must - explicitly set the `MLNShapeSource.shape` property in order for any style + immediately. If the shape is part of an ``MLNShapeSource`` object, you must + explicitly set the ``MLNShapeSource/shape`` property in order for any style layers that use the source to be redrawn. The number of coordinates in `coords` must be equal to the length of `range`. @@ -122,8 +122,8 @@ MLN_EXPORT of vertices from a given C array. If the shape is currently visible on the map as an annotation, it is redrawn - immediately. If the shape is part of an `MLNShapeSource` object, you must - explicitly set the `MLNShapeSource.shape` property in order for any style + immediately. If the shape is part of an ``MLNShapeSource`` object, you must + explicitly set the ``MLNShapeSource/shape`` property in order for any style layers that use the source to be redrawn. If `count` is greater than the `length` field of `range`, some vertices will @@ -153,8 +153,8 @@ MLN_EXPORT Removes the vertices at the given range from the shape. If the shape is currently visible on the map as an annotation, it is redrawn - immediately. If the shape is part of an `MLNShapeSource` object, you must - explicitly set the `MLNShapeSource.shape` property in order for any style + immediately. If the shape is part of an ``MLNShapeSource`` object, you must + explicitly set the ``MLNShapeSource/shape`` property in order for any style layers that use the source to be redrawn. If `range` extends beyond the shape’s `coordinates` property, an diff --git a/platform/darwin/src/MLNNetworkConfiguration.h b/platform/darwin/src/MLNNetworkConfiguration.h index 62c7af76f..01c0fee46 100644 --- a/platform/darwin/src/MLNNetworkConfiguration.h +++ b/platform/darwin/src/MLNNetworkConfiguration.h @@ -11,14 +11,14 @@ NS_ASSUME_NONNULL_BEGIN /** :nodoc: - Provides an `NSURLSession` object for the specified `MLNNetworkConfiguration`. + Provides an `NSURLSession` object for the specified ``MLNNetworkConfiguration``. This API should be considered experimental, likely to be removed or changed in future releases. This method is called from background threads, i.e. it is not called on the main thread. - @note Background sessions (i.e. created with + > Note: Background sessions (i.e. created with `-[NSURLSessionConfiguration backgroundSessionConfigurationWithIdentifier:]`) and sessions created with a delegate that conforms to `NSURLSessionDataDelegate` are not supported at this time. @@ -27,7 +27,7 @@ NS_ASSUME_NONNULL_BEGIN @end /** - The `MLNNetworkConfiguration` object provides a global way to set a base + The ``MLNNetworkConfiguration`` object provides a global way to set a base `NSURLSessionConfiguration`, and other resources. */ MLN_EXPORT @@ -35,12 +35,12 @@ MLN_EXPORT /** :nodoc: - Delegate for the `MLNNetworkConfiguration` class. + Delegate for the ``MLNNetworkConfiguration`` class. */ @property (nonatomic, weak) id delegate; /** - Returns the shared instance of the `MLNNetworkConfiguration` class. + Returns the shared instance of the ``MLNNetworkConfiguration`` class. */ @property (class, nonatomic, readonly) MLNNetworkConfiguration *sharedManager; @@ -51,14 +51,14 @@ MLN_EXPORT If this property is set to nil or if no session configuration is provided this property is set to the default session configuration. - Assign this object before instantiating any `MLNMapView` object, or using - `MLNOfflineStorage` + Assign this object before instantiating any ``MLNMapView`` object, or using + ``MLNOfflineStorage`` - @note `NSURLSession` objects store a copy of this configuration. Any further changes + > Note: `NSURLSession` objects store a copy of this configuration. Any further changes to mutable properties on this configuration object passed to a session’s initializer will not affect the behavior of that session. - @note Background sessions are not currently supported. + > Note: Background sessions are not currently supported. */ @property (atomic, strong, null_resettable) NSURLSessionConfiguration *sessionConfiguration; diff --git a/platform/darwin/src/MLNOfflinePack.h b/platform/darwin/src/MLNOfflinePack.h index 33857a3a1..567c65e35 100644 --- a/platform/darwin/src/MLNOfflinePack.h +++ b/platform/darwin/src/MLNOfflinePack.h @@ -16,28 +16,28 @@ typedef NS_ENUM(NSInteger, MLNOfflinePackState) { It is unknown whether the pack is inactive, active, or complete. This is the initial state of a pack. The state of a pack becomes known by - the time the shared `MLNOfflineStorage` object sends the first - `MLNOfflinePackProgressChangedNotification` about the pack. For inactive + the time the shared ``MLNOfflineStorage`` object sends the first + ``MLNOfflinePackProgressChangedNotification`` about the pack. For inactive packs, you must explicitly request a progress update using the - `-[MLNOfflinePack requestProgress]` method. + ``MLNOfflinePack/requestProgress`` method. - An invalid pack always has a state of `MLNOfflinePackStateInvalid`, never - `MLNOfflinePackStateUnknown`. + An invalid pack always has a state of ``MLNOfflinePackStateInvalid``, never + ``MLNOfflinePackState/MLNOfflinePackStateUnknown``. */ MLNOfflinePackStateUnknown = 0, /** The pack is incomplete and is not currently downloading. This is the initial state of a pack that is created using the - `-[MLNOfflineStorage addPackForRegion:withContext:completionHandler:]` - method, as well as after the `-[MLNOfflinePack suspend]` method is + ``MLNOfflineStorage/addPackForRegion:withContext:completionHandler:`` + method, as well as after the ``MLNOfflinePack/suspend`` method is called. */ MLNOfflinePackStateInactive = 1, /** The pack is incomplete and is currently downloading. - This is the state of a pack after the `-[MLNOfflinePack resume]` method is + This is the state of a pack after the ``MLNOfflinePack/resume`` method is called. */ MLNOfflinePackStateActive = 2, @@ -47,7 +47,7 @@ typedef NS_ENUM(NSInteger, MLNOfflinePackState) { MLNOfflinePackStateComplete = 3, /** The pack has been removed using the - `-[MLNOfflineStorage removePack:withCompletionHandler:]` method. Sending + ``MLNOfflineStorage/removePack:withCompletionHandler:`` method. Sending any message to the pack will raise an exception. */ MLNOfflinePackStateInvalid = 4, @@ -97,12 +97,12 @@ typedef struct __attribute__((objc_boxable)) MLNOfflinePackProgress { } MLNOfflinePackProgress; /** - An `MLNOfflinePack` represents a collection of resources necessary for viewing + An ``MLNOfflinePack`` represents a collection of resources necessary for viewing a region offline to a local database. - To create an instance of `MLNOfflinePack`, use the - `+[MLNOfflineStorage addPackForRegion:withContext:completionHandler:]` method. - A pack created using `-[MLNOfflinePack init]` is immediately invalid. + To create an instance of ``MLNOfflinePack``, use the + ``MLNOfflineStorage/addPackForRegion:withContext:completionHandler:`` method. + A pack created using `MLNOfflinePack/init` is immediately invalid. ### Example ```swift @@ -158,11 +158,12 @@ MLN_EXPORT The pack’s current state. The state of an inactive or completed pack is computed lazily and is set to - `MLNOfflinePackStateUnknown` by default. To request the pack’s status, use the + ``MLNOfflinePackState/MLNOfflinePackStateUnknown`` by default. To request the pack’s status, use + the `-requestProgress` method. To get notified when the state becomes known and when it changes, observe KVO change notifications on this pack’s `state` key path. Alternatively, you can add an observer for - `MLNOfflinePackProgressChangedNotification`s about this pack that come from the + ``MLNOfflinePackProgressChangedNotification``s about this pack that come from the default notification center. */ @property (nonatomic, readonly) MLNOfflinePackState state; @@ -175,7 +176,7 @@ MLN_EXPORT `-requestProgress` method. To get notified when the progress becomes known and when it changes, observe KVO change notifications on this pack’s `state` key path. Alternatively, you can add an observer for - `MLNOfflinePackProgressChangedNotification`s about this pack that come from the + ``MLNOfflinePackProgressChangedNotification``s about this pack that come from the default notification center. */ @property (nonatomic, readonly) MLNOfflinePackProgress progress; @@ -211,9 +212,9 @@ MLN_EXPORT The state and progress of an inactive or completed pack are computed lazily. If you need the state or progress of a pack whose `state` property is currently - set to `MLNOfflinePackStateUnknown`, observe KVO change notifications on this + set to ``MLNOfflinePackState/MLNOfflinePackStateUnknown``, observe KVO change notifications on this pack’s `state` key path, then call this method. Alternatively, you can add an - observer for `MLNOfflinePackProgressChangedNotification` about this pack that + observer for ``MLNOfflinePackProgressChangedNotification`` about this pack that come from the default notification center. */ - (void)requestProgress; diff --git a/platform/darwin/src/MLNOfflinePack.mm b/platform/darwin/src/MLNOfflinePack.mm index 0e94d60c4..ee24c4020 100644 --- a/platform/darwin/src/MLNOfflinePack.mm +++ b/platform/darwin/src/MLNOfflinePack.mm @@ -20,7 +20,7 @@ const MLNExceptionName MLNInvalidOfflinePackException = @"MLNInvalidOfflinePackE Assert that the current offline pack is valid. This macro should be used at the beginning of any public-facing instance method - of `MLNOfflinePack`. For private methods, an assertion is more appropriate. + of ``MLNOfflinePack``. For private methods, an assertion is more appropriate. */ #define MLNAssertOfflinePackIsValid() \ do { \ diff --git a/platform/darwin/src/MLNOfflineRegion.h b/platform/darwin/src/MLNOfflineRegion.h index bb52445a3..d0b57d5cf 100644 --- a/platform/darwin/src/MLNOfflineRegion.h +++ b/platform/darwin/src/MLNOfflineRegion.h @@ -3,8 +3,8 @@ NS_ASSUME_NONNULL_BEGIN /** - An object conforming to the `MLNOfflineRegion` protocol determines which - resources are required by an `MLNOfflinePack` object. + An object conforming to the ``MLNOfflineRegion`` protocol determines which + resources are required by an ``MLNOfflinePack`` object. */ @protocol MLNOfflineRegion diff --git a/platform/darwin/src/MLNOfflineStorage.h b/platform/darwin/src/MLNOfflineStorage.h index 300ec20bf..0fb1c7d4a 100644 --- a/platform/darwin/src/MLNOfflineStorage.h +++ b/platform/darwin/src/MLNOfflineStorage.h @@ -18,7 +18,7 @@ NS_ASSUME_NONNULL_BEGIN The `object` is the ``MLNOfflinePack`` object whose progress changed. The `userInfo` dictionary contains the pack’s current state in the - `MLNOfflinePackUserInfoKeyState` key and details about the pack’s current + ``MLNOfflinePackUserInfoKeyState`` key and details about the pack’s current progress in the ``MLNOfflinePackUserInfoKeyProgress`` key. You may also consult the ``MLNOfflinePack/state`` and ``MLNOfflinePack/progress`` properties, which provide the same values. @@ -34,7 +34,7 @@ NS_ASSUME_NONNULL_BEGIN FOUNDATION_EXTERN MLN_EXPORT const NSNotificationName MLNOfflinePackProgressChangedNotification; /** - Posted by the shared `MLNOfflineStorage` object whenever an `MLNOfflinePack` + Posted by the shared ``MLNOfflineStorage`` object whenever an ``MLNOfflineStorage`` object encounters an error while downloading. The error may be recoverable and may not warrant the user’s attention. For example, the pack’s implementation may attempt to re-request failed resources based on an exponential backoff @@ -42,7 +42,7 @@ FOUNDATION_EXTERN MLN_EXPORT const NSNotificationName MLNOfflinePackProgressChan The `object` is the ``MLNOfflinePack`` object that encountered the error. The `userInfo` dictionary contains the error object in the - `MLNOfflinePackUserInfoKeyError` key. + ``MLNOfflinePackUserInfoKeyError`` key. */ FOUNDATION_EXTERN MLN_EXPORT const NSNotificationName MLNOfflinePackErrorNotification; @@ -52,7 +52,7 @@ FOUNDATION_EXTERN MLN_EXPORT const NSNotificationName MLNOfflinePackErrorNotific The `object` is the ``MLNOfflinePack`` object that reached the tile limit in the course of downloading. The `userInfo` dictionary contains the tile limit in the - `MLNOfflinePackUserInfoKeyMaximumCount` key. + ``MLNOfflinePackUserInfoKeyMaximumCount`` key. Once this limit is reached, no instance of ``MLNOfflinePack`` can download additional tiles until already downloaded tiles are removed by @@ -70,24 +70,24 @@ typedef NSString *MLNOfflinePackUserInfoKey NS_EXTENSIBLE_STRING_ENUM; The key for an `NSNumber` object that indicates an offline pack’s current state. This key is used in the `userInfo` dictionary of an ``MLNOfflinePackProgressChangedNotification`` notification. Call `-integerValue` - on the object to receive the `MLNOfflinePackState`-typed state. + on the object to receive the ``MLNOfflinePackState``-typed state. */ FOUNDATION_EXTERN MLN_EXPORT const MLNOfflinePackUserInfoKey MLNOfflinePackUserInfoKeyState; /** The key for an `NSValue` object that indicates an offline pack’s current progress. This key is used in the `userInfo` dictionary of an - `MLNOfflinePackProgressChangedNotification` notification. Call + ``MLNOfflinePackProgressChangedNotification`` notification. Call `-MLNOfflinePackProgressValue` on the object to receive the - `MLNOfflinePackProgress`-typed progress. + ``MLNOfflinePackProgress``-typed progress. */ FOUNDATION_EXTERN MLN_EXPORT const MLNOfflinePackUserInfoKey MLNOfflinePackUserInfoKeyProgress; /** The key for an `NSError` object that is encountered in the course of downloading an offline pack. This key is used in the `userInfo` dictionary of - an `MLNOfflinePackErrorNotification` notification. The error’s domain is - `MLNErrorDomain`. See `MLNErrorCode` for possible error codes. + an ``MLNOfflinePackErrorNotification`` notification. The error’s domain is + ``MLNErrorDomain``. See ``MLNErrorDomain`` for possible error codes. */ FOUNDATION_EXTERN MLN_EXPORT const MLNOfflinePackUserInfoKey MLNOfflinePackUserInfoKeyError; @@ -293,10 +293,10 @@ MLN_EXPORT The resulting pack is added to the shared offline storage object’s `packs` property, then the `completion` block is executed with that pack passed in. - The pack has an initial state of `MLNOfflinePackStateInactive`. To begin - downloading resources, call `-[MLNOfflinePack resume]` on the pack from within + The pack has an initial state of ``MLNOfflinePackState/MLNOfflinePackStateInactive``. To begin + downloading resources, call ``MLNOfflinePack/resume`` on the pack from within the completion handler. To monitor download progress, add an observer for - `MLNOfflinePackProgressChangedNotification`s about that pack. + ``MLNOfflinePackProgressChangedNotification``s about that pack. To detect when any call to this method results in a new pack, observe KVO change notifications on the shared offline storage object’s `packs` key path. diff --git a/platform/darwin/src/MLNOverlay.h b/platform/darwin/src/MLNOverlay.h index aa4b03b24..d61449969 100644 --- a/platform/darwin/src/MLNOverlay.h +++ b/platform/darwin/src/MLNOverlay.h @@ -7,7 +7,7 @@ NS_ASSUME_NONNULL_BEGIN /** - The `MLNOverlay` protocol defines a specific type of annotation that represents + The ``MLNOverlay`` protocol defines a specific type of annotation that represents both a point and an area on a map. Overlay objects are essentially data objects that contain the geographic data needed to represent the map area. Overlays can take the form of a polyline or polygon. diff --git a/platform/darwin/src/MLNPointAnnotation.h b/platform/darwin/src/MLNPointAnnotation.h index a58158feb..877fd9f78 100644 --- a/platform/darwin/src/MLNPointAnnotation.h +++ b/platform/darwin/src/MLNPointAnnotation.h @@ -7,29 +7,29 @@ NS_ASSUME_NONNULL_BEGIN /** - An `MLNPointAnnotation` object represents a one-dimensional shape located at a + An ``MLNPointAnnotation`` object represents a one-dimensional shape located at a single geographical coordinate. Depending on how it is used, an - `MLNPointAnnotation` object is known as a point annotation or point shape. For + ``MLNPointAnnotation`` object is known as a point annotation or point shape. For example, you could use a point shape to represent a city at low zoom levels, an address at high zoom levels, or the location of a long press gesture. - You can add point shapes to the map by adding them to an `MLNShapeSource` - object. Configure the appearance of an `MLNShapeSource`’s or - `MLNVectorTileSource`’s point shapes collectively using an `MLNCircleStyleLayer` or - `MLNSymbolStyleLayer` object. + You can add point shapes to the map by adding them to an ``MLNShapeSource`` + object. Configure the appearance of an ``MLNShapeSource``’s or + ``MLNVectorTileSource``’s point shapes collectively using an ``MLNVectorTileSource`` or + ``MLNSymbolStyleLayer`` object. For more interactivity, add a selectable point annotation to a map view using - the `-[MLNMapView addAnnotation:]` method. Alternatively, define your own model - class that conforms to the `MLNAnnotation` protocol. Configure a point + the ``MLNMapView/addAnnotation:`` method. Alternatively, define your own model + class that conforms to the ``MLNAnnotation`` protocol. Configure a point annotation’s appearance using - `-[MLNMapViewDelegate mapView:imageForAnnotation:]` or - `-[MLNMapViewDelegate mapView:viewForAnnotation:]` (iOS only). A point - annotation’s `MLNShape.title` and `MLNShape.subtitle` properties define the + ``MLNMapViewDelegate/mapView:imageForAnnotation:`` or + ``MLNMapViewDelegate/mapView:viewForAnnotation:`` (iOS only). A point + annotation’s ``MLNShape/title`` and ``MLNShape/title`` properties define the default content of the annotation’s callout (on iOS) or popover (on macOS). To group multiple related points together in one shape, use an - `MLNPointCollection` or `MLNShapeCollection` object. To access - a point’s attributes, use an `MLNPointFeature` object. + ``MLNPointCollection`` or ``MLNPointCollection`` object. To access + a point’s attributes, use an ``MLNPointFeature`` object. A point shape is known as a Point geometry @@ -39,7 +39,7 @@ NS_ASSUME_NONNULL_BEGIN TODO: Mark a place on the map with an annotation TODO: Mark a place on the map with an image TODO: Default callout usage - Learn how to add `MLNPointAnnotation` objects to your map. + Learn how to add ``MLNPointAnnotation`` objects to your map. */ MLN_EXPORT @interface MLNPointAnnotation : MLNShape diff --git a/platform/darwin/src/MLNPointCollection.h b/platform/darwin/src/MLNPointCollection.h index 4fd68938a..61feb1d30 100644 --- a/platform/darwin/src/MLNPointCollection.h +++ b/platform/darwin/src/MLNPointCollection.h @@ -6,33 +6,33 @@ #import "MLNShape.h" /** - An `MLNPointCollection` object represents a shape consisting of one or more + An ``MLNPointCollection`` object represents a shape consisting of one or more disconnected vertices, specified as `CLLocationCoordinate2D` instances. The points in the collection may be related but are not connected spatially. For example, you could use a point collection to represent all the trees in an orchard. - You can add point collections to the map by adding them to an `MLNShapeSource` - object. Configure the appearance of an `MLNShapeSource`’s or - `MLNVectorTileSource`’s point collections collectively using an - `MLNCircleStyleLayer` or `MLNSymbolStyleLayer` object. To access a point - collection’s attributes, use an `MLNPointCollectionFeature` object. + You can add point collections to the map by adding them to an ``MLNShapeSource`` + object. Configure the appearance of an ``MLNShapeSource``’s or + ``MLNVectorTileSource``’s point collections collectively using an + ``MLNCircleStyleLayer`` or ``MLNCircleStyleLayer`` object. To access a point + collection’s attributes, use an ``MLNPointCollectionFeature`` object. - You cannot add an `MLNPointCollection` object directly to a map view as an - annotation. However, you can create individual `MLNPointAnnotation` objects + You cannot add an ``MLNPointCollection`` object directly to a map view as an + annotation. However, you can create individual ``MLNPointAnnotation`` objects from the `coordinates` array and add those annotation objects to the map view - using the `-[MLNMapView addAnnotations:]` method. + using the ``MLNMapView/addAnnotations:`` method. A point collection is known as a MultiPoint - geometry in GeoJSON. Do not confuse `MLNPointCollection` with `MLNMultiPoint`, - the abstract superclass of `MLNPolyline` and `MLNPolygon`. + geometry in GeoJSON. Do not confuse ``MLNPointCollection`` with ``MLNPointCollection``, + the abstract superclass of ``MLNPolyline`` and ``MLNPolyline``. */ MLN_EXPORT @interface MLNPointCollection : MLNShape /** - Creates and returns a `MLNPointCollection` object from the specified set of + Creates and returns a ``MLNPointCollection`` object from the specified set of coordinates. @param coords The array of coordinates defining the shape. The data in this diff --git a/platform/darwin/src/MLNPolygon.h b/platform/darwin/src/MLNPolygon.h index b0bbde441..7b5f3f2bc 100644 --- a/platform/darwin/src/MLNPolygon.h +++ b/platform/darwin/src/MLNPolygon.h @@ -10,44 +10,44 @@ NS_ASSUME_NONNULL_BEGIN /** - An `MLNPolygon` object represents a closed shape consisting of four or more + An ``MLNPolygon`` object represents a closed shape consisting of four or more vertices, specified as `CLLocationCoordinate2D` instances, and the edges that connect them. For example, you could use a polygon shape to represent a building, a lake, or an area you want to highlight. - You can add polygon shapes to the map by adding them to an `MLNShapeSource` - object. Configure the appearance of an `MLNShapeSource`’s or - `MLNVectorTileSource`’s polygons collectively using an `MLNFillStyleLayer` or - `MLNSymbolStyleLayer` object. To access a polygon’s attributes, use an - `MLNPolygonFeature` object. + You can add polygon shapes to the map by adding them to an ``MLNShapeSource`` + object. Configure the appearance of an ``MLNShapeSource``’s or + ``MLNVectorTileSource``’s polygons collectively using an ``MLNVectorTileSource`` or + ``MLNSymbolStyleLayer`` object. To access a polygon’s attributes, use an + ``MLNPolygonFeature`` object. Alternatively, you can add a polygon overlay directly to a map view using the - `-[MLNMapView addAnnotation:]` or `-[MLNMapView addOverlay:]` method. Configure + ``MLNMapView/addAnnotation:`` or ``MLNMapView/addOverlay:`` method. Configure a polygon overlay’s appearance using - `-[MLNMapViewDelegate mapView:strokeColorForShapeAnnotation:]` and - `-[MLNMapViewDelegate mapView:fillColorForPolygonAnnotation:]`. + ``MLNMapViewDelegate/mapView:strokeColorForShapeAnnotation:`` and + ``MLNMapViewDelegate/mapView:fillColorForPolygonAnnotation:``. The vertices are automatically connected in the order in which you provide them. You should close the polygon by specifying the same `CLLocationCoordinate2D` as the first and last vertices; otherwise, the polygon’s fill may not cover the area you expect it to. To avoid filling the space within the shape, give the polygon a transparent fill or use an - `MLNPolyline` object. + ``MLNPolyline`` object. A polygon may have one or more interior polygons, or holes, that you specify as - `MLNPolygon` objects with the `+polygonWithCoordinates:count:interiorPolygons:` + ``MLNPolygon`` objects with the `+polygonWithCoordinates:count:interiorPolygons:` method. For example, if a polygon represents a lake, it could exclude an island within the lake using an interior polygon. Interior polygons may not themselves have interior polygons. To represent a shape that includes a polygon within a hole or, more generally, to group multiple polygons together in one shape, use - an `MLNMultiPolygon` or `MLNShapeCollection` object. + an ``MLNMultiPolygon`` or ``MLNMultiPolygon`` object. To make the polygon straddle the antimeridian, specify some longitudes less than −180 degrees or greater than 180 degrees. #### Related examples TODO: Add a polygon annotation, learn how to initialize an - `MLNPolygon` object from an array of coordinates. + ``MLNPolygon`` object from an array of coordinates. */ MLN_EXPORT @interface MLNPolygon : MLNMultiPoint @@ -64,7 +64,7 @@ MLN_EXPORT @property (nonatomic, nullable, readonly) NSArray *interiorPolygons; /** - Creates and returns an `MLNPolygon` object from the specified set of + Creates and returns an ``MLNPolygon`` object from the specified set of coordinates. @param coords The array of coordinates defining the shape. The data in this @@ -76,13 +76,13 @@ MLN_EXPORT count:(NSUInteger)count; /** - Creates and returns an `MLNPolygon` object from the specified set of + Creates and returns an ``MLNPolygon`` object from the specified set of coordinates and interior polygons. @param coords The array of coordinates defining the shape. The data in this array is copied to the new object. @param count The number of items in the `coords` array. - @param interiorPolygons An array of `MLNPolygon` objects that define regions + @param interiorPolygons An array of ``MLNPolygon`` objects that define regions excluded from the overall shape. If this array is `nil` or empty, the shape is considered to have no interior polygons. @return A new polygon object. @@ -94,20 +94,20 @@ MLN_EXPORT @end /** - An `MLNMultiPolygon` object represents a shape consisting of one or more + An ``MLNMultiPolygon`` object represents a shape consisting of one or more polygons that do not overlap. For example, you could use a multipolygon shape to represent the body of land that consists of an island surrounded by an - atoll: the inner island would be one `MLNPolygon` object, while the surrounding + atoll: the inner island would be one ``MLNPolygon`` object, while the surrounding atoll would be another. You could also use a multipolygon shape to represent a group of disconnected but related buildings. You can add multipolygon shapes to the map by adding them to an - `MLNShapeSource` object. Configure the appearance of an `MLNShapeSource`’s or - `MLNVectorTileSource`’s multipolygons collectively using an `MLNFillStyleLayer` - or `MLNSymbolStyleLayer` object. + ``MLNShapeSource`` object. Configure the appearance of an ``MLNShapeSource``’s or + ``MLNVectorTileSource``’s multipolygons collectively using an ``MLNVectorTileSource`` + or ``MLNSymbolStyleLayer`` object. - You cannot add an `MLNMultiPolygon` object directly to a map view using - `-[MLNMapView addAnnotation:]` or `-[MLNMapView addOverlay:]`. However, you can + You cannot add an ``MLNMultiPolygon`` object directly to a map view using + ``MLNMapView/addAnnotation:`` or ``MLNMapView/addOverlay:``. However, you can add the `polygons` array’s items as overlays individually. */ MLN_EXPORT diff --git a/platform/darwin/src/MLNPolyline.h b/platform/darwin/src/MLNPolyline.h index 98ec8ca23..d9c0e87bc 100644 --- a/platform/darwin/src/MLNPolyline.h +++ b/platform/darwin/src/MLNPolyline.h @@ -10,7 +10,7 @@ NS_ASSUME_NONNULL_BEGIN /** - An `MLNPolyline` object represents a shape consisting of two or more vertices, + An ``MLNPolyline`` object represents a shape consisting of two or more vertices, specified as `CLLocationCoordinate2D` instances, and the line segments that connect them. For example, you could use an polyline to represent a road or the path along which something moves. @@ -60,7 +60,7 @@ MLN_EXPORT @interface MLNPolyline : MLNMultiPoint /** - Creates and returns an `MLNPolyline` object from the specified set of + Creates and returns an ``MLNPolyline`` object from the specified set of coordinates. @param coords The array of coordinates defining the shape. The data in this @@ -77,10 +77,10 @@ MLN_EXPORT An ``MLNMultiPolyline`` object represents a shape consisting of one or more polylines. For example, you could use a multipolyline shape to represent both sides of a divided highway (dual carriageway), excluding the median (central - reservation): each carriageway would be a distinct `MLNPolyline` object. + reservation): each carriageway would be a distinct ``MLNPolyline`` object. You can add multipolyline shapes to the map by adding them to an - ``MLNShapeSource`` object. Configure the appearance of an `MLNShapeSource`’s or + ``MLNShapeSource`` object. Configure the appearance of an ``MLNShapeSource``’s or ``MLNVectorTileSource``’s multipolylines collectively using an ``MLNLineStyleLayer`` or ``MLNSymbolStyleLayer`` object. diff --git a/platform/darwin/src/MLNRasterDEMSource.h b/platform/darwin/src/MLNRasterDEMSource.h index a81aa5bc4..5793ca0ed 100644 --- a/platform/darwin/src/MLNRasterDEMSource.h +++ b/platform/darwin/src/MLNRasterDEMSource.h @@ -5,33 +5,33 @@ /** An `NSNumber` object containing an unsigned integer that specifies the encoding formula for raster-dem tilesets. The integer corresponds to one of - the constants described in `MLNDEMEncoding`. + the constants described in ``MLNDEMEncoding``. - The default value for this option is `MLNDEMEncodingMapbox`. + The default value for this option is ``MLNDEMEncoding/MLNDEMEncodingMapbox``. This option cannot be represented in a TileJSON or style JSON file. It is used - with the `MLNRasterDEMSource` class and is ignored when creating an - `MLNRasterTileSource` or `MLNVectorTileSource` object. + with the ``MLNRasterDEMSource`` class and is ignored when creating an + ``MLNRasterTileSource`` or ``MLNRasterTileSource`` object. */ FOUNDATION_EXTERN MLN_EXPORT const MLNTileSourceOption MLNTileSourceOptionDEMEncoding; /** - `MLNRasterDEMSource` is a map content source that supplies rasterized + ``MLNRasterDEMSource`` is a map content source that supplies rasterized digital elevation model (DEM) tiles to be shown on the map. The location of and metadata about the tiles are defined either by an option dictionary or by an external file that conforms to the TileJSON specification. - A raster DEM source is added to an `MLNStyle` object along with one or more - `MLNHillshadeStyleLayer` objects. Use a hillshade style layer to control the + A raster DEM source is added to an ``MLNStyle`` object along with one or more + ``MLNHillshadeStyleLayer`` objects. Use a hillshade style layer to control the appearance of content supplied by the raster DEM source. Each raster-dem source defined by the style JSON file is represented at runtime by an - `MLNRasterDEMSource` object that you can use to initialize new style layers. + ``MLNRasterDEMSource`` object that you can use to initialize new style layers. You can also add and remove sources dynamically using methods such as - `-[MLNStyle addSource:]` and `-[MLNStyle sourceWithIdentifier:]`. + ``MLNStyle/addSource:`` and ``MLNStyle/sourceWithIdentifier:``. Currently, raster DEM sources only support the format used by TileJSON specification. - A raster tile source is added to an `MLNStyle` object along with one or more - `MLNRasterStyleLayer` objects. Use a raster style layer to control the + A raster tile source is added to an ``MLNStyle`` object along with one or more + ``MLNRasterStyleLayer`` objects. Use a raster style layer to control the appearance of content supplied by the raster tile source. Each raster source defined by the style JSON file is represented at runtime by an - `MLNRasterTileSource` object that you can use to initialize new style layers. You + ``MLNRasterTileSource`` object that you can use to initialize new style layers. You can also add and remove sources dynamically using methods such as - `-[MLNStyle addSource:]` and `-[MLNStyle sourceWithIdentifier:]`. + ``MLNStyle/addSource:`` and ``MLNStyle/sourceWithIdentifier:``. ### Example @@ -55,8 +55,8 @@ FOUNDATION_EXTERN MLN_EXPORT const MLNTileSourceOption MLNTileSourceOptionTileSi ``` #### Related examples - TODO: Add raster imagery, learn how to add a `MLNRasterStyleLayer` - to your map using an `MLNRasterTileSource`. + TODO: Add raster imagery, learn how to add a ``MLNRasterStyleLayer`` + to your map using an ``MLNRasterTileSource``. */ MLN_EXPORT @interface MLNRasterTileSource : MLNTileSource @@ -68,7 +68,7 @@ MLN_EXPORT URL. After initializing and configuring the source, add it to a map view’s style - using the `-[MLNStyle addSource:]` method. + using the ``MLNStyle/addSource:`` method. The URL may be a full HTTP or HTTPS URL or canonical URL. The URL should point to a JSON file that conforms to the @@ -76,7 +76,7 @@ MLN_EXPORT If a Mapbox URL is specified, this source uses a tile size of 256. For all other tilesets, the default value is 512. (See the - `MLNTileSourceOptionTileSize` documentation for more information about tile + ``MLNTileSourceOptionTileSize`` documentation for more information about tile sizes.) If you need to use a tile size other than the default, use the `-initWithIdentifier:configurationURL:tileSize:` method. @@ -94,7 +94,7 @@ MLN_EXPORT and tile size. After initializing and configuring the source, add it to a map view’s style - using the `-[MLNStyle addSource:]` method. + using the ``MLNStyle/addSource:`` method. The URL may be a full HTTP or HTTPS URL or, canonical URL. The URL should point to a JSON file that conforms to the @@ -105,7 +105,7 @@ MLN_EXPORT @param configurationURL A URL to a TileJSON configuration file describing the source’s contents and other metadata. @param tileSize The width and height (measured in points) of each tiled image - in the raster tile source. See the `MLNTileSourceOptionTileSize` + in the raster tile source. See the ``MLNTileSourceOptionTileSize`` documentation for details. @return An initialized raster tile source. */ @@ -122,14 +122,14 @@ MLN_EXPORT guide for information about the format of a tile URL template. After initializing and configuring the source, add it to a map view’s style - using the `-[MLNStyle addSource:]` method. + using the ``MLNStyle/addSource:`` method. @param identifier A string that uniquely identifies the source in the style to which it is added. @param tileURLTemplates An array of tile URL template strings. Only the first string is used; any additional strings are ignored. @param options A dictionary containing configuration options. See - `MLNTileSourceOption` for available keys and values. Pass in `nil` to use + ``MLNTileSourceOption`` for available keys and values. Pass in `nil` to use the default values. @return An initialized tile source. */ diff --git a/platform/darwin/src/MLNRendererConfiguration.h b/platform/darwin/src/MLNRendererConfiguration.h index 3bda166ab..b99bd6731 100644 --- a/platform/darwin/src/MLNRendererConfiguration.h +++ b/platform/darwin/src/MLNRendererConfiguration.h @@ -20,7 +20,7 @@ MLN_EXPORT /** The name of the font family to use for client-side text rendering of CJK ideographs. - Set MLNIdeographicFontFamilyName in your containing application's Info.plist to + Set `MLNIdeographicFontFamilyName` in your containing application's Info.plist to font family name(s) that will be available at run time, such as “PingFang TC” or “Marker Felt”. This plist key accepts: diff --git a/platform/darwin/src/MLNSettings.h b/platform/darwin/src/MLNSettings.h index 66cc0c7f5..72a628983 100644 --- a/platform/darwin/src/MLNSettings.h +++ b/platform/darwin/src/MLNSettings.h @@ -24,7 +24,7 @@ typedef NS_ENUM(NSUInteger, MLNWellKnownTileServer) { }; /** - The `MLNSettings` object provides a global way to set SDK properties such + The ``MLNSettings`` object provides a global way to set SDK properties such as apiKey, backend URL, etc. */ MLN_EXPORT @@ -43,10 +43,10 @@ MLN_EXPORT The API Key used by all instances of ``MLNMapView`` in the current application. Setting this property to a value of `nil` has no effect. - @note You must set the API key before attempting to load any style which + > Note: You must set the API key before attempting to load any style which requires the token. Therefore, you should generally set it before creating an instance of ``MLNMapView``. The recommended way to set an api key is to add an entry - to your application’s Info.plist file with the key `MLNApiKey` + to your application’s Info.plist file with the key `MLNApiKey`` and the type `String`. Alternatively, you may call this method from your application delegate’s `-applicationDidFinishLaunching:` method. */ diff --git a/platform/darwin/src/MLNSettings_Private.h b/platform/darwin/src/MLNSettings_Private.h index 591fade17..fae2adff3 100644 --- a/platform/darwin/src/MLNSettings_Private.h +++ b/platform/darwin/src/MLNSettings_Private.h @@ -6,7 +6,7 @@ NS_ASSUME_NONNULL_BEGIN @interface MLNSettings (Private) -/// Returns the shared instance of the `MLNSettings` class. +/// Returns the shared instance of the ``MLNSettings`` class. @property (class, nonatomic, readonly) MLNSettings *sharedSettings; /// The current global access token. diff --git a/platform/darwin/src/MLNShape.h b/platform/darwin/src/MLNShape.h index 151abb176..6041a6a09 100644 --- a/platform/darwin/src/MLNShape.h +++ b/platform/darwin/src/MLNShape.h @@ -6,13 +6,13 @@ NS_ASSUME_NONNULL_BEGIN /** - `MLNShape` is an abstract class that represents a shape or annotation. Shapes + ``MLNShape`` is an abstract class that represents a shape or annotation. Shapes constitute the content of a map — not only the overlays atop the map, but also the content that forms the base map. - Create instances of `MLNPointAnnotation`, `MLNPointCollection`, `MLNPolyline`, - `MLNMultiPolyline`, `MLNPolygon`, `MLNMultiPolygon`, or `MLNShapeCollection` in - order to use `MLNShape`'s methods. Do not create instances of `MLNShape` + Create instances of ``MLNPointAnnotation``, ``MLNPointAnnotation``, ``MLNPointAnnotation``, + ``MLNMultiPolyline``, ``MLNMultiPolyline``, ``MLNMultiPolyline``, or ``MLNMultiPolyline`` in + order to use ``MLNShape``'s methods. Do not create instances of ``MLNShape`` directly, and do not create your own subclasses of this class. The shape classes correspond to the Geometry object @@ -20,20 +20,20 @@ NS_ASSUME_NONNULL_BEGIN compatibility. Although you do not create instances of this class directly, you can use its - `+[MLNShape shapeWithData:encoding:error:]` factory method to create one of the - concrete subclasses of `MLNShape` noted above from GeoJSON data. To access a - shape’s attributes, use the corresponding `MLNFeature` class instead. + ``MLNShape/shapeWithData:encoding:error:`` factory method to create one of the + concrete subclasses of ``MLNShape`` noted above from GeoJSON data. To access a + shape’s attributes, use the corresponding ``MLNFeature`` class instead. - You can add shapes to the map by adding them to an `MLNShapeSource` object. - Configure the appearance of an `MLNShapeSource`’s or `MLNVectorTileSource`’s - shapes collectively using a concrete instance of `MLNVectorStyleLayer`. + You can add shapes to the map by adding them to an ``MLNShapeSource`` object. + Configure the appearance of an ``MLNShapeSource``’s or ``MLNShapeSource``’s + shapes collectively using a concrete instance of ``MLNVectorStyleLayer``. Alternatively, you can add some kinds of shapes directly to a map view as annotations or overlays. - You can filter the features in a `MLNVectorStyleLayer` or vary their layout or - paint attributes based on the features’ geographies. Pass an `MLNShape` into an + You can filter the features in a ``MLNVectorStyleLayer`` or vary their layout or + paint attributes based on the features’ geographies. Pass an ``MLNShape`` into an `NSPredicate` with the format `SELF IN %@` or `%@ CONTAINS SELF` and set the - `MLNVectorStyleLayer.predicate` property to that predicate, or set a layout or + ``MLNVectorStyleLayer/predicate`` property to that predicate, or set a layout or paint attribute to a similarly formatted `NSExpression`. */ MLN_EXPORT @@ -42,14 +42,14 @@ MLN_EXPORT // MARK: Creating a Shape /** - Returns an `MLNShape` object initialized with the given data interpreted as a + Returns an ``MLNShape`` object initialized with the given data interpreted as a string containing a GeoJSON object. If the GeoJSON object is a geometry, the returned value is a kind of - `MLNShape`. If it is a feature object, the returned value is a kind of - `MLNShape` that conforms to the `MLNFeature` protocol. If it is a feature + ``MLNShape``. If it is a feature object, the returned value is a kind of + ``MLNShape`` that conforms to the ``MLNShape`` protocol. If it is a feature collection object, the returned value is an instance of - `MLNShapeCollectionFeature`. + ``MLNShapeCollectionFeature``. ### Example @@ -64,7 +64,7 @@ MLN_EXPORT @param encoding The encoding used by `data`. @param outError Upon return, if an error has occurred, a pointer to an `NSError` object describing the error. Pass in `NULL` to ignore any error. - @return An `MLNShape` object representation of `data`, or `nil` if `data` could + @return An ``MLNShape`` object representation of `data`, or `nil` if `data` could not be parsed as valid GeoJSON source code. If `nil`, `outError` contains an `NSError` object describing the problem. */ @@ -79,9 +79,9 @@ MLN_EXPORT The default value of this property is `nil`. - This property is ignored when the shape is used in an `MLNShapeSource`. To name - a shape used in a shape source, create an `MLNFeature` and add an attribute to - the `MLNFeature.attributes` property. + This property is ignored when the shape is used in an ``MLNShapeSource``. To name + a shape used in a shape source, create an ``MLNFeature`` and add an attribute to + the ``MLNFeature/attributes`` property. */ @property (nonatomic, copy, nullable) NSString *title; @@ -89,9 +89,9 @@ MLN_EXPORT The subtitle of the shape annotation. The default value of this property is `nil`. - This property is ignored when the shape is used in an `MLNShapeSource`. To + This property is ignored when the shape is used in an ``MLNShapeSource``. To provide additional information about a shape used in a shape source, create an - `MLNFeature` and add an attribute to the `MLNFeature.attributes` property. + ``MLNFeature`` and add an attribute to the ``MLNFeature/attributes`` property. */ @property (nonatomic, copy, nullable) NSString *subtitle; @@ -102,7 +102,7 @@ MLN_EXPORT The default value of this property is `nil`. - This property is ignored when the shape is used in an `MLNShapeSource`. + This property is ignored when the shape is used in an ``MLNShapeSource``. */ @property (nonatomic, copy, nullable) NSString *toolTip; diff --git a/platform/darwin/src/MLNShapeCollection.h b/platform/darwin/src/MLNShapeCollection.h index b0e3b8eee..ee4331516 100644 --- a/platform/darwin/src/MLNShapeCollection.h +++ b/platform/darwin/src/MLNShapeCollection.h @@ -8,27 +8,27 @@ NS_ASSUME_NONNULL_BEGIN /** - An `MLNShapeCollection` object represents a shape consisting of zero or more - distinct but related shapes that are instances of `MLNShape`. The constituent + An ``MLNShapeCollection`` object represents a shape consisting of zero or more + distinct but related shapes that are instances of ``MLNShape``. The constituent shapes can be a mixture of different kinds of shapes. - `MLNShapeCollection` is most commonly used to add multiple shapes to a single - `MLNShapeSource`. Configure the appearance of an `MLNShapeSource`’s or - `MLNVectorTileSource`’s shape collection collectively using an - `MLNSymbolStyleLayer` object, or use multiple instances of - `MLNCircleStyleLayer`, `MLNFillStyleLayer`, and `MLNLineStyleLayer` to + ``MLNShapeCollection`` is most commonly used to add multiple shapes to a single + ``MLNShapeSource``. Configure the appearance of an ``MLNShapeSource``’s or + ``MLNVectorTileSource``’s shape collection collectively using an + ``MLNSymbolStyleLayer`` object, or use multiple instances of + ``MLNCircleStyleLayer``, ``MLNCircleStyleLayer``, and ``MLNCircleStyleLayer`` to configure the appearance of each kind of shape inside the collection. - You cannot add an `MLNShapeCollection` object directly to a map view as an - annotation. However, you can create individual `MLNPointAnnotation`, - `MLNPolyline`, and `MLNPolygon` objects from the `shapes` array and add those - annotation objects to the map view using the `-[MLNMapView addAnnotations:]` + You cannot add an ``MLNShapeCollection`` object directly to a map view as an + annotation. However, you can create individual ``MLNPointAnnotation``, + ``MLNPolyline``, and ``MLNPolyline`` objects from the `shapes` array and add those + annotation objects to the map view using the ``MLNMapView/addAnnotations:`` method. To represent a collection of point, polyline, or polygon shapes, it may be more - convenient to use an `MLNPointCollection`, `MLNMultiPolyline`, or - `MLNMultiPolygon` object, respectively. To access a shape collection’s - attributes, use the corresponding `MLNFeature` object. + convenient to use an ``MLNPointCollection``, ``MLNPointCollection``, or + ``MLNMultiPolygon`` object, respectively. To access a shape collection’s + attributes, use the corresponding ``MLNFeature`` object. A shape collection is known as a GeometryCollection diff --git a/platform/darwin/src/MLNShapeOfflineRegion.h b/platform/darwin/src/MLNShapeOfflineRegion.h index 7f20fc8e9..77a97721f 100644 --- a/platform/darwin/src/MLNShapeOfflineRegion.h +++ b/platform/darwin/src/MLNShapeOfflineRegion.h @@ -39,14 +39,14 @@ MLN_EXPORT /** The minimum zoom level for which to download tiles and other resources. - For more information about zoom levels, `-[MLNMapView zoomLevel]`. + For more information about zoom levels, ``MLNMapView/zoomLevel``. */ @property (nonatomic, readonly) double minimumZoomLevel; /** The maximum zoom level for which to download tiles and other resources. - For more information about zoom levels, `-[MLNMapView zoomLevel]`. + For more information about zoom levels, ``MLNMapView/zoomLevel``. */ @property (nonatomic, readonly) double maximumZoomLevel; @@ -56,7 +56,7 @@ MLN_EXPORT Initializes a newly created offline region with the given style URL, geometry, and range of zoom levels. - This is the designated initializer for `MLNShapeOfflineRegion`. + This is the designated initializer for ``MLNShapeOfflineRegion``. @param styleURL URL of the map style for which to download resources. The URL may be a full HTTP or HTTPS URL or a canonical URL. diff --git a/platform/darwin/src/MLNShapeSource.h b/platform/darwin/src/MLNShapeSource.h index 595a6c901..c5e981eb2 100644 --- a/platform/darwin/src/MLNShapeSource.h +++ b/platform/darwin/src/MLNShapeSource.h @@ -10,7 +10,7 @@ NS_ASSUME_NONNULL_BEGIN @class MLNShape; /** - Options for `MLNShapeSource` objects. + Options for ``MLNShapeSource`` objects. */ typedef NSString *MLNShapeSourceOption NS_STRING_ENUM; @@ -24,13 +24,13 @@ typedef NSString *MLNShapeSourceOption NS_STRING_ENUM; href="https://maplibre.org/maplibre-style-spec/#sources-geojson-cluster">cluster source property in the MapLibre Style Spec. - This option only affects point features within an `MLNShapeSource` object; it - is ignored when creating an `MLNComputedShapeSource` object. + This option only affects point features within an ``MLNShapeSource`` object; it + is ignored when creating an ``MLNComputedShapeSource`` object. #### Related examples TODO: Cluster point data TODO: Use images to cluster point data - Learn how to cluster point data with this `MLNShapeSourceOption`. + Learn how to cluster point data with this ``MLNShapeSourceOption``. */ FOUNDATION_EXTERN MLN_EXPORT const MLNShapeSourceOption MLNShapeSourceOptionClustered; @@ -39,8 +39,8 @@ FOUNDATION_EXTERN MLN_EXPORT const MLNShapeSourceOption MLNShapeSourceOptionClus cluster if clustering is enabled. A value of 512 produces a radius equal to the width of a tile. The default value is 50. - This option only affects point features within an `MLNShapeSource` object; it - is ignored when creating an `MLNComputedShapeSource` object. + This option only affects point features within an ``MLNShapeSource`` object; it + is ignored when creating an ``MLNComputedShapeSource`` object. */ FOUNDATION_EXTERN MLN_EXPORT const MLNShapeSourceOption MLNShapeSourceOptionClusterRadius; @@ -73,14 +73,14 @@ FOUNDATION_EXTERN MLN_EXPORT const MLNShapeSourceOption MLNShapeSourceOptionClus href="https://maplibre.org/maplibre-style-spec/#sources-geojson-clusterProperties">clusterProperties source property in the MapLibre Style Spec. - This option only affects point features within an `MLNShapeSource` object; it - is ignored when creating an `MLNComputedShapeSource` object. + This option only affects point features within an ``MLNShapeSource`` object; it + is ignored when creating an ``MLNComputedShapeSource`` object. */ FOUNDATION_EXTERN MLN_EXPORT const MLNShapeSourceOption MLNShapeSourceOptionClusterProperties; /** An `NSNumber` object containing an integer; specifies the maximum zoom level at which to cluster points if clustering is enabled. Defaults to one zoom level - less than the value of `MLNShapeSourceOptionMaximumZoomLevel` so that, at the + less than the value of ``MLNShapeSourceOptionMaximumZoomLevel`` so that, at the maximum zoom level, the shapes are not clustered. This option corresponds to the @@ -88,8 +88,8 @@ FOUNDATION_EXTERN MLN_EXPORT const MLNShapeSourceOption MLNShapeSourceOptionClus href="https://maplibre.org/maplibre-style-spec/#sources-geojson-clusterMaxZoom">clusterMaxZoom source property in the MapLibre Style Spec. - This option only affects point features within an `MLNShapeSource` object; it - is ignored when creating an `MLNComputedShapeSource` object. + This option only affects point features within an ``MLNShapeSource`` object; it + is ignored when creating an ``MLNComputedShapeSource`` object. */ FOUNDATION_EXTERN MLN_EXPORT const MLNShapeSourceOption MLNShapeSourceOptionMaximumZoomLevelForClustering; @@ -144,7 +144,7 @@ FOUNDATION_EXTERN MLN_EXPORT const MLNShapeSourceOption MLNShapeSourceOptionSimp /** An `NSNumber` object containing a Boolean enabling or disabling calculating line distance metrics. - Set this property to `YES` in order for the `MLNLineStyleLayer.lineGradient` property to have its + Set this property to `YES` in order for the ``MLNLineStyleLayer/lineGradient`` property to have its intended effect. The default value is `NO`. This option corresponds to the @@ -155,25 +155,25 @@ FOUNDATION_EXTERN MLN_EXPORT const MLNShapeSourceOption MLNShapeSourceOptionSimp FOUNDATION_EXTERN MLN_EXPORT const MLNShapeSourceOption MLNShapeSourceOptionLineDistanceMetrics; /** - `MLNShapeSource` is a map content source that supplies vector shapes to be - shown on the map. The shapes may be instances of `MLNShape` or `MLNFeature`, + ``MLNShapeSource`` is a map content source that supplies vector shapes to be + shown on the map. The shapes may be instances of ``MLNShape`` or ``MLNShape``, or they may be defined by local or external GeoJSON code. A shape source is added to an - `MLNStyle` object along with an `MLNVectorStyleLayer` object. The vector style + ``MLNStyle`` object along with an ``MLNStyle`` object. The vector style layer defines the appearance of any content supplied by the shape source. You can update a shape source by setting its `shape` or `URL` property. - `MLNShapeSource` is optimized for data sets that change dynamically and fit + ``MLNShapeSource`` is optimized for data sets that change dynamically and fit completely in memory. For large data sets that do not fit completely in memory, - use the `MLNComputedShapeSource` or `MLNVectorTileSource` class. + use the ``MLNComputedShapeSource`` or ``MLNComputedShapeSource`` class. Each geojson source defined by the style JSON file is represented at runtime by an - `MLNShapeSource` object that you can use to refine the map’s content and + ``MLNShapeSource`` object that you can use to refine the map’s content and initialize new style layers. You can also add and remove sources dynamically - using methods such as `-[MLNStyle addSource:]` and - `-[MLNStyle sourceWithIdentifier:]`. + using methods such as ``MLNStyle/addSource:`` and + ``MLNStyle/sourceWithIdentifier:``. Any vector style layer initialized with a shape source should have a `nil` value in its `sourceLayerIdentifier` property. @@ -194,7 +194,7 @@ FOUNDATION_EXTERN MLN_EXPORT const MLNShapeSourceOption MLNShapeSourceOptionLine TODO: Cluster point data TODO: Use images to cluster point data TODO: Add live data - Learn how to add data to your map using this `MLNSource` object. + Learn how to add data to your map using this ``MLNSource`` object. */ MLN_EXPORT @interface MLNShapeSource : MLNSource @@ -205,12 +205,12 @@ MLN_EXPORT Returns a shape source with an identifier, URL, and dictionary of options for the source. - This class supports the following options: `MLNShapeSourceOptionClustered`, - `MLNShapeSourceOptionClusterRadius`, - `MLNShapeSourceOptionMaximumZoomLevelForClustering`, - `MLNShapeSourceOptionMinimumZoomLevel`, `MLNShapeSourceOptionMaximumZoomLevel`, - `MLNShapeSourceOptionBuffer`, and - `MLNShapeSourceOptionSimplificationTolerance`. Shapes provided by a shape + This class supports the following options: ``MLNShapeSourceOptionClustered``, + ``MLNShapeSourceOptionClusterRadius``, + ``MLNShapeSourceOptionMaximumZoomLevelForClustering``, + ``MLNShapeSourceOptionMinimumZoomLevel``, ``MLNShapeSourceOptionMinimumZoomLevel``, + ``MLNShapeSourceOptionBuffer``, and + ``MLNShapeSourceOptionSimplificationTolerance``. Shapes provided by a shape source are not clipped or wrapped automatically. @param identifier A string that uniquely identifies the source. @@ -221,7 +221,7 @@ MLN_EXPORT #### Related examples TODO: Add live data, learn how to add live data to your map by - updating the an `MLNShapeSource` object's `URL` property. + updating the an ``MLNShapeSource`` object's `URL` property. */ - (instancetype)initWithIdentifier:(NSString *)identifier URL:(NSURL *)url @@ -232,32 +232,32 @@ MLN_EXPORT Returns a shape source with an identifier, a shape, and dictionary of options for the source. - This class supports the following options: `MLNShapeSourceOptionClustered`, - `MLNShapeSourceOptionClusterRadius`, - `MLNShapeSourceOptionMaximumZoomLevelForClustering`, - `MLNShapeSourceOptionMinimumZoomLevel`, `MLNShapeSourceOptionMaximumZoomLevel`, - `MLNShapeSourceOptionBuffer`, and - `MLNShapeSourceOptionSimplificationTolerance`. Shapes provided by a shape + This class supports the following options: ``MLNShapeSourceOptionClustered``, + ``MLNShapeSourceOptionClusterRadius``, + ``MLNShapeSourceOptionMaximumZoomLevelForClustering``, + ``MLNShapeSourceOptionMinimumZoomLevel``, ``MLNShapeSourceOptionMinimumZoomLevel``, + ``MLNShapeSourceOptionBuffer``, and + ``MLNShapeSourceOptionSimplificationTolerance``. Shapes provided by a shape source are not clipped or wrapped automatically. - To specify attributes about the shape, use an instance of an `MLNShape` - subclass that conforms to the `MLNFeature` protocol, such as `MLNPointFeature`. - To include multiple shapes in the source, use an `MLNShapeCollection` or - `MLNShapeCollectionFeature` object, or use the + To specify attributes about the shape, use an instance of an ``MLNShape`` + subclass that conforms to the ``MLNFeature`` protocol, such as ``MLNFeature``. + To include multiple shapes in the source, use an ``MLNShapeCollection`` or + ``MLNShapeCollectionFeature`` object, or use the `-initWithIdentifier:features:options:` or `-initWithIdentifier:shapes:options:` methods. To create a shape from GeoJSON source code, use the - `+[MLNShape shapeWithData:encoding:error:]` method. + ``MLNShape/shapeWithData:encoding:error:`` method. @param identifier A string that uniquely identifies the source. - @param shape A concrete subclass of `MLNShape` + @param shape A concrete subclass of ``MLNShape`` @param options An `NSDictionary` of options for this source. @return An initialized shape source. #### Related examples TODO: Animate a line, learn how to animate line data by continously - updating an `MLNShapeSource`'s `shape` attribute. + updating an ``MLNShapeSource``'s `shape` attribute. */ - (instancetype)initWithIdentifier:(NSString *)identifier shape:(nullable MLNShape *)shape @@ -268,21 +268,21 @@ MLN_EXPORT Returns a shape source with an identifier, an array of features, and a dictionary of options for the source. - This class supports the following options: `MLNShapeSourceOptionClustered`, - `MLNShapeSourceOptionClusterRadius`, - `MLNShapeSourceOptionMaximumZoomLevelForClustering`, - `MLNShapeSourceOptionMinimumZoomLevel`, `MLNShapeSourceOptionMaximumZoomLevel`, - `MLNShapeSourceOptionBuffer`, and - `MLNShapeSourceOptionSimplificationTolerance`. Shapes provided by a shape + This class supports the following options: ``MLNShapeSourceOptionClustered``, + ``MLNShapeSourceOptionClusterRadius``, + ``MLNShapeSourceOptionMaximumZoomLevelForClustering``, + ``MLNShapeSourceOptionMinimumZoomLevel``, ``MLNShapeSourceOptionMinimumZoomLevel``, + ``MLNShapeSourceOptionBuffer``, and + ``MLNShapeSourceOptionSimplificationTolerance``. Shapes provided by a shape source are not clipped or wrapped automatically. - Unlike `-initWithIdentifier:shapes:options:`, this method accepts `MLNFeature` - instances, such as `MLNPointFeature` objects, whose attributes you can use when - applying a predicate to `MLNVectorStyleLayer` or configuring a style layer’s + Unlike `-initWithIdentifier:shapes:options:`, this method accepts ``MLNFeature`` + instances, such as ``MLNPointFeature`` objects, whose attributes you can use when + applying a predicate to ``MLNVectorStyleLayer`` or configuring a style layer’s appearance. To create a shape from GeoJSON source code, use the - `+[MLNShape shapeWithData:encoding:error:]` method. + ``MLNShape/shapeWithData:encoding:error:`` method. @param identifier A string that uniquely identifies the source. @param features An array of objects that conform to the MLNFeature protocol. @@ -297,22 +297,22 @@ MLN_EXPORT Returns a shape source with an identifier, an array of shapes, and a dictionary of options for the source. - This class supports the following options: `MLNShapeSourceOptionClustered`, - `MLNShapeSourceOptionClusterRadius`, - `MLNShapeSourceOptionMaximumZoomLevelForClustering`, - `MLNShapeSourceOptionMinimumZoomLevel`, `MLNShapeSourceOptionMaximumZoomLevel`, - `MLNShapeSourceOptionBuffer`, and - `MLNShapeSourceOptionSimplificationTolerance`. Shapes provided by a shape + This class supports the following options: ``MLNShapeSourceOptionClustered``, + ``MLNShapeSourceOptionClusterRadius``, + ``MLNShapeSourceOptionMaximumZoomLevelForClustering``, + ``MLNShapeSourceOptionMinimumZoomLevel``, ``MLNShapeSourceOptionMinimumZoomLevel``, + ``MLNShapeSourceOptionBuffer``, and + ``MLNShapeSourceOptionSimplificationTolerance``. Shapes provided by a shape source are not clipped or wrapped automatically. - Any `MLNFeature` instance passed into this initializer is treated as an ordinary - shape, causing any attributes to be inaccessible to an `MLNVectorStyleLayer` when + Any ``MLNFeature`` instance passed into this initializer is treated as an ordinary + shape, causing any attributes to be inaccessible to an ``MLNVectorStyleLayer`` when evaluating a predicate or configuring certain layout or paint attributes. To preserve the attributes associated with each feature, use the `-initWithIdentifier:features:options:` method instead. To create a shape from GeoJSON source code, use the - `+[MLNShape shapeWithData:encoding:error:]` method. + ``MLNShape/shapeWithData:encoding:error:`` method. @param identifier A string that uniquely identifies the source. @param shapes An array of shapes; each shape is a member of a concrete subclass of MLNShape. @@ -331,7 +331,7 @@ MLN_EXPORT If the receiver was initialized using `-initWithIdentifier:URL:options:`, this property is set to `nil`. This property is unavailable until the receiver is - passed into `-[MLNStyle addSource:]`. + passed into ``MLNStyle/addSource:``. You can get/set the shapes within a collection via this property. Actions must be performed on the application's main thread. @@ -364,14 +364,14 @@ MLN_EXPORT Returned features may not necessarily be visible to the user at the time they are loaded: the style may lack a layer that draws the features in question. To obtain only _visible_ features, use the - `-[MLNMapView visibleFeaturesAtPoint:inStyleLayersWithIdentifiers:predicate:]` + ``MLNMapView/visibleFeaturesAtPoint:inStyleLayersWithIdentifiers:predicate:`` or - `-[MLNMapView visibleFeaturesInRect:inStyleLayersWithIdentifiers:predicate:]` + ``MLNMapView/visibleFeaturesInRect:inStyleLayersWithIdentifiers:predicate:`` method. @param predicate A predicate to filter the returned features. Use `nil` to include all features in the source. - @return An array of objects conforming to the `MLNFeature` protocol that + @return An array of objects conforming to the ``MLNFeature`` protocol that represent features in the source that match the predicate. */ - (NSArray> *)featuresMatchingPredicate:(nullable NSPredicate *)predicate; @@ -383,12 +383,12 @@ MLN_EXPORT This method supports pagination; you supply an offset (number of features to skip) and a maximum number of features to return. - @param cluster An object of type `MLNPointFeatureCluster` (that conforms to the `MLNCluster` - protocol). + @param cluster An object of type ``MLNPointFeatureCluster`` (that conforms to the + ``MLNPointFeatureCluster`` protocol). @param offset Number of features to skip. @param limit The maximum number of features to return - @return An array of objects that conform to the `MLNFeature` protocol. + @return An array of objects that conform to the ``MLNFeature`` protocol. */ - (NSArray> *)leavesOfCluster:(MLNPointFeatureCluster *)cluster offset:(NSUInteger)offset @@ -397,24 +397,24 @@ MLN_EXPORT /** Returns an array of map features that are the immediate children of the specified cluster *on the next zoom level*. The may include features that also conform to - the `MLNCluster` protocol (currently only objects of type `MLNPointFeatureCluster`). + the ``MLNCluster`` protocol (currently only objects of type ``MLNCluster``). - @param cluster An object of type `MLNPointFeatureCluster` (that conforms to the `MLNCluster` - protocol). + @param cluster An object of type ``MLNPointFeatureCluster`` (that conforms to the + ``MLNPointFeatureCluster`` protocol). - @return An array of objects that conform to the `MLNFeature` protocol. + @return An array of objects that conform to the ``MLNFeature`` protocol. - @note The returned array may contain the `cluster` that was passed in, if the next + > Note: The returned array may contain the `cluster` that was passed in, if the next zoom level doesn't match the zoom level for expanding that cluster. See - `-[MLNShapeSource zoomLevelForExpandingCluster:]`. + ``MLNShapeSource/zoomLevelForExpandingCluster:``. */ - (NSArray> *)childrenOfCluster:(MLNPointFeatureCluster *)cluster; /** Returns the zoom level at which the given cluster expands. - @param cluster An object of type `MLNPointFeatureCluster` (that conforms to the `MLNCluster` - protocol). + @param cluster An object of type ``MLNPointFeatureCluster`` (that conforms to the + ``MLNPointFeatureCluster`` protocol). @return Zoom level. This should be >= 0; any negative return value should be considered an error. diff --git a/platform/darwin/src/MLNShapeSource_Private.h b/platform/darwin/src/MLNShapeSource_Private.h index 8203a4fdd..3cb1e36d9 100644 --- a/platform/darwin/src/MLNShapeSource_Private.h +++ b/platform/darwin/src/MLNShapeSource_Private.h @@ -18,12 +18,12 @@ mbgl::Immutable MLNGeoJSONOptionsFromDictionary( /** :nodoc: - Debug log showing structure of an `MLNFeature`. This method recurses in the case - that the feature conforms to `MLNCluster`. This method is used for testing and + Debug log showing structure of an ``MLNFeature``. This method recurses in the case + that the feature conforms to ``MLNCluster``. This method is used for testing and should be considered experimental, likely to be removed or changed in future releases. - @param feature An object that conforms to the `MLNFeature` protocol. + @param feature An object that conforms to the ``MLNFeature`` protocol. @param indent Used during recursion. Specify 0. */ diff --git a/platform/darwin/src/MLNShape_Private.h b/platform/darwin/src/MLNShape_Private.h index c5220104a..cbaf9ff7c 100644 --- a/platform/darwin/src/MLNShape_Private.h +++ b/platform/darwin/src/MLNShape_Private.h @@ -9,12 +9,12 @@ bool operator==(const CLLocationCoordinate2D lhs, const CLLocationCoordinate2D r @interface MLNShape (Private) /** - Returns an `mbgl::GeoJSON` representation of the `MLNShape`. + Returns an `mbgl::GeoJSON` representation of the ``MLNShape``. */ - (mbgl::GeoJSON)geoJSONObject; /** - Returns an `mbgl::Geometry` representation of the `MLNShape`. + Returns an `mbgl::Geometry` representation of the ``MLNShape``. */ - (mbgl::Geometry)geometryObject; diff --git a/platform/darwin/src/MLNSource.h b/platform/darwin/src/MLNSource.h index 1117289e5..4a5a756f2 100644 --- a/platform/darwin/src/MLNSource.h +++ b/platform/darwin/src/MLNSource.h @@ -8,21 +8,21 @@ NS_ASSUME_NONNULL_BEGIN FOUNDATION_EXTERN MLN_EXPORT MLNExceptionName const MLNInvalidStyleSourceException; /** - `MLNSource` is an abstract base class for map content sources. A map content + ``MLNSource`` is an abstract base class for map content sources. A map content source supplies content to be shown on the map. A source is added to an - `MLNStyle` object along with an `MLNForegroundStyleLayer` object. The + ``MLNStyle`` object along with an ``MLNStyle`` object. The foreground style layer defines the appearance of any content supplied by the source. Each source defined by the style JSON file is represented at runtime by an - `MLNSource` object that you can use to refine the map’s content. You can also + ``MLNSource`` object that you can use to refine the map’s content. You can also add and remove sources dynamically using methods such as - `-[MLNStyle addSource:]` and `-[MLNStyle sourceWithIdentifier:]`. + ``MLNStyle/addSource:`` and ``MLNStyle/sourceWithIdentifier:``. - Create instances of `MLNShapeSource`, `MLNComputedShapeSource`, - `MLNImageSource`, and the concrete subclasses of `MLNTileSource` - (``MLNVectorTileSource`` and `MLNRasterTileSource`) in order to use `MLNSource`’s - properties and methods. Do not create instances of `MLNSource` directly, and do + Create instances of ``MLNShapeSource``, ``MLNShapeSource``, + ``MLNImageSource``, and the concrete subclasses of ``MLNImageSource`` + (``MLNVectorTileSource`` and ``MLNRasterTileSource``) in order to use ``MLNRasterTileSource``’s + properties and methods. Do not create instances of ``MLNSource`` directly, and do not create your own subclasses of this class. */ MLN_EXPORT @@ -36,7 +36,7 @@ MLN_EXPORT Returns a source initialized with an identifier. After initializing and configuring the source, add it to a map view’s style - using the `-[MLNStyle addSource:]` method. + using the ``MLNStyle/addSource:`` method. @param identifier A string that uniquely identifies the source in the style to which it is added. diff --git a/platform/darwin/src/MLNSource_Private.h b/platform/darwin/src/MLNSource_Private.h index d8006d611..9356a9135 100644 --- a/platform/darwin/src/MLNSource_Private.h +++ b/platform/darwin/src/MLNSource_Private.h @@ -24,7 +24,7 @@ struct SourceWrapper { Assert that the style source is valid. This macro should be used at the beginning of any public-facing instance method - of `MLNSource` and its subclasses. For private methods, an assertion is more appropriate. + of ``MLNSource`` and its subclasses. For private methods, an assertion is more appropriate. */ #define MLNAssertStyleSourceIsValid() \ do { \ @@ -73,16 +73,16 @@ struct SourceWrapper { Once a mbgl source is added, ownership of the object is transferred to the `mbgl::Map` and this object no longer has an active unique_ptr reference to the `mbgl::Source`. If this object's mbgl source is in that state, the mbgl source - can still be changed but the changes will not be visible until the `MLNSource` - is added back to the map via `-[MLNStyle addSource:]` and styled with a - `MLNLayer`. + can still be changed but the changes will not be visible until the ``MLNSource`` + is added back to the map via ``MLNStyle/addSource:`` and styled with a + ``MLNLayer``. */ - (void)addToStylable:(id)mapView; /** Removes the mbgl source that this object represents from the mbgl map. When a mbgl source is removed, ownership of the object is transferred back - to the `MLNSource` instance and the unique_ptr reference is valid again. It is + to the ``MLNSource`` instance and the unique_ptr reference is valid again. It is safe to add the source back to the style after it is removed. */ - (BOOL)removeFromStylable:(id)mapView error:(NSError *__nullable *__nullable)outError; diff --git a/platform/darwin/src/MLNStyle.h b/platform/darwin/src/MLNStyle.h index 056516232..ced327ca3 100644 --- a/platform/darwin/src/MLNStyle.h +++ b/platform/darwin/src/MLNStyle.h @@ -27,12 +27,12 @@ FOUNDATION_EXTERN MLN_EXPORT MLNExceptionName const MLNRedundantSourceIdentifier with MapLibre. It is also possible to directly manipulate the current map style - via `MLNMapView.style` by updating the style's data sources or layers. + via ``MLNMapView/style`` by updating the style's data sources or layers. - @note Wait until the map style has finished loading before modifying a map's - style via any of the `MLNStyle` instance methods below. You can use the - `-[MLNMapViewDelegate mapView:didFinishLoadingStyle:]` or - `-[MLNMapViewDelegate mapViewDidFinishLoadingMap:]` methods as indicators + > Note: Wait until the map style has finished loading before modifying a map's + style via any of the ``MLNStyle`` instance methods below. You can use the + ``MLNMapViewDelegate/mapView:didFinishLoadingStyle:`` or + ``MLNMapViewDelegate/mapViewDidFinishLoadingMap:`` methods as indicators that it's safe to modify the map's style. */ MLN_EXPORT @@ -93,15 +93,7 @@ MLN_EXPORT /** Returns a source with the given identifier in the current style. - @note Source identifiers are not guaranteed to exist across styles or different - versions of the same style. Applications that use this API must first set the - style URL to an explicitly versioned style using a convenience method like - `+[MLNStyle outdoorsStyleURLWithVersion:]`, `MLNMapView`’s “Style URL” - inspectable in Interface Builder, or a manually constructed `NSURL`. This - approach also avoids source identifer name changes that will occur in the default - style’s sources over time. - - @return An instance of a concrete subclass of `MLNSource` associated with the + @return An instance of a concrete subclass of ``MLNSource`` associated with the given identifier, or `nil` if the current style contains no such source. */ - (nullable MLNSource *)sourceWithIdentifier:(NSString *)identifier; @@ -109,14 +101,14 @@ MLN_EXPORT /** Adds a new source to the current style. - @note Adding the same source instance more than once will result in a - `MLNRedundantSourceException`. Reusing the same source identifier, even with + > Note: Adding the same source instance more than once will result in a + ``MLNRedundantSourceException``. Reusing the same source identifier, even with different source instances, will result in a - `MLNRedundantSourceIdentifierException`. + ``MLNRedundantSourceIdentifierException``. - @note Sources should be added in - `-[MLNMapViewDelegate mapView:didFinishLoadingStyle:]` or - `-[MLNMapViewDelegate mapViewDidFinishLoadingMap:]` to ensure that the map + > Note: Sources should be added in + ``MLNMapViewDelegate/mapView:didFinishLoadingStyle:`` or + ``MLNMapViewDelegate/mapViewDidFinishLoadingMap:`` to ensure that the map has loaded the style and is ready to accept a new source. @param source The source to add to the current style. @@ -126,14 +118,6 @@ MLN_EXPORT /** Removes a source from the current style. - @note Source identifiers are not guaranteed to exist across styles or different - versions of the same style. Applications that use this API must first set the - style URL to an explicitly versioned style using a convenience method like - `+[MLNStyle outdoorsStyleURLWithVersion:]`, `MLNMapView`’s “Style URL” - inspectable in Interface Builder, or a manually constructed `NSURL`. This - approach also avoids source identifer name changes that will occur in the default - style’s sources over time. - @param source The source to remove from the current style. */ - (void)removeSource:(MLNSource *)source; @@ -141,14 +125,6 @@ MLN_EXPORT /** Removes a source from the current style. - @note Source identifiers are not guaranteed to exist across styles or different - versions of the same style. Applications that use this API must first set the - style URL to an explicitly versioned style using a convenience method like - `+[MLNStyle outdoorsStyleURLWithVersion:]`, `MLNMapView`’s “Style URL” - inspectable in Interface Builder, or a manually constructed `NSURL`. This - approach also avoids source identifer name changes that will occur in the default - style’s sources over time. - @param source The source to remove from the current style. @param outError Upon return, if an error has occurred, a pointer to an `NSError` object describing the error. Pass in `NULL` to ignore any error. @@ -169,15 +145,7 @@ MLN_EXPORT /** Returns a style layer with the given identifier in the current style. - @note Layer identifiers are not guaranteed to exist across styles or different - versions of the same style. Applications that use this API must first set - the style URL to an explicitly versioned style using a convenience method like - `+[MLNStyle outdoorsStyleURLWithVersion:]`, `MLNMapView`’s “Style URL” - inspectable in Interface Builder, or a manually constructed `NSURL`. This - approach also avoids layer identifer name changes that will occur in the default - style’s layers over time. - - @return An instance of a concrete subclass of `MLNStyleLayer` associated with + @return An instance of a concrete subclass of ``MLNStyleLayer`` associated with the given identifier, or `nil` if the current style contains no such style layer. */ @@ -186,30 +154,30 @@ MLN_EXPORT /** Adds a new layer on top of existing layers. - @note Adding the same layer instance more than once will result in a - `MLNRedundantLayerException`. Reusing the same layer identifer, even with + > Note: Adding the same layer instance more than once will result in a + ``MLNRedundantLayerException``. Reusing the same layer identifer, even with different layer instances, will also result in an exception. - @note Layers should be added in - `-[MLNMapViewDelegate mapView:didFinishLoadingStyle:]` or - `-[MLNMapViewDelegate mapViewDidFinishLoadingMap:]` to ensure that the map + > Note: Layers should be added in + ``MLNMapViewDelegate/mapView:didFinishLoadingStyle:`` or + ``MLNMapViewDelegate/mapViewDidFinishLoadingMap:`` to ensure that the map has loaded the style and is ready to accept a new layer. @param layer The layer object to add to the map view. This object must be an - instance of a concrete subclass of `MLNStyleLayer`. + instance of a concrete subclass of ``MLNStyleLayer``. */ - (void)addLayer:(MLNStyleLayer *)layer; /** Inserts a new layer into the style at the given index. - @note Adding the same layer instance more than once will result in a - `MLNRedundantLayerException`. Reusing the same layer identifer, even with + > Note: Adding the same layer instance more than once will result in a + ``MLNRedundantLayerException``. Reusing the same layer identifer, even with different layer instances, will also result in an exception. - @note Layers should be added in - `-[MLNMapViewDelegate mapView:didFinishLoadingStyle:]` or - `-[MLNMapViewDelegate mapViewDidFinishLoadingMap:]` to ensure that the map + > Note: Layers should be added in + ``MLNMapViewDelegate/mapView:didFinishLoadingStyle:`` or + ``MLNMapViewDelegate/mapViewDidFinishLoadingMap:`` to ensure that the map has loaded the style and is ready to accept a new layer. @param layer The layer to insert. @@ -222,16 +190,8 @@ MLN_EXPORT /** Inserts a new layer below another layer. - @note Layer identifiers are not guaranteed to exist across styles or different - versions of the same style. Applications that use this API must first set - the style URL to an explicitly versioned style using a convenience method like - `+[MLNStyle outdoorsStyleURLWithVersion:]`, `MLNMapView`’s “Style URL” - inspectable in Interface Builder, or a manually constructed `NSURL`. This - approach also avoids layer identifer name changes that will occur in the default - style’s layers over time. - - Inserting the same layer instance more than once will result in a - `MLNRedundantLayerException`. Reusing the same layer identifer, even with + > Note: Inserting the same layer instance more than once will result in a + ``MLNRedundantLayerException``. Reusing the same layer identifer, even with different layer instances, will also result in an exception. @param layer The layer to insert. @@ -246,16 +206,8 @@ MLN_EXPORT /** Inserts a new layer above another layer. - @note Layer identifiers are not guaranteed to exist across styles or different - versions of the same style. Applications that use this API must first set - the style URL to an explicitly versioned style using a convenience method like - `+[MLNStyle outdoorsStyleURLWithVersion:]`, `MLNMapView`’s “Style URL” - inspectable in Interface Builder, or a manually constructed `NSURL`. This - approach also avoids layer identifer name changes that will occur in the default - style’s layers over time. - - Inserting the same layer instance more than once will result in a - `MLNRedundantLayerException`. Reusing the same layer identifer, even with + > Note: Inserting the same layer instance more than once will result in a + ``MLNRedundantLayerException``. Reusing the same layer identifer, even with different layer instances, will also result in an exception. @param layer The layer to insert. @@ -270,16 +222,8 @@ MLN_EXPORT /** Removes a layer from the map view. - @note Layer identifiers are not guaranteed to exist across styles or different - versions of the same style. Applications that use this API must first set - the style URL to an explicitly versioned style using a convenience method like - `+[MLNStyle outdoorsStyleURLWithVersion:]`, `MLNMapView`’s “Style URL” - inspectable in Interface Builder, or a manually constructed `NSURL`. This - approach also avoids layer identifer name changes that will occur in the default - style’s layers over time. - @param layer The layer object to remove from the map view. This object - must conform to the `MLNStyleLayer` protocol. + must conform to the ``MLNStyleLayer`` protocol. */ - (void)removeLayer:(MLNStyleLayer *)layer; @@ -288,14 +232,6 @@ MLN_EXPORT /** Returns the image associated with the given name in the style. - @note Names and their associated images are not guaranteed to exist across - styles or different versions of the same style. Applications that use this - API must first set the style URL to an explicitly versioned style using a - convenience method like `+[MLNStyle outdoorsStyleURLWithVersion:]`, - `MLNMapView`’s “Style URL” inspectable in Interface Builder, or a manually - constructed `NSURL`. This approach also avoids image name changes that will - occur in the default style over time. - @param name The name associated with the image you want to obtain. @return The image associated with the given name, or `nil` if no image is associated with that name. @@ -306,7 +242,7 @@ MLN_EXPORT Adds or overrides an image used by the style’s layers. To use an image in a style layer, give it a unique name using this method, then - set the `iconImageName` property of an `MLNSymbolStyleLayer` object to that + set the `iconImageName` property of an ``MLNSymbolStyleLayer`` object to that name. @param image The image for the name. @@ -315,21 +251,13 @@ MLN_EXPORT #### Related examples TODO: Use images to cluster point data TODO: Cluster point data - Learn how to add images to your map using an `MLNStyle` object. + Learn how to add images to your map using an ``MLNStyle`` object. */ - (void)setImage:(MLNImage *)image forName:(NSString *)name; /** Removes a name and its associated image from the style. - @note Names and their associated images are not guaranteed to exist across - styles or different versions of the same style. Applications that use this - API must first set the style URL to an explicitly versioned style using a - convenience method like `+[MLNStyle outdoorsStyleURLWithVersion:]`, - `MLNMapView`’s “Style URL” inspectable in Interface Builder, or a manually - constructed `NSURL`. This approach also avoids image name changes that will - occur in the default style over time. - @param name The name of the image to remove. */ - (void)removeImageForName:(NSString *)name; @@ -362,20 +290,13 @@ MLN_EXPORT @end /** - An object whose contents are represented by an `MLNStyle` object that you + An object whose contents are represented by an ``MLNStyle`` object that you configure. */ @protocol MLNStylable /** The style currently displayed in the receiver. - - @note The default styles provided by Mapbox contain sources and layers with - identifiers that will change over time. Applications that use APIs that - manipulate a style’s sources and layers must first set the style URL to an - explicitly versioned style using a convenience method like - `+[MLNStyle outdoorsStyleURLWithVersion:]` or a manually constructed - `NSURL`. */ @property (nonatomic, readonly, nullable) MLNStyle *style; diff --git a/platform/darwin/src/MLNStyleLayer.h b/platform/darwin/src/MLNStyleLayer.h index 6f3cfeccb..48e23cb26 100644 --- a/platform/darwin/src/MLNStyleLayer.h +++ b/platform/darwin/src/MLNStyleLayer.h @@ -8,21 +8,21 @@ NS_ASSUME_NONNULL_BEGIN FOUNDATION_EXTERN MLN_EXPORT MLNExceptionName const MLNInvalidStyleLayerException; /** - `MLNStyleLayer` is an abstract base class for style layers. A style layer + ``MLNStyleLayer`` is an abstract base class for style layers. A style layer manages the layout and appearance of content at a specific z-index in a style. - An `MLNStyle` object consists of one or more `MLNStyleLayer` objects. + An ``MLNStyle`` object consists of one or more ``MLNStyle`` objects. Each style layer defined by the style JSON file is represented at runtime by an - `MLNStyleLayer` object, which you can use to refine the map’s appearance. You + ``MLNStyleLayer`` object, which you can use to refine the map’s appearance. You can also add and remove style layers dynamically. - Create instances of `MLNBackgroundStyleLayer` and the concrete subclasses of - `MLNForegroundStyleLayer` in order to use `MLNStyleLayer`'s properties and methods. - You do not create instances of `MLNStyleLayer` directly, and do not + Create instances of ``MLNBackgroundStyleLayer`` and the concrete subclasses of + ``MLNForegroundStyleLayer`` in order to use ``MLNForegroundStyleLayer``'s properties and methods. + You do not create instances of ``MLNStyleLayer`` directly, and do not create your own subclasses of this class. - Do not add `MLNStyleLayer` objects to the `style` property of a `MLNMapView` before - `-mapView:didFinishLoadingStyle:` is called. + Do not add ``MLNStyleLayer`` objects to the `style` property of a ``MLNStyleLayer`` before + ``MLNMapViewDelegate/mapView:didFinishLoadingStyle:`` is called. */ MLN_EXPORT @interface MLNStyleLayer : NSObject @@ -46,7 +46,7 @@ MLN_EXPORT Whether this layer is displayed. A value of `NO` hides the layer. #### Related examples - TODO: Show and hide a layer, learn how to toggle an `MLNStyleLayer` + TODO: Show and hide a layer, learn how to toggle an ``MLNStyleLayer`` object's visibility. */ @property (nonatomic, assign, getter=isVisible) BOOL visible; diff --git a/platform/darwin/src/MLNStyleLayer.h.ejs b/platform/darwin/src/MLNStyleLayer.h.ejs index 0ee234376..50d17ffa4 100644 --- a/platform/darwin/src/MLNStyleLayer.h.ejs +++ b/platform/darwin/src/MLNStyleLayer.h.ejs @@ -23,7 +23,7 @@ NS_ASSUME_NONNULL_BEGIN /** <%- propertyDoc(enumName(property), property, type, 'enum').wrap(80, 1) %> - Values of this type are used in the `MLN<%- camelize(type) %>StyleLayer.<%- camelizeWithLeadingLowercase(property.name) %>` + Values of this type are used in the ``MLN<%- camelize(type) %>StyleLayer/<%- camelizeWithLeadingLowercase(property.name) %>`` property. */ typedef NS_ENUM(NSUInteger, MLN<%- camelize(enumName(property)) %>) { @@ -42,7 +42,7 @@ typedef NS_ENUM(NSUInteger, MLN<%- camelize(enumName(property)) %>) { /** <%- propertyDoc(enumName(property), property, type, 'enum').wrap(80, 1) %> - Values of this type are used in the `MLN<%- camelize(type) %>StyleLayer.<%- camelizeWithLeadingLowercase(enumName(property)) %>` + Values of this type are used in the ``MLN<%- camelize(type) %>StyleLayer/<%- camelizeWithLeadingLowercase(enumName(property)) %>`` property. */ typedef NS_ENUM(NSUInteger, MLN<%- camelize(enumName(property)) %>) { @@ -65,10 +65,10 @@ typedef NS_ENUM(NSUInteger, MLN<%- camelize(enumName(property)) %>) { <%- doc.wrap(80, 1) %> You can access an existing <%- type %> style layer using the - `-[MLNStyle layerWithIdentifier:]` method if you know its identifier; - otherwise, find it using the `MLNStyle.layers` property. You can also create a + ``MLNStyle/layerWithIdentifier:`` method if you know its identifier; + otherwise, find it using the ``MLNStyle/layers`` property. You can also create a new <%- type %> style layer and add it to the style using a method such as - `-[MLNStyle addLayer:]`. + ``MLNStyle/addLayer:``. <% if (examples) { -%> #### Related examples @@ -93,8 +93,8 @@ MLN_EXPORT Returns a <%- type %> style layer initialized with an identifier. After initializing and configuring the style layer, add it to a map view’s -style using the `-[MLNStyle addLayer:]` or -`-[MLNStyle insertLayer:belowLayer:]` method. +style using the ``MLNStyle/addLayer:`` or +``MLNStyle/insertLayer:belowLayer:`` method. @param identifier A string that uniquely identifies the source in the style to which it is added. @@ -106,8 +106,8 @@ which it is added. Returns a <%- type %> style layer initialized with an identifier and source. After initializing and configuring the style layer, add it to a map view’s - style using the `-[MLNStyle addLayer:]` or - `-[MLNStyle insertLayer:belowLayer:]` method. + style using the ``MLNStyle/addLayer:`` or + ``MLNStyle/insertLayer:belowLayer:`` method. @param identifier A string that uniquely identifies the source in the style to which it is added. @@ -172,7 +172,7 @@ which it is added. <% if (enumProperties) { -%> /** Methods for wrapping an enumeration value for a style layer attribute in an - `MLN<%- camelize(type) %>StyleLayer` object and unwrapping its raw value. + ``MLN<%- camelize(type) %>StyleLayer`` object and unwrapping its raw value. */ @interface NSValue (MLN<%- camelize(type) %>StyleLayerAdditions) @@ -188,7 +188,7 @@ which it is added. + (instancetype)valueWithMLN<%- camelize(enumName(property)) %>:(MLN<%- camelize(enumName(property)) %>)<%- objCName(property) %>; /** - The `MLN<%- camelize(enumName(property)) %>` enumeration representation of the value. + The ``MLN<%- camelize(enumName(property)) %>`` enumeration representation of the value. */ @property (readonly) MLN<%- camelize(enumName(property)) %> MLN<%- camelize(enumName(property)) %>Value; diff --git a/platform/darwin/src/MLNStyleLayer_Private.h b/platform/darwin/src/MLNStyleLayer_Private.h index 8c0d53618..c74b4eb85 100644 --- a/platform/darwin/src/MLNStyleLayer_Private.h +++ b/platform/darwin/src/MLNStyleLayer_Private.h @@ -20,7 +20,7 @@ struct LayerWrapper { Assert that the style layer is valid. This macro should be used at the beginning of any public-facing instance method - of `MLNStyleLayer` and its subclasses. For private methods, an assertion is more appropriate. + of ``MLNStyleLayer`` and its subclasses. For private methods, an assertion is more appropriate. */ #define MLNAssertStyleLayerIsValid() \ do { \ @@ -77,7 +77,7 @@ struct LayerWrapper { Removes the mbgl style layer that this object represents from the mbgl map. When a mbgl style layer is removed, ownership of the object is transferred back - to the `MLNStyleLayer` instance and the unique_ptr reference is valid again. It + to the ``MLNStyleLayer`` instance and the unique_ptr reference is valid again. It is safe to add the layer back to the style after it is removed. */ - (void)removeFromStyle:(MLNStyle *)style; diff --git a/platform/darwin/src/MLNTilePyramidOfflineRegion.h b/platform/darwin/src/MLNTilePyramidOfflineRegion.h index 8c6fb8511..b261f5546 100644 --- a/platform/darwin/src/MLNTilePyramidOfflineRegion.h +++ b/platform/darwin/src/MLNTilePyramidOfflineRegion.h @@ -40,14 +40,14 @@ MLN_EXPORT /** The minimum zoom level for which to download tiles and other resources. - For more information about zoom levels, `-[MLNMapView zoomLevel]`. + For more information about zoom levels, ``MLNMapView/zoomLevel``. */ @property (nonatomic, readonly) double minimumZoomLevel; /** The maximum zoom level for which to download tiles and other resources. - For more information about zoom levels, `-[MLNMapView zoomLevel]`. + For more information about zoom levels, ``MLNMapView/zoomLevel``. */ @property (nonatomic, readonly) double maximumZoomLevel; @@ -57,7 +57,7 @@ MLN_EXPORT Initializes a newly created offline region with the given style URL, geographic coordinate bounds, and range of zoom levels. - This is the designated initializer for `MLNTilePyramidOfflineRegion`. + This is the designated initializer for ``MLNTilePyramidOfflineRegion``. @param styleURL URL of the map style for which to download resources. The URL may be a full HTTP or HTTPS URL or a canonical style URL. diff --git a/platform/darwin/src/MLNTileServerOptions.h b/platform/darwin/src/MLNTileServerOptions.h index 2b74cbfd9..cccb87b23 100644 --- a/platform/darwin/src/MLNTileServerOptions.h +++ b/platform/darwin/src/MLNTileServerOptions.h @@ -6,7 +6,7 @@ NS_ASSUME_NONNULL_BEGIN /** - The `MLNTileServerOptions` defines server properties such as URL etc... + The ``MLNTileServerOptions`` defines server properties such as URL etc... */ MLN_EXPORT @interface MLNTileServerOptions : NSObject diff --git a/platform/darwin/src/MLNTileSource.h b/platform/darwin/src/MLNTileSource.h index 6a9dcf571..fc3939c2d 100644 --- a/platform/darwin/src/MLNTileSource.h +++ b/platform/darwin/src/MLNTileSource.h @@ -9,7 +9,7 @@ NS_ASSUME_NONNULL_BEGIN @class MLNAttributionInfo; /** - Options for `MLNTileSource` objects. + Options for ``MLNTileSource`` objects. */ typedef NSString *MLNTileSourceOption NS_STRING_ENUM; @@ -18,7 +18,7 @@ typedef NSString *MLNTileSourceOption NS_STRING_ENUM; zoom level at which to display tiles from the source. The value should be between 0 and 22, inclusive, and less than - `MLNTileSourceOptionMaximumZoomLevel`, if specified. The default value for this + ``MLNTileSourceOptionMaximumZoomLevel``, if specified. The default value for this option is 0. This option corresponds to the `minzoom` key in the @@ -32,7 +32,7 @@ FOUNDATION_EXTERN MLN_EXPORT const MLNTileSourceOption MLNTileSourceOptionMinimu zoom level at which to display tiles from the source. The value should be between 0 and 22, inclusive, and less than - `MLNTileSourceOptionMinimumZoomLevel`, if specified. The default value for this + ``MLNTileSourceOptionMinimumZoomLevel``, if specified. The default value for this option is 22. This option corresponds to the `maxzoom` key in the @@ -42,7 +42,7 @@ FOUNDATION_EXTERN MLN_EXPORT const MLNTileSourceOption MLNTileSourceOptionMinimu FOUNDATION_EXTERN MLN_EXPORT const MLNTileSourceOption MLNTileSourceOptionMaximumZoomLevel; /** - An `NSValue` object containing an `MLNCoordinateBounds` struct that specifies + An `NSValue` object containing an ``MLNCoordinateBounds`` struct that specifies the geographic extent of the source. If this option is specified, the SDK avoids requesting any tile that falls @@ -62,7 +62,7 @@ FOUNDATION_EXTERN MLN_EXPORT const MLNTileSourceOption MLNTileSourceOptionCoordi pressed. By default, no attribution statements are displayed. If the - `MLNTileSourceOptionAttributionInfos` option is specified, this option is + ``MLNTileSourceOptionAttributionInfos`` option is specified, this option is ignored. This option corresponds to the `attribution` key in the @@ -72,7 +72,7 @@ FOUNDATION_EXTERN MLN_EXPORT const MLNTileSourceOption MLNTileSourceOptionCoordi FOUNDATION_EXTERN MLN_EXPORT const MLNTileSourceOption MLNTileSourceOptionAttributionHTMLString; /** - An array of `MLNAttributionInfo` objects defining the buttons to be displayed + An array of ``MLNAttributionInfo`` objects defining the buttons to be displayed in an action sheet when the source is part of a map view’s style and the map view’s attribution button is pressed. @@ -85,7 +85,7 @@ FOUNDATION_EXTERN MLN_EXPORT const MLNTileSourceOption MLNTileSourceOptionAttrib attribution view when the source is part of the map view’s style. By default, no attribution statements are displayed. If the - `MLNTileSourceOptionAttributionInfos` option is specified, this option is + ``MLNTileSourceOptionAttributionInfos`` option is specified, this option is ignored. This option corresponds to the `attribution` key in the @@ -95,7 +95,7 @@ FOUNDATION_EXTERN MLN_EXPORT const MLNTileSourceOption MLNTileSourceOptionAttrib FOUNDATION_EXTERN MLN_EXPORT const MLNTileSourceOption MLNTileSourceOptionAttributionHTMLString; /** - An array of `MLNAttributionInfo` objects defining the buttons to be displayed + An array of ``MLNAttributionInfo`` objects defining the buttons to be displayed in the map view’s attribution view when the source is part of the map view’s style. @@ -107,9 +107,9 @@ FOUNDATION_EXTERN MLN_EXPORT const MLNTileSourceOption MLNTileSourceOptionAttrib /** An `NSNumber` object containing an unsigned integer that specifies the tile coordinate system for the source’s tile URLs. The integer corresponds to one of - the constants described in `MLNTileCoordinateSystem`. + the constants described in ``MLNTileCoordinateSystem``. - The default value for this option is `MLNTileCoordinateSystemXYZ`. + The default value for this option is ``MLNTileCoordinateSystem/MLNTileCoordinateSystemXYZ``. This option corresponds to the `scheme` key in the TileJSON @@ -162,21 +162,21 @@ typedef NS_ENUM(NSUInteger, MLNDEMEncoding) { }; /** - `MLNTileSource` is a map content source that supplies map tiles to be shown on + ``MLNTileSource`` is a map content source that supplies map tiles to be shown on the map. The location of and metadata about the tiles are defined either by an option dictionary or by an external file that conforms to the TileJSON specification. - A tile source is added to an `MLNStyle` object along with one or more - `MLNRasterStyleLayer` or `MLNVectorStyleLayer` objects. Use a style layer to + A tile source is added to an ``MLNStyle`` object along with one or more + ``MLNRasterStyleLayer`` or ``MLNRasterStyleLayer`` objects. Use a style layer to control the appearance of content supplied by the tile source. A tile source is also known as a tile set. To learn about the structure of a Mapbox-hosted tile set, view it in Mapbox Studio’s Tilesets editor. - Create instances of `MLNRasterTileSource` and `MLNVectorTileSource` in order - to use `MLNTileSource`'s properties and methods. Do not create instances of - `MLNTileSource` directly, and do not create your own subclasses of this class. + Create instances of ``MLNRasterTileSource`` and ``MLNRasterTileSource`` in order + to use ``MLNTileSource``'s properties and methods. Do not create instances of + ``MLNTileSource`` directly, and do not create your own subclasses of this class. */ MLN_EXPORT @interface MLNTileSource : MLNSource @@ -195,7 +195,7 @@ MLN_EXPORT // MARK: Accessing Attribution Strings /** - An array of `MLNAttributionInfo` objects that define the attribution + An array of ``MLNAttributionInfo`` objects that define the attribution statements to be displayed when the map is shown to the user. By default, this array is empty. If the source is initialized with a diff --git a/platform/darwin/src/MLNTypes.h b/platform/darwin/src/MLNTypes.h index 4e8056be6..8824ad4d5 100644 --- a/platform/darwin/src/MLNTypes.h +++ b/platform/darwin/src/MLNTypes.h @@ -62,7 +62,7 @@ typedef NS_ENUM(NSInteger, MLNErrorCode) { MLNErrorCodeRenderingError = 11, }; -/** Options for enabling debugging features in an `MLNMapView` instance. */ +/** Options for enabling debugging features in an ``MLNMapView`` instance. */ typedef NS_OPTIONS(NSUInteger, MLNMapDebugMaskOptions) { /** Edges of tile boundaries are shown as thick, red lines to help diagnose tile clipping issues. */ @@ -76,14 +76,14 @@ typedef NS_OPTIONS(NSUInteger, MLNMapDebugMaskOptions) { MLNMapDebugCollisionBoxesMask = 1 << 4, /** Each drawing operation is replaced by a translucent fill. Overlapping drawing operations appear more prominent to help diagnose overdrawing. - @note This option does nothing in Release builds of the SDK. */ + > Note: This option does nothing in Release builds of the SDK. */ MLNMapDebugOverdrawVisualizationMask = 1 << 5, #if !TARGET_OS_IPHONE /** The stencil buffer is shown instead of the color buffer. - @note This option does nothing in Release builds of the SDK. */ + > Note: This option does nothing in Release builds of the SDK. */ MLNMapDebugStencilBufferMask = 1 << 6, /** The depth buffer is shown instead of the color buffer. - @note This option does nothing in Release builds of the SDK. */ + > Note: This option does nothing in Release builds of the SDK. */ MLNMapDebugDepthBufferMask = 1 << 7, #endif }; @@ -109,14 +109,14 @@ NS_INLINE NSString *MLNStringFromMLNTransition(MLNTransition transition) { } /** - Creates a new `MLNTransition` from the given duration and delay. + Creates a new ``MLNTransition`` from the given duration and delay. @param duration The amount of time the animation should take, not including the delay. @param delay The amount of time in seconds to wait before beginning the animation. - @return Returns a `MLNTransition` struct containing the transition attributes. + @return Returns a ``MLNTransition`` struct containing the transition attributes. */ NS_INLINE MLNTransition MLNTransitionMake(NSTimeInterval duration, NSTimeInterval delay) { MLNTransition transition; diff --git a/platform/darwin/src/MLNVectorStyleLayer.h b/platform/darwin/src/MLNVectorStyleLayer.h index 825f59efa..13585bbec 100644 --- a/platform/darwin/src/MLNVectorStyleLayer.h +++ b/platform/darwin/src/MLNVectorStyleLayer.h @@ -6,13 +6,13 @@ NS_ASSUME_NONNULL_BEGIN /** - `MLNVectorStyleLayer` is an abstract superclass for style layers whose content - is defined by an `MLNShapeSource` or `MLNVectorTileSource` object. + ``MLNVectorStyleLayer`` is an abstract superclass for style layers whose content + is defined by an ``MLNShapeSource`` or ``MLNShapeSource`` object. - Create instances of `MLNCircleStyleLayer`, `MLNFillStyleLayer`, - `MLNFillExtrusionStyleLayer`, `MLNHeatmapStyleLayer`, `MLNLineStyleLayer`, and - `MLNSymbolStyleLayer` in order to use `MLNVectorStyleLayer`'s properties and - methods. Do not create instances of `MLNVectorStyleLayer` directly, and do not + Create instances of ``MLNCircleStyleLayer``, ``MLNCircleStyleLayer``, + ``MLNFillExtrusionStyleLayer``, ``MLNFillExtrusionStyleLayer``, ``MLNFillExtrusionStyleLayer``, and + ``MLNSymbolStyleLayer`` in order to use ``MLNSymbolStyleLayer``'s properties and + methods. Do not create instances of ``MLNVectorStyleLayer`` directly, and do not create your own subclasses of this class. */ MLN_EXPORT diff --git a/platform/darwin/src/MLNVectorTileSource.h b/platform/darwin/src/MLNVectorTileSource.h index 87a0b2b8c..9d7e2e216 100644 --- a/platform/darwin/src/MLNVectorTileSource.h +++ b/platform/darwin/src/MLNVectorTileSource.h @@ -5,29 +5,29 @@ NS_ASSUME_NONNULL_BEGIN /** - `MLNVectorTileSource` is a map content source that supplies tiled vector data + ``MLNVectorTileSource`` is a map content source that supplies tiled vector data in Mapbox Vector Tile format to be shown on the map. The location of and metadata about the tiles are defined either by an option dictionary or by an external file that conforms to the TileJSON specification. - A vector tile source is added to an `MLNStyle` object along with one or more - `MLNVectorStyleLayer` objects. A vector style layer defines the appearance of + A vector tile source is added to an ``MLNStyle`` object along with one or more + ``MLNVectorStyleLayer`` objects. A vector style layer defines the appearance of any content supplied by the vector tile source. - `MLNVectorTileSource` is optimized for data sets that are too large to fit + ``MLNVectorTileSource`` is optimized for data sets that are too large to fit completely in memory, such as vector tile sets or data sets managed in Mapbox Studio. For - GeoJSON data, use the `MLNShapeSource` - class. For tiled data that changes dynamically, the `MLNComputedShapeSource` + GeoJSON data, use the ``MLNShapeSource`` + class. For tiled data that changes dynamically, the ``MLNComputedShapeSource`` class may be a suitable alternative. Each vector source defined by the style JSON file is represented at runtime by an - `MLNVectorTileSource` object that you can use to initialize new style layers. + ``MLNVectorTileSource`` object that you can use to initialize new style layers. You can also add and remove sources dynamically using methods such as - `-[MLNStyle addSource:]` and `-[MLNStyle sourceWithIdentifier:]`. + ``MLNStyle/addSource:`` and ``MLNStyle/sourceWithIdentifier:``. Within each vector tile, each geometric coordinate must lie between −1 × extent and @@ -57,7 +57,7 @@ NS_ASSUME_NONNULL_BEGIN #### Related examples TODO: Data-driven circles, learn how to add data to your map using - an `MLNVectorTileSource` object. + an ``MLNVectorTileSource`` object. */ MLN_EXPORT @interface MLNVectorTileSource : MLNTileSource @@ -69,7 +69,7 @@ MLN_EXPORT URL. After initializing and configuring the source, add it to a map view’s style - using the `-[MLNStyle addSource:]` method. + using the ``MLNStyle/addSource:`` method. The URL may be a full HTTP or HTTPS URL or a canonical URL. The URL should point to a JSON file that conforms to the @@ -93,14 +93,14 @@ MLN_EXPORT guide for information about the format of a tile URL template. After initializing and configuring the source, add it to a map view’s style - using the `-[MLNStyle addSource:]` method. + using the ``MLNStyle/addSource:`` method. @param identifier A string that uniquely identifies the source in the style to which it is added. @param tileURLTemplates An array of tile URL template strings. Only the first string is used; any additional strings are ignored. @param options A dictionary containing configuration options. See - `MLNTileSourceOption` for available keys and values. Pass in `nil` to use + ``MLNTileSourceOption`` for available keys and values. Pass in `nil` to use the default values. @return An initialized tile source. */ @@ -117,7 +117,7 @@ MLN_EXPORT Each object in the returned array represents a feature loaded by the source and provides access to attributes specified as part of the loaded feature. The - source loads a feature if the source is added to an `MLNMapView`’s style; that + source loads a feature if the source is added to an ``MLNMapView``’s style; that style has a layer that uses the source; and the map view has recently scrolled to the region containing the feature. @@ -133,9 +133,9 @@ MLN_EXPORT are loaded: the style may contain a layer that forces the source’s tiles to load but filters out the features in question, preventing them from being drawn. To obtain only _visible_ features, use the - `-[MLNMapView visibleFeaturesAtPoint:inStyleLayersWithIdentifiers:predicate:]` + ``MLNMapView/visibleFeaturesAtPoint:inStyleLayersWithIdentifiers:predicate:`` or - `-[MLNMapView visibleFeaturesInRect:inStyleLayersWithIdentifiers:predicate:]` + ``MLNMapView/visibleFeaturesInRect:inStyleLayersWithIdentifiers:predicate:`` method. @param sourceLayerIdentifiers The source layers to include in the query. Only @@ -143,7 +143,7 @@ MLN_EXPORT array. This array may not be empty. @param predicate A predicate to filter the returned features. Use `nil` to include all loaded features. - @return An array of objects conforming to the `MLNFeature` protocol that + @return An array of objects conforming to the ``MLNFeature`` protocol that represent features loaded by the source that match the predicate. */ - (NSArray> *)featuresInSourceLayersWithIdentifiers: diff --git a/platform/darwin/src/MLNVectorTileSource.mm b/platform/darwin/src/MLNVectorTileSource.mm index 7ede97a81..dacb5ae5e 100644 --- a/platform/darwin/src/MLNVectorTileSource.mm +++ b/platform/darwin/src/MLNVectorTileSource.mm @@ -95,7 +95,7 @@ static NSArray * const MLNMapboxStreetsLanguages = @[ ]; /** - Like `MLNMapboxStreetsLanguages`, but deanglicized for use with + Like ``MLNMapboxStreetsLanguages``, but deanglicized for use with `+[NSBundle preferredLocalizationsFromArray:forPreferences:]`. */ static NSArray * const MLNMapboxStreetsAlternativeLanguages = @[ diff --git a/platform/darwin/src/NSExpression+MLNAdditions.h b/platform/darwin/src/NSExpression+MLNAdditions.h index ab842c12b..265183687 100644 --- a/platform/darwin/src/NSExpression+MLNAdditions.h +++ b/platform/darwin/src/NSExpression+MLNAdditions.h @@ -152,14 +152,14 @@ FOUNDATION_EXTERN MLN_EXPORT const MLNExpressionInterpolationMode parameters and steps. @param inputExpression The interpolating expression input. - @param curveType The curve type could be `MLNExpressionInterpolationModeLinear`, - `MLNExpressionInterpolationModeExponential` and - `MLNExpressionInterpolationModeCubicBezier`. + @param curveType The curve type could be ``MLNExpressionInterpolationModeLinear``, + ``MLNExpressionInterpolationModeExponential`` and + ``MLNExpressionInterpolationModeCubicBezier``. @param parameters The parameters expression. @param stops The stops expression. #### Related examples - TODO: Create a heatmap layer, learn how to style an `MLNHeatmapStyleLayer` + TODO: Create a heatmap layer, learn how to style an ``MLNHeatmapStyleLayer`` based on zoom level and point density with this expression. */ + (instancetype)mgl_expressionForInterpolatingExpression:(nonnull NSExpression *)inputExpression @@ -185,10 +185,10 @@ FOUNDATION_EXTERN MLN_EXPORT const MLNExpressionInterpolationMode NS_SWIFT_NAME(init(forMLNMatchingKey:in:default:)); /** - Returns an attributed function expression specifying an `MLNAttributedExpression` constant + Returns an attributed function expression specifying an ``MLNAttributedExpression`` constant expression array. - @param attributedExpressions The `MLNAttributedExpression` constant expression array. + @param attributedExpressions The ``MLNAttributedExpression`` constant expression array. */ + (instancetype)mgl_expressionForAttributedExpressions: (nonnull NSArray *)attributedExpressions @@ -199,7 +199,7 @@ FOUNDATION_EXTERN MLN_EXPORT const MLNExpressionInterpolationMode /** Returns a constant expression appending the passed expression. - @note Both the receiver and the given expression must be an `NSString` constant + > Note: Both the receiver and the given expression must be an `NSString` constant expression type; otherwise, an exception is rised. @param expression The expression to append to the receiver. diff --git a/platform/darwin/src/NSPredicate+MLNAdditions.h b/platform/darwin/src/NSPredicate+MLNAdditions.h index e6edbacbd..7e5a9a0b5 100644 --- a/platform/darwin/src/NSPredicate+MLNAdditions.h +++ b/platform/darwin/src/NSPredicate+MLNAdditions.h @@ -20,7 +20,7 @@ NS_ASSUME_NONNULL_BEGIN @param object A Foundation object deserialized from JSON data, for example using `NSJSONSerialization`. @return An initialized predicate equivalent to `object`, suitable for use - with the `MLNVectorStyleLayer.predicate` property. + with the ``MLNVectorStyleLayer/predicate`` property. */ + (instancetype)predicateWithMLNJSONObject:(id)object NS_SWIFT_NAME(init(mglJSONObject:)); diff --git a/platform/darwin/src/NSValue+MLNAdditions.h b/platform/darwin/src/NSValue+MLNAdditions.h index 9ff35a353..377f03d1e 100644 --- a/platform/darwin/src/NSValue+MLNAdditions.h +++ b/platform/darwin/src/NSValue+MLNAdditions.h @@ -86,7 +86,7 @@ NS_ASSUME_NONNULL_BEGIN // MARK: Working with Offline Map Values /** - Creates a new value object containing the given `MLNOfflinePackProgress` + Creates a new value object containing the given ``MLNOfflinePackProgress`` structure. @param progress The value for the new object. @@ -95,14 +95,14 @@ NS_ASSUME_NONNULL_BEGIN + (NSValue *)valueWithMLNOfflinePackProgress:(MLNOfflinePackProgress)progress; /** - The `MLNOfflinePackProgress` structure representation of the value. + The ``MLNOfflinePackProgress`` structure representation of the value. */ @property (readonly) MLNOfflinePackProgress MLNOfflinePackProgressValue; // MARK: Working with Transition Values /** - Creates a new value object containing the given `MLNTransition` + Creates a new value object containing the given ``MLNTransition`` structure. @param transition The value for the new object. @@ -111,12 +111,12 @@ NS_ASSUME_NONNULL_BEGIN + (NSValue *)valueWithMLNTransition:(MLNTransition)transition; /** - The `MLNTransition` structure representation of the value. + The ``MLNTransition`` structure representation of the value. */ @property (readonly) MLNTransition MLNTransitionValue; /** - Creates a new value object containing the given `MLNSphericalPosition` + Creates a new value object containing the given ``MLNSphericalPosition`` structure. @param lightPosition The value for the new object. @@ -125,12 +125,12 @@ NS_ASSUME_NONNULL_BEGIN + (instancetype)valueWithMLNSphericalPosition:(MLNSphericalPosition)lightPosition; /** - The `MLNSphericalPosition` structure representation of the value. + The ``MLNSphericalPosition`` structure representation of the value. */ @property (readonly) MLNSphericalPosition MLNSphericalPositionValue; /** - Creates a new value object containing the given `MLNLightAnchor` + Creates a new value object containing the given ``MLNLightAnchor`` enum. @param lightAnchor The value for the new object. @@ -139,7 +139,7 @@ NS_ASSUME_NONNULL_BEGIN + (NSValue *)valueWithMLNLightAnchor:(MLNLightAnchor)lightAnchor; /** - The `MLNLightAnchor` enum representation of the value. + The ``MLNLightAnchor`` enum representation of the value. */ @property (readonly) MLNLightAnchor MLNLightAnchorValue; diff --git a/platform/darwin/src/native_apple_interface.m b/platform/darwin/src/native_apple_interface.m index 94fb1d5de..edd3b981d 100644 --- a/platform/darwin/src/native_apple_interface.m +++ b/platform/darwin/src/native_apple_interface.m @@ -33,7 +33,7 @@ static MLNNativeNetworkManager *instance = nil; // For testing. Since we get a `nil` return when SDK is modular, we use // this for testing requests. // Same as `[MLNNetworkConfiguration defaultSessionConfiguration]` in - // `MLNNetworkConfiguration.mm`. + // ``MLNNetworkConfiguration/mm``. configuration = [MLNNativeNetworkManager testSessionConfiguration]; } diff --git a/platform/darwin/test/MLNDocumentationExampleTests.swift b/platform/darwin/test/MLNDocumentationExampleTests.swift index b8227465c..9751ae1b1 100644 --- a/platform/darwin/test/MLNDocumentationExampleTests.swift +++ b/platform/darwin/test/MLNDocumentationExampleTests.swift @@ -541,8 +541,8 @@ class MLNDocumentationExampleTests: XCTestCase, MLNMapViewDelegate { 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 } diff --git a/platform/darwin/test/MLNRendererConfigurationTests.m b/platform/darwin/test/MLNRendererConfigurationTests.m index 58fbd507e..9ab356f2a 100644 --- a/platform/darwin/test/MLNRendererConfigurationTests.m +++ b/platform/darwin/test/MLNRendererConfigurationTests.m @@ -88,7 +88,7 @@ static NSString * const MLNRendererConfigurationTests_collisionBehaviorKey = @"M MLNRendererConfiguration *config = [[MLNRendererConfiguration alloc] init]; - // `MLNIdeographicFontFamilyName` set to bool value `YES` + // ``MLNIdeographicFontFamilyName`` set to bool value `YES` { NSString *localFontFamilyName = [config localFontFamilyNameWithInfoDictionaryObject:@(YES)]; @@ -101,19 +101,19 @@ static NSString * const MLNRendererConfigurationTests_collisionBehaviorKey = @"M XCTAssertEqualObjects(localFontFamilyName, systemFontFamilyName, @"Local font family name should match default system font name when setting `YES`"); } - // `MLNIdeographicFontFamilyName` set to bool value `NO` + // ``MLNIdeographicFontFamilyName`` set to bool value `NO` { NSString *localFontFamilyName = [config localFontFamilyNameWithInfoDictionaryObject:@(NO)]; XCTAssertNil(localFontFamilyName, @"Client rendering font should use remote font when setting `NO`"); } - // `MLNIdeographicFontFamilyName` set to a valid font string value + // ``MLNIdeographicFontFamilyName`` set to a valid font string value { NSString *localFontFamilyName = [config localFontFamilyNameWithInfoDictionaryObject:@"PingFang TC"]; XCTAssertEqualObjects(localFontFamilyName, @"PingFang TC", @"Local font family name should match a custom valid font name"); } - // `MLNIdeographicFontFamilyName` set to an invalid font string value + // ``MLNIdeographicFontFamilyName`` set to an invalid font string value { NSString *localFontFamilyName = [config localFontFamilyNameWithInfoDictionaryObject:@"test font"]; @@ -126,20 +126,20 @@ static NSString * const MLNRendererConfigurationTests_collisionBehaviorKey = @"M XCTAssertNotEqualObjects(localFontFamilyName, systemFontFamilyName, @"Local font family name should not be validated by MLNRenderConfiguration"); } - // `MLNIdeographicFontFamilyName` set to a valid font family names array value + // ``MLNIdeographicFontFamilyName`` set to a valid font family names array value { NSString *localFontFamilyName = [config localFontFamilyNameWithInfoDictionaryObject:@[@"test font 1", @"PingFang TC", @"test font 2"]]; XCTAssertEqualObjects(localFontFamilyName, @"test font 1\nPingFang TC\ntest font 2"); } - // `MLNIdeographicFontFamilyName` set to an invalid font family names array value + // ``MLNIdeographicFontFamilyName`` set to an invalid font family names array value { NSString *localFontFamilyName = [config localFontFamilyNameWithInfoDictionaryObject:@[@"test font 1", @"test font 2", @"test font 3"]]; XCTAssertEqualObjects(localFontFamilyName, @"test font 1\ntest font 2\ntest font 3", @"Local font family name should not be validated by MLNRendererConfiguration"); } - // `MLNIdeographicFontFamilyName` set to an invalid value type: NSDictionary, NSNumber, NSData, etc. + // ``MLNIdeographicFontFamilyName`` set to an invalid value type: NSDictionary, NSNumber, NSData, etc. { NSString *localFontFamilyName = [config localFontFamilyNameWithInfoDictionaryObject:[@"test font 1" dataUsingEncoding:NSUTF8StringEncoding]]; diff --git a/platform/ios/Integration_Tests/MLNNetworkConfigurationIntegrationTests.mm b/platform/ios/Integration_Tests/MLNNetworkConfigurationIntegrationTests.mm index a19b5f94b..f8b53d1fc 100644 --- a/platform/ios/Integration_Tests/MLNNetworkConfigurationIntegrationTests.mm +++ b/platform/ios/Integration_Tests/MLNNetworkConfigurationIntegrationTests.mm @@ -298,7 +298,7 @@ } - (void)testNetworkConfigurationWithSessionConfigurationWithCustomHeadersLOCKED { - // Custom session configuration, based on `MLNNetworkConfiguration.defaultSessionConfiguration` + // Custom session configuration, based on ``MLNNetworkConfiguration/defaultSessionConfiguration`` NSURLSessionConfiguration *sessionConfig = [NSURLSessionConfiguration defaultSessionConfiguration]; sessionConfig.HTTPAdditionalHeaders = @{ @"testing" : @YES }; sessionConfig.HTTPMaximumConnectionsPerHost = 1; diff --git a/platform/ios/app-swift/Sources/BuildingLightExample.swift b/platform/ios/app-swift/Sources/BuildingLightExample.swift index 72d7d1b56..a5cf88557 100644 --- a/platform/ios/app-swift/Sources/BuildingLightExample.swift +++ b/platform/ios/app-swift/Sources/BuildingLightExample.swift @@ -68,7 +68,7 @@ class BuildingLightExample: UIViewController, MLNMapViewDelegate { } func addFillExtrusionLayer(style: MLNStyle) { - // Access the OpenMapTiles source and use it to create a `MLNFillExtrusionStyleLayer`. The source identifier is `openmaptiles`. Use the `sources` property on a style to verify source identifiers. + // Access the OpenMapTiles source and use it to create a ``MLNFillExtrusionStyleLayer``. The source identifier is `openmaptiles`. Use the `sources` property on a style to verify source identifiers. guard let source = style.source(withIdentifier: "openmaptiles") else { print("Could not find source openmaptiles") return diff --git a/platform/ios/src/MLNAnnotationImage.h b/platform/ios/src/MLNAnnotationImage.h index 6894c7400..d41a8aefe 100644 --- a/platform/ios/src/MLNAnnotationImage.h +++ b/platform/ios/src/MLNAnnotationImage.h @@ -5,14 +5,14 @@ NS_ASSUME_NONNULL_BEGIN /** - The `MLNAnnotationImage` class is responsible for presenting point-based + The ``MLNAnnotationImage`` class is responsible for presenting point-based annotations visually on a map view. Annotation image objects wrap `UIImage` objects and may be recycled later and put into a reuse queue that is maintained by the map view. #### Related examples TODO: Mark a place on the map with an image, learn how use an image - as a marker using `MLNAnnotationImage`. + as a marker using ``MLNAnnotationImage``. */ MLN_EXPORT @interface MLNAnnotationImage : NSObject diff --git a/platform/ios/src/MLNAnnotationView.h b/platform/ios/src/MLNAnnotationView.h index 14b7aa50e..6cba7d348 100644 --- a/platform/ios/src/MLNAnnotationView.h +++ b/platform/ios/src/MLNAnnotationView.h @@ -39,7 +39,7 @@ typedef NS_ENUM(NSUInteger, MLNAnnotationViewDragState) { }; /** - The `MLNAnnotationView` class is responsible for marking a point annotation + The ``MLNAnnotationView`` class is responsible for marking a point annotation with a view. Annotation views represent an annotation object, which is an object that corresponds to the ``MLNAnnotation`` protocol. When an annotation’s geographic coordinate is visible in the map view, the map view asks its @@ -65,7 +65,7 @@ MLN_EXPORT leaves the viewport, the map view moves its associated view to a reuse queue. When a new annotation becomes visible, you can request a view for that annotation by passing the appropriate reuse identifier string to the - `-[MLNMapView dequeueReusableAnnotationViewWithIdentifier:]` method. + ``MLNMapView/dequeueReusableAnnotationViewWithIdentifier:`` method. @param reuseIdentifier A unique string identifier for this view that allows you to reuse this view with multiple similar annotations. You can set this @@ -173,7 +173,7 @@ MLN_EXPORT The default value of this property is `NO`. Keep this property set to `NO` if the view’s legibility is important. - @note Scaling many on-screen annotation views can contribute to poor map + > Note: Scaling many on-screen annotation views can contribute to poor map performance. Consider keeping this property disabled if your use case involves hundreds or thousands of annotation views. */ @@ -256,7 +256,7 @@ MLN_EXPORT continue to completion. #### Related examples - TODO: Enable users to drag `MLNAnnotationView` objects on your map. + TODO: Enable users to drag ``MLNAnnotationView`` objects on your map. */ @property (nonatomic, assign, getter=isDraggable) BOOL draggable; diff --git a/platform/ios/src/MLNCalloutView.h b/platform/ios/src/MLNCalloutView.h index f36b3cb7f..c56f6588f 100644 --- a/platform/ios/src/MLNCalloutView.h +++ b/platform/ios/src/MLNCalloutView.h @@ -10,17 +10,17 @@ NS_ASSUME_NONNULL_BEGIN A protocol for a `UIView` subclass that displays information about a selected annotation near that annotation. - To receive updates from an object that conforms to the `MLNCalloutView` protocol, - use the optional methods available in the `MLNCalloutViewDelegate` protocol. + To receive updates from an object that conforms to the ``MLNCalloutView`` protocol, + use the optional methods available in the ``MLNCalloutViewDelegate`` protocol. #### Related examples TODO: Display custom views as callouts by customizing an - `MLNCalloutView`. + ``MLNCalloutView``. */ @protocol MLNCalloutView /** - An object conforming to the `MLNAnnotation` protocol whose details this callout + An object conforming to the ``MLNAnnotation`` protocol whose details this callout view displays. */ @property (nonatomic, strong) id representedObject; @@ -38,7 +38,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, strong) UIView *rightAccessoryView; /** - An object conforming to the `MLNCalloutViewDelegate` method that receives + An object conforming to the ``MLNCalloutViewDelegate`` method that receives messages related to the callout view’s interactive subviews. */ @property (nonatomic, weak) id delegate; @@ -83,7 +83,7 @@ NS_ASSUME_NONNULL_BEGIN but the left and right margins from a minimum width that the callout should have. @param rect Rect that the callout is presented from. This should be the same as the one passed in - `-[MLNCalloutView presentCalloutFromRect:inView:constrainedToRect:animated:]` + ``MLNCalloutView/presentCalloutFromRect:inView:constrainedToRect:animated:`` @return `UIEdgeInsets` representing the margins. Values should be negative. */ - (UIEdgeInsets)marginInsetsHintForPresentationFromRect:(CGRect)rect @@ -108,9 +108,9 @@ NS_ASSUME_NONNULL_BEGIN @end /** - The `MLNCalloutViewDelegate` protocol defines a set of optional methods that + The ``MLNCalloutViewDelegate`` protocol defines a set of optional methods that you can use to receive messages from an object that conforms to the - `MLNCalloutView` protocol. The callout view uses these methods to inform the + ``MLNCalloutView`` protocol. The callout view uses these methods to inform the delegate that the user has interacted with the the callout view. */ @protocol MLNCalloutViewDelegate diff --git a/platform/ios/src/MLNCameraChangeReason.h b/platform/ios/src/MLNCameraChangeReason.h index f0822482a..208fd0569 100644 --- a/platform/ios/src/MLNCameraChangeReason.h +++ b/platform/ios/src/MLNCameraChangeReason.h @@ -1,24 +1,23 @@ #import "MLNFoundation.h" /** - :nodoc: Bitmask values that describe why a camera move occurred. - Values of this type are passed to the `MLNMapView`'s delegate in the following methods: + Values of this type are passed to the ``MLNMapView``'s delegate in the following methods: - - `-mapView:shouldChangeFromCamera:toCamera:reason:` - - `-mapView:regionWillChangeWithReason:animated:` - - `-mapView:regionIsChangingWithReason:` - - `-mapView:regionDidChangeWithReason:animated:` + - ``MLNMapViewDelegate/mapView:shouldChangeFromCamera:toCamera:reason:`` + - ``MLNMapViewDelegate/mapView:regionWillChangeWithReason:animated:`` + - ``MLNMapViewDelegate/mapView:regionIsChangingWithReason:`` + - ``MLNMapViewDelegate/mapView:regionDidChangeWithReason:animated:`` It's important to note that it's almost impossible to perform a rotate without zooming (in or out), - so if you'll often find `MLNCameraChangeReasonGesturePinch` set alongside - `MLNCameraChangeReasonGestureRotate`. + so if you'll often find ``MLNCameraChangeReasonGesturePinch`` set alongside + ``MLNCameraChangeReasonGestureRotate``. Since there are several reasons why a zoom or rotation has occurred, it is worth considering creating a combined constant, for example: - ``` + ```objc static const MLNCameraChangeReason anyZoom = MLNCameraChangeReasonGesturePinch | MLNCameraChangeReasonGestureZoomIn | MLNCameraChangeReasonGestureZoomOut | @@ -29,39 +28,39 @@ ``` */ typedef NS_OPTIONS(NSUInteger, MLNCameraChangeReason) { - /// :nodoc: The reason for the camera change has not be specified. + /// The reason for the camera change has not be specified. MLNCameraChangeReasonNone = 0, - /// :nodoc: Set when a public API that moves the camera is called. This may be set for some + /// Set when a public API that moves the camera is called. This may be set for some /// gestures, for example MLNCameraChangeReasonResetNorth. MLNCameraChangeReasonProgrammatic = 1 << 0, - /// :nodoc: The user tapped the compass to reset the map orientation so North is up. + /// The user tapped the compass to reset the map orientation so North is up. MLNCameraChangeReasonResetNorth = 1 << 1, - /// :nodoc: The user panned the map. + /// The user panned the map. MLNCameraChangeReasonGesturePan = 1 << 2, - /// :nodoc: The user pinched to zoom in/out. + /// The user pinched to zoom in/out. MLNCameraChangeReasonGesturePinch = 1 << 3, // :nodoc: The user rotated the map. MLNCameraChangeReasonGestureRotate = 1 << 4, - /// :nodoc: The user zoomed the map in (one finger double tap). + /// The user zoomed the map in (one finger double tap). MLNCameraChangeReasonGestureZoomIn = 1 << 5, - /// :nodoc: The user zoomed the map out (two finger single tap). + /// The user zoomed the map out (two finger single tap). MLNCameraChangeReasonGestureZoomOut = 1 << 6, - /// :nodoc: The user long pressed on the map for a quick zoom (single tap, then long press and + /// The user long pressed on the map for a quick zoom (single tap, then long press and /// drag up/down). MLNCameraChangeReasonGestureOneFingerZoom = 1 << 7, - // :nodoc: The user panned with two fingers to tilt the map (two finger drag). + // The user panned with two fingers to tilt the map (two finger drag). MLNCameraChangeReasonGestureTilt = 1 << 8, - // :nodoc: Cancelled + // Cancelled MLNCameraChangeReasonTransitionCancelled = 1 << 16 }; diff --git a/platform/ios/src/MLNCompactCalloutView.h b/platform/ios/src/MLNCompactCalloutView.h index cece81c4b..e0b40aa9e 100644 --- a/platform/ios/src/MLNCompactCalloutView.h +++ b/platform/ios/src/MLNCompactCalloutView.h @@ -2,7 +2,7 @@ #import "SMCalloutView.h" /** - A concrete implementation of `MLNCalloutView` based on + A concrete implementation of ``MLNCalloutView`` based on SMCalloutView. This callout view displays the represented annotation’s title, subtitle, and accessory views in a compact, two-line layout. diff --git a/platform/ios/src/MLNMapProjection.h b/platform/ios/src/MLNMapProjection.h index f1638a29f..471855570 100644 --- a/platform/ios/src/MLNMapProjection.h +++ b/platform/ios/src/MLNMapProjection.h @@ -31,7 +31,7 @@ MLN_EXPORT @param camera The new camera to be used in the projection calculation. @param insets The insets applied on top of the camera be used in the projection calculation. - @note `MLNMapView` instance frame must not be changed since this projection is initialized, + > Note: ``MLNMapView`` instance frame must not be changed since this projection is initialized, otherwise the calculation may be wrong. */ - (void)setCamera:(MLNMapCamera *_Nonnull)camera withEdgeInsets:(UIEdgeInsets)insets; @@ -42,7 +42,7 @@ MLN_EXPORT @param bounds The bounds that the viewport should fit. @param insets The insets applied on top of the viewport to be used in the projection calculation. - @note `MLNMapView` instance frame must not be changed since this projection is initialized, + > Note: ``MLNMapView`` instance frame must not be changed since this projection is initialized, otherwise the calculation may be wrong. */ - (void)setVisibleCoordinateBounds:(MLNCoordinateBounds)bounds edgePadding:(UIEdgeInsets)insets; diff --git a/platform/ios/src/MLNMapView.h b/platform/ios/src/MLNMapView.h index 6e962b5b6..fa307e1f0 100644 --- a/platform/ios/src/MLNMapView.h +++ b/platform/ios/src/MLNMapView.h @@ -26,7 +26,7 @@ NS_ASSUME_NONNULL_BEGIN @protocol MLNFeature; @protocol MLNLocationManager; -/** Options for `MLNMapView.decelerationRate`. */ +/** Options for ``MLNMapView/decelerationRate``. */ typedef CGFloat MLNMapViewDecelerationRate NS_TYPED_EXTENSIBLE_ENUM; /** The default deceleration rate for a map view. */ @@ -40,7 +40,7 @@ FOUNDATION_EXTERN MLN_EXPORT const MLNMapViewDecelerationRate MLNMapViewDecelera /** The vertical alignment of an annotation within a map view. Used with - `MLNMapView.userLocationVerticalAlignment`. + ``MLNMapView/userLocationVerticalAlignment``. */ typedef NS_ENUM(NSUInteger, MLNAnnotationVerticalAlignment) { /** Aligns the annotation vertically in the center of the map view. */ @@ -53,10 +53,10 @@ typedef NS_ENUM(NSUInteger, MLNAnnotationVerticalAlignment) { /** The position of scale bar, compass, logo and attribution in a map view. Used with - `MLNMapView.scaleBarPosition`, - `MLNMapView.compassViewPosition`, - `MLNMapView.logoViewPosition`, - `MLNMapView.attributionButtonPosition`. + ``MLNMapView/scaleBarPosition``, + ``MLNMapView/compassViewPosition``, + ``MLNMapView/logoViewPosition``, + ``MLNMapView/attributionButtonPosition``. */ typedef NS_ENUM(NSUInteger, MLNOrnamentPosition) { /** Place the ornament in the top left of the map view. */ @@ -71,7 +71,7 @@ typedef NS_ENUM(NSUInteger, MLNOrnamentPosition) { /** The mode used to track the user location on the map. Used with - `MLNMapView.userTrackingMode`. + ``MLNMapView/userTrackingMode``. #### Related examples - TODO: Switch between user tracking modes example to learn how to toggle modes and @@ -81,7 +81,7 @@ typedef NS_ENUM(NSUInteger, MLNUserTrackingMode) { /** The map does not follow the user location. */ MLNUserTrackingModeNone = 0, /** The map follows the user location. This tracking mode falls back - to `MLNUserTrackingModeNone` if the user pans the map view. */ + to ``MLNUserTrackingMode/MLNUserTrackingModeNone`` if the user pans the map view. */ MLNUserTrackingModeFollow, /** The map follows the user location and rotates when the heading changes. @@ -91,7 +91,7 @@ typedef NS_ENUM(NSUInteger, MLNUserTrackingMode) { This tracking mode is disabled if the user pans the map view, but remains enabled if the user zooms in. If the user rotates the map - view, this tracking mode will fall back to `MLNUserTrackingModeFollow`. + view, this tracking mode will fall back to ``MLNUserTrackingModeFollow``. */ MLNUserTrackingModeFollowWithHeading, /** @@ -102,7 +102,7 @@ typedef NS_ENUM(NSUInteger, MLNUserTrackingMode) { This tracking mode is disabled if the user pans the map view, but remains enabled if the user zooms in. If the user rotates the map view, - this tracking mode will fall back to `MLNUserTrackingModeFollow`. + this tracking mode will fall back to ``MLNUserTrackingModeFollow``. */ MLNUserTrackingModeFollowWithCourse, }; @@ -116,7 +116,7 @@ typedef NS_ENUM(NSUInteger, MLNPanScrollingMode) { MLNPanScrollingModeDefault }; -/** Options for `MLNMapView.preferredFramesPerSecond`. */ +/** Options for ``MLNMapView/preferredFramesPerSecond``. */ typedef NSInteger MLNMapViewPreferredFramesPerSecond NS_TYPED_EXTENSIBLE_ENUM; /** @@ -142,7 +142,7 @@ FOUNDATION_EXTERN MLN_EXPORT MLNExceptionName const MLNUserLocationAnnotationTyp An interactive, customizable map view with an interface similar to the one provided by Apple’s MapKit. - Using `MLNMapView`, you can embed the map inside a view, allow users to + Using ``MLNMapView``, you can embed the map inside a view, allow users to manipulate it with standard gestures, animate the map between different viewpoints, and present information in the form of annotations and overlays. @@ -154,15 +154,15 @@ FOUNDATION_EXTERN MLN_EXPORT MLNExceptionName const MLNUserLocationAnnotationTyp Maputnik. - Because `MLNMapView` loads asynchronously, several delegate methods are available + Because ``MLNMapView`` loads asynchronously, several delegate methods are available for receiving map-related updates. These methods can be used to ensure that certain operations have completed before taking any additional actions. Information on these methods is located - in the `MLNMapViewDelegate` protocol documentation. + in the ``MLNMapViewDelegate`` protocol documentation. - Adding your own gesture recognizer to `MLNMapView` will block the corresponding - gesture recognizer built into `MLNMapView`. To avoid conflicts, define which + Adding your own gesture recognizer to ``MLNMapView`` will block the corresponding + gesture recognizer built into ``MLNMapView``. To avoid conflicts, define which gesture takes precedence. For example, you can create your own - `UITapGestureRecognizer` that will be invoked only if the default `MLNMapView` + `UITapGestureRecognizer` that will be invoked only if the default ``MLNMapView`` tap gesture fails: ```swift @@ -173,7 +173,7 @@ FOUNDATION_EXTERN MLN_EXPORT MLNExceptionName const MLNUserLocationAnnotationTyp mapView.addGestureRecognizer(mapTapGestureRecognizer) ``` - @note You are responsible for getting permission to use the map data and for + > Note: You are responsible for getting permission to use the map data and for ensuring that your use adheres to the relevant terms of use. */ MLN_EXPORT @@ -202,8 +202,8 @@ MLN_EXPORT #### Related examples - - TODO: initialize an `MLNMapView` with a custom style - - TODO: how to initialize an `MLNMapView` with a third-party tile source + - TODO: initialize an ``MLNMapView`` with a custom style + - TODO: how to initialize an ``MLNMapView`` with a third-party tile source */ - (instancetype)initWithFrame:(CGRect)frame styleURL:(nullable NSURL *)styleURL; @@ -230,8 +230,8 @@ MLN_EXPORT If the style is loading, this property is set to `nil` until the style finishes loading. If the style has failed to load, this property is set to `nil`. Because the style loads asynchronously, you should manipulate it in the - `-[MLNMapViewDelegate mapView:didFinishLoadingStyle:]` or - `-[MLNMapViewDelegate mapViewDidFinishLoadingMap:]` method. It is not possible + ``MLNMapViewDelegate/mapView:didFinishLoadingStyle:`` or + ``MLNMapViewDelegate/mapViewDidFinishLoadingMap:`` method. It is not possible to manipulate the style before it has finished loading. */ @property (nonatomic, readonly, nullable) MLNStyle *style; @@ -309,7 +309,8 @@ MLN_EXPORT @property (nonatomic, assign) BOOL scaleBarUsesMetricSystem; /** - The position of the scale bar. The default value is `MLNOrnamentPositionTopLeft`. + The position of the scale bar. The default value is + ``MLNOrnamentPosition/MLNOrnamentPositionTopLeft``. */ @property (nonatomic, assign) MLNOrnamentPosition scaleBarPosition; @@ -325,7 +326,8 @@ MLN_EXPORT @property (nonatomic, readonly) MLNCompassButton *compassView; /** - The position of the compass view. The default value is `MLNOrnamentPositionTopRight`. + The position of the compass view. The default value is + ``MLNOrnamentPosition/MLNOrnamentPositionTopRight``. */ @property (nonatomic, assign) MLNOrnamentPosition compassViewPosition; @@ -341,7 +343,8 @@ MLN_EXPORT @property (nonatomic, readonly) UIImageView *logoView; /** - The position of the logo view. The default value is `MLNOrnamentPositionBottomLeft`. + The position of the logo view. The default value is + ``MLNOrnamentPosition/MLNOrnamentPositionBottomLeft``. */ @property (nonatomic, assign) MLNOrnamentPosition logoViewPosition; @@ -357,7 +360,7 @@ MLN_EXPORT If you choose to reimplement this view, assign the `-showAttribution:` method as the action for your view to present the default notices and settings. - @note Attribution is often required for many vector sources, + > Note: Attribution is often required for many vector sources, OpenStreetMap data, or other 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. @@ -366,7 +369,8 @@ MLN_EXPORT @property (nonatomic, readonly) UIButton *attributionButton; /** - The position of the attribution button. The default value is `MLNOrnamentPositionBottomRight`. + The position of the attribution button. The default value is + ``MLNOrnamentPosition/MLNOrnamentPositionBottomRight``. */ @property (nonatomic, assign) MLNOrnamentPosition attributionButtonPosition; @@ -388,11 +392,11 @@ MLN_EXPORT The preferred frame rate at which the map view is rendered. The default value for this property is - `MLNMapViewPreferredFramesPerSecondDefault`, which will adaptively set the + ``MLNMapViewPreferredFramesPerSecondDefault``, which will adaptively set the preferred frame rate based on the capability of the user’s device to maintain a smooth experience. - In addition to the provided `MLNMapViewPreferredFramesPerSecond` options, this + In addition to the provided ``MLNMapViewPreferredFramesPerSecond`` options, this property can be set to arbitrary integer values. @see `CADisplayLink.preferredFramesPerSecond` @@ -418,13 +422,13 @@ MLN_EXPORT location-related updates. To receive the current user location, implement the - `-[MLNMapViewDelegate mapView:didUpdateUserLocation:]` and - `-[MLNMapViewDelegate mapView:didFailToLocateUserWithError:]` methods. + ``MLNMapViewDelegate/mapView:didUpdateUserLocation:`` and + ``MLNMapViewDelegate/mapView:didFailToLocateUserWithError:`` methods. If setting this property to `nil` or if no custom manager is provided this property is set to the default location manager. - `MLNMapView` uses a default location manager. If you want to substitute your + ``MLNMapView`` uses a default location manager. If you want to substitute your own location manager, you should do so by setting this property before setting `showsUserLocation` to `YES`. To restore the default location manager, set this property to `nil`. @@ -479,7 +483,7 @@ MLN_EXPORT /** The mode used to track the user location. The default value is - `MLNUserTrackingModeNone`. + ``MLNUserTrackingMode/MLNUserTrackingModeNone``. Changing the value of this property updates the map view with an animated transition. If you don’t want to animate the change, use the @@ -487,7 +491,7 @@ MLN_EXPORT #### Related examples - TODO: Customize the user location annotation and learn how to customize the - default user location annotation shown by `MLNUserTrackingMode`. + default user location annotation shown by ``MLNUserTrackingMode``. */ @property (nonatomic, assign) MLNUserTrackingMode userTrackingMode; @@ -526,15 +530,15 @@ MLN_EXPORT /** The vertical alignment of the user location annotation within the receiver. The - default value is `MLNAnnotationVerticalAlignmentCenter`. + default value is ``MLNAnnotationVerticalAlignment/MLNAnnotationVerticalAlignmentCenter``. Changing the value of this property updates the map view with an animated transition. If you don’t want to animate the change, use the `-setUserLocationVerticalAlignment:animated:` method instead. */ @property (nonatomic, assign) MLNAnnotationVerticalAlignment userLocationVerticalAlignment - __attribute__(( - deprecated("Use `-[MLNMapViewDelegate mapViewUserLocationAnchorPoint:]` instead."))); + __attribute__((deprecated("Use ``MLNMapViewDelegate/mapViewUserLocationAnchorPoint:`` instead.") + )); /** Sets the vertical alignment of the user location annotation within the @@ -548,7 +552,7 @@ MLN_EXPORT - (void)setUserLocationVerticalAlignment:(MLNAnnotationVerticalAlignment)alignment animated:(BOOL)animated __attribute__(( - deprecated("Use `-[MLNMapViewDelegate mapViewUserLocationAnchorPoint:]` instead."))); + deprecated("Use ``MLNMapViewDelegate/mapViewUserLocationAnchorPoint:`` instead."))); /** Updates the position of the user location annotation view by retreiving the user's last @@ -570,11 +574,11 @@ MLN_EXPORT Setting this property to `YES` causes the default user location annotation to appear and always show an arrow-shaped heading indicator, if heading is available. This property does not rotate the map; for that, see - `MLNUserTrackingModeFollowWithHeading`. + ``MLNUserTrackingMode/MLNUserTrackingModeFollowWithHeading``. - This property has no effect when `userTrackingMode` is - `MLNUserTrackingModeFollowWithHeading` or - `MLNUserTrackingModeFollowWithCourse`. + This property has no effect when ``userTrackingMode`` is + ``MLNUserTrackingMode/MLNUserTrackingModeFollowWithHeading`` or + ``MLNUserTrackingMode/MLNUserTrackingModeFollowWithCourse``. The default value of this property is `NO`. */ @@ -598,7 +602,7 @@ MLN_EXPORT to fit both foci optimally within the viewport. This property has no effect if the `userTrackingMode` property is set to a - value other than `MLNUserTrackingModeFollowWithCourse`. + value other than ``MLNUserTrackingMode/MLNUserTrackingModeFollowWithCourse``. Changing the value of this property updates the map view with an animated transition. If you don’t want to animate the change, use the @@ -618,7 +622,7 @@ MLN_EXPORT to fit both foci optimally within the viewport. This method has no effect if the `userTrackingMode` property is set to a value - other than `MLNUserTrackingModeFollowWithCourse`. + other than ``MLNUserTrackingMode/MLNUserTrackingModeFollowWithCourse``. To specify a completion handler to execute after the animation finishes, use the `-setTargetCoordinate:animated:completionHandler:` method. @@ -644,7 +648,7 @@ MLN_EXPORT to fit both foci optimally within the viewport. This method has no effect if the `userTrackingMode` property is set to a value - other than `MLNUserTrackingModeFollowWithCourse`. + other than ``MLNUserTrackingMode/MLNUserTrackingModeFollowWithCourse``. @param targetCoordinate The target coordinate to fit within the viewport. @param animated If `YES`, the map animates to fit the target within the map @@ -691,10 +695,10 @@ MLN_EXPORT restricting a user's ability to scroll vertically. `MLNPanScrollingModeVertical` only allows the user to scroll vertically on the map, restricting a user's ability to scroll horizontally. - `MLNPanScrollingModeDefault` allows the user to scroll both horizontally and vertically - on the map. + ``MLNPanScrollingMode/MLNPanScrollingModeDefault`` allows the user to scroll both horizontally and +vertically on the map. - By default, this property is set to `MLNPanScrollingModeDefault`. + By default, this property is set to ``MLNPanScrollingMode/MLNPanScrollingModeDefault``. */ @property (nonatomic, assign) MLNPanScrollingMode panScrollingMode; @@ -749,9 +753,9 @@ MLN_EXPORT A floating-point value that determines the rate of deceleration after the user lifts their finger. - Your application can use the `MLNMapViewDecelerationRateNormal` and - `MLNMapViewDecelerationRateFast` constants as reference points for reasonable - deceleration rates. `MLNMapViewDecelerationRateImmediate` can be used to + Your application can use the ``MLNMapViewDecelerationRateNormal`` and + ``MLNMapViewDecelerationRateFast`` constants as reference points for reasonable + deceleration rates. ``MLNMapViewDecelerationRateImmediate`` can be used to disable deceleration entirely. */ @property (nonatomic) CGFloat decelerationRate; @@ -782,7 +786,7 @@ MLN_EXPORT location or `NO` if you want the map to display the new location immediately. - @note The behavior of this method is undefined if called in response to + > Note: The behavior of this method is undefined if called in response to `UIApplicationWillTerminateNotification`. */ - (void)setCenterCoordinate:(CLLocationCoordinate2D)coordinate animated:(BOOL)animated; @@ -798,7 +802,7 @@ MLN_EXPORT zooming to the new location or `NO` if you want the map to display the new location immediately. - @note The behavior of this method is undefined if called in response to + > Note: The behavior of this method is undefined if called in response to `UIApplicationWillTerminateNotification`. */ - (void)setCenterCoordinate:(CLLocationCoordinate2D)centerCoordinate @@ -818,7 +822,7 @@ MLN_EXPORT zooming, and rotating to the new location or `NO` if you want the map to display the new location immediately. - @note The behavior of this method is undefined if called in response to + > Note: The behavior of this method is undefined if called in response to `UIApplicationWillTerminateNotification`. */ - (void)setCenterCoordinate:(CLLocationCoordinate2D)centerCoordinate @@ -840,7 +844,7 @@ MLN_EXPORT display the new location immediately. @param completion The block executed after the animation finishes. - @note The behavior of this method is undefined if called in response to + > Note: The behavior of this method is undefined if called in response to `UIApplicationWillTerminateNotification`. */ - (void)setCenterCoordinate:(CLLocationCoordinate2D)centerCoordinate @@ -1310,7 +1314,7 @@ MLN_EXPORT including the entire coordinate bounds. The camera object uses the current direction and pitch. - @note The behavior of this method is undefined if called in response to + > Note: The behavior of this method is undefined if called in response to `UIApplicationWillTerminateNotification`; you may receive a `nil` return value depending on the order of notification delivery. */ @@ -1328,7 +1332,7 @@ MLN_EXPORT including the entire coordinate bounds. The camera object uses the current direction and pitch. - @note The behavior of this method is undefined if called in response to + > Note: The behavior of this method is undefined if called in response to `UIApplicationWillTerminateNotification`; you may receive a `nil` return value depending on the order of notification delivery. */ @@ -1350,7 +1354,7 @@ MLN_EXPORT including the entire coordinate bounds. The initial camera's pitch and direction will be honored. - @note The behavior of this method is undefined if called in response to + > Note: The behavior of this method is undefined if called in response to `UIApplicationWillTerminateNotification`; you may receive a `nil` return value depending on the order of notification delivery. */ @@ -1371,7 +1375,7 @@ MLN_EXPORT (close to the ground) as possible while still including the entire shape. The initial camera's pitch and direction will be honored. - @note The behavior of this method is undefined if called in response to + > Note: The behavior of this method is undefined if called in response to `UIApplicationWillTerminateNotification`; you may receive a `nil` return value depending on the order of notification delivery. */ @@ -1392,7 +1396,7 @@ MLN_EXPORT (close to the ground) as possible while still including the entire shape. The camera object uses the current pitch. - @note The behavior of this method is undefined if called in response to + > Note: The behavior of this method is undefined if called in response to `UIApplicationWillTerminateNotification`; you may receive a `nil` return value depending on the order of notification delivery. */ @@ -1407,7 +1411,7 @@ MLN_EXPORT For example, a pinch-to-zoom gesture would anchor the map at the midpoint of the pinch. - If the `userTrackingMode` property is not `MLNUserTrackingModeNone`, the + If the ``userTrackingMode`` property is not ``MLNUserTrackingMode/MLNUserTrackingModeNone``, the user annotation is used as the anchor point. Subclasses may override this method to provide specialized behavior - for @@ -1434,7 +1438,7 @@ MLN_EXPORT property may be overridden at any time. The usage of `automaticallyAdjustsScrollViewInsets` has been deprecated - use the map view’s property `MLNMapView.automaticallyAdjustsContentInset`instead. + use the map view’s property ``MLNMapView/automaticallyAdjustsContentInset``instead. Changing the value of this property updates the map view immediately. If you want to animate the change, use the `-setContentInset:animated:completionHandler:` @@ -1470,7 +1474,7 @@ MLN_EXPORT property may be overridden at any time. The usage of `automaticallyAdjustsScrollViewInsets` has been deprecated - use the map view’s property `MLNMapView.automaticallyAdjustsContentInset`instead. + use the map view’s property ``MLNMapView/automaticallyAdjustsContentInset``instead. To specify a completion handler to execute after the animation finishes, use the `-setContentInset:animated:completionHandler:` method. @@ -1500,7 +1504,7 @@ MLN_EXPORT property may be overridden at any time. The usage of `automaticallyAdjustsScrollViewInsets` has been deprecated - use the map view’s property `MLNMapView.automaticallyAdjustsContentInset`instead. + use the map view’s property ``MLNMapView/automaticallyAdjustsContentInset``instead. @param contentInset The new values to inset the content by. @param animated Specify `YES` if you want the map view to animate the change to @@ -1601,7 +1605,7 @@ MLN_EXPORT /** The complete list of annotations associated with the receiver. (read-only) - The objects in this array must adopt the `MLNAnnotation` protocol. If no + The objects in this array must adopt the ``MLNAnnotation`` protocol. If no annotations are associated with the map view, the value of this property is `nil`. */ @@ -1610,32 +1614,32 @@ MLN_EXPORT /** Adds an annotation to the map view. - @note `MLNMultiPolyline`, `MLNMultiPolygon`, `MLNShapeCollection`, and - `MLNPointCollection` objects cannot be added to the map view at this time. + > Note: ``MLNMultiPolyline``, ``MLNMultiPolyline``, ``MLNMultiPolyline``, and + ``MLNPointCollection`` objects cannot be added to the map view at this time. Any multipoint, multipolyline, multipolygon, shape or point collection object that is specified is silently ignored. @param annotation The annotation object to add to the receiver. This object - must conform to the `MLNAnnotation` protocol. The map view retains the + must conform to the ``MLNAnnotation`` protocol. The map view retains the annotation object. #### Related examples - TODO: add a line annotation from GeoJSON. - - TODO: add an annotation to an `MLNMapView` object. + - TODO: add an annotation to an ``MLNMapView`` object. */ - (void)addAnnotation:(id)annotation; /** Adds an array of annotations to the map view. - @note `MLNMultiPolyline`, `MLNMultiPolygon`, and `MLNShapeCollection` objects - cannot be added to the map view at this time. Nor can `MLNMultiPoint` - objects that are not instances of `MLNPolyline` or `MLNPolygon`. Any + > Note: ``MLNMultiPolyline``, ``MLNMultiPolyline``, and ``MLNMultiPolyline`` objects + cannot be added to the map view at this time. Nor can ``MLNMultiPoint`` + objects that are not instances of ``MLNPolyline`` or ``MLNPolyline``. Any multipoint, multipolyline, multipolygon, or shape collection objects that are specified are silently ignored. @param annotations An array of annotation objects. Each object in the array - must conform to the `MLNAnnotation` protocol. The map view retains each + must conform to the ``MLNAnnotation`` protocol. The map view retains each individual annotation object. */ - (void)addAnnotations:(NSArray> *)annotations; @@ -1648,7 +1652,7 @@ MLN_EXPORT this method only when you want to hide or delete a given annotation. @param annotation The annotation object to remove. This object must conform - to the `MLNAnnotation` protocol + to the ``MLNAnnotation`` protocol */ - (void)removeAnnotation:(id)annotation; @@ -1661,23 +1665,23 @@ MLN_EXPORT call this method only when you want to hide or delete the given annotations. @param annotations The array of annotation objects to remove. Objects in the - array must conform to the `MLNAnnotation` protocol. + array must conform to the ``MLNAnnotation`` protocol. */ - (void)removeAnnotations:(NSArray> *)annotations; /** - Returns an `MLNAnnotationView` if the given annotation is currently associated + Returns an ``MLNAnnotationView`` if the given annotation is currently associated with a view, otherwise nil. @param annotation The annotation associated with the view. - Annotation must conform to the `MLNAnnotation` protocol. + Annotation must conform to the ``MLNAnnotation`` protocol. */ - (nullable MLNAnnotationView *)viewForAnnotation:(id)annotation; /** Returns a reusable annotation image object associated with its identifier. - For performance reasons, you should generally reuse `MLNAnnotationImage` + For performance reasons, you should generally reuse ``MLNAnnotationImage`` objects for identical-looking annotations in your map views. Dequeueing saves time and memory during performance-critical operations such as scrolling. @@ -1690,7 +1694,7 @@ MLN_EXPORT #### Related examples - TODO: Add annotation views and images: learn how to most efficiently - reuse an `MLNAnnotationImage`. + reuse an ``MLNAnnotationImage``. */ - (nullable __kindof MLNAnnotationImage *)dequeueReusableAnnotationImageWithIdentifier: (NSString *)identifier; @@ -1698,7 +1702,7 @@ MLN_EXPORT /** Returns a reusable annotation view object associated with its identifier. - For performance reasons, you should generally reuse `MLNAnnotationView` + For performance reasons, you should generally reuse ``MLNAnnotationView`` objects for identical-looking annotations in your map views. Dequeueing saves time and memory during performance-critical operations such as scrolling. @@ -1716,7 +1720,7 @@ MLN_EXPORT The complete list of annotations associated with the receiver that are currently visible. - The objects in this array must adopt the `MLNAnnotation` protocol. If no + The objects in this array must adopt the ``MLNAnnotation`` protocol. If no annotations are associated with the map view or if no annotations associated with the map view are currently visible, the value of this property is `nil`. */ @@ -1727,7 +1731,7 @@ MLN_EXPORT the given rectangle. @param rect A rectangle expressed in the map view’s coordinate system. - @return An array of objects that adopt the `MLNAnnotation` protocol or `nil` if + @return An array of objects that adopt the ``MLNAnnotation`` protocol or `nil` if no annotations associated with the map view are currently visible in the rectangle. */ @@ -1741,11 +1745,11 @@ MLN_EXPORT Assigning a new array to this property selects only the first annotation in the array. - If the annotation is of type `MLNPointAnnotation` and is offscreen, the camera + If the annotation is of type ``MLNPointAnnotation`` and is offscreen, the camera will animate to bring the annotation and its callout just on screen. If you need finer control, consider using `-selectAnnotation:animated:`. - @note In versions prior to `4.0.0` if the annotation was offscreen it was not + > Note: In versions prior to `4.0.0` if the annotation was offscreen it was not selected. */ @property (nonatomic, copy) NSArray> *selectedAnnotations; @@ -1761,8 +1765,8 @@ MLN_EXPORT | `NO` | The annotation is selected, and the callout is presented. However the map is not panned to bring the annotation or callout into view. The presentation of the callout is NOT animated. | | `YES` | The annotation is selected, and the callout is presented. If the - annotation is not visible (or is partially visible) *and* is of type `MLNPointAnnotation`, the map - is panned so that the annotation and its callout are brought into view. The annotation is *not* + annotation is not visible (or is partially visible) *and* is of type ``MLNPointAnnotation``, the + map is panned so that the annotation and its callout are brought into view. The annotation is *not* centered within the viewport. | Note that a selection initiated by a single tap gesture is always animated. @@ -1773,7 +1777,7 @@ MLN_EXPORT @param annotation The annotation object to select. @param animated If `YES`, the annotation and callout view are animated on-screen. - @note In versions prior to `4.0.0` selecting an offscreen annotation did not + > Note: In versions prior to `4.0.0` selecting an offscreen annotation did not change the camera. */ - (void)selectAnnotation:(id)annotation @@ -1792,8 +1796,8 @@ MLN_EXPORT | `NO` | The annotation is selected, and the callout is presented. However the map is not panned to bring the annotation or callout into view. The presentation of the callout is NOT animated. | | `YES` | The annotation is selected, and the callout is presented. If the - annotation is not visible (or is partially visible) *and* is of type `MLNPointAnnotation`, the map - is panned so that the annotation and its callout are brought into view. The annotation is *not* + annotation is not visible (or is partially visible) *and* is of type ``MLNPointAnnotation``, the + map is panned so that the annotation and its callout are brought into view. The annotation is *not* centered within the viewport. | Note that a selection initiated by a single tap gesture is always animated. @@ -1802,7 +1806,7 @@ MLN_EXPORT @param animated If `YES`, the annotation and callout view are animated on-screen. @param completion The block executed after the animation finishes. - @note In versions prior to `4.0.0` selecting an offscreen annotation did not + > Note: In versions prior to `4.0.0` selecting an offscreen annotation did not change the camera. */ - (void)selectAnnotation:(id)annotation @@ -1817,7 +1821,7 @@ MLN_EXPORT @param annotation The annotation object to select. @param moveIntoView If the annotation is not visible (or is partially visible) *and* is of type - `MLNPointAnnotation`, the map is panned so that the annotation and its callout are brought into + ``MLNPointAnnotation``, the map is panned so that the annotation and its callout are brought into view. The annotation is *not* centered within the viewport. @param animateSelection If `YES`, the annotation's selection state and callout view's presentation are animated. @@ -1841,7 +1845,7 @@ MLN_EXPORT /** The complete list of overlays associated with the receiver. (read-only) - The objects in this array must adopt the `MLNOverlay` protocol. If no + The objects in this array must adopt the ``MLNOverlay`` protocol. If no overlays are associated with the map view, the value of this property is empty array. */ @@ -1853,7 +1857,7 @@ MLN_EXPORT To remove an overlay from a map, use the `-removeOverlay:` method. @param overlay The overlay object to add. This object must conform to the - `MLNOverlay` protocol. */ + ``MLNOverlay`` protocol. */ - (void)addOverlay:(id)overlay; /** @@ -1862,7 +1866,7 @@ MLN_EXPORT To remove multiple overlays from a map, use the `-removeOverlays:` method. @param overlays An array of objects, each of which must conform to the - `MLNOverlay` protocol. + ``MLNOverlay`` protocol. */ - (void)addOverlays:(NSArray> *)overlays; @@ -1881,7 +1885,7 @@ MLN_EXPORT If a given overlay object is not associated with the map view, it is ignored. - @param overlays An array of objects, each of which conforms to the `MLNOverlay` + @param overlays An array of objects, each of which conforms to the ``MLNOverlay`` protocol. */ - (void)removeOverlays:(NSArray> *)overlays; @@ -1897,12 +1901,12 @@ MLN_EXPORT information about searching for map features, see that method’s documentation. @param point A point expressed in the map view’s coordinate system. - @return An array of objects conforming to the `MLNFeature` protocol that + @return An array of objects conforming to the ``MLNFeature`` protocol that represent features in the sources used by the current style. #### Related examples - TODO: Select a feature within a layer: to learn how to query an - `MLNMapView` object for visible `MLNFeature` objects. + ``MLNMapView`` object for visible ``MLNMapView`` objects. */ - (NSArray> *)visibleFeaturesAtPoint:(CGPoint)point NS_SWIFT_NAME(visibleFeatures(at:)); @@ -1921,7 +1925,7 @@ MLN_EXPORT @param styleLayerIdentifiers A set of strings that correspond to the names of layers defined in the current style. Only the features contained in these layers are included in the returned array. - @return An array of objects conforming to the `MLNFeature` protocol that + @return An array of objects conforming to the ``MLNFeature`` protocol that represent features in the sources used by the current style. */ - (NSArray> *)visibleFeaturesAtPoint:(CGPoint)point @@ -1936,8 +1940,8 @@ MLN_EXPORT Each object in the returned array represents a feature rendered by the current style and provides access to attributes specified by the relevant map content sources. The returned array includes features loaded by - `MLNShapeSource` and `MLNVectorTileSource` objects but does not include - anything from `MLNRasterTileSource` objects, or from video or canvas sources, + ``MLNShapeSource`` and ``MLNShapeSource`` objects but does not include + anything from ``MLNRasterTileSource`` objects, or from video or canvas sources, which are unsupported by this SDK. The returned features are drawn by a style layer in the current style. For @@ -1947,7 +1951,7 @@ MLN_EXPORT property set to `bus`. If you pass a point corresponding to the location of a bus stop into this method, the bus stop feature does not appear in the resulting array. On the other hand, if the style does include bus stops, an - `MLNFeature` object representing that bus stop is returned and its + ``MLNFeature`` object representing that bus stop is returned and its `featureAttributes` dictionary has the `maki` key set to `bus` (along with other attributes). The dictionary contains only the attributes provided by the tile source; it does not include computed attribute values or rules about how @@ -1970,28 +1974,21 @@ MLN_EXPORT Only visible features are returned. To obtain features regardless of visibility, use the - `-[MLNVectorTileSource featuresInSourceLayersWithIdentifiers:predicate:]` and - `-[MLNShapeSource featuresMatchingPredicate:]` methods on the relevant sources. + ``MLNVectorTileSource/featuresInSourceLayersWithIdentifiers:predicate:`` and + ``MLNShapeSource/featuresMatchingPredicate:`` methods on the relevant sources. The returned features may also include features corresponding to annotations. - These features are not object-equal to the `MLNAnnotation` objects that were + These features are not object-equal to the ``MLNAnnotation`` objects that were originally added to the map. To query the map for annotations, use - `visibleAnnotations` or `-[MLNMapView visibleAnnotationsInRect:]`. + `visibleAnnotations` or ``MLNMapView/visibleAnnotationsInRect:``. - @note Layer identifiers are not guaranteed to exist across styles or different - versions of the same style. Applications that use this API must first set - the style URL to an explicitly versioned style using a convenience method - like `+[MLNStyle outdoorsStyleURLWithVersion:]`, `MLNMapView`’s “Style URL” - inspectable in Interface Builder, or a manually constructed `NSURL`. This - approach also avoids layer identifer name changes that will occur in the - default style’s layers over time. @param point A point expressed in the map view’s coordinate system. @param styleLayerIdentifiers A set of strings that correspond to the names of layers defined in the current style. Only the features contained in these layers are included in the returned array. @param predicate A predicate to filter the returned features. - @return An array of objects conforming to the `MLNFeature` protocol that + @return An array of objects conforming to the ``MLNFeature`` protocol that represent features in the sources used by the current style. */ - (NSArray> *)visibleFeaturesAtPoint:(CGPoint)point @@ -2010,7 +2007,7 @@ MLN_EXPORT information about searching for map features, see that method’s documentation. @param rect A rectangle expressed in the map view’s coordinate system. - @return An array of objects conforming to the `MLNFeature` protocol that + @return An array of objects conforming to the ``MLNFeature`` protocol that represent features in the sources used by the current style. */ - (NSArray> *)visibleFeaturesInRect:(CGRect)rect NS_SWIFT_NAME(visibleFeatures(in:)); @@ -2029,7 +2026,7 @@ MLN_EXPORT @param styleLayerIdentifiers A set of strings that correspond to the names of layers defined in the current style. Only the features contained in these layers are included in the returned array. - @return An array of objects conforming to the `MLNFeature` protocol that + @return An array of objects conforming to the ``MLNFeature`` protocol that represent features in the sources used by the current style. */ - (NSArray> *)visibleFeaturesInRect:(CGRect)rect @@ -2045,8 +2042,8 @@ MLN_EXPORT Each object in the returned array represents a feature rendered by the current style and provides access to attributes specified by the relevant map content sources. The returned array includes features loaded by - `MLNShapeSource` and `MLNVectorTileSource` objects but does not include - anything from `MLNRasterTileSource` objects, or from video or canvas sources, + ``MLNShapeSource`` and ``MLNShapeSource`` objects but does not include + anything from ``MLNRasterTileSource`` objects, or from video or canvas sources, which are unsupported by this SDK. The returned features are drawn by a style layer in the current style. For @@ -2054,7 +2051,7 @@ MLN_EXPORT but none of the specified style layers includes features that have the `maki` property set to `bus`. If you pass a rectangle containing the location of a bus stop into this method, the bus stop feature does not appear in the resulting - array. On the other hand, if the style does include bus stops, an `MLNFeature` + array. On the other hand, if the style does include bus stops, an ``MLNFeature`` object representing that bus stop is returned and its `featureAttributes` dictionary has the `maki` key set to `bus` (along with other attributes). The dictionary contains only the attributes provided by the tile source; it does @@ -2079,31 +2076,15 @@ MLN_EXPORT Only visible features are returned. To obtain features regardless of visibility, use the - `-[MLNVectorTileSource featuresInSourceLayersWithIdentifiers:predicate:]` and - `-[MLNShapeSource featuresMatchingPredicate:]` methods on the relevant sources. - - @note Layer identifiers are not guaranteed to exist across styles or different - versions of the same style. Applications that use this API must first set the - style URL to an explicitly versioned style using a convenience method like - `+[MLNStyle outdoorsStyleURLWithVersion:]`, `MLNMapView`’s “Style URL” - inspectable in Interface Builder, or a manually constructed `NSURL`. This - approach also avoids layer identifer name changes that will occur in the - default style’s layers over time. - - @note Layer identifiers are not guaranteed to exist across styles or different - versions of the same style. Applications that use this API must first set - the style URL to an explicitly versioned style using a convenience method - like `+[MLNStyle outdoorsStyleURLWithVersion:]`, `MLNMapView`’s “Style URL” - inspectable in Interface Builder, or a manually constructed `NSURL`. This - approach also avoids layer identifer name changes that will occur in the - default style’s layers over time. + ``MLNVectorTileSource/featuresInSourceLayersWithIdentifiers:predicate:`` and + ``MLNShapeSource/featuresMatchingPredicate:`` methods on the relevant sources. @param rect A rectangle expressed in the map view’s coordinate system. @param styleLayerIdentifiers A set of strings that correspond to the names of layers defined in the current style. Only the features contained in these layers are included in the returned array. @param predicate A predicate to filter the returned features. - @return An array of objects conforming to the `MLNFeature` protocol that + @return An array of objects conforming to the ``MLNFeature`` protocol that represent features in the sources used by the current style. */ - (NSArray> *)visibleFeaturesInRect:(CGRect)rect diff --git a/platform/ios/src/MLNMapView.mm b/platform/ios/src/MLNMapView.mm index c44eebbd8..47ace5aee 100644 --- a/platform/ios/src/MLNMapView.mm +++ b/platform/ios/src/MLNMapView.mm @@ -306,7 +306,7 @@ const CGFloat MLNAnnotationImagePaddingForCallout = 1; const CGSize MLNAnnotationAccessibilityElementMinimumSize = CGSizeMake(10, 10); /// The number of view annotations (excluding the user location view) that must -/// be descendents of `MLNMapView` before presentsWithTransaction is enabled. +/// be descendents of ``MLNMapView`` before presentsWithTransaction is enabled. static const NSUInteger MLNPresentsWithTransactionAnnotationCount = 0; /// An indication that the requested annotation was not found or is nonexistent. @@ -451,7 +451,7 @@ public: MLNAnnotationTagContextMap _annotationContextsByAnnotationTag; MLNAnnotationObjectTagMap _annotationTagsByAnnotation; - /// Tag of the selected annotation. If the user location annotation is selected, this ivar is set to `MLNAnnotationTagNotFound`. + /// Tag of the selected annotation. If the user location annotation is selected, this ivar is set to ``MLNAnnotationTagNotFound``. MLNAnnotationTag _selectedAnnotationTag; BOOL _userLocationAnnotationIsSelected; @@ -5440,7 +5440,7 @@ static void *windowScreenContext = &windowScreenContext; // marginInsetsHintForPresentationFromRect: - in this case we need to // ensure that partially off-screen annotations are NOT moved into view. // - // We may want to create (and fallback to) an `MLNMapViewDelegate` version + // We may want to create (and fallback to) an ``MLNMapViewDelegate`` version // of the `-[MLNCalloutView marginInsetsHintForPresentationFromRect:] // protocol method. bounds = CGRectInset(bounds, -calloutPositioningRect.size.width, -calloutPositioningRect.size.height); diff --git a/platform/ios/src/MLNMapViewDelegate.h b/platform/ios/src/MLNMapViewDelegate.h index 216e089bd..4ade8612b 100644 --- a/platform/ios/src/MLNMapViewDelegate.h +++ b/platform/ios/src/MLNMapViewDelegate.h @@ -9,9 +9,9 @@ NS_ASSUME_NONNULL_BEGIN @class MLNUserLocationAnnotationViewStyle; /** - The `MLNMapViewDelegate` protocol defines a set of optional methods that you + The ``MLNMapViewDelegate`` protocol defines a set of optional methods that you can use to receive map-related update messages. Because many map operations - require the `MLNMapView` class to load data asynchronously, the map view calls + require the ``MLNMapView`` class to load data asynchronously, the map view calls these methods to notify your application when specific operations complete. The map view also uses these methods to request information about annotations displayed on the map, such as the styles and interaction modes to apply to @@ -73,7 +73,8 @@ NS_ASSUME_NONNULL_BEGIN @return A Boolean value indicating whether the map view should stay at `oldCamera` or transition to `newCamera`. - @note If this method is implemented `-mapView:shouldChangeFromCamera:toCamera:` will not be called. + > Note: If this method is implemented `-mapView:shouldChangeFromCamera:toCamera:` will not be + called. */ - (BOOL)mapView:(MLNMapView *)mapView shouldChangeFromCamera:(MLNMapCamera *)oldCamera @@ -102,7 +103,7 @@ NS_ASSUME_NONNULL_BEGIN @param animated Whether the change will cause an animated effect on the map. @param reason The reason for the camera change. - @note If this method is implemented `-mapView:regionWillChangeAnimated:` will not be called. + > Note: If this method is implemented `-mapView:regionWillChangeAnimated:` will not be called. */ - (void)mapView:(MLNMapView *)mapView regionWillChangeWithReason:(MLNCameraChangeReason)reason @@ -113,7 +114,7 @@ NS_ASSUME_NONNULL_BEGIN This method is called as the currently displayed map camera changes as part of an animation, whether due to a user gesture or due to a call to a method such - as `-[MLNMapView setCamera:animated:]`. This method can be called before + as ``MLNMapView/setCamera:animated:``. This method can be called before `-mapViewDidFinishLoadingMap:` is called. During the animation, this method may be called many times to report updates to @@ -134,7 +135,7 @@ NS_ASSUME_NONNULL_BEGIN This method is called as the currently displayed map camera changes as part of an animation, whether due to a user gesture or due to a call to a method such - as `-[MLNMapView setCamera:animated:]`. This method can be called before + as ``MLNMapView/setCamera:animated:``. This method can be called before `-mapViewDidFinishLoadingMap:` is called. During the animation, this method may be called many times to report updates to @@ -144,7 +145,7 @@ NS_ASSUME_NONNULL_BEGIN @param mapView The map view whose viewpoint is changing. @param reason The reason for the camera change. - @note If this method is implemented `-mapViewRegionIsChanging:` will not be called. + > Note: If this method is implemented `-mapViewRegionIsChanging:` will not be called. */ - (void)mapView:(MLNMapView *)mapView regionIsChangingWithReason:(MLNCameraChangeReason)reason; @@ -174,7 +175,7 @@ NS_ASSUME_NONNULL_BEGIN @param animated Whether the change caused an animated effect on the map. @param reason The reason for the camera change. - @note If this method is implemented `-mapView:regionDidChangeAnimated:` will not be called. + > Note: If this method is implemented `-mapView:regionDidChangeAnimated:` will not be called. */ - (void)mapView:(MLNMapView *)mapView regionDidChangeWithReason:(MLNCameraChangeReason)reason @@ -301,7 +302,7 @@ NS_ASSUME_NONNULL_BEGIN /** Tells the delegate that the `mapView` is missing an image. The image should be added synchronously - with `-[MLNStyle setImage:forName:]` to be rendered on the current zoom level. When loading icons + with ``MLNStyle/setImage:forName:`` to be rendered on the current zoom level. When loading icons asynchronously, you can load a placeholder image and replace it when your image has loaded. @param mapView The map view that is loading the image. @@ -362,8 +363,8 @@ NS_ASSUME_NONNULL_BEGIN While the `showsUserLocation` property is set to `YES`, this method is called whenever a new location update is received by the map view. This method is also called if the map view’s user tracking mode is set to - `MLNUserTrackingModeFollowWithHeading` and the heading changes, or if it is set - to `MLNUserTrackingModeFollowWithCourse` and the course changes. + ``MLNUserTrackingMode/MLNUserTrackingModeFollowWithHeading`` and the heading changes, or if it is + set to ``MLNUserTrackingMode/MLNUserTrackingModeFollowWithCourse`` and the course changes. This method is not called if the application is currently running in the background. If you want to receive location updates while running in the @@ -407,8 +408,8 @@ NS_ASSUME_NONNULL_BEGIN When unimplemented, the user location annotation is aligned within the center of the map view with respect to the content insets. - This method will override any values set by `MLNMapView.userLocationVerticalAlignment` - or `-[MLNMapView setUserLocationVerticalAlignment:animated:]`. + This method will override any values set by ``MLNMapView/userLocationVerticalAlignment`` + or ``MLNMapView/setUserLocationVerticalAlignment:animated:``. @param mapView The map view that is tracking the user's location. */ @@ -452,7 +453,7 @@ NS_ASSUME_NONNULL_BEGIN TODO: Annotation models TODO: Add annotation views and images TODO: Mark a place on the map with an image, learn to specify which - image should be used for `MLNAnnotation` objects that have been added to + image should be used for ``MLNAnnotation`` objects that have been added to your map */ - (nullable MLNAnnotationImage *)mapView:(MLNMapView *)mapView @@ -490,7 +491,7 @@ NS_ASSUME_NONNULL_BEGIN #### Related examples TODO: Annotation models, learn how to modify the outline color of an - `MLNShape` object that has been added to your map as an annotation. + ``MLNShape`` object that has been added to your map as an annotation. */ - (UIColor *)mapView:(MLNMapView *)mapView strokeColorForShapeAnnotation:(MLNShape *)annotation; @@ -509,7 +510,7 @@ NS_ASSUME_NONNULL_BEGIN #### Related examples TODO: Add a polygon annotation, learn how to modify the color of a an - `MLNPolygon` at runtime. + ``MLNPolygon`` at runtime. */ - (UIColor *)mapView:(MLNMapView *)mapView fillColorForPolygonAnnotation:(MLNPolygon *)annotation; @@ -525,7 +526,7 @@ NS_ASSUME_NONNULL_BEGIN #### Related examples TODO: Add a line annotation from GeoJSON, learn how to modify the - line width of an `MLNPolylineFeature` on your map. + line width of an ``MLNPolylineFeature`` on your map. */ - (CGFloat)mapView:(MLNMapView *)mapView lineWidthForPolylineAnnotation:(MLNPolyline *)annotation; @@ -544,8 +545,8 @@ NS_ASSUME_NONNULL_BEGIN and draw more quickly than annotation views. The user location annotation view can also be customized via this method. When - `annotation` is an instance of `MLNUserLocation` (or equal to the map view’s - `userLocation` property), return an instance of `MLNUserLocationAnnotationView` + `annotation` is an instance of ``MLNUserLocation`` (or equal to the map view’s + `userLocation` property), return an instance of ``MLNUserLocationAnnotationView`` (or a subclass thereof). @param mapView The map view that requested the annotation view. @@ -556,7 +557,7 @@ NS_ASSUME_NONNULL_BEGIN #### Related examples TODO: Add annotation views and images, learn how to specify what - `MLNViewAnnotation` to use for a given `MLNPointAnnotation` object on your + ``MLNAnnotation`` to use for a given ``MLNAnnotation`` object on your map. */ - (nullable MLNAnnotationView *)mapView:(MLNMapView *)mapView @@ -570,7 +571,7 @@ NS_ASSUME_NONNULL_BEGIN implement this method to animate the addition of the annotation views. @param mapView The map view to which the annotation views were added. - @param annotationViews An array of `MLNAnnotationView` objects representing the + @param annotationViews An array of ``MLNAnnotationView`` objects representing the views that were added. */ - (void)mapView:(MLNMapView *)mapView @@ -684,7 +685,7 @@ NS_ASSUME_NONNULL_BEGIN TODO: Add annotation views and images TODO: Display custom views as callouts TODO: Default callout usage, learn how to show callouts for - `MLNAnnotation` objects. + ``MLNAnnotation`` objects. */ - (BOOL)mapView:(MLNMapView *)mapView annotationCanShowCallout:(id)annotation; @@ -700,12 +701,12 @@ NS_ASSUME_NONNULL_BEGIN @param mapView The map view that requested the callout view. @param annotation The object representing the annotation. - @return A view conforming to the `MLNCalloutView` protocol, or `nil` to use the + @return A view conforming to the ``MLNCalloutView`` protocol, or `nil` to use the default callout view. #### Related examples TODO: Display custom views as callouts, learn how to customize an - `MLNAnnotation` object's `MLNCalloutView`. + ``MLNAnnotation`` object's ``MLNAnnotation``. */ - (nullable id)mapView:(MLNMapView *)mapView calloutViewForAnnotation:(id)annotation; @@ -788,7 +789,7 @@ NS_ASSUME_NONNULL_BEGIN If your custom accessory views are not descendants of the `UIControl` class, the map view does not call this method. If the annotation has a custom callout view via the `-mapView:calloutViewForAnnotation:` method, you can specify the - custom accessory views using the `MLNCalloutView` protocol’s + custom accessory views using the ``MLNCalloutView`` protocol’s `leftAccessoryView` and `rightAccessoryView` properties. @param mapView The map view containing the specified annotation. @@ -810,7 +811,7 @@ NS_ASSUME_NONNULL_BEGIN opposed to the callout’s left or right accessory view. If the annotation has a custom callout view via the `-mapView:calloutViewForAnnotation:` method, this method is only called whenever the callout view calls its delegate’s - `-[MLNCalloutViewDelegate calloutViewTapped:]` method. + ``MLNCalloutViewDelegate/calloutViewTapped:`` method. If this method is present on the delegate, the standard callout view’s body momentarily highlights when the user taps it, whether or not this method does @@ -821,7 +822,7 @@ NS_ASSUME_NONNULL_BEGIN #### Related examples TODO: Display custom views as callouts, learn how to trigger an - action when an `MLNAnnotation`s `MLNCalloutView` is tapped. + action when an ``MLNAnnotation``s ``MLNAnnotation`` is tapped. */ - (void)mapView:(MLNMapView *)mapView tapOnCalloutForAnnotation:(id)annotation; diff --git a/platform/ios/src/MLNUserLocation.h b/platform/ios/src/MLNUserLocation.h index 30737c135..d2f836ebf 100644 --- a/platform/ios/src/MLNUserLocation.h +++ b/platform/ios/src/MLNUserLocation.h @@ -9,7 +9,7 @@ NS_ASSUME_NONNULL_BEGIN /** The MLNUserLocation class defines a specific type of annotation that identifies the user’s current location. You do not create instances of this class - directly. Instead, you retrieve an existing `MLNUserLocation` object from the + directly. Instead, you retrieve an existing ``MLNUserLocation`` object from the `userLocation` property of the map view displayed in your application. #### Related examples @@ -38,8 +38,8 @@ MLN_EXPORT The heading of the user location. (read-only) This property is `nil` if the user location tracking mode is not - `MLNUserTrackingModeFollowWithHeading` or if - `MLNMapView.showsUserHeadingIndicator` is disabled. + ``MLNUserTrackingMode/MLNUserTrackingModeFollowWithHeading`` or if + ``MLNMapView/showsUserHeadingIndicator`` is disabled. */ @property (nonatomic, readonly, nullable) CLHeading *heading; diff --git a/platform/ios/src/MLNUserLocationAnnotationView.h b/platform/ios/src/MLNUserLocationAnnotationView.h index 8c553c14c..cd675af17 100644 --- a/platform/ios/src/MLNUserLocationAnnotationView.h +++ b/platform/ios/src/MLNUserLocationAnnotationView.h @@ -9,7 +9,7 @@ NS_ASSUME_NONNULL_BEGIN @class MLNMapView; @class MLNUserLocation; -/** View representing an `MLNUserLocation` on screen. */ +/** View representing an ``MLNUserLocation`` on screen. */ MLN_EXPORT @interface MLNUserLocationAnnotationView : MLNAnnotationView @@ -51,7 +51,7 @@ MLN_EXPORT user interaction, a change in the user’s location, when the user tracking mode changes, or when the viewport changes. - @note During user interaction with the map, this method may be called many + > Note: During user interaction with the map, this method may be called many times to update the user location annotation. Therefore, your implementation of this method should be as lightweight as possible to avoid negatively affecting performance. diff --git a/platform/ios/vendor/SMCalloutView/SMCalloutView.h b/platform/ios/vendor/SMCalloutView/SMCalloutView.h index d90e193d4..10577cdf6 100644 --- a/platform/ios/vendor/SMCalloutView/SMCalloutView.h +++ b/platform/ios/vendor/SMCalloutView/SMCalloutView.h @@ -129,7 +129,7 @@ extern NSTimeInterval const kMLNSMCalloutViewRepositionDelayForUIScrollView; @brief Present a callout layer in the `layer` and pointing at the given rect of the `layer` bounds @discussion Same as the view-based presentation, but inserts the callout into a CALayer hierarchy instead. - @note Be aware that you'll have to direct your own touches to any accessory views, since CALayer doesn't relay touch events. + > Note: Be aware that you'll have to direct your own touches to any accessory views, since CALayer doesn't relay touch events. @param rect @c CGRect to present the view from @param layer layer to 'constrain' the @c constrainedLayer to diff --git a/platform/macos/src/MLNAnnotationImage.h b/platform/macos/src/MLNAnnotationImage.h index 9ebf260fb..e92c51918 100644 --- a/platform/macos/src/MLNAnnotationImage.h +++ b/platform/macos/src/MLNAnnotationImage.h @@ -5,8 +5,8 @@ NS_ASSUME_NONNULL_BEGIN /** - The `MLNAnnotationImage` class is responsible for presenting point-based - annotations visually on an `MLNMapView` instance. Annotation image objects pair + The ``MLNAnnotationImage`` class is responsible for presenting point-based + annotations visually on an ``MLNMapView`` instance. Annotation image objects pair `NSImage` objects with annotation-related metadata. They may be recycled later and put into a reuse queue that is maintained by the map view. */ diff --git a/platform/macos/src/MLNAttributionButton.h b/platform/macos/src/MLNAttributionButton.h index 73005ddba..256bbae35 100644 --- a/platform/macos/src/MLNAttributionButton.h +++ b/platform/macos/src/MLNAttributionButton.h @@ -11,7 +11,7 @@ NS_ASSUME_NONNULL_BEGIN MLN_EXPORT @interface MLNAttributionButton : NSButton -/// Returns an `MLNAttributionButton` instance with the given info. +/// Returns an ``MLNAttributionButton`` instance with the given info. - (instancetype)initWithAttributionInfo:(MLNAttributionInfo *)info; /// The URL to open and display as a tooltip. diff --git a/platform/macos/src/MLNMapView.h b/platform/macos/src/MLNMapView.h index f7f38e646..d3db2ea6f 100644 --- a/platform/macos/src/MLNMapView.h +++ b/platform/macos/src/MLNMapView.h @@ -22,7 +22,7 @@ NS_ASSUME_NONNULL_BEGIN An interactive, customizable map view with an interface similar to the one provided by Apple’s MapKit. - Using `MLNMapView`, you can embed the map inside a view, allow users to + Using ``MLNMapView``, you can embed the map inside a view, allow users to manipulate it with standard gestures, animate the map between different viewpoints, and present information in the form of annotations and overlays. @@ -34,7 +34,7 @@ NS_ASSUME_NONNULL_BEGIN Mapbox Studio and hosted on mapbox.com. - A collection of Mapbox-hosted styles is available through the `MLNStyle` class. + A collection of Mapbox-hosted styles is available through the ``MLNStyle`` class. These basic styles use Mapbox Streets or Mapbox Satellite data @@ -47,12 +47,12 @@ NS_ASSUME_NONNULL_BEGIN your Mapbox account. They also deter other developers from using your styles without your permission. - Adding your own gesture recognizer to `MLNMapView` will block the corresponding - gesture recognizer built into `MLNMapView`. To avoid conflicts, define which + Adding your own gesture recognizer to ``MLNMapView`` will block the corresponding + gesture recognizer built into ``MLNMapView``. To avoid conflicts, define which gesture recognizer takes precedence. For example, you can subclass `NSClickGestureRecognizer` and override `-[NSGestureRecognizer shouldRequireFailureOfGestureRecognizer:]`, so that your subclass will be invoked only if the - default `MLNMapView` click gesture recognizer fails: + default ``MLNMapView`` click gesture recognizer fails: ```swift class MapClickGestureRecognizer: NSClickGestureRecognizer { @@ -113,16 +113,9 @@ MLN_EXPORT IB_DESIGNABLE @interface MLNMapView : NSView If the style is loading, this property is set to `nil` until the style finishes loading. If the style has failed to load, this property is set to `nil`. Because the style loads asynchronously, you should manipulate it in the - `-[MLNMapViewDelegate mapView:didFinishLoadingStyle:]` or - `-[MLNMapViewDelegate mapViewDidFinishLoadingMap:]` method. It is not possible + ``MLNMapViewDelegate/mapView:didFinishLoadingStyle:`` or + ``MLNMapViewDelegate/mapViewDidFinishLoadingMap:`` method. It is not possible to manipulate the style before it has finished loading. - - @note The default styles provided by Mapbox contain sources and layers with - identifiers that will change over time. Applications that use APIs that - manipulate a style's sources and layers must first set the style URL to an - explicitly versioned style using a convenience method like - `+[MLNStyle outdoorsStyleURLWithVersion:]`, `MLNMapView`’s “Style URL” - inspectable in Interface Builder, or a manually constructed `NSURL`. */ @property (nonatomic, readonly, nullable) MLNStyle *style; @@ -787,7 +780,7 @@ around the returned camera object if it were set as the receiver’s camera. /** The complete list of annotations associated with the receiver. (read-only) - The objects in this array must adopt the `MLNAnnotation` protocol. If no + The objects in this array must adopt the ``MLNAnnotation`` protocol. If no annotations are associated with the map view, the value of this property is `nil`. */ @@ -796,14 +789,14 @@ around the returned camera object if it were set as the receiver’s camera. /** Adds an annotation to the map view. - @note `MLNMultiPolyline`, `MLNMultiPolygon`, and `MLNShapeCollection` objects - cannot be added to the map view at this time. Nor can `MLNMultiPoint` - objects that are not instances of `MLNPolyline` or `MLNPolygon`. Any + @note ``MLNMultiPolyline``, ``MLNMultiPolyline``, and ``MLNMultiPolyline`` objects + cannot be added to the map view at this time. Nor can ``MLNMultiPoint`` + objects that are not instances of ``MLNPolyline`` or ``MLNPolyline``. Any multipoint, multipolyline, multipolygon, or shape collection object that is specified is silently ignored. @param annotation The annotation object to add to the receiver. This object - must conform to the `MLNAnnotation` protocol. The map view retains the + must conform to the ``MLNAnnotation`` protocol. The map view retains the annotation object. */ - (void)addAnnotation:(id)annotation; @@ -811,14 +804,14 @@ around the returned camera object if it were set as the receiver’s camera. /** Adds an array of annotations to the map view. - @note `MLNMultiPolyline`, `MLNMultiPolygon`, and `MLNShapeCollection` objects - cannot be added to the map view at this time. Nor can `MLNMultiPoint` - objects that are not instances of `MLNPolyline` or `MLNPolygon`. Any + @note ``MLNMultiPolyline``, ``MLNMultiPolyline``, and ``MLNMultiPolyline`` objects + cannot be added to the map view at this time. Nor can ``MLNMultiPoint`` + objects that are not instances of ``MLNPolyline`` or ``MLNPolyline``. Any multipoint, multipolyline, multipolygon, or shape collection objects that are specified are silently ignored. @param annotations An array of annotation objects. Each object in the array - must conform to the `MLNAnnotation` protocol. The map view retains each + must conform to the ``MLNAnnotation`` protocol. The map view retains each individual annotation object. */ - (void)addAnnotations:(NSArray> *)annotations; @@ -827,7 +820,7 @@ around the returned camera object if it were set as the receiver’s camera. The complete list of annotations associated with the receiver that are currently visible. - The objects in this array must adopt the `MLNAnnotation` protocol. If no + The objects in this array must adopt the ``MLNAnnotation`` protocol. If no annotations are associated with the map view or if no annotations associated with the map view are currently visible, the value of this property is `nil`. */ @@ -841,7 +834,7 @@ around the returned camera object if it were set as the receiver’s camera. this method only when you want to hide or delete a given annotation. @param annotation The annotation object to remove. This object must conform to - the `MLNAnnotation` protocol. + the ``MLNAnnotation`` protocol. */ - (void)removeAnnotation:(id)annotation; @@ -854,14 +847,14 @@ around the returned camera object if it were set as the receiver’s camera. this method only when you want to hide or delete the given annotations. @param annotations The array of annotation objects to remove. Objects in the - array must conform to the `MLNAnnotation` protocol. + array must conform to the ``MLNAnnotation`` protocol. */ - (void)removeAnnotations:(NSArray> *)annotations; /** Returns a reusable annotation image object associated with its identifier. - For performance reasons, you should generally reuse `MLNAnnotationImage` + For performance reasons, you should generally reuse ``MLNAnnotationImage`` objects for identical-looking annotations in your map views. Dequeueing saves time and memory during performance-critical operations such as scrolling. @@ -879,7 +872,7 @@ around the returned camera object if it were set as the receiver’s camera. the given rectangle. @param rect A rectangle expressed in the map view’s coordinate system. - @return An array of objects that adopt the `MLNAnnotation` protocol or `nil` if + @return An array of objects that adopt the ``MLNAnnotation`` protocol or `nil` if no annotations associated with the map view are currently visible in the rectangle. */ @@ -893,7 +886,7 @@ around the returned camera object if it were set as the receiver’s camera. Assigning a new array to this property selects only the first annotation in the array. - If the annotation is of type `MLNPointAnnotation` and is offscreen, the map is + If the annotation is of type ``MLNPointAnnotation`` and is offscreen, the map is panned so that the annotation and its callout are brought just onscreen. The annotation is *not* centered within the viewport. @@ -905,7 +898,7 @@ around the returned camera object if it were set as the receiver’s camera. /** Selects an annotation and displays a callout popover for it. - If the annotation is of type `MLNPointAnnotation` and is offscreen, the map is + If the annotation is of type ``MLNPointAnnotation`` and is offscreen, the map is panned so that the annotation and its callout are brought just onscreen. The annotation is *not* centered within the viewport. @@ -955,7 +948,7 @@ around the returned camera object if it were set as the receiver’s camera. /** The complete list of overlays associated with the receiver. (read-only) - The objects in this array must adopt the `MLNOverlay` protocol. If no + The objects in this array must adopt the ``MLNOverlay`` protocol. If no overlays are associated with the map view, the value of this property is empty array. */ @@ -967,7 +960,7 @@ around the returned camera object if it were set as the receiver’s camera. To remove an overlay from a map, use the `-removeOverlay:` method. @param overlay The overlay object to add. This object must conform to the - `MLNOverlay` protocol. + ``MLNOverlay`` protocol. */ - (void)addOverlay:(id)overlay; @@ -977,7 +970,7 @@ around the returned camera object if it were set as the receiver’s camera. To remove multiple overlays from a map, use the `-removeOverlays:` method. @param overlays An array of objects, each of which must conform to the - `MLNOverlay` protocol. + ``MLNOverlay`` protocol. */ - (void)addOverlays:(NSArray> *)overlays; @@ -996,7 +989,7 @@ around the returned camera object if it were set as the receiver’s camera. If a given overlay object is not associated with the map view, it is ignored. - @param overlays An array of objects, each of which conforms to the `MLNOverlay` + @param overlays An array of objects, each of which conforms to the ``MLNOverlay`` protocol. */ - (void)removeOverlays:(NSArray> *)overlays; @@ -1012,7 +1005,7 @@ around the returned camera object if it were set as the receiver’s camera. information about searching for map features, see that method’s documentation. @param point A point expressed in the map view’s coordinate system. - @return An array of objects conforming to the `MLNFeature` protocol that + @return An array of objects conforming to the ``MLNFeature`` protocol that represent features in the sources used by the current style. */ - (NSArray> *)visibleFeaturesAtPoint:(NSPoint)point @@ -1032,7 +1025,7 @@ around the returned camera object if it were set as the receiver’s camera. @param styleLayerIdentifiers A set of strings that correspond to the names of layers defined in the current style. Only the features contained in these layers are included in the returned array. - @return An array of objects conforming to the `MLNFeature` protocol that + @return An array of objects conforming to the ``MLNFeature`` protocol that represent features in the sources used by the current style. */ - (NSArray> *)visibleFeaturesAtPoint:(NSPoint)point @@ -1047,8 +1040,8 @@ around the returned camera object if it were set as the receiver’s camera. Each object in the returned array represents a feature rendered by the current style and provides access to attributes specified by the relevant map content sources. The returned array includes features loaded by - `MLNShapeSource` and `MLNVectorTileSource` objects but does not include - anything from `MLNRasterTileSource` objects, or from video or canvas sources, + ``MLNShapeSource`` and ``MLNShapeSource`` objects but does not include + anything from ``MLNRasterTileSource`` objects, or from video or canvas sources, which are unsupported by this SDK. The returned features are drawn by a style layer in the current style. For @@ -1058,7 +1051,7 @@ around the returned camera object if it were set as the receiver’s camera. property set to `bus`. If you pass a point corresponding to the location of a bus stop into this method, the bus stop feature does not appear in the resulting array. On the other hand, if the style does include bus stops, an - `MLNFeature` object representing that bus stop is returned and its + ``MLNFeature`` object representing that bus stop is returned and its `attributes` dictionary has the `maki` key set to `bus` (along with other attributes). The dictionary contains only the attributes provided by the tile source; it does not include computed attribute values or rules about how @@ -1081,23 +1074,16 @@ around the returned camera object if it were set as the receiver’s camera. Only visible features are returned. To obtain features regardless of visibility, use the - `-[MLNVectorTileSource featuresInSourceLayersWithIdentifiers:predicate:]` and - `-[MLNShapeSource featuresMatchingPredicate:]` methods on the relevant sources. + ``MLNVectorTileSource/featuresInSourceLayersWithIdentifiers:predicate:`` and + ``MLNShapeSource/featuresMatchingPredicate:`` methods on the relevant sources. - @note Layer identifiers are not guaranteed to exist across styles or different - versions of the same style. Applications that use this API must first set - the style URL to an explicitly versioned style using a convenience method - like `+[MLNStyle outdoorsStyleURLWithVersion:]`, `MLNMapView`’s “Style URL” - inspectable in Interface Builder, or a manually constructed `NSURL`. This - approach also avoids layer identifer name changes that will occur in the - default style’s layers over time. @param point A point expressed in the map view’s coordinate system. @param styleLayerIdentifiers A set of strings that correspond to the names of layers defined in the current style. Only the features contained in these layers are included in the returned array. @param predicate A predicate to filter the returned features. - @return An array of objects conforming to the `MLNFeature` protocol that + @return An array of objects conforming to the ``MLNFeature`` protocol that represent features in the sources used by the current style. */ - (NSArray> *)visibleFeaturesAtPoint:(NSPoint)point @@ -1116,7 +1102,7 @@ around the returned camera object if it were set as the receiver’s camera. information about searching for map features, see that method’s documentation. @param rect A rectangle expressed in the map view’s coordinate system. - @return An array of objects conforming to the `MLNFeature` protocol that + @return An array of objects conforming to the ``MLNFeature`` protocol that represent features in the sources used by the current style. */ - (NSArray> *)visibleFeaturesInRect:(NSRect)rect NS_SWIFT_NAME(visibleFeatures(in:)); @@ -1135,7 +1121,7 @@ around the returned camera object if it were set as the receiver’s camera. @param styleLayerIdentifiers A set of strings that correspond to the names of layers defined in the current style. Only the features contained in these layers are included in the returned array. - @return An array of objects conforming to the `MLNFeature` protocol that + @return An array of objects conforming to the ``MLNFeature`` protocol that represent features in the sources used by the current style. */ - (NSArray> *)visibleFeaturesInRect:(NSRect)rect @@ -1151,8 +1137,8 @@ around the returned camera object if it were set as the receiver’s camera. Each object in the returned array represents a feature rendered by the current style and provides access to attributes specified by the relevant map content sources. The returned array includes features loaded by - `MLNShapeSource` and `MLNVectorTileSource` objects but does not include - anything from `MLNRasterTileSource` objects, or from video or canvas sources, + ``MLNShapeSource`` and ``MLNShapeSource`` objects but does not include + anything from ``MLNRasterTileSource`` objects, or from video or canvas sources, which are unsupported by this SDK. The returned features are drawn by a style layer in the current style. For @@ -1161,7 +1147,7 @@ around the returned camera object if it were set as the receiver’s camera. but none of the specified style layers includes features that have the `maki` property set to `bus`. If you pass a rectangle containing the location of a bus stop into this method, the bus stop feature does not appear in the resulting - array. On the other hand, if the style does include bus stops, an `MLNFeature` + array. On the other hand, if the style does include bus stops, an ``MLNFeature`` object representing that bus stop is returned and its `attributes` dictionary has the `maki` key set to `bus` (along with other attributes). The dictionary contains only the attributes provided by the tile source; it does not include @@ -1186,23 +1172,15 @@ around the returned camera object if it were set as the receiver’s camera. Only visible features are returned. To obtain features regardless of visibility, use the - `-[MLNVectorTileSource featuresInSourceLayersWithIdentifiers:predicate:]` and - `-[MLNShapeSource featuresMatchingPredicate:]` methods on the relevant sources. - - @note Layer identifiers are not guaranteed to exist across styles or different - versions of the same style. Applications that use this API must first set - the style URL to an explicitly versioned style using a convenience method - like `+[MLNStyle outdoorsStyleURLWithVersion:]`, `MLNMapView`’s “Style URL” - inspectable in Interface Builder, or a manually constructed `NSURL`. This - approach also avoids layer identifer name changes that will occur in the - default style’s layers over time. + ``MLNVectorTileSource/featuresInSourceLayersWithIdentifiers:predicate:`` and + ``MLNShapeSource/featuresMatchingPredicate:`` methods on the relevant sources. @param rect A rectangle expressed in the map view’s coordinate system. @param styleLayerIdentifiers A set of strings that correspond to the names of layers defined in the current style. Only the features contained in these layers are included in the returned array. @param predicate A predicate to filter the returned features. - @return An array of objects conforming to the `MLNFeature` protocol that + @return An array of objects conforming to the ``MLNFeature`` protocol that represent features in the sources used by the current style. */ - (NSArray> *)visibleFeaturesInRect:(NSRect)rect diff --git a/platform/macos/src/MLNMapView.mm b/platform/macos/src/MLNMapView.mm index 8e94c04d8..c8d54085e 100644 --- a/platform/macos/src/MLNMapView.mm +++ b/platform/macos/src/MLNMapView.mm @@ -2431,7 +2431,7 @@ public: : NSMaxXEdge); // The following will do nothing if the positioning rect is not on-screen. See - // `-[MLNMapView updateAnnotationCallouts]` for presenting the callout when the selected + // ``MLNMapView/updateAnnotationCallouts`` for presenting the callout when the selected // annotation comes back on-screen. [callout showRelativeToRect:positioningRect ofView:self preferredEdge:edge]; } diff --git a/platform/macos/src/MLNMapViewDelegate.h b/platform/macos/src/MLNMapViewDelegate.h index 92dedd8cf..90f36bf64 100644 --- a/platform/macos/src/MLNMapViewDelegate.h +++ b/platform/macos/src/MLNMapViewDelegate.h @@ -13,9 +13,9 @@ NS_ASSUME_NONNULL_BEGIN @protocol MLNAnnotation; /** - The `MLNMapViewDelegate` protocol defines a set of optional methods that you - can use to receive messages from an `MLNMapView` instance. Because many map - operations require the `MLNMapView` class to load data asynchronously, the map + The ``MLNMapViewDelegate`` protocol defines a set of optional methods that you + can use to receive messages from an ``MLNMapView`` instance. Because many map + operations require the ``MLNMapView`` class to load data asynchronously, the map view calls these methods to notify your application when specific operations complete. The map view also uses these methods to request information about annotations displayed on the map, such as the styles and interaction modes to @@ -44,7 +44,7 @@ NS_ASSUME_NONNULL_BEGIN This method is called as the currently displayed map camera changes as part of an animation, whether due to a user gesture or due to a call to a method such - as `-[MLNMapView setCamera:animated:]`. This method can be called before + as ``MLNMapView/setCamera:animated:``. This method can be called before `-mapViewDidFinishLoadingMap:` is called. During the animation, this method may be called many times to report updates @@ -205,7 +205,7 @@ NS_ASSUME_NONNULL_BEGIN /** Tells the delegate that the `mapView` is missing an image. The image should be added synchronously - with `-[MLNStyle setImage:forName:]` to be rendered on the current zoom level. When loading icons + with ``MLNStyle/setImage:forName:`` to be rendered on the current zoom level. When loading icons asynchronously, you can load a placeholder image and replace it when your image has loaded. @param mapView The map view that is loading the image. @@ -370,7 +370,7 @@ NS_ASSUME_NONNULL_BEGIN such as `title` and `subtitle`. If each annotation should have an identical callout, you can set the - `MLNMapView.calloutViewController` property instead. + ``MLNMapView/calloutViewController`` property instead. @param mapView The map view that is requesting a callout view controller. @param annotation The object representing the annotation.