diff options
author | Asheem Mamoowala <asheem.mamoowala@mapbox.com> | 2017-06-13 12:55:01 -0700 |
---|---|---|
committer | Asheem Mamoowala <asheem.mamoowala@mapbox.com> | 2017-06-19 09:50:08 -0700 |
commit | 7f36e0cf769f6fe7a759b1cf6c56948c4c141fef (patch) | |
tree | 2b72187a6306df9d97d4b57007bd64c86a4bf4c7 /platform/darwin/test/MGLDocumentationExampleTests.swift | |
parent | b7c7d3fdab283d7bf03d8acf68b9cfd478d6973f (diff) | |
download | qtlocation-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.swift | 10 |
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() { |