From d4e597eb94a90a816fcc480fa7b6719430a20b84 Mon Sep 17 00:00:00 2001 From: Jason Wray Date: Thu, 12 Apr 2018 18:59:09 -0400 Subject: [ios, macos] Convert various class methods to class properties This improves the Swift interface while having no effect on Obj-C usage. --- platform/darwin/test/MGLDocumentationExampleTests.swift | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'platform/darwin/test/MGLDocumentationExampleTests.swift') diff --git a/platform/darwin/test/MGLDocumentationExampleTests.swift b/platform/darwin/test/MGLDocumentationExampleTests.swift index 92f5162aab..9edb33a078 100644 --- a/platform/darwin/test/MGLDocumentationExampleTests.swift +++ b/platform/darwin/test/MGLDocumentationExampleTests.swift @@ -80,7 +80,7 @@ class MGLDocumentationExampleTests: XCTestCase, MGLMapViewDelegate { .maximumZoomLevel: 16, .tileSize: 512, .attributionInfos: [ - MGLAttributionInfo(title: NSAttributedString(string: "© Mapbox"), url: URL(string: "http://mapbox.com")) + MGLAttributionInfo(title: NSAttributedString(string: "© Mapbox"), url: URL(string: "https://mapbox.com")) ] ]) mapView.style?.addSource(source) @@ -115,7 +115,7 @@ class MGLDocumentationExampleTests: XCTestCase, MGLMapViewDelegate { .minimumZoomLevel: 9, .maximumZoomLevel: 16, .attributionInfos: [ - MGLAttributionInfo(title: NSAttributedString(string: "© Mapbox"), url: URL(string: "http://mapbox.com")) + MGLAttributionInfo(title: NSAttributedString(string: "© Mapbox"), url: URL(string: "https://mapbox.com")) ] ]) mapView.style?.addSource(source) @@ -280,7 +280,7 @@ class MGLDocumentationExampleTests: XCTestCase, MGLMapViewDelegate { .maximumZoomLevel: 16, .tileSize: 512, .attributionInfos: [ - MGLAttributionInfo(title: NSAttributedString(string: "© Mapbox"), url: URL(string: "http://mapbox.com")) + MGLAttributionInfo(title: NSAttributedString(string: "© Mapbox"), url: URL(string: "https://mapbox.com")) ] ]) mapView.style?.addSource(source) @@ -300,7 +300,7 @@ class MGLDocumentationExampleTests: XCTestCase, MGLMapViewDelegate { .maximumZoomLevel: 16, .tileSize: 256, .attributionInfos: [ - MGLAttributionInfo(title: NSAttributedString(string: "© Mapbox"), url: URL(string: "http://mapbox.com")) + MGLAttributionInfo(title: NSAttributedString(string: "© Mapbox"), url: URL(string: "https://mapbox.com")) ] ]) mapView.style?.addSource(source) @@ -370,7 +370,7 @@ class MGLDocumentationExampleTests: XCTestCase, MGLMapViewDelegate { #endif class MGLStyle { - static func satelliteStreetsStyleURL() -> URL { + static var satelliteStreetsStyleURL: URL { return MGLDocumentationExampleTests.styleURL } } @@ -378,7 +378,7 @@ class MGLDocumentationExampleTests: XCTestCase, MGLMapViewDelegate { //#-example-code let camera = MGLMapCamera(lookingAtCenter: CLLocationCoordinate2D(latitude: 37.7184, longitude: -122.4365), fromDistance: 100, pitch: 20, heading: 0) - let options = MGLMapSnapshotOptions(styleURL: MGLStyle.satelliteStreetsStyleURL(), camera: camera, size: CGSize(width: 320, height: 480)) + let options = MGLMapSnapshotOptions(styleURL: MGLStyle.satelliteStreetsStyleURL, camera: camera, size: CGSize(width: 320, height: 480)) options.zoomLevel = 10 let snapshotter = MGLMapSnapshotter(options: options) -- cgit v1.2.1