diff options
author | Fabian Guerra <fabian.guerra@mapbox.com> | 2018-02-15 11:54:51 -0500 |
---|---|---|
committer | Fabian Guerra <fabian.guerra@mapbox.com> | 2018-02-15 11:54:51 -0500 |
commit | 903e7989ec3438a605bafbf5938de38cdb868e4a (patch) | |
tree | a2f8ba01fd8bf41503396605b993f9e38b77e131 /platform/darwin/test/MGLTileSetTests.mm | |
parent | c83dc310aa656132638a66e65ba8aa274b5e969f (diff) | |
parent | 82de856c94bbc090ba30186011610da5e233e277 (diff) | |
download | qtlocation-mapboxgl-903e7989ec3438a605bafbf5938de38cdb868e4a.tar.gz |
Merge branch 'master' into release-boba
# Conflicts:
# platform/android/CHANGELOG.md
# platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/Mapbox.java
# platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/widgets/CompassView.java
# platform/android/scripts/exclude-activity-gen.json
# platform/ios/CHANGELOG.md
# platform/ios/Mapbox-iOS-SDK-nightly-dynamic.podspec
# platform/ios/Mapbox-iOS-SDK-symbols.podspec
# platform/ios/Mapbox-iOS-SDK.podspec
# platform/macos/CHANGELOG.md
Diffstat (limited to 'platform/darwin/test/MGLTileSetTests.mm')
-rw-r--r-- | platform/darwin/test/MGLTileSetTests.mm | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/platform/darwin/test/MGLTileSetTests.mm b/platform/darwin/test/MGLTileSetTests.mm index 40eab5f974..4d5e1fcd05 100644 --- a/platform/darwin/test/MGLTileSetTests.mm +++ b/platform/darwin/test/MGLTileSetTests.mm @@ -2,6 +2,7 @@ #import <Mapbox/Mapbox.h> #import "MGLTileSource_Private.h" +#import "MGLGeometry_Private.h" #include <mbgl/util/tileset.hpp> @@ -40,6 +41,19 @@ XCTAssertEqual(tileSet.zoomRange.min, 1); XCTAssertEqual(tileSet.zoomRange.max, 2); + // when the tile set has a bounds set + MGLCoordinateBounds bounds = MGLCoordinateBoundsMake(CLLocationCoordinate2DMake(12, 34), CLLocationCoordinate2DMake(56, 78)); + tileSet = MGLTileSetFromTileURLTemplates(@[@"tile.1"], @{ + MGLTileSourceOptionCoordinateBounds: @(bounds), + }); + + // the mbgl object reflects the set values for the bounds + XCTAssert(!!tileSet.bounds, @"The bounds are set after setting the bounds"); + if (tileSet.bounds) { + MGLCoordinateBounds actual = MGLCoordinateBoundsFromLatLngBounds(*tileSet.bounds); + XCTAssert(MGLCoordinateBoundsEqualToCoordinateBounds(bounds, actual), @"The bounds round-trip"); + } + // when the tile set has an attribution NSString *attribution = @"my tileset © ©️🎈"; tileSet = MGLTileSetFromTileURLTemplates(tileURLTemplates, @{ |