summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMinh Nguyễn <mxn@1ec5.org>2018-10-24 11:04:56 -0700
committerMinh Nguyễn <mxn@1ec5.org>2018-10-24 11:04:56 -0700
commit140effead456b8288a8305c4b7e82621affefd0c (patch)
treef8f2c1f245f833932c26eb79c26d0ece3e6d3b03
parent0d4c3656a3d14a28d6359b27c01e338fbdfc1c87 (diff)
downloadqtlocation-mapboxgl-upstream/1ec5-darwin-line-gradient-doc-13000.tar.gz
[ios, macos] Refined MGLLineStyleLayer.lineGradient documentationupstream/1ec5-darwin-line-gradient-doc-13000
-rw-r--r--platform/darwin/scripts/style-spec-overrides-v8.json3
-rw-r--r--platform/darwin/src/MGLLineStyleLayer.h10
2 files changed, 9 insertions, 4 deletions
diff --git a/platform/darwin/scripts/style-spec-overrides-v8.json b/platform/darwin/scripts/style-spec-overrides-v8.json
index 0c787cd96e..b45f0a9bf5 100644
--- a/platform/darwin/scripts/style-spec-overrides-v8.json
+++ b/platform/darwin/scripts/style-spec-overrides-v8.json
@@ -98,6 +98,9 @@
}
},
"paint_line": {
+ "line-gradient": {
+ "doc": "The color gradient with which the line will be drawn. This property only has an effect on lines defined by an `MGLShapeSource` whose `MGLShapeSourceOptionLineDistanceMetrics` option is set to `YES`."
+ },
"line-pattern": {
"doc": "Name of image in style images to use for drawing image lines. For seamless patterns, image width must be a factor of two (2, 4, 8, ..., 512)."
},
diff --git a/platform/darwin/src/MGLLineStyleLayer.h b/platform/darwin/src/MGLLineStyleLayer.h
index 28bb286049..ac30ff5f86 100644
--- a/platform/darwin/src/MGLLineStyleLayer.h
+++ b/platform/darwin/src/MGLLineStyleLayer.h
@@ -368,8 +368,9 @@ MGL_EXPORT
#if TARGET_OS_IPHONE
/**
- Defines a gradient with which to color a line feature. Can only be used with
- GeoJSON sources that specify `"lineMetrics": true`.
+ The color gradient with which the line will be drawn. This property only has an
+ effect on lines defined by an `MGLShapeSource` whose
+ `MGLShapeSourceOptionLineDistanceMetrics` option is set to `YES`.
This property is only applied to the style if `lineDasharray` is set to `nil`,
and `linePattern` is set to `nil`, and the data source requirements are met.
@@ -389,8 +390,9 @@ MGL_EXPORT
@property (nonatomic, null_resettable) NSExpression *lineGradient;
#else
/**
- Defines a gradient with which to color a line feature. Can only be used with
- GeoJSON sources that specify `"lineMetrics": true`.
+ The color gradient with which the line will be drawn. This property only has an
+ effect on lines defined by an `MGLShapeSource` whose
+ `MGLShapeSourceOptionLineDistanceMetrics` option is set to `YES`.
This property is only applied to the style if `lineDasharray` is set to `nil`,
and `linePattern` is set to `nil`, and the data source requirements are met.