summaryrefslogtreecommitdiff
path: root/platform/darwin/src/MGLFillStyleLayer.h
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 /platform/darwin/src/MGLFillStyleLayer.h
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
Diffstat (limited to 'platform/darwin/src/MGLFillStyleLayer.h')
-rw-r--r--platform/darwin/src/MGLFillStyleLayer.h79
1 files changed, 55 insertions, 24 deletions
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;