diff options
author | Jesse Bounds <jesse@rebounds.net> | 2017-02-08 12:29:51 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-08 12:29:51 -0800 |
commit | bd2f3a28a5d401ad41a5353c662c2f739cb34fc9 (patch) | |
tree | b9df737dbf760559aee4bc25bf440507890d0d3b /platform/darwin/test | |
parent | c639105c9f7b92e4d8307b2b403275d537a76844 (diff) | |
download | qtlocation-mapboxgl-bd2f3a28a5d401ad41a5353c662c2f739cb34fc9.tar.gz |
[ios, macos] Update documentation examples to use new style functions (#7960)
Diffstat (limited to 'platform/darwin/test')
-rw-r--r-- | platform/darwin/test/MGLDocumentationExampleTests.swift | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/platform/darwin/test/MGLDocumentationExampleTests.swift b/platform/darwin/test/MGLDocumentationExampleTests.swift index 9336db7e49..177d97d523 100644 --- a/platform/darwin/test/MGLDocumentationExampleTests.swift +++ b/platform/darwin/test/MGLDocumentationExampleTests.swift @@ -112,10 +112,10 @@ class MGLDocumentationExampleTests: XCTestCase, MGLMapViewDelegate { let layer = MGLCircleStyleLayer(identifier: "circles", source: population) layer.sourceLayerIdentifier = "population" layer.circleColor = MGLStyleValue(rawValue: .green) - layer.circleRadius = MGLStyleValue(interpolationBase: 1.75, stops: [ - 12: MGLStyleValue(rawValue: 2), - 22: MGLStyleValue(rawValue: 180) - ]) + layer.circleRadius = MGLStyleValue(interpolationMode: .exponential, + cameraStops: [12: MGLStyleValue(rawValue: 2), + 22: MGLStyleValue(rawValue: 180)], + options: [.interpolationBase: 1.75]) layer.circleOpacity = MGLStyleValue(rawValue: 0.7) layer.predicate = NSPredicate(format: "%K == %@", "marital-status", "married") mapView.style?.addLayer(layer) @@ -131,10 +131,10 @@ class MGLDocumentationExampleTests: XCTestCase, MGLMapViewDelegate { //#-example-code let layer = MGLLineStyleLayer(identifier: "trails-path", source: trails) layer.sourceLayerIdentifier = "trails" - layer.lineWidth = MGLStyleValue(interpolationBase: 1.5, stops: [ - 14: MGLStyleValue(rawValue: 2), - 18: MGLStyleValue(rawValue: 20), - ]) + 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") |