diff options
author | Minh Nguyễn <mxn@1ec5.org> | 2016-11-01 22:48:37 -0700 |
---|---|---|
committer | Minh Nguyễn <mxn@1ec5.org> | 2016-11-02 12:40:40 -0700 |
commit | e2797d1f24ac9ea5436921f97fbdac0ddc39d51b (patch) | |
tree | 3f5d6eabf2a42b0451d4b4033fb428ddcea511ca /platform/ios/test | |
parent | c2e37f062be6848a73eb5659f253775aa0abfe02 (diff) | |
download | qtlocation-mapboxgl-e2797d1f24ac9ea5436921f97fbdac0ddc39d51b.tar.gz |
[ios, macos] Rationalized string enum names
Renamed MGLGeoJSONSourceOption and MGLOfflinePackUserInfoKey constants for clarity and to remove redundancy in the Swift-bridged names. Left the old MGLOfflinePackUserInfoKey constants in place as deprecated aliases.
Diffstat (limited to 'platform/ios/test')
-rw-r--r-- | platform/ios/test/MGLGeoJSONSourceTests.mm | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/platform/ios/test/MGLGeoJSONSourceTests.mm b/platform/ios/test/MGLGeoJSONSourceTests.mm index 96431ad018..be8bb143ce 100644 --- a/platform/ios/test/MGLGeoJSONSourceTests.mm +++ b/platform/ios/test/MGLGeoJSONSourceTests.mm @@ -15,12 +15,12 @@ - (void)testMGLGeoJSONSourceWithOptions { NSURL *url = [NSURL URLWithString:@"http://www.mapbox.com/source"]; - NSDictionary *options = @{MGLGeoJSONClusterOption: @(YES), - MGLGeoJSONClusterRadiusOption: @42, - MGLGeoJSONClusterMaximumZoomLevelOption: @98, - MGLGeoJSONMaximumZoomLevelOption: @99, - MGLGeoJSONBufferOption: @1976, - MGLGeoJSONToleranceOption: @0.42}; + NSDictionary *options = @{MGLGeoJSONSourceOptionClustered: @YES, + MGLGeoJSONSourceOptionClusterRadius: @42, + MGLGeoJSONSourceOptionMaximumZoomLevelForClustering: @98, + MGLGeoJSONSourceOptionMaximumZoomLevel: @99, + MGLGeoJSONSourceOptionBuffer: @1976, + MGLGeoJSONSourceOptionSimplificationTolerance: @0.42}; MGLGeoJSONSource *source = [[MGLGeoJSONSource alloc] initWithIdentifier:@"source-id" URL:url options:options]; auto mbglOptions = [source geoJSONOptions]; @@ -31,7 +31,7 @@ XCTAssertEqual(mbglOptions.buffer, 1976); XCTAssertEqual(mbglOptions.tolerance, 0.42); - options = @{MGLGeoJSONClusterOption: @"number 1"}; + options = @{MGLGeoJSONSourceOptionClustered: @"number 1"}; XCTAssertThrows([[MGLGeoJSONSource alloc] initWithIdentifier:@"source-id" URL:url options:options]); } |