From ed9f165410bae9d4ff2263c15fc2c674c8831a8c Mon Sep 17 00:00:00 2001 From: Roman Laitarenko Date: Tue, 23 Sep 2025 19:33:35 +0300 Subject: [PATCH 1/7] Prepare 2.12.0-beta.1 --- CHANGELOG.md | 2 +- LICENSE | 223 +++++++++++++++++- README.md | 2 +- android/build.gradle | 2 +- .../xcshareddata/swiftpm/Package.resolved | 12 +- .../xcshareddata/swiftpm/Package.resolved | 12 +- example/pubspec.lock | 24 +- ios/mapbox_maps_flutter.podspec | 4 +- ios/mapbox_maps_flutter/Package.swift | 2 +- lib/src/package_info.dart | 2 +- pubspec.yaml | 2 +- 11 files changed, 248 insertions(+), 39 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2660d136..122650ed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -### main +### 2.12.0-beta.1 * Use Maps SDK Android dependency with NDK 27 support and [support for 16 KB page sizes](https://developer.android.com/guide/practices/page-sizes). diff --git a/LICENSE b/LICENSE index 4ee00ccc..c38831c5 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ ## License -Mapbox Maps for Flutter version 2.11.0 +Mapbox Maps for Flutter version 2.12.0-beta.1 Mapbox Maps Flutter SDK Copyright © 2022 - 2025 Mapbox, Inc. All rights reserved. @@ -134,7 +134,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ## License -Mapbox Maps for iOS version 11.15.0 +Mapbox Maps for iOS version 11.16.0-beta.1 Mapbox Maps iOS SDK Copyright © 2021 - 2025 Mapbox, Inc. All rights reserved. @@ -165,7 +165,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. --- -### MapboxCoreMaps,11.15.0,Mapbox ToS,Mapbox,https://www.mapbox.com/ +### MapboxCoreMaps,11.16.0-beta.1,Mapbox ToS,Mapbox,https://www.mapbox.com/ ``` Mapbox Core Maps version 11.0 @@ -923,7 +923,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --- -### draco,1.5.3,Apache-2.0,Google,https://github.com/google/draco +### draco,1.5.7,Apache-2.0,Google,https://github.com/google/draco ``` Apache License @@ -1944,7 +1944,7 @@ DEALINGS IN THE SOFTWARE. ### License -Mapbox Maps for Android version 11.15.0 +Mapbox Maps for Android version 11.16.0-beta.1 Mapbox Maps Android SDK Copyright © 2021 - 2025 Mapbox, Inc. All rights reserved. @@ -2426,7 +2426,7 @@ License: [The Apache Software License, Version 2.0](http://www.apache.org/licens =========================================================================== -### MapboxCoreMaps,11.15.0,Mapbox ToS,Mapbox,https://www.mapbox.com/ +### MapboxCoreMaps,11.16.0-beta.1,Mapbox ToS,Mapbox,https://www.mapbox.com/ ``` Mapbox Core Maps version 11.0 @@ -3243,7 +3243,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --- -### draco,1.5.3,Apache-2.0,Google,https://github.com/google/draco +### draco,1.5.7,Apache-2.0,Google,https://github.com/google/draco ``` Apache License @@ -4151,6 +4151,215 @@ freely, subject to the following restrictions: --- +### spirv-reflect,vulkan-sdk-1.4.321.0,Apache-2.0,KhronosGroup,https://github.com/KhronosGroup/SPIRV-Reflect + +``` + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works within the Source form or + documentation, if provided along with the Derivative Works or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License") + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +``` + +--- + ### mapbox-common,dev,Mapbox ToS,Mapbox,https://www.mapbox.com/ ``` diff --git a/README.md b/README.md index 4ce9a82a..11a84ac9 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Mapbox Maps SDK Flutter SDK -The Mapbox Maps SDK Flutter SDK is an officially developed solution from Mapbox that enables use of our latest Maps SDK product (v11.15.0). The SDK allows developers to embed highly-customized maps using a Flutter widget on Android and iOS. +The Mapbox Maps SDK Flutter SDK is an officially developed solution from Mapbox that enables use of our latest Maps SDK product (v11.16.0-beta.1). The SDK allows developers to embed highly-customized maps using a Flutter widget on Android and iOS. Web and desktop are not supported. diff --git a/android/build.gradle b/android/build.gradle index 3a9e9ec7..0c3dc72f 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -59,7 +59,7 @@ if (file("$rootDir/gradle/ktlint.gradle").exists() && file("$rootDir/gradle/lint } dependencies { - implementation "com.mapbox.maps:android-ndk27:11.15.0" + implementation "com.mapbox.maps:android-ndk27:11.16.0-beta.1" implementation "androidx.annotation:annotation:1.5.0" implementation "androidx.lifecycle:lifecycle-runtime-ktx:2.6.2" diff --git a/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 04bfa7e5..effac1e7 100644 --- a/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -5,8 +5,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/mapbox/mapbox-common-ios.git", "state" : { - "revision" : "76cf6fa29a5541c20b0d52ec947ca41445c29418", - "version" : "24.15.0" + "revision" : "e738083ad5952972393ea5417b58a894caf7a050", + "version" : "24.16.0-beta.1" } }, { @@ -14,8 +14,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/mapbox/mapbox-core-maps-ios.git", "state" : { - "revision" : "a6256b67e80cc2ca5476470b98ba0d5a924936af", - "version" : "11.15.0" + "revision" : "aa7b723c39c0662a964f992121097873d821dd07", + "version" : "11.16.0-beta.1" } }, { @@ -23,8 +23,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/mapbox/mapbox-maps-ios.git", "state" : { - "revision" : "48093e34bc5ae2815cfd1dba784fc61feda8a929", - "version" : "11.15.0" + "revision" : "3280b7f782622802d40773c3f6180818e17961ea", + "version" : "11.16.0-beta.1" } }, { diff --git a/example/ios/Runner.xcworkspace/xcshareddata/swiftpm/Package.resolved b/example/ios/Runner.xcworkspace/xcshareddata/swiftpm/Package.resolved index 04bfa7e5..effac1e7 100644 --- a/example/ios/Runner.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/example/ios/Runner.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -5,8 +5,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/mapbox/mapbox-common-ios.git", "state" : { - "revision" : "76cf6fa29a5541c20b0d52ec947ca41445c29418", - "version" : "24.15.0" + "revision" : "e738083ad5952972393ea5417b58a894caf7a050", + "version" : "24.16.0-beta.1" } }, { @@ -14,8 +14,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/mapbox/mapbox-core-maps-ios.git", "state" : { - "revision" : "a6256b67e80cc2ca5476470b98ba0d5a924936af", - "version" : "11.15.0" + "revision" : "aa7b723c39c0662a964f992121097873d821dd07", + "version" : "11.16.0-beta.1" } }, { @@ -23,8 +23,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/mapbox/mapbox-maps-ios.git", "state" : { - "revision" : "48093e34bc5ae2815cfd1dba784fc61feda8a929", - "version" : "11.15.0" + "revision" : "3280b7f782622802d40773c3f6180818e17961ea", + "version" : "11.16.0-beta.1" } }, { diff --git a/example/pubspec.lock b/example/pubspec.lock index ee8fcb32..0113c061 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -243,33 +243,33 @@ packages: dependency: transitive description: name: leak_tracker - sha256: "6bb818ecbdffe216e81182c2f0714a2e62b593f4a4f13098713ff1685dfb6ab0" + sha256: "33e2e26bdd85a0112ec15400c8cbffea70d0f9c3407491f672a2fad47915e2de" url: "https://pub.dev" source: hosted - version: "10.0.9" + version: "11.0.2" leak_tracker_flutter_testing: dependency: transitive description: name: leak_tracker_flutter_testing - sha256: f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573 + sha256: "1dbc140bb5a23c75ea9c4811222756104fbcd1a27173f0c34ca01e16bea473c1" url: "https://pub.dev" source: hosted - version: "3.0.9" + version: "3.0.10" leak_tracker_testing: dependency: transitive description: name: leak_tracker_testing - sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" + sha256: "8d5a2d49f4a66b49744b23b018848400d23e54caf9463f4eb20df3eb8acb2eb1" url: "https://pub.dev" source: hosted - version: "3.0.1" + version: "3.0.2" mapbox_maps_flutter: dependency: "direct main" description: path: ".." relative: true source: path - version: "2.11.0-rc.1" + version: "2.11.0" matcher: dependency: transitive description: @@ -455,10 +455,10 @@ packages: dependency: transitive description: name: test_api - sha256: fb31f383e2ee25fbbfe06b40fe21e1e458d14080e3c67e7ba0acfde4df4e0bbd + sha256: "522f00f556e73044315fa4585ec3270f1808a4b186c936e612cab0b565ff1e00" url: "https://pub.dev" source: hosted - version: "0.7.4" + version: "0.7.6" turf: dependency: "direct dev" description: @@ -503,10 +503,10 @@ packages: dependency: transitive description: name: vector_math - sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + sha256: d530bd74fea330e6e364cda7a85019c434070188383e1cd8d9777ee586914c5b url: "https://pub.dev" source: hosted - version: "2.1.4" + version: "2.2.0" vm_service: dependency: transitive description: @@ -540,5 +540,5 @@ packages: source: hosted version: "1.1.0" sdks: - dart: ">=3.7.0 <4.0.0" + dart: ">=3.8.0-0 <4.0.0" flutter: ">=3.27.0" diff --git a/ios/mapbox_maps_flutter.podspec b/ios/mapbox_maps_flutter.podspec index 535be0d9..dbadda81 100644 --- a/ios/mapbox_maps_flutter.podspec +++ b/ios/mapbox_maps_flutter.podspec @@ -4,7 +4,7 @@ # Pod::Spec.new do |s| s.name = 'mapbox_maps_flutter' - s.version = '2.11.0' + s.version = '2.12.0-beta.1' s.summary = 'Mapbox Maps SDK Flutter Plugin.' s.description = 'An officially developed solution from Mapbox that enables use of our latest Maps SDK product.' @@ -17,7 +17,7 @@ Pod::Spec.new do |s| s.dependency 'Flutter' s.platform = :ios, '14.0' - s.dependency 'MapboxMaps', '11.15.0' + s.dependency 'MapboxMaps', '11.16.0-beta.1' s.dependency 'Turf', '4.0.0' # Flutter.framework does not contain a i386 slice. diff --git a/ios/mapbox_maps_flutter/Package.swift b/ios/mapbox_maps_flutter/Package.swift index 79b99c30..97143350 100644 --- a/ios/mapbox_maps_flutter/Package.swift +++ b/ios/mapbox_maps_flutter/Package.swift @@ -12,7 +12,7 @@ let package = Package( .library(name: "mapbox-maps-flutter", targets: ["mapbox_maps_flutter"]) ], dependencies: [ - .package(url: "https://github.com/mapbox/mapbox-maps-ios.git", exact: "11.15.0"), + .package(url: "https://github.com/mapbox/mapbox-maps-ios.git", exact: "11.16.0-beta.1"), ], targets: [ .target( diff --git a/lib/src/package_info.dart b/lib/src/package_info.dart index 52469ecd..a204dac8 100644 --- a/lib/src/package_info.dart +++ b/lib/src/package_info.dart @@ -1,3 +1,3 @@ part of mapbox_maps_flutter; -const String mapboxPluginVersion = '2.11.0'; +const String mapboxPluginVersion = '2.12.0-beta.1'; diff --git a/pubspec.yaml b/pubspec.yaml index 36c87671..8e19e16b 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: mapbox_maps_flutter description: Interactive, thoroughly customizable maps powered by Mapbox Maps mobile SDKs. -version: 2.11.0 +version: 2.12.0-beta.1 homepage: https://github.com/mapbox/mapbox-maps-flutter environment: From 2bff1b34cc96832e691474d471b14ae8f9a9fd5d Mon Sep 17 00:00:00 2001 From: Roman Laitarenko Date: Tue, 23 Sep 2025 22:08:00 +0300 Subject: [PATCH 2/7] update Package.resolved --- ios/mapbox_maps_flutter/Package.resolved | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ios/mapbox_maps_flutter/Package.resolved b/ios/mapbox_maps_flutter/Package.resolved index 04bfa7e5..effac1e7 100644 --- a/ios/mapbox_maps_flutter/Package.resolved +++ b/ios/mapbox_maps_flutter/Package.resolved @@ -5,8 +5,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/mapbox/mapbox-common-ios.git", "state" : { - "revision" : "76cf6fa29a5541c20b0d52ec947ca41445c29418", - "version" : "24.15.0" + "revision" : "e738083ad5952972393ea5417b58a894caf7a050", + "version" : "24.16.0-beta.1" } }, { @@ -14,8 +14,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/mapbox/mapbox-core-maps-ios.git", "state" : { - "revision" : "a6256b67e80cc2ca5476470b98ba0d5a924936af", - "version" : "11.15.0" + "revision" : "aa7b723c39c0662a964f992121097873d821dd07", + "version" : "11.16.0-beta.1" } }, { @@ -23,8 +23,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/mapbox/mapbox-maps-ios.git", "state" : { - "revision" : "48093e34bc5ae2815cfd1dba784fc61feda8a929", - "version" : "11.15.0" + "revision" : "3280b7f782622802d40773c3f6180818e17961ea", + "version" : "11.16.0-beta.1" } }, { From de4515ab9efb4e2f8f16c0ae4993ef88a1ac7cbd Mon Sep 17 00:00:00 2001 From: Roman Laitarenko Date: Tue, 23 Sep 2025 22:14:34 +0300 Subject: [PATCH 3/7] ignore Package.resolved in the example runner app --- .gitignore | 2 + .../xcshareddata/swiftpm/Package.resolved | 41 ------------------- .../xcshareddata/swiftpm/Package.resolved | 41 ------------------- 3 files changed, 2 insertions(+), 82 deletions(-) delete mode 100644 example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved delete mode 100644 example/ios/Runner.xcworkspace/xcshareddata/swiftpm/Package.resolved diff --git a/.gitignore b/.gitignore index a4ded0a5..11c9f975 100644 --- a/.gitignore +++ b/.gitignore @@ -94,6 +94,8 @@ unlinked_spec.ds **/ios/Runner/GeneratedPluginRegistrant.* .fastlane/README.md .fastlane/report.xml +example/ios/Runner.xcworkspace/xcshareddata/swiftpm/Package.resolved +example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved # macOS **/macos/Flutter/GeneratedPluginRegistrant.swift diff --git a/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved deleted file mode 100644 index effac1e7..00000000 --- a/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ /dev/null @@ -1,41 +0,0 @@ -{ - "pins" : [ - { - "identity" : "mapbox-common-ios", - "kind" : "remoteSourceControl", - "location" : "https://github.com/mapbox/mapbox-common-ios.git", - "state" : { - "revision" : "e738083ad5952972393ea5417b58a894caf7a050", - "version" : "24.16.0-beta.1" - } - }, - { - "identity" : "mapbox-core-maps-ios", - "kind" : "remoteSourceControl", - "location" : "https://github.com/mapbox/mapbox-core-maps-ios.git", - "state" : { - "revision" : "aa7b723c39c0662a964f992121097873d821dd07", - "version" : "11.16.0-beta.1" - } - }, - { - "identity" : "mapbox-maps-ios", - "kind" : "remoteSourceControl", - "location" : "https://github.com/mapbox/mapbox-maps-ios.git", - "state" : { - "revision" : "3280b7f782622802d40773c3f6180818e17961ea", - "version" : "11.16.0-beta.1" - } - }, - { - "identity" : "turf-swift", - "kind" : "remoteSourceControl", - "location" : "https://github.com/mapbox/turf-swift.git", - "state" : { - "revision" : "bf840e6b9529d105687840fe2c9dcd74197d46d1", - "version" : "4.0.0" - } - } - ], - "version" : 2 -} diff --git a/example/ios/Runner.xcworkspace/xcshareddata/swiftpm/Package.resolved b/example/ios/Runner.xcworkspace/xcshareddata/swiftpm/Package.resolved deleted file mode 100644 index effac1e7..00000000 --- a/example/ios/Runner.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ /dev/null @@ -1,41 +0,0 @@ -{ - "pins" : [ - { - "identity" : "mapbox-common-ios", - "kind" : "remoteSourceControl", - "location" : "https://github.com/mapbox/mapbox-common-ios.git", - "state" : { - "revision" : "e738083ad5952972393ea5417b58a894caf7a050", - "version" : "24.16.0-beta.1" - } - }, - { - "identity" : "mapbox-core-maps-ios", - "kind" : "remoteSourceControl", - "location" : "https://github.com/mapbox/mapbox-core-maps-ios.git", - "state" : { - "revision" : "aa7b723c39c0662a964f992121097873d821dd07", - "version" : "11.16.0-beta.1" - } - }, - { - "identity" : "mapbox-maps-ios", - "kind" : "remoteSourceControl", - "location" : "https://github.com/mapbox/mapbox-maps-ios.git", - "state" : { - "revision" : "3280b7f782622802d40773c3f6180818e17961ea", - "version" : "11.16.0-beta.1" - } - }, - { - "identity" : "turf-swift", - "kind" : "remoteSourceControl", - "location" : "https://github.com/mapbox/turf-swift.git", - "state" : { - "revision" : "bf840e6b9529d105687840fe2c9dcd74197d46d1", - "version" : "4.0.0" - } - } - ], - "version" : 2 -} From eb0bfe4da84c254aae4d05c50dbdbbbb56d00005 Mon Sep 17 00:00:00 2001 From: Roman Laitarenko Date: Wed, 24 Sep 2025 13:52:30 +0300 Subject: [PATCH 4/7] re-generate style code --- .../style/layer/line_layer_test.dart | 12 ++++ lib/src/style/layer/line_layer.dart | 67 +++++++++++++++++++ lib/src/style/layer/model_layer.dart | 24 +++---- lib/src/style/layer/symbol_layer.dart | 16 ++--- 4 files changed, 99 insertions(+), 20 deletions(-) diff --git a/example/integration_test/style/layer/line_layer_test.dart b/example/integration_test/style/layer/line_layer_test.dart index 0a9df10c..78c5090f 100644 --- a/example/integration_test/style/layer/line_layer_test.dart +++ b/example/integration_test/style/layer/line_layer_test.dart @@ -28,6 +28,9 @@ void main() { slot: LayerSlot.BOTTOM, lineCap: LineCap.BUTT, lineCrossSlope: 1.0, + lineCutoutFadeWidth: 1.0, + lineCutoutOpacity: 1.0, + lineCutoutWidth: 1.0, lineElevationReference: LineElevationReference.NONE, lineJoin: LineJoin.BEVEL, lineMiterLimit: 1.0, @@ -63,6 +66,9 @@ void main() { expect(layer.visibility, Visibility.NONE); expect(layer.lineCap, LineCap.BUTT); expect(layer.lineCrossSlope, 1.0); + expect(layer.lineCutoutFadeWidth, 1.0); + expect(layer.lineCutoutOpacity, 1.0); + expect(layer.lineCutoutWidth, 1.0); expect(layer.lineElevationReference, LineElevationReference.NONE); expect(layer.lineJoin, LineJoin.BEVEL); expect(layer.lineMiterLimit, 1.0); @@ -115,6 +121,9 @@ void main() { slot: LayerSlot.BOTTOM, lineCapExpression: ['string', 'butt'], lineCrossSlopeExpression: ['number', 1.0], + lineCutoutFadeWidthExpression: ['number', 1.0], + lineCutoutOpacityExpression: ['number', 1.0], + lineCutoutWidthExpression: ['number', 1.0], lineElevationReferenceExpression: ['string', 'none'], lineJoinExpression: ['string', 'bevel'], lineMiterLimitExpression: ['number', 1.0], @@ -167,6 +176,9 @@ void main() { ]); expect(layer.lineCap, LineCap.BUTT); expect(layer.lineCrossSlope, 1.0); + expect(layer.lineCutoutFadeWidth, 1.0); + expect(layer.lineCutoutOpacity, 1.0); + expect(layer.lineCutoutWidth, 1.0); expect(layer.lineElevationReference, LineElevationReference.NONE); expect(layer.lineJoin, LineJoin.BEVEL); expect(layer.lineMiterLimit, 1.0); diff --git a/lib/src/style/layer/line_layer.dart b/lib/src/style/layer/line_layer.dart index e2c40762..147df166 100644 --- a/lib/src/style/layer/line_layer.dart +++ b/lib/src/style/layer/line_layer.dart @@ -17,6 +17,12 @@ class LineLayer extends Layer { List? this.lineCapExpression, double? this.lineCrossSlope, List? this.lineCrossSlopeExpression, + double? this.lineCutoutFadeWidth, + List? this.lineCutoutFadeWidthExpression, + double? this.lineCutoutOpacity, + List? this.lineCutoutOpacityExpression, + double? this.lineCutoutWidth, + List? this.lineCutoutWidthExpression, LineElevationReference? this.lineElevationReference, List? this.lineElevationReferenceExpression, LineJoin? this.lineJoin, @@ -109,6 +115,36 @@ class LineLayer extends Layer { @experimental List? lineCrossSlopeExpression; + /// The width of the cutout fade effect + /// Default value: 0.4. Value range: [0, 1] + @experimental + double? lineCutoutFadeWidth; + + /// The width of the cutout fade effect + /// Default value: 0.4. Value range: [0, 1] + @experimental + List? lineCutoutFadeWidthExpression; + + /// The opacity of the aboveground objects affected by the line cutout. Cutout for tunnels isn't affected by this property, If set to 0, the cutout is fully transparent. Cutout opacity should have the same value for all layers that specify it. If all layers don't have the same value, it is not specified which value is used. + /// Default value: 0.3. Value range: [0, 1] + @experimental + double? lineCutoutOpacity; + + /// The opacity of the aboveground objects affected by the line cutout. Cutout for tunnels isn't affected by this property, If set to 0, the cutout is fully transparent. Cutout opacity should have the same value for all layers that specify it. If all layers don't have the same value, it is not specified which value is used. + /// Default value: 0.3. Value range: [0, 1] + @experimental + List? lineCutoutOpacityExpression; + + /// The width of the line cutout in meters. If set to 0, the cutout is disabled. The cutout does not apply to location-indicator type layers. + /// Default value: 0. Value range: [0, 50] + @experimental + double? lineCutoutWidth; + + /// The width of the line cutout in meters. If set to 0, the cutout is disabled. The cutout does not apply to location-indicator type layers. + /// Default value: 0. Value range: [0, 50] + @experimental + List? lineCutoutWidthExpression; + /// Selects the base of line-elevation. Some modes might require precomputed elevation data in the tileset. /// Default value: "none". @experimental @@ -368,6 +404,27 @@ class LineLayer extends Layer { if (lineCrossSlope != null) { layout["line-cross-slope"] = lineCrossSlope; } + if (lineCutoutFadeWidthExpression != null) { + layout["line-cutout-fade-width"] = lineCutoutFadeWidthExpression; + } + + if (lineCutoutFadeWidth != null) { + layout["line-cutout-fade-width"] = lineCutoutFadeWidth; + } + if (lineCutoutOpacityExpression != null) { + layout["line-cutout-opacity"] = lineCutoutOpacityExpression; + } + + if (lineCutoutOpacity != null) { + layout["line-cutout-opacity"] = lineCutoutOpacity; + } + if (lineCutoutWidthExpression != null) { + layout["line-cutout-width"] = lineCutoutWidthExpression; + } + + if (lineCutoutWidth != null) { + layout["line-cutout-width"] = lineCutoutWidth; + } if (lineElevationReferenceExpression != null) { layout["line-elevation-reference"] = lineElevationReferenceExpression; } @@ -600,6 +657,16 @@ class LineLayer extends Layer { lineCrossSlope: _optionalCast(map["layout"]["line-cross-slope"]), lineCrossSlopeExpression: _optionalCastList(map["layout"]["line-cross-slope"]), + lineCutoutFadeWidth: + _optionalCast(map["layout"]["line-cutout-fade-width"]), + lineCutoutFadeWidthExpression: + _optionalCastList(map["layout"]["line-cutout-fade-width"]), + lineCutoutOpacity: _optionalCast(map["layout"]["line-cutout-opacity"]), + lineCutoutOpacityExpression: + _optionalCastList(map["layout"]["line-cutout-opacity"]), + lineCutoutWidth: _optionalCast(map["layout"]["line-cutout-width"]), + lineCutoutWidthExpression: + _optionalCastList(map["layout"]["line-cutout-width"]), lineElevationReference: map["layout"]["line-elevation-reference"] == null ? null : LineElevationReference.values.firstWhere((e) => e.name diff --git a/lib/src/style/layer/model_layer.dart b/lib/src/style/layer/model_layer.dart index 14f0a58e..93b0a9f9 100644 --- a/lib/src/style/layer/model_layer.dart +++ b/lib/src/style/layer/model_layer.dart @@ -96,32 +96,32 @@ class ModelLayer extends Layer { @experimental List? modelCastShadowsExpression; - /// The tint color of the model layer. model-color-mix-intensity (defaults to 0) defines tint(mix) intensity - this means that, this color is not used unless model-color-mix-intensity gets value greater than 0. + /// The tint color of the model layer. model-color-mix-intensity (defaults to 0) defines tint(mix) intensity - this means that, this color is not used unless model-color-mix-intensity gets value greater than 0. Expressions that depend on measure-light are not supported when using GeoJSON or vector tile as the model layer source. /// Default value: "#ffffff". @experimental int? modelColor; - /// The tint color of the model layer. model-color-mix-intensity (defaults to 0) defines tint(mix) intensity - this means that, this color is not used unless model-color-mix-intensity gets value greater than 0. + /// The tint color of the model layer. model-color-mix-intensity (defaults to 0) defines tint(mix) intensity - this means that, this color is not used unless model-color-mix-intensity gets value greater than 0. Expressions that depend on measure-light are not supported when using GeoJSON or vector tile as the model layer source. /// Default value: "#ffffff". @experimental List? modelColorExpression; - /// Intensity of model-color (on a scale from 0 to 1) in color mix with original 3D model's colors. Higher number will present a higher model-color contribution in mix. + /// Intensity of model-color (on a scale from 0 to 1) in color mix with original 3D model's colors. Higher number will present a higher model-color contribution in mix. Expressions that depend on measure-light are not supported when using GeoJSON or vector tile as the model layer source. /// Default value: 0. Value range: [0, 1] @experimental double? modelColorMixIntensity; - /// Intensity of model-color (on a scale from 0 to 1) in color mix with original 3D model's colors. Higher number will present a higher model-color contribution in mix. + /// Intensity of model-color (on a scale from 0 to 1) in color mix with original 3D model's colors. Higher number will present a higher model-color contribution in mix. Expressions that depend on measure-light are not supported when using GeoJSON or vector tile as the model layer source. /// Default value: 0. Value range: [0, 1] @experimental List? modelColorMixIntensityExpression; - /// This parameter defines the range for the fade-out effect before an automatic content cutoff on pitched map views. The automatic cutoff range is calculated according to the minimum required zoom level of the source and layer. The fade range is expressed in relation to the height of the map view. A value of 1.0 indicates that the content is faded to the same extent as the map's height in pixels, while a value close to zero represents a sharp cutoff. When the value is set to 0.0, the cutoff is completely disabled. Note: The property has no effect on the map if terrain is enabled. + /// This parameter defines the range for the fade-out effect before an automatic content cutoff on pitched map views. The automatic cutoff range is calculated according to the minimum required zoom level of the source and layer. The fade range is expressed in relation to the height of the map view. A value of 1.0 indicates that the content is faded to the same extent as the map's height in pixels, while a value close to zero represents a sharp cutoff. When the value is set to 0.0, the cutoff is completely disabled. Note: The property has no effect on the map if terrain is enabled. /// Default value: 0. Value range: [0, 1] @experimental double? modelCutoffFadeRange; - /// This parameter defines the range for the fade-out effect before an automatic content cutoff on pitched map views. The automatic cutoff range is calculated according to the minimum required zoom level of the source and layer. The fade range is expressed in relation to the height of the map view. A value of 1.0 indicates that the content is faded to the same extent as the map's height in pixels, while a value close to zero represents a sharp cutoff. When the value is set to 0.0, the cutoff is completely disabled. Note: The property has no effect on the map if terrain is enabled. + /// This parameter defines the range for the fade-out effect before an automatic content cutoff on pitched map views. The automatic cutoff range is calculated according to the minimum required zoom level of the source and layer. The fade range is expressed in relation to the height of the map view. A value of 1.0 indicates that the content is faded to the same extent as the map's height in pixels, while a value close to zero represents a sharp cutoff. When the value is set to 0.0, the cutoff is completely disabled. Note: The property has no effect on the map if terrain is enabled. /// Default value: 0. Value range: [0, 1] @experimental List? modelCutoffFadeRangeExpression; @@ -136,12 +136,12 @@ class ModelLayer extends Layer { @experimental List? modelElevationReferenceExpression; - /// Strength of the emission. There is no emission for value 0. For value 1.0, only emissive component (no shading) is displayed and values above 1.0 produce light contribution to surrounding area, for some of the parts (e.g. doors). Expressions that depend on measure-light are not supported when using GeoJSON or vector tile as the model layer source. + /// Strength of the emission. There is no emission for value 0. For value 1.0, only emissive component (no shading) is displayed and values above 1.0 produce light contribution to surrounding area, for some of the parts (e.g. doors). Expressions that depend on measure-light are only supported as a global layer value (and not for each feature) when using GeoJSON or vector tile as the model layer source. /// Default value: 0. Value range: [0, 5] @experimental double? modelEmissiveStrength; - /// Strength of the emission. There is no emission for value 0. For value 1.0, only emissive component (no shading) is displayed and values above 1.0 produce light contribution to surrounding area, for some of the parts (e.g. doors). Expressions that depend on measure-light are not supported when using GeoJSON or vector tile as the model layer source. + /// Strength of the emission. There is no emission for value 0. For value 1.0, only emissive component (no shading) is displayed and values above 1.0 produce light contribution to surrounding area, for some of the parts (e.g. doors). Expressions that depend on measure-light are only supported as a global layer value (and not for each feature) when using GeoJSON or vector tile as the model layer source. /// Default value: 0. Value range: [0, 5] @experimental List? modelEmissiveStrengthExpression; @@ -156,12 +156,12 @@ class ModelLayer extends Layer { @experimental List? modelHeightBasedEmissiveStrengthMultiplierExpression; - /// The opacity of the model layer. + /// The opacity of the model layer. Except for zoom, expressions that are data-driven are not supported if using GeoJSON or vector tile as the model layer source. /// Default value: 1. Value range: [0, 1] @experimental double? modelOpacity; - /// The opacity of the model layer. + /// The opacity of the model layer. Except for zoom, expressions that are data-driven are not supported if using GeoJSON or vector tile as the model layer source. /// Default value: 1. Value range: [0, 1] @experimental List? modelOpacityExpression; @@ -196,12 +196,12 @@ class ModelLayer extends Layer { @experimental List? modelRoughnessExpression; - /// The scale of the model. + /// The scale of the model. Expressions that are zoom-dependent are not supported if using GeoJSON or vector tile as the model layer source. /// Default value: [1,1,1]. @experimental List? modelScale; - /// The scale of the model. + /// The scale of the model. Expressions that are zoom-dependent are not supported if using GeoJSON or vector tile as the model layer source. /// Default value: [1,1,1]. @experimental List? modelScaleExpression; diff --git a/lib/src/style/layer/symbol_layer.dart b/lib/src/style/layer/symbol_layer.dart index 55a971c6..65f8a4be 100644 --- a/lib/src/style/layer/symbol_layer.dart +++ b/lib/src/style/layer/symbol_layer.dart @@ -257,13 +257,13 @@ class SymbolLayer extends Layer { /// Default value: 1. Minimum value: 0. The unit of iconSize is in factor of the original icon size. List? iconSizeExpression; - /// Defines the minimum and maximum scaling factors for icon related properties like `icon-size`, `icon-halo-width`, `icon-halo-blur` - /// Default value: [0.8,2]. Value range: [0.1, 10] + /// Limits the possible scaling range for `icon-size`, `icon-halo-width`, `icon-halo-blur` properties to be within [min-scale, max-scale] + /// Default value: [0.8,2]. Minimum value: [0.1,0.1]. Maximum value: [10,10]. @experimental List? iconSizeScaleRange; - /// Defines the minimum and maximum scaling factors for icon related properties like `icon-size`, `icon-halo-width`, `icon-halo-blur` - /// Default value: [0.8,2]. Value range: [0.1, 10] + /// Limits the possible scaling range for `icon-size`, `icon-halo-width`, `icon-halo-blur` properties to be within [min-scale, max-scale] + /// Default value: [0.8,2]. Minimum value: [0.1,0.1]. Maximum value: [10,10]. @experimental List? iconSizeScaleRangeExpression; @@ -489,13 +489,13 @@ class SymbolLayer extends Layer { /// Default value: 16. Minimum value: 0. The unit of textSize is in pixels. List? textSizeExpression; - /// Defines the minimum and maximum scaling factors for text related properties like `text-size`, `text-max-width`, `text-halo-width`, `font-size` - /// Default value: [0.8,2]. Value range: [0.1, 10] + /// Limits the possible scaling range for `text-size`, `text-halo-width`, `text-halo-blur` properties to be within [min-scale, max-scale] + /// Default value: [0.8,2]. Minimum value: [0.1,0.1]. Maximum value: [10,10]. @experimental List? textSizeScaleRange; - /// Defines the minimum and maximum scaling factors for text related properties like `text-size`, `text-max-width`, `text-halo-width`, `font-size` - /// Default value: [0.8,2]. Value range: [0.1, 10] + /// Limits the possible scaling range for `text-size`, `text-halo-width`, `text-halo-blur` properties to be within [min-scale, max-scale] + /// Default value: [0.8,2]. Minimum value: [0.1,0.1]. Maximum value: [10,10]. @experimental List? textSizeScaleRangeExpression; From 51fd988e531f178ca54bf5e0d0e3b3fdfb0555dd Mon Sep 17 00:00:00 2001 From: Roman Laitarenko Date: Wed, 24 Sep 2025 14:07:12 +0300 Subject: [PATCH 5/7] fix expected range values in tests --- .../style/layer/line_layer_test.dart | 16 ++++++++-------- .../style/layer/sky_layer_test.dart | 16 ++++++++-------- .../style/layer/symbol_layer_test.dart | 16 ++++++++-------- 3 files changed, 24 insertions(+), 24 deletions(-) diff --git a/example/integration_test/style/layer/line_layer_test.dart b/example/integration_test/style/layer/line_layer_test.dart index 78c5090f..be31f321 100644 --- a/example/integration_test/style/layer/line_layer_test.dart +++ b/example/integration_test/style/layer/line_layer_test.dart @@ -54,8 +54,8 @@ void main() { lineTranslate: [0.0, 1.0], lineTranslateAnchor: LineTranslateAnchor.MAP, lineTrimColor: Colors.red.value, - lineTrimFadeRange: [0.0, 1.0], - lineTrimOffset: [0.0, 1.0], + lineTrimFadeRange: [0.5, 0.5], + lineTrimOffset: [0.5, 0.5], lineWidth: 1.0, )); var layer = await mapboxMap.style.getLayer('layer') as LineLayer; @@ -92,8 +92,8 @@ void main() { expect(layer.lineTranslate, [0.0, 1.0]); expect(layer.lineTranslateAnchor, LineTranslateAnchor.MAP); expect(layer.lineTrimColor, Colors.red.value); - expect(layer.lineTrimFadeRange, [0.0, 1.0]); - expect(layer.lineTrimOffset, [0.0, 1.0]); + expect(layer.lineTrimFadeRange, [0.5, 0.5]); + expect(layer.lineTrimOffset, [0.5, 0.5]); expect(layer.lineWidth, 1.0); }); @@ -155,11 +155,11 @@ void main() { lineTrimColorExpression: ['rgba', 255, 0, 0, 1], lineTrimFadeRangeExpression: [ 'literal', - [0.0, 1.0] + [0.5, 0.5] ], lineTrimOffsetExpression: [ 'literal', - [0.0, 1.0] + [0.5, 0.5] ], lineWidthExpression: ['number', 1.0], )); @@ -202,8 +202,8 @@ void main() { expect(layer.lineTranslate, [0.0, 1.0]); expect(layer.lineTranslateAnchor, LineTranslateAnchor.MAP); expect(layer.lineTrimColorExpression, ['rgba', 255, 0, 0, 1]); - expect(layer.lineTrimFadeRange, [0.0, 1.0]); - expect(layer.lineTrimOffset, [0.0, 1.0]); + expect(layer.lineTrimFadeRange, [0.5, 0.5]); + expect(layer.lineTrimOffset, [0.5, 0.5]); expect(layer.lineWidth, 1.0); }); } diff --git a/example/integration_test/style/layer/sky_layer_test.dart b/example/integration_test/style/layer/sky_layer_test.dart index d32a05f2..24562e14 100644 --- a/example/integration_test/style/layer/sky_layer_test.dart +++ b/example/integration_test/style/layer/sky_layer_test.dart @@ -21,10 +21,10 @@ void main() { slot: LayerSlot.BOTTOM, skyAtmosphereColor: Colors.red.value, skyAtmosphereHaloColor: Colors.red.value, - skyAtmosphereSun: [0.0, 1.0], + skyAtmosphereSun: [180.0, 90.0], skyAtmosphereSunIntensity: 1.0, skyGradient: Colors.red.value, - skyGradientCenter: [0.0, 1.0], + skyGradientCenter: [180.0, 90.0], skyGradientRadius: 1.0, skyOpacity: 1.0, skyType: SkyType.GRADIENT, @@ -36,10 +36,10 @@ void main() { expect(layer.visibility, Visibility.NONE); expect(layer.skyAtmosphereColor, Colors.red.value); expect(layer.skyAtmosphereHaloColor, Colors.red.value); - expect(layer.skyAtmosphereSun, [0.0, 1.0]); + expect(layer.skyAtmosphereSun, [180.0, 90.0]); expect(layer.skyAtmosphereSunIntensity, 1.0); expect(layer.skyGradient, Colors.red.value); - expect(layer.skyGradientCenter, [0.0, 1.0]); + expect(layer.skyGradientCenter, [180.0, 90.0]); expect(layer.skyGradientRadius, 1.0); expect(layer.skyOpacity, 1.0); expect(layer.skyType, SkyType.GRADIENT); @@ -65,13 +65,13 @@ void main() { skyAtmosphereHaloColorExpression: ['rgba', 255, 0, 0, 1], skyAtmosphereSunExpression: [ 'literal', - [0.0, 1.0] + [180.0, 90.0] ], skyAtmosphereSunIntensityExpression: ['number', 1.0], skyGradientExpression: ['rgba', 255, 0, 0, 1], skyGradientCenterExpression: [ 'literal', - [0.0, 1.0] + [180.0, 90.0] ], skyGradientRadiusExpression: ['number', 1.0], skyOpacityExpression: ['number', 1.0], @@ -89,10 +89,10 @@ void main() { ]); expect(layer.skyAtmosphereColorExpression, ['rgba', 255, 0, 0, 1]); expect(layer.skyAtmosphereHaloColorExpression, ['rgba', 255, 0, 0, 1]); - expect(layer.skyAtmosphereSun, [0.0, 1.0]); + expect(layer.skyAtmosphereSun, [180.0, 90.0]); expect(layer.skyAtmosphereSunIntensity, 1.0); expect(layer.skyGradientExpression, ['rgba', 255, 0, 0, 1]); - expect(layer.skyGradientCenter, [0.0, 1.0]); + expect(layer.skyGradientCenter, [180.0, 90.0]); expect(layer.skyGradientRadius, 1.0); expect(layer.skyOpacity, 1.0); expect(layer.skyType, SkyType.GRADIENT); diff --git a/example/integration_test/style/layer/symbol_layer_test.dart b/example/integration_test/style/layer/symbol_layer_test.dart index 294599e5..388ee42f 100644 --- a/example/integration_test/style/layer/symbol_layer_test.dart +++ b/example/integration_test/style/layer/symbol_layer_test.dart @@ -37,7 +37,7 @@ void main() { iconRotate: 1.0, iconRotationAlignment: IconRotationAlignment.MAP, iconSize: 1.0, - iconSizeScaleRange: [0.0, 1.0], + iconSizeScaleRange: [5.0, 5.0], iconTextFit: IconTextFit.NONE, iconTextFitPadding: [0.0, 1.0, 2.0, 3.0], symbolAvoidEdges: true, @@ -66,7 +66,7 @@ void main() { textRotate: 1.0, textRotationAlignment: TextRotationAlignment.MAP, textSize: 1.0, - textSizeScaleRange: [0.0, 1.0], + textSizeScaleRange: [5.0, 5.0], textTransform: TextTransform.NONE, textVariableAnchor: ["center", "left"], textWritingMode: ["horizontal", "vertical"], @@ -110,7 +110,7 @@ void main() { expect(layer.iconRotate, 1.0); expect(layer.iconRotationAlignment, IconRotationAlignment.MAP); expect(layer.iconSize, 1.0); - expect(layer.iconSizeScaleRange, [0.0, 1.0]); + expect(layer.iconSizeScaleRange, [5.0, 5.0]); expect(layer.iconTextFit, IconTextFit.NONE); expect(layer.iconTextFitPadding, [0.0, 1.0, 2.0, 3.0]); expect(layer.symbolAvoidEdges, true); @@ -139,7 +139,7 @@ void main() { expect(layer.textRotate, 1.0); expect(layer.textRotationAlignment, TextRotationAlignment.MAP); expect(layer.textSize, 1.0); - expect(layer.textSizeScaleRange, [0.0, 1.0]); + expect(layer.textSizeScaleRange, [5.0, 5.0]); expect(layer.textTransform, TextTransform.NONE); expect(layer.textVariableAnchor, ["center", "left"]); expect(layer.textWritingMode, ["horizontal", "vertical"]); @@ -204,7 +204,7 @@ void main() { iconSizeExpression: ['number', 1.0], iconSizeScaleRangeExpression: [ 'literal', - [0.0, 1.0] + [5.0, 5.0] ], iconTextFitExpression: ['string', 'none'], iconTextFitPaddingExpression: [ @@ -245,7 +245,7 @@ void main() { textSizeExpression: ['number', 1.0], textSizeScaleRangeExpression: [ 'literal', - [0.0, 1.0] + [5.0, 5.0] ], textTransformExpression: ['string', 'none'], textVariableAnchorExpression: [ @@ -307,7 +307,7 @@ void main() { expect(layer.iconRotate, 1.0); expect(layer.iconRotationAlignment, IconRotationAlignment.MAP); expect(layer.iconSize, 1.0); - expect(layer.iconSizeScaleRange, [0.0, 1.0]); + expect(layer.iconSizeScaleRange, [5.0, 5.0]); expect(layer.iconTextFit, IconTextFit.NONE); expect(layer.iconTextFitPadding, [0.0, 1.0, 2.0, 3.0]); expect(layer.symbolAvoidEdges, true); @@ -336,7 +336,7 @@ void main() { expect(layer.textRotate, 1.0); expect(layer.textRotationAlignment, TextRotationAlignment.MAP); expect(layer.textSize, 1.0); - expect(layer.textSizeScaleRange, [0.0, 1.0]); + expect(layer.textSizeScaleRange, [5.0, 5.0]); expect(layer.textTransform, TextTransform.NONE); expect(layer.textVariableAnchor, ["center", "left"]); expect(layer.textWritingMode, ["horizontal", "vertical"]); From fae6077dda4b50f7e69ab66b72aca2e419d86766 Mon Sep 17 00:00:00 2001 From: Roman Laitarenko Date: Wed, 24 Sep 2025 14:09:53 +0300 Subject: [PATCH 6/7] add changelog entry --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 122650ed..8da3bc9d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ ### 2.12.0-beta.1 * Use Maps SDK Android dependency with NDK 27 support and [support for 16 KB page sizes](https://developer.android.com/guide/practices/page-sizes). +* Expose `LineLayer.lineCutoutOpacity`, `LineLayer.lineCutoutWidth` and `LineLayer.lineCutoutFadeWidth` to make route lines visible through obstructing 3D buildings and other aboveground features. ### 2.11.0 From 160168f51b9cc13e3d05d2c3e462edfdf67635fc Mon Sep 17 00:00:00 2001 From: Roman Laitarenko Date: Wed, 24 Sep 2025 14:59:27 +0300 Subject: [PATCH 7/7] update annotations --- .../PolylineAnnotationController.kt | 69 ++++++++ .../pigeons/PolylineAnnotationMessenger.kt | 126 ++++++++++++++ .../point_annotation_manager_test.dart | 8 +- .../polyline_annotation_manager_test.dart | 20 ++- example/pubspec.lock | 2 +- .../PolylineAnnotationController.swift | 54 ++++++ .../Generated/PointAnnotationMessenger.swift | 4 +- .../PolylineAnnotationMessenger.swift | 111 ++++++++++++ .../annotation/point_annotation_manager.dart | 12 +- .../polyline_annotation_manager.dart | 30 ++++ .../pigeons/point_annotation_messenger.dart | 4 +- .../polyline_annotation_messenger.dart | 159 ++++++++++++++++++ 12 files changed, 580 insertions(+), 19 deletions(-) diff --git a/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/annotation/PolylineAnnotationController.kt b/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/annotation/PolylineAnnotationController.kt index 7bcb0591..68315afa 100644 --- a/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/annotation/PolylineAnnotationController.kt +++ b/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/annotation/PolylineAnnotationController.kt @@ -214,6 +214,75 @@ class PolylineAnnotationController(private val delegate: ControllerDelegate) : _ } } + override fun setLineCutoutFadeWidth( + managerId: String, + lineCutoutFadeWidth: Double, + callback: (Result) -> Unit + ) { + val manager = delegate.getManager(managerId) as PolylineAnnotationManager + manager.lineCutoutFadeWidth = lineCutoutFadeWidth + callback(Result.success(Unit)) + } + + override fun getLineCutoutFadeWidth( + managerId: String, + callback: (Result) -> Unit + ) { + val manager = delegate.getManager(managerId) as PolylineAnnotationManager + val value = manager.lineCutoutFadeWidth + if (value != null) { + callback(Result.success(value)) + } else { + callback(Result.success(null)) + } + } + + override fun setLineCutoutOpacity( + managerId: String, + lineCutoutOpacity: Double, + callback: (Result) -> Unit + ) { + val manager = delegate.getManager(managerId) as PolylineAnnotationManager + manager.lineCutoutOpacity = lineCutoutOpacity + callback(Result.success(Unit)) + } + + override fun getLineCutoutOpacity( + managerId: String, + callback: (Result) -> Unit + ) { + val manager = delegate.getManager(managerId) as PolylineAnnotationManager + val value = manager.lineCutoutOpacity + if (value != null) { + callback(Result.success(value)) + } else { + callback(Result.success(null)) + } + } + + override fun setLineCutoutWidth( + managerId: String, + lineCutoutWidth: Double, + callback: (Result) -> Unit + ) { + val manager = delegate.getManager(managerId) as PolylineAnnotationManager + manager.lineCutoutWidth = lineCutoutWidth + callback(Result.success(Unit)) + } + + override fun getLineCutoutWidth( + managerId: String, + callback: (Result) -> Unit + ) { + val manager = delegate.getManager(managerId) as PolylineAnnotationManager + val value = manager.lineCutoutWidth + if (value != null) { + callback(Result.success(value)) + } else { + callback(Result.success(null)) + } + } + override fun setLineElevationReference( managerId: String, lineElevationReference: LineElevationReference, diff --git a/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/pigeons/PolylineAnnotationMessenger.kt b/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/pigeons/PolylineAnnotationMessenger.kt index a8e886df..480e4682 100644 --- a/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/pigeons/PolylineAnnotationMessenger.kt +++ b/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/pigeons/PolylineAnnotationMessenger.kt @@ -493,6 +493,12 @@ interface _PolylineAnnotationMessenger { fun getLineCap(managerId: String, callback: (Result) -> Unit) fun setLineCrossSlope(managerId: String, lineCrossSlope: Double, callback: (Result) -> Unit) fun getLineCrossSlope(managerId: String, callback: (Result) -> Unit) + fun setLineCutoutFadeWidth(managerId: String, lineCutoutFadeWidth: Double, callback: (Result) -> Unit) + fun getLineCutoutFadeWidth(managerId: String, callback: (Result) -> Unit) + fun setLineCutoutOpacity(managerId: String, lineCutoutOpacity: Double, callback: (Result) -> Unit) + fun getLineCutoutOpacity(managerId: String, callback: (Result) -> Unit) + fun setLineCutoutWidth(managerId: String, lineCutoutWidth: Double, callback: (Result) -> Unit) + fun getLineCutoutWidth(managerId: String, callback: (Result) -> Unit) fun setLineElevationReference(managerId: String, lineElevationReference: LineElevationReference, callback: (Result) -> Unit) fun getLineElevationReference(managerId: String, callback: (Result) -> Unit) fun setLineJoin(managerId: String, lineJoin: LineJoin, callback: (Result) -> Unit) @@ -734,6 +740,126 @@ interface _PolylineAnnotationMessenger { channel.setMessageHandler(null) } } + run { + val channel = BasicMessageChannel(binaryMessenger, "dev.flutter.pigeon.mapbox_maps_flutter._PolylineAnnotationMessenger.setLineCutoutFadeWidth$separatedMessageChannelSuffix", codec) + if (api != null) { + channel.setMessageHandler { message, reply -> + val args = message as List + val managerIdArg = args[0] as String + val lineCutoutFadeWidthArg = args[1] as Double + api.setLineCutoutFadeWidth(managerIdArg, lineCutoutFadeWidthArg) { result: Result -> + val error = result.exceptionOrNull() + if (error != null) { + reply.reply(wrapError(error)) + } else { + reply.reply(wrapResult(null)) + } + } + } + } else { + channel.setMessageHandler(null) + } + } + run { + val channel = BasicMessageChannel(binaryMessenger, "dev.flutter.pigeon.mapbox_maps_flutter._PolylineAnnotationMessenger.getLineCutoutFadeWidth$separatedMessageChannelSuffix", codec) + if (api != null) { + channel.setMessageHandler { message, reply -> + val args = message as List + val managerIdArg = args[0] as String + api.getLineCutoutFadeWidth(managerIdArg) { result: Result -> + val error = result.exceptionOrNull() + if (error != null) { + reply.reply(wrapError(error)) + } else { + val data = result.getOrNull() + reply.reply(wrapResult(data)) + } + } + } + } else { + channel.setMessageHandler(null) + } + } + run { + val channel = BasicMessageChannel(binaryMessenger, "dev.flutter.pigeon.mapbox_maps_flutter._PolylineAnnotationMessenger.setLineCutoutOpacity$separatedMessageChannelSuffix", codec) + if (api != null) { + channel.setMessageHandler { message, reply -> + val args = message as List + val managerIdArg = args[0] as String + val lineCutoutOpacityArg = args[1] as Double + api.setLineCutoutOpacity(managerIdArg, lineCutoutOpacityArg) { result: Result -> + val error = result.exceptionOrNull() + if (error != null) { + reply.reply(wrapError(error)) + } else { + reply.reply(wrapResult(null)) + } + } + } + } else { + channel.setMessageHandler(null) + } + } + run { + val channel = BasicMessageChannel(binaryMessenger, "dev.flutter.pigeon.mapbox_maps_flutter._PolylineAnnotationMessenger.getLineCutoutOpacity$separatedMessageChannelSuffix", codec) + if (api != null) { + channel.setMessageHandler { message, reply -> + val args = message as List + val managerIdArg = args[0] as String + api.getLineCutoutOpacity(managerIdArg) { result: Result -> + val error = result.exceptionOrNull() + if (error != null) { + reply.reply(wrapError(error)) + } else { + val data = result.getOrNull() + reply.reply(wrapResult(data)) + } + } + } + } else { + channel.setMessageHandler(null) + } + } + run { + val channel = BasicMessageChannel(binaryMessenger, "dev.flutter.pigeon.mapbox_maps_flutter._PolylineAnnotationMessenger.setLineCutoutWidth$separatedMessageChannelSuffix", codec) + if (api != null) { + channel.setMessageHandler { message, reply -> + val args = message as List + val managerIdArg = args[0] as String + val lineCutoutWidthArg = args[1] as Double + api.setLineCutoutWidth(managerIdArg, lineCutoutWidthArg) { result: Result -> + val error = result.exceptionOrNull() + if (error != null) { + reply.reply(wrapError(error)) + } else { + reply.reply(wrapResult(null)) + } + } + } + } else { + channel.setMessageHandler(null) + } + } + run { + val channel = BasicMessageChannel(binaryMessenger, "dev.flutter.pigeon.mapbox_maps_flutter._PolylineAnnotationMessenger.getLineCutoutWidth$separatedMessageChannelSuffix", codec) + if (api != null) { + channel.setMessageHandler { message, reply -> + val args = message as List + val managerIdArg = args[0] as String + api.getLineCutoutWidth(managerIdArg) { result: Result -> + val error = result.exceptionOrNull() + if (error != null) { + reply.reply(wrapError(error)) + } else { + val data = result.getOrNull() + reply.reply(wrapResult(data)) + } + } + } + } else { + channel.setMessageHandler(null) + } + } run { val channel = BasicMessageChannel(binaryMessenger, "dev.flutter.pigeon.mapbox_maps_flutter._PolylineAnnotationMessenger.setLineElevationReference$separatedMessageChannelSuffix", codec) if (api != null) { diff --git a/example/integration_test/annotations/point_annotation_manager_test.dart b/example/integration_test/annotations/point_annotation_manager_test.dart index bceff449..b1794c2c 100644 --- a/example/integration_test/annotations/point_annotation_manager_test.dart +++ b/example/integration_test/annotations/point_annotation_manager_test.dart @@ -83,9 +83,9 @@ void main() { var iconSize = await manager.getIconSize(); expect(1.0, iconSize); - await manager.setIconSizeScaleRange([0.0, 1.0]); + await manager.setIconSizeScaleRange([5.0, 5.0]); var iconSizeScaleRange = await manager.getIconSizeScaleRange(); - expect([0.0, 1.0], iconSizeScaleRange); + expect([5.0, 5.0], iconSizeScaleRange); await manager.setIconTextFit(IconTextFit.NONE); var iconTextFit = await manager.getIconTextFit(); @@ -199,9 +199,9 @@ void main() { var textSize = await manager.getTextSize(); expect(1.0, textSize); - await manager.setTextSizeScaleRange([0.0, 1.0]); + await manager.setTextSizeScaleRange([5.0, 5.0]); var textSizeScaleRange = await manager.getTextSizeScaleRange(); - expect([0.0, 1.0], textSizeScaleRange); + expect([5.0, 5.0], textSizeScaleRange); await manager.setTextTransform(TextTransform.NONE); var textTransform = await manager.getTextTransform(); diff --git a/example/integration_test/annotations/polyline_annotation_manager_test.dart b/example/integration_test/annotations/polyline_annotation_manager_test.dart index b441265e..6f03b651 100644 --- a/example/integration_test/annotations/polyline_annotation_manager_test.dart +++ b/example/integration_test/annotations/polyline_annotation_manager_test.dart @@ -45,6 +45,18 @@ void main() { var lineCrossSlope = await manager.getLineCrossSlope(); expect(1.0, lineCrossSlope); + await manager.setLineCutoutFadeWidth(1.0); + var lineCutoutFadeWidth = await manager.getLineCutoutFadeWidth(); + expect(1.0, lineCutoutFadeWidth); + + await manager.setLineCutoutOpacity(1.0); + var lineCutoutOpacity = await manager.getLineCutoutOpacity(); + expect(1.0, lineCutoutOpacity); + + await manager.setLineCutoutWidth(1.0); + var lineCutoutWidth = await manager.getLineCutoutWidth(); + expect(1.0, lineCutoutWidth); + await manager.setLineElevationReference(LineElevationReference.NONE); var lineElevationReference = await manager.getLineElevationReference(); expect(LineElevationReference.NONE, lineElevationReference); @@ -133,13 +145,13 @@ void main() { var lineTrimColor = await manager.getLineTrimColor(); expect(Colors.red.value, lineTrimColor); - await manager.setLineTrimFadeRange([0.0, 1.0]); + await manager.setLineTrimFadeRange([0.5, 0.5]); var lineTrimFadeRange = await manager.getLineTrimFadeRange(); - expect([0.0, 1.0], lineTrimFadeRange); + expect([0.5, 0.5], lineTrimFadeRange); - await manager.setLineTrimOffset([0.0, 1.0]); + await manager.setLineTrimOffset([0.5, 0.5]); var lineTrimOffset = await manager.getLineTrimOffset(); - expect([0.0, 1.0], lineTrimOffset); + expect([0.5, 0.5], lineTrimOffset); await manager.setLineWidth(1.0); var lineWidth = await manager.getLineWidth(); diff --git a/example/pubspec.lock b/example/pubspec.lock index 0113c061..4fb36eea 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -269,7 +269,7 @@ packages: path: ".." relative: true source: path - version: "2.11.0" + version: "2.12.0-beta.1" matcher: dependency: transitive description: diff --git a/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Annotations/PolylineAnnotationController.swift b/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Annotations/PolylineAnnotationController.swift index 72830281..0291005c 100644 --- a/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Annotations/PolylineAnnotationController.swift +++ b/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Annotations/PolylineAnnotationController.swift @@ -123,6 +123,60 @@ final class PolylineAnnotationController: BaseAnnotationMessenger) -> Void) { + do { + completion(.success(try get(\.lineCutoutFadeWidth, managerId: managerId))) + } catch { + completion(.failure(FlutterError(code: PolylineAnnotationController.errorCode, message: "No manager found with id: \(managerId)", details: nil))) + } + } + + func setLineCutoutFadeWidth(managerId: String, lineCutoutFadeWidth: Double, completion: @escaping (Result) -> Void) { + do { + let newValue = lineCutoutFadeWidth + try set(\.lineCutoutFadeWidth, newValue: newValue, managerId: managerId) + completion(.success(())) + } catch { + completion(.failure(FlutterError(code: PolylineAnnotationController.errorCode, message: "No manager found with id: \(managerId)", details: nil))) + } + } + + func getLineCutoutOpacity(managerId: String, completion: @escaping (Result) -> Void) { + do { + completion(.success(try get(\.lineCutoutOpacity, managerId: managerId))) + } catch { + completion(.failure(FlutterError(code: PolylineAnnotationController.errorCode, message: "No manager found with id: \(managerId)", details: nil))) + } + } + + func setLineCutoutOpacity(managerId: String, lineCutoutOpacity: Double, completion: @escaping (Result) -> Void) { + do { + let newValue = lineCutoutOpacity + try set(\.lineCutoutOpacity, newValue: newValue, managerId: managerId) + completion(.success(())) + } catch { + completion(.failure(FlutterError(code: PolylineAnnotationController.errorCode, message: "No manager found with id: \(managerId)", details: nil))) + } + } + + func getLineCutoutWidth(managerId: String, completion: @escaping (Result) -> Void) { + do { + completion(.success(try get(\.lineCutoutWidth, managerId: managerId))) + } catch { + completion(.failure(FlutterError(code: PolylineAnnotationController.errorCode, message: "No manager found with id: \(managerId)", details: nil))) + } + } + + func setLineCutoutWidth(managerId: String, lineCutoutWidth: Double, completion: @escaping (Result) -> Void) { + do { + let newValue = lineCutoutWidth + try set(\.lineCutoutWidth, newValue: newValue, managerId: managerId) + completion(.success(())) + } catch { + completion(.failure(FlutterError(code: PolylineAnnotationController.errorCode, message: "No manager found with id: \(managerId)", details: nil))) + } + } + func getLineElevationReference(managerId: String, completion: @escaping (Result) -> Void) { do { completion(.success(try get(\.lineElevationReference, managerId: managerId)?.toFLTLineElevationReference())) diff --git a/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Generated/PointAnnotationMessenger.swift b/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Generated/PointAnnotationMessenger.swift index e5157752..af7a689e 100644 --- a/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Generated/PointAnnotationMessenger.swift +++ b/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Generated/PointAnnotationMessenger.swift @@ -352,7 +352,7 @@ struct PointAnnotation { /// Distance of halo to the icon outline. /// Default value: 0. Minimum value: 0. The unit of iconHaloWidth is in pixels. var iconHaloWidth: Double? = nil - /// Controls the transition progress between the image variants of icon-image. Zero means the first variant is used, one is the second, and in between they are blended together. Both images should be the same size and have the same type (either raster or vector). + /// Controls the transition progress between the image variants of icon-image. Zero means the first variant is used, one is the second, and in between they are blended together. . Both images should be the same size and have the same type (either raster or vector). /// Default value: 0. Value range: [0, 1] /// Deprecated: Use `PointAnnotationManager.iconImageCrossFade` instead. var iconImageCrossFade: Double? = nil @@ -597,7 +597,7 @@ struct PointAnnotationOptions { /// Distance of halo to the icon outline. /// Default value: 0. Minimum value: 0. The unit of iconHaloWidth is in pixels. var iconHaloWidth: Double? = nil - /// Controls the transition progress between the image variants of icon-image. Zero means the first variant is used, one is the second, and in between they are blended together. Both images should be the same size and have the same type (either raster or vector). + /// Controls the transition progress between the image variants of icon-image. Zero means the first variant is used, one is the second, and in between they are blended together. . Both images should be the same size and have the same type (either raster or vector). /// Default value: 0. Value range: [0, 1] /// Deprecated: Use `PointAnnotationManager.iconImageCrossFade` instead. var iconImageCrossFade: Double? = nil diff --git a/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Generated/PolylineAnnotationMessenger.swift b/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Generated/PolylineAnnotationMessenger.swift index 336923b8..08e84949 100644 --- a/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Generated/PolylineAnnotationMessenger.swift +++ b/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Generated/PolylineAnnotationMessenger.swift @@ -435,6 +435,12 @@ protocol _PolylineAnnotationMessenger { func getLineCap(managerId: String, completion: @escaping (Result) -> Void) func setLineCrossSlope(managerId: String, lineCrossSlope: Double, completion: @escaping (Result) -> Void) func getLineCrossSlope(managerId: String, completion: @escaping (Result) -> Void) + func setLineCutoutFadeWidth(managerId: String, lineCutoutFadeWidth: Double, completion: @escaping (Result) -> Void) + func getLineCutoutFadeWidth(managerId: String, completion: @escaping (Result) -> Void) + func setLineCutoutOpacity(managerId: String, lineCutoutOpacity: Double, completion: @escaping (Result) -> Void) + func getLineCutoutOpacity(managerId: String, completion: @escaping (Result) -> Void) + func setLineCutoutWidth(managerId: String, lineCutoutWidth: Double, completion: @escaping (Result) -> Void) + func getLineCutoutWidth(managerId: String, completion: @escaping (Result) -> Void) func setLineElevationReference(managerId: String, lineElevationReference: LineElevationReference, completion: @escaping (Result) -> Void) func getLineElevationReference(managerId: String, completion: @escaping (Result) -> Void) func setLineJoin(managerId: String, lineJoin: LineJoin, completion: @escaping (Result) -> Void) @@ -652,6 +658,111 @@ class _PolylineAnnotationMessengerSetup { } else { getLineCrossSlopeChannel.setMessageHandler(nil) } + let setLineCutoutFadeWidthChannel = FlutterBasicMessageChannel(name: "dev.flutter.pigeon.mapbox_maps_flutter._PolylineAnnotationMessenger.setLineCutoutFadeWidth\(channelSuffix)", binaryMessenger: binaryMessenger, codec: codec) + if let api = api { + setLineCutoutFadeWidthChannel.setMessageHandler { message, reply in + let args = message as! [Any?] + let managerIdArg = args[0] as! String + let lineCutoutFadeWidthArg = args[1] as! Double + api.setLineCutoutFadeWidth(managerId: managerIdArg, lineCutoutFadeWidth: lineCutoutFadeWidthArg) { result in + switch result { + case .success: + reply(wrapResult(nil)) + case .failure(let error): + reply(wrapError(error)) + } + } + } + } else { + setLineCutoutFadeWidthChannel.setMessageHandler(nil) + } + let getLineCutoutFadeWidthChannel = FlutterBasicMessageChannel(name: "dev.flutter.pigeon.mapbox_maps_flutter._PolylineAnnotationMessenger.getLineCutoutFadeWidth\(channelSuffix)", binaryMessenger: binaryMessenger, codec: codec) + if let api = api { + getLineCutoutFadeWidthChannel.setMessageHandler { message, reply in + let args = message as! [Any?] + let managerIdArg = args[0] as! String + api.getLineCutoutFadeWidth(managerId: managerIdArg) { result in + switch result { + case .success(let res): + reply(wrapResult(res)) + case .failure(let error): + reply(wrapError(error)) + } + } + } + } else { + getLineCutoutFadeWidthChannel.setMessageHandler(nil) + } + let setLineCutoutOpacityChannel = FlutterBasicMessageChannel(name: "dev.flutter.pigeon.mapbox_maps_flutter._PolylineAnnotationMessenger.setLineCutoutOpacity\(channelSuffix)", binaryMessenger: binaryMessenger, codec: codec) + if let api = api { + setLineCutoutOpacityChannel.setMessageHandler { message, reply in + let args = message as! [Any?] + let managerIdArg = args[0] as! String + let lineCutoutOpacityArg = args[1] as! Double + api.setLineCutoutOpacity(managerId: managerIdArg, lineCutoutOpacity: lineCutoutOpacityArg) { result in + switch result { + case .success: + reply(wrapResult(nil)) + case .failure(let error): + reply(wrapError(error)) + } + } + } + } else { + setLineCutoutOpacityChannel.setMessageHandler(nil) + } + let getLineCutoutOpacityChannel = FlutterBasicMessageChannel(name: "dev.flutter.pigeon.mapbox_maps_flutter._PolylineAnnotationMessenger.getLineCutoutOpacity\(channelSuffix)", binaryMessenger: binaryMessenger, codec: codec) + if let api = api { + getLineCutoutOpacityChannel.setMessageHandler { message, reply in + let args = message as! [Any?] + let managerIdArg = args[0] as! String + api.getLineCutoutOpacity(managerId: managerIdArg) { result in + switch result { + case .success(let res): + reply(wrapResult(res)) + case .failure(let error): + reply(wrapError(error)) + } + } + } + } else { + getLineCutoutOpacityChannel.setMessageHandler(nil) + } + let setLineCutoutWidthChannel = FlutterBasicMessageChannel(name: "dev.flutter.pigeon.mapbox_maps_flutter._PolylineAnnotationMessenger.setLineCutoutWidth\(channelSuffix)", binaryMessenger: binaryMessenger, codec: codec) + if let api = api { + setLineCutoutWidthChannel.setMessageHandler { message, reply in + let args = message as! [Any?] + let managerIdArg = args[0] as! String + let lineCutoutWidthArg = args[1] as! Double + api.setLineCutoutWidth(managerId: managerIdArg, lineCutoutWidth: lineCutoutWidthArg) { result in + switch result { + case .success: + reply(wrapResult(nil)) + case .failure(let error): + reply(wrapError(error)) + } + } + } + } else { + setLineCutoutWidthChannel.setMessageHandler(nil) + } + let getLineCutoutWidthChannel = FlutterBasicMessageChannel(name: "dev.flutter.pigeon.mapbox_maps_flutter._PolylineAnnotationMessenger.getLineCutoutWidth\(channelSuffix)", binaryMessenger: binaryMessenger, codec: codec) + if let api = api { + getLineCutoutWidthChannel.setMessageHandler { message, reply in + let args = message as! [Any?] + let managerIdArg = args[0] as! String + api.getLineCutoutWidth(managerId: managerIdArg) { result in + switch result { + case .success(let res): + reply(wrapResult(res)) + case .failure(let error): + reply(wrapError(error)) + } + } + } + } else { + getLineCutoutWidthChannel.setMessageHandler(nil) + } let setLineElevationReferenceChannel = FlutterBasicMessageChannel(name: "dev.flutter.pigeon.mapbox_maps_flutter._PolylineAnnotationMessenger.setLineElevationReference\(channelSuffix)", binaryMessenger: binaryMessenger, codec: codec) if let api = api { setLineElevationReferenceChannel.setMessageHandler { message, reply in diff --git a/lib/src/annotation/point_annotation_manager.dart b/lib/src/annotation/point_annotation_manager.dart index 3be2894d..bebb5333 100644 --- a/lib/src/annotation/point_annotation_manager.dart +++ b/lib/src/annotation/point_annotation_manager.dart @@ -199,12 +199,12 @@ class PointAnnotationManager extends BaseAnnotationManager { /// Scales the original size of the icon by the provided factor. The new pixel size of the image will be the original pixel size multiplied by `icon-size`. 1 is the original size; 3 triples the size of the image. Default value: 1. Minimum value: 0. The unit of iconSize is in factor of the original icon size. Future getIconSize() => _annotationMessenger.getIconSize(id); - /// Defines the minimum and maximum scaling factors for icon related properties like `icon-size`, `icon-halo-width`, `icon-halo-blur` Default value: [0.8,2]. Value range: [0.1, 10] + /// Limits the possible scaling range for `icon-size`, `icon-halo-width`, `icon-halo-blur` properties to be within [min-scale, max-scale] Default value: [0.8,2]. Minimum value: [0.1,0.1]. Maximum value: [10,10]. @experimental Future setIconSizeScaleRange(List iconSizeScaleRange) => _annotationMessenger.setIconSizeScaleRange(id, iconSizeScaleRange); - /// Defines the minimum and maximum scaling factors for icon related properties like `icon-size`, `icon-halo-width`, `icon-halo-blur` Default value: [0.8,2]. Value range: [0.1, 10] + /// Limits the possible scaling range for `icon-size`, `icon-halo-width`, `icon-halo-blur` properties to be within [min-scale, max-scale] Default value: [0.8,2]. Minimum value: [0.1,0.1]. Maximum value: [10,10]. @experimental Future?> getIconSizeScaleRange() => _annotationMessenger.getIconSizeScaleRange(id); @@ -429,12 +429,12 @@ class PointAnnotationManager extends BaseAnnotationManager { /// Font size. Default value: 16. Minimum value: 0. The unit of textSize is in pixels. Future getTextSize() => _annotationMessenger.getTextSize(id); - /// Defines the minimum and maximum scaling factors for text related properties like `text-size`, `text-max-width`, `text-halo-width`, `font-size` Default value: [0.8,2]. Value range: [0.1, 10] + /// Limits the possible scaling range for `text-size`, `text-halo-width`, `text-halo-blur` properties to be within [min-scale, max-scale] Default value: [0.8,2]. Minimum value: [0.1,0.1]. Maximum value: [10,10]. @experimental Future setTextSizeScaleRange(List textSizeScaleRange) => _annotationMessenger.setTextSizeScaleRange(id, textSizeScaleRange); - /// Defines the minimum and maximum scaling factors for text related properties like `text-size`, `text-max-width`, `text-halo-width`, `font-size` Default value: [0.8,2]. Value range: [0.1, 10] + /// Limits the possible scaling range for `text-size`, `text-halo-width`, `text-halo-blur` properties to be within [min-scale, max-scale] Default value: [0.8,2]. Minimum value: [0.1,0.1]. Maximum value: [10,10]. @experimental Future?> getTextSizeScaleRange() => _annotationMessenger.getTextSizeScaleRange(id); @@ -492,11 +492,11 @@ class PointAnnotationManager extends BaseAnnotationManager { Future getIconHaloWidth() => _annotationMessenger.getIconHaloWidth(id); - /// Controls the transition progress between the image variants of icon-image. Zero means the first variant is used, one is the second, and in between they are blended together. Both images should be the same size and have the same type (either raster or vector). Default value: 0. Value range: [0, 1] + /// Controls the transition progress between the image variants of icon-image. Zero means the first variant is used, one is the second, and in between they are blended together. . Both images should be the same size and have the same type (either raster or vector). Default value: 0. Value range: [0, 1] Future setIconImageCrossFade(double iconImageCrossFade) => _annotationMessenger.setIconImageCrossFade(id, iconImageCrossFade); - /// Controls the transition progress between the image variants of icon-image. Zero means the first variant is used, one is the second, and in between they are blended together. Both images should be the same size and have the same type (either raster or vector). Default value: 0. Value range: [0, 1] + /// Controls the transition progress between the image variants of icon-image. Zero means the first variant is used, one is the second, and in between they are blended together. . Both images should be the same size and have the same type (either raster or vector). Default value: 0. Value range: [0, 1] Future getIconImageCrossFade() => _annotationMessenger.getIconImageCrossFade(id); diff --git a/lib/src/annotation/polyline_annotation_manager.dart b/lib/src/annotation/polyline_annotation_manager.dart index b5dfd885..458ae03e 100644 --- a/lib/src/annotation/polyline_annotation_manager.dart +++ b/lib/src/annotation/polyline_annotation_manager.dart @@ -126,6 +126,36 @@ class PolylineAnnotationManager extends BaseAnnotationManager { Future getLineCrossSlope() => _annotationMessenger.getLineCrossSlope(id); + /// The width of the cutout fade effect Default value: 0.4. Value range: [0, 1] + @experimental + Future setLineCutoutFadeWidth(double lineCutoutFadeWidth) => + _annotationMessenger.setLineCutoutFadeWidth(id, lineCutoutFadeWidth); + + /// The width of the cutout fade effect Default value: 0.4. Value range: [0, 1] + @experimental + Future getLineCutoutFadeWidth() => + _annotationMessenger.getLineCutoutFadeWidth(id); + + /// The opacity of the aboveground objects affected by the line cutout. Cutout for tunnels isn't affected by this property, If set to 0, the cutout is fully transparent. Cutout opacity should have the same value for all layers that specify it. If all layers don't have the same value, it is not specified which value is used. Default value: 0.3. Value range: [0, 1] + @experimental + Future setLineCutoutOpacity(double lineCutoutOpacity) => + _annotationMessenger.setLineCutoutOpacity(id, lineCutoutOpacity); + + /// The opacity of the aboveground objects affected by the line cutout. Cutout for tunnels isn't affected by this property, If set to 0, the cutout is fully transparent. Cutout opacity should have the same value for all layers that specify it. If all layers don't have the same value, it is not specified which value is used. Default value: 0.3. Value range: [0, 1] + @experimental + Future getLineCutoutOpacity() => + _annotationMessenger.getLineCutoutOpacity(id); + + /// The width of the line cutout in meters. If set to 0, the cutout is disabled. The cutout does not apply to location-indicator type layers. Default value: 0. Value range: [0, 50] + @experimental + Future setLineCutoutWidth(double lineCutoutWidth) => + _annotationMessenger.setLineCutoutWidth(id, lineCutoutWidth); + + /// The width of the line cutout in meters. If set to 0, the cutout is disabled. The cutout does not apply to location-indicator type layers. Default value: 0. Value range: [0, 50] + @experimental + Future getLineCutoutWidth() => + _annotationMessenger.getLineCutoutWidth(id); + /// Selects the base of line-elevation. Some modes might require precomputed elevation data in the tileset. Default value: "none". @experimental Future setLineElevationReference( diff --git a/lib/src/pigeons/point_annotation_messenger.dart b/lib/src/pigeons/point_annotation_messenger.dart index c65bd9cc..3b8dab0a 100644 --- a/lib/src/pigeons/point_annotation_messenger.dart +++ b/lib/src/pigeons/point_annotation_messenger.dart @@ -408,7 +408,7 @@ class PointAnnotation { /// Default value: 0. Minimum value: 0. The unit of iconHaloWidth is in pixels. double? iconHaloWidth; - /// Controls the transition progress between the image variants of icon-image. Zero means the first variant is used, one is the second, and in between they are blended together. Both images should be the same size and have the same type (either raster or vector). + /// Controls the transition progress between the image variants of icon-image. Zero means the first variant is used, one is the second, and in between they are blended together. . Both images should be the same size and have the same type (either raster or vector). /// Default value: 0. Value range: [0, 1] /// Deprecated: Use `PointAnnotationManager.iconImageCrossFade` instead. double? iconImageCrossFade; @@ -748,7 +748,7 @@ class PointAnnotationOptions { /// Default value: 0. Minimum value: 0. The unit of iconHaloWidth is in pixels. double? iconHaloWidth; - /// Controls the transition progress between the image variants of icon-image. Zero means the first variant is used, one is the second, and in between they are blended together. Both images should be the same size and have the same type (either raster or vector). + /// Controls the transition progress between the image variants of icon-image. Zero means the first variant is used, one is the second, and in between they are blended together. . Both images should be the same size and have the same type (either raster or vector). /// Default value: 0. Value range: [0, 1] /// Deprecated: Use `PointAnnotationManager.iconImageCrossFade` instead. double? iconImageCrossFade; diff --git a/lib/src/pigeons/polyline_annotation_messenger.dart b/lib/src/pigeons/polyline_annotation_messenger.dart index a433f977..9a38c52f 100644 --- a/lib/src/pigeons/polyline_annotation_messenger.dart +++ b/lib/src/pigeons/polyline_annotation_messenger.dart @@ -709,6 +709,165 @@ class _PolylineAnnotationMessenger { } } + Future setLineCutoutFadeWidth( + String managerId, double lineCutoutFadeWidth) async { + final String pigeonVar_channelName = + 'dev.flutter.pigeon.mapbox_maps_flutter._PolylineAnnotationMessenger.setLineCutoutFadeWidth$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = + pigeonVar_channel.send([managerId, lineCutoutFadeWidth]); + final List? pigeonVar_replyList = + await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else { + return; + } + } + + Future getLineCutoutFadeWidth(String managerId) async { + final String pigeonVar_channelName = + 'dev.flutter.pigeon.mapbox_maps_flutter._PolylineAnnotationMessenger.getLineCutoutFadeWidth$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = + pigeonVar_channel.send([managerId]); + final List? pigeonVar_replyList = + await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else { + return (pigeonVar_replyList[0] as double?); + } + } + + Future setLineCutoutOpacity( + String managerId, double lineCutoutOpacity) async { + final String pigeonVar_channelName = + 'dev.flutter.pigeon.mapbox_maps_flutter._PolylineAnnotationMessenger.setLineCutoutOpacity$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = + pigeonVar_channel.send([managerId, lineCutoutOpacity]); + final List? pigeonVar_replyList = + await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else { + return; + } + } + + Future getLineCutoutOpacity(String managerId) async { + final String pigeonVar_channelName = + 'dev.flutter.pigeon.mapbox_maps_flutter._PolylineAnnotationMessenger.getLineCutoutOpacity$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = + pigeonVar_channel.send([managerId]); + final List? pigeonVar_replyList = + await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else { + return (pigeonVar_replyList[0] as double?); + } + } + + Future setLineCutoutWidth( + String managerId, double lineCutoutWidth) async { + final String pigeonVar_channelName = + 'dev.flutter.pigeon.mapbox_maps_flutter._PolylineAnnotationMessenger.setLineCutoutWidth$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = + pigeonVar_channel.send([managerId, lineCutoutWidth]); + final List? pigeonVar_replyList = + await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else { + return; + } + } + + Future getLineCutoutWidth(String managerId) async { + final String pigeonVar_channelName = + 'dev.flutter.pigeon.mapbox_maps_flutter._PolylineAnnotationMessenger.getLineCutoutWidth$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = + pigeonVar_channel.send([managerId]); + final List? pigeonVar_replyList = + await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else { + return (pigeonVar_replyList[0] as double?); + } + } + Future setLineElevationReference( String managerId, LineElevationReference lineElevationReference) async { final String pigeonVar_channelName =