summaryrefslogtreecommitdiff
path: root/platform/darwin/src/MGLLineStyleLayer.h
diff options
context:
space:
mode:
authorTobrun <tobrun.van.nuland@gmail.com>2017-07-05 21:15:54 +0200
committerTobrun <tobrun.van.nuland@gmail.com>2017-07-05 21:15:54 +0200
commit79d849dc44e977ca8711adb7a397e5e560cbc80a (patch)
tree8b6264db5bc4370989b7d1128e2e6e45d6f7558b /platform/darwin/src/MGLLineStyleLayer.h
parent9ab04a29655014f1df24e269ce53942c934c8333 (diff)
downloadqtlocation-mapboxgl-79d849dc44e977ca8711adb7a397e5e560cbc80a.tar.gz
[darwin] - re-add swift documentation
Diffstat (limited to 'platform/darwin/src/MGLLineStyleLayer.h')
-rw-r--r--platform/darwin/src/MGLLineStyleLayer.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/platform/darwin/src/MGLLineStyleLayer.h b/platform/darwin/src/MGLLineStyleLayer.h
index 7c5b66a2c2..4a96b11abf 100644
--- a/platform/darwin/src/MGLLineStyleLayer.h
+++ b/platform/darwin/src/MGLLineStyleLayer.h
@@ -92,6 +92,16 @@ typedef NS_ENUM(NSUInteger, MGLLineTranslationAnchor) {
### Example
```swift
+ let layer = MGLLineStyleLayer(identifier: "trails-path", source: trails)
+ layer.sourceLayerIdentifier = "trails"
+ layer.lineWidth = MGLStyleValue(interpolationMode: .exponential,
+ cameraStops: [14: MGLStyleValue(rawValue: 2),
+ 18: MGLStyleValue(rawValue: 20)],
+ options: [.interpolationBase: 1.5])
+ layer.lineColor = MGLStyleValue(rawValue: .brown)
+ layer.lineCap = MGLStyleValue(rawValue: NSValue(mglLineCap: .round))
+ layer.predicate = NSPredicate(format: "%K == %@", "trail-type", "mountain-biking")
+ mapView.style?.addLayer(layer)
```
*/
MGL_EXPORT