summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMinh Nguyễn <mxn@1ec5.org>2016-12-20 16:11:05 -0800
committerGitHub <noreply@github.com>2016-12-20 16:11:05 -0800
commit1254bcdb4006d87fefedfc5020b3dc7d3cd0e544 (patch)
tree8ee29bf1575993965c2040b1318fb70388a255a9
parenta174588e6ccb5c0101479c882d399a07ba96ba76 (diff)
downloadqtlocation-mapboxgl-1254bcdb4006d87fefedfc5020b3dc7d3cd0e544.tar.gz
[ios, macos] Update and reformat documentation for runtime styling (#7475)
* [ios, macos] Optimized changelog for runtime styling Changelog entries related to style JSON now lead off with the analogous portion of the runtime styling API. * [ios, macos] Autolink cross-class property references in docs jazzy can autolink `Class.property` references in documentation comments. * [ios, macos] Removed extra blank lines * [ios, macos] Corrected typo in MGLMultiPoint docs * [ios, macos] Rewrote shape and feature docs Rewrote documentation about MGLShape, its subclasses, and MGLFeature to emphasize runtime styling uses over annotation uses, associate each type with real-world concepts, cross-reference related style layer classes, and cross-reference related or easily confused shape classes. Links to the GeoJSON specification have been updated to RFC 7946. * [ios, macos] Expanded style layer docs With this change, documentation about style layer classes is nominally based on the documentation in the style specification. However, all the existing layer types’ documentation has been overridden to explain what the layer looks like, relate the layer to a real-world concept, and cross-reference related geometry classes. This change also corrects the description of MGLBackgroundStyleLayer, which erroneously stated that the identifier must be “background”, whereas that only happens to be true by default for Studio template styles. * [ios, macos] Wrap style layer docs * [ios, macos] Removed unused code * [ios, macos] Corrected symbol references in docs * [ios, macos] Corrected typo in abstract class exception
-rw-r--r--platform/darwin/scripts/generate-style-code.js35
-rw-r--r--platform/darwin/scripts/style-spec-overrides-v8.json24
-rw-r--r--platform/darwin/src/MGLAttributionInfo.h2
-rw-r--r--platform/darwin/src/MGLBackgroundStyleLayer.h42
-rw-r--r--platform/darwin/src/MGLCircleStyleLayer.h73
-rw-r--r--platform/darwin/src/MGLFeature.h135
-rw-r--r--platform/darwin/src/MGLFillStyleLayer.h79
-rw-r--r--platform/darwin/src/MGLLineStyleLayer.h159
-rw-r--r--platform/darwin/src/MGLMultiPoint.h19
-rw-r--r--platform/darwin/src/MGLOfflinePack.h4
-rw-r--r--platform/darwin/src/MGLOfflineStorage.h3
-rw-r--r--platform/darwin/src/MGLOpenGLStyleLayer.mm17
-rw-r--r--platform/darwin/src/MGLOverlay.h5
-rw-r--r--platform/darwin/src/MGLPointAnnotation.h32
-rw-r--r--platform/darwin/src/MGLPointCollection.h27
-rw-r--r--platform/darwin/src/MGLPolygon.h58
-rw-r--r--platform/darwin/src/MGLPolyline.h58
-rw-r--r--platform/darwin/src/MGLRasterStyleLayer.h73
-rw-r--r--platform/darwin/src/MGLShape.h41
-rw-r--r--platform/darwin/src/MGLShapeCollection.h24
-rw-r--r--platform/darwin/src/MGLStyle.h2
-rw-r--r--platform/darwin/src/MGLStyleLayer.h.ejs61
-rw-r--r--platform/darwin/src/MGLSymbolStyleLayer.h627
-rw-r--r--platform/darwin/src/MGLVectorStyleLayer.m4
-rw-r--r--platform/ios/CHANGELOG.md10
-rw-r--r--platform/macos/CHANGELOG.md6
-rw-r--r--platform/macos/src/MGLMapViewDelegate.h2
27 files changed, 1137 insertions, 485 deletions
diff --git a/platform/darwin/scripts/generate-style-code.js b/platform/darwin/scripts/generate-style-code.js
index 9e79d0a321..46f55c889c 100644
--- a/platform/darwin/scripts/generate-style-code.js
+++ b/platform/darwin/scripts/generate-style-code.js
@@ -46,6 +46,15 @@ _.forOwn(cocoaConventions, function (properties, kind) {
})
});
+String.prototype.wrap = function (cols, indent) {
+ let wrapRe = new RegExp(`(.{1,${cols - indent}})(?: +|\n|$)`, "gm");
+ return this.replace(wrapRe, "$1\n").replace(/\s+$/, "").indent(indent);
+};
+
+String.prototype.indent = function (cols) {
+ return this.replace(/^|\n/g, "$&" + " ".repeat(cols));
+};
+
global.camelize = function (str) {
return str.replace(/(?:^|-)(.)/g, function (_, x) {
return x.toUpperCase();
@@ -126,7 +135,7 @@ global.testHelperMessage = function (property, layerType, isFunction) {
}
};
-global.propertyDoc = function (propertyName, property, layerType) {
+global.propertyDoc = function (propertyName, property, layerType, kind) {
// Match references to other property names & values.
// Requires the format 'When `foo` is set to `bar`,'.
let doc = property.doc.replace(/`([^`]+?)` is set to `([^`]+?)`/g, function (m, peerPropertyName, propertyValue, offset, str) {
@@ -157,11 +166,24 @@ global.propertyDoc = function (propertyName, property, layerType) {
if (!property.units.match(/s$/)) {
property.units += 's';
}
- doc += `
-
- This property is measured in ${property.units}.`;
+ doc += `\n\nThis property is measured in ${property.units}.`;
+ }
+ doc = doc.replace(/(p)ixel/gi, '$1oint').replace(/(\d)px\b/g, '$1pt');
+ if (kind !== 'enum') {
+ if ('default' in property) {
+ doc += `\n\nThe default value of this property is ${propertyDefault(property, layerType)}.`;
+ if (!property.required) {
+ doc += ' Set this property to `nil` to reset it to the default value.';
+ }
+ }
+ if ('requires' in property) {
+ doc += '\n\n' + propertyReqs(property, spec[`${kind}_${layerType}`], layerType);
+ }
+ if ('original' in property) {
+ doc += `\n\nThis attribute corresponds to the <a href="https://www.mapbox.com/mapbox-gl-style-spec/#layout-${layerType}-${property.original}"><code>${property.original}</code></a> layout property in the Mapbox Style Specification.`;
+ }
}
- return doc.replace(/(p)ixel/gi, '$1oint').replace(/(\d)px\b/g, '$1pt');
+ return doc;
};
global.propertyReqs = function (property, propertiesByName, type) {
@@ -365,11 +387,10 @@ const layers = Object.keys(spec.layer.type.values).map((type) => {
}, []);
return {
+ doc: spec.layer.type.values[type].doc,
type: type,
layoutProperties: _.sortBy(layoutProperties, ['name']),
paintProperties: _.sortBy(paintProperties, ['name']),
- layoutPropertiesByName: spec[`layout_${type}`],
- paintPropertiesByName: spec[`paint_${type}`],
};
});
diff --git a/platform/darwin/scripts/style-spec-overrides-v8.json b/platform/darwin/scripts/style-spec-overrides-v8.json
index cfda85b7fb..f42c059f59 100644
--- a/platform/darwin/scripts/style-spec-overrides-v8.json
+++ b/platform/darwin/scripts/style-spec-overrides-v8.json
@@ -1,4 +1,28 @@
{
+ "layer": {
+ "type": {
+ "values": {
+ "fill": {
+ "doc": "An `MGLFillStyleLayer` 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 in vector tiles loaded by an `MGLVectorSource` object or `MGLPolygon`, `MGLPolygonFeature`, `MGLMultiPolygon`, or `MGLMultiPolygonFeature` instances in an `MGLShapeSource` object."
+ },
+ "line": {
+ "doc": "An `MGLLineStyleLayer` 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 in vector tiles loaded by an `MGLVectorSource` object or `MGLPolyline`, `MGLPolylineFeature`, `MGLMultiPolyline`, or `MGLMultiPolylineFeature` instances in an `MGLShapeSource` object."
+ },
+ "symbol": {
+ "doc": "An `MGLSymbolStyleLayer` 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 labels for features in vector tiles loaded by an `MGLVectorSource` object or `MGLShape` or `MGLFeature` instances in an `MGLShapeSource` object."
+ },
+ "circle": {
+ "doc": "An `MGLCircleStyleLayer` 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 in vector tiles loaded by an `MGLVectorSource` object or `MGLPointAnnotation`, `MGLPointFeature`, `MGLPointCollection`, or `MGLPointCollectionFeature` instances in an `MGLShapeSource` 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 `MGLFillStyleLayer` object."
+ },
+ "raster": {
+ "doc": "An `MGLRasterStyleLayer` is a style layer that renders raster tiles on the map.\n\nUse a raster style layer to configure the color parameters of raster tiles loaded by an `MGLRasterSource` object. For example, you could use a raster style layer to render <a href=\"https://www.mapbox.com/satellite/\">Mapbox Satellite</a> imagery, a <a href=\"https://www.mapbox.com/help/define-tileset/#raster-tilesets\">raster tile set</a> uploaded to Mapbox Studio, or a raster map authored in <a href=\"https://tilemill-project.github.io/tilemill/\">TileMill</a>, the classic Mapbox Editor, or Mapbox Studio Classic."
+ },
+ "background": {
+ "doc": "An `MGLBackgroundStyleLayer` 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 `MGLFillStyleLayer` 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 `MGLStyle.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."
+ }
+ }
+ }
+ },
"layout_symbol": {
"icon-text-fit-padding": {
"doc": "Size of the additional area added to dimensions determined by `icon-text-fit`."
diff --git a/platform/darwin/src/MGLAttributionInfo.h b/platform/darwin/src/MGLAttributionInfo.h
index 7395e3f346..3c9df47912 100644
--- a/platform/darwin/src/MGLAttributionInfo.h
+++ b/platform/darwin/src/MGLAttributionInfo.h
@@ -49,7 +49,7 @@ NS_ASSUME_NONNULL_BEGIN
coordinate and zoom level.
@param centerCoordinate The map’s center coordinate.
- @param zoomLevel The map’s zoom level. See `MGLMapView`’s `zoomLevel` property
+ @param zoomLevel The map’s zoom level. See the `MGLMapView.zoomLevel` property
for more information.
@return A modified URL containing a fragment that points to the specified
viewport. If the `feedbackLink` property is set to `NO`, this method returns
diff --git a/platform/darwin/src/MGLBackgroundStyleLayer.h b/platform/darwin/src/MGLBackgroundStyleLayer.h
index 656e104bbb..bcaf21a8d4 100644
--- a/platform/darwin/src/MGLBackgroundStyleLayer.h
+++ b/platform/darwin/src/MGLBackgroundStyleLayer.h
@@ -7,10 +7,18 @@
NS_ASSUME_NONNULL_BEGIN
/**
- A map style's background layer is the bottommost layer and is used to style a color
- or pattern to show below all other map features. You can query an `MGLMapView` for its
- `style` and obtain the background layer using the `-[MGLStyle layerWithIdentifier:]`
- method and passing `background` for the identifier.
+ An `MGLBackgroundStyleLayer` 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 `MGLFillStyleLayer` objects.
+
+ A 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 `MGLStyle.layers` array.
+
+ If 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.
*/
@interface MGLBackgroundStyleLayer : MGLStyleLayer
@@ -22,18 +30,24 @@ NS_ASSUME_NONNULL_BEGIN
/**
The color with which the background will be drawn.
- The default value of this property is an `MGLStyleValue` object containing `UIColor.blackColor`. Set this property to `nil` to reset it to the default value.
-
- This property is only applied to the style if `backgroundPattern` is set to `nil`. Otherwise, it is ignored.
+ The default value of this property is an `MGLStyleValue` object containing
+ `UIColor.blackColor`. Set this property to `nil` to reset it to the default
+ value.
+
+ This property is only applied to the style if `backgroundPattern` is set to
+ `nil`. Otherwise, it is ignored.
*/
@property (nonatomic, null_resettable) MGLStyleValue<MGLColor *> *backgroundColor;
#else
/**
The color with which the background will be drawn.
- The default value of this property is an `MGLStyleValue` object containing `NSColor.blackColor`. Set this property to `nil` to reset it to the default value.
-
- This property is only applied to the style if `backgroundPattern` is set to `nil`. Otherwise, it is ignored.
+ The default value of this property is an `MGLStyleValue` object containing
+ `NSColor.blackColor`. Set this property to `nil` to reset it to the default
+ value.
+
+ This property is only applied to the style if `backgroundPattern` is set to
+ `nil`. Otherwise, it is ignored.
*/
@property (nonatomic, null_resettable) MGLStyleValue<MGLColor *> *backgroundColor;
#endif
@@ -41,12 +55,16 @@ NS_ASSUME_NONNULL_BEGIN
/**
The opacity at which the background will be drawn.
- The default value of this property is an `MGLStyleValue` object containing an `NSNumber` object containing the float `1`. Set this property to `nil` to reset it to the default value.
+ The default value of this property is an `MGLStyleValue` object containing an
+ `NSNumber` object containing the float `1`. Set this property to `nil` to reset
+ it to the default value.
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *backgroundOpacity;
/**
- Name of image in style images to use for drawing an image background. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512).
+ Name of image in style images to use for drawing an image background. For
+ seamless patterns, image width and height must be a factor of two (2, 4, 8,
+ ..., 512).
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSString *> *backgroundPattern;
diff --git a/platform/darwin/src/MGLCircleStyleLayer.h b/platform/darwin/src/MGLCircleStyleLayer.h
index 2d88a664ba..ddea62e5be 100644
--- a/platform/darwin/src/MGLCircleStyleLayer.h
+++ b/platform/darwin/src/MGLCircleStyleLayer.h
@@ -9,7 +9,8 @@ NS_ASSUME_NONNULL_BEGIN
/**
Controls the scaling behavior of the circle when the map is pitched.
- Values of this type are used in the `circlePitchScale` property of `MGLCircleStyleLayer`.
+ Values of this type are used in the `MGLCircleStyleLayer.circlePitchScale`
+ property.
*/
typedef NS_ENUM(NSUInteger, MGLCirclePitchScale) {
/**
@@ -25,7 +26,8 @@ typedef NS_ENUM(NSUInteger, MGLCirclePitchScale) {
/**
Controls the translation reference point.
- Values of this type are used in the `circleTranslateAnchor` property of `MGLCircleStyleLayer`.
+ Values of this type are used in the `MGLCircleStyleLayer.circleTranslateAnchor`
+ property.
*/
typedef NS_ENUM(NSUInteger, MGLCircleTranslateAnchor) {
/**
@@ -39,19 +41,36 @@ typedef NS_ENUM(NSUInteger, MGLCircleTranslateAnchor) {
};
/**
- A circle layer which allows customization of styling properties at runtime. You may
- instantiate a new circle layer to add to a map style or you may query an
- `MGLMapView` for its `style` and obtain existing layers using the
- `-[MGLStyle layerWithIdentifier:]` method.
+ An `MGLCircleStyleLayer` is a style layer that renders one or more filled
+ circles on the map.
+
+ Use a circle style layer to configure the visual appearance of point or point
+ collection features in vector tiles loaded by an `MGLVectorSource` object or
+ `MGLPointAnnotation`, `MGLPointFeature`, `MGLPointCollection`, or
+ `MGLPointCollectionFeature` instances in an `MGLShapeSource` object.
+
+ A 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
+ `MGLFillStyleLayer` object.
+
+ You can access an existing circle style layer using the
+ `-[MGLStyle layerWithIdentifier:]` method if you know its identifier;
+ otherwise, find it using the `MGLStyle.layers` property. You can also create a
+ new circle style layer and add it to the style using a method such as
+ `-[MGLStyle addLayer:]`.
*/
@interface MGLCircleStyleLayer : MGLVectorStyleLayer
#pragma mark - Accessing the Paint Attributes
/**
- Amount to blur the circle. 1 blurs the circle such that only the centerpoint is full opacity.
+ Amount to blur the circle. 1 blurs the circle such that only the centerpoint is
+ full opacity.
- The default value of this property is an `MGLStyleValue` object containing an `NSNumber` object containing the float `0`. Set this property to `nil` to reset it to the default value.
+ The default value of this property is an `MGLStyleValue` object containing an
+ `NSNumber` object containing the float `0`. Set this property to `nil` to reset
+ it to the default value.
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *circleBlur;
@@ -59,14 +78,18 @@ typedef NS_ENUM(NSUInteger, MGLCircleTranslateAnchor) {
/**
The fill color of the circle.
- The default value of this property is an `MGLStyleValue` object containing `UIColor.blackColor`. Set this property to `nil` to reset it to the default value.
+ The default value of this property is an `MGLStyleValue` object containing
+ `UIColor.blackColor`. Set this property to `nil` to reset it to the default
+ value.
*/
@property (nonatomic, null_resettable) MGLStyleValue<MGLColor *> *circleColor;
#else
/**
The fill color of the circle.
- The default value of this property is an `MGLStyleValue` object containing `NSColor.blackColor`. Set this property to `nil` to reset it to the default value.
+ The default value of this property is an `MGLStyleValue` object containing
+ `NSColor.blackColor`. Set this property to `nil` to reset it to the default
+ value.
*/
@property (nonatomic, null_resettable) MGLStyleValue<MGLColor *> *circleColor;
#endif
@@ -74,41 +97,53 @@ typedef NS_ENUM(NSUInteger, MGLCircleTranslateAnchor) {
/**
The opacity at which the circle will be drawn.
- The default value of this property is an `MGLStyleValue` object containing an `NSNumber` object containing the float `1`. Set this property to `nil` to reset it to the default value.
+ The default value of this property is an `MGLStyleValue` object containing an
+ `NSNumber` object containing the float `1`. Set this property to `nil` to reset
+ it to the default value.
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *circleOpacity;
/**
Controls the scaling behavior of the circle when the map is pitched.
- The default value of this property is an `MGLStyleValue` object containing an `NSValue` object containing `MGLCirclePitchScaleMap`. Set this property to `nil` to reset it to the default value.
+ The default value of this property is an `MGLStyleValue` object containing an
+ `NSValue` object containing `MGLCirclePitchScaleMap`. Set this property to
+ `nil` to reset it to the default value.
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSValue *> *circlePitchScale;
/**
Circle radius.
-
+
This property is measured in points.
- The default value of this property is an `MGLStyleValue` object containing an `NSNumber` object containing the float `5`. Set this property to `nil` to reset it to the default value.
+ The default value of this property is an `MGLStyleValue` object containing an
+ `NSNumber` object containing the float `5`. Set this property to `nil` to reset
+ it to the default value.
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *circleRadius;
/**
The geometry's offset.
-
+
This property is measured in points.
- The default value of this property is an `MGLStyleValue` object containing an `NSValue` object containing a `CGVector` struct set to 0 points from the left and 0 points from the top. Set this property to `nil` to reset it to the default value.
+ The default value of this property is an `MGLStyleValue` object containing an
+ `NSValue` object containing a `CGVector` struct set to 0 points from the left
+ and 0 points from the top. Set this property to `nil` to reset it to the
+ default value.
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSValue *> *circleTranslate;
/**
Controls the translation reference point.
- The default value of this property is an `MGLStyleValue` object containing an `NSValue` object containing `MGLCircleTranslateAnchorMap`. Set this property to `nil` to reset it to the default value.
-
- This property is only applied to the style if `circleTranslate` is non-`nil`. Otherwise, it is ignored.
+ The default value of this property is an `MGLStyleValue` object containing an
+ `NSValue` object containing `MGLCircleTranslateAnchorMap`. Set this property to
+ `nil` to reset it to the default value.
+
+ This property is only applied to the style if `circleTranslate` is non-`nil`.
+ Otherwise, it is ignored.
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSValue *> *circleTranslateAnchor;
diff --git a/platform/darwin/src/MGLFeature.h b/platform/darwin/src/MGLFeature.h
index ed4ff627b9..e05c37720d 100644
--- a/platform/darwin/src/MGLFeature.h
+++ b/platform/darwin/src/MGLFeature.h
@@ -10,30 +10,41 @@ NS_ASSUME_NONNULL_BEGIN
/**
The `MGLFeature` protocol is used to provide details about geographic features
- contained in a map view’s
- <a href="https://www.mapbox.com/mapbox-gl-style-spec/#sources">tile sources</a>.
- Each concrete subclass of `MGLShape` in turn has a subclass that conforms to
- this protocol.
-
- Typically, you do not create feature objects yourself but rather obtain them
- using `-[MGLMapView visibleFeaturesAtPoint:]` and related methods. Each feature
- object associates a shape with an identifier and attributes as specified by the
- source. Like ordinary `MGLAnnotation` objects, some kinds of `MGLFeature`
- objects can also be added to a map view using an `MGLShapeSource` or
- `-[MGLMapView addAnnotations:]` and related methods.
+ contained in an `MGLShapeSource` or `MGLVectorSource` object. Each concrete
+ subclass of `MGLShape` 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 `MGLShapeSource` using the
+ `-[MGLShapeSource initWithIdentifier:shape:options:]` method or
+ `MGLShapeSource.shape` property. Similarly, you can add `MGLPointFeature`,
+ `MGLPolylineFeature`, and `MGLPolygonFeature` objects to the map as annotations
+ using `-[MGLMapView addAnnotations:]` and related methods.
+
+ In addition to adding data to the map, you can also extract data from the map:
+ `-[MGLMapView 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 `MGLVectorSource` objects.
+ You also reuse these feature objects as overlay annotations.
*/
@protocol MGLFeature <MGLAnnotation>
/**
- An object that uniquely identifies the feature in its containing
- <a href="https://www.mapbox.com/mapbox-gl-style-spec/#sources">tile source</a>.
+ An object that uniquely identifies the feature in its containing content
+ source.
- The identifier corresponds to the
+ You can configure an `MGLVectorStyleLayer` object to include or exclude a
+ specific feature in an `MGLShapeSource` or `MGLVectorSource`. In the
+ `MGLVectorStyleLayer.predicate` property, compare the special `$id` attribute
+ to the feature’s identifier.
+
+ In vector tiles loaded by `MGLVectorSource` objects, the identifier corresponds
+ to the
<a href="https://github.com/mapbox/vector-tile-spec/tree/master/2.1#42-features">feature identifier</a>
- (`id`) in the tile source. If the source does not specify the feature’s
- identifier, the value of this property is `nil`. If specified, the identifier
- may be an integer, floating-point number, or string. These data types are
- mapped to instances of the following Foundation classes:
+ (`id`). If the source does not specify the feature’s identifier, the value of
+ this property is `nil`. If specified, the identifier may be an integer,
+ floating-point number, or string. These data types are mapped to instances of
+ the following Foundation classes:
<table>
<thead>
@@ -49,22 +60,40 @@ NS_ASSUME_NONNULL_BEGIN
For details about the identifiers used in most Mapbox-provided styles, consult
the
<a href="https://www.mapbox.com/vector-tiles/mapbox-streets/">Mapbox Streets</a>
- layer reference. Note that while it is possible to change this value on feature
- instances obtained from `-[MGLMapView 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 `MGLShapeSource` and that
- source is added to the map and styled.
+ layer reference.
+
+ The identifier should be set before adding the feature to an `MGLShapeSource`
+ 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
+ `-[MGLMapView visibleFeaturesAtPoint:]` and related methods, doing so likewise
+ has no effect on the map’s contents.
*/
@property (nonatomic, copy, nullable) id identifier;
/**
- A dictionary of attributes for this feature specified by the
- <a href="https://www.mapbox.com/mapbox-gl-style-spec/#sources">tile source</a>.
+ A dictionary of attributes for this feature.
+
+ You can configure an `MGLVectorStyleLayer` object to include or exclude a
+ specific feature in an `MGLShapeSource` or `MGLVectorSource`. In the
+ `MGLVectorStyleLayer.predicate` property, compare a key of the attribute
+ dictionary to the value you want to include. For example, if you want an
+ `MGLLineStyleLayer` object to display only important features, you might assign
+ a value above 50 to the important features’ `importance` attribute, then set
+ `MGLVectorStyleLayer.predicate` to an `NSPredicate` with the format
+ `importance > 50`.
- The keys and values of this dictionary are determined by the tile source. In
- the tile 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:
+ You can also configure some attributes of an `MGLSymbolStyleLayer` object to
+ include the value of an attribute in this dictionary whenever it renders this
+ feature. For example, to label features in an `MGLShapeSource` object by their
+ names, you can assign a `name` attribute to each of the source’s features, then
+ set `MGLSymbolStyleLayer.textField` to an `MGLStyleValue` object containing the
+ string `{name}`.
+
+ In vector tiles loaded by `MGLVectorSource` 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:
<table>
<thead>
@@ -84,7 +113,9 @@ NS_ASSUME_NONNULL_BEGIN
<a href="https://www.mapbox.com/vector-tiles/mapbox-streets/">Mapbox Streets</a>
and
<a href="https://www.mapbox.com/vector-tiles/mapbox-terrain/">Mapbox Terrain</a>
- layer references. Note that while it is possible to change this value on feature
+ layer references.
+
+ Note that while it is possible to change this value on feature
instances obtained from `-[MGLMapView 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 `MGLShapeSource` and that
@@ -114,50 +145,66 @@ NS_ASSUME_NONNULL_BEGIN
@end
/**
- The `MGLPointFeature` class represents a point in a
- <a href="https://www.mapbox.com/mapbox-gl-style-spec/#sources">tile source</a>.
+ An `MGLPointFeature` object associates a point shape with an optional
+ identifier and attributes.
*/
@interface MGLPointFeature : MGLPointAnnotation <MGLFeature>
@end
/**
- The `MGLPolylineFeature` class represents a polyline in a
- <a href="https://www.mapbox.com/mapbox-gl-style-spec/#sources">tile source</a>.
+ An `MGLPolylineFeature` object associates a polyline shape with an optional
+ identifier and attributes.
+
+ A polyline feature is known as a
+ <a href="https://tools.ietf.org/html/rfc7946#section-3.1.4">LineString</a>
+ feature in GeoJSON.
*/
@interface MGLPolylineFeature : MGLPolyline <MGLFeature>
@end
/**
- The `MGLPolygonFeature` class represents a polygon in a
- <a href="https://www.mapbox.com/mapbox-gl-style-spec/#sources">tile source</a>.
+ An `MGLPolygonFeature` object associates a polygon shape with an optional
+ identifier and attributes.
*/
@interface MGLPolygonFeature : MGLPolygon <MGLFeature>
@end
/**
- The `MGLPointCollectionFeature` class represents a multipoint in a
- <a href="https://www.mapbox.com/mapbox-gl-style-spec/#sources">tile source</a>.
+ An `MGLPointCollectionFeature` object associates a point collection with an
+ optional identifier and attributes.
+
+ A point collection feature is known as a
+ <a href="https://tools.ietf.org/html/rfc7946#section-3.1.3">MultiPoint</a>
+ feature in GeoJSON.
*/
@interface MGLPointCollectionFeature : MGLPointCollection <MGLFeature>
@end
/**
- The `MGLMultiPolylineFeature` class represents a multipolyline in a
- <a href="https://www.mapbox.com/mapbox-gl-style-spec/#sources">tile source</a>.
+ An `MGLMultiPolylineFeature` object associates a multipolyline shape with an
+ optional identifier and attributes.
+
+ A multipolyline feature is known as a
+ <a href="https://tools.ietf.org/html/rfc7946#section-3.1.5">MultiLineString</a>
+ feature in GeoJSON.
*/
@interface MGLMultiPolylineFeature : MGLMultiPolyline <MGLFeature>
@end
/**
- The `MGLMultiPolygonFeature` class represents a multipolygon in a
- <a href="https://www.mapbox.com/mapbox-gl-style-spec/#sources">tile source</a>.
+ An `MGLMultiPolygonFeature` object associates a multipolygon shape with an
+ optional identifier and attributes.
*/
@interface MGLMultiPolygonFeature : MGLMultiPolygon <MGLFeature>
@end
/**
- The `MGLShapeCollectionFeature` class represents a shape collection in a
- <a href="https://www.mapbox.com/mapbox-gl-style-spec/#sources">tile source</a>.
+ An `MGLShapeCollectionFeature` object associates a shape collection with an
+ optional identifier and attributes.
+
+ A shape collection feature is known as a
+ <a href="https://tools.ietf.org/html/rfc7946#section-3.3">feature collection</a>
+ in GeoJSON.
*/
@interface MGLShapeCollectionFeature : MGLShapeCollection <MGLFeature>
diff --git a/platform/darwin/src/MGLFillStyleLayer.h b/platform/darwin/src/MGLFillStyleLayer.h
index cf8c18b5c2..01f1b17f97 100644
--- a/platform/darwin/src/MGLFillStyleLayer.h
+++ b/platform/darwin/src/MGLFillStyleLayer.h
@@ -9,7 +9,8 @@ NS_ASSUME_NONNULL_BEGIN
/**
Controls the translation reference point.
- Values of this type are used in the `fillTranslateAnchor` property of `MGLFillStyleLayer`.
+ Values of this type are used in the `MGLFillStyleLayer.fillTranslateAnchor`
+ property.
*/
typedef NS_ENUM(NSUInteger, MGLFillTranslateAnchor) {
/**
@@ -23,10 +24,19 @@ typedef NS_ENUM(NSUInteger, MGLFillTranslateAnchor) {
};
/**
- A fill layer which allows customization of styling properties at runtime. You may
- instantiate a new fill layer to add to a map style or you may query an
- `MGLMapView` for its `style` and obtain existing layers using the
- `-[MGLStyle layerWithIdentifier:]` method.
+ An `MGLFillStyleLayer` is a style layer that renders one or more filled (and
+ optionally stroked) polygons on the map.
+
+ Use a fill style layer to configure the visual appearance of polygon or
+ multipolygon features in vector tiles loaded by an `MGLVectorSource` object or
+ `MGLPolygon`, `MGLPolygonFeature`, `MGLMultiPolygon`, or
+ `MGLMultiPolygonFeature` instances in an `MGLShapeSource` object.
+
+ You can access an existing fill style layer using the
+ `-[MGLStyle layerWithIdentifier:]` method if you know its identifier;
+ otherwise, find it using the `MGLStyle.layers` property. You can also create a
+ new fill style layer and add it to the style using a method such as
+ `-[MGLStyle addLayer:]`.
*/
@interface MGLFillStyleLayer : MGLVectorStyleLayer
@@ -35,69 +45,90 @@ typedef NS_ENUM(NSUInteger, MGLFillTranslateAnchor) {
/**
Whether or not the fill should be antialiased.
- The default value of this property is an `MGLStyleValue` object containing an `NSNumber` object containing `YES`. Set this property to `nil` to reset it to the default value.
+ The default value of this property is an `MGLStyleValue` object containing an
+ `NSNumber` object containing `YES`. Set this property to `nil` to reset it to
+ the default value.
- This attribute corresponds to the <a href="https://www.mapbox.com/mapbox-gl-style-spec/#paint-fill-antialias"><code>fill-antialias</code></a> paint property in the Mapbox Style Specification.
+ This attribute corresponds to the <a
+ href="https://www.mapbox.com/mapbox-gl-style-spec/#layout-fill-fill-antialias"><code>fill-antialias</code></a>
+ layout property in the Mapbox Style Specification.
*/
@property (nonatomic, null_resettable, getter=isFillAntialiased) MGLStyleValue<NSNumber *> *fillAntialiased;
-
@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *fillAntialias __attribute__((unavailable("Use fillAntialiased instead.")));
#if TARGET_OS_IPHONE
/**
The color of the filled part of this layer.
- The default value of this property is an `MGLStyleValue` object containing `UIColor.blackColor`. Set this property to `nil` to reset it to the default value.
-
- This property is only applied to the style if `fillPattern` is set to `nil`. Otherwise, it is ignored.
+ The default value of this property is an `MGLStyleValue` object containing
+ `UIColor.blackColor`. Set this property to `nil` to reset it to the default
+ value.
+
+ This property is only applied to the style if `fillPattern` is set to `nil`.
+ Otherwise, it is ignored.
*/
@property (nonatomic, null_resettable) MGLStyleValue<MGLColor *> *fillColor;
#else
/**
The color of the filled part of this layer.
- The default value of this property is an `MGLStyleValue` object containing `NSColor.blackColor`. Set this property to `nil` to reset it to the default value.
-
- This property is only applied to the style if `fillPattern` is set to `nil`. Otherwise, it is ignored.
+ The default value of this property is an `MGLStyleValue` object containing
+ `NSColor.blackColor`. Set this property to `nil` to reset it to the default
+ value.
+
+ This property is only applied to the style if `fillPattern` is set to `nil`.
+ Otherwise, it is ignored.
*/
@property (nonatomic, null_resettable) MGLStyleValue<MGLColor *> *fillColor;
#endif
/**
- The opacity of the entire fill layer. In contrast to the `fillColor`, this value will also affect the 1pt stroke around the fill, if the stroke is used.
+ The opacity of the entire fill layer. In contrast to the `fillColor`, this
+ value will also affect the 1pt stroke around the fill, if the stroke is used.
- The default value of this property is an `MGLStyleValue` object containing an `NSNumber` object containing the float `1`. Set this property to `nil` to reset it to the default value.
+ The default value of this property is an `MGLStyleValue` object containing an
+ `NSNumber` object containing the float `1`. Set this property to `nil` to reset
+ it to the default value.
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *fillOpacity;
/**
The outline color of the fill. Matches the value of `fillColor` if unspecified.
-
- This property is only applied to the style if `fillPattern` is set to `nil`, and `fillAntialiased` is set to an `MGLStyleValue` object containing an `NSNumber` object containing `YES`. Otherwise, it is ignored.
+
+ This property is only applied to the style if `fillPattern` is set to `nil`,
+ and `fillAntialiased` is set to an `MGLStyleValue` object containing an
+ `NSNumber` object containing `YES`. Otherwise, it is ignored.
*/
@property (nonatomic, null_resettable) MGLStyleValue<MGLColor *> *fillOutlineColor;
/**
- Name of image in sprite to use for drawing image fills. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512).
+ Name of image in sprite to use for drawing image fills. For seamless patterns,
+ image width and height must be a factor of two (2, 4, 8, ..., 512).
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSString *> *fillPattern;
/**
The geometry's offset.
-
+
This property is measured in points.
- The default value of this property is an `MGLStyleValue` object containing an `NSValue` object containing a `CGVector` struct set to 0 points from the left and 0 points from the top. Set this property to `nil` to reset it to the default value.
+ The default value of this property is an `MGLStyleValue` object containing an
+ `NSValue` object containing a `CGVector` struct set to 0 points from the left
+ and 0 points from the top. Set this property to `nil` to reset it to the
+ default value.
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSValue *> *fillTranslate;
/**
Controls the translation reference point.
- The default value of this property is an `MGLStyleValue` object containing an `NSValue` object containing `MGLFillTranslateAnchorMap`. Set this property to `nil` to reset it to the default value.
-
- This property is only applied to the style if `fillTranslate` is non-`nil`. Otherwise, it is ignored.
+ The default value of this property is an `MGLStyleValue` object containing an
+ `NSValue` object containing `MGLFillTranslateAnchorMap`. Set this property to
+ `nil` to reset it to the default value.
+
+ This property is only applied to the style if `fillTranslate` is non-`nil`.
+ Otherwise, it is ignored.
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSValue *> *fillTranslateAnchor;
diff --git a/platform/darwin/src/MGLLineStyleLayer.h b/platform/darwin/src/MGLLineStyleLayer.h
index c47c7d5166..c0f2eb322b 100644
--- a/platform/darwin/src/MGLLineStyleLayer.h
+++ b/platform/darwin/src/MGLLineStyleLayer.h
@@ -9,19 +9,24 @@ NS_ASSUME_NONNULL_BEGIN
/**
The display of line endings.
- Values of this type are used in the `lineCap` property of `MGLLineStyleLayer`.
+ Values of this type are used in the `MGLLineStyleLayer.lineCap`
+ property.
*/
typedef NS_ENUM(NSUInteger, MGLLineCap) {
/**
- A cap with a squared-off end which is drawn to the exact endpoint of the line.
+ A cap with a squared-off end which is drawn to the exact endpoint of the
+ line.
*/
MGLLineCapButt,
/**
- A cap with a rounded end which is drawn beyond the endpoint of the line at a radius of one-half of the line's width and centered on the endpoint of the line.
+ A cap with a rounded end which is drawn beyond the endpoint of the line at
+ a radius of one-half of the line's width and centered on the endpoint of
+ the line.
*/
MGLLineCapRound,
/**
- A cap with a squared-off end which is drawn beyond the endpoint of the line at a distance of one-half of the line's width.
+ A cap with a squared-off end which is drawn beyond the endpoint of the line
+ at a distance of one-half of the line's width.
*/
MGLLineCapSquare,
};
@@ -29,19 +34,24 @@ typedef NS_ENUM(NSUInteger, MGLLineCap) {
/**
The display of lines when joining.
- Values of this type are used in the `lineJoin` property of `MGLLineStyleLayer`.
+ Values of this type are used in the `MGLLineStyleLayer.lineJoin`
+ property.
*/
typedef NS_ENUM(NSUInteger, MGLLineJoin) {
/**
- A join with a squared-off end which is drawn beyond the endpoint of the line at a distance of one-half of the line's width.
+ A join with a squared-off end which is drawn beyond the endpoint of the
+ line at a distance of one-half of the line's width.
*/
MGLLineJoinBevel,
/**
- A join with a rounded end which is drawn beyond the endpoint of the line at a radius of one-half of the line's width and centered on the endpoint of the line.
+ A join with a rounded end which is drawn beyond the endpoint of the line at
+ a radius of one-half of the line's width and centered on the endpoint of
+ the line.
*/
MGLLineJoinRound,
/**
- A join with a sharp, angled corner which is drawn with the outer sides beyond the endpoint of the path until they meet.
+ A join with a sharp, angled corner which is drawn with the outer sides
+ beyond the endpoint of the path until they meet.
*/
MGLLineJoinMiter,
};
@@ -49,7 +59,8 @@ typedef NS_ENUM(NSUInteger, MGLLineJoin) {
/**
Controls the translation reference point.
- Values of this type are used in the `lineTranslateAnchor` property of `MGLLineStyleLayer`.
+ Values of this type are used in the `MGLLineStyleLayer.lineTranslateAnchor`
+ property.
*/
typedef NS_ENUM(NSUInteger, MGLLineTranslateAnchor) {
/**
@@ -63,10 +74,19 @@ typedef NS_ENUM(NSUInteger, MGLLineTranslateAnchor) {
};
/**
- A line layer which allows customization of styling properties at runtime. You may
- instantiate a new line layer to add to a map style or you may query an
- `MGLMapView` for its `style` and obtain existing layers using the
- `-[MGLStyle layerWithIdentifier:]` method.
+ An `MGLLineStyleLayer` is a style layer that renders one or more stroked
+ polylines on the map.
+
+ Use a line style layer to configure the visual appearance of polyline or
+ multipolyline features in vector tiles loaded by an `MGLVectorSource` object or
+ `MGLPolyline`, `MGLPolylineFeature`, `MGLMultiPolyline`, or
+ `MGLMultiPolylineFeature` instances in an `MGLShapeSource` object.
+
+ You can access an existing line style layer using the
+ `-[MGLStyle layerWithIdentifier:]` method if you know its identifier;
+ otherwise, find it using the `MGLStyle.layers` property. You can also create a
+ new line style layer and add it to the style using a method such as
+ `-[MGLStyle addLayer:]`.
*/
@interface MGLLineStyleLayer : MGLVectorStyleLayer
@@ -75,32 +95,44 @@ typedef NS_ENUM(NSUInteger, MGLLineTranslateAnchor) {
/**
The display of line endings.
- The default value of this property is an `MGLStyleValue` object containing an `NSValue` object containing `MGLLineCapButt`. Set this property to `nil` to reset it to the default value.
+ The default value of this property is an `MGLStyleValue` object containing an
+ `NSValue` object containing `MGLLineCapButt`. Set this property to `nil` to
+ reset it to the default value.
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSValue *> *lineCap;
/**
The display of lines when joining.
- The default value of this property is an `MGLStyleValue` object containing an `NSValue` object containing `MGLLineJoinMiter`. Set this property to `nil` to reset it to the default value.
+ The default value of this property is an `MGLStyleValue` object containing an
+ `NSValue` object containing `MGLLineJoinMiter`. Set this property to `nil` to
+ reset it to the default value.
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSValue *> *lineJoin;
/**
Used to automatically convert miter joins to bevel joins for sharp angles.
- The default value of this property is an `MGLStyleValue` object containing an `NSNumber` object containing the float `2`. Set this property to `nil` to reset it to the default value.
+ The default value of this property is an `MGLStyleValue` object containing an
+ `NSNumber` object containing the float `2`. Set this property to `nil` to reset
+ it to the default value.
- This property is only applied to the style if `lineJoin` is set to an `MGLStyleValue` object containing an `NSValue` object containing `MGLLineJoinMiter`. Otherwise, it is ignored.
+ This property is only applied to the style if `lineJoin` is set to an
+ `MGLStyleValue` object containing an `NSValue` object containing
+ `MGLLineJoinMiter`. Otherwise, it is ignored.
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *lineMiterLimit;
/**
Used to automatically convert round joins to miter joins for shallow angles.
- The default value of this property is an `MGLStyleValue` object containing an `NSNumber` object containing the float `1.05`. Set this property to `nil` to reset it to the default value.
+ The default value of this property is an `MGLStyleValue` object containing an
+ `NSNumber` object containing the float `1.05`. Set this property to `nil` to
+ reset it to the default value.
- This property is only applied to the style if `lineJoin` is set to an `MGLStyleValue` object containing an `NSValue` object containing `MGLLineJoinRound`. Otherwise, it is ignored.
+ This property is only applied to the style if `lineJoin` is set to an
+ `MGLStyleValue` object containing an `NSValue` object containing
+ `MGLLineJoinRound`. Otherwise, it is ignored.
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *lineRoundLimit;
@@ -108,10 +140,12 @@ typedef NS_ENUM(NSUInteger, MGLLineTranslateAnchor) {
/**
Blur applied to the line, in points.
-
+
This property is measured in points.
- The default value of this property is an `MGLStyleValue` object containing an `NSNumber` object containing the float `0`. Set this property to `nil` to reset it to the default value.
+ The default value of this property is an `MGLStyleValue` object containing an
+ `NSNumber` object containing the float `0`. Set this property to `nil` to reset
+ it to the default value.
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *lineBlur;
@@ -119,90 +153,119 @@ typedef NS_ENUM(NSUInteger, MGLLineTranslateAnchor) {
/**
The color with which the line will be drawn.
- The default value of this property is an `MGLStyleValue` object containing `UIColor.blackColor`. Set this property to `nil` to reset it to the default value.
-
- This property is only applied to the style if `linePattern` is set to `nil`. Otherwise, it is ignored.
+ The default value of this property is an `MGLStyleValue` object containing
+ `UIColor.blackColor`. Set this property to `nil` to reset it to the default
+ value.
+
+ This property is only applied to the style if `linePattern` is set to `nil`.
+ Otherwise, it is ignored.
*/
@property (nonatomic, null_resettable) MGLStyleValue<MGLColor *> *lineColor;
#else
/**
The color with which the line will be drawn.
- The default value of this property is an `MGLStyleValue` object containing `NSColor.blackColor`. Set this property to `nil` to reset it to the default value.
-
- This property is only applied to the style if `linePattern` is set to `nil`. Otherwise, it is ignored.
+ The default value of this property is an `MGLStyleValue` object containing
+ `NSColor.blackColor`. Set this property to `nil` to reset it to the default
+ value.
+
+ This property is only applied to the style if `linePattern` is set to `nil`.
+ Otherwise, it is ignored.
*/
@property (nonatomic, null_resettable) MGLStyleValue<MGLColor *> *lineColor;
#endif
/**
- Specifies the lengths of the alternating dashes and gaps that form the dash pattern. The lengths are later scaled by the line width. To convert a dash length to points, multiply the length by the current line width.
-
+ Specifies the lengths of the alternating dashes and gaps that form the dash
+ pattern. The lengths are later scaled by the line width. To convert a dash
+ length to points, multiply the length by the current line width.
+
This property is measured in line widths.
-
- This property is only applied to the style if `linePattern` is set to `nil`. Otherwise, it is ignored.
- This attribute corresponds to the <a href="https://www.mapbox.com/mapbox-gl-style-spec/#paint-line-dasharray"><code>line-dasharray</code></a> paint property in the Mapbox Style Specification.
+ This property is only applied to the style if `linePattern` is set to `nil`.
+ Otherwise, it is ignored.
+
+ This attribute corresponds to the <a
+ href="https://www.mapbox.com/mapbox-gl-style-spec/#layout-line-line-dasharray"><code>line-dasharray</code></a>
+ layout property in the Mapbox Style Specification.
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSArray<NSNumber *> *> *lineDashPattern;
-
@property (nonatomic, null_resettable) MGLStyleValue<NSArray<NSNumber *> *> *lineDasharray __attribute__((unavailable("Use lineDashPattern instead.")));
/**
- Draws a line casing outside of a line's actual path. Value indicates the width of the inner gap.
-
+ Draws a line casing outside of a line's actual path. Value indicates the width
+ of the inner gap.
+
This property is measured in points.
- The default value of this property is an `MGLStyleValue` object containing an `NSNumber` object containing the float `0`. Set this property to `nil` to reset it to the default value.
+ The default value of this property is an `MGLStyleValue` object containing an
+ `NSNumber` object containing the float `0`. Set this property to `nil` to reset
+ it to the default value.
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *lineGapWidth;
/**
- The line's offset. For linear features, a positive value offsets the line to the right, relative to the direction of the line, and a negative value to the left. For polygon features, a positive value results in an inset, and a negative value results in an outset.
-
+ The line's offset. For linear features, a positive value offsets the line to
+ the right, relative to the direction of the line, and a negative value to the
+ left. For polygon features, a positive value results in an inset, and a
+ negative value results in an outset.
+
This property is measured in points.
- The default value of this property is an `MGLStyleValue` object containing an `NSNumber` object containing the float `0`. Set this property to `nil` to reset it to the default value.
+ The default value of this property is an `MGLStyleValue` object containing an
+ `NSNumber` object containing the float `0`. Set this property to `nil` to reset
+ it to the default value.
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *lineOffset;
/**
The opacity at which the line will be drawn.
- The default value of this property is an `MGLStyleValue` object containing an `NSNumber` object containing the float `1`. Set this property to `nil` to reset it to the default value.
+ The default value of this property is an `MGLStyleValue` object containing an
+ `NSNumber` object containing the float `1`. Set this property to `nil` to reset
+ it to the default value.
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *lineOpacity;
/**
- 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).
+ 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).
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSString *> *linePattern;
/**
The geometry's offset.
-
+
This property is measured in points.
- The default value of this property is an `MGLStyleValue` object containing an `NSValue` object containing a `CGVector` struct set to 0 points from the left and 0 points from the top. Set this property to `nil` to reset it to the default value.
+ The default value of this property is an `MGLStyleValue` object containing an
+ `NSValue` object containing a `CGVector` struct set to 0 points from the left
+ and 0 points from the top. Set this property to `nil` to reset it to the
+ default value.
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSValue *> *lineTranslate;
/**
Controls the translation reference point.
- The default value of this property is an `MGLStyleValue` object containing an `NSValue` object containing `MGLLineTranslateAnchorMap`. Set this property to `nil` to reset it to the default value.
-
- This property is only applied to the style if `lineTranslate` is non-`nil`. Otherwise, it is ignored.
+ The default value of this property is an `MGLStyleValue` object containing an
+ `NSValue` object containing `MGLLineTranslateAnchorMap`. Set this property to
+ `nil` to reset it to the default value.
+
+ This property is only applied to the style if `lineTranslate` is non-`nil`.
+ Otherwise, it is ignored.
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSValue *> *lineTranslateAnchor;
/**
Stroke thickness.
-
+
This property is measured in points.
- The default value of this property is an `MGLStyleValue` object containing an `NSNumber` object containing the float `1`. Set this property to `nil` to reset it to the default value.
+ The default value of this property is an `MGLStyleValue` object containing an
+ `NSNumber` object containing the float `1`. Set this property to `nil` to reset
+ it to the default value.
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *lineWidth;
diff --git a/platform/darwin/src/MGLMultiPoint.h b/platform/darwin/src/MGLMultiPoint.h
index ed40ee9cad..f083a5bec4 100644
--- a/platform/darwin/src/MGLMultiPoint.h
+++ b/platform/darwin/src/MGLMultiPoint.h
@@ -7,10 +7,15 @@ NS_ASSUME_NONNULL_BEGIN
/**
The `MGLMultiPoint` class is an abstract superclass used to define shapes
- composed of multiple vertices. You should not create instances of this class
- directly. Instead, you should create instances of the `MGLPolyline` or
- `MGLPolygon` classes. However, you can use the method and properties of this
- class to access information about the vertices of the line or polygon.
+ composed of multiple vertices.
+
+ You do not create instances of this class directly. Instead, you create
+ instances of the `MGLPolyline` or `MGLPolygon` classes. However, you can use
+ the method and properties of this class to access information about the
+ vertices of the line or polygon.
+
+ Do not confuse `MGLMultiPoint` with `MGLPointCollection`, which represents a
+ collection of related but disconnected points.
*/
@interface MGLMultiPoint : MGLShape
@@ -55,7 +60,7 @@ NS_ASSUME_NONNULL_BEGIN
the map, it is redrawn immediately.
@param coords The array of coordinates to insert into the shape. The data in
- this array is copied to the shape’s `coordinate` property.
+ this array is copied to the shape’s `coordinates` property.
@param count The number of items in the `coords` array.
@param index The zero-based index at which the first coordinate in `coords`
will appear in the `coordinates` property.
@@ -67,7 +72,7 @@ NS_ASSUME_NONNULL_BEGIN
the map, it is redrawn immediately.
@param coords The array of coordinates to add to the shape. The data in this
- array is copied to the shape’s `coordinate` property.
+ array is copied to the shape’s `coordinates` property.
@param count The number of items in the `coords` array.
*/
- (void)appendCoordinates:(const CLLocationCoordinate2D *)coords count:(NSUInteger)count;
@@ -90,7 +95,7 @@ NS_ASSUME_NONNULL_BEGIN
being the second vertex, and so on. The `length` field indicates the number
of vertices to replace.
@param coords The array of coordinates defining part of the shape. The data in
- this array is copied to the shape’s `coordinate` property.
+ this array is copied to the shape’s `coordinates` property.
*/
- (void)replaceCoordinatesInRange:(NSRange)range withCoordinates:(const CLLocationCoordinate2D *)coords;
diff --git a/platform/darwin/src/MGLOfflinePack.h b/platform/darwin/src/MGLOfflinePack.h
index a14d001d0f..a741833105 100644
--- a/platform/darwin/src/MGLOfflinePack.h
+++ b/platform/darwin/src/MGLOfflinePack.h
@@ -25,8 +25,8 @@ typedef NS_ENUM (NSInteger, MGLOfflinePackState) {
The pack is incomplete and is not currently downloading.
This is the initial state of a pack that is created using the
- `-[MGLOfflinePack addPackForRegion:withContext:completionHandler:]` method,
- as well as after the `-[MGLOfflinePack suspend]` method is
+ `-[MGLOfflineStorage addPackForRegion:withContext:completionHandler:]`
+ method, as well as after the `-[MGLOfflinePack suspend]` method is
called.
*/
MGLOfflinePackStateInactive = 1,
diff --git a/platform/darwin/src/MGLOfflineStorage.h b/platform/darwin/src/MGLOfflineStorage.h
index b3fb7a2d54..c58907d0d5 100644
--- a/platform/darwin/src/MGLOfflineStorage.h
+++ b/platform/darwin/src/MGLOfflineStorage.h
@@ -18,7 +18,8 @@ NS_ASSUME_NONNULL_BEGIN
`userInfo` dictionary contains the pack’s current state in the
`MGLOfflinePackStateUserInfoKey` key and details about the pack’s current
progress in the `MGLOfflinePackProgressUserInfoKey` key. You may also consult
- the pack’s `state` and `progress` properties, which provide the same values.
+ the `MGLOfflinePack.state` and `MGLOfflinePack.progress` properties, which
+ provide the same values.
If you only need to observe changes in a particular pack’s progress, you can
alternatively observe KVO change notifications to the pack’s `progress` key
diff --git a/platform/darwin/src/MGLOpenGLStyleLayer.mm b/platform/darwin/src/MGLOpenGLStyleLayer.mm
index f109ea85b0..ac2a6abcd9 100644
--- a/platform/darwin/src/MGLOpenGLStyleLayer.mm
+++ b/platform/darwin/src/MGLOpenGLStyleLayer.mm
@@ -52,10 +52,19 @@ void MGLFinishCustomStyleLayer(void *context) {
}
/**
- An `MGLOpenGLStyleLayer` is a style layer that is rendered by OpenGL code in
- Objective-C blocks or Swift closures that you specify. You may initialize a new
- OpenGL style layer to add to an `MGLStyle` or obtain one from an `MGLMapView`’s
- current style using the `-[MGLStyle layerWithIdentifier:]` method.
+ An `MGLOpenGLStyleLayer` is a style layer that is rendered by OpenGL code that
+ you provide.
+
+ By default, this class does nothing. You can subclass this class to provide
+ custom OpenGL drawing code that is run on each frame of the map. Your subclass
+ should override the `-didMoveToMapView:`, `-willMoveFromMapView:`, and
+ `-drawInMapView:withContext:` methods.
+
+ You can access an existing OpenGL style layer using the
+ `-[MGLStyle layerWithIdentifier:]` method if you know its identifier;
+ otherwise, find it using the `MGLStyle.layers` property. You can also create a
+ new OpenGL style layer and add it to the style using a method such as
+ `-[MGLStyle addLayer:]`.
@warning This API is undocumented and therefore unsupported. It may change at
any time without notice.
diff --git a/platform/darwin/src/MGLOverlay.h b/platform/darwin/src/MGLOverlay.h
index 1066a86d1e..cc32bad1e6 100644
--- a/platform/darwin/src/MGLOverlay.h
+++ b/platform/darwin/src/MGLOverlay.h
@@ -9,9 +9,8 @@ NS_ASSUME_NONNULL_BEGIN
/**
The `MGLOverlay` 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. For example,
- overlays can take the form of common shapes such as rectangles and circles.
- They can also describe polygons and other complex shapes.
+ that contain the geographic data needed to represent the map area. Overlays can
+ take the form of a polyline or polygon.
You use overlays to layer more sophisticated content on top of a map view. For
example, you could use an overlay to show the boundaries of a national park or
diff --git a/platform/darwin/src/MGLPointAnnotation.h b/platform/darwin/src/MGLPointAnnotation.h
index b552912f97..969f8c91e7 100644
--- a/platform/darwin/src/MGLPointAnnotation.h
+++ b/platform/darwin/src/MGLPointAnnotation.h
@@ -6,15 +6,37 @@
NS_ASSUME_NONNULL_BEGIN
/**
- The `MGLPointAnnotation` class defines a concrete annotation object located at
- a specified point. You can use this class, rather than define your own, in
- situations where all you want to do is associate a point on the map with a
- title.
+ An `MGLPointAnnotation` object represents a one-dimensional shape located at a
+ single geographical coordinate. Depending on how it is used, an
+ `MGLPointAnnotation` 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 `MGLShapeSource`
+ object. Configure the appearance of an `MGLShapeSource`’s or
+ `MGLVectorSource`’s point shapes collectively using an `MGLCircleStyleLayer` or
+ `MGLSymbolStyleLayer` object.
+
+ For more interactivity, add a selectable point annotation to a map view using
+ the `-[MGLMapView addAnnotation:]` method. Alternatively, define your own model
+ class that conforms to the `MGLAnnotation` protocol. Configure a point
+ annotation’s appearance using
+ `-[MGLMapViewDelegate mapView:imageForAnnotation:]` or
+ `-[MGLMapViewDelegate mapView:viewForAnnotation:]` (iOS only). A point
+ annotation’s `MGLShape.title` and `MGLShape.subtitle` 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
+ `MGLPointCollection` or `MGLShapeCollection` object.
+
+ A point shape is known as a
+ <a href="https://tools.ietf.org/html/rfc7946#section-3.1.2">Point</a> geometry
+ in GeoJSON.
*/
@interface MGLPointAnnotation : MGLShape
/**
- The coordinate point of the annotation, specified as a latitude and longitude.
+ The coordinate point of the shape, specified as a latitude and longitude.
*/
@property (nonatomic, assign) CLLocationCoordinate2D coordinate;
diff --git a/platform/darwin/src/MGLPointCollection.h b/platform/darwin/src/MGLPointCollection.h
index 95af9dae5e..9e14161aed 100644
--- a/platform/darwin/src/MGLPointCollection.h
+++ b/platform/darwin/src/MGLPointCollection.h
@@ -5,15 +5,26 @@
#import "MGLShape.h"
/**
- The `MGLPointCollection` class is used to define an array of disconnected
- coordinates. The points in the collection may be related but are not
- connected visually in any way.
+ An `MGLPointCollection` 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.
- @note `MGLPointCollection` objects cannot be added to a map view using
- `-[MGLMapView addAnnotations:]` and related methods. However, when used in a
- `MGLPointCollectionFeature` to initialize a `MGLShapeSource` that is added
- to the map view's style, the point collection represents as a group of distinct
- annotations.
+ You can add point collections to the map by adding them to an `MGLShapeSource`
+ object. Configure the appearance of an `MGLShapeSource`’s or
+ `MGLVectorSource`’s point collections collectively using an
+ `MGLCircleStyleLayer` or `MGLSymbolStyleLayer` object.
+
+ You cannot add an `MGLPointCollection` object directly to a map view as an
+ annotation. However, you can create individual `MGLPointAnnotation` objects
+ from the `coordinates` array and add those annotation objects to the map view
+ using the `-[MGLMapView addAnnotations:]` method.
+
+ A point collection is known as a
+ <a href="https://tools.ietf.org/html/rfc7946#section-3.1.3">MultiPoint</a>
+ geometry in GeoJSON. Do not confuse `MGLPointCollection` with `MGLMultiPoint`,
+ the abstract superclass of `MGLPolyline` and `MGLPolygon`.
*/
@interface MGLPointCollection : MGLShape <MGLOverlay>
diff --git a/platform/darwin/src/MGLPolygon.h b/platform/darwin/src/MGLPolygon.h
index b9ec6b8399..674c006095 100644
--- a/platform/darwin/src/MGLPolygon.h
+++ b/platform/darwin/src/MGLPolygon.h
@@ -9,10 +9,39 @@
NS_ASSUME_NONNULL_BEGIN
/**
- The `MGLPolygon` class represents a shape consisting of one or more points that
- define a closed polygon. The points are connected end-to-end in the order they
- are provided. The first and last points are connected to each other to create
- the closed shape.
+ An `MGLPolygon` 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 `MGLShapeSource`
+ object. Configure the appearance of an `MGLShapeSource`’s or
+ `MGLVectorSource`’s polygons collectively using an `MGLFillStyleLayer` or
+ `MGLSymbolStyleLayer` object.
+
+ Alternatively, you can add a polygon overlay directly to a map view using the
+ `-[MGLMapView addAnnotation:]` or `-[MGLMapView addOverlay:]` method. Configure
+ a polygon overlay’s appearance using
+ `-[MGLMapViewDelegate mapView:strokeColorForShapeAnnotation:]` and
+ `-[MGLMapViewDelegate 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
+ `MGLPolyline` object.
+
+ A polygon may have one or more interior polygons, or holes, that you specify as
+ `MGLPolygon` 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 `MGLMultiPolygon` or `MGLShapeCollection` object.
+
+ To make the polygon straddle the antimeridian, specify some longitudes less
+ than −180 degrees or greater than 180 degrees.
*/
@interface MGLPolygon : MGLMultiPoint <MGLOverlay>
@@ -55,14 +84,21 @@ NS_ASSUME_NONNULL_BEGIN
@end
/**
- The `MGLMultiPolygon` class represents a shape consisting of one or more
- polygons that do not overlap. For example, you would use an `MGLMultiPolygon`
- object to represent an atoll together with an island in the atoll’s lagoon:
- the atoll itself would be one `MGLPolygon` object, while the inner island would
- be another.
+ An `MGLMultiPolygon` 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 `MGLPolygon` 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
+ `MGLShapeSource` object. Configure the appearance of an `MGLShapeSource`’s or
+ `MGLVectorSource`’s multipolygons collectively using an `MGLFillStyleLayer` or
+ `MGLSymbolStyleLayer` object.
- @note `MGLMultiPolygon` objects cannot be added to a map view using
- `-[MGLMapView addAnnotations:]` and related methods.
+ You cannot add an `MGLMultiPolygon` object directly to a map view using
+ `-[MGLMapView addAnnotation:]` or `-[MGLMapView addOverlay:]`. However, you can
+ add the `polygons` array’s items as overlays individually.
*/
@interface MGLMultiPolygon : MGLShape <MGLOverlay>
diff --git a/platform/darwin/src/MGLPolyline.h b/platform/darwin/src/MGLPolyline.h
index cb98df9a1b..429ba9cddc 100644
--- a/platform/darwin/src/MGLPolyline.h
+++ b/platform/darwin/src/MGLPolyline.h
@@ -9,10 +9,35 @@
NS_ASSUME_NONNULL_BEGIN
/**
- The `MGLPolyline` class represents a shape consisting of one or more points
- that define connecting line segments. The points are connected end-to-end in
- the order they are provided. The first and last points are not connected to
- each other.
+ An `MGLPolyline` 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.
+
+ You can add polyline shapes to the map by adding them to an `MGLShapeSource`
+ object. Configure the appearance of an `MGLShapeSource`’s or
+ `MGLVectorSource`’s polylines collectively using an `MGLLineStyleLayer` or
+ `MGLSymbolStyleLayer` object.
+
+ Alternatively, you can add a polyline overlay directly to a map view using the
+ `-[MGLMapView addAnnotation:]` or `-[MGLMapView addOverlay:]` method. Configure
+ a polyline overlay’s appearance using
+ `-[MGLMapViewDelegate mapView:strokeColorForShapeAnnotation:]` and
+ `-[MGLMapViewDelegate mapView:lineWidthForPolylineAnnotation:]`.
+
+ The vertices are automatically connected in the order in which you provide
+ them. The first and last vertices are not connected to each other, but you can
+ specify the same `CLLocationCoordinate2D` as the first and last vertices in
+ order to close the polyline. To fill the space within the shape, use an
+ `MGLPolygon` object. To group multiple polylines together in one shape, use an
+ `MGLMultiPolyline` or `MGLShapeCollection` object.
+
+ To make the polyline straddle the antimeridian, specify some longitudes less
+ than −180 degrees or greater than 180 degrees.
+
+ A polyline is known as a
+ <a href="https://tools.ietf.org/html/rfc7946#section-3.1.4">LineString</a>
+ geometry in GeoJSON.
*/
@interface MGLPolyline : MGLMultiPoint <MGLOverlay>
@@ -30,14 +55,23 @@ NS_ASSUME_NONNULL_BEGIN
@end
/**
- The `MGLMultiPolyline` class represents a shape consisting of one or more
- polylines. For example, you could use an `MGLMultiPolyline` object to represent
- both sides of a divided highway (dual carriageway), excluding the median
- (central reservation): each carriageway would be a distinct `MGLPolyline`
- object.
-
- @note `MGLMultiPolyline` objects cannot be added to a map view using
- `-[MGLMapView addAnnotations:]` and related methods.
+ An `MGLMultiPolyline` 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 `MGLPolyline` object.
+
+ You can add multipolyline shapes to the map by adding them to an
+ `MGLShapeSource` object. Configure the appearance of an `MGLShapeSource`’s or
+ `MGLVectorSource`’s multipolylines collectively using an `MGLLineStyleLayer` or
+ `MGLSymbolStyleLayer` object.
+
+ You cannot add an `MGLMultiPolyline` object directly to a map view using
+ `-[MGLMapView addAnnotation:]` or `-[MGLMapView addOverlay:]`. However, you can
+ add the `polylines` array’s items as overlays individually.
+
+ A multipolyline is known as a
+ <a href="https://tools.ietf.org/html/rfc7946#section-3.1.5">MultiLineString</a>
+ geometry in GeoJSON.
*/
@interface MGLMultiPolyline : MGLShape <MGLOverlay>
diff --git a/platform/darwin/src/MGLRasterStyleLayer.h b/platform/darwin/src/MGLRasterStyleLayer.h
index def5221d62..52b2f8aff6 100644
--- a/platform/darwin/src/MGLRasterStyleLayer.h
+++ b/platform/darwin/src/MGLRasterStyleLayer.h
@@ -7,80 +7,111 @@
NS_ASSUME_NONNULL_BEGIN
/**
- A raster layer which allows customization of styling properties at runtime. You may
- instantiate a new raster layer to add to a map style or you may query an
- `MGLMapView` for its `style` and obtain existing layers using the
- `-[MGLStyle layerWithIdentifier:]` method.
+ An `MGLRasterStyleLayer` is a style layer that renders raster tiles on the map.
+
+ Use a raster style layer to configure the color parameters of raster tiles
+ loaded by an `MGLRasterSource` object. For example, you could use a raster
+ style layer to render <a href="https://www.mapbox.com/satellite/">Mapbox
+ Satellite</a> imagery, a <a
+ href="https://www.mapbox.com/help/define-tileset/#raster-tilesets">raster tile
+ set</a> uploaded to Mapbox Studio, or a raster map authored in <a
+ href="https://tilemill-project.github.io/tilemill/">TileMill</a>, the classic
+ Mapbox Editor, or Mapbox Studio Classic.
+
+ You can access an existing raster style layer using the
+ `-[MGLStyle layerWithIdentifier:]` method if you know its identifier;
+ otherwise, find it using the `MGLStyle.layers` property. You can also create a
+ new raster style layer and add it to the style using a method such as
+ `-[MGLStyle addLayer:]`.
*/
@interface MGLRasterStyleLayer : MGLForegroundStyleLayer
#pragma mark - Accessing the Paint Attributes
/**
- Increase or reduce the brightness of the image. The value is the maximum brightness.
+ Increase or reduce the brightness of the image. The value is the maximum
+ brightness.
- The default value of this property is an `MGLStyleValue` object containing an `NSNumber` object containing the float `1`. Set this property to `nil` to reset it to the default value.
+ The default value of this property is an `MGLStyleValue` object containing an
+ `NSNumber` object containing the float `1`. Set this property to `nil` to reset
+ it to the default value.
- This attribute corresponds to the <a href="https://www.mapbox.com/mapbox-gl-style-spec/#paint-raster-brightness-max"><code>raster-brightness-max</code></a> paint property in the Mapbox Style Specification.
+ This attribute corresponds to the <a
+ href="https://www.mapbox.com/mapbox-gl-style-spec/#layout-raster-raster-brightness-max"><code>raster-brightness-max</code></a>
+ layout property in the Mapbox Style Specification.
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *maximumRasterBrightness;
-
@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *rasterBrightnessMax __attribute__((unavailable("Use maximumRasterBrightness instead.")));
/**
- Increase or reduce the brightness of the image. The value is the minimum brightness.
+ Increase or reduce the brightness of the image. The value is the minimum
+ brightness.
- The default value of this property is an `MGLStyleValue` object containing an `NSNumber` object containing the float `0`. Set this property to `nil` to reset it to the default value.
+ The default value of this property is an `MGLStyleValue` object containing an
+ `NSNumber` object containing the float `0`. Set this property to `nil` to reset
+ it to the default value.
- This attribute corresponds to the <a href="https://www.mapbox.com/mapbox-gl-style-spec/#paint-raster-brightness-min"><code>raster-brightness-min</code></a> paint property in the Mapbox Style Specification.
+ This attribute corresponds to the <a
+ href="https://www.mapbox.com/mapbox-gl-style-spec/#layout-raster-raster-brightness-min"><code>raster-brightness-min</code></a>
+ layout property in the Mapbox Style Specification.
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *minimumRasterBrightness;
-
@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *rasterBrightnessMin __attribute__((unavailable("Use minimumRasterBrightness instead.")));
/**
Increase or reduce the contrast of the image.
- The default value of this property is an `MGLStyleValue` object containing an `NSNumber` object containing the float `0`. Set this property to `nil` to reset it to the default value.
+ The default value of this property is an `MGLStyleValue` object containing an
+ `NSNumber` object containing the float `0`. Set this property to `nil` to reset
+ it to the default value.
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *rasterContrast;
/**
Fade duration when a new tile is added.
-
+
This property is measured in milliseconds.
- The default value of this property is an `MGLStyleValue` object containing an `NSNumber` object containing the float `300`. Set this property to `nil` to reset it to the default value.
+ The default value of this property is an `MGLStyleValue` object containing an
+ `NSNumber` object containing the float `300`. Set this property to `nil` to
+ reset it to the default value.
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *rasterFadeDuration;
/**
Rotates hues around the color wheel.
-
+
This property is measured in degrees.
- The default value of this property is an `MGLStyleValue` object containing an `NSNumber` object containing the float `0`. Set this property to `nil` to reset it to the default value.
+ The default value of this property is an `MGLStyleValue` object containing an
+ `NSNumber` object containing the float `0`. Set this property to `nil` to reset
+ it to the default value.
- This attribute corresponds to the <a href="https://www.mapbox.com/mapbox-gl-style-spec/#paint-raster-hue-rotate"><code>raster-hue-rotate</code></a> paint property in the Mapbox Style Specification.
+ This attribute corresponds to the <a
+ href="https://www.mapbox.com/mapbox-gl-style-spec/#layout-raster-raster-hue-rotate"><code>raster-hue-rotate</code></a>
+ layout property in the Mapbox Style Specification.
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *rasterHueRotation;
-
@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *rasterHueRotate __attribute__((unavailable("Use rasterHueRotation instead.")));
/**
The opacity at which the image will be drawn.
- The default value of this property is an `MGLStyleValue` object containing an `NSNumber` object containing the float `1`. Set this property to `nil` to reset it to the default value.
+ The default value of this property is an `MGLStyleValue` object containing an
+ `NSNumber` object containing the float `1`. Set this property to `nil` to reset
+ it to the default value.
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *rasterOpacity;
/**
Increase or reduce the saturation of the image.
- The default value of this property is an `MGLStyleValue` object containing an `NSNumber` object containing the float `0`. Set this property to `nil` to reset it to the default value.
+ The default value of this property is an `MGLStyleValue` object containing an
+ `NSNumber` object containing the float `0`. Set this property to `nil` to reset
+ it to the default value.
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *rasterSaturation;
diff --git a/platform/darwin/src/MGLShape.h b/platform/darwin/src/MGLShape.h
index af815da0e9..ecb66118a1 100644
--- a/platform/darwin/src/MGLShape.h
+++ b/platform/darwin/src/MGLShape.h
@@ -5,11 +5,23 @@
NS_ASSUME_NONNULL_BEGIN
/**
- The `MGLShape` class is an abstract class that defines the basic properties for
- all shape-based annotation objects. This class must be subclassed and cannot be
- used as is. Subclasses are responsible for defining the geometry of the shape
- and providing an appropriate value for the coordinate property inherited from
- the `MGLAnnotation` protocol.
+ `MGLShape` 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.
+
+ You do not create instances of this class directly or create subclasses of this
+ class. Instead, you create instances of `MGLPointAnnotation`,
+ `MGLPointCollection`, `MGLPolyline`, `MGLMultiPolyline`, `MGLPolygon`,
+ `MGLMultiPolygon`, or `MGLShapeCollection`. The shape classes correspond to the
+ <a href="https://tools.ietf.org/html/rfc7946#section-3.1">Geometry</a> object
+ types in the GeoJSON standard, but some have nonstandard names for backwards
+ compatibility.
+
+ You can add shapes to the map by adding them to an `MGLShapeSource` object.
+ Configure the appearance of an `MGLShapeSource`’s or `MGLVectorSource`’s shapes
+ collectively using a concrete instance of `MGLVectorStyleLayer`. Alternatively,
+ you can add some kinds of shapes directly to a map view as annotations or
+ overlays.
*/
@interface MGLShape : NSObject <MGLAnnotation>
@@ -38,21 +50,34 @@ NS_ASSUME_NONNULL_BEGIN
#pragma mark Accessing the Shape Attributes
/**
- The title of the shape annotation. The default value of this property is `nil`.
+ The title of the shape annotation.
+
+ The default value of this property is `nil`.
+
+ This property is ignored when the shape is used in an `MGLShapeSource`. To name
+ a shape used in a shape source, create an `MGLFeature` and add an attribute to
+ the `MGLFeature.attributes` property.
*/
@property (nonatomic, copy, nullable) NSString *title;
/**
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 `MGLShapeSource`. To
+ provide additional information about a shape used in a shape source, create an
+ `MGLFeature` and add an attribute to the `MGLFeature.attributes` property.
*/
@property (nonatomic, copy, nullable) NSString *subtitle;
#if !TARGET_OS_IPHONE
/**
- The tooltip of the shape annotation. The default value of this property is
- `nil`.
+ The tooltip of the shape annotation.
+
+ The default value of this property is `nil`.
+
+ This property is ignored when the shape is used in an `MGLShapeSource`.
*/
@property (nonatomic, copy, nullable) NSString *toolTip;
diff --git a/platform/darwin/src/MGLShapeCollection.h b/platform/darwin/src/MGLShapeCollection.h
index a617223ea7..343c2a4322 100644
--- a/platform/darwin/src/MGLShapeCollection.h
+++ b/platform/darwin/src/MGLShapeCollection.h
@@ -7,12 +7,30 @@
NS_ASSUME_NONNULL_BEGIN
/**
- The `MGLShapeCollection` class represents a shape consisting of one or more
+ An `MGLShapeCollection` object represents a shape consisting of one or more
distinct but related shapes that are instances of `MGLShape`. The constituent
shapes can be a mixture of different kinds of shapes.
- @note `MGLShapeCollection` objects cannot be added to a map view using
- `-[MGLMapView addAnnotations:]` and related methods.
+ `MGLShapeCollection` is most commonly used to add multiple shapes to a single
+ `MGLShapeSource`. Configure the appearance of an `MGLShapeSource`’s or
+ `MGLVectorSource`’s shape collection collectively using an
+ `MGLSymbolStyleLayer` object, or use multiple instances of
+ `MGLCircleStyleLayer`, `MGLFillStyleLayer`, and `MGLLineStyleLayer` to
+ configure the appearance of each kind of shape inside the collection.
+
+ You cannot add an `MGLShapeCollection` object directly to a map view as an
+ annotation. However, you can create individual `MGLPointAnnotation`,
+ `MGLPolyline`, and `MGLPolygon` objects from the `shapes` array and add those
+ annotation objects to the map view using the `-[MGLMapView addAnnotations:]`
+ method.
+
+ To represent a collection of point, polyline, or polygon shapes, it may be more
+ convenient to use an `MGLPointCollection`, `MGLMultiPolyline`, or
+ `MGLMultiPolygon` object, respectively.
+
+ A multipolyline is known as a
+ <a href="https://tools.ietf.org/html/rfc7946#section-3.1.8">GeometryCollection</a>
+ geometry in GeoJSON.
*/
@interface MGLShapeCollection : MGLShape
diff --git a/platform/darwin/src/MGLStyle.h b/platform/darwin/src/MGLStyle.h
index 96dd502c30..1e0b87a73f 100644
--- a/platform/darwin/src/MGLStyle.h
+++ b/platform/darwin/src/MGLStyle.h
@@ -40,7 +40,7 @@ static const NSInteger MGLStyleDefaultVersion = 9;
via `-[MGLMapView 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 MGLStyle instance methods below.
+ style via any of the `MGLStyle` instance methods below.
You can use the `MGLMapViewDelegate` methods `-mapViewDidFinishLoadingMap:`
or `-mapView:didFinishLoadingStyle:` as indicators that it's safe
to modify the map's style.
diff --git a/platform/darwin/src/MGLStyleLayer.h.ejs b/platform/darwin/src/MGLStyleLayer.h.ejs
index 3b576e766b..2754cca1c5 100644
--- a/platform/darwin/src/MGLStyleLayer.h.ejs
+++ b/platform/darwin/src/MGLStyleLayer.h.ejs
@@ -1,9 +1,8 @@
<%
+ const doc = locals.doc;
const type = locals.type;
const layoutProperties = locals.layoutProperties;
const paintProperties = locals.paintProperties;
- const layoutPropertiesByName = locals.layoutPropertiesByName;
- const paintPropertiesByName = locals.paintPropertiesByName;
-%>
// This file is generated.
// Edit platform/darwin/scripts/generate-style-code.js, then run `make style-code-darwin`.
@@ -20,14 +19,15 @@ NS_ASSUME_NONNULL_BEGIN
<% for (const property of layoutProperties) { -%>
<% if (property.type == "enum") { -%>
/**
- <%- propertyDoc(property.name, property, type) %>
+<%- propertyDoc(property.name, property, type, 'enum').wrap(80, 1) %>
- Values of this type are used in the `<%- camelizeWithLeadingLowercase(property.name) %>` property of `MGL<%- camelize(type) %>StyleLayer`.
+ Values of this type are used in the `MGL<%- camelize(type) %>StyleLayer.<%- camelizeWithLeadingLowercase(property.name) %>`
+ property.
*/
typedef NS_ENUM(NSUInteger, MGL<%- camelize(property.name) %>) {
<% for (const value in property.values) { -%>
/**
- <%- propertyDoc(property.name, property.values[value], type) %>
+<%- propertyDoc(property.name, property.values[value], type, 'enum').wrap(80, 4+1) %>
*/
MGL<%- camelize(property.name) %><%- camelize(value) %>,
<% } -%>
@@ -38,14 +38,15 @@ typedef NS_ENUM(NSUInteger, MGL<%- camelize(property.name) %>) {
<% for (const property of paintProperties) { -%>
<% if (property.type == "enum") { -%>
/**
- <%- propertyDoc(property.name, property, type) %>
+<%- propertyDoc(property.name, property, type, 'enum').wrap(80, 1) %>
- Values of this type are used in the `<%- camelizeWithLeadingLowercase(property.name) %>` property of `MGL<%- camelize(type) %>StyleLayer`.
+ Values of this type are used in the `MGL<%- camelize(type) %>StyleLayer.<%- camelizeWithLeadingLowercase(property.name) %>`
+ property.
*/
typedef NS_ENUM(NSUInteger, MGL<%- camelize(property.name) %>) {
<% for (const value in property.values) { -%>
/**
- <%- propertyDoc(property.name, property.values[value], type) %>
+<%- propertyDoc(property.name, property.values[value], type, 'enum').wrap(80, 4+1) %>
*/
MGL<%- camelize(property.name) %><%- camelize(value) %>,
<% } -%>
@@ -55,17 +56,17 @@ typedef NS_ENUM(NSUInteger, MGL<%- camelize(property.name) %>) {
<% } -%>
<% if (type == 'background') { -%>
/**
- A map style's background layer is the bottommost layer and is used to style a color
- or pattern to show below all other map features. You can query an `MGLMapView` for its
- `style` and obtain the background layer using the `-[MGLStyle layerWithIdentifier:]`
- method and passing `background` for the identifier.
+<%- doc.wrap(80, 1) %>
*/
<% } else { -%>
/**
- A <%- type %> layer which allows customization of styling properties at runtime. You may
- instantiate a new <%- type %> layer to add to a map style or you may query an
- `MGLMapView` for its `style` and obtain existing layers using the
- `-[MGLStyle layerWithIdentifier:]` method.
+<%- doc.wrap(80, 1) %>
+
+ You can access an existing <%- type %> style layer using the
+ `-[MGLStyle layerWithIdentifier:]` method if you know its identifier;
+ otherwise, find it using the `MGLStyle.layers` property. You can also create a
+ new <%- type %> style layer and add it to the style using a method such as
+ `-[MGLStyle addLayer:]`.
*/
<% } -%>
@interface MGL<%- camelize(type) %>StyleLayer : MGL<%-
@@ -83,18 +84,7 @@ typedef NS_ENUM(NSUInteger, MGL<%- camelize(property.name) %>) {
<% for (const property of layoutProperties) { -%>
/**
- <%- propertyDoc(property.name, property, type) %>
-<% if ('default' in property) { -%>
-
- The default value of this property is <%- propertyDefault(property, type) %>.<% if (!property.required) { %> Set this property to `nil` to reset it to the default value.<% } %>
-<% } if (property.requires) { -%>
-
- <%- propertyReqs(property, layoutPropertiesByName, type) %>
-<% } -%>
-<% if (property.original) { -%>
-
- This attribute corresponds to the <a href="https://www.mapbox.com/mapbox-gl-style-spec/#layout-<%- type -%>-<%- property.original -%>"><code><%- property.original -%></code></a> layout property in the Mapbox Style Specification.
-<% } -%>
+<%- propertyDoc(property.name, property, type, 'layout').wrap(80, 1) %>
*/
@property (nonatomic<% if (!property.required) { %>, null_resettable<% } if (property.getter) { %>, getter=<%- objCGetter(property) -%><% } %>) MGLStyleValue<<%- propertyType(property, true) %>> *<%- camelizeWithLeadingLowercase(property.name) %>;
@@ -109,22 +99,11 @@ typedef NS_ENUM(NSUInteger, MGL<%- camelize(property.name) %>) {
<% for (const property of paintProperties) { -%>
/**
- <%- propertyDoc(property.name, property, type) %>
-<% if ('default' in property) { -%>
-
- The default value of this property is <%- propertyDefault(property, type) %>.<% if (!property.required) { %> Set this property to `nil` to reset it to the default value.<% } %>
-<% } if (property.requires) { -%>
-
- <%- propertyReqs(property, paintPropertiesByName, type) %>
-<% } -%>
-<% if (property.original) { -%>
-
- This attribute corresponds to the <a href="https://www.mapbox.com/mapbox-gl-style-spec/#paint-<%- property.original -%>"><code><%- property.original -%></code></a> paint property in the Mapbox Style Specification.
-<% } -%>
+<%- propertyDoc(property.name, property, type, 'paint').wrap(80, 1) %>
*/
@property (nonatomic<% if (!property.required) { %>, null_resettable<% } if (property.getter) { %>, getter=<%- objCGetter(property) -%><% } %>) MGLStyleValue<<%- propertyType(property, true) %>> *<%- camelizeWithLeadingLowercase(property.name) %>;
-<% if (property.original) { %>
+<% if (property.original) { -%>
@property (nonatomic<% if (!property.required) { %>, null_resettable<% } %>) MGLStyleValue<<%- propertyType(property, true) %>> *<%- camelizeWithLeadingLowercase(originalPropertyName(property)) %> __attribute__((unavailable("Use <%- camelizeWithLeadingLowercase(property.name) %> instead.")));
<% } -%>
diff --git a/platform/darwin/src/MGLSymbolStyleLayer.h b/platform/darwin/src/MGLSymbolStyleLayer.h
index 5a216e0354..a7b47ad2bb 100644
--- a/platform/darwin/src/MGLSymbolStyleLayer.h
+++ b/platform/darwin/src/MGLSymbolStyleLayer.h
@@ -7,21 +7,29 @@
NS_ASSUME_NONNULL_BEGIN
/**
- In combination with `symbolPlacement`, determines the rotation behavior of icons.
+ In combination with `symbolPlacement`, determines the rotation behavior of
+ icons.
- Values of this type are used in the `iconRotationAlignment` property of `MGLSymbolStyleLayer`.
+ Values of this type are used in the `MGLSymbolStyleLayer.iconRotationAlignment`
+ property.
*/
typedef NS_ENUM(NSUInteger, MGLIconRotationAlignment) {
/**
- When `symbolPlacement` is set to `MGLSymbolPlacementPoint`, aligns icons east-west. When `symbolPlacement` is set to `MGLSymbolPlacementLine`, aligns icon x-axes with the line.
+ When `symbolPlacement` is set to `MGLSymbolPlacementPoint`, aligns icons
+ east-west. When `symbolPlacement` is set to `MGLSymbolPlacementLine`,
+ aligns icon x-axes with the line.
*/
MGLIconRotationAlignmentMap,
/**
- Produces icons whose x-axes are aligned with the x-axis of the viewport, regardless of the value of `symbolPlacement`.
+ Produces icons whose x-axes are aligned with the x-axis of the viewport,
+ regardless of the value of `symbolPlacement`.
*/
MGLIconRotationAlignmentViewport,
/**
- When `symbolPlacement` is set to `MGLSymbolPlacementPoint`, this is equivalent to `MGLIconRotationAlignmentViewport`. When `symbolPlacement` is set to `MGLSymbolPlacementLine`, this is equivalent to `MGLIconRotationAlignmentMap`.
+ When `symbolPlacement` is set to `MGLSymbolPlacementPoint`, this is
+ equivalent to `MGLIconRotationAlignmentViewport`. When `symbolPlacement` is
+ set to `MGLSymbolPlacementLine`, this is equivalent to
+ `MGLIconRotationAlignmentMap`.
*/
MGLIconRotationAlignmentAuto,
};
@@ -29,7 +37,8 @@ typedef NS_ENUM(NSUInteger, MGLIconRotationAlignment) {
/**
Scales the icon to fit around the associated text.
- Values of this type are used in the `iconTextFit` property of `MGLSymbolStyleLayer`.
+ Values of this type are used in the `MGLSymbolStyleLayer.iconTextFit`
+ property.
*/
typedef NS_ENUM(NSUInteger, MGLIconTextFit) {
/**
@@ -53,7 +62,8 @@ typedef NS_ENUM(NSUInteger, MGLIconTextFit) {
/**
Label placement relative to its geometry.
- Values of this type are used in the `symbolPlacement` property of `MGLSymbolStyleLayer`.
+ Values of this type are used in the `MGLSymbolStyleLayer.symbolPlacement`
+ property.
*/
typedef NS_ENUM(NSUInteger, MGLSymbolPlacement) {
/**
@@ -61,7 +71,8 @@ typedef NS_ENUM(NSUInteger, MGLSymbolPlacement) {
*/
MGLSymbolPlacementPoint,
/**
- The label is placed along the line of the geometry. Can only be used on `LineString` and `Polygon` geometries.
+ The label is placed along the line of the geometry. Can only be used on
+ `LineString` and `Polygon` geometries.
*/
MGLSymbolPlacementLine,
};
@@ -69,7 +80,8 @@ typedef NS_ENUM(NSUInteger, MGLSymbolPlacement) {
/**
Part of the text placed closest to the anchor.
- Values of this type are used in the `textAnchor` property of `MGLSymbolStyleLayer`.
+ Values of this type are used in the `MGLSymbolStyleLayer.textAnchor`
+ property.
*/
typedef NS_ENUM(NSUInteger, MGLTextAnchor) {
/**
@@ -113,7 +125,8 @@ typedef NS_ENUM(NSUInteger, MGLTextAnchor) {
/**
Text justification options.
- Values of this type are used in the `textJustification` property of `MGLSymbolStyleLayer`.
+ Values of this type are used in the `MGLSymbolStyleLayer.textJustification`
+ property.
*/
typedef NS_ENUM(NSUInteger, MGLTextJustification) {
/**
@@ -133,7 +146,8 @@ typedef NS_ENUM(NSUInteger, MGLTextJustification) {
/**
Orientation of text when map is pitched.
- Values of this type are used in the `textPitchAlignment` property of `MGLSymbolStyleLayer`.
+ Values of this type are used in the `MGLSymbolStyleLayer.textPitchAlignment`
+ property.
*/
typedef NS_ENUM(NSUInteger, MGLTextPitchAlignment) {
/**
@@ -151,21 +165,29 @@ typedef NS_ENUM(NSUInteger, MGLTextPitchAlignment) {
};
/**
- In combination with `symbolPlacement`, determines the rotation behavior of the individual glyphs forming the text.
+ In combination with `symbolPlacement`, determines the rotation behavior of the
+ individual glyphs forming the text.
- Values of this type are used in the `textRotationAlignment` property of `MGLSymbolStyleLayer`.
+ Values of this type are used in the `MGLSymbolStyleLayer.textRotationAlignment`
+ property.
*/
typedef NS_ENUM(NSUInteger, MGLTextRotationAlignment) {
/**
- When `symbolPlacement` is set to `MGLSymbolPlacementPoint`, aligns text east-west. When `symbolPlacement` is set to `MGLSymbolPlacementLine`, aligns text x-axes with the line.
+ When `symbolPlacement` is set to `MGLSymbolPlacementPoint`, aligns text
+ east-west. When `symbolPlacement` is set to `MGLSymbolPlacementLine`,
+ aligns text x-axes with the line.
*/
MGLTextRotationAlignmentMap,
/**
- Produces glyphs whose x-axes are aligned with the x-axis of the viewport, regardless of the value of `symbolPlacement`.
+ Produces glyphs whose x-axes are aligned with the x-axis of the viewport,
+ regardless of the value of `symbolPlacement`.
*/
MGLTextRotationAlignmentViewport,
/**
- When `symbolPlacement` is set to `MGLSymbolPlacementPoint`, this is equivalent to `MGLTextRotationAlignmentViewport`. When `symbolPlacement` is set to `MGLSymbolPlacementLine`, this is equivalent to `MGLTextRotationAlignmentMap`.
+ When `symbolPlacement` is set to `MGLSymbolPlacementPoint`, this is
+ equivalent to `MGLTextRotationAlignmentViewport`. When `symbolPlacement` is
+ set to `MGLSymbolPlacementLine`, this is equivalent to
+ `MGLTextRotationAlignmentMap`.
*/
MGLTextRotationAlignmentAuto,
};
@@ -173,7 +195,8 @@ typedef NS_ENUM(NSUInteger, MGLTextRotationAlignment) {
/**
Specifies how to capitalize text.
- Values of this type are used in the `textTransform` property of `MGLSymbolStyleLayer`.
+ Values of this type are used in the `MGLSymbolStyleLayer.textTransform`
+ property.
*/
typedef NS_ENUM(NSUInteger, MGLTextTransform) {
/**
@@ -193,7 +216,8 @@ typedef NS_ENUM(NSUInteger, MGLTextTransform) {
/**
Controls the translation reference point.
- Values of this type are used in the `iconTranslateAnchor` property of `MGLSymbolStyleLayer`.
+ Values of this type are used in the `MGLSymbolStyleLayer.iconTranslateAnchor`
+ property.
*/
typedef NS_ENUM(NSUInteger, MGLIconTranslateAnchor) {
/**
@@ -209,7 +233,8 @@ typedef NS_ENUM(NSUInteger, MGLIconTranslateAnchor) {
/**
Controls the translation reference point.
- Values of this type are used in the `textTranslateAnchor` property of `MGLSymbolStyleLayer`.
+ Values of this type are used in the `MGLSymbolStyleLayer.textTranslateAnchor`
+ property.
*/
typedef NS_ENUM(NSUInteger, MGLTextTranslateAnchor) {
/**
@@ -223,23 +248,37 @@ typedef NS_ENUM(NSUInteger, MGLTextTranslateAnchor) {
};
/**
- A symbol layer which allows customization of styling properties at runtime. You may
- instantiate a new symbol layer to add to a map style or you may query an
- `MGLMapView` for its `style` and obtain existing layers using the
- `-[MGLStyle layerWithIdentifier:]` method.
+ An `MGLSymbolStyleLayer` is a style layer that renders icon and text labels at
+ points or along lines on the map.
+
+ Use a symbol style layer to configure the visual appearance of labels for
+ features in vector tiles loaded by an `MGLVectorSource` object or `MGLShape` or
+ `MGLFeature` instances in an `MGLShapeSource` object.
+
+ You can access an existing symbol style layer using the
+ `-[MGLStyle layerWithIdentifier:]` method if you know its identifier;
+ otherwise, find it using the `MGLStyle.layers` property. You can also create a
+ new symbol style layer and add it to the style using a method such as
+ `-[MGLStyle addLayer:]`.
*/
@interface MGLSymbolStyleLayer : MGLVectorStyleLayer
#pragma mark - Accessing the Layout Attributes
/**
- If true, the icon will be visible even if it collides with other previously drawn symbols.
+ If true, the icon will be visible even if it collides with other previously
+ drawn symbols.
- The default value of this property is an `MGLStyleValue` object containing an `NSNumber` object containing `NO`. Set this property to `nil` to reset it to the default value.
+ The default value of this property is an `MGLStyleValue` object containing an
+ `NSNumber` object containing `NO`. Set this property to `nil` to reset it to
+ the default value.
- This property is only applied to the style if `iconImageName` is non-`nil`. Otherwise, it is ignored.
+ This property is only applied to the style if `iconImageName` is non-`nil`.
+ Otherwise, it is ignored.
- This attribute corresponds to the <a href="https://www.mapbox.com/mapbox-gl-style-spec/#layout-symbol-icon-allow-overlap"><code>icon-allow-overlap</code></a> layout property in the Mapbox Style Specification.
+ This attribute corresponds to the <a
+ href="https://www.mapbox.com/mapbox-gl-style-spec/#layout-symbol-icon-allow-overlap"><code>icon-allow-overlap</code></a>
+ layout property in the Mapbox Style Specification.
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *iconAllowsOverlap;
@@ -249,11 +288,16 @@ typedef NS_ENUM(NSUInteger, MGLTextTranslateAnchor) {
/**
If true, other symbols can be visible even if they collide with the icon.
- The default value of this property is an `MGLStyleValue` object containing an `NSNumber` object containing `NO`. Set this property to `nil` to reset it to the default value.
+ The default value of this property is an `MGLStyleValue` object containing an
+ `NSNumber` object containing `NO`. Set this property to `nil` to reset it to
+ the default value.
- This property is only applied to the style if `iconImageName` is non-`nil`. Otherwise, it is ignored.
+ This property is only applied to the style if `iconImageName` is non-`nil`.
+ Otherwise, it is ignored.
- This attribute corresponds to the <a href="https://www.mapbox.com/mapbox-gl-style-spec/#layout-symbol-icon-ignore-placement"><code>icon-ignore-placement</code></a> layout property in the Mapbox Style Specification.
+ This attribute corresponds to the <a
+ href="https://www.mapbox.com/mapbox-gl-style-spec/#layout-symbol-icon-ignore-placement"><code>icon-ignore-placement</code></a>
+ layout property in the Mapbox Style Specification.
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *iconIgnoresPlacement;
@@ -263,7 +307,9 @@ typedef NS_ENUM(NSUInteger, MGLTextTranslateAnchor) {
/**
A string with {tokens} replaced, referencing the data property to pull from.
- This attribute corresponds to the <a href="https://www.mapbox.com/mapbox-gl-style-spec/#layout-symbol-icon-image"><code>icon-image</code></a> layout property in the Mapbox Style Specification.
+ This attribute corresponds to the <a
+ href="https://www.mapbox.com/mapbox-gl-style-spec/#layout-symbol-icon-image"><code>icon-image</code></a>
+ layout property in the Mapbox Style Specification.
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSString *> *iconImageName;
@@ -273,42 +319,58 @@ typedef NS_ENUM(NSUInteger, MGLTextTranslateAnchor) {
/**
Offset distance of icon from its anchor.
- The default value of this property is an `MGLStyleValue` object containing an `NSValue` object containing a `CGVector` struct set to 0 from the left and 0 from the top. Set this property to `nil` to reset it to the default value.
+ The default value of this property is an `MGLStyleValue` object containing an
+ `NSValue` object containing a `CGVector` struct set to 0 from the left and 0
+ from the top. Set this property to `nil` to reset it to the default value.
- This property is only applied to the style if `iconImageName` is non-`nil`. Otherwise, it is ignored.
+ This property is only applied to the style if `iconImageName` is non-`nil`.
+ Otherwise, it is ignored.
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSValue *> *iconOffset;
/**
- If true, text will display without their corresponding icons when the icon collides with other symbols and the text does not.
+ If true, text will display without their corresponding icons when the icon
+ collides with other symbols and the text does not.
- The default value of this property is an `MGLStyleValue` object containing an `NSNumber` object containing `NO`. Set this property to `nil` to reset it to the default value.
+ The default value of this property is an `MGLStyleValue` object containing an
+ `NSNumber` object containing `NO`. Set this property to `nil` to reset it to
+ the default value.
- This property is only applied to the style if `iconImageName` is non-`nil`, and `textField` is non-`nil`. Otherwise, it is ignored.
+ This property is only applied to the style if `iconImageName` is non-`nil`, and
+ `textField` is non-`nil`. Otherwise, it is ignored.
*/
@property (nonatomic, null_resettable, getter=isIconOptional) MGLStyleValue<NSNumber *> *iconOptional;
/**
- Size of the additional area around the icon bounding box used for detecting symbol collisions.
-
+ Size of the additional area around the icon bounding box used for detecting
+ symbol collisions.
+
This property is measured in points.
- The default value of this property is an `MGLStyleValue` object containing an `NSNumber` object containing the float `2`. Set this property to `nil` to reset it to the default value.
+ The default value of this property is an `MGLStyleValue` object containing an
+ `NSNumber` object containing the float `2`. Set this property to `nil` to reset
+ it to the default value.
- This property is only applied to the style if `iconImageName` is non-`nil`. Otherwise, it is ignored.
+ This property is only applied to the style if `iconImageName` is non-`nil`.
+ Otherwise, it is ignored.
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *iconPadding;
/**
Rotates the icon clockwise.
-
+
This property is measured in degrees.
- The default value of this property is an `MGLStyleValue` object containing an `NSNumber` object containing the float `0`. Set this property to `nil` to reset it to the default value.
+ The default value of this property is an `MGLStyleValue` object containing an
+ `NSNumber` object containing the float `0`. Set this property to `nil` to reset
+ it to the default value.
- This property is only applied to the style if `iconImageName` is non-`nil`. Otherwise, it is ignored.
+ This property is only applied to the style if `iconImageName` is non-`nil`.
+ Otherwise, it is ignored.
- This attribute corresponds to the <a href="https://www.mapbox.com/mapbox-gl-style-spec/#layout-symbol-icon-rotate"><code>icon-rotate</code></a> layout property in the Mapbox Style Specification.
+ This attribute corresponds to the <a
+ href="https://www.mapbox.com/mapbox-gl-style-spec/#layout-symbol-icon-rotate"><code>icon-rotate</code></a>
+ layout property in the Mapbox Style Specification.
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *iconRotation;
@@ -316,22 +378,31 @@ typedef NS_ENUM(NSUInteger, MGLTextTranslateAnchor) {
@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *iconRotate __attribute__((unavailable("Use iconRotation instead.")));
/**
- In combination with `symbolPlacement`, determines the rotation behavior of icons.
+ In combination with `symbolPlacement`, determines the rotation behavior of
+ icons.
- The default value of this property is an `MGLStyleValue` object containing an `NSValue` object containing `MGLIconRotationAlignmentAuto`. Set this property to `nil` to reset it to the default value.
+ The default value of this property is an `MGLStyleValue` object containing an
+ `NSValue` object containing `MGLIconRotationAlignmentAuto`. Set this property
+ to `nil` to reset it to the default value.
- This property is only applied to the style if `iconImageName` is non-`nil`. Otherwise, it is ignored.
+ This property is only applied to the style if `iconImageName` is non-`nil`.
+ Otherwise, it is ignored.
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSValue *> *iconRotationAlignment;
/**
Scale factor for icon. 1 is original size, 3 triples the size.
- The default value of this property is an `MGLStyleValue` object containing an `NSNumber` object containing the float `1`. Set this property to `nil` to reset it to the default value.
+ The default value of this property is an `MGLStyleValue` object containing an
+ `NSNumber` object containing the float `1`. Set this property to `nil` to reset
+ it to the default value.
- This property is only applied to the style if `iconImageName` is non-`nil`. Otherwise, it is ignored.
+ This property is only applied to the style if `iconImageName` is non-`nil`.
+ Otherwise, it is ignored.
- This attribute corresponds to the <a href="https://www.mapbox.com/mapbox-gl-style-spec/#layout-symbol-icon-size"><code>icon-size</code></a> layout property in the Mapbox Style Specification.
+ This attribute corresponds to the <a
+ href="https://www.mapbox.com/mapbox-gl-style-spec/#layout-symbol-icon-size"><code>icon-size</code></a>
+ layout property in the Mapbox Style Specification.
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *iconScale;
@@ -341,31 +412,47 @@ typedef NS_ENUM(NSUInteger, MGLTextTranslateAnchor) {
/**
Scales the icon to fit around the associated text.
- The default value of this property is an `MGLStyleValue` object containing an `NSValue` object containing `MGLIconTextFitNone`. Set this property to `nil` to reset it to the default value.
+ The default value of this property is an `MGLStyleValue` object containing an
+ `NSValue` object containing `MGLIconTextFitNone`. Set this property to `nil` to
+ reset it to the default value.
- This property is only applied to the style if `iconImageName` is non-`nil`, and `textField` is non-`nil`. Otherwise, it is ignored.
+ This property is only applied to the style if `iconImageName` is non-`nil`, and
+ `textField` is non-`nil`. Otherwise, it is ignored.
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSValue *> *iconTextFit;
/**
Size of the additional area added to dimensions determined by `iconTextFit`.
-
+
This property is measured in points.
- The default value of this property is an `MGLStyleValue` object containing an `NSValue` object containing `NSEdgeInsetsZero` or `UIEdgeInsetsZero`. Set this property to `nil` to reset it to the default value.
+ The default value of this property is an `MGLStyleValue` object containing an
+ `NSValue` object containing `NSEdgeInsetsZero` or `UIEdgeInsetsZero`. Set this
+ property to `nil` to reset it to the default value.
- This property is only applied to the style if `iconImageName` is non-`nil`, and `textField` is non-`nil`, and `iconTextFit` is set to an `MGLStyleValue` object containing an `NSValue` object containing `MGLIconTextFitBoth`, `MGLIconTextFitWidth`, or `MGLIconTextFitHeight`. Otherwise, it is ignored.
+ This property is only applied to the style if `iconImageName` is non-`nil`, and
+ `textField` is non-`nil`, and `iconTextFit` is set to an `MGLStyleValue` object
+ containing an `NSValue` object containing `MGLIconTextFitBoth`,
+ `MGLIconTextFitWidth`, or `MGLIconTextFitHeight`. Otherwise, it is ignored.
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSValue *> *iconTextFitPadding;
/**
If true, the icon may be flipped to prevent it from being rendered upside-down.
- The default value of this property is an `MGLStyleValue` object containing an `NSNumber` object containing `NO`. Set this property to `nil` to reset it to the default value.
+ The default value of this property is an `MGLStyleValue` object containing an
+ `NSNumber` object containing `NO`. Set this property to `nil` to reset it to
+ the default value.
- This property is only applied to the style if `iconImageName` is non-`nil`, and `iconRotationAlignment` is set to an `MGLStyleValue` object containing an `NSValue` object containing `MGLIconRotationAlignmentMap`, and `symbolPlacement` is set to an `MGLStyleValue` object containing an `NSValue` object containing `MGLSymbolPlacementLine`. Otherwise, it is ignored.
+ This property is only applied to the style if `iconImageName` is non-`nil`, and
+ `iconRotationAlignment` is set to an `MGLStyleValue` object containing an
+ `NSValue` object containing `MGLIconRotationAlignmentMap`, and
+ `symbolPlacement` is set to an `MGLStyleValue` object containing an `NSValue`
+ object containing `MGLSymbolPlacementLine`. Otherwise, it is ignored.
- This attribute corresponds to the <a href="https://www.mapbox.com/mapbox-gl-style-spec/#layout-symbol-icon-keep-upright"><code>icon-keep-upright</code></a> layout property in the Mapbox Style Specification.
+ This attribute corresponds to the <a
+ href="https://www.mapbox.com/mapbox-gl-style-spec/#layout-symbol-icon-keep-upright"><code>icon-keep-upright</code></a>
+ layout property in the Mapbox Style Specification.
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *keepsIconUpright;
@@ -373,13 +460,22 @@ typedef NS_ENUM(NSUInteger, MGLTextTranslateAnchor) {
@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *iconKeepUpright __attribute__((unavailable("Use keepsIconUpright instead.")));
/**
- If true, the text may be flipped vertically to prevent it from being rendered upside-down.
-
- The default value of this property is an `MGLStyleValue` object containing an `NSNumber` object containing `YES`. Set this property to `nil` to reset it to the default value.
-
- This property is only applied to the style if `textField` is non-`nil`, and `textRotationAlignment` is set to an `MGLStyleValue` object containing an `NSValue` object containing `MGLTextRotationAlignmentMap`, and `symbolPlacement` is set to an `MGLStyleValue` object containing an `NSValue` object containing `MGLSymbolPlacementLine`. Otherwise, it is ignored.
-
- This attribute corresponds to the <a href="https://www.mapbox.com/mapbox-gl-style-spec/#layout-symbol-text-keep-upright"><code>text-keep-upright</code></a> layout property in the Mapbox Style Specification.
+ If true, the text may be flipped vertically to prevent it from being rendered
+ upside-down.
+
+ The default value of this property is an `MGLStyleValue` object containing an
+ `NSNumber` object containing `YES`. Set this property to `nil` to reset it to
+ the default value.
+
+ This property is only applied to the style if `textField` is non-`nil`, and
+ `textRotationAlignment` is set to an `MGLStyleValue` object containing an
+ `NSValue` object containing `MGLTextRotationAlignmentMap`, and
+ `symbolPlacement` is set to an `MGLStyleValue` object containing an `NSValue`
+ object containing `MGLSymbolPlacementLine`. Otherwise, it is ignored.
+
+ This attribute corresponds to the <a
+ href="https://www.mapbox.com/mapbox-gl-style-spec/#layout-symbol-text-keep-upright"><code>text-keep-upright</code></a>
+ layout property in the Mapbox Style Specification.
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *keepsTextUpright;
@@ -388,14 +484,20 @@ typedef NS_ENUM(NSUInteger, MGLTextTranslateAnchor) {
/**
Maximum angle change between adjacent characters.
-
+
This property is measured in degrees.
- The default value of this property is an `MGLStyleValue` object containing an `NSNumber` object containing the float `45`. Set this property to `nil` to reset it to the default value.
+ The default value of this property is an `MGLStyleValue` object containing an
+ `NSNumber` object containing the float `45`. Set this property to `nil` to
+ reset it to the default value.
- This property is only applied to the style if `textField` is non-`nil`, and `symbolPlacement` is set to an `MGLStyleValue` object containing an `NSValue` object containing `MGLSymbolPlacementLine`. Otherwise, it is ignored.
+ This property is only applied to the style if `textField` is non-`nil`, and
+ `symbolPlacement` is set to an `MGLStyleValue` object containing an `NSValue`
+ object containing `MGLSymbolPlacementLine`. Otherwise, it is ignored.
- This attribute corresponds to the <a href="https://www.mapbox.com/mapbox-gl-style-spec/#layout-symbol-text-max-angle"><code>text-max-angle</code></a> layout property in the Mapbox Style Specification.
+ This attribute corresponds to the <a
+ href="https://www.mapbox.com/mapbox-gl-style-spec/#layout-symbol-text-max-angle"><code>text-max-angle</code></a>
+ layout property in the Mapbox Style Specification.
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *maximumTextAngle;
@@ -404,14 +506,19 @@ typedef NS_ENUM(NSUInteger, MGLTextTranslateAnchor) {
/**
The maximum line width for text wrapping.
-
+
This property is measured in ems.
- The default value of this property is an `MGLStyleValue` object containing an `NSNumber` object containing the float `10`. Set this property to `nil` to reset it to the default value.
+ The default value of this property is an `MGLStyleValue` object containing an
+ `NSNumber` object containing the float `10`. Set this property to `nil` to
+ reset it to the default value.
- This property is only applied to the style if `textField` is non-`nil`. Otherwise, it is ignored.
+ This property is only applied to the style if `textField` is non-`nil`.
+ Otherwise, it is ignored.
- This attribute corresponds to the <a href="https://www.mapbox.com/mapbox-gl-style-spec/#layout-symbol-text-max-width"><code>text-max-width</code></a> layout property in the Mapbox Style Specification.
+ This attribute corresponds to the <a
+ href="https://www.mapbox.com/mapbox-gl-style-spec/#layout-symbol-text-max-width"><code>text-max-width</code></a>
+ layout property in the Mapbox Style Specification.
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *maximumTextWidth;
@@ -419,11 +526,18 @@ typedef NS_ENUM(NSUInteger, MGLTextTranslateAnchor) {
@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *textMaxWidth __attribute__((unavailable("Use maximumTextWidth instead.")));
/**
- If true, the symbols will not cross tile edges to avoid mutual collisions. Recommended in layers that don't have enough padding in the vector tile to prevent collisions, or if it is a point symbol layer placed after a line symbol layer.
-
- The default value of this property is an `MGLStyleValue` object containing an `NSNumber` object containing `NO`. Set this property to `nil` to reset it to the default value.
-
- This attribute corresponds to the <a href="https://www.mapbox.com/mapbox-gl-style-spec/#layout-symbol-symbol-avoid-edges"><code>symbol-avoid-edges</code></a> layout property in the Mapbox Style Specification.
+ If true, the symbols will not cross tile edges to avoid mutual collisions.
+ Recommended in layers that don't have enough padding in the vector tile to
+ prevent collisions, or if it is a point symbol layer placed after a line symbol
+ layer.
+
+ The default value of this property is an `MGLStyleValue` object containing an
+ `NSNumber` object containing `NO`. Set this property to `nil` to reset it to
+ the default value.
+
+ This attribute corresponds to the <a
+ href="https://www.mapbox.com/mapbox-gl-style-spec/#layout-symbol-symbol-avoid-edges"><code>symbol-avoid-edges</code></a>
+ layout property in the Mapbox Style Specification.
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *symbolAvoidsEdges;
@@ -433,29 +547,41 @@ typedef NS_ENUM(NSUInteger, MGLTextTranslateAnchor) {
/**
Label placement relative to its geometry.
- The default value of this property is an `MGLStyleValue` object containing an `NSValue` object containing `MGLSymbolPlacementPoint`. Set this property to `nil` to reset it to the default value.
+ The default value of this property is an `MGLStyleValue` object containing an
+ `NSValue` object containing `MGLSymbolPlacementPoint`. Set this property to
+ `nil` to reset it to the default value.
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSValue *> *symbolPlacement;
/**
Distance between two symbol anchors.
-
+
This property is measured in points.
- The default value of this property is an `MGLStyleValue` object containing an `NSNumber` object containing the float `250`. Set this property to `nil` to reset it to the default value.
+ The default value of this property is an `MGLStyleValue` object containing an
+ `NSNumber` object containing the float `250`. Set this property to `nil` to
+ reset it to the default value.
- This property is only applied to the style if `symbolPlacement` is set to an `MGLStyleValue` object containing an `NSValue` object containing `MGLSymbolPlacementLine`. Otherwise, it is ignored.
+ This property is only applied to the style if `symbolPlacement` is set to an
+ `MGLStyleValue` object containing an `NSValue` object containing
+ `MGLSymbolPlacementLine`. Otherwise, it is ignored.
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *symbolSpacing;
/**
- If true, the text will be visible even if it collides with other previously drawn symbols.
+ If true, the text will be visible even if it collides with other previously
+ drawn symbols.
- The default value of this property is an `MGLStyleValue` object containing an `NSNumber` object containing `NO`. Set this property to `nil` to reset it to the default value.
+ The default value of this property is an `MGLStyleValue` object containing an
+ `NSNumber` object containing `NO`. Set this property to `nil` to reset it to
+ the default value.
- This property is only applied to the style if `textField` is non-`nil`. Otherwise, it is ignored.
+ This property is only applied to the style if `textField` is non-`nil`.
+ Otherwise, it is ignored.
- This attribute corresponds to the <a href="https://www.mapbox.com/mapbox-gl-style-spec/#layout-symbol-text-allow-overlap"><code>text-allow-overlap</code></a> layout property in the Mapbox Style Specification.
+ This attribute corresponds to the <a
+ href="https://www.mapbox.com/mapbox-gl-style-spec/#layout-symbol-text-allow-overlap"><code>text-allow-overlap</code></a>
+ layout property in the Mapbox Style Specification.
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *textAllowsOverlap;
@@ -465,36 +591,49 @@ typedef NS_ENUM(NSUInteger, MGLTextTranslateAnchor) {
/**
Part of the text placed closest to the anchor.
- The default value of this property is an `MGLStyleValue` object containing an `NSValue` object containing `MGLTextAnchorCenter`. Set this property to `nil` to reset it to the default value.
+ The default value of this property is an `MGLStyleValue` object containing an
+ `NSValue` object containing `MGLTextAnchorCenter`. Set this property to `nil`
+ to reset it to the default value.
- This property is only applied to the style if `textField` is non-`nil`. Otherwise, it is ignored.
+ This property is only applied to the style if `textField` is non-`nil`.
+ Otherwise, it is ignored.
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSValue *> *textAnchor;
/**
- Value to use for a text label. Feature properties are specified using tokens like {field_name}.
+ Value to use for a text label. Feature properties are specified using tokens
+ like {field_name}.
- The default value of this property is an `MGLStyleValue` object containing the empty string. Set this property to `nil` to reset it to the default value.
+ The default value of this property is an `MGLStyleValue` object containing the
+ empty string. Set this property to `nil` to reset it to the default value.
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSString *> *textField;
/**
Font stack to use for displaying text.
- The default value of this property is an `MGLStyleValue` object containing the array `Open Sans Regular`, `Arial Unicode MS Regular`. Set this property to `nil` to reset it to the default value.
+ The default value of this property is an `MGLStyleValue` object containing the
+ array `Open Sans Regular`, `Arial Unicode MS Regular`. Set this property to
+ `nil` to reset it to the default value.
- This property is only applied to the style if `textField` is non-`nil`. Otherwise, it is ignored.
+ This property is only applied to the style if `textField` is non-`nil`.
+ Otherwise, it is ignored.
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSArray<NSString *> *> *textFont;
/**
If true, other symbols can be visible even if they collide with the text.
- The default value of this property is an `MGLStyleValue` object containing an `NSNumber` object containing `NO`. Set this property to `nil` to reset it to the default value.
+ The default value of this property is an `MGLStyleValue` object containing an
+ `NSNumber` object containing `NO`. Set this property to `nil` to reset it to
+ the default value.
- This property is only applied to the style if `textField` is non-`nil`. Otherwise, it is ignored.
+ This property is only applied to the style if `textField` is non-`nil`.
+ Otherwise, it is ignored.
- This attribute corresponds to the <a href="https://www.mapbox.com/mapbox-gl-style-spec/#layout-symbol-text-ignore-placement"><code>text-ignore-placement</code></a> layout property in the Mapbox Style Specification.
+ This attribute corresponds to the <a
+ href="https://www.mapbox.com/mapbox-gl-style-spec/#layout-symbol-text-ignore-placement"><code>text-ignore-placement</code></a>
+ layout property in the Mapbox Style Specification.
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *textIgnoresPlacement;
@@ -504,11 +643,16 @@ typedef NS_ENUM(NSUInteger, MGLTextTranslateAnchor) {
/**
Text justification options.
- The default value of this property is an `MGLStyleValue` object containing an `NSValue` object containing `MGLTextJustificationCenter`. Set this property to `nil` to reset it to the default value.
+ The default value of this property is an `MGLStyleValue` object containing an
+ `NSValue` object containing `MGLTextJustificationCenter`. Set this property to
+ `nil` to reset it to the default value.
- This property is only applied to the style if `textField` is non-`nil`. Otherwise, it is ignored.
+ This property is only applied to the style if `textField` is non-`nil`.
+ Otherwise, it is ignored.
- This attribute corresponds to the <a href="https://www.mapbox.com/mapbox-gl-style-spec/#layout-symbol-text-justify"><code>text-justify</code></a> layout property in the Mapbox Style Specification.
+ This attribute corresponds to the <a
+ href="https://www.mapbox.com/mapbox-gl-style-spec/#layout-symbol-text-justify"><code>text-justify</code></a>
+ layout property in the Mapbox Style Specification.
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSValue *> *textJustification;
@@ -517,76 +661,102 @@ typedef NS_ENUM(NSUInteger, MGLTextTranslateAnchor) {
/**
Text tracking amount.
-
+
This property is measured in ems.
- The default value of this property is an `MGLStyleValue` object containing an `NSNumber` object containing the float `0`. Set this property to `nil` to reset it to the default value.
+ The default value of this property is an `MGLStyleValue` object containing an
+ `NSNumber` object containing the float `0`. Set this property to `nil` to reset
+ it to the default value.
- This property is only applied to the style if `textField` is non-`nil`. Otherwise, it is ignored.
+ This property is only applied to the style if `textField` is non-`nil`.
+ Otherwise, it is ignored.
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *textLetterSpacing;
/**
Text leading value for multi-line text.
-
+
This property is measured in ems.
- The default value of this property is an `MGLStyleValue` object containing an `NSNumber` object containing the float `1.2`. Set this property to `nil` to reset it to the default value.
+ The default value of this property is an `MGLStyleValue` object containing an
+ `NSNumber` object containing the float `1.2`. Set this property to `nil` to
+ reset it to the default value.
- This property is only applied to the style if `textField` is non-`nil`. Otherwise, it is ignored.
+ This property is only applied to the style if `textField` is non-`nil`.
+ Otherwise, it is ignored.
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *textLineHeight;
/**
Offset distance of text from its anchor.
-
+
This property is measured in ems.
- The default value of this property is an `MGLStyleValue` object containing an `NSValue` object containing a `CGVector` struct set to 0 ems from the left and 0 ems from the top. Set this property to `nil` to reset it to the default value.
+ The default value of this property is an `MGLStyleValue` object containing an
+ `NSValue` object containing a `CGVector` struct set to 0 ems from the left and
+ 0 ems from the top. Set this property to `nil` to reset it to the default
+ value.
- This property is only applied to the style if `textField` is non-`nil`. Otherwise, it is ignored.
+ This property is only applied to the style if `textField` is non-`nil`.
+ Otherwise, it is ignored.
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSValue *> *textOffset;
/**
- If true, icons will display without their corresponding text when the text collides with other symbols and the icon does not.
+ If true, icons will display without their corresponding text when the text
+ collides with other symbols and the icon does not.
- The default value of this property is an `MGLStyleValue` object containing an `NSNumber` object containing `NO`. Set this property to `nil` to reset it to the default value.
+ The default value of this property is an `MGLStyleValue` object containing an
+ `NSNumber` object containing `NO`. Set this property to `nil` to reset it to
+ the default value.
- This property is only applied to the style if `textField` is non-`nil`, and `iconImageName` is non-`nil`. Otherwise, it is ignored.
+ This property is only applied to the style if `textField` is non-`nil`, and
+ `iconImageName` is non-`nil`. Otherwise, it is ignored.
*/
@property (nonatomic, null_resettable, getter=isTextOptional) MGLStyleValue<NSNumber *> *textOptional;
/**
- Size of the additional area around the text bounding box used for detecting symbol collisions.
-
+ Size of the additional area around the text bounding box used for detecting
+ symbol collisions.
+
This property is measured in points.
- The default value of this property is an `MGLStyleValue` object containing an `NSNumber` object containing the float `2`. Set this property to `nil` to reset it to the default value.
+ The default value of this property is an `MGLStyleValue` object containing an
+ `NSNumber` object containing the float `2`. Set this property to `nil` to reset
+ it to the default value.
- This property is only applied to the style if `textField` is non-`nil`. Otherwise, it is ignored.
+ This property is only applied to the style if `textField` is non-`nil`.
+ Otherwise, it is ignored.
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *textPadding;
/**
Orientation of text when map is pitched.
- The default value of this property is an `MGLStyleValue` object containing an `NSValue` object containing `MGLTextPitchAlignmentAuto`. Set this property to `nil` to reset it to the default value.
+ The default value of this property is an `MGLStyleValue` object containing an
+ `NSValue` object containing `MGLTextPitchAlignmentAuto`. Set this property to
+ `nil` to reset it to the default value.
- This property is only applied to the style if `textField` is non-`nil`. Otherwise, it is ignored.
+ This property is only applied to the style if `textField` is non-`nil`.
+ Otherwise, it is ignored.
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSValue *> *textPitchAlignment;
/**
Rotates the text clockwise.
-
+
This property is measured in degrees.
- The default value of this property is an `MGLStyleValue` object containing an `NSNumber` object containing the float `0`. Set this property to `nil` to reset it to the default value.
+ The default value of this property is an `MGLStyleValue` object containing an
+ `NSNumber` object containing the float `0`. Set this property to `nil` to reset
+ it to the default value.
- This property is only applied to the style if `textField` is non-`nil`. Otherwise, it is ignored.
+ This property is only applied to the style if `textField` is non-`nil`.
+ Otherwise, it is ignored.
- This attribute corresponds to the <a href="https://www.mapbox.com/mapbox-gl-style-spec/#layout-symbol-text-rotate"><code>text-rotate</code></a> layout property in the Mapbox Style Specification.
+ This attribute corresponds to the <a
+ href="https://www.mapbox.com/mapbox-gl-style-spec/#layout-symbol-text-rotate"><code>text-rotate</code></a>
+ layout property in the Mapbox Style Specification.
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *textRotation;
@@ -594,31 +764,41 @@ typedef NS_ENUM(NSUInteger, MGLTextTranslateAnchor) {
@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *textRotate __attribute__((unavailable("Use textRotation instead.")));
/**
- In combination with `symbolPlacement`, determines the rotation behavior of the individual glyphs forming the text.
+ In combination with `symbolPlacement`, determines the rotation behavior of the
+ individual glyphs forming the text.
- The default value of this property is an `MGLStyleValue` object containing an `NSValue` object containing `MGLTextRotationAlignmentAuto`. Set this property to `nil` to reset it to the default value.
+ The default value of this property is an `MGLStyleValue` object containing an
+ `NSValue` object containing `MGLTextRotationAlignmentAuto`. Set this property
+ to `nil` to reset it to the default value.
- This property is only applied to the style if `textField` is non-`nil`. Otherwise, it is ignored.
+ This property is only applied to the style if `textField` is non-`nil`.
+ Otherwise, it is ignored.
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSValue *> *textRotationAlignment;
/**
Font size.
-
+
This property is measured in points.
- The default value of this property is an `MGLStyleValue` object containing an `NSNumber` object containing the float `16`. Set this property to `nil` to reset it to the default value.
+ The default value of this property is an `MGLStyleValue` object containing an
+ `NSNumber` object containing the float `16`. Set this property to `nil` to
+ reset it to the default value.
- This property is only applied to the style if `textField` is non-`nil`. Otherwise, it is ignored.
+ This property is only applied to the style if `textField` is non-`nil`.
+ Otherwise, it is ignored.
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *textSize;
/**
Specifies how to capitalize text.
- The default value of this property is an `MGLStyleValue` object containing an `NSValue` object containing `MGLTextTransformNone`. Set this property to `nil` to reset it to the default value.
+ The default value of this property is an `MGLStyleValue` object containing an
+ `NSValue` object containing `MGLTextTransformNone`. Set this property to `nil`
+ to reset it to the default value.
- This property is only applied to the style if `textField` is non-`nil`. Otherwise, it is ignored.
+ This property is only applied to the style if `textField` is non-`nil`.
+ Otherwise, it is ignored.
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSValue *> *textTransform;
@@ -626,92 +806,124 @@ typedef NS_ENUM(NSUInteger, MGLTextTranslateAnchor) {
#if TARGET_OS_IPHONE
/**
- The tint color to apply to the icon. The `iconImageName` property must be set to a template image.
+ The tint color to apply to the icon. The `iconImageName` property must be set
+ to a template image.
- The default value of this property is an `MGLStyleValue` object containing `UIColor.blackColor`. Set this property to `nil` to reset it to the default value.
-
- This property is only applied to the style if `iconImageName` is non-`nil`. Otherwise, it is ignored.
+ The default value of this property is an `MGLStyleValue` object containing
+ `UIColor.blackColor`. Set this property to `nil` to reset it to the default
+ value.
+
+ This property is only applied to the style if `iconImageName` is non-`nil`.
+ Otherwise, it is ignored.
*/
@property (nonatomic, null_resettable) MGLStyleValue<MGLColor *> *iconColor;
#else
/**
- The tint color to apply to the icon. The `iconImageName` property must be set to a template image.
+ The tint color to apply to the icon. The `iconImageName` property must be set
+ to a template image.
- The default value of this property is an `MGLStyleValue` object containing `NSColor.blackColor`. Set this property to `nil` to reset it to the default value.
-
- This property is only applied to the style if `iconImageName` is non-`nil`. Otherwise, it is ignored.
+ The default value of this property is an `MGLStyleValue` object containing
+ `NSColor.blackColor`. Set this property to `nil` to reset it to the default
+ value.
+
+ This property is only applied to the style if `iconImageName` is non-`nil`.
+ Otherwise, it is ignored.
*/
@property (nonatomic, null_resettable) MGLStyleValue<MGLColor *> *iconColor;
#endif
/**
Fade out the halo towards the outside.
-
+
This property is measured in points.
- The default value of this property is an `MGLStyleValue` object containing an `NSNumber` object containing the float `0`. Set this property to `nil` to reset it to the default value.
-
- This property is only applied to the style if `iconImageName` is non-`nil`. Otherwise, it is ignored.
+ The default value of this property is an `MGLStyleValue` object containing an
+ `NSNumber` object containing the float `0`. Set this property to `nil` to reset
+ it to the default value.
+
+ This property is only applied to the style if `iconImageName` is non-`nil`.
+ Otherwise, it is ignored.
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *iconHaloBlur;
#if TARGET_OS_IPHONE
/**
- The color of the icon’s halo. The `iconImageName` property must be set to a template image.
+ The color of the icon’s halo. The `iconImageName` property must be set to a
+ template image.
- The default value of this property is an `MGLStyleValue` object containing `UIColor.clearColor`. Set this property to `nil` to reset it to the default value.
-
- This property is only applied to the style if `iconImageName` is non-`nil`. Otherwise, it is ignored.
+ The default value of this property is an `MGLStyleValue` object containing
+ `UIColor.clearColor`. Set this property to `nil` to reset it to the default
+ value.
+
+ This property is only applied to the style if `iconImageName` is non-`nil`.
+ Otherwise, it is ignored.
*/
@property (nonatomic, null_resettable) MGLStyleValue<MGLColor *> *iconHaloColor;
#else
/**
- The color of the icon’s halo. The `iconImageName` property must be set to a template image.
+ The color of the icon’s halo. The `iconImageName` property must be set to a
+ template image.
- The default value of this property is an `MGLStyleValue` object containing `NSColor.clearColor`. Set this property to `nil` to reset it to the default value.
-
- This property is only applied to the style if `iconImageName` is non-`nil`. Otherwise, it is ignored.
+ The default value of this property is an `MGLStyleValue` object containing
+ `NSColor.clearColor`. Set this property to `nil` to reset it to the default
+ value.
+
+ This property is only applied to the style if `iconImageName` is non-`nil`.
+ Otherwise, it is ignored.
*/
@property (nonatomic, null_resettable) MGLStyleValue<MGLColor *> *iconHaloColor;
#endif
/**
Distance of halo to the icon outline.
-
+
This property is measured in points.
- The default value of this property is an `MGLStyleValue` object containing an `NSNumber` object containing the float `0`. Set this property to `nil` to reset it to the default value.
-
- This property is only applied to the style if `iconImageName` is non-`nil`. Otherwise, it is ignored.
+ The default value of this property is an `MGLStyleValue` object containing an
+ `NSNumber` object containing the float `0`. Set this property to `nil` to reset
+ it to the default value.
+
+ This property is only applied to the style if `iconImageName` is non-`nil`.
+ Otherwise, it is ignored.
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *iconHaloWidth;
/**
The opacity at which the icon will be drawn.
- The default value of this property is an `MGLStyleValue` object containing an `NSNumber` object containing the float `1`. Set this property to `nil` to reset it to the default value.
-
- This property is only applied to the style if `iconImageName` is non-`nil`. Otherwise, it is ignored.
+ The default value of this property is an `MGLStyleValue` object containing an
+ `NSNumber` object containing the float `1`. Set this property to `nil` to reset
+ it to the default value.
+
+ This property is only applied to the style if `iconImageName` is non-`nil`.
+ Otherwise, it is ignored.
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *iconOpacity;
/**
Distance that the icon's anchor is moved from its original placement.
-
+
This property is measured in points.
- The default value of this property is an `MGLStyleValue` object containing an `NSValue` object containing a `CGVector` struct set to 0 points from the left and 0 points from the top. Set this property to `nil` to reset it to the default value.
-
- This property is only applied to the style if `iconImageName` is non-`nil`. Otherwise, it is ignored.
+ The default value of this property is an `MGLStyleValue` object containing an
+ `NSValue` object containing a `CGVector` struct set to 0 points from the left
+ and 0 points from the top. Set this property to `nil` to reset it to the
+ default value.
+
+ This property is only applied to the style if `iconImageName` is non-`nil`.
+ Otherwise, it is ignored.
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSValue *> *iconTranslate;
/**
Controls the translation reference point.
- The default value of this property is an `MGLStyleValue` object containing an `NSValue` object containing `MGLIconTranslateAnchorMap`. Set this property to `nil` to reset it to the default value.
-
- This property is only applied to the style if `iconImageName` is non-`nil`, and `iconTranslate` is non-`nil`. Otherwise, it is ignored.
+ The default value of this property is an `MGLStyleValue` object containing an
+ `NSValue` object containing `MGLIconTranslateAnchorMap`. Set this property to
+ `nil` to reset it to the default value.
+
+ This property is only applied to the style if `iconImageName` is non-`nil`, and
+ `iconTranslate` is non-`nil`. Otherwise, it is ignored.
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSValue *> *iconTranslateAnchor;
@@ -719,30 +931,39 @@ typedef NS_ENUM(NSUInteger, MGLTextTranslateAnchor) {
/**
The color with which the text will be drawn.
- The default value of this property is an `MGLStyleValue` object containing `UIColor.blackColor`. Set this property to `nil` to reset it to the default value.
-
- This property is only applied to the style if `textField` is non-`nil`. Otherwise, it is ignored.
+ The default value of this property is an `MGLStyleValue` object containing
+ `UIColor.blackColor`. Set this property to `nil` to reset it to the default
+ value.
+
+ This property is only applied to the style if `textField` is non-`nil`.
+ Otherwise, it is ignored.
*/
@property (nonatomic, null_resettable) MGLStyleValue<MGLColor *> *textColor;
#else
/**
The color with which the text will be drawn.
- The default value of this property is an `MGLStyleValue` object containing `NSColor.blackColor`. Set this property to `nil` to reset it to the default value.
-
- This property is only applied to the style if `textField` is non-`nil`. Otherwise, it is ignored.
+ The default value of this property is an `MGLStyleValue` object containing
+ `NSColor.blackColor`. Set this property to `nil` to reset it to the default
+ value.
+
+ This property is only applied to the style if `textField` is non-`nil`.
+ Otherwise, it is ignored.
*/
@property (nonatomic, null_resettable) MGLStyleValue<MGLColor *> *textColor;
#endif
/**
The halo's fadeout distance towards the outside.
-
+
This property is measured in points.
- The default value of this property is an `MGLStyleValue` object containing an `NSNumber` object containing the float `0`. Set this property to `nil` to reset it to the default value.
-
- This property is only applied to the style if `textField` is non-`nil`. Otherwise, it is ignored.
+ The default value of this property is an `MGLStyleValue` object containing an
+ `NSNumber` object containing the float `0`. Set this property to `nil` to reset
+ it to the default value.
+
+ This property is only applied to the style if `textField` is non-`nil`.
+ Otherwise, it is ignored.
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *textHaloBlur;
@@ -750,59 +971,79 @@ typedef NS_ENUM(NSUInteger, MGLTextTranslateAnchor) {
/**
The color of the text's halo, which helps it stand out from backgrounds.
- The default value of this property is an `MGLStyleValue` object containing `UIColor.clearColor`. Set this property to `nil` to reset it to the default value.
-
- This property is only applied to the style if `textField` is non-`nil`. Otherwise, it is ignored.
+ The default value of this property is an `MGLStyleValue` object containing
+ `UIColor.clearColor`. Set this property to `nil` to reset it to the default
+ value.
+
+ This property is only applied to the style if `textField` is non-`nil`.
+ Otherwise, it is ignored.
*/
@property (nonatomic, null_resettable) MGLStyleValue<MGLColor *> *textHaloColor;
#else
/**
The color of the text's halo, which helps it stand out from backgrounds.
- The default value of this property is an `MGLStyleValue` object containing `NSColor.clearColor`. Set this property to `nil` to reset it to the default value.
-
- This property is only applied to the style if `textField` is non-`nil`. Otherwise, it is ignored.
+ The default value of this property is an `MGLStyleValue` object containing
+ `NSColor.clearColor`. Set this property to `nil` to reset it to the default
+ value.
+
+ This property is only applied to the style if `textField` is non-`nil`.
+ Otherwise, it is ignored.
*/
@property (nonatomic, null_resettable) MGLStyleValue<MGLColor *> *textHaloColor;
#endif
/**
- Distance of halo to the font outline. Max text halo width is 1/4 of the font-size.
-
+ Distance of halo to the font outline. Max text halo width is 1/4 of the
+ font-size.
+
This property is measured in points.
- The default value of this property is an `MGLStyleValue` object containing an `NSNumber` object containing the float `0`. Set this property to `nil` to reset it to the default value.
-
- This property is only applied to the style if `textField` is non-`nil`. Otherwise, it is ignored.
+ The default value of this property is an `MGLStyleValue` object containing an
+ `NSNumber` object containing the float `0`. Set this property to `nil` to reset
+ it to the default value.
+
+ This property is only applied to the style if `textField` is non-`nil`.
+ Otherwise, it is ignored.
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *textHaloWidth;
/**
The opacity at which the text will be drawn.
- The default value of this property is an `MGLStyleValue` object containing an `NSNumber` object containing the float `1`. Set this property to `nil` to reset it to the default value.
-
- This property is only applied to the style if `textField` is non-`nil`. Otherwise, it is ignored.
+ The default value of this property is an `MGLStyleValue` object containing an
+ `NSNumber` object containing the float `1`. Set this property to `nil` to reset
+ it to the default value.
+
+ This property is only applied to the style if `textField` is non-`nil`.
+ Otherwise, it is ignored.
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *textOpacity;
/**
Distance that the text's anchor is moved from its original placement.
-
+
This property is measured in points.
- The default value of this property is an `MGLStyleValue` object containing an `NSValue` object containing a `CGVector` struct set to 0 points from the left and 0 points from the top. Set this property to `nil` to reset it to the default value.
-
- This property is only applied to the style if `textField` is non-`nil`. Otherwise, it is ignored.
+ The default value of this property is an `MGLStyleValue` object containing an
+ `NSValue` object containing a `CGVector` struct set to 0 points from the left
+ and 0 points from the top. Set this property to `nil` to reset it to the
+ default value.
+
+ This property is only applied to the style if `textField` is non-`nil`.
+ Otherwise, it is ignored.
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSValue *> *textTranslate;
/**
Controls the translation reference point.
- The default value of this property is an `MGLStyleValue` object containing an `NSValue` object containing `MGLTextTranslateAnchorMap`. Set this property to `nil` to reset it to the default value.
-
- This property is only applied to the style if `textField` is non-`nil`, and `textTranslate` is non-`nil`. Otherwise, it is ignored.
+ The default value of this property is an `MGLStyleValue` object containing an
+ `NSValue` object containing `MGLTextTranslateAnchorMap`. Set this property to
+ `nil` to reset it to the default value.
+
+ This property is only applied to the style if `textField` is non-`nil`, and
+ `textTranslate` is non-`nil`. Otherwise, it is ignored.
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSValue *> *textTranslateAnchor;
diff --git a/platform/darwin/src/MGLVectorStyleLayer.m b/platform/darwin/src/MGLVectorStyleLayer.m
index d8146f4246..da6da0ea7f 100644
--- a/platform/darwin/src/MGLVectorStyleLayer.m
+++ b/platform/darwin/src/MGLVectorStyleLayer.m
@@ -4,12 +4,12 @@
- (void)setPredicate:(NSPredicate *)predicate {
[NSException raise:@"MGLAbstractClassException"
- format:@"MGLVectorLayer is an abstract class"];
+ format:@"MGLVectorStyleLayer is an abstract class"];
}
- (NSPredicate *)predicate {
[NSException raise:@"MGLAbstractClassException"
- format:@"MGLVectorLayer is an abstract class"];
+ format:@"MGLVectorStyleLayer is an abstract class"];
return nil;
}
diff --git a/platform/ios/CHANGELOG.md b/platform/ios/CHANGELOG.md
index 18763b68ee..f7d2080cf4 100644
--- a/platform/ios/CHANGELOG.md
+++ b/platform/ios/CHANGELOG.md
@@ -14,18 +14,18 @@ Mapbox welcomes participation and contributions from everyone. Please read [CONT
* A new runtime styling API allows you to adjust the style and content of the base map dynamically. All the options available in [Mapbox Studio](https://www.mapbox.com/studio/) are now exposed via MGLStyle and subclasses of MGLStyleLayer and MGLSource. ([#5727](https://github.com/mapbox/mapbox-gl-native/pull/5727))
* MGLMapView’s `styleURL` property can now be set to an absolute file URL. ([#6026](https://github.com/mapbox/mapbox-gl-native/pull/6026))
-* MGLShapeSource objects, as well as GeoJSON sources specified by the stylesheet at design time, now support `cluster`, `clusterMaxZoom`, and `clusterRadius` attributes for clustering point features on the base map. ([#5724](https://github.com/mapbox/mapbox-gl-native/pull/5724))
+* When creating an MGLShapeSource, you can now specify options for clustering point features within the shape source. Similarly, GeoJSON sources specified by the stylesheet at design time can specify the `cluster`, `clusterMaxZoom`, and `clusterRadius` attributes. ([#5724](https://github.com/mapbox/mapbox-gl-native/pull/5724))
* Added [quadkey](https://msdn.microsoft.com/en-us/library/bb259689.aspx) support and limited WMS support in raster tile URL templates. ([#5628](https://github.com/mapbox/mapbox-gl-native/pull/5628))
-* TileJSON manifests can now specify `"scheme": "tms"` to indicate the use of [TMS](https://en.wikipedia.org/wiki/Tile_Map_Service) coordinates. ([#2270](https://github.com/mapbox/mapbox-gl-native/pull/2270))
+* When creating an MGLTileSource, you can now specify that the tile URLs use [TMS](https://en.wikipedia.org/wiki/Tile_Map_Service) coordinates by setting `MGLTileSourceOptionTileCoordinateSystem` to `MGLTileCoordinateSystemTMS`. TileJSON files can specify `"scheme": "tms"`. ([#2270](https://github.com/mapbox/mapbox-gl-native/pull/2270))
* Fixed an issue causing abstract MGLMultiPointFeature objects to be returned in feature query results. Now concrete MGLPointCollectionFeature objects are returned. ([#6742](https://github.com/mapbox/mapbox-gl-native/pull/6742))
* Fixed rendering artifacts and missing glyphs that occurred after viewing a large number of CJK characters on the map. ([#5908](https://github.com/mapbox/mapbox-gl-native/pull/5908))
* `-[MGLMapView resetPosition]` now resets to the current style’s default center coordinates, zoom level, direction, and pitch, if specified. ([#6127](https://github.com/mapbox/mapbox-gl-native/pull/6127))
* Fixed an issue where feature querying sometimes failed to return the expected features when the map was tilted. ([#6773](https://github.com/mapbox/mapbox-gl-native/pull/6773))
* MGLFeature’s `attributes` and `identifier` properties are now writable. ([#6728](https://github.com/mapbox/mapbox-gl-native/pull/6728))
* The action sheet that appears when tapping the information button in the bottom-right corner now lists the correct attribution for the current style. ([#5999](https://github.com/mapbox/mapbox-gl-native/pull/5999))
-* The `text-pitch-alignment` property is now supported in stylesheets for improved street label legibility on a tilted map. ([#5288](https://github.com/mapbox/mapbox-gl-native/pull/5288))
-* The `icon-text-fit` and `icon-text-fit-padding` properties are now supported in stylesheets, allowing the background of a shield to automatically resize to fit the shield’s text. ([#5334](https://github.com/mapbox/mapbox-gl-native/pull/5334))
-* The `circle-pitch-scale` property is now supported in stylesheets, allowing circle features in a tilted base map to scale or remain the same size as the viewing distance changes. ([#5576](https://github.com/mapbox/mapbox-gl-native/pull/5576))
+* Added support for MGLSymbolStyleLayer’s `textPitchAlignment` property and the corresponding style JSON property for improved street label legibility on a tilted map. ([#5288](https://github.com/mapbox/mapbox-gl-native/pull/5288))
+* Added support for MGLSymbolStyleLayer’s `iconTextFit` and `iconTextFitPadding` properties and the corresponding style JSON properties, allowing the background of a shield to automatically resize to fit the shield’s text. ([#5334](https://github.com/mapbox/mapbox-gl-native/pull/5334))
+* Added support for MGLSymbolStyleLayer’s `circlePitchScale` property and the corresponding style JSON property, allowing circle features in a tilted base map to scale or remain the same size as the viewing distance changes. ([#5576](https://github.com/mapbox/mapbox-gl-native/pull/5576))
* The `identifier` property of an MGLFeature may now be either a number or string. ([#5514](https://github.com/mapbox/mapbox-gl-native/pull/5514))
* If MGLMapView is unable to obtain or parse a style, it now calls its delegate’s `-mapViewDidFailLoadingMap:withError:` method. ([#6145](https://github.com/mapbox/mapbox-gl-native/pull/6145))
* Added the `-[MGLMapViewDelegate mapView:didFinishLoadingStyle:]` delegate method, which offers the earliest opportunity to modify the layout or appearance of the current style before the map view is displayed to the user. ([#6636](https://github.com/mapbox/mapbox-gl-native/pull/6636))
diff --git a/platform/macos/CHANGELOG.md b/platform/macos/CHANGELOG.md
index 8482cc5e0b..d53874f5c9 100644
--- a/platform/macos/CHANGELOG.md
+++ b/platform/macos/CHANGELOG.md
@@ -2,6 +2,8 @@
## 0.3.0
+This version of the Mapbox macOS SDK corresponds to version 3.4.0 of the Mapbox iOS SDK. The two SDKs have very similar feature sets. The main differences are the lack of user location tracking and annotation views. Some APIs have been adapted to macOS conventions, particularly the use of NSPopover for callout views.
+
### Packaging
* Fixed an issue causing code signing failures and bloating the framework. ([#5850](https://github.com/mapbox/mapbox-gl-native/pull/5850))
@@ -13,8 +15,8 @@
* A new runtime styling API allows you to adjust the style and content of the base map dynamically. All the options available in [Mapbox Studio](https://www.mapbox.com/studio/) are now exposed via MGLStyle and subclasses of MGLStyleLayer and MGLSource. ([#5727](https://github.com/mapbox/mapbox-gl-native/pull/5727))
* MGLMapView’s `styleURL` property can now be set to an absolute file URL. ([#6026](https://github.com/mapbox/mapbox-gl-native/pull/6026))
-* MGLShapeSource objects, as well as GeoJSON sources specified by the stylesheet at design time, now support `cluster`, `clusterMaxZoom`, and `clusterRadius` attributes for clustering point features on the base map. ([#5724](https://github.com/mapbox/mapbox-gl-native/pull/5724))
-* TileJSON manifests can now specify `"scheme": "tms"` to indicate the use of [TMS](https://en.wikipedia.org/wiki/Tile_Map_Service) coordinates. ([#2270](https://github.com/mapbox/mapbox-gl-native/pull/2270))
+* When creating an MGLShapeSource, you can now specify options for clustering point features within the shape source. Similarly, GeoJSON sources specified by the stylesheet at design time can specify the `cluster`, `clusterMaxZoom`, and `clusterRadius` attributes. ([#5724](https://github.com/mapbox/mapbox-gl-native/pull/5724))
+* When creating an MGLTileSource, you can now specify that the tile URLs use [TMS](https://en.wikipedia.org/wiki/Tile_Map_Service) coordinates by setting `MGLTileSourceOptionTileCoordinateSystem` to `MGLTileCoordinateSystemTMS`. TileJSON files can specify `"scheme": "tms"`. ([#2270](https://github.com/mapbox/mapbox-gl-native/pull/2270))
* Fixed an issue causing abstract `MGLMultiPointFeature` objects to be returned in feature query results. Now concrete `MGLPointCollectionFeature` objects are returned. ([#6742](https://github.com/mapbox/mapbox-gl-native/pull/6742))
* Fixed rendering artifacts and missing glyphs that occurred after viewing a large number of CJK characters on the map. ([#5908](https://github.com/mapbox/mapbox-gl-native/pull/5908))
* Fixed an issue where the style zoom levels were not respected when deciding when to render a layer. ([#5811](https://github.com/mapbox/mapbox-gl-native/issues/5811))
diff --git a/platform/macos/src/MGLMapViewDelegate.h b/platform/macos/src/MGLMapViewDelegate.h
index c5af93f8ad..e07378bf16 100644
--- a/platform/macos/src/MGLMapViewDelegate.h
+++ b/platform/macos/src/MGLMapViewDelegate.h
@@ -257,7 +257,7 @@ NS_ASSUME_NONNULL_BEGIN
such as `title` and `subtitle`.
If each annotation should have an identical callout, you can set the
- `MGLMapView` instance’s `-setCalloutViewController:` method instead.
+ `MGLMapView.calloutViewController` property instead.
@param mapView The map view that is requesting a callout view controller.
@param annotation The object representing the annotation.