diff options
Diffstat (limited to 'platform/ios')
-rw-r--r-- | platform/ios/CHANGELOG.md | 1 | ||||
-rw-r--r-- | platform/ios/Integration Tests/MGLStyleLayerIntegrationTests.m | 16 |
2 files changed, 9 insertions, 8 deletions
diff --git a/platform/ios/CHANGELOG.md b/platform/ios/CHANGELOG.md index f2394d1b84..089cc18606 100644 --- a/platform/ios/CHANGELOG.md +++ b/platform/ios/CHANGELOG.md @@ -7,6 +7,7 @@ Mapbox welcomes participation and contributions from everyone. Please read [CONT ### Styles and rendering * Added an `-[MGLMapSnapshotter startWithOverlayHandler:completionHandler:]` method to provide the snapshot's current `CGContext` in order to perform custom drawing on `MGLMapSnapShot` objects. ([#15530](https://github.com/mapbox/mapbox-gl-native/pull/15530)) * Fixed an issue that `maxzoom` in style `Sources` option was ignored when URL resource is provided. It may cause problems such as extra tiles downloading at higher zoom level than `maxzoom`, or problems that wrong setting of `overscaledZ` in `OverscaledTileID` that will be passed to `SymbolLayout`, leading wrong rendering appearance. ([#15581](https://github.com/mapbox/mapbox-gl-native/pull/15581)) +* Fixed an assertion hit caused by possibility of adding a layer to an incompatible source. ([#15644](https://github.com/mapbox/mapbox-gl-native/pull/15644)) ### Performance improvements diff --git a/platform/ios/Integration Tests/MGLStyleLayerIntegrationTests.m b/platform/ios/Integration Tests/MGLStyleLayerIntegrationTests.m index c018c457b9..f5f2f957d3 100644 --- a/platform/ios/Integration Tests/MGLStyleLayerIntegrationTests.m +++ b/platform/ios/Integration Tests/MGLStyleLayerIntegrationTests.m @@ -82,31 +82,31 @@ // Testing generated layers MGLLineStyleLayer *lineLayer = [[MGLLineStyleLayer alloc] initWithIdentifier:@"lineLayerID" source:source]; - MGLRasterStyleLayer *rasterLayer = [[MGLRasterStyleLayer alloc] initWithIdentifier:@"rasterLayerID" source:source]; + MGLCircleStyleLayer *circleLayer = [[MGLCircleStyleLayer alloc] initWithIdentifier:@"circleLayerID" source:source]; [self.mapView.style addSource:source]; [self.mapView.style addLayer:lineLayer]; - [self.mapView.style addLayer:rasterLayer]; + [self.mapView.style addLayer:circleLayer]; XCTAssertNoThrow(lineLayer.isVisible); - XCTAssertNoThrow(rasterLayer.isVisible); + XCTAssertNoThrow(circleLayer.isVisible); XCTAssert(![source.description containsString:@"<unknown>"]); XCTAssert(![lineLayer.description containsString:@"<unknown>"]); - XCTAssert(![rasterLayer.description containsString:@"<unknown>"]); + XCTAssert(![circleLayer.description containsString:@"<unknown>"]); self.styleLoadingExpectation = nil; [self.mapView setStyleURL:[[NSBundle bundleForClass:[self class]] URLForResource:@"one-liner" withExtension:@"json"]]; [self waitForMapViewToFinishLoadingStyleWithTimeout:10]; - + XCTAssert([source.description containsString:@"<unknown>"]); XCTAssert([lineLayer.description containsString:@"<unknown>"]); - XCTAssert([rasterLayer.description containsString:@"<unknown>"]); + XCTAssert([circleLayer.description containsString:@"<unknown>"]); XCTAssertThrowsSpecificNamed(lineLayer.isVisible, NSException, MGLInvalidStyleLayerException, @"Layer should raise an exception if its core peer got invalidated"); - XCTAssertThrowsSpecificNamed(rasterLayer.isVisible, NSException, MGLInvalidStyleLayerException, @"Layer should raise an exception if its core peer got invalidated"); + XCTAssertThrowsSpecificNamed(circleLayer.isVisible, NSException, MGLInvalidStyleLayerException, @"Layer should raise an exception if its core peer got invalidated"); XCTAssertThrowsSpecificNamed([self.mapView.style removeLayer:lineLayer], NSException, NSInvalidArgumentException, @"Style should raise an exception when attempting to remove an invalid layer (e.g. if its core peer got invalidated)"); - XCTAssertThrowsSpecificNamed([self.mapView.style removeLayer:rasterLayer], NSException, NSInvalidArgumentException, @"Style should raise an exception when attempting to remove an invalid layer (e.g. if its core peer got invalidated)"); + XCTAssertThrowsSpecificNamed([self.mapView.style removeLayer:circleLayer], NSException, NSInvalidArgumentException, @"Style should raise an exception when attempting to remove an invalid layer (e.g. if its core peer got invalidated)"); } @end |