summaryrefslogtreecommitdiff
path: root/platform/darwin/test/MGLDocumentationExampleTests.swift
diff options
context:
space:
mode:
authorMinh Nguyễn <mxn@1ec5.org>2018-09-25 13:35:41 -0700
committerMinh Nguyễn <mxn@1ec5.org>2018-10-01 18:12:03 -0700
commita030f1474fa9eb556552ec48eba9cb5e771d1580 (patch)
tree53e10e998c81094da9d69997d91b1f5b3cb580e7 /platform/darwin/test/MGLDocumentationExampleTests.swift
parent79dd9ca250a8360f3a32e8596e2cce1e397b8d78 (diff)
downloadqtlocation-mapboxgl-a030f1474fa9eb556552ec48eba9cb5e771d1580.tar.gz
[ios, macos] Distinguish between viewing distance and altitude
+[MGLMapCamera cameraLookingAtCenterCoordinate:fromDistance:pitch:heading:] incorrectly treated the distance as an altitude. Due to backwards compatibility concerns, this method can’t be fixed in place. Instead, separate +[MGLMapCamera cameraLookingAtCenterCoordinate:correctlyFromDistance:pitch:heading:] and +[MGLMapCamera cameraLookingAtCenterCoordinate:altitude:pitch:heading:] methods have been added.
Diffstat (limited to 'platform/darwin/test/MGLDocumentationExampleTests.swift')
-rw-r--r--platform/darwin/test/MGLDocumentationExampleTests.swift2
1 files changed, 1 insertions, 1 deletions
diff --git a/platform/darwin/test/MGLDocumentationExampleTests.swift b/platform/darwin/test/MGLDocumentationExampleTests.swift
index dd34b25291..a8f92dd528 100644
--- a/platform/darwin/test/MGLDocumentationExampleTests.swift
+++ b/platform/darwin/test/MGLDocumentationExampleTests.swift
@@ -376,7 +376,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 camera = MGLMapCamera(lookingAtCenter: CLLocationCoordinate2D(latitude: 37.7184, longitude: -122.4365), altitude: 100, pitch: 20, heading: 0)
let options = MGLMapSnapshotOptions(styleURL: MGLStyle.satelliteStreetsStyleURL, camera: camera, size: CGSize(width: 320, height: 480))
options.zoomLevel = 10