diff options
author | Tobrun <tobrun.van.nuland@gmail.com> | 2017-07-05 21:15:54 +0200 |
---|---|---|
committer | Tobrun <tobrun.van.nuland@gmail.com> | 2017-07-05 21:15:54 +0200 |
commit | 79d849dc44e977ca8711adb7a397e5e560cbc80a (patch) | |
tree | 8b6264db5bc4370989b7d1128e2e6e45d6f7558b /platform/darwin/src/MGLSymbolStyleLayer.h | |
parent | 9ab04a29655014f1df24e269ce53942c934c8333 (diff) | |
download | qtlocation-mapboxgl-79d849dc44e977ca8711adb7a397e5e560cbc80a.tar.gz |
[darwin] - re-add swift documentation
Diffstat (limited to 'platform/darwin/src/MGLSymbolStyleLayer.h')
-rw-r--r-- | platform/darwin/src/MGLSymbolStyleLayer.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/platform/darwin/src/MGLSymbolStyleLayer.h b/platform/darwin/src/MGLSymbolStyleLayer.h index 8512870e1b..5df995aa01 100644 --- a/platform/darwin/src/MGLSymbolStyleLayer.h +++ b/platform/darwin/src/MGLSymbolStyleLayer.h @@ -265,6 +265,16 @@ typedef NS_ENUM(NSUInteger, MGLTextTranslationAnchor) { ### Example ```swift + let layer = MGLSymbolStyleLayer(identifier: "coffeeshops", source: pois) + layer.sourceLayerIdentifier = "pois" + layer.iconImageName = MGLStyleValue(rawValue: "coffee") + layer.iconScale = MGLStyleValue(rawValue: 0.5) + layer.text = MGLStyleValue(rawValue: "{name}") + layer.textTranslation = MGLStyleValue(rawValue: NSValue(cgVector: CGVector(dx: 10, dy: 0))) + layer.textJustification = MGLStyleValue(rawValue: NSValue(mglTextJustification: .left)) + layer.textAnchor = MGLStyleValue(rawValue: NSValue(mglTextAnchor: .left)) + layer.predicate = NSPredicate(format: "%K == %@", "venue-type", "coffee") + mapView.style?.addLayer(layer) ``` */ MGL_EXPORT |