diff --git a/Apps/Apps.xcworkspace/xcshareddata/swiftpm/Package.resolved b/Apps/Apps.xcworkspace/xcshareddata/swiftpm/Package.resolved index 1e4a8abd9ca5..1e2b7326f355 100644 --- a/Apps/Apps.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/Apps/Apps.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -14,8 +14,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/mapbox/mapbox-common-ios.git", "state" : { - "revision" : "b4197f12f928066645e08b70c12ce1e22e50e2c3", - "version" : "24.6.0" + "revision" : "2be45bb1954b1c7039afdec0a49b760ae69e05f4", + "version" : "24.7.0-rc.2" } }, { @@ -23,8 +23,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/mapbox/mapbox-core-maps-ios.git", "state" : { - "revision" : "455ad90488ab033a50ab4b7283fa78184309eef3", - "version" : "11.6.0" + "revision" : "73e462a63c62c0f1b8b266e0ce632a4c6db154de", + "version" : "11.7.0-rc.2" } }, { diff --git a/Apps/Examples/Examples/All Examples/BasicMapExample.swift b/Apps/Examples/Examples/All Examples/BasicMapExample.swift index 79a9387bd050..a0cc6cf995a8 100644 --- a/Apps/Examples/Examples/All Examples/BasicMapExample.swift +++ b/Apps/Examples/Examples/All Examples/BasicMapExample.swift @@ -21,20 +21,6 @@ final class BasicMapExample: UIViewController, ExampleProtocol { view.addSubview(mapView) - let targets = [ - FeaturesetQueryTarget( - featureset: .layer("my-layer"), - filter: Exp(.eq) { - Exp(.get) { "type" } - "hotel" - } - ), - FeaturesetQueryTarget(featureset: .featureset("poi", importId: "basemap")) - ] - mapView.mapboxMap.queryRenderedFeatures(with: CGPoint(x: 0, y: 0), - targets: targets) { _ in - // handle features in result - } } override func viewDidAppear(_ animated: Bool) { diff --git a/Apps/Examples/Examples/All Examples/BuildingExtrusionsExample.swift b/Apps/Examples/Examples/All Examples/BuildingExtrusionsExample.swift index bee872630408..d618249037be 100644 --- a/Apps/Examples/Examples/All Examples/BuildingExtrusionsExample.swift +++ b/Apps/Examples/Examples/All Examples/BuildingExtrusionsExample.swift @@ -98,6 +98,11 @@ final class BuildingExtrusionsExample: UIViewController, ExampleProtocol { // See https://docs.mapbox.com/mapbox-gl-js/example/3d-buildings/ for equivalent gl-js example internal func addBuildingExtrusions() { + let wallOnlyThreshold = 20 + let extrudeFilter = Exp(.eq) { + Exp(.get) { "extrude" } + "true" + } var layer = FillExtrusionLayer(id: "3d-buildings", source: "composite") layer.minZoom = 15 @@ -105,11 +110,12 @@ final class BuildingExtrusionsExample: UIViewController, ExampleProtocol { layer.fillExtrusionColor = .constant(StyleColor(.lightGray)) layer.fillExtrusionOpacity = .constant(0.6) - layer.filter = Exp(.eq) { - Exp(.get) { - "extrude" + layer.filter = Exp(.all) { + extrudeFilter + Exp(.gt) { + Exp(.get) { "height" } + wallOnlyThreshold } - "true" } layer.fillExtrusionHeight = .expression( @@ -140,6 +146,20 @@ final class BuildingExtrusionsExample: UIViewController, ExampleProtocol { layer.fillExtrusionAmbientOcclusionRadius = .constant(3.0) try! mapView.mapboxMap.addLayer(layer) + + var wallsOnlyExtrusionLayer = layer + wallsOnlyExtrusionLayer.id = "3d-buildings-wall" + wallsOnlyExtrusionLayer.filter = Exp(.all) { + extrudeFilter + Exp(.lte) { + Exp(.get) { "height" } + wallOnlyThreshold + } + } + + wallsOnlyExtrusionLayer.fillExtrusionLineWidth = .constant(2) + + try! mapView.mapboxMap.addLayer(wallsOnlyExtrusionLayer) } // MARK: - Actions diff --git a/CHANGELOG.md b/CHANGELOG.md index 855601c31961..67010df864f3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ Mapbox welcomes participation and contributions from everyone. +## main + +* Add experimental `FillExtrusionLayer.fillExtrusionLineWidth` that can switches fill extrusion rendering into wall rendering mode. Use this property to render the feature with the given width over the outlines of the geometry. + ## 11.7.0-beta.1 - 30 August, 2024 * Expose data-driven properties on annotation managers. Now it's possible to set data-driven properties globally on annotation manager and specify per-annotation overrides. diff --git a/LICENSE.md b/LICENSE.md index 6d1cadead8b5..c405bc06c6ae 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -31,7 +31,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. --- -### MapboxCoreMaps,11.7.0-beta.2,Mapbox ToS,Mapbox,https://www.mapbox.com/ +### MapboxCoreMaps,11.7.0-rc.2,Mapbox ToS,Mapbox,https://www.mapbox.com/ ``` Mapbox Core Maps version 10.0 diff --git a/MapboxMaps.podspec b/MapboxMaps.podspec index b478a9c18b89..86b232f1fd50 100644 --- a/MapboxMaps.podspec +++ b/MapboxMaps.podspec @@ -21,8 +21,8 @@ Pod::Spec.new do |m| m.source_files = 'Sources/MapboxMaps/**/*.{swift,h}' m.resource_bundles = { 'MapboxMapsResources' => ['Sources/**/*.{xcassets,strings}', 'Sources/MapboxMaps/MapboxMaps.json', 'Sources/MapboxMaps/PrivacyInfo.xcprivacy'] } - m.dependency 'MapboxCoreMaps', '11.7.0-beta.2' - m.dependency 'MapboxCommon', '24.7.0-beta.2' + m.dependency 'MapboxCoreMaps', '11.7.0-rc.2' + m.dependency 'MapboxCommon', '24.7.0-rc.2' m.dependency 'Turf', '3.0.0' end diff --git a/Package.resolved b/Package.resolved index 3161ee68a243..0455db888d17 100644 --- a/Package.resolved +++ b/Package.resolved @@ -5,8 +5,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/mapbox/mapbox-common-ios.git", "state" : { - "revision" : "b4197f12f928066645e08b70c12ce1e22e50e2c3", - "version" : "24.6.0" + "revision" : "2be45bb1954b1c7039afdec0a49b760ae69e05f4", + "version" : "24.7.0-rc.2" } }, { @@ -14,8 +14,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/mapbox/mapbox-core-maps-ios.git", "state" : { - "revision" : "455ad90488ab033a50ab4b7283fa78184309eef3", - "version" : "11.6.0" + "revision" : "73e462a63c62c0f1b8b266e0ce632a4c6db154de", + "version" : "11.7.0-rc.2" } }, { diff --git a/Package.swift b/Package.swift index bc5893fbaed7..3c67e1438989 100644 --- a/Package.swift +++ b/Package.swift @@ -4,8 +4,8 @@ import PackageDescription import Foundation -let coreMaps = MapsDependency.coreMaps(version: "11.7.0-beta.2") -let common = MapsDependency.common(version: "24.7.0-beta.2") +let coreMaps = MapsDependency.coreMaps(version: "11.7.0-rc.2") +let common = MapsDependency.common(version: "24.7.0-rc.2") let mapboxMapsPath: String? = nil diff --git a/Sources/MapboxMaps/Foundation/CoreAliases.swift b/Sources/MapboxMaps/Foundation/CoreAliases.swift index 30e91ae770b7..f3f597b2f8fc 100644 --- a/Sources/MapboxMaps/Foundation/CoreAliases.swift +++ b/Sources/MapboxMaps/Foundation/CoreAliases.swift @@ -43,5 +43,4 @@ typealias CoreInteraction = MapboxCoreMaps_Private.Interaction typealias CoreInteractionHandler = MapboxCoreMaps_Private.InteractionHandler typealias CoreRenderedQueryGeometry = MapboxCoreMaps_Private.RenderedQueryGeometry typealias CoreFeaturesetFeatureId = MapboxCoreMaps_Private.FeaturesetFeatureId -typealias CoreFeatureIdentifier = MapboxCoreMaps_Private.FeatureIdentifier typealias CoreFeaturesetQueryTarget = MapboxCoreMaps_Private.FeaturesetQueryTarget diff --git a/Sources/MapboxMaps/Foundation/Utils/FeatureIdentifier+Extensions.swift b/Sources/MapboxMaps/Foundation/Utils/FeatureIdentifier+Extensions.swift deleted file mode 100644 index 358651c1e204..000000000000 --- a/Sources/MapboxMaps/Foundation/Utils/FeatureIdentifier+Extensions.swift +++ /dev/null @@ -1,10 +0,0 @@ -extension FeatureIdentifier { - var string: String? { - switch self { - case .string(let s): - return s - default: - return nil - } - } -} diff --git a/Sources/MapboxMaps/Interactions/FeaturesetFeatureId.swift b/Sources/MapboxMaps/Interactions/FeaturesetFeatureId.swift index 88d87a845880..70c15b5abca7 100644 --- a/Sources/MapboxMaps/Interactions/FeaturesetFeatureId.swift +++ b/Sources/MapboxMaps/Interactions/FeaturesetFeatureId.swift @@ -28,33 +28,10 @@ public struct FeaturesetFeatureId: Hashable { } var core: CoreFeaturesetFeatureId { - CoreFeaturesetFeatureId(featureId: .fromNSString(id), featureNamespace: namespace) + CoreFeaturesetFeatureId(featureId: id, featureNamespace: namespace) } init(core: CoreFeaturesetFeatureId) { - self.init(id: core.featureId.string, namespace: core.featureNamespace) - } -} - -// TODO: remove when core migrates to string id -extension CoreFeatureIdentifier { - var string: String { - if isDouble() { - return String(getDouble()) - } - if isLongLong() { - return String(getLongLong()) - } - - if isUnsignedLongLong() { - return String(getUnsignedLongLong()) - } - - if isNSString() { - return getNSString() - } - - assertionFailure("Invalid id") - return "" + self.init(id: core.featureId, namespace: core.featureNamespace) } } diff --git a/Sources/MapboxMaps/Interactions/InteractiveFeature.swift b/Sources/MapboxMaps/Interactions/InteractiveFeature.swift index 1baa8d1013e1..edce2a096d8a 100644 --- a/Sources/MapboxMaps/Interactions/InteractiveFeature.swift +++ b/Sources/MapboxMaps/Interactions/InteractiveFeature.swift @@ -46,8 +46,13 @@ public class InteractiveFeature { let state = (queriedFeature.state as? JSONObject.TurfRawValue).flatMap { JSONObject(turfRawValue: $0) } - self.init(id: queriedFeature.featuresetFeatureId.map(FeaturesetFeatureId.init(core:)), - featureset: featureset, feature: queriedFeature.feature, state: state) + + self.init( + id: queriedFeature.featuresetFeatureId.map(FeaturesetFeatureId.init(core:)), + featureset: featureset, + feature: queriedFeature.feature, + state: state + ) } /// Creates a feature. diff --git a/Sources/MapboxMaps/Style/Generated/Layers/FillExtrusionLayer.swift b/Sources/MapboxMaps/Style/Generated/Layers/FillExtrusionLayer.swift index d12770e6ecb9..ce0f600c7a9d 100644 --- a/Sources/MapboxMaps/Style/Generated/Layers/FillExtrusionLayer.swift +++ b/Sources/MapboxMaps/Style/Generated/Layers/FillExtrusionLayer.swift @@ -162,6 +162,15 @@ public struct FillExtrusionLayer: Layer, Equatable { /// Transition options for `fillExtrusionHeight`. public var fillExtrusionHeightTransition: StyleTransition? + /// If a non-zero value is provided, it sets the fill-extrusion layer into wall rendering mode. The value is used to render the feature with the given width over the outlines of the geometry. Note: This property is experimental and some other fill-extrusion properties might not be supported with non-zero line width. + /// Default value: 0. Minimum value: 0. + @_documentation(visibility: public) + @_spi(Experimental) public var fillExtrusionLineWidth: Value? + + /// Transition options for `fillExtrusionLineWidth`. + @_documentation(visibility: public) + @_spi(Experimental) public var fillExtrusionLineWidthTransition: StyleTransition? + /// The opacity of the entire fill extrusion layer. This is rendered on a per-layer, not per-feature, basis, and data-driven styling is not available. /// Default value: 1. Value range: [0, 1] public var fillExtrusionOpacity: Value? @@ -249,6 +258,8 @@ public struct FillExtrusionLayer: Layer, Equatable { try paintContainer.encodeIfPresent(fillExtrusionFloodLightWallRadiusTransition, forKey: .fillExtrusionFloodLightWallRadiusTransition) try paintContainer.encodeIfPresent(fillExtrusionHeight, forKey: .fillExtrusionHeight) try paintContainer.encodeIfPresent(fillExtrusionHeightTransition, forKey: .fillExtrusionHeightTransition) + try paintContainer.encodeIfPresent(fillExtrusionLineWidth, forKey: .fillExtrusionLineWidth) + try paintContainer.encodeIfPresent(fillExtrusionLineWidthTransition, forKey: .fillExtrusionLineWidthTransition) try paintContainer.encodeIfPresent(fillExtrusionOpacity, forKey: .fillExtrusionOpacity) try paintContainer.encodeIfPresent(fillExtrusionOpacityTransition, forKey: .fillExtrusionOpacityTransition) try paintContainer.encodeIfPresent(fillExtrusionPattern, forKey: .fillExtrusionPattern) @@ -306,6 +317,8 @@ public struct FillExtrusionLayer: Layer, Equatable { fillExtrusionFloodLightWallRadiusTransition = try paintContainer.decodeIfPresent(StyleTransition.self, forKey: .fillExtrusionFloodLightWallRadiusTransition) fillExtrusionHeight = try paintContainer.decodeIfPresent(Value.self, forKey: .fillExtrusionHeight) fillExtrusionHeightTransition = try paintContainer.decodeIfPresent(StyleTransition.self, forKey: .fillExtrusionHeightTransition) + fillExtrusionLineWidth = try paintContainer.decodeIfPresent(Value.self, forKey: .fillExtrusionLineWidth) + fillExtrusionLineWidthTransition = try paintContainer.decodeIfPresent(StyleTransition.self, forKey: .fillExtrusionLineWidthTransition) fillExtrusionOpacity = try paintContainer.decodeIfPresent(Value.self, forKey: .fillExtrusionOpacity) fillExtrusionOpacityTransition = try paintContainer.decodeIfPresent(StyleTransition.self, forKey: .fillExtrusionOpacityTransition) fillExtrusionPattern = try paintContainer.decodeIfPresent(Value.self, forKey: .fillExtrusionPattern) @@ -374,6 +387,8 @@ public struct FillExtrusionLayer: Layer, Equatable { case fillExtrusionFloodLightWallRadiusTransition = "fill-extrusion-flood-light-wall-radius-transition" case fillExtrusionHeight = "fill-extrusion-height" case fillExtrusionHeightTransition = "fill-extrusion-height-transition" + case fillExtrusionLineWidth = "fill-extrusion-line-width" + case fillExtrusionLineWidthTransition = "fill-extrusion-line-width-transition" case fillExtrusionOpacity = "fill-extrusion-opacity" case fillExtrusionOpacityTransition = "fill-extrusion-opacity-transition" case fillExtrusionPattern = "fill-extrusion-pattern" @@ -752,6 +767,29 @@ extension FillExtrusionLayer { with(self, setter(\.fillExtrusionHeight, .expression(expression))) } + /// If a non-zero value is provided, it sets the fill-extrusion layer into wall rendering mode. The value is used to render the feature with the given width over the outlines of the geometry. Note: This property is experimental and some other fill-extrusion properties might not be supported with non-zero line width. + /// Default value: 0. Minimum value: 0. + @_documentation(visibility: public) + @_spi(Experimental) + public func fillExtrusionLineWidth(_ constant: Double) -> Self { + with(self, setter(\.fillExtrusionLineWidth, .constant(constant))) + } + + /// Transition property for `fillExtrusionLineWidth` + @_documentation(visibility: public) + @_spi(Experimental) + public func fillExtrusionLineWidthTransition(_ transition: StyleTransition) -> Self { + with(self, setter(\.fillExtrusionLineWidthTransition, transition)) + } + + /// If a non-zero value is provided, it sets the fill-extrusion layer into wall rendering mode. The value is used to render the feature with the given width over the outlines of the geometry. Note: This property is experimental and some other fill-extrusion properties might not be supported with non-zero line width. + /// Default value: 0. Minimum value: 0. + @_documentation(visibility: public) + @_spi(Experimental) + public func fillExtrusionLineWidth(_ expression: Exp) -> Self { + with(self, setter(\.fillExtrusionLineWidth, .expression(expression))) + } + /// The opacity of the entire fill extrusion layer. This is rendered on a per-layer, not per-feature, basis, and data-driven styling is not available. /// Default value: 1. Value range: [0, 1] public func fillExtrusionOpacity(_ constant: Double) -> Self { diff --git a/Sources/MapboxMaps/Style/Style+Localization.swift b/Sources/MapboxMaps/Style/Style+Localization.swift index 1d28d54252f8..c60b62b8c8d4 100644 --- a/Sources/MapboxMaps/Style/Style+Localization.swift +++ b/Sources/MapboxMaps/Style/Style+Localization.swift @@ -108,7 +108,7 @@ extension StyleManager { options: .caseInsensitive) if case .expression(let textField) = symbolLayer.textField { - var stringExpression = String(decoding: try JSONEncoder().encode(textField), as: UTF8.self) + var stringExpression = String(data: try JSONEncoder().encode(textField), encoding: .utf8)! stringExpression.updateOnceExpression(replacement: replacement, regex: expressionCoalesce) stringExpression.updateExpression(replacement: replacement, regex: expressionAbbr) diff --git a/Tests/MapboxMapsTests/Annotations/AnnotationManagerImplTests.swift b/Tests/MapboxMapsTests/Annotations/AnnotationManagerImplTests.swift index 7bd00afefa9b..a4ddf17037e5 100644 --- a/Tests/MapboxMapsTests/Annotations/AnnotationManagerImplTests.swift +++ b/Tests/MapboxMapsTests/Annotations/AnnotationManagerImplTests.swift @@ -141,13 +141,13 @@ final class AnnotationManagerImplTests: XCTestCase { func checkExpression(key: String, props: [String: Any]) throws { let value = try XCTUnwrap(props[key] as? [Any]) let valueData = try XCTUnwrap(JSONSerialization.data(withJSONObject: value)) - let valueString = try XCTUnwrap(String(decoding: valueData, as: UTF8.self)) + let valueString = try XCTUnwrap(String(data: valueData, encoding: .utf8)) let fallbackValue = me.layerProperties[key] ?? StyleManager.layerPropertyDefaultValue(for: .symbol, property: key).value let fallbackValueData = JSONSerialization.isValidJSONObject(fallbackValue) ? try XCTUnwrap(JSONSerialization.data(withJSONObject: fallbackValue)) : Data(String(describing: fallbackValue).utf8) - let fallbackValueString = try XCTUnwrap(String(decoding: fallbackValueData, as: UTF8.self)) + let fallbackValueString = try XCTUnwrap(String(data: fallbackValueData, encoding: .utf8)) let expectedString = "[\"coalesce\",[\"get\",\"\(key)\",[\"get\",\"layerProperties\"]],\(fallbackValueString)]" XCTAssertEqual(valueString, expectedString) diff --git a/Tests/MapboxMapsTests/Helpers/Encodable+JsonString.swift b/Tests/MapboxMapsTests/Helpers/Encodable+JsonString.swift index ea6e686c9d76..bafbc1009c9c 100644 --- a/Tests/MapboxMapsTests/Helpers/Encodable+JsonString.swift +++ b/Tests/MapboxMapsTests/Helpers/Encodable+JsonString.swift @@ -2,6 +2,6 @@ import Foundation extension Encodable { func jsonString() throws -> String { - try String(decoding: JSONEncoder().encode(self), as: UTF8.self) + String(data: try JSONEncoder().encode(self), encoding: .utf8)! } } diff --git a/Tests/MapboxMapsTests/Integration Tests/OfflineManagerIntegrationTests.swift b/Tests/MapboxMapsTests/Integration Tests/OfflineManagerIntegrationTests.swift index d3e0a8394a21..4ca52734eb15 100644 --- a/Tests/MapboxMapsTests/Integration Tests/OfflineManagerIntegrationTests.swift +++ b/Tests/MapboxMapsTests/Integration Tests/OfflineManagerIntegrationTests.swift @@ -189,7 +189,7 @@ final class OfflineManagerIntegrationTestCase: IntegrationTestCase { let loadTileRegionCompletionBlockInvoked = expectation(description: "loadTileRegion completion block invoked") /// Perform the download - tileStore.loadTileRegion( + let tileRegionCancelable = tileStore.loadTileRegion( forId: tileRegionId, loadOptions: tileRegionLoadOptions!, progress: { _ in }, @@ -218,7 +218,7 @@ final class OfflineManagerIntegrationTestCase: IntegrationTestCase { glyphsRasterizationMode: .ideographsRasterizedLocally, metadata: ["tag": "my-outdoors-style-pack"])! - offlineManager.loadStylePack( + let stylePackCancelable = offlineManager.loadStylePack( for: .outdoors, loadOptions: stylePackOptions, completion: { result in @@ -234,15 +234,19 @@ final class OfflineManagerIntegrationTestCase: IntegrationTestCase { } }) - let result = XCTWaiter().wait( - for: [loadStylePackCompletionBlockInvoked, - loadTileRegionCompletionBlockInvoked], - timeout: 120) + let waiter = XCTWaiter() + let expectations: Set = [loadStylePackCompletionBlockInvoked, + loadTileRegionCompletionBlockInvoked] + let result = waiter.wait(for: Array(expectations), timeout: 120) switch result { case .completed: break default: - XCTFail("Expectation failed with \(result). Aborting test.") + tileRegionCancelable.cancel() + stylePackCancelable.cancel() + + let unfullfilledExpectations = expectations.subtracting(Set(waiter.fulfilledExpectations)) + XCTFail("Expectation failed with \(result), unfullfilled expectations: \(unfullfilledExpectations). Aborting test.") abortTest = true } } diff --git a/Tests/MapboxMapsTests/Style/ExpressionTests/FormatOptionsTests.swift b/Tests/MapboxMapsTests/Style/ExpressionTests/FormatOptionsTests.swift index 7d3097077291..42455cd43e8b 100644 --- a/Tests/MapboxMapsTests/Style/ExpressionTests/FormatOptionsTests.swift +++ b/Tests/MapboxMapsTests/Style/ExpressionTests/FormatOptionsTests.swift @@ -112,15 +112,15 @@ final class FormatOptionsTests: XCTestCase { let encoded = try DictionaryEncoder().encode(formatOptions) XCTAssertEqual( - String(decoding: try JSONSerialization.data(withJSONObject: encoded["font-scale"] as Any), as: UTF8.self), + String(data: try JSONSerialization.data(withJSONObject: encoded["font-scale"] as Any), encoding: .utf8), #"["case",[">=",["to-number",["get","point_count"]],4],1,2]"# ) XCTAssertEqual( - String(decoding: try JSONSerialization.data(withJSONObject: encoded["text-font"] as Any), as: UTF8.self), + String(data: try JSONSerialization.data(withJSONObject: encoded["text-font"] as Any), encoding: .utf8), #"["case",[">=",["to-number",["get","point_count"]],4],["Open Sans Semibold"],["Arial Unicode MS Bold"]]"# ) XCTAssertEqual( - String(decoding: try JSONSerialization.data(withJSONObject: encoded["text-color"] as Any), as: UTF8.self), + String(data: try JSONSerialization.data(withJSONObject: encoded["text-color"] as Any), encoding: .utf8), ##"["case",[">=",["to-number",["get","point_count"]],4],"#ffffff","#000000"]"## ) } diff --git a/Tests/MapboxMapsTests/Style/Generated/IntegrationTests/Layers/FillExtrusionLayerIntegrationTests.swift b/Tests/MapboxMapsTests/Style/Generated/IntegrationTests/Layers/FillExtrusionLayerIntegrationTests.swift index c0ac85b337f8..83411e697ebe 100644 --- a/Tests/MapboxMapsTests/Style/Generated/IntegrationTests/Layers/FillExtrusionLayerIntegrationTests.swift +++ b/Tests/MapboxMapsTests/Style/Generated/IntegrationTests/Layers/FillExtrusionLayerIntegrationTests.swift @@ -53,6 +53,8 @@ final class FillExtrusionLayerIntegrationTests: MapViewIntegrationTestCase { layer.fillExtrusionFloodLightWallRadiusTransition = StyleTransition(duration: 10.0, delay: 10.0) layer.fillExtrusionHeight = Value.testConstantValue() layer.fillExtrusionHeightTransition = StyleTransition(duration: 10.0, delay: 10.0) + layer.fillExtrusionLineWidth = Value.testConstantValue() + layer.fillExtrusionLineWidthTransition = StyleTransition(duration: 10.0, delay: 10.0) layer.fillExtrusionOpacity = Value.testConstantValue() layer.fillExtrusionOpacityTransition = StyleTransition(duration: 10.0, delay: 10.0) layer.fillExtrusionPattern = Value.testConstantValue() diff --git a/Tests/MapboxMapsTests/Style/Generated/Layers/FillExtrusionLayerTests.swift b/Tests/MapboxMapsTests/Style/Generated/Layers/FillExtrusionLayerTests.swift index 4ef0a2bf3c4a..778a0b7841c5 100644 --- a/Tests/MapboxMapsTests/Style/Generated/Layers/FillExtrusionLayerTests.swift +++ b/Tests/MapboxMapsTests/Style/Generated/Layers/FillExtrusionLayerTests.swift @@ -106,6 +106,8 @@ final class FillExtrusionLayerTests: XCTestCase { layer.fillExtrusionFloodLightWallRadiusTransition = StyleTransition(duration: 10.0, delay: 10.0) layer.fillExtrusionHeight = Value.testConstantValue() layer.fillExtrusionHeightTransition = StyleTransition(duration: 10.0, delay: 10.0) + layer.fillExtrusionLineWidth = Value.testConstantValue() + layer.fillExtrusionLineWidthTransition = StyleTransition(duration: 10.0, delay: 10.0) layer.fillExtrusionOpacity = Value.testConstantValue() layer.fillExtrusionOpacityTransition = StyleTransition(duration: 10.0, delay: 10.0) layer.fillExtrusionPattern = Value.testConstantValue() @@ -147,6 +149,7 @@ final class FillExtrusionLayerTests: XCTestCase { XCTAssertEqual(layer.fillExtrusionFloodLightIntensity, Value.testConstantValue()) XCTAssertEqual(layer.fillExtrusionFloodLightWallRadius, Value.testConstantValue()) XCTAssertEqual(layer.fillExtrusionHeight, Value.testConstantValue()) + XCTAssertEqual(layer.fillExtrusionLineWidth, Value.testConstantValue()) XCTAssertEqual(layer.fillExtrusionOpacity, Value.testConstantValue()) XCTAssertEqual(layer.fillExtrusionPattern, Value.testConstantValue()) XCTAssertEqual(layer.fillExtrusionRoundedRoof, Value.testConstantValue()) @@ -183,6 +186,7 @@ final class FillExtrusionLayerTests: XCTestCase { .fillExtrusionFloodLightIntensity(Double.testConstantValue()) .fillExtrusionFloodLightWallRadius(Double.testConstantValue()) .fillExtrusionHeight(Double.testConstantValue()) + .fillExtrusionLineWidth(Double.testConstantValue()) .fillExtrusionOpacity(Double.testConstantValue()) .fillExtrusionPattern(String.testConstantValue()) .fillExtrusionRoundedRoof(Bool.testConstantValue()) @@ -213,6 +217,7 @@ final class FillExtrusionLayerTests: XCTestCase { XCTAssertEqual(layer.fillExtrusionFloodLightIntensity, Value.constant(Double.testConstantValue())) XCTAssertEqual(layer.fillExtrusionFloodLightWallRadius, Value.constant(Double.testConstantValue())) XCTAssertEqual(layer.fillExtrusionHeight, Value.constant(Double.testConstantValue())) + XCTAssertEqual(layer.fillExtrusionLineWidth, Value.constant(Double.testConstantValue())) XCTAssertEqual(layer.fillExtrusionOpacity, Value.constant(Double.testConstantValue())) XCTAssertEqual(layer.fillExtrusionPattern, Value.constant(.name(String.testConstantValue()))) XCTAssertEqual(layer.fillExtrusionRoundedRoof, Value.constant(Bool.testConstantValue())) diff --git a/Tests/MapboxMapsTests/Style/StyleIntegrationTests.swift b/Tests/MapboxMapsTests/Style/StyleIntegrationTests.swift index 9d1882099bf6..e1f8d266366c 100644 --- a/Tests/MapboxMapsTests/Style/StyleIntegrationTests.swift +++ b/Tests/MapboxMapsTests/Style/StyleIntegrationTests.swift @@ -226,7 +226,7 @@ internal class StyleIntegrationTests: MapViewIntegrationTestCase { XCTAssertNoThrow { let convertedExpression = try self.mapView.mapboxMap.convertExpressionForLocalization(symbolLayer: symbolLayer, localeValue: "zh") let data = try JSONSerialization.data(withJSONObject: XCTUnwrap(convertedExpression), options: [.prettyPrinted]) - let convertedString = String(decoding: data, as: UTF8.self).replacingOccurrences(of: " ", with: "").replacingOccurrences(of: "\n", with: "") + let convertedString = String(data: data, encoding: .utf8)!.replacingOccurrences(of: " ", with: "").replacingOccurrences(of: "\n", with: "") let result = "[\"format\",[\"coalesce\",[\"get\",\"name_zh\"],[\"get\",\"name\"]]]" XCTAssertEqual(result, convertedString) @@ -261,7 +261,7 @@ internal class StyleIntegrationTests: MapViewIntegrationTestCase { ], ] - let styleJSON: String = String(decoding: try! JSONSerialization.data(withJSONObject: styleJSONObject, options: [.prettyPrinted]), as: UTF8.self) + let styleJSON: String = String(data: try! JSONSerialization.data(withJSONObject: styleJSONObject, options: [.prettyPrinted]), encoding: .utf8)! XCTAssertFalse(styleJSON.isEmpty, "ValueConverter should create valid JSON string.") let styleJSONFinishedLoading = expectation(description: "Style JSON has finished loading") diff --git a/Tests/MapboxMapsTests/Style/StyleTransitionTests.swift b/Tests/MapboxMapsTests/Style/StyleTransitionTests.swift index 590c16d943b5..7037ef1c85c9 100644 --- a/Tests/MapboxMapsTests/Style/StyleTransitionTests.swift +++ b/Tests/MapboxMapsTests/Style/StyleTransitionTests.swift @@ -18,7 +18,7 @@ class StyleTransitionTests: XCTestCase { let encoder = JSONEncoder() encoder.outputFormatting = .sortedKeys let encodedTransition = try! encoder.encode(transition) - let dataString = String(decoding: encodedTransition, as: UTF8.self) + let dataString = String(data: encodedTransition, encoding: .utf8) XCTAssertEqual(dataString, jsonString) } diff --git a/scripts/release/packager/versions.json b/scripts/release/packager/versions.json index 77349472a7a7..9d50cbbd68f2 100644 --- a/scripts/release/packager/versions.json +++ b/scripts/release/packager/versions.json @@ -1,5 +1,5 @@ { - "MapboxCoreMaps": "11.7.0-beta.2", - "MapboxCommon": "24.7.0-beta.2", + "MapboxCoreMaps": "11.7.0-rc.2", + "MapboxCommon": "24.7.0-rc.2", "Turf": "3.0.0" }