summaryrefslogtreecommitdiff
path: root/platform/darwin/src/MGLCircleStyleLayer.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/MGLCircleStyleLayer.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/MGLCircleStyleLayer.h')
-rw-r--r--platform/darwin/src/MGLCircleStyleLayer.h73
1 files changed, 54 insertions, 19 deletions
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;