diff --git a/appveyor.yml b/appveyor.yml index b1fe0b9f4f5..53970e1ac52 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -47,8 +47,8 @@ for: - image: Visual Studio 2017 environment: - LLVM_VERSION: 6.0.0 - LLVM_HASH: 2501887b2f638d3f65b0336f354b96f8108b563522d81e841d5c88c34af283dd + LLVM_VERSION: 7.0.0 + LLVM_HASH: 74b197a3959b0408adf0824be01db8dddfa2f9a967f4085af3fad900ed5fdbf6 VCVARSALL: 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat' QT_PREFIX: 'C:\Qt\latest\msvc2017_64\lib\cmake' diff --git a/circle.yml b/circle.yml index 87bca8559c9..8a63124d18e 100644 --- a/circle.yml +++ b/circle.yml @@ -509,7 +509,7 @@ jobs: - run: name: Run Clang checks command: make check - no_output_timeout: 20m + no_output_timeout: 25m - save-dependencies: { ccache: false } # ------------------------------------------------------------------------------ diff --git a/platform/darwin/src/MGLFeature.mm b/platform/darwin/src/MGLFeature.mm index 3b6a2ee488e..d24c8076255 100644 --- a/platform/darwin/src/MGLFeature.mm +++ b/platform/darwin/src/MGLFeature.mm @@ -25,11 +25,12 @@ @interface MGLEmptyFeature () @implementation MGLEmptyFeature @synthesize identifier; -@synthesize attributes; +@synthesize attributes = _attributes; MGL_DEFINE_FEATURE_INIT_WITH_CODER(); MGL_DEFINE_FEATURE_ENCODE(); MGL_DEFINE_FEATURE_IS_EQUAL(); +MGL_DEFINE_FEATURE_ATTRIBUTES_GETTER(); - (id)attributeForKey:(NSString *)key { MGLLogDebug(@"Retrieving attributeForKey: %@", key); @@ -60,11 +61,12 @@ @interface MGLPointFeature () @implementation MGLPointFeature @synthesize identifier; -@synthesize attributes; +@synthesize attributes = _attributes; MGL_DEFINE_FEATURE_INIT_WITH_CODER(); MGL_DEFINE_FEATURE_ENCODE(); MGL_DEFINE_FEATURE_IS_EQUAL(); +MGL_DEFINE_FEATURE_ATTRIBUTES_GETTER(); - (id)attributeForKey:(NSString *)key { MGLLogDebug(@"Retrieving attributeForKey: %@", key); @@ -96,11 +98,12 @@ @interface MGLPolylineFeature () @implementation MGLPolylineFeature @synthesize identifier; -@synthesize attributes; +@synthesize attributes = _attributes; MGL_DEFINE_FEATURE_INIT_WITH_CODER(); MGL_DEFINE_FEATURE_ENCODE(); MGL_DEFINE_FEATURE_IS_EQUAL(); +MGL_DEFINE_FEATURE_ATTRIBUTES_GETTER(); - (id)attributeForKey:(NSString *)key { MGLLogDebug(@"Retrieving attributeForKey: %@", key); @@ -133,11 +136,12 @@ @interface MGLPolygonFeature () @implementation MGLPolygonFeature @synthesize identifier; -@synthesize attributes; +@synthesize attributes = _attributes; MGL_DEFINE_FEATURE_INIT_WITH_CODER(); MGL_DEFINE_FEATURE_ENCODE(); MGL_DEFINE_FEATURE_IS_EQUAL(); +MGL_DEFINE_FEATURE_ATTRIBUTES_GETTER(); - (id)attributeForKey:(NSString *)key { MGLLogDebug(@"Retrieving attributeForKey: %@", key); @@ -170,11 +174,12 @@ @interface MGLPointCollectionFeature () @implementation MGLPointCollectionFeature @synthesize identifier; -@synthesize attributes; +@synthesize attributes = _attributes; MGL_DEFINE_FEATURE_INIT_WITH_CODER(); MGL_DEFINE_FEATURE_ENCODE(); MGL_DEFINE_FEATURE_IS_EQUAL(); +MGL_DEFINE_FEATURE_ATTRIBUTES_GETTER(); - (id)attributeForKey:(NSString *)key { MGLLogDebug(@"Retrieving attributeForKey: %@", key); @@ -197,11 +202,12 @@ @interface MGLMultiPolylineFeature () @implementation MGLMultiPolylineFeature @synthesize identifier; -@synthesize attributes; +@synthesize attributes = _attributes; MGL_DEFINE_FEATURE_INIT_WITH_CODER(); MGL_DEFINE_FEATURE_ENCODE(); MGL_DEFINE_FEATURE_IS_EQUAL(); +MGL_DEFINE_FEATURE_ATTRIBUTES_GETTER(); - (id)attributeForKey:(NSString *)key { MGLLogDebug(@"Retrieving attributeForKey: %@", key); @@ -234,11 +240,12 @@ @interface MGLMultiPolygonFeature () @implementation MGLMultiPolygonFeature @synthesize identifier; -@synthesize attributes; +@synthesize attributes = _attributes; MGL_DEFINE_FEATURE_INIT_WITH_CODER(); MGL_DEFINE_FEATURE_ENCODE(); MGL_DEFINE_FEATURE_IS_EQUAL(); +MGL_DEFINE_FEATURE_ATTRIBUTES_GETTER(); - (id)attributeForKey:(NSString *)key { MGLLogDebug(@"Retrieving attributeForKey: %@", key); @@ -271,7 +278,7 @@ @interface MGLShapeCollectionFeature () @implementation MGLShapeCollectionFeature @synthesize identifier; -@synthesize attributes; +@synthesize attributes = _attributes; @dynamic shapes; @@ -282,6 +289,7 @@ + (instancetype)shapeCollectionWithShapes:(NSArray *> *)sha MGL_DEFINE_FEATURE_INIT_WITH_CODER(); MGL_DEFINE_FEATURE_ENCODE(); MGL_DEFINE_FEATURE_IS_EQUAL(); +MGL_DEFINE_FEATURE_ATTRIBUTES_GETTER(); - (id)attributeForKey:(NSString *)key { return self.attributes[key]; @@ -463,7 +471,7 @@ static CLLocationCoordinate2D toLocationCoordinate2D(const mbgl::Point &point NSDictionary *NSDictionaryFeatureForGeometry(NSDictionary *geometry, NSDictionary *attributes, id identifier) { NSMutableDictionary *feature = [@{@"type": @"Feature", - @"properties": (attributes) ?: [NSNull null], + @"properties": attributes, @"geometry": geometry} mutableCopy]; feature[@"id"] = identifier; return [feature copy]; diff --git a/platform/darwin/src/MGLFeature_Private.h b/platform/darwin/src/MGLFeature_Private.h index d4074b53ed8..9fb1f918201 100644 --- a/platform/darwin/src/MGLFeature_Private.h +++ b/platform/darwin/src/MGLFeature_Private.h @@ -31,7 +31,7 @@ MGLShape* MGLShapeFromGeoJSON(const mapbox::geojson::geojson &geojson); returns the feature object with converted `mbgl::FeatureIdentifier` and `mbgl::PropertyMap` properties. */ -mbgl::Feature mbglFeature(mbgl::Feature feature, id identifier, NSDictionary *attributes); +mbgl::Feature mbglFeature(mbgl::Feature feature, id identifier, NSDictionary * attributes); /** Returns an `NSDictionary` representation of an `MGLFeature`. @@ -45,7 +45,7 @@ NS_ASSUME_NONNULL_END if (self = [super initWithCoder:decoder]) { \ NSSet *identifierClasses = [NSSet setWithArray:@[[NSString class], [NSNumber class]]]; \ identifier = [decoder decodeObjectOfClasses:identifierClasses forKey:@"identifier"]; \ - attributes = [decoder decodeObjectOfClass:[NSDictionary class] forKey:@"attributes"]; \ + _attributes = [decoder decodeObjectOfClass:[NSDictionary class] forKey:@"attributes"]; \ } \ return self; \ } @@ -54,7 +54,7 @@ NS_ASSUME_NONNULL_END - (void)encodeWithCoder:(NSCoder *)coder { \ [super encodeWithCoder:coder]; \ [coder encodeObject:identifier forKey:@"identifier"]; \ - [coder encodeObject:attributes forKey:@"attributes"]; \ + [coder encodeObject:_attributes forKey:@"attributes"]; \ } #define MGL_DEFINE_FEATURE_IS_EQUAL() \ @@ -67,3 +67,11 @@ NS_ASSUME_NONNULL_END - (NSUInteger)hash { \ return [super hash] + [[self geoJSONDictionary] hash]; \ } + +#define MGL_DEFINE_FEATURE_ATTRIBUTES_GETTER() \ + - (NSDictionary *) attributes { \ + if (!_attributes) { \ + return @{}; \ + } \ + return _attributes; \ + } diff --git a/platform/darwin/src/MGLStyle.h b/platform/darwin/src/MGLStyle.h index 7621db0ad53..c9fd5323aa7 100644 --- a/platform/darwin/src/MGLStyle.h +++ b/platform/darwin/src/MGLStyle.h @@ -29,7 +29,7 @@ NS_ASSUME_NONNULL_BEGIN the constant itself. Such details may change significantly from version to version. */ -static MGL_EXPORT const NSInteger MGLStyleDefaultVersion = 10; +static MGL_EXPORT const NSInteger MGLStyleDefaultVersion = 11; FOUNDATION_EXTERN MGL_EXPORT MGLExceptionName const MGLInvalidStyleURLException; FOUNDATION_EXTERN MGL_EXPORT MGLExceptionName const MGLRedundantLayerException; diff --git a/platform/darwin/test/MGLFeatureTests.mm b/platform/darwin/test/MGLFeatureTests.mm index 3e8e47474b4..67f2a9a45e2 100644 --- a/platform/darwin/test/MGLFeatureTests.mm +++ b/platform/darwin/test/MGLFeatureTests.mm @@ -176,7 +176,7 @@ - (void)testPointFeatureGeoJSONDictionary { // it has no "id" key (or value) XCTAssertNil(geoJSONFeature[@"id"]); // it has a null representation of the properties object - XCTAssertEqualObjects(geoJSONFeature[@"properties"], [NSNull null]); + XCTAssertEqualObjects(geoJSONFeature[@"properties"], @{}); // when there is a string identifier pointFeature.identifier = @"string-id"; @@ -317,13 +317,13 @@ - (void)testShapeCollectionFeatureGeoJSONDictionary { @"geometries": @[ @{ @"geometry": @{@"type": @"Point", @"coordinates": @[@(pointCoordinate.longitude), @(pointCoordinate.latitude)]}, - @"properties": [NSNull null], + @"properties": @{}, @"type": @"Feature", }, @{ @"geometry": @{@"type": @"LineString", @"coordinates": @[@[@(coord1.longitude), @(coord1.latitude)], @[@(coord2.longitude), @(coord2.latitude)]]}, - @"properties": [NSNull null], + @"properties": @{}, @"type": @"Feature", } ] diff --git a/platform/default/mbgl/util/default_styles.hpp b/platform/default/mbgl/util/default_styles.hpp index 13f08252a72..335d3ea5f9b 100644 --- a/platform/default/mbgl/util/default_styles.hpp +++ b/platform/default/mbgl/util/default_styles.hpp @@ -13,12 +13,12 @@ struct DefaultStyle { const unsigned currentVersion; }; -constexpr const DefaultStyle streets = { "mapbox://styles/mapbox/streets-v10", "Streets", 10 }; -constexpr const DefaultStyle outdoors = { "mapbox://styles/mapbox/outdoors-v10", "Outdoors", 10 }; -constexpr const DefaultStyle light = { "mapbox://styles/mapbox/light-v9", "Light", 9 }; -constexpr const DefaultStyle dark = { "mapbox://styles/mapbox/dark-v9", "Dark", 9 }; +constexpr const DefaultStyle streets = { "mapbox://styles/mapbox/streets-v11", "Streets", 11 }; +constexpr const DefaultStyle outdoors = { "mapbox://styles/mapbox/outdoors-v11", "Outdoors", 11 }; +constexpr const DefaultStyle light = { "mapbox://styles/mapbox/light-v10", "Light", 10 }; +constexpr const DefaultStyle dark = { "mapbox://styles/mapbox/dark-v10", "Dark", 10 }; constexpr const DefaultStyle satellite = { "mapbox://styles/mapbox/satellite-v9", "Satellite", 9 }; -constexpr const DefaultStyle satelliteStreets = { "mapbox://styles/mapbox/satellite-streets-v10", "Satellite Streets", 10 }; +constexpr const DefaultStyle satelliteStreets = { "mapbox://styles/mapbox/satellite-streets-v11", "Satellite Streets", 11 }; const DefaultStyle orderedStyles[] = { streets, outdoors, light, dark, satellite, satelliteStreets, diff --git a/platform/ios/CHANGELOG.md b/platform/ios/CHANGELOG.md index e3b361d398b..33fe0ef47d6 100644 --- a/platform/ios/CHANGELOG.md +++ b/platform/ios/CHANGELOG.md @@ -16,6 +16,8 @@ Mapbox welcomes participation and contributions from everyone. Please read [CONT * Added the `MGLFillExtrusionStyleLayer.fillExtrusionHasVerticalGradient` property. ([#13463](https://github.com/mapbox/mapbox-gl-native/pull/13463)) * Added support for setting `MGLCollisionBehaviorPre4_0` in `NSUserDefaults`. ([#13426](https://github.com/mapbox/mapbox-gl-native/pull/13426)) * `-[MGLStyle localizeLabelsIntoLocale:]` and `-[NSExpression(MGLAdditions) mgl_expressionLocalizedIntoLocale:]` can automatically localize styles that use version 8 of the Mapbox Streets source. ([#13481](https://github.com/mapbox/mapbox-gl-native/pull/13481)) +* Fixed symbol flickering during instantaneous transitions. ([#13535](https://github.com/mapbox/mapbox-gl-native/pull/13535)) +* `MGLMapView`, `MGLShapeOfflineRegion`, and `MGLTilePyramidOfflineRegion` now default to version 11 of the Mapbox Streets style. Similarly, several class properties of `MGLStyle`, such as `MGLStyle.lightStyleURL`, have been updated to return URLs to new versions of their respective styles. ### Map snapshots @@ -28,6 +30,7 @@ Mapbox welcomes participation and contributions from everyone. Please read [CONT * Renamed `-[MGLOfflineStorage putResourceWithUrl:data:modified:expires:etag:mustRevalidate:]` to `-[MGLOfflineStorage preloadData:forURL:modificationDate:expirationDate:eTag:mustRevalidate:]`. ([#13318](https://github.com/mapbox/mapbox-gl-native/pull/13318)) * Added `MGLLoggingConfiguration` and `MGLLoggingBlockHandler` that handle error and fault events produced by the SDK. ([#13235](https://github.com/mapbox/mapbox-gl-native/pull/13235)) * Fixed random crashes during app termination. ([#13367](https://github.com/mapbox/mapbox-gl-native/pull/13367)) +* Fixed a crash when specifying `MGLShapeSourceOptionLineDistanceMetrics` when creating an `MGLShapeSource`. ([#13543](https://github.com/mapbox/mapbox-gl-native/pull/13543)) ## 4.6.0 - November 7, 2018 diff --git a/platform/ios/Integration Tests/MGLShapeSourceTests.m b/platform/ios/Integration Tests/MGLShapeSourceTests.m index 088a9b011e2..836118450e8 100644 --- a/platform/ios/Integration Tests/MGLShapeSourceTests.m +++ b/platform/ios/Integration Tests/MGLShapeSourceTests.m @@ -122,5 +122,42 @@ - (void)testSettingShapeSourceToNilInRegionIsChanging { [self waitForExpectations:@[expectation] timeout:1.0]; } +- (void)testShapeSourceWithLineDistanceMetrics { + CLLocationCoordinate2D coordinates[] = { + CLLocationCoordinate2DMake(9.6315313, 52.4133574), + CLLocationCoordinate2DMake(24.9410248, 60.1733244)}; + + MGLPolylineFeature *polylineFeature = [MGLPolylineFeature polylineWithCoordinates:coordinates count:sizeof(coordinates)/sizeof(coordinates[0])]; + NSDictionary *options = @{MGLShapeSourceOptionLineDistanceMetrics: @YES}; + MGLShapeSource *source = [[MGLShapeSource alloc] initWithIdentifier:@"route" shape:polylineFeature options:options]; + MGLLineStyleLayer *lineLayer = [[MGLLineStyleLayer alloc] initWithIdentifier:@"lineLayer" source:source]; + + [self.style addSource:source]; + [self.style addLayer:lineLayer]; + [self.mapView setCenterCoordinate:CLLocationCoordinate2DMake(9.6315313, 52.4133574) animated:YES]; + + XCTestExpectation *expectation = [self expectationWithDescription:@"regionDidChange expectation"]; + expectation.expectedFulfillmentCount = 1; + expectation.assertForOverFulfill = YES; + + __weak id weakself = self; + self.regionDidChange = ^(MGLMapView *mapView, MGLCameraChangeReason reason, BOOL animated) { + + id strongSelf = weakself; + if (!strongSelf) + return; + + NSArray *features = [source featuresMatchingPredicate:nil]; + MGLTestAssert(strongSelf, features.count == 1UL, @"Should contain one Feature"); + + MGLPolylineFeature *feature = [features objectAtIndex:0]; + MGLTestAssertNotNil(strongSelf, [feature.attributes objectForKey:@"mapbox_clip_start"], @"Attributes should contain mapbox_clip_start property"); + MGLTestAssertNotNil(strongSelf, [feature.attributes objectForKey:@"mapbox_clip_end"], @"Attributes should contain mapbox_clip_end property"); + + [expectation fulfill]; + }; + + [self waitForExpectations:@[expectation] timeout:1.0]; +} @end diff --git a/platform/ios/Integration Tests/MGLStyleURLIntegrationTest.m b/platform/ios/Integration Tests/MGLStyleURLIntegrationTest.m new file mode 100644 index 00000000000..f9217bae5fc --- /dev/null +++ b/platform/ios/Integration Tests/MGLStyleURLIntegrationTest.m @@ -0,0 +1,42 @@ +#import "MGLMapViewIntegrationTest.h" + +@interface MGLStyleURLIntegrationTest : MGLMapViewIntegrationTest +@end + +@implementation MGLStyleURLIntegrationTest + +- (void)internalTestWithStyleSelector:(SEL)selector { + if (![self validAccessToken]) { + return; + } + + self.mapView.styleURL = [MGLStyle performSelector:selector]; + [self waitForMapViewToFinishLoadingStyleWithTimeout:5]; +} + + +- (void)testLoadingStreetsStyleURL { + [self internalTestWithStyleSelector:@selector(streetsStyleURL)]; +} + +- (void)testLoadingOutdoorsStyleURL { + [self internalTestWithStyleSelector:@selector(outdoorsStyleURL)]; +} + +- (void)testLoadingLightStyleURL { + [self internalTestWithStyleSelector:@selector(lightStyleURL)]; +} + +- (void)testLoadingDarkStyleURL { + [self internalTestWithStyleSelector:@selector(darkStyleURL)]; +} + +- (void)testLoadingSatelliteStyleURL { + [self internalTestWithStyleSelector:@selector(satelliteStyleURL)]; +} + +- (void)testLoadingSatelliteStreetsStyleURL { + [self internalTestWithStyleSelector:@selector(satelliteStreetsStyleURL)]; +} + +@end diff --git a/platform/ios/Mapbox-iOS-SDK-nightly-dynamic.podspec b/platform/ios/Mapbox-iOS-SDK-nightly-dynamic.podspec index f2eabb50a18..8bea32c9b44 100644 --- a/platform/ios/Mapbox-iOS-SDK-nightly-dynamic.podspec +++ b/platform/ios/Mapbox-iOS-SDK-nightly-dynamic.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |m| - version = '4.7.0-beta.2' + version = '4.7.0' m.name = 'Mapbox-iOS-SDK-nightly-dynamic' m.version = "#{version}-nightly" diff --git a/platform/ios/Mapbox-iOS-SDK-stripped.podspec b/platform/ios/Mapbox-iOS-SDK-stripped.podspec index 651d5635582..594f325d5c5 100644 --- a/platform/ios/Mapbox-iOS-SDK-stripped.podspec +++ b/platform/ios/Mapbox-iOS-SDK-stripped.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |m| - version = '4.7.0-beta.2' + version = '4.7.0' m.name = 'Mapbox-iOS-SDK-stripped' m.version = "#{version}-stripped" diff --git a/platform/ios/Mapbox-iOS-SDK.podspec b/platform/ios/Mapbox-iOS-SDK.podspec index 07d6bc405bc..eb3dc389c96 100644 --- a/platform/ios/Mapbox-iOS-SDK.podspec +++ b/platform/ios/Mapbox-iOS-SDK.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |m| - version = '4.7.0-beta.2' + version = '4.7.0' m.name = 'Mapbox-iOS-SDK' m.version = version diff --git a/platform/ios/ios.xcodeproj/project.pbxproj b/platform/ios/ios.xcodeproj/project.pbxproj index b2d43f502bd..1b1c84c3882 100644 --- a/platform/ios/ios.xcodeproj/project.pbxproj +++ b/platform/ios/ios.xcodeproj/project.pbxproj @@ -431,6 +431,7 @@ CA55CD41202C16AA00CE7095 /* MGLCameraChangeReason.h in Headers */ = {isa = PBXBuildFile; fileRef = CA55CD3E202C16AA00CE7095 /* MGLCameraChangeReason.h */; settings = {ATTRIBUTES = (Public, ); }; }; CA55CD42202C16AA00CE7095 /* MGLCameraChangeReason.h in Headers */ = {isa = PBXBuildFile; fileRef = CA55CD3E202C16AA00CE7095 /* MGLCameraChangeReason.h */; settings = {ATTRIBUTES = (Public, ); }; }; CA6914B520E67F50002DB0EE /* MGLAnnotationViewIntegrationTests.m in Sources */ = {isa = PBXBuildFile; fileRef = CA6914B420E67F50002DB0EE /* MGLAnnotationViewIntegrationTests.m */; }; + CA88DC3021C85D900059ED5A /* MGLStyleURLIntegrationTest.m in Sources */ = {isa = PBXBuildFile; fileRef = CA88DC2F21C85D900059ED5A /* MGLStyleURLIntegrationTest.m */; }; CA8FBC0921A47BB100D1203C /* MGLRendererConfigurationTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = CA8FBC0821A47BB100D1203C /* MGLRendererConfigurationTests.mm */; }; CAA69DA4206DCD0E007279CD /* Mapbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DA4A26961CB6E795000B7809 /* Mapbox.framework */; }; CAA69DA5206DCD0E007279CD /* Mapbox.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = DA4A26961CB6E795000B7809 /* Mapbox.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; @@ -1096,6 +1097,7 @@ CA55CD3E202C16AA00CE7095 /* MGLCameraChangeReason.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGLCameraChangeReason.h; sourceTree = ""; }; CA5E5042209BDC5F001A8A81 /* MGLTestUtility.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = MGLTestUtility.h; path = ../../darwin/test/MGLTestUtility.h; sourceTree = ""; }; CA6914B420E67F50002DB0EE /* MGLAnnotationViewIntegrationTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = MGLAnnotationViewIntegrationTests.m; path = "Annotation Tests/MGLAnnotationViewIntegrationTests.m"; sourceTree = ""; }; + CA88DC2F21C85D900059ED5A /* MGLStyleURLIntegrationTest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MGLStyleURLIntegrationTest.m; sourceTree = ""; }; CA8FBC0821A47BB100D1203C /* MGLRendererConfigurationTests.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = MGLRendererConfigurationTests.mm; path = ../../darwin/test/MGLRendererConfigurationTests.mm; sourceTree = ""; }; CAE7AD5320F46EF5003B6782 /* integration-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "integration-Bridging-Header.h"; sourceTree = ""; }; CAE7AD5420F46EF5003B6782 /* MGLMapSnapshotterSwiftTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MGLMapSnapshotterSwiftTests.swift; sourceTree = ""; }; @@ -1437,6 +1439,7 @@ CA0C27932076CA19001CE5B7 /* MGLMapViewIntegrationTest.m */, CA0C27952076CA50001CE5B7 /* MGLMapViewIntegrationTest.h */, CA4EB8C620863487006AB465 /* MGLStyleLayerIntegrationTests.m */, + CA88DC2F21C85D900059ED5A /* MGLStyleURLIntegrationTest.m */, 077061DB215DA11F000FEF62 /* MGLTestLocationManager.h */, 077061D9215DA00E000FEF62 /* MGLTestLocationManager.m */, ); @@ -2933,6 +2936,7 @@ CA4EB8C720863487006AB465 /* MGLStyleLayerIntegrationTests.m in Sources */, CA34C9C3207FD272005C1A06 /* MGLCameraTransitionTests.mm in Sources */, 16376B0A1FFD9DAF0000563E /* MBGLIntegrationTests.m in Sources */, + CA88DC3021C85D900059ED5A /* MGLStyleURLIntegrationTest.m in Sources */, CA0C27942076CA19001CE5B7 /* MGLMapViewIntegrationTest.m in Sources */, CAE7AD5520F46EF5003B6782 /* MGLMapSnapshotterSwiftTests.swift in Sources */, CA0C27922076C804001CE5B7 /* MGLShapeSourceTests.m in Sources */, diff --git a/platform/macos/CHANGELOG.md b/platform/macos/CHANGELOG.md index 736e8be30a1..0b0b7983286 100644 --- a/platform/macos/CHANGELOG.md +++ b/platform/macos/CHANGELOG.md @@ -9,6 +9,9 @@ * Added the `MGLFillExtrusionStyleLayer.fillExtrusionHasVerticalGradient` property. ([#13463](https://github.com/mapbox/mapbox-gl-native/pull/13463)) * Added support for setting `MGLCollisionBehaviorPre4_0` in `NSUserDefaults`. ([#13426](https://github.com/mapbox/mapbox-gl-native/pull/13426)) * Added support for automatic localization of version 8 of the Mapbox Streets source. ([#13481](https://github.com/mapbox/mapbox-gl-native/pull/13481)) +* Fixed symbol flickering during instantaneous transitions. ([#13535](https://github.com/mapbox/mapbox-gl-native/pull/13535)) +* `MGLMapView`, `MGLShapeOfflineRegion`, and `MGLTilePyramidOfflineRegion` now default to version 11 of the Mapbox Streets style. Similarly, several class properties of `MGLStyle`, such as `MGLStyle.lightStyleURL`, have been updated to return URLs to new versions of their respective styles. + ### Other changes @@ -16,6 +19,7 @@ * Renamed `-[MGLOfflineStorage putResourceWithUrl:data:modified:expires:etag:mustRevalidate:]` to `-[MGLOfflineStorage preloadData:forURL:modificationDate:expirationDate:eTag:mustRevalidate:]`. ([#13318](https://github.com/mapbox/mapbox-gl-native/pull/13318)) * `MGLMapSnapshotter` now respects the `MGLIdeographicFontFamilyName` key in Info.plist, which reduces bandwidth consumption when snapshotting regions that contain Chinese or Japanese characters. ([#13427](https://github.com/mapbox/mapbox-gl-native/pull/13427)) * Added `MGLLoggingConfiguration` and `MGLLoggingBlockHandler` that handle error and fault events produced by the SDK. ([#13235](https://github.com/mapbox/mapbox-gl-native/pull/13235)) +* Fixed a crash when specifying MGLShapeSourceOptionLineDistanceMetrics when creating an MGLShapeSource. ([#13543](https://github.com/mapbox/mapbox-gl-native/pull/13543)) ## 0.12.0 - November 8, 2018 diff --git a/test/util/mapbox.test.cpp b/test/util/mapbox.test.cpp index 33bd6e72ee6..20af31b822d 100644 --- a/test/util/mapbox.test.cpp +++ b/test/util/mapbox.test.cpp @@ -92,9 +92,9 @@ TEST(Mapbox, SpriteURL) { "https://api.mapbox.com/styles/v1/mapbox/streets-v8/draft/sprite@2x.png?access_token=key", mbgl::util::mapbox::normalizeSpriteURL(util::API_BASE_URL, "mapbox://sprites/mapbox/streets-v8/draft@2x.png", "key")); EXPECT_EQ( - "https://api.mapbox.com/styles/v1/mapbox/streets-v10/sprite?access_token=key&fresh=true.png", + "https://api.mapbox.com/styles/v1/mapbox/streets-v11/sprite?access_token=key&fresh=true.png", mbgl::util::mapbox::normalizeSpriteURL(util::API_BASE_URL, - "mapbox://sprites/mapbox/streets-v10?fresh=true.png", + "mapbox://sprites/mapbox/streets-v11?fresh=true.png", "key")); EXPECT_EQ("mapbox://////", mbgl::util::mapbox::normalizeSpriteURL(util::API_BASE_URL, "mapbox://////", "key")); }