[ios, macos] Refined MGLLineStyleLayer.lineGradient documentation

This commit is contained in:
Minh Nguyễn
2018-10-24 11:04:56 -07:00
committed by Minh Nguyễn
parent 3ec0231bb7
commit 8e2214129e
2 changed files with 9 additions and 4 deletions

View File

@@ -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)."
},

View File

@@ -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.