summaryrefslogtreecommitdiff
path: root/platform/darwin/test/MGLDocumentationExampleTests.swift
diff options
context:
space:
mode:
authorAsheem Mamoowala <asheem.mamoowala@mapbox.com>2017-06-13 12:55:01 -0700
committerAsheem Mamoowala <asheem.mamoowala@mapbox.com>2017-06-19 09:50:08 -0700
commit7f36e0cf769f6fe7a759b1cf6c56948c4c141fef (patch)
tree2b72187a6306df9d97d4b57007bd64c86a4bf4c7 /platform/darwin/test/MGLDocumentationExampleTests.swift
parentb7c7d3fdab283d7bf03d8acf68b9cfd478d6973f (diff)
downloadqtlocation-mapboxgl-7f36e0cf769f6fe7a759b1cf6c56948c4c141fef.tar.gz
[iOS][macOS] Export `MGLImageSource`, add and update documentation. Use animated ImageSource demo in iOS test app
Diffstat (limited to 'platform/darwin/test/MGLDocumentationExampleTests.swift')
-rw-r--r--platform/darwin/test/MGLDocumentationExampleTests.swift10
1 files changed, 5 insertions, 5 deletions
diff --git a/platform/darwin/test/MGLDocumentationExampleTests.swift b/platform/darwin/test/MGLDocumentationExampleTests.swift
index 2a441d2774..ae72b35d82 100644
--- a/platform/darwin/test/MGLDocumentationExampleTests.swift
+++ b/platform/darwin/test/MGLDocumentationExampleTests.swift
@@ -106,16 +106,16 @@ class MGLDocumentationExampleTests: XCTestCase, MGLMapViewDelegate {
func testMGLImageSource() {
//#-example-code
- let coordinates: MGLCoordinateQuad = MGLCoordinateQuad(
+ let coordinates = MGLCoordinateQuad(
topLeft: CLLocationCoordinate2D(latitude: 46.437, longitude: -80.425),
- topRight: CLLocationCoordinate2D(latitude: 46.437, longitude: -71.516),
+ bottomLeft: CLLocationCoordinate2D(latitude: 37.936, longitude: -80.425),
bottomRight: CLLocationCoordinate2D(latitude: 37.936, longitude: -71.516),
- bottomLeft: CLLocationCoordinate2D(latitude: 37.936, longitude: -80.425))
- let source = MGLImageSource(identifier: "images", coordinates: coordinates, imageURL: URL(string: "https://www.mapbox.com/mapbox-gl-js/assets/radar.gif")!)
+ topRight: CLLocationCoordinate2D(latitude: 46.437, longitude: -71.516))
+ let source = MGLImageSource(identifier: "radar", coordinateQuad: coordinates, url: URL(string: "https://www.mapbox.com/mapbox-gl-js/assets/radar.gif")!)
mapView.style?.addSource(source)
//#-end-example-code
- XCTAssertNotNil(mapView.style?.source(withIdentifier: "images"))
+ XCTAssertNotNil(mapView.style?.source(withIdentifier: "radar"))
}
func testMGLCircleStyleLayer() {