diff --git a/.clang-tidy b/.clang-tidy index 5394510eeda..ed4cbadaec7 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -1,23 +1,23 @@ --- Checks: [ - android-*, + android-*, boost-*, bugprone-*, - clang-analyzer-core*, - clang-analyzer-cplusplus*, - clang-analyzer-deadcode*, - clang-analyzer-optin.cplusplus*, - clang-analyzer-optin.performance.Padding, - clang-analyzer-security*, + clang-analyzer-core*, + clang-analyzer-cplusplus*, + clang-analyzer-deadcode*, + clang-analyzer-optin.cplusplus*, + clang-analyzer-optin.performance.Padding, + clang-analyzer-security*, clang-diagnostic-*, cppcoreguidelines-avoid-goto, cppcoreguidelines-no-malloc, google-*, llvm-*, - misc-*, - modernize-*, - performance-*, - portability-*, + misc-*, + modernize-*, + performance-*, + portability-*, readability-*, -bugprone-branch-clone, -bugprone-easily-swappable-parameters, @@ -118,6 +118,6 @@ Checks: [ ] WarningsAsErrors: '*' HeaderFilterRegex: '.*' -CheckOptions: - - key: performance-unnecessary-value-param.AllowedTypes +CheckOptions: + - key: performance-unnecessary-value-param.AllowedTypes value: 'exception_ptr' diff --git a/.github/workflows/android-device-test.yml b/.github/workflows/android-device-test.yml index 6c19057b957..93c516bb6ae 100644 --- a/.github/workflows/android-device-test.yml +++ b/.github/workflows/android-device-test.yml @@ -109,7 +109,7 @@ jobs: ((github.event.workflow_run.head_branch == 'main' && github.event.workflow_run.event == 'push') || matrix.test.name == 'Android Benchmark' && steps.benchmark_comment.outputs.comment-id || matrix.test.name != 'Android Benchmark') - run: + run: echo "run_device_test=true" >> "$GITHUB_ENV" - uses: LouisBrunner/checks-action@v2.0.0 @@ -135,7 +135,7 @@ jobs: role-to-assume: ${{ vars.OIDC_AWS_ROLE_TO_ASSUME }} role-session-name: ${{ github.run_id }} role-duration-seconds: 14400 - + - name: Run ${{ matrix.test.name }} on AWS Device Farm run: | export name="${{ matrix.test.name }}" @@ -160,7 +160,7 @@ jobs: echo results_dir="$results_dir" >> "$GITHUB_ENV" node scripts/aws-device-farm/store-test-artifacts.mjs --runArn ${{ env.run_arn }} --outputDir "$results_dir" zip -r test_artifacts.zip "$results_dir" - + - name: Store Benchmark Results if: matrix.test.name == 'Android Benchmark' && env.run_device_test == 'true' run: | diff --git a/.github/workflows/ios-ci.yml b/.github/workflows/ios-ci.yml index afd21f42ffd..190ba797a6c 100644 --- a/.github/workflows/ios-ci.yml +++ b/.github/workflows/ios-ci.yml @@ -21,7 +21,7 @@ on: - ios-*.*.x tags: - 'ios-*' - + pull_request: branches: - '*' @@ -48,11 +48,11 @@ jobs: files_yaml_from_source_file: .github/changed-files.yml - name: Run step if test file(s) change - if: steps.changed-files-yaml.outputs.ios_any_modified == 'true' + if: steps.changed-files-yaml.outputs.ios_any_modified == 'true' run: | echo "One or more iOS file(s) has changed." echo "List of changes: ${{ steps.changed-files-yaml.outputs.ios_all_changed_files }}" - + ios-build: needs: pre_job if: needs.pre_job.outputs.should_skip != 'true' @@ -130,7 +130,7 @@ jobs: ${{ env.render_test_artifacts_dir }}/RenderTestApp.ipa # C++ unit tests - + - name: Build CppUnitTests .ipa and .xctest for AWS Device Farm run: | set -e @@ -178,16 +178,16 @@ jobs: platform/ios/MapLibre_dynamic - name: Configure AWS Credentials - if: github.ref == 'refs/heads/main' && vars.OIDC_AWS_ROLE_TO_ASSUME + if: github.ref == 'refs/heads/main' && vars.OIDC_AWS_ROLE_TO_ASSUME uses: aws-actions/configure-aws-credentials@v4 with: aws-region: us-west-2 role-to-assume: ${{ vars.OIDC_AWS_ROLE_TO_ASSUME }} role-session-name: ${{ github.run_id }} - + - name: Upload MapLibre_DWARF & MapLibre_dynamic to S3 - if: github.ref == 'refs/heads/main' && vars.OIDC_AWS_ROLE_TO_ASSUME - run: | + if: github.ref == 'refs/heads/main' && vars.OIDC_AWS_ROLE_TO_ASSUME + run: | aws s3 cp MapLibre_DWARF s3://maplibre-native/size-test-ios/MapLibre_DWARF-main aws s3 cp MapLibre_dynamic s3://maplibre-native/size-test-ios/MapLibre_dynamic-main @@ -232,7 +232,7 @@ jobs: bazel build --compilation_mode=opt --features=dead_strip,thin_lto --objc_enable_binary_stripping \ --apple_generate_dsym --output_groups=+dsyms --//:renderer=metal //platform/ios:MapLibre.dynamic --embed_label=maplibre_ios_"$(cat VERSION)" echo xcframework="$(bazel info execution_root)"/"$(bazel cquery --output=files --compilation_mode=opt --//:renderer=metal //platform/ios:MapLibre.dynamic)" >> "$GITHUB_ENV" - + - name: Create .zip with debug symbols if: env.make_release working-directory: ./bazel-bin/platform/ios/MapLibre.dynamic_dsyms diff --git a/.github/workflows/linux-ci.yml b/.github/workflows/linux-ci.yml index 9293f241065..d3aa1767612 100644 --- a/.github/workflows/linux-ci.yml +++ b/.github/workflows/linux-ci.yml @@ -37,13 +37,13 @@ jobs: - name: Get all Linux files that have changed if: github.event_name != 'workflow_dispatch' id: changed-files - + uses: tj-actions/changed-files@v45 with: files_yaml_from_source_file: .github/changed-files.yml - name: List changed files - if: steps.changed-files.outputs.linux_any_modified == 'true' + if: steps.changed-files.outputs.linux_any_modified == 'true' run: | echo "Changed file(s): ${{ steps.changed-files.outputs.linux_all_changed_files }}" @@ -114,15 +114,15 @@ jobs: # mbgl-render (used for size test) & mbgl-benchmark-runner - name: Upload mbgl-render as artifact - if: matrix.renderer == 'drawable' && github.event_name == 'pull_request' + if: matrix.renderer == 'drawable' && github.event_name == 'pull_request' uses: actions/upload-artifact@v4 with: name: mbgl-render path: | build/bin/mbgl-render - + - name: Upload mbgl-benchmark-runner as artifact - if: matrix.renderer == 'drawable' && github.event_name == 'pull_request' + if: matrix.renderer == 'drawable' && github.event_name == 'pull_request' uses: actions/upload-artifact@v4 with: name: mbgl-benchmark-runner @@ -130,7 +130,7 @@ jobs: build/mbgl-benchmark-runner - name: Configure AWS Credentials - if: matrix.renderer == 'drawable' && github.ref == 'refs/heads/main' && vars.OIDC_AWS_ROLE_TO_ASSUME + if: matrix.renderer == 'drawable' && github.ref == 'refs/heads/main' && vars.OIDC_AWS_ROLE_TO_ASSUME uses: aws-actions/configure-aws-credentials@v4 with: aws-region: us-west-2 @@ -138,8 +138,8 @@ jobs: role-session-name: ${{ github.run_id }} - name: Upload mbgl-render & mbgl-benchmark-runner to S3 - if: matrix.renderer == 'drawable' && github.ref == 'refs/heads/main' && vars.OIDC_AWS_ROLE_TO_ASSUME - run: | + if: matrix.renderer == 'drawable' && github.ref == 'refs/heads/main' && vars.OIDC_AWS_ROLE_TO_ASSUME + run: | aws s3 cp build/bin/mbgl-render s3://maplibre-native/mbgl-render-main aws s3 cp build/mbgl-benchmark-runner s3://maplibre-native/mbgl-benchmark-runner-main @@ -178,7 +178,7 @@ jobs: name: render-test-result-${{ matrix.renderer }} path: | metrics/linux-${{ matrix.renderer }}.html - + # expression tests - run: chmod +x build/expression-test/mbgl-expression-test diff --git a/.github/workflows/macos-ci.yml b/.github/workflows/macos-ci.yml index efdc64870bb..46b4a6dcb3a 100644 --- a/.github/workflows/macos-ci.yml +++ b/.github/workflows/macos-ci.yml @@ -69,14 +69,14 @@ jobs: restore-keys: | ${{ runner.os }}-bazel- path: ~/.cache/bazel - + - name: Install dependencies run: | brew install bazelisk webp libuv webp icu4c jpeg-turbo glfw brew link icu4c --force - + - name: Build AppKit app, GLFW app, cache tool, render tool for macOS run: bazel build //platform/macos/app:macos_app //platform/glfw:glfw_app //bin:cache_tool //bin:render_tool --//:renderer=metal - + - name: Generate Xcode project for macOS run: bazel run //platform/macos:xcodeproj --@rules_xcodeproj//xcodeproj:extra_common_flags="--//:renderer=metal" diff --git a/.github/workflows/macos-release.yml b/.github/workflows/macos-release.yml index 87c1dd8ac82..a6c5c29d8e1 100644 --- a/.github/workflows/macos-release.yml +++ b/.github/workflows/macos-release.yml @@ -2,7 +2,7 @@ name: macos-release on: workflow_dispatch: - + jobs: build: runs-on: macos-12 @@ -15,14 +15,14 @@ jobs: defaults: run: working-directory: platform/ios - shell: bash + shell: bash steps: - uses: actions/checkout@v4 with: submodules: recursive fetch-depth: 0 - + - name: Install macos dependencies run: | brew list cmake || brew install cmake @@ -46,25 +46,25 @@ jobs: run: npm install - name: Prepare ccache - run: ccache --clear + run: ccache --clear - name: Cache ccache uses: actions/cache@v4 env: - cache-name: ccache-v1 + cache-name: ccache-v1 with: path: ~/.ccache' key: ${{ env.cache-name }}-${{ runner.os }}-${{ github.job }}-${{ github.ref }}-${{ github.sha }}-${{ github.head_ref }} restore-keys: | ${{ env.cache-name }}-${{ runner.os }}-${{ github.job }}-${{ github.ref }}-${{ github.sha }} ${{ env.cache-name }}-${{ runner.os }}-${{ github.job }}-${{ github.ref }} - ${{ env.cache-name }}-${{ runner.os }}-${{ github.job }} + ${{ env.cache-name }}-${{ runner.os }}-${{ github.job }} - name: Clear ccache statistics run: | ccache --zero-stats ccache --max-size=2G - ccache --show-stats + ccache --show-stats - name: Install packaging dependencies run: | @@ -72,7 +72,7 @@ jobs: - name: Build package run: make xpackage - + - name: Deploy package run: make xdeploy env: diff --git a/.github/workflows/node-ci.yml b/.github/workflows/node-ci.yml index 1d4b6abe2f9..980eb50c50f 100644 --- a/.github/workflows/node-ci.yml +++ b/.github/workflows/node-ci.yml @@ -168,7 +168,7 @@ jobs: uses: jwlawson/actions-setup-cmake@v2 with: cmake-version: '3.29.2' - + - name: cmake version run: | cmake --version diff --git a/.github/workflows/node-release.yml b/.github/workflows/node-release.yml index 065a0e74245..eb3d84bc3e9 100644 --- a/.github/workflows/node-release.yml +++ b/.github/workflows/node-release.yml @@ -138,7 +138,7 @@ jobs: uses: jwlawson/actions-setup-cmake@v2 with: cmake-version: '3.29.2' - + - name: cmake version run: | cmake --version diff --git a/.github/workflows/pr-bloaty-ios.yml b/.github/workflows/pr-bloaty-ios.yml index 31d7ff6c065..314df2ce168 100644 --- a/.github/workflows/pr-bloaty-ios.yml +++ b/.github/workflows/pr-bloaty-ios.yml @@ -73,7 +73,7 @@ jobs: run: bloaty/build/bloaty --debug-file MapLibre_DWARF --debug-file MapLibre_DWARF-main MapLibre_dynamic -n 0 -s vm -d compileunits -- MapLibre_dynamic-main > bloaty_diff.txt - name: Configure AWS Credentials - if: vars.OIDC_AWS_ROLE_TO_ASSUME + if: vars.OIDC_AWS_ROLE_TO_ASSUME uses: aws-actions/configure-aws-credentials@v4 with: aws-region: us-west-2 diff --git a/.github/workflows/pr-linux-tests.yml b/.github/workflows/pr-linux-tests.yml index 292ce8291ce..659cc74fef1 100644 --- a/.github/workflows/pr-linux-tests.yml +++ b/.github/workflows/pr-linux-tests.yml @@ -83,7 +83,7 @@ jobs: run: bloaty/build/bloaty mbgl-render -- mbgl-render-legacy -n 0 -s vm -d compileunits > tlus_diff_legacy.txt - name: Configure AWS Credentials - if: github.ref == 'refs/heads/main' && vars.OIDC_AWS_ROLE_TO_ASSUME + if: github.ref == 'refs/heads/main' && vars.OIDC_AWS_ROLE_TO_ASSUME uses: aws-actions/configure-aws-credentials@v4 with: aws-region: us-west-2 @@ -167,7 +167,7 @@ jobs: run: python3 vendor/benchmark/tools/compare.py --no-color benchmarks ./mbgl-benchmark-runner-main ./mbgl-benchmark-runner --benchmark_filter='^[^A][^P][^I].*' > benchmark_out.txt - name: Configure AWS Credentials - if: github.ref == 'refs/heads/main' && vars.OIDC_AWS_ROLE_TO_ASSUME + if: github.ref == 'refs/heads/main' && vars.OIDC_AWS_ROLE_TO_ASSUME uses: aws-actions/configure-aws-credentials@v4 with: aws-region: us-west-2 diff --git a/.github/workflows/windows-ci.yml b/.github/workflows/windows-ci.yml index 5e0bb5a3640..ac8a9c2eb8c 100644 --- a/.github/workflows/windows-ci.yml +++ b/.github/workflows/windows-ci.yml @@ -47,7 +47,7 @@ jobs: files_yaml_from_source_file: .github/changed-files.yml - name: List changed files - if: steps.changed-files.outputs.windows_any_modified == 'true' + if: steps.changed-files.outputs.windows_any_modified == 'true' run: | Write-Host "Changed file(s): ${{ steps.changed-files.outputs.windows_all_changed_files }}" @@ -149,7 +149,7 @@ jobs: uses: github/codeql-action/analyze@v3 with: category: "/language:cpp" - + - name: Download Mesa3D if: matrix.renderer != 'egl' run: | @@ -181,7 +181,7 @@ jobs: if: matrix.renderer == 'vulkan' run: | reg add 'HKLM\Software\Khronos\Vulkan\Drivers' /f /v '${{ github.workspace }}\build\lvp_icd.x86_64.json' /t REG_DWORD /d 0 - + - name: Download and configure Vulkan if: matrix.renderer == 'vulkan' run: | @@ -207,7 +207,7 @@ jobs: name: render-test-result-${{ matrix.renderer }} path: | metrics/windows-${{ matrix.renderer == 'osmesa' && 'opengl' || matrix.renderer }}.html - + # expression tests - name: Run expression test diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3d1a7f8a7be..656b1323d49 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -5,6 +5,9 @@ repos: - id: check-yaml args: [--allow-multiple-documents, --unsafe] - id: end-of-file-fixer + - id: trailing-whitespace + # FIXME: these autogenerate files contain trailing whitespace. Need to fix generator. + exclude: 'platform/android/MapLibreAndroid/src/main/java/org/maplibre/android/(location/LocationIndicatorLayer|style/layers/PropertyFactory)\.java' - repo: https://github.com/pre-commit/mirrors-clang-format rev: v19.1.4 hooks: @@ -35,4 +38,3 @@ repos: ci: # sometimes fails https://github.com/keith/pre-commit-buildifier/issues/13 skip: [buildifier] - diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md index b5742061a6b..56733bf177a 100644 --- a/ARCHITECTURE.md +++ b/ARCHITECTURE.md @@ -14,7 +14,7 @@ In the repository, core C++ code is contained in the `include` and `src` directo ## Platform specific code -Code and build scripts belonging to platform SDKs are contained in the `platform` directory, which has subdirectories for each platform. +Code and build scripts belonging to platform SDKs are contained in the `platform` directory, which has subdirectories for each platform. - `platform/darwin` and `platform/default` directories contain code shared by multiple platform SDKs. - `platform/ios` and `platform/macos` - the SDKs for Apple's operating systems, forked from https://github.com/mapbox/mapbox-gl-native-ios/commit/a139216 (mapbox hosted both iOS and MacOS SDKs in the same project). diff --git a/CMakeLists.txt b/CMakeLists.txt index 049d8915627..a2e863fa511 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -26,8 +26,8 @@ if (MLN_WITH_CLANG_TIDY) else() message(STATUS "Found clang-tidy at ${CLANG_TIDY_COMMAND}") endif() - # TODO: there are options which are only available on GCC(e.g. -Werror=maybe-uninitialized), - # that's why we need to disable this `unknown-warning-option` here. + # TODO: there are options which are only available on GCC(e.g. -Werror=maybe-uninitialized), + # that's why we need to disable this `unknown-warning-option` here. # We could check if current compiler supports particular flag before enabling it. set(CLANG_TIDY_COMMAND "${CLANG_TIDY_COMMAND};--extra-arg=-Wno-unknown-warning-option;--extra-arg=-Wno-pragmas") endif() @@ -997,7 +997,7 @@ list(APPEND SRC_FILES ${PROJECT_SOURCE_DIR}/src/mbgl/util/tile_cover_impl.cpp ${PROJECT_SOURCE_DIR}/src/mbgl/util/tile_cover_impl.hpp ${PROJECT_SOURCE_DIR}/src/mbgl/util/tile_range.hpp - ${PROJECT_SOURCE_DIR}/src/mbgl/util/default_style.cpp + ${PROJECT_SOURCE_DIR}/src/mbgl/util/default_style.cpp ${PROJECT_SOURCE_DIR}/src/mbgl/util/tile_server_options.cpp ${PROJECT_SOURCE_DIR}/src/mbgl/util/tiny_sdf.cpp ${PROJECT_SOURCE_DIR}/src/mbgl/util/tiny_sdf.hpp @@ -1020,7 +1020,7 @@ if(MLN_WITH_OPENGL) "MLN_DRAWABLE_RENDERER=$" "MLN_USE_UNORDERED_DENSE=$" ) - list(APPEND + list(APPEND INCLUDE_FILES ${PROJECT_SOURCE_DIR}/include/mbgl/gl/renderable_resource.hpp ${PROJECT_SOURCE_DIR}/include/mbgl/gl/renderer_backend.hpp @@ -1085,7 +1085,7 @@ if(MLN_WITH_OPENGL) ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/gl/symbol_sdf_text.hpp ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/gl/symbol_text_and_icon.hpp ) - list(APPEND + list(APPEND SRC_FILES ${PROJECT_SOURCE_DIR}/src/mbgl/gl/attribute.cpp ${PROJECT_SOURCE_DIR}/src/mbgl/gl/attribute.hpp @@ -1192,7 +1192,7 @@ if(MLN_WITH_METAL) PUBLIC "MLN_USE_UNORDERED_DENSE=$" ) - list(APPEND + list(APPEND INCLUDE_FILES ${PROJECT_SOURCE_DIR}/include/mbgl/mtl/buffer_resource.hpp ${PROJECT_SOURCE_DIR}/include/mbgl/mtl/command_encoder.hpp @@ -1231,7 +1231,7 @@ if(MLN_WITH_METAL) ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/mtl/shader_program.hpp ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/mtl/symbol.hpp ) - list(APPEND + list(APPEND SRC_FILES ${PROJECT_SOURCE_DIR}/src/mbgl/mtl/buffer_resource.cpp ${PROJECT_SOURCE_DIR}/src/mbgl/mtl/command_encoder.cpp @@ -1274,7 +1274,7 @@ if(MLN_WITH_METAL) if (METAL_FRAMEWORK) target_link_libraries(mbgl-core PRIVATE ${METAL_FRAMEWORK}) endif() - + endif() if(MLN_WITH_VULKAN) @@ -1286,7 +1286,7 @@ if(MLN_WITH_VULKAN) MLN_RENDER_BACKEND_VULKAN=1 ) - list(APPEND + list(APPEND INCLUDE_FILES ${PROJECT_SOURCE_DIR}/include/mbgl/vulkan/buffer_resource.hpp ${PROJECT_SOURCE_DIR}/include/mbgl/vulkan/command_encoder.hpp @@ -1327,7 +1327,7 @@ if(MLN_WITH_VULKAN) ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/vulkan/widevector.hpp ) - list(APPEND + list(APPEND SRC_FILES ${PROJECT_SOURCE_DIR}/src/mbgl/vulkan/buffer_resource.cpp ${PROJECT_SOURCE_DIR}/src/mbgl/vulkan/command_encoder.cpp @@ -1370,7 +1370,7 @@ if(MLN_WITH_VULKAN) endif() if(MLN_DRAWABLE_RENDERER) - list(APPEND + list(APPEND SRC_FILES ${PROJECT_SOURCE_DIR}/src/mbgl/style/layers/custom_drawable_layer.cpp ${PROJECT_SOURCE_DIR}/src/mbgl/layermanager/custom_drawable_layer_factory.cpp diff --git a/FORK.md b/FORK.md index 7eae33e2487..bcaab55405f 100644 --- a/FORK.md +++ b/FORK.md @@ -5,7 +5,7 @@ MapLibre Native is a community led fork derived from [mapbox-gl-native](https:// Beside merging in platform specific SDKs, the following changes were made compared to original mapbox projects: * The code was upgraded so that it can be built using latest clang compiler / Xcode 12. -* CI/CD was migrated from CircleCI to GitHub Actions. +* CI/CD was migrated from CircleCI to GitHub Actions. * Along with GitHub releases, binaries are distributed as follows: * The iOS binaries distribution was upgraded from fat packages to Swift package containing XCFramework. * The Android binaries are distributed to GitHub maven package repository. diff --git a/LICENSES.core.md b/LICENSES.core.md index 25d402398c8..3d876461c48 100644 --- a/LICENSES.core.md +++ b/LICENSES.core.md @@ -391,7 +391,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ### [wagyu](https://github.com/mapbox/wagyu.git) by Angus Johnson and Mapbox ``` -Parts of the code in the Wagyu Library are derived from the version of the +Parts of the code in the Wagyu Library are derived from the version of the Clipper Library by Angus Johnson listed below. Author : Angus Johnson @@ -399,8 +399,8 @@ Version : 6.4.0 Date : 2 July 2015 Website : http://www.angusj.com -Copyright for portions of the derived code in the Wagyu library are held -by Angus Johnson, 2010-2015. All other copyright for the Wagyu Library are held by +Copyright for portions of the derived code in the Wagyu library are held +by Angus Johnson, 2010-2015. All other copyright for the Wagyu Library are held by Mapbox, 2016. This code is published in accordance with, and retains the same license as the Clipper Library by Angus Johnson. @@ -499,8 +499,8 @@ DEALINGS IN THE SOFTWARE. ### [RapidJSON](https://rapidjson.org) by THL A29 Limited, a Tencent company, and Milo Yip ``` -Tencent is pleased to support the open source community by making RapidJSON available. - +Tencent is pleased to support the open source community by making RapidJSON available. + Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved. If you have downloaded a copy of the RapidJSON binary from Tencent, please note that the RapidJSON binary is licensed under the MIT License. @@ -512,13 +512,13 @@ Other dependencies and licenses: Open Source Software Licensed Under the BSD License: -------------------------------------------------------------------- -The msinttypes r29 -Copyright (c) 2006-2013 Alexander Chemeris +The msinttypes r29 +Copyright (c) 2006-2013 Alexander Chemeris All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: -* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. +* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. @@ -527,7 +527,7 @@ THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY EXPR Open Source Software Licensed Under the JSON License: -------------------------------------------------------------------- -json.org +json.org Copyright (c) 2002 JSON.org All Rights Reserved. @@ -535,7 +535,7 @@ JSON_checker Copyright (c) 2002 JSON.org All Rights Reserved. - + Terms of the JSON License: --------------------------------------------------- diff --git a/README.md b/README.md index 26df2071c1f..2ea8f2f7a41 100644 --- a/README.md +++ b/README.md @@ -173,7 +173,7 @@ MapLibre Native can also be built on [Linux](platform/linux/README.md), [Windows ## Contributing -> [!NOTE] +> [!NOTE] > This section is only relevant for people who want to contribute to MapLibre Native. MapLibre Native has at its core a C++ library. This is where the bulk of development is currently happening. diff --git a/SECURITY.md b/SECURITY.md index a03f85bd0d7..2a06a480669 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -4,7 +4,7 @@ The maintainers of MapLibre Native are committed to a fast and efficient resolution of critical security vulnerabilities. We aim to get back to you within 24 hours of creating the report. However, we cannot guarantee this. Luckily, vulnerabilities can be reported, fixed, merged, and released by anyone with write access (committers). -1. `[Reporter]` To report a critical security vulnerability in MapLibre Native, create a [security advisory](https://github.com/maplibre/maplibre-native/security/advisories/new). +1. `[Reporter]` To report a critical security vulnerability in MapLibre Native, create a [security advisory](https://github.com/maplibre/maplibre-native/security/advisories/new). 2. `[Reporter or Maintainer]` A private fork will be created. You can add collaborators that you believe will be able to help work on a fix. diff --git a/design-proposals/2022-09-02-kotlin.md b/design-proposals/2022-09-02-kotlin.md index de1adfb54df..8de00a126ee 100644 --- a/design-proposals/2022-09-02-kotlin.md +++ b/design-proposals/2022-09-02-kotlin.md @@ -2,10 +2,10 @@ ## Motivation 10 years ago, [JetBrains released Kotlin](https://blog.jetbrains.com/kotlin/2011/07/hello-world-2/) -5 years ago, [Android got support for Kotlin](https://android-developers.googleblog.com/2017/05/android-announces-support-for-kotlin.html) +5 years ago, [Android got support for Kotlin](https://android-developers.googleblog.com/2017/05/android-announces-support-for-kotlin.html) 3 years ago, [Android became Kotlin-first](https://developer.android.com/kotlin/first) -The argument for Kotlin over Java is typically along the lines of Kotlin being an "easier" language than Java. Practically, this shows in Kotlin being less verbose, so fewer lines of code to make errors in. It also has static typing instead of strong typing so many types are inferred, and lastly, it has a Null type which avoids all the common NullPointer exceptions. +The argument for Kotlin over Java is typically along the lines of Kotlin being an "easier" language than Java. Practically, this shows in Kotlin being less verbose, so fewer lines of code to make errors in. It also has static typing instead of strong typing so many types are inferred, and lastly, it has a Null type which avoids all the common NullPointer exceptions. Kotlin seems like a natural successor language to java, because it brings some advantages with no real downsides. It has full interoperability allowing us to port files 1-1. @@ -21,7 +21,7 @@ No modifications are planned. ## Migration Plan and Compatibility Full backward compatibility - + ## Rejected Alternatives The alternative is that we go forward with java, meaning that we effectively should port our existing kotlin code to java, which I can't find evidence of any project ever attempting. diff --git a/design-proposals/2022-10-27-rendering-modularization.md b/design-proposals/2022-10-27-rendering-modularization.md index 92af862849e..4f8279df9cf 100644 --- a/design-proposals/2022-10-27-rendering-modularization.md +++ b/design-proposals/2022-10-27-rendering-modularization.md @@ -4,7 +4,7 @@ Before we dive in, a bit about our process. Stamen Design, with a sub-contract We started with a sparse proposal, laying out the goals first. Our intent was to let the MapLibre community add their own feedback and discussion. We have finished our update to the PR and now look for more formal feedback on the way to adoption of the design. -The mechanism for this will be a Pull Request, which we have obviously opened. This will result in as much discussion as the community would like here, on the OSM Slack and by email or video call (we're available, so reach out). As we wrap up our specific proposal, that discussion will hopefully reach a consensus and we'll be ready for a Yes or No on the PR by the 21st of November. +The mechanism for this will be a Pull Request, which we have obviously opened. This will result in as much discussion as the community would like here, on the OSM Slack and by email or video call (we're available, so reach out). As we wrap up our specific proposal, that discussion will hopefully reach a consensus and we'll be ready for a Yes or No on the PR by the 21st of November. Then we do it again for Metal. @@ -65,7 +65,7 @@ It is useful to split our goals into three sections to articulate what this prop _Addresses core functionality [#1](#core) and [#2](#core)._ -We need an external representation for programs (shaders) so they can be added or replaced by developers. +We need an external representation for programs (shaders) so they can be added or replaced by developers. Internally to the toolkit shaders are called Programs, but that's far too confusing at this level. Are we referring to a GPU program or a program the user writes? Best to stick with the term shader. @@ -73,7 +73,7 @@ The shaders need a representation visible outside the toolkit and we need to cha #### The way it is now -Individual shaders are represented by an object class with massive amounts of template logic and a minimum of in-line comments. They’re opaque from the outside and only controllable through vector tile data and styles. +Individual shaders are represented by an object class with massive amounts of template logic and a minimum of in-line comments. They’re opaque from the outside and only controllable through vector tile data and styles. The [render_raster_layer](https://github.com/maplibre/maplibre-native/blob/main/src/mbgl/renderer/layers/render_raster_layer.cpp), as an example, asks for the instantiation of (eventually) RasterProgram. Rather than having the source for the program, that then pokes into a compressed chunk of memory that contains the source, which is then uncompressed and fed into OpenGL for compilation. @@ -96,7 +96,7 @@ We'll be able to: #### For GLES we’ll need to: - Push aside the existing Program hierarchy and rename it with a GLES extension. -- Allow for named uniforms for new Programs. +- Allow for named uniforms for new Programs. We can probably ignore that requirement for the existing shaders and just wrap them ### Shader(Program) Registry @@ -134,7 +134,7 @@ Modern graphics pipelines use more than one pass to create a visual representati Without getting too deep into specifics, early rendering passes allow the developer to use the power of the rasterizer for their own data. Later rendering passes are typically used to decorate the map with effects. #### The way it is now: -The [low level rendering logic](https://github.com/maplibre/maplibre-native/blob/main/src/mbgl/renderer/renderer_impl.cpp) in the toolkit seems to only support one explicit rendering pass. +The [low level rendering logic](https://github.com/maplibre/maplibre-native/blob/main/src/mbgl/renderer/renderer_impl.cpp) in the toolkit seems to only support one explicit rendering pass. However, there is the [RenderPass](https://github.com/maplibre/maplibre-native/blob/main/src/mbgl/gl/render_pass.hpp) so some notion of this exists in the toolkit, but it's not clear how complete that is. It may depend on ordering to work things out, rather than the explicit command buffer filling and fences we would use in a more modern approach. @@ -207,7 +207,7 @@ Which is to say that Drawable is a good concept which can encapsulate a lot of c To keep the Drawable somewhat manageable, we added the concept of a Drawable Builder. This is an object that you throw geometry at in a somewhat disordered way and it emits Drawables when you’re done. MapLibre's [Buckets](https://github.com/maplibre/maplibre-native/blob/main/src/mbgl/renderer/bucket.hpp) are similar, but not quite the same. Perhaps they'll be adaptable. We'll see. -Drawables and Builders have a subclass for each supported rendering SDK. One mistake we won’t bring over is using multiple inheritance for that. You’re welcome. +Drawables and Builders have a subclass for each supported rendering SDK. One mistake we won’t bring over is using multiple inheritance for that. You’re welcome. It’s kind of obvious why you’d have a subclass of Drawable for each SDK. You want to let the SDK represent data the way it wants (interleaved or not, 16 bit or 32 bit floats, all sorts of things), but it’s less obvious why the Builders need one subclass per SDK. @@ -258,21 +258,21 @@ The shared Drawable super-class would contain core functionality across all plat In any case the Drawable acts as a basic container that is handed around between the parts of the system that build things and the part that renders things. Each SDK specific Drawable subclass will do things like: -- Upload/Bind their data to the SDK. +- Upload/Bind their data to the SDK. Ideally this can happen on non-rendering threads, but you never know. This includes figuring out what the shader is asking for and providing it, or convincing defaults. The way MapLibre Native does this now is a bit static, with templates. Clever, but perhaps too clever. It’s okay to wire things up dynamically. -- Draw directly. +- Draw directly. OpenGL is big on this. You have to set things up, draw, then tear them down. It has the virtue of being simple. If you’re making changes, you just do them directly. -- Draw indirectly. +- Draw indirectly. Metal does this. You add your data to a command buffer where it may be drawn for many frames. This is the fastest and best way to do things, but there are updates you must make between frames. Obviously, the overall map state needs to be updated, otherwise you’re just redrawing in the same way each time. Sometimes Drawable specific state changes too and data driven rendering will come into play here. -- Update for frame. +- Update for frame. If you’re drawing indirectly, this is all the state that must be changed for a given frame. Some of this is shared, like the map state (e.g. the matrix controlling positioning, lighting and so forth). Some can be specific to a particular Drawable. Data driven visuals may fall into this category depending on what the data is.
Just to make this even more fun, modern renderers are going to have multiple frames in flight at any given time. So you can’t just keep one set of values and update them periodically. My preferred approach is to put memory copy commands into a command buffer with guard logic between them. In Metal, anyway. Vulkan will have its own way to do that and OpenGL just doesn't. Well, there's probably an extension somewhere that does, but it's very hard to use and sparsely supported. -- Tear down their data. +- Tear down their data. Pretty simple for OpenGL, but with Metal when you’re using heaps (and you should) you actually want another thread to do this. Thus it’s SDK specific. Now there is already logic to do a lot of this spread throughout various classes in MapLibre Native. Buckets have some of it, Programs actually own the draw() method, and so forth. To switch to this approach we'll need to cut across the gl and gfx levels of the toolkit, even a bit higher, to capture everything that builds geometry. We'll need to convert that over to this approach and make sure we didn't miss anything, like all the fiddly per-program state. diff --git a/design-proposals/2022-11-29-metal-port.md b/design-proposals/2022-11-29-metal-port.md index a89e23f9fc5..6b7be83c8b2 100644 --- a/design-proposals/2022-11-29-metal-port.md +++ b/design-proposals/2022-11-29-metal-port.md @@ -2,13 +2,13 @@ Before we dive in, a bit about our process. Stamen Design, with a sub-contract to Wet Dog Weather, has been contracted by Amazon (AWS) to develop two proposals to upgrade MapLibre Native. The first was the Rendering Modularization Proposal. This one is the Metal Port. -The mechanism for this will be a Pull Request, which we have obviously opened. This will result in as much discussion as the community would like here, on the OSM Slack and by email or video call (we're available, so reach out). As we wrap up our specific proposal, that discussion will hopefully reach a consensus and we'll be ready for a Yes or No on the PR by the end of the year. +The mechanism for this will be a Pull Request, which we have obviously opened. This will result in as much discussion as the community would like here, on the OSM Slack and by email or video call (we're available, so reach out). As we wrap up our specific proposal, that discussion will hopefully reach a consensus and we'll be ready for a Yes or No on the PR by the end of the year. This proposal is to implement a rendering module as defined in the earlier Rendering Modularization proposal. Some of those stages are reflected here directly, such as "Snapshotting". Others are spread across multiple passes in this documents. For example, the Shader Registry from the Modularization proposal is directly referenced but will be used in each of the Shader related passes. ## Motivation -MapLibre Native is currently depending on a deprecated rendering SDK (OpenGL) for iOS. It needs to move to Metal for iOS in some form. Thus the graphics implementations must diverge, either by doing so within MapLibre Native or depending on another toolkit to do the rendering entirely. +MapLibre Native is currently depending on a deprecated rendering SDK (OpenGL) for iOS. It needs to move to Metal for iOS in some form. Thus the graphics implementations must diverge, either by doing so within MapLibre Native or depending on another toolkit to do the rendering entirely. We are proposing the former approach, with support for multiple rendering SDKs in the MapLibre Native toolkit itself. That is discussed in more detail in the MapLibre Rendering Modularization Design Plan. This proposal assumes that one is adopted. @@ -42,7 +42,7 @@ It is useful to split our goals into three sections to articulate what this prop 5. Screen snapshots will not block the rendering pipeline 6. Atlases will be implemented for Metal and be accessible from any thread 7. The Metal renderer will be optimized to the best of our abilities -8. The toolkit will allow mixing of real time assets from other Metal based toolkits +8. The toolkit will allow mixing of real time assets from other Metal based toolkits ### Evaluation Metrics 1. The new version of MapLibre with Metal should support all iOS devices that support Metal @@ -55,7 +55,7 @@ It is useful to split our goals into three sections to articulate what this prop Before we dive into the specific changes we wish to make, let's discuss how software development works with one of these low level rendering SDKs. -Anyone who has worked with OpenGL knows that first you get nothing. Traditionally, it's a black screen and a lot of tweaking before the developer sees anything. And then a lot more tweaking before the developer sees anything useful. +Anyone who has worked with OpenGL knows that first you get nothing. Traditionally, it's a black screen and a lot of tweaking before the developer sees anything. And then a lot more tweaking before the developer sees anything useful. With Metal, you get crashes with error messages usually related to what you actually did. This is a huge improvement! And the debugging tools... well they do exist and they mostly work. They work better in direct mode and with smaller test cases, so we plan accordingly. When they do work, you can actually debug a shader! That's very helpful. @@ -96,7 +96,7 @@ The MapLibre Native toolkit already knows what a texture is, so this is the Meta Metal supports a whole host of texture formats that Maplibre Native doesn't (or does through extensions). There is the traditional RGBA, but there are also 32 bit float, or dual 16 bit float, or.... the list goes on and on. We want to allow support for these without losing our minds representing them. -As it stands, supporting RGBA is probably sufficient, but the utility of a good single component 16 bit texture is not to be denied and neither is the flexibility of a 32 bit floating point texture. +As it stands, supporting RGBA is probably sufficient, but the utility of a good single component 16 bit texture is not to be denied and neither is the flexibility of a 32 bit floating point texture. We should at least fill out a handful of those image types. Which ones aren't all that important, but the workflow for adding new ones is. It should be simple to add the logic for a new type, but we don't need to go so far as seamlessly converting from one to another. @@ -124,7 +124,7 @@ When the developers have a basic render loop going with drawables that do nothin After the Modularization PR is finished we'll have a representation for individual rendering passes. This is similar to what the Heatmap makes use of internally, but it'll be more explicit. -The rendering loop itself is affected by these passes. We want the output of one to feed into the input of another and we want to make sure they're rendered in the right order. +The rendering loop itself is affected by these passes. We want the output of one to feed into the input of another and we want to make sure they're rendered in the right order. As for the renderer observer, we'd like to expose each level of that as appropriate. As to why, exposing things like the command buffers at the right time allow integration of Metal compatible functionality from other toolkits. @@ -150,7 +150,7 @@ Implementing the Metal version of the basic shaders should be intermingled with For each shader, we suggest doing a straight conversion from the OpenGL. Take the GLSL source and convert it manually, ideally with comments describing the choices you made. There will be a chance to revisit the shaders in a later phase, so don't worry about efficiency quite yet. -At the end of that process, all the Builders should be fleshed out and all the Shaders should be working. +At the end of that process, all the Builders should be fleshed out and all the Shaders should be working. ### Atlases @@ -194,7 +194,7 @@ _Addresses Core Functionality [#7](#core)._ If you thought real time rendering was mostly about triangles, I have some bad news. It's more about memory management. There are two ways for handling memory in Metal (that we'll deal with), the boring way and the good way. -The boring way is to allocate Buffers and stick your geometry, indices, textures, uniforms, car keys, manifesto, and texture coordinates in them. They're just memory. You ask for how much you want, you get a handle, you copy what you need into place. You fix whatever buffer overruns you created. +The boring way is to allocate Buffers and stick your geometry, indices, textures, uniforms, car keys, manifesto, and texture coordinates in them. They're just memory. You ask for how much you want, you get a handle, you copy what you need into place. You fix whatever buffer overruns you created. Metal isn't fussy about a buffer containing vertices vs. indices vs. uniforms. Mostly. So you build a little buffer management infrastructure and alway use it. diff --git a/design-proposals/2023-06-17-android-annotations.md b/design-proposals/2023-06-17-android-annotations.md index 6506b20609e..a3f87a71351 100644 --- a/design-proposals/2023-06-17-android-annotations.md +++ b/design-proposals/2023-06-17-android-annotations.md @@ -6,7 +6,7 @@ A first approach was to simply move code from the plugins repository to `maplibre-native` (https://github.com/maplibre/maplibre-native/issues/1154), but the codebases had derived too much to be feasible on the go (there is no obvious path towards moving the new code whilst un-deprecating the deprecated methods; these two goals are incompatible). -A better idea is to create a new and improved annotations API that combines the best of both worlds. +A better idea is to create a new and improved annotations API that combines the best of both worlds. ## Proposed Change diff --git a/design-proposals/2023-11-08-complex-animatable-interactive-annotations.md b/design-proposals/2023-11-08-complex-animatable-interactive-annotations.md index 0fb81b98652..a655056f6ed 100644 --- a/design-proposals/2023-11-08-complex-animatable-interactive-annotations.md +++ b/design-proposals/2023-11-08-complex-animatable-interactive-annotations.md @@ -31,7 +31,7 @@ For this phase we would like to just build our support for bitmaps. The idea bei ### Phase 2 -Once we have a system in place that can handle bitmaps we would like to take it one step further and support native platform views. The changes described here would likely be done inside the individual platforms. +Once we have a system in place that can handle bitmaps we would like to take it one step further and support native platform views. The changes described here would likely be done inside the individual platforms. For inspiration we can look at Flutter and their rendering engine (see https://github.com/flutter/flutter/wiki/Texture-Layer-Hybrid-Composition and https://github.com/flutter/flutter/wiki/Hybrid-Composition-iOS). diff --git a/docker/README.md b/docker/README.md index 62b9896716a..de895003e97 100644 --- a/docker/README.md +++ b/docker/README.md @@ -2,10 +2,10 @@ These steps will allow you to compile code as described [platform/linux/README.md](../platform/linux/README.md) using a Docker container. All the steps should be executed from the root of the repository. -> [!IMPORTANT] +> [!IMPORTANT] > Not all platform builds are currently supported. Docker builds are a work in progress. -> [!IMPORTANT] +> [!IMPORTANT] > You cannot build MapLibre native using both Docker and host methods at the same time. If you want to switch, you need to clean the repository first, e.g. by using this command: > > ```bash @@ -19,7 +19,7 @@ You must build your own Docker image, specific with your user and group IDs to e ```bash # Build docker image from the repo __root__ # Specifying USER_UID and USER_GID allows container to create files with the same owner as the host user, -# and avoids having to pass -u $(id -u):$(id -g) to docker run. +# and avoids having to pass -u $(id -u):$(id -g) to docker run. docker build \ -t maplibre-native-image \ --build-arg USER_UID=$(id -u) \ @@ -40,4 +40,4 @@ You can also use the container to run just one specific commands, e.g. `cmake` o ```bash docker run --rm -it -v "$PWD:/app/" -v "$PWD/docker/.cache:/home/ubuntu/.cache" maplibre-native-image cmake ... -``` +``` diff --git a/docs/mdbook/src/android/README.md b/docs/mdbook/src/android/README.md index ba1fa0805db..88a0edb1b5f 100644 --- a/docs/mdbook/src/android/README.md +++ b/docs/mdbook/src/android/README.md @@ -23,7 +23,7 @@ Open the `platform/android` directory to get started. _The test application (used for development purposes) uses MapTiler vector tiles, which require a MapTiler account and API key._ -With the first Gradle invocation, Gradle will take the value of the `MLN_API_KEY` environment variable and save it to `MapLibreAndroidTestApp/src/main/res/values/developer-config.xml`. If the environment variable wasn't set, you can edit `developer-config.xml` manually and add your API key to the `api_key` resource. +With the first Gradle invocation, Gradle will take the value of the `MLN_API_KEY` environment variable and save it to `MapLibreAndroidTestApp/src/main/res/values/developer-config.xml`. If the environment variable wasn't set, you can edit `developer-config.xml` manually and add your API key to the `api_key` resource. ## Running the TestApp diff --git a/docs/mdbook/src/design/README.md b/docs/mdbook/src/design/README.md index 02dec693c00..81b337178c9 100644 --- a/docs/mdbook/src/design/README.md +++ b/docs/mdbook/src/design/README.md @@ -1,4 +1,4 @@ -> [!NOTE] +> [!NOTE] > These notes are partially outdated since the [renderer modularization](https://github.com/maplibre/maplibre-native/blob/main/design-proposals/2022-10-27-rendering-modularization.md). # Design diff --git a/docs/mdbook/src/design/android-map-rendering-data-flow.md b/docs/mdbook/src/design/android-map-rendering-data-flow.md index 4668715366e..b393d0b462b 100644 --- a/docs/mdbook/src/design/android-map-rendering-data-flow.md +++ b/docs/mdbook/src/design/android-map-rendering-data-flow.md @@ -1,6 +1,6 @@ # Android Map Rendering Data Flow -![](media/android-data-flow.jpg) +![](media/android-data-flow.jpg) *Figure 5: Simplified data flow diagram of initializing a map in Android* Figure 5 shows a simplified data flow diagram of initializing a map. The @@ -27,7 +27,7 @@ document talked about before is seen in the form of *MapRenderer*. This is an Actor that passes the rendering events from the device runtime to *MapLibre Native* renderer. -![](media/workflow-of-rendering-tiles.jpg) +![](media/workflow-of-rendering-tiles.jpg) *Figure 6: Workflow of rendering tiles* Before the frame-by-frame map rendering @@ -103,7 +103,7 @@ contains said glyphs. Sources and Layers are translated to *For the sake of restating, a layer is composed of a set of sources.* -![](media/android-rendering-map-tiles.jpg) +![](media/android-rendering-map-tiles.jpg) *Figure 7: Simplified data flow diagram of rendering map tiles* A *RenderSource* is produced from a single diff --git a/docs/mdbook/src/design/archictural-problems-and-recommendations.md b/docs/mdbook/src/design/archictural-problems-and-recommendations.md index df60e050e4b..1ead6b60ac7 100644 --- a/docs/mdbook/src/design/archictural-problems-and-recommendations.md +++ b/docs/mdbook/src/design/archictural-problems-and-recommendations.md @@ -81,10 +81,10 @@ for future improvement. This document intends to address the first. This document proposes the following component architecture for MapLibre Native to address the architectural shortcomings. -![](media/proposed-architecture-of-maplibre-gl.png) +![](media/proposed-architecture-of-maplibre-gl.png) *Figure 4: Proposed Architecture of MapLibre Native* -Proposed architecture of MapLibre Native in Figure 4 addresses the +Proposed architecture of MapLibre Native in Figure 4 addresses the aforementioned problems by: #### Modular Rendering diff --git a/docs/mdbook/src/design/coordinate-system.md b/docs/mdbook/src/design/coordinate-system.md index f26d80af8f1..4b2a6e3c500 100644 --- a/docs/mdbook/src/design/coordinate-system.md +++ b/docs/mdbook/src/design/coordinate-system.md @@ -79,7 +79,7 @@ stays the same if we move the angle across the axis of earth. Figure 2 shows rendering map tile through the rendering spaces and transformations below: -![](media/rendering-spaces-and-transformations-for-map-tiles.png) +![](media/rendering-spaces-and-transformations-for-map-tiles.png) *Figure 2: Rendering Spaces and Transformations for Map Tiles* ## World Coordinates @@ -240,13 +240,13 @@ move the 3D plane with tiles, rather moves the camera atop the defined position named center. In the rendering world, this is not the center of the 3D plane we render tiles on, rather the position of the camera.* -![](media/perspective-frustum.png) +![](media/perspective-frustum.png) *Figure 3: Perspective Frustum (Sourced from learnopengl.com)* -The benefit of tile coordinates continues here. The camera representation -we use here, to be specific the view matrix, can directly take the tile -coordinates to move the camera to a particular tile in a zoom level. -Once a tile is built, the GPU can quickly draw the same tile with different +The benefit of tile coordinates continues here. The camera representation +we use here, to be specific the view matrix, can directly take the tile +coordinates to move the camera to a particular tile in a zoom level. +Once a tile is built, the GPU can quickly draw the same tile with different bearing, pan, pitch, and zoom parameters[^15]. If we keep following Figure 2, we see we need to also add a projection diff --git a/docs/mdbook/src/design/expressions.md b/docs/mdbook/src/design/expressions.md index bbbdda92862..8c1584484e2 100644 --- a/docs/mdbook/src/design/expressions.md +++ b/docs/mdbook/src/design/expressions.md @@ -6,17 +6,17 @@ Mapbox Vector Tiles is a vector tile specification initiated by Mapbox which was later widely adopted by the geospatial community. To recap, Mapbox Vector Styles have 2 significant parts - *Sources* and *Layers*. -Sources define where the geospatial features to display the map are loaded from. +Sources define where the geospatial features to display the map are loaded from. They can be GeoJSON, Mapbox Vector Tiles (MVT) etc. We draw said features -on map using *Layers*. - -A *Layer* references a single source. This is where expressions kick in. -Expressions define how the data from a source will be painted in a layer -following a style. For example, a heatmap, requires the ability to paint -features in different zoom levels with different colors. Expressions -facilitate that. The rendering depends on the style of the layer along with -pitch, bearing, and zoom of the map. This was called *Data Driven Styling (DDS)*. -Another option that was used was to completely change the style in run time to +on map using *Layers*. + +A *Layer* references a single source. This is where expressions kick in. +Expressions define how the data from a source will be painted in a layer +following a style. For example, a heatmap, requires the ability to paint +features in different zoom levels with different colors. Expressions +facilitate that. The rendering depends on the style of the layer along with +pitch, bearing, and zoom of the map. This was called *Data Driven Styling (DDS)*. +Another option that was used was to completely change the style in run time to achieve the same outcome[^17]. The desire of being able to render a layer in different zoom levels @@ -43,7 +43,7 @@ a text field fixed text `hello world` for all features in a vector source: } ``` -If we wanted it instead to display the name property of each feature, +If we wanted it instead to display the name property of each feature, we can use an expression like this: ```json @@ -58,8 +58,8 @@ expression: { "text-field": ["concat", "Hello, ", ["get", "name"]] } ``` -By now, you probably have figured it out that expressions use a JSON-like -syntax to define. For brevity, let's look at the construction of an example +By now, you probably have figured it out that expressions use a JSON-like +syntax to define. For brevity, let's look at the construction of an example expression below: ``` @@ -91,13 +91,13 @@ extending expressions library with custom expressions if desired. In the example expression, we saw how one expression is defined. The example also shows that expressions have types. Expression language can accept input and output types of null, number, string, boolean, color, -object, value, array, error, collator, and formatted. The canonical -definition of Expressions is rooted in JSON. Like JSON, `object` type +object, value, array, error, collator, and formatted. The canonical +definition of Expressions is rooted in JSON. Like JSON, `object` type is the mapping key type that maps a set of *keys* to *values*. Beside the aforementioned data types, Expressions offer built-in functions -or operators such as assertion, coalesce, interpolate, distance etc. -The code uses the word *kind* to differentiate between these. +or operators such as assertion, coalesce, interpolate, distance etc. +The code uses the word *kind* to differentiate between these. Each *kind* of expression performs a single responsibility. *Assertion expressions* assert the returning type from one expression is @@ -106,10 +106,10 @@ of `["get", "feature_property"]`, returns a generic *value* type. To use it on another expression that accepts a string type, an assertion such as `["string", ["get", "feature_property"]]` is necessary. Assertion throws an evaluation-time error if the types don't match -during evaluation. +during evaluation. -You might think this is a *coercion* instead of an *assertion*. If you are -seeking for coercions, read the upcoming paragraph. Expression names +You might think this is a *coercion* instead of an *assertion*. If you are +seeking for coercions, read the upcoming paragraph. Expression names that looks like `to-something` are coercions by convention. *Coercion expressions* convert a return type to another type. It also diff --git a/docs/mdbook/src/design/geometry-tile-worker.md b/docs/mdbook/src/design/geometry-tile-worker.md index 12c618b3d1b..d0287d69010 100644 --- a/docs/mdbook/src/design/geometry-tile-worker.md +++ b/docs/mdbook/src/design/geometry-tile-worker.md @@ -1,6 +1,6 @@ # Geometry Tile Worker -![](media/geometry-tile-worker-state-machine.jpg) +![](media/geometry-tile-worker-state-machine.jpg) *Figure 8: Simplified Geometry Tile Worker State Machine* Going back to Geometry Tile Worker, it is diff --git a/docs/mdbook/src/design/ten-thousand-foot-view.md b/docs/mdbook/src/design/ten-thousand-foot-view.md index eb1164c6e7a..5cbdd9f5db0 100644 --- a/docs/mdbook/src/design/ten-thousand-foot-view.md +++ b/docs/mdbook/src/design/ten-thousand-foot-view.md @@ -1,6 +1,6 @@ # Ten Thousand Foot View -![](media/ten-thousand-foot-view-diagram.png) +![](media/ten-thousand-foot-view-diagram.png) *Figure 1: MapLibre Native Components – Ten Thousand Foot view* From ten thousand foot, MapLibre Native is composed of *Map View* and a @@ -32,7 +32,7 @@ To summarize: composed of multiple *layers*. 5. A ***Layer*** requires ***Style***, ***Glyphs***, and ***Sprites*** - for to be ready for rendering. Features rendered in a ***Layer*** + for to be ready for rendering. Features rendered in a ***Layer*** come from data sources. And a ***Layer*** is composed of tiles produced from said features. @@ -109,19 +109,19 @@ characters[^5]. Map tiles use labels of text to show name of cities, administrative boundaries, or street names. Map tiles also need to show icons for amenities like bus stops and parks. A map style uses character map from fonts to display labels and icons. Collectively these are -called *glyphs.* +called *glyphs.* -*Glyphs* require resizing, rotation, and a halo for clarity in nearly every -interaction with the map. To achieve this, all *glyphs* are pre-rendered +*Glyphs* require resizing, rotation, and a halo for clarity in nearly every +interaction with the map. To achieve this, all *glyphs* are pre-rendered in a shared texture, called *texture atlas*. This atlas is packed inside protobuf container. Each element of the atlas is an individual texture representing the SDF of the character to render. Each *glyph* bitmap inside is a field of floats, named signed distance. It -represents how a *glyph* should be drawn by the GPU. Each *glyph* is of font +represents how a *glyph* should be drawn by the GPU. Each *glyph* is of font size 24 that stores the distance to the next outline in every pixel. Easily put if the pixel is inside the *glyph* outline it has a value between `192-255`. -Every pixel outside the *glyph* outline has a value between `0-191`. This creates +Every pixel outside the *glyph* outline has a value between `0-191`. This creates a black and white atlas of all the *glyphs* inside. This document currently does not have a dedicated section on text rendering. @@ -193,7 +193,7 @@ check [Geometry Tile Worker](./geometry-tile-worker.md) chapter. ______________ [^1]: To read in depth about the data flow for map initialization and - rendering in Android, please check + rendering in Android, please check [Android Map Rendering Data Flow](./android-map-rendering-data-flow.md) [^2]: This document speaks of a simplified configuration for brevity. diff --git a/docs/mdbook/src/introduction.md b/docs/mdbook/src/introduction.md index 43db78c31c5..e37c4a3e13b 100644 --- a/docs/mdbook/src/introduction.md +++ b/docs/mdbook/src/introduction.md @@ -1,7 +1,7 @@ # Introduction -*[MapLibre Native](https://github.com/maplibre/maplibre-native)* is a community led fork of *Mapbox GL Native*. It's a C++ library that powers -vector maps in native applications on multiple platforms by taking stylesheets that conform to the *[MapLibre Style Specification](https://maplibre.org/maplibre-style-spec/)*, a fork of the +*[MapLibre Native](https://github.com/maplibre/maplibre-native)* is a community led fork of *Mapbox GL Native*. It's a C++ library that powers +vector maps in native applications on multiple platforms by taking stylesheets that conform to the *[MapLibre Style Specification](https://maplibre.org/maplibre-style-spec/)*, a fork of the Mapbox Style Spec. Since it is derived from Mapbox's original work it also uses *Mapbox Vector Tile Specification* as its choice of vector tile format. This documentation is intended for developers of MapLibre Native. If you are interested in *using* MapLibre Native, check out the [main `README.md`](https://github.com/maplibre/maplibre-native?tab=readme-ov-file#maplibre-native) on GitHub. diff --git a/docs/mdbook/src/ios/README.md b/docs/mdbook/src/ios/README.md index 4a6306bc28a..a8671a1fec4 100644 --- a/docs/mdbook/src/ios/README.md +++ b/docs/mdbook/src/ios/README.md @@ -4,7 +4,7 @@ [Bazel](https://bazel.build/) is used for building on iOS. -You can generate an Xcode project thanks to [rules_xcodeproj](https://github.com/MobileNativeFoundation/rules_xcodeproj) intergration. +You can generate an Xcode project thanks to [rules_xcodeproj](https://github.com/MobileNativeFoundation/rules_xcodeproj) intergration. You need to install [bazelisk](https://github.com/bazelbuild/bazelisk), which is a wrapper around Bazel which ensures that the version specified in `.bazelversion` is used. @@ -37,14 +37,14 @@ bazel run //platform/ios:xcodeproj --@rules_xcodeproj//xcodeproj:extra_common_fl xed platform/ios/MapLibre.xcodeproj ``` -Then once in Xcode, click on "MapLibre" on the left, then "App" under Targets, then "Signing & Capabilities" in the tabbed menu. +Then once in Xcode, click on "MapLibre" on the left, then "App" under Targets, then "Signing & Capabilities" in the tabbed menu. Confirm that no errors are shown. image Try to run the example App in the simulator and on a device to confirm your setup works. -> [!IMPORTANT] +> [!IMPORTANT] > The Bazel configuration files are the source of truth of the build configuration. All changes to the build settings need to be done through Bazel, not in Xcode. ### Troubleshooting diff --git a/docs/mdbook/src/ios/release.md b/docs/mdbook/src/ios/release.md index 8d32e998da0..d550ccf906f 100644 --- a/docs/mdbook/src/ios/release.md +++ b/docs/mdbook/src/ios/release.md @@ -30,4 +30,4 @@ gh workflow run ios-ci.yml -f release=pre --ref main Or run the workflow from the Actions tab on GitHub. -The items under the `## main` heading in `platform/ios/CHANGELOG.md` will be used as changelog for the pre-release. +The items under the `## main` heading in `platform/ios/CHANGELOG.md` will be used as changelog for the pre-release. diff --git a/docs/mdbook/src/release-policy.md b/docs/mdbook/src/release-policy.md index 5ab6e07baf6..067fe66d6d0 100644 --- a/docs/mdbook/src/release-policy.md +++ b/docs/mdbook/src/release-policy.md @@ -1,6 +1,6 @@ # Release Policy -> [!NOTE] +> [!NOTE] > The following release policiy applies specifically to MapLibre **Android** and MapLibre **iOS**. - We use [semantic versioning](https://semver.org/). Breaking changes will always result in a major release. @@ -9,7 +9,7 @@ - The release process is automated and documented (see [Release MapLibre iOS](./ios/release.md) and [Release MapLibre Android](./android/release.md)). Anyone with write access should be able to push out a release. - There is no fixed release cadence, but you are welcome to request a release on any of the communication channels. - We do not have long-term support (LTS) releases. -- If you need a feature or a bugfix ported to and old version of MapLibre, you need to do the backporting yourself (see steps below). +- If you need a feature or a bugfix ported to and old version of MapLibre, you need to do the backporting yourself (see steps below). ## Backporting diff --git a/include/mbgl/shaders/gl/drawable_custom_symbol_icon.hpp b/include/mbgl/shaders/gl/drawable_custom_symbol_icon.hpp index 1c20df7a55b..05c3c114874 100644 --- a/include/mbgl/shaders/gl/drawable_custom_symbol_icon.hpp +++ b/include/mbgl/shaders/gl/drawable_custom_symbol_icon.hpp @@ -47,7 +47,7 @@ void main() { // make anchor relative to (0.5, 0.5) and corners in range (-1, -1) to (1, 1) vec2 anchor = (u_anchor - vec2(0.5, 0.5)) * 2.0; - // decode center + // decode center vec2 center = floor(a_pos * 0.5); // rotate extrusion around anchor diff --git a/include/mbgl/shaders/mtl/common.hpp b/include/mbgl/shaders/mtl/common.hpp index 4e20dc9313c..f9d1bfbab2f 100644 --- a/include/mbgl/shaders/mtl/common.hpp +++ b/include/mbgl/shaders/mtl/common.hpp @@ -118,12 +118,12 @@ struct alignas(16) GPUExpression { uint16_t stopCount; GPUOptions options; GPUInterpType interpolation; - + union InterpOptions { struct Exponential { float base; } exponential; - + struct Bezier { float x1; float y1; @@ -131,14 +131,14 @@ struct alignas(16) GPUExpression { float y2; } bezier; } interpOptions; - + float inputs[maxExprStops]; - + union Stops { float floats[maxExprStops]; float2 colors[maxExprStops]; } stops; - + float eval(float zoom) device const { const auto effectiveZoom = (options & GPUOptions::IntegerZoom) ? floor(zoom) : zoom; const auto index = find(effectiveZoom); diff --git a/include/mbgl/shaders/mtl/fill.hpp b/include/mbgl/shaders/mtl/fill.hpp index cc908d3d8bd..43da9b16da9 100644 --- a/include/mbgl/shaders/mtl/fill.hpp +++ b/include/mbgl/shaders/mtl/fill.hpp @@ -21,7 +21,7 @@ enum { struct alignas(16) FillDrawableUBO { /* 0 */ float4x4 matrix; - + // Interpolations /* 64 */ float color_t; /* 68 */ float opacity_t; @@ -36,7 +36,7 @@ static_assert(sizeof(FillDrawableUBO) == 5 * 16, "wrong size"); struct alignas(16) FillOutlineDrawableUBO { /* 0 */ float4x4 matrix; - + // Interpolations /* 64 */ float outline_color_t; /* 68 */ float opacity_t; @@ -54,7 +54,7 @@ struct alignas(16) FillPatternDrawableUBO { /* 64 */ float2 pixel_coord_upper; /* 72 */ float2 pixel_coord_lower; /* 80 */ float tile_ratio; - + // Interpolations /* 84 */ float pattern_from_t; /* 88 */ float pattern_to_t; @@ -81,7 +81,7 @@ struct alignas(16) FillOutlinePatternDrawableUBO { /* 64 */ float2 pixel_coord_upper; /* 72 */ float2 pixel_coord_lower; /* 80 */ float tile_ratio; - + // Interpolations /* 84 */ float pattern_from_t; /* 88 */ float pattern_to_t; diff --git a/include/mbgl/shaders/mtl/fill_extrusion.hpp b/include/mbgl/shaders/mtl/fill_extrusion.hpp index 0ac9350ebd4..a24c6900a8c 100644 --- a/include/mbgl/shaders/mtl/fill_extrusion.hpp +++ b/include/mbgl/shaders/mtl/fill_extrusion.hpp @@ -22,7 +22,7 @@ struct alignas(16) FillExtrusionDrawableUBO { /* 72 */ float2 pixel_coord_lower; /* 80 */ float height_factor; /* 84 */ float tile_ratio; - + // Interpolations /* 88 */ float base_t; /* 92 */ float height_t; @@ -299,7 +299,7 @@ FragmentStage vertex vertexMain(thread const VertexStage vertx [[stage_in]], const float2 pos = normal.x == 1.0 && normal.y == 0.0 && normal.z == 16384.0 ? float2(vertx.pos) // extrusion top : float2(edgedistance, z * drawable.height_factor); // extrusion side - + float4 lighting = float4(0.0, 0.0, 0.0, 1.0); float directional = clamp(dot(normal / 16383.0, props.light_position_base.xyz), 0.0, 1.0); directional = mix((1.0 - props.light_intensity), max((0.5 + props.light_intensity), 1.0), directional); @@ -314,7 +314,7 @@ FragmentStage vertex vertexMain(thread const VertexStage vertx [[stage_in]], lighting.rgb += clamp(directional * props.light_color_pad.rgb, mix(float3(0.0), float3(0.3), 1.0 - props.light_color_pad.rgb), float3(1.0)); lighting *= props.opacity; - + return { .position = position, .lighting = lighting, diff --git a/include/mbgl/shaders/mtl/hillshade.hpp b/include/mbgl/shaders/mtl/hillshade.hpp index f51f4b7a7ad..b50b34fd6e8 100644 --- a/include/mbgl/shaders/mtl/hillshade.hpp +++ b/include/mbgl/shaders/mtl/hillshade.hpp @@ -66,13 +66,13 @@ struct FragmentStage { FragmentStage vertex vertexMain(thread const VertexStage vertx [[stage_in]], device const uint32_t& uboIndex [[buffer(idGlobalUBOIndex)]], device const HillshadeDrawableUBO* drawableVector [[buffer(idHillshadeDrawableUBO)]]) { - + device const HillshadeDrawableUBO& drawable = drawableVector[uboIndex]; const float4 position = drawable.matrix * float4(float2(vertx.pos), 0, 1); float2 pos = float2(vertx.texture_pos) / 8192.0; pos.y = 1.0 - pos.y; - + return { .position = position, .pos = pos, diff --git a/include/mbgl/shaders/mtl/line.hpp b/include/mbgl/shaders/mtl/line.hpp index 5ca7dcb78dc..0aea5974115 100644 --- a/include/mbgl/shaders/mtl/line.hpp +++ b/include/mbgl/shaders/mtl/line.hpp @@ -23,7 +23,7 @@ enum { struct alignas(16) LineDrawableUBO { /* 0 */ float4x4 matrix; /* 64 */ float ratio; - + // Interpolations /* 68 */ float color_t; /* 72 */ float blur_t; @@ -42,7 +42,7 @@ static_assert(sizeof(LineDrawableUBO) == 6 * 16, "wrong size"); struct alignas(16) LineGradientDrawableUBO { /* 0 */ float4x4 matrix; /* 64 */ float ratio; - + // Interpolations /* 68 */ float blur_t; /* 72 */ float opacity_t; @@ -61,7 +61,7 @@ static_assert(sizeof(LineGradientDrawableUBO) == 6 * 16, "wrong size"); struct alignas(16) LinePatternDrawableUBO { /* 0 */ float4x4 matrix; /* 64 */ float ratio; - + // Interpolations /* 68 */ float blur_t; /* 72 */ float opacity_t; @@ -95,7 +95,7 @@ struct alignas(16) LineSDFDrawableUBO { /* 80 */ float tex_y_a; /* 84 */ float tex_y_b; /* 88 */ float ratio; - + // Interpolations /* 92 */ float color_t; /* 96 */ float blur_t; diff --git a/include/mbgl/shaders/mtl/symbol.hpp b/include/mbgl/shaders/mtl/symbol.hpp index df3e754dc65..997f569b0a8 100644 --- a/include/mbgl/shaders/mtl/symbol.hpp +++ b/include/mbgl/shaders/mtl/symbol.hpp @@ -23,16 +23,16 @@ struct alignas(16) SymbolDrawableUBO { /* 192 */ float2 texsize; /* 200 */ float2 texsize_icon; - + /* 208 */ /*bool*/ int is_text_prop; /* 212 */ /*bool*/ int rotate_symbol; /* 216 */ /*bool*/ int pitch_with_map; /* 220 */ /*bool*/ int is_size_zoom_constant; /* 224 */ /*bool*/ int is_size_feature_constant; - + /* 228 */ float size_t; /* 232 */ float size; - + // Interpolations /* 236 */ float fill_color_t; /* 240 */ float halo_color_t; diff --git a/include/mbgl/shaders/mtl/widevector.hpp b/include/mbgl/shaders/mtl/widevector.hpp index f312d2dc602..eb065f9ba91 100644 --- a/include/mbgl/shaders/mtl/widevector.hpp +++ b/include/mbgl/shaders/mtl/widevector.hpp @@ -35,7 +35,7 @@ namespace WhirlyKitShader /** Expressions are used to change values like width and opacity over zoom levels. **/ #define WKSExpStops 8 - + // Line Joins // These are assumed to match WideVectorLineJoinType typedef enum { @@ -202,7 +202,7 @@ float3 viewPos(constant simd::float4x4 &mat, float3 vec) { float2 screenPos_MVP(constant Uniforms &u, float3 viewPos) { const float4 p4 = float4(viewPos, 1.0); - + // Use the MVP matrix const float4 s = u.mvpMatrix * p4; @@ -228,7 +228,7 @@ vertex ProjVertexTriWideVecPerf vertexTri_wideVecPerf( .position = discardPt, .roundJoin = false, }; - + // Vertex index within the instance, 0-11 // Odd indexes are on the left, evens are on the right. const int whichVert = (vert.index >> 16) & 0xffff; @@ -313,7 +313,7 @@ vertex ProjVertexTriWideVecPerf vertexTri_wideVecPerf( centers[ii].norm = float2(-centers[ii].nDir.y, centers[ii].nDir.x); } } - + // Pull out the center line offset, or calculate one float centerLine = wideVec.offset; @@ -331,7 +331,7 @@ vertex ProjVertexTriWideVecPerf vertexTri_wideVecPerf( // If we're on the far end of the body segment, we need this and the next two segments. // Otherwise we need the previous, this, and the next segment. if (instValid[interIdx] && instValid[interIdx+1] && instValid[interIdx+2]) { - + // Don't even bother computing intersections for very acute angles or very small turns dotProd = dot(centers[interIdx+1].nDir, centers[interIdx+2].nDir); if (-wideVecMaxTurnThreshold < dotProd && @@ -354,7 +354,7 @@ vertex ProjVertexTriWideVecPerf vertexTri_wideVecPerf( } } } - + // Intersect the left or right sides of prev-this and this-next, plus offset thread const CenterInfo &prev = centers[interIdx+0]; thread const CenterInfo &cur = centers[interIdx+1]; @@ -385,7 +385,7 @@ vertex ProjVertexTriWideVecPerf vertexTri_wideVecPerf( offsetCenter = i2.interPt; } } - + const float2 interVec = (interPt - offsetCenter) / screenScale; const float interDist2 = length_squared(interVec); const float maxClipDist2 = (maxAdjDist * wideVec.interClipLimit) * diff --git a/include/mbgl/shaders/vulkan/fill.hpp b/include/mbgl/shaders/vulkan/fill.hpp index 80124ecd2b6..d54c8c27844 100644 --- a/include/mbgl/shaders/vulkan/fill.hpp +++ b/include/mbgl/shaders/vulkan/fill.hpp @@ -167,7 +167,7 @@ layout(location = 2) out vec2 frag_position; void main() { const FillOutlineDrawableUBO drawable = drawableVector.drawable_ubo[constant.ubo_index]; - + #if !defined(HAS_UNIFORM_u_outline_color) frag_color = vec4(unpack_mix_color(in_color, drawable.outline_color_t)); #endif @@ -331,9 +331,9 @@ void main() { frag_opacity = unpack_mix_float(in_opacity, drawable.opacity_t); #endif - const vec2 pattern_tl_a = frag_pattern_from.xy; - const vec2 pattern_br_a = frag_pattern_from.zw; - const vec2 pattern_tl_b = frag_pattern_to.xy; + const vec2 pattern_tl_a = frag_pattern_from.xy; + const vec2 pattern_br_a = frag_pattern_from.zw; + const vec2 pattern_tl_b = frag_pattern_to.xy; const vec2 pattern_br_b = frag_pattern_to.zw; const float pixelRatio = paintParams.pixel_ratio; @@ -543,9 +543,9 @@ void main() { frag_opacity = unpack_mix_float(in_opacity, drawable.opacity_t); #endif - const vec2 pattern_tl_a = frag_pattern_from.xy; - const vec2 pattern_br_a = frag_pattern_from.zw; - const vec2 pattern_tl_b = frag_pattern_to.xy; + const vec2 pattern_tl_a = frag_pattern_from.xy; + const vec2 pattern_br_a = frag_pattern_from.zw; + const vec2 pattern_tl_b = frag_pattern_to.xy; const vec2 pattern_br_b = frag_pattern_to.zw; const float pixelRatio = paintParams.pixel_ratio; diff --git a/include/mbgl/shaders/vulkan/fill_extrusion.hpp b/include/mbgl/shaders/vulkan/fill_extrusion.hpp index 89be8424f64..0e6b166d5d6 100644 --- a/include/mbgl/shaders/vulkan/fill_extrusion.hpp +++ b/include/mbgl/shaders/vulkan/fill_extrusion.hpp @@ -306,7 +306,7 @@ void main() { const vec2 pos = normal.x == 1.0 && normal.y == 0.0 && normal.z == 16384.0 ? vec2(in_position) // extrusion top : vec2(edgedistance, z * drawable.height_factor); // extrusion side - + vec4 lighting = vec4(0.0, 0.0, 0.0, 1.0); float directional = clamp(dot(normal / 16383.0, props.light_position_base.xyz), 0.0, 1.0); directional = mix((1.0 - props.light_intensity), max((0.5 + props.light_intensity), 1.0), directional); diff --git a/include/mbgl/shaders/vulkan/line.hpp b/include/mbgl/shaders/vulkan/line.hpp index 7873f9fe8cb..852d1eb48e1 100644 --- a/include/mbgl/shaders/vulkan/line.hpp +++ b/include/mbgl/shaders/vulkan/line.hpp @@ -129,7 +129,7 @@ void main() { #else const lowp float offset = props.offset * -1.0; #endif - + #ifndef HAS_UNIFORM_u_width mediump float width = unpack_mix_float(in_width, drawable.width_t); #else @@ -232,7 +232,7 @@ void main() { #else lowp float blur = frag_blur; #endif - + #ifdef HAS_UNIFORM_u_opacity lowp float opacity = props.opacity; #else @@ -356,7 +356,7 @@ void main() { #else const lowp float offset = props.offset * -1.0; #endif - + #ifndef HAS_UNIFORM_u_width mediump float width = unpack_mix_float(in_width, drawable.width_t); #else @@ -453,7 +453,7 @@ void main() { #else lowp float blur = frag_blur; #endif - + #ifdef HAS_UNIFORM_u_opacity lowp float opacity = props.opacity; #else @@ -597,7 +597,7 @@ void main() { #else const lowp float offset = props.offset * -1.0; #endif - + #ifndef HAS_UNIFORM_u_width mediump float width = unpack_mix_float(in_width, drawable.width_t); #else @@ -723,14 +723,14 @@ void main() { return; #endif - const LinePatternTilePropertiesUBO tileProps = tilePropsVector.tile_props_ubo[constant.ubo_index]; + const LinePatternTilePropertiesUBO tileProps = tilePropsVector.tile_props_ubo[constant.ubo_index]; #ifdef HAS_UNIFORM_u_blur const lowp float blur = props.blur; #else const lowp float blur = frag_blur; #endif - + #ifdef HAS_UNIFORM_u_opacity const lowp float opacity = props.opacity; #else @@ -1065,7 +1065,7 @@ void main() { #else const lowp float blur = frag_blur; #endif - + #ifdef HAS_UNIFORM_u_opacity const lowp float opacity = props.opacity; #else diff --git a/include/mbgl/shaders/vulkan/symbol.hpp b/include/mbgl/shaders/vulkan/symbol.hpp index c41550bcf34..09edcf28abc 100644 --- a/include/mbgl/shaders/vulkan/symbol.hpp +++ b/include/mbgl/shaders/vulkan/symbol.hpp @@ -24,7 +24,7 @@ struct ShaderSource { static const std::array textures; static constexpr auto vertex = SYMBOL_SHADER_COMMON R"( - + layout(location = 0) in ivec4 in_pos_offset; layout(location = 1) in uvec4 in_data; layout(location = 2) in ivec4 in_pixeloffset; @@ -33,7 +33,7 @@ layout(location = 4) in float in_fade_opacity; #if !defined(HAS_UNIFORM_u_opacity) layout(location = 5) in vec2 in_opacity; -#endif +#endif layout(push_constant) uniform Constants { int ubo_index; @@ -129,7 +129,7 @@ void main() { const vec2 posOffset = a_offset * max(a_minFontScale, fontScale) / 32.0 + a_pxoffset / 16.0; gl_Position = drawable.coord_matrix * vec4(pos0 + rotation_matrix * posOffset, 0.0, 1.0); applySurfaceTransform(); - + const vec2 raw_fade_opacity = unpack_opacity(in_fade_opacity); const float fade_change = raw_fade_opacity[1] > 0.5 ? paintParams.symbol_fade_change : -paintParams.symbol_fade_change; const float fade_opacity = max(0.0, min(1.0, raw_fade_opacity[0] + fade_change)); @@ -211,7 +211,7 @@ struct ShaderSource { static const std::array textures; static constexpr auto vertex = SYMBOL_SHADER_COMMON R"( - + layout(location = 0) in ivec4 in_pos_offset; layout(location = 1) in uvec4 in_data; layout(location = 2) in ivec4 in_pixeloffset; @@ -236,7 +236,7 @@ layout(location = 8) in vec2 in_halo_width; #if !defined(HAS_UNIFORM_u_halo_blur) layout(location = 9) in vec2 in_halo_blur; -#endif +#endif layout(push_constant) uniform Constants { int ubo_index; @@ -505,7 +505,7 @@ struct ShaderSource textures; static constexpr auto vertex = SYMBOL_SHADER_COMMON R"( - + #define SDF 1.0 #define ICON 0.0 @@ -532,7 +532,7 @@ layout(location = 7) in vec2 in_halo_width; #if !defined(HAS_UNIFORM_u_halo_blur) layout(location = 8) in vec2 in_halo_blur; -#endif +#endif layout(push_constant) uniform Constants { int ubo_index; @@ -657,13 +657,13 @@ void main() { const vec2 pos0 = projected_pos.xy / projected_pos.w + rotation_matrix * pos_rot; gl_Position = drawable.coord_matrix * vec4(pos0, 0.0, 1.0); applySurfaceTransform(); - + const vec2 raw_fade_opacity = unpack_opacity(in_fade_opacity); const float fade_change = raw_fade_opacity[1] > 0.5 ? paintParams.symbol_fade_change : -paintParams.symbol_fade_change; const bool is_icon = (is_sdf == ICON); frag_is_icon = int(is_icon); - + frag_tex = a_tex / (is_icon ? drawable.texsize_icon : drawable.texsize); frag_fade_opacity = max(0.0, min(1.0, raw_fade_opacity[0] + fade_change)); frag_font_scale = fontScale; diff --git a/include/mbgl/shaders/vulkan/widevector.hpp b/include/mbgl/shaders/vulkan/widevector.hpp index 14139f56a3f..7f26c1d58ea 100644 --- a/include/mbgl/shaders/vulkan/widevector.hpp +++ b/include/mbgl/shaders/vulkan/widevector.hpp @@ -26,7 +26,7 @@ struct ShaderSource { /** Expressions are used to change values like width and opacity over zoom levels. **/ #define WKSExpStops 8 - + // Line Joins // These are assumed to match WideVectorLineJoinType #define WKSVertexLineJoinMiter 0 @@ -117,7 +117,7 @@ vec3 viewPos(const mat4 &mat, vec3 vec) { float2 screenPos_MVP(const Uniforms &u, float3 viewPos) { const float4 p4 = float4(viewPos, 1.0); - + // Use the MVP matrix const float4 s = u.mvpMatrix * p4; diff --git a/metrics/integration/expression-tests/index-of/invalid-needle/test.json b/metrics/integration/expression-tests/index-of/invalid-needle/test.json index 4fb3b8416ea..fa7f3eca3b9 100644 --- a/metrics/integration/expression-tests/index-of/invalid-needle/test.json +++ b/metrics/integration/expression-tests/index-of/invalid-needle/test.json @@ -22,4 +22,3 @@ ] } } - diff --git a/metrics/integration/expression-tests/index-of/with-from-index/test.json b/metrics/integration/expression-tests/index-of/with-from-index/test.json index b9f2c05087c..18275f6d6e6 100644 --- a/metrics/integration/expression-tests/index-of/with-from-index/test.json +++ b/metrics/integration/expression-tests/index-of/with-from-index/test.json @@ -48,4 +48,3 @@ ] } } - diff --git a/metrics/integration/geojson/anchors.json b/metrics/integration/geojson/anchors.json index 71f8b7562aa..921901992a4 100644 --- a/metrics/integration/geojson/anchors.json +++ b/metrics/integration/geojson/anchors.json @@ -6,7 +6,7 @@ "anchor": "center" }, "geometry": { - "type": "Point", + "type": "Point", "coordinates": [ 0, 0 ] } }, { @@ -15,7 +15,7 @@ "anchor": "left" }, "geometry": { - "type": "Point", + "type": "Point", "coordinates": [ 30, 0 ] } }, { @@ -24,7 +24,7 @@ "anchor": "top-left" }, "geometry": { - "type": "Point", + "type": "Point", "coordinates": [ 20, -15 ] } }, { @@ -33,7 +33,7 @@ "anchor": "top" }, "geometry": { - "type": "Point", + "type": "Point", "coordinates": [ 0, -25 ] } }, { @@ -42,7 +42,7 @@ "anchor": "top-right" }, "geometry": { - "type": "Point", + "type": "Point", "coordinates": [ -20, -15 ] } }, { @@ -51,7 +51,7 @@ "anchor": "right" }, "geometry": { - "type": "Point", + "type": "Point", "coordinates": [ -30, 0 ] } }, { @@ -60,7 +60,7 @@ "anchor": "bottom-left" }, "geometry": { - "type": "Point", + "type": "Point", "coordinates": [ 20, 15 ] } }, { @@ -69,7 +69,7 @@ "anchor": "bottom" }, "geometry": { - "type": "Point", + "type": "Point", "coordinates": [ 0, 25 ] } }, { @@ -78,7 +78,7 @@ "anchor": "bottom-right" }, "geometry": { - "type": "Point", + "type": "Point", "coordinates": [ -20, 15 ] } }] diff --git a/metrics/integration/query-tests/circle-radius/feature-state/expected.json b/metrics/integration/query-tests/circle-radius/feature-state/expected.json index 743db262450..b5142000c02 100644 --- a/metrics/integration/query-tests/circle-radius/feature-state/expected.json +++ b/metrics/integration/query-tests/circle-radius/feature-state/expected.json @@ -10,4 +10,4 @@ "source": "mapbox", "state": { "big": true } } -] +] diff --git a/metrics/integration/query-tests/circle-stroke-width/feature-state/expected.json b/metrics/integration/query-tests/circle-stroke-width/feature-state/expected.json index 743db262450..b5142000c02 100644 --- a/metrics/integration/query-tests/circle-stroke-width/feature-state/expected.json +++ b/metrics/integration/query-tests/circle-stroke-width/feature-state/expected.json @@ -10,4 +10,4 @@ "source": "mapbox", "state": { "big": true } } -] +] diff --git a/metrics/integration/query-tests/feature-state/default/style.json b/metrics/integration/query-tests/feature-state/default/style.json index 1caa0df6c75..4af70f244fe 100644 --- a/metrics/integration/query-tests/feature-state/default/style.json +++ b/metrics/integration/query-tests/feature-state/default/style.json @@ -5,18 +5,18 @@ "height": 256, "operations": [ [ - "setFeatureState", - { + "setFeatureState", + { "source": "mapbox", "sourceLayer": "road", "id": "4612696" }, - { - "stateA": 1 + { + "stateA": 1 } ], [ - "setFeatureState", - { + "setFeatureState", + { "source": "mapbox", "sourceLayer": "road", "id": 4612696 @@ -25,8 +25,8 @@ "stateB": "feature_id as number" } ], [ - "setFeatureState", - { + "setFeatureState", + { "source": "mapbox", "sourceLayer": "road", "id": "4612752" diff --git a/metrics/integration/query-tests/line-gap-width/feature-state/expected.json b/metrics/integration/query-tests/line-gap-width/feature-state/expected.json index 7ecfa8e982a..38a5890737e 100644 --- a/metrics/integration/query-tests/line-gap-width/feature-state/expected.json +++ b/metrics/integration/query-tests/line-gap-width/feature-state/expected.json @@ -10,4 +10,4 @@ "source": "mapbox", "state": { "big": true } } -] +] diff --git a/metrics/integration/query-tests/line-offset/feature-state/expected.json b/metrics/integration/query-tests/line-offset/feature-state/expected.json index 7ecfa8e982a..38a5890737e 100644 --- a/metrics/integration/query-tests/line-offset/feature-state/expected.json +++ b/metrics/integration/query-tests/line-offset/feature-state/expected.json @@ -10,4 +10,4 @@ "source": "mapbox", "state": { "big": true } } -] +] diff --git a/metrics/integration/query-tests/line-width/feature-state/expected.json b/metrics/integration/query-tests/line-width/feature-state/expected.json index 7ecfa8e982a..38a5890737e 100644 --- a/metrics/integration/query-tests/line-width/feature-state/expected.json +++ b/metrics/integration/query-tests/line-width/feature-state/expected.json @@ -10,4 +10,4 @@ "source": "mapbox", "state": { "big": true } } -] +] diff --git a/metrics/integration/render-tests/icon-image/icon-sdf-non-sdf-one-layer/style.json b/metrics/integration/render-tests/icon-image/icon-sdf-non-sdf-one-layer/style.json index 4970e0005fc..17535df0d50 100644 --- a/metrics/integration/render-tests/icon-image/icon-sdf-non-sdf-one-layer/style.json +++ b/metrics/integration/render-tests/icon-image/icon-sdf-non-sdf-one-layer/style.json @@ -12,7 +12,7 @@ ], "zoom": 0, "sources": { - "geojson": + "geojson": { "type": "geojson", "data": { diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#7066/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-js#7066/style.json index 878ac257b35..6158dbde789 100644 --- a/metrics/integration/render-tests/regressions/mapbox-gl-js#7066/style.json +++ b/metrics/integration/render-tests/regressions/mapbox-gl-js#7066/style.json @@ -4,7 +4,7 @@ "test": { "pixelRatio": 10, "width": 24, - "height": 24 + "height": 24 } }, "sources": { diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-native#8078/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-native#8078/style.json index c9188a16653..5a315c57688 100644 --- a/metrics/integration/render-tests/regressions/mapbox-gl-native#8078/style.json +++ b/metrics/integration/render-tests/regressions/mapbox-gl-native#8078/style.json @@ -23,7 +23,7 @@ 0 ] } - } + } ] } }, @@ -43,7 +43,7 @@ 0 ] } - } + } ] } }, @@ -63,10 +63,10 @@ -10 ] } - } + } ] } - } + } }, "layers": [ { @@ -100,6 +100,6 @@ "circle-stroke-color": "green", "circle-stroke-width": 2 } - } + } ] } diff --git a/metrics/integration/render-tests/runtime-styling/layout-property-text-variable-anchor/style.json b/metrics/integration/render-tests/runtime-styling/layout-property-text-variable-anchor/style.json index 1371d35e2dc..db6dfa6bb6b 100644 --- a/metrics/integration/render-tests/runtime-styling/layout-property-text-variable-anchor/style.json +++ b/metrics/integration/render-tests/runtime-styling/layout-property-text-variable-anchor/style.json @@ -66,8 +66,7 @@ "paint": { "circle-color": "red" } - + } ] } - diff --git a/metrics/integration/render-tests/text-justify/property-function/style.json b/metrics/integration/render-tests/text-justify/property-function/style.json index eea89606379..ce25359cffc 100644 --- a/metrics/integration/render-tests/text-justify/property-function/style.json +++ b/metrics/integration/render-tests/text-justify/property-function/style.json @@ -37,7 +37,7 @@ "type": "Point", "coordinates": [ 100, 0 ] } - } + } ] } } diff --git a/metrics/integration/render-tests/text-letter-spacing/property-function/style.json b/metrics/integration/render-tests/text-letter-spacing/property-function/style.json index 6cc52cc79aa..4afe29381a9 100644 --- a/metrics/integration/render-tests/text-letter-spacing/property-function/style.json +++ b/metrics/integration/render-tests/text-letter-spacing/property-function/style.json @@ -29,7 +29,7 @@ "type": "Point", "coordinates": [ 75, 0 ] } - } + } ] } } diff --git a/metrics/integration/render-tests/text-max-width/property-function/style.json b/metrics/integration/render-tests/text-max-width/property-function/style.json index 8b7b950b696..330c44964d8 100644 --- a/metrics/integration/render-tests/text-max-width/property-function/style.json +++ b/metrics/integration/render-tests/text-max-width/property-function/style.json @@ -29,7 +29,7 @@ "type": "Point", "coordinates": [ 75, 0 ] } - } + } ] } } diff --git a/metrics/integration/render-tests/text-max-width/zoom-and-property-function/style.json b/metrics/integration/render-tests/text-max-width/zoom-and-property-function/style.json index c6409a5bef9..44042d3e27c 100644 --- a/metrics/integration/render-tests/text-max-width/zoom-and-property-function/style.json +++ b/metrics/integration/render-tests/text-max-width/zoom-and-property-function/style.json @@ -16,9 +16,9 @@ "features": [ { "type": "Feature", - "properties": { + "properties": { "width": "varying", - "text": "These lines look the same a a a a a a a a a a a a a a a a a a a a a a a a a a a a" + "text": "These lines look the same a a a a a a a a a a a a a a a a a a a a a a a a a a a a" }, "geometry": { "type": "Point", @@ -27,15 +27,15 @@ }, { "type": "Feature", - "properties": { + "properties": { "width": "fixed", - "text": "These lines look the same a a a a a a a a a a a a a a a a a a a a a a a a a a a a" + "text": "These lines look the same a a a a a a a a a a a a a a a a a a a a a a a a a a a a" }, "geometry": { "type": "Point", "coordinates": [ 25, -15 ] } - } + } ] } } diff --git a/metrics/integration/render-tests/text-pitch-scaling/line-half/style.json b/metrics/integration/render-tests/text-pitch-scaling/line-half/style.json index 1cf600d9a95..5830123eed9 100644 --- a/metrics/integration/render-tests/text-pitch-scaling/line-half/style.json +++ b/metrics/integration/render-tests/text-pitch-scaling/line-half/style.json @@ -1,7 +1,7 @@ { "version": 8, "metadata": { - "test": { + "test": { "height": 512 } }, diff --git a/metrics/integration/render-tests/tilejson-bounds/default/style.json b/metrics/integration/render-tests/tilejson-bounds/default/style.json index 4d7885bb500..447aff81c18 100644 --- a/metrics/integration/render-tests/tilejson-bounds/default/style.json +++ b/metrics/integration/render-tests/tilejson-bounds/default/style.json @@ -40,4 +40,3 @@ } ] } - diff --git a/metrics/integration/render-tests/tilejson-bounds/overwrite-bounds/style.json b/metrics/integration/render-tests/tilejson-bounds/overwrite-bounds/style.json index 0680188039d..97f2dc0a7a1 100644 --- a/metrics/integration/render-tests/tilejson-bounds/overwrite-bounds/style.json +++ b/metrics/integration/render-tests/tilejson-bounds/overwrite-bounds/style.json @@ -38,4 +38,3 @@ } ] } - diff --git a/metrics/integration/render-tests/within/filter-with-inlined-geojson/style.json b/metrics/integration/render-tests/within/filter-with-inlined-geojson/style.json index 19b184eec78..6844c161f40 100644 --- a/metrics/integration/render-tests/within/filter-with-inlined-geojson/style.json +++ b/metrics/integration/render-tests/within/filter-with-inlined-geojson/style.json @@ -95,6 +95,6 @@ "circle-radius": 5, "circle-color": "red" } - } + } ] } diff --git a/metrics/integration/render-tests/within/layout-text/style.json b/metrics/integration/render-tests/within/layout-text/style.json index fe76ba917e8..37c15f91f08 100644 --- a/metrics/integration/render-tests/within/layout-text/style.json +++ b/metrics/integration/render-tests/within/layout-text/style.json @@ -104,8 +104,7 @@ "paint" : { "text-color": "red" } - - } + + } ] } - diff --git a/metrics/integration/render-tests/within/paint-circle/style.json b/metrics/integration/render-tests/within/paint-circle/style.json index e393ce0032f..a1123ac25e3 100644 --- a/metrics/integration/render-tests/within/paint-circle/style.json +++ b/metrics/integration/render-tests/within/paint-circle/style.json @@ -96,6 +96,6 @@ } ], "red", "blue"] } - } + } ] } diff --git a/metrics/integration/render-tests/within/paint-icon/style.json b/metrics/integration/render-tests/within/paint-icon/style.json index ca58a1f59cf..de8de5716bf 100644 --- a/metrics/integration/render-tests/within/paint-icon/style.json +++ b/metrics/integration/render-tests/within/paint-icon/style.json @@ -99,6 +99,6 @@ } ], "red", "blue"] } - } + } ] } diff --git a/metrics/integration/render-tests/within/paint-text/style.json b/metrics/integration/render-tests/within/paint-text/style.json index 8749edb1721..fee86cbbd0b 100644 --- a/metrics/integration/render-tests/within/paint-text/style.json +++ b/metrics/integration/render-tests/within/paint-text/style.json @@ -104,6 +104,6 @@ } ], "red", "blue"] } - } + } ] } diff --git a/metrics/tests/probes/gfx/fail-ib-mem-mismatch/metrics.json b/metrics/tests/probes/gfx/fail-ib-mem-mismatch/metrics.json index 2b5c9c3edac..6c43a6e6e81 100644 --- a/metrics/tests/probes/gfx/fail-ib-mem-mismatch/metrics.json +++ b/metrics/tests/probes/gfx/fail-ib-mem-mismatch/metrics.json @@ -2,4 +2,4 @@ "gfx":[ ["gfx 0", 36, 14, 63, 1, [371208, 371208], [68598, 65536], [74592, 74592]] ] -} +} diff --git a/metrics/tests/probes/gfx/fail-ib-mem-mismatch/style.json b/metrics/tests/probes/gfx/fail-ib-mem-mismatch/style.json index 37d0a9c0e5f..1b0f5b9fb5c 100644 --- a/metrics/tests/probes/gfx/fail-ib-mem-mismatch/style.json +++ b/metrics/tests/probes/gfx/fail-ib-mem-mismatch/style.json @@ -17,4 +17,3 @@ "sources": {}, "layers": [] } - diff --git a/metrics/tests/probes/gfx/fail-negative-framebuffer-count/metrics.json b/metrics/tests/probes/gfx/fail-negative-framebuffer-count/metrics.json index e92cffa571e..88289ed7d9f 100644 --- a/metrics/tests/probes/gfx/fail-negative-framebuffer-count/metrics.json +++ b/metrics/tests/probes/gfx/fail-negative-framebuffer-count/metrics.json @@ -2,4 +2,4 @@ "gfx":[ ["gfx 0", 36, 14, 63, -1, [371208, 371208], [68598, 68598], [74592, 74592]] ] -} +} diff --git a/metrics/tests/probes/gfx/fail-negative-framebuffer-count/style.json b/metrics/tests/probes/gfx/fail-negative-framebuffer-count/style.json index 37d0a9c0e5f..1b0f5b9fb5c 100644 --- a/metrics/tests/probes/gfx/fail-negative-framebuffer-count/style.json +++ b/metrics/tests/probes/gfx/fail-negative-framebuffer-count/style.json @@ -17,4 +17,3 @@ "sources": {}, "layers": [] } - diff --git a/metrics/tests/probes/gfx/fail-texture-mem-mismatch/metrics.json b/metrics/tests/probes/gfx/fail-texture-mem-mismatch/metrics.json index fc6f55025ff..710ce901f93 100644 --- a/metrics/tests/probes/gfx/fail-texture-mem-mismatch/metrics.json +++ b/metrics/tests/probes/gfx/fail-texture-mem-mismatch/metrics.json @@ -2,4 +2,4 @@ "gfx":[ ["gfx 0", 36, 14, 63, 1, [371208, 370000], [68598, 68598], [74592, 74592]] ] -} +} diff --git a/metrics/tests/probes/gfx/fail-texture-mem-mismatch/style.json b/metrics/tests/probes/gfx/fail-texture-mem-mismatch/style.json index 37d0a9c0e5f..1b0f5b9fb5c 100644 --- a/metrics/tests/probes/gfx/fail-texture-mem-mismatch/style.json +++ b/metrics/tests/probes/gfx/fail-texture-mem-mismatch/style.json @@ -17,4 +17,3 @@ "sources": {}, "layers": [] } - diff --git a/metrics/tests/probes/gfx/fail-too-few-buffers/metrics.json b/metrics/tests/probes/gfx/fail-too-few-buffers/metrics.json index 07b59adeed9..973a0d56845 100644 --- a/metrics/tests/probes/gfx/fail-too-few-buffers/metrics.json +++ b/metrics/tests/probes/gfx/fail-too-few-buffers/metrics.json @@ -2,4 +2,4 @@ "gfx":[ ["gfx 0", 36, 14, 1000, 1, [371208, 371208], [68598, 68598], [74592, 74592]] ] -} +} diff --git a/metrics/tests/probes/gfx/fail-too-few-buffers/style.json b/metrics/tests/probes/gfx/fail-too-few-buffers/style.json index 37d0a9c0e5f..1b0f5b9fb5c 100644 --- a/metrics/tests/probes/gfx/fail-too-few-buffers/style.json +++ b/metrics/tests/probes/gfx/fail-too-few-buffers/style.json @@ -17,4 +17,3 @@ "sources": {}, "layers": [] } - diff --git a/metrics/tests/probes/gfx/fail-too-few-textures/metrics.json b/metrics/tests/probes/gfx/fail-too-few-textures/metrics.json index 805d7035e21..91e15d7cd89 100644 --- a/metrics/tests/probes/gfx/fail-too-few-textures/metrics.json +++ b/metrics/tests/probes/gfx/fail-too-few-textures/metrics.json @@ -2,4 +2,4 @@ "gfx":[ ["gfx 0", 36, 1000, 63, 1, [371208, 371208], [68598, 68598], [74592, 74592]] ] -} +} diff --git a/metrics/tests/probes/gfx/fail-too-few-textures/style.json b/metrics/tests/probes/gfx/fail-too-few-textures/style.json index 37d0a9c0e5f..1b0f5b9fb5c 100644 --- a/metrics/tests/probes/gfx/fail-too-few-textures/style.json +++ b/metrics/tests/probes/gfx/fail-too-few-textures/style.json @@ -17,4 +17,3 @@ "sources": {}, "layers": [] } - diff --git a/metrics/tests/probes/gfx/fail-too-many-drawcalls/metrics.json b/metrics/tests/probes/gfx/fail-too-many-drawcalls/metrics.json index 9abb546450b..f5c4ff68a0c 100644 --- a/metrics/tests/probes/gfx/fail-too-many-drawcalls/metrics.json +++ b/metrics/tests/probes/gfx/fail-too-many-drawcalls/metrics.json @@ -2,4 +2,4 @@ "gfx":[ ["gfx 0", 28, 14, 63, 1, [371208, 371208], [68598, 68598], [74592, 74592]] ] -} +} diff --git a/metrics/tests/probes/gfx/fail-too-many-drawcalls/style.json b/metrics/tests/probes/gfx/fail-too-many-drawcalls/style.json index 37d0a9c0e5f..1b0f5b9fb5c 100644 --- a/metrics/tests/probes/gfx/fail-too-many-drawcalls/style.json +++ b/metrics/tests/probes/gfx/fail-too-many-drawcalls/style.json @@ -17,4 +17,3 @@ "sources": {}, "layers": [] } - diff --git a/metrics/tests/probes/gfx/fail-vb-mem-mismatch/metrics.json b/metrics/tests/probes/gfx/fail-vb-mem-mismatch/metrics.json index fd25dbd68bc..4c823527ee4 100644 --- a/metrics/tests/probes/gfx/fail-vb-mem-mismatch/metrics.json +++ b/metrics/tests/probes/gfx/fail-vb-mem-mismatch/metrics.json @@ -2,4 +2,4 @@ "gfx":[ ["gfx 0", 36, 14, 63, 1, [371208, 371208], [68598, 68598], [74592, 7654321]] ] -} +} diff --git a/metrics/tests/probes/gfx/fail-vb-mem-mismatch/style.json b/metrics/tests/probes/gfx/fail-vb-mem-mismatch/style.json index 37d0a9c0e5f..1b0f5b9fb5c 100644 --- a/metrics/tests/probes/gfx/fail-vb-mem-mismatch/style.json +++ b/metrics/tests/probes/gfx/fail-vb-mem-mismatch/style.json @@ -17,4 +17,3 @@ "sources": {}, "layers": [] } - diff --git a/metrics/tests/probes/gfx/pass-double-probe/metrics.json b/metrics/tests/probes/gfx/pass-double-probe/metrics.json index f2641a9a16b..4c67f7ff2f3 100644 --- a/metrics/tests/probes/gfx/pass-double-probe/metrics.json +++ b/metrics/tests/probes/gfx/pass-double-probe/metrics.json @@ -3,4 +3,4 @@ ["gfx 0", 36, 13, 63, 1, [240136, 240136], [68598, 68598], [74592, 74592]], ["gfx 1", 32, 17, 85, 1, [325008, 325008], [84926, 84926], [100224, 100224]] ] -} +} diff --git a/metrics/tests/probes/gfx/pass-double-probe/style.json b/metrics/tests/probes/gfx/pass-double-probe/style.json index 68e92514687..3c07306d7c1 100644 --- a/metrics/tests/probes/gfx/pass-double-probe/style.json +++ b/metrics/tests/probes/gfx/pass-double-probe/style.json @@ -19,4 +19,3 @@ "sources": {}, "layers": [] } - diff --git a/metrics/tests/probes/gfx/pass-probe-reset/metrics.json b/metrics/tests/probes/gfx/pass-probe-reset/metrics.json index 0e42bc16975..70041bde5d1 100644 --- a/metrics/tests/probes/gfx/pass-probe-reset/metrics.json +++ b/metrics/tests/probes/gfx/pass-probe-reset/metrics.json @@ -3,4 +3,4 @@ ["gfx 0", 36, 13, 63, 1, [240136, 240136], [68598, 68598], [74592, 74592]], ["gfx 1", 32, 17, 85, 1, [84872, 84872], [16328, 16328], [25632, 25632]] ] -} +} diff --git a/metrics/tests/probes/gfx/pass-probe-reset/style.json b/metrics/tests/probes/gfx/pass-probe-reset/style.json index a0528fa2d15..d8a53433947 100644 --- a/metrics/tests/probes/gfx/pass-probe-reset/style.json +++ b/metrics/tests/probes/gfx/pass-probe-reset/style.json @@ -21,4 +21,3 @@ "sources": {}, "layers": [] } - diff --git a/metrics/tests/probes/gfx/pass/metrics.json b/metrics/tests/probes/gfx/pass/metrics.json index 67ecec5d78e..71b13e7b0a9 100644 --- a/metrics/tests/probes/gfx/pass/metrics.json +++ b/metrics/tests/probes/gfx/pass/metrics.json @@ -2,4 +2,4 @@ "gfx":[ ["gfx 0", 36, 13, 63, 1, [240136, 240136], [68598, 68598], [74592, 74592]] ] -} +} diff --git a/metrics/tests/probes/gfx/pass/style.json b/metrics/tests/probes/gfx/pass/style.json index 37d0a9c0e5f..1b0f5b9fb5c 100644 --- a/metrics/tests/probes/gfx/pass/style.json +++ b/metrics/tests/probes/gfx/pass/style.json @@ -17,4 +17,3 @@ "sources": {}, "layers": [] } - diff --git a/platform/android/CHANGELOG.md b/platform/android/CHANGELOG.md index a9561a59a22..e0693297045 100644 --- a/platform/android/CHANGELOG.md +++ b/platform/android/CHANGELOG.md @@ -8,7 +8,7 @@ ## 11.8.1 -> [!NOTE] +> [!NOTE] > We are now releasing OpenGL ES and Vulkan variants of MapLibre Android. See the [11.7.0 release notes](https://github.com/maplibre/maplibre-native/releases/tag/android-v11.7.0) for details. ### ✨ Features and improvements @@ -23,7 +23,7 @@ ## 11.8.0 -> [!NOTE] +> [!NOTE] > We are now releasing OpenGL ES and Vulkan variants of MapLibre Android. See the [11.7.0 release notes](https://github.com/maplibre/maplibre-native/releases/tag/android-v11.7.0) for details. ### ✨ Features and improvements @@ -39,7 +39,7 @@ We have a new feature in the C++ Core to constrain the screen (instead of the ce ## 11.7.1 -> [!NOTE] +> [!NOTE] > We are now releasing OpenGL ES and Vulkan variants of MapLibre Android. See the [11.7.0 release notes](https://github.com/maplibre/maplibre-native/releases/tag/android-v11.7.0) for details. ### ✨ Features and improvements @@ -49,7 +49,7 @@ We have a new feature in the C++ Core to constrain the screen (instead of the ce ### 🐞 Bug fixes -- Remove `Pass3D` ([#3077](https://github.com/maplibre/maplibre-native/pull/3077)). +- Remove `Pass3D` ([#3077](https://github.com/maplibre/maplibre-native/pull/3077)). Fixes issue where filters applied to fill extrusion layers are not rendered unless a manual zoom is applied to the map ([#3039](https://github.com/maplibre/maplibre-native/issues/3039)). ## 11.7.0 @@ -172,7 +172,7 @@ Thanks to everyone who helped test the pre-releases! ### ✨ Features and improvements -- Toggle tile cache final API ([#2723](https://github.com/maplibre/maplibre-native/pull/2723)). +- Toggle tile cache final API ([#2723](https://github.com/maplibre/maplibre-native/pull/2723)). This is a new API on `MapLibreMap`: `setTileCacheEnabled()` and `getTileCacheEnabled()`. This tile cache is used to cache tiles on different zoom levels, disabling it will reduce memory usage. - Add `getOfflineRegion` Kotlin API ([#2516](https://github.com/maplibre/maplibre-native/pull/2516)). This is the first (code) contribution from [@JRWilding](https://github.com/JRWilding)! 🎉 - Bump NDK version to 27.0.12077973, replace `ALooper_pollAll` with `ALooper_pollOnce` ([#2663](https://github.com/maplibre/maplibre-native/pull/2663)). @@ -181,8 +181,8 @@ Thanks to everyone who helped test the pre-releases! - Reuse prefetched tiles to avoid empty screen ([#2668](https://github.com/maplibre/maplibre-native/pull/2668)). - Update Android Dependencies, use [maplibre-gestures-android](https://github.com/maplibre/maplibre-gestures-android) ([#2714](https://github.com/maplibre/maplibre-native/pull/2714)). - Update dependency gradle to v8.10 ([#2721](https://github.com/maplibre/maplibre-native/pull/2721)). -- Cleanup `mbgl/actor/mailbox*` implementation for repetition in ensuring valid weakScheduler exists before usage ([#2733](https://github.com/maplibre/maplibre-native/pull/2733)). -- Use latest MapLibre Style Spec ([#2756](https://github.com/maplibre/maplibre-native/pull/2756)). +- Cleanup `mbgl/actor/mailbox*` implementation for repetition in ensuring valid weakScheduler exists before usage ([#2733](https://github.com/maplibre/maplibre-native/pull/2733)). +- Use latest MapLibre Style Spec ([#2756](https://github.com/maplibre/maplibre-native/pull/2756)). This PR adds two new APIs to `TransitionOptions` of `LocationIndicatorLayer`: `getBearingTransition()` and `setBearingTransition()`. - Use timestamps for attribute updates ([#2629](https://github.com/maplibre/maplibre-native/pull/2629)). @@ -191,7 +191,7 @@ Thanks to everyone who helped test the pre-releases! - Fix crash when feature contains invalid UTF-8 data ([#2693](https://github.com/maplibre/maplibre-native/pull/2693)). - Fix accidental regression conditional layer evaluation ([#2705](https://github.com/maplibre/maplibre-native/pull/2705)). - Ensure `ReentrantLock` is unlocked after being locked, and on same thread ([#2759](https://github.com/maplibre/maplibre-native/pull/2759)). This is the first (code) contributon from [@westnordost](https://github.com/westnordost)! 🎉 -- Add guard blocks and checks to `SymbolInstance` ([#2744](https://github.com/maplibre/maplibre-native/pull/2744)). +- Add guard blocks and checks to `SymbolInstance` ([#2744](https://github.com/maplibre/maplibre-native/pull/2744)). This fixes an exceedingly rare crash that a user is seeing in the field. The fix is not pretty, but we hope to better understand the problem in the future (see [this open issue](https://github.com/maplibre/maplibre-native/issues/2350)). ## 11.1.0 @@ -241,12 +241,12 @@ This release utilizes **OpenGL ES 3.0**. As a result, some older devices are no - 💥 Breaking: Change package of all classes from `com.mapbox.mapboxsdk` to `org.maplibre.android` ([#1201](https://github.com/maplibre/maplibre-native/pull/1201)). This means you will need to fix your imports. - > To migrate: + > To migrate: > In your imports in each of your project files, replace `com.mapbox.mapboxsdk.` with `org.maplibre.android.*`. - 💥 Breaking: Rename several classes to no longer contain the word "Mapbox". You will need to migrate by renaming references. - > To migrate: + > To migrate: > Each affected occurrence will be marked as an error during compilation. Replace each occurrence of "Mapbox" with "MapLibre" and let your IDE do the import. > > These are the most important classes that have been renamed: @@ -316,7 +316,7 @@ This version is identical to 10.0.2. - 💥 Breaking: Changed resourcePrefix to `maplibre_` from `mapbox_` ([#647](https://github.com/maplibre/maplibre-native/pull/647)) and renamed resources accordingly. Note that this is a breaking change since the names of public resources were renamed as well. Replaced Mapbox logo with MapLibre logo. - > To migrate: + > To migrate: > If you use any of the public Android resources, you will get an error that they can not be found. Replace the prefix of each, e.g. `R.style.mapbox_LocationComponent` -> `R.style.maplibre_LocationComponent`. - 💥 Breaking: several deprecated overloads of `LocationComponent.activateLocationComponent` were removed. Use `LocationComponentActivationOptions.Builder` instead. @@ -336,7 +336,7 @@ This version is identical to 10.0.2. - 💥 Breaking: the `LocationEngine` implemented with Google Location Services has been removed to make MapLibre Native for Android fully FLOSS ([#379](https://github.com/maplibre/maplibre-native/issues/379)). - > To migrate: + > To migrate: > Include the source code of the removed [`GoogleLocationEngineImpl`](https://github.com/maplibre/maplibre-native/blob/4a34caab7593f4f1b6d8c09c06a5e25d7c6cfc43/platform/android/MapLibreAndroid/src/main/java/com/mapbox/mapboxsdk/location/engine/GoogleLocationEngineImpl.java) in your source tree. > > Pass an instance of `LocationEngine` based on `GoogleLocationEngineImpl` to `LocationComponentActivationOptions.Builder.locationEngine` (this was done in a now removed [`LocationEngineProvider`](https://github.com/maplibre/maplibre-native/blob/68d58d6f6f453d5c6cc0fa92fcc6c6cfe0cf967f/platform/android/MapLibreAndroid/src/main/java/com/mapbox/mapboxsdk/location/engine/LocationEngineProvider.java#L59) class): diff --git a/platform/android/LICENSE.md b/platform/android/LICENSE.md index c2ce0bc18f4..70bb74f59b7 100644 --- a/platform/android/LICENSE.md +++ b/platform/android/LICENSE.md @@ -32,246 +32,246 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. =========================================================================== -MapLibre Native Android uses portions of Activity. -URL: [https://developer.android.com/jetpack/androidx/releases/activity#1.8.1](https://developer.android.com/jetpack/androidx/releases/activity#1.8.1) +MapLibre Native Android uses portions of Activity. +URL: [https://developer.android.com/jetpack/androidx/releases/activity#1.8.1](https://developer.android.com/jetpack/androidx/releases/activity#1.8.1) License: [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) =========================================================================== -MapLibre Native Android uses portions of Android App Startup Runtime. -URL: [https://developer.android.com/jetpack/androidx/releases/startup#1.1.1](https://developer.android.com/jetpack/androidx/releases/startup#1.1.1) +MapLibre Native Android uses portions of Android App Startup Runtime. +URL: [https://developer.android.com/jetpack/androidx/releases/startup#1.1.1](https://developer.android.com/jetpack/androidx/releases/startup#1.1.1) License: [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) =========================================================================== -MapLibre Native Android uses portions of Android Arch-Common. -URL: [https://developer.android.com/jetpack/androidx/releases/arch-core#2.2.0](https://developer.android.com/jetpack/androidx/releases/arch-core#2.2.0) +MapLibre Native Android uses portions of Android Arch-Common. +URL: [https://developer.android.com/jetpack/androidx/releases/arch-core#2.2.0](https://developer.android.com/jetpack/androidx/releases/arch-core#2.2.0) License: [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) =========================================================================== -MapLibre Native Android uses portions of Android Arch-Runtime. -URL: [https://developer.android.com/jetpack/androidx/releases/arch-core#2.2.0](https://developer.android.com/jetpack/androidx/releases/arch-core#2.2.0) +MapLibre Native Android uses portions of Android Arch-Runtime. +URL: [https://developer.android.com/jetpack/androidx/releases/arch-core#2.2.0](https://developer.android.com/jetpack/androidx/releases/arch-core#2.2.0) License: [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) =========================================================================== -MapLibre Native Android uses portions of Android Lifecycle LiveData. -URL: [https://developer.android.com/jetpack/androidx/releases/lifecycle#2.6.1](https://developer.android.com/jetpack/androidx/releases/lifecycle#2.6.1) +MapLibre Native Android uses portions of Android Lifecycle LiveData. +URL: [https://developer.android.com/jetpack/androidx/releases/lifecycle#2.6.1](https://developer.android.com/jetpack/androidx/releases/lifecycle#2.6.1) License: [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) =========================================================================== -MapLibre Native Android uses portions of Android Lifecycle LiveData Core. -URL: [https://developer.android.com/jetpack/androidx/releases/lifecycle#2.6.1](https://developer.android.com/jetpack/androidx/releases/lifecycle#2.6.1) +MapLibre Native Android uses portions of Android Lifecycle LiveData Core. +URL: [https://developer.android.com/jetpack/androidx/releases/lifecycle#2.6.1](https://developer.android.com/jetpack/androidx/releases/lifecycle#2.6.1) License: [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) =========================================================================== -MapLibre Native Android uses portions of Android Lifecycle Runtime. -URL: [https://developer.android.com/jetpack/androidx/releases/lifecycle#2.6.1](https://developer.android.com/jetpack/androidx/releases/lifecycle#2.6.1) +MapLibre Native Android uses portions of Android Lifecycle Runtime. +URL: [https://developer.android.com/jetpack/androidx/releases/lifecycle#2.6.1](https://developer.android.com/jetpack/androidx/releases/lifecycle#2.6.1) License: [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) =========================================================================== -MapLibre Native Android uses portions of Android Lifecycle ViewModel. -URL: [https://developer.android.com/jetpack/androidx/releases/lifecycle#2.6.1](https://developer.android.com/jetpack/androidx/releases/lifecycle#2.6.1) +MapLibre Native Android uses portions of Android Lifecycle ViewModel. +URL: [https://developer.android.com/jetpack/androidx/releases/lifecycle#2.6.1](https://developer.android.com/jetpack/androidx/releases/lifecycle#2.6.1) License: [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) =========================================================================== -MapLibre Native Android uses portions of Android Lifecycle ViewModel with SavedState. -URL: [https://developer.android.com/jetpack/androidx/releases/lifecycle#2.6.1](https://developer.android.com/jetpack/androidx/releases/lifecycle#2.6.1) +MapLibre Native Android uses portions of Android Lifecycle ViewModel with SavedState. +URL: [https://developer.android.com/jetpack/androidx/releases/lifecycle#2.6.1](https://developer.android.com/jetpack/androidx/releases/lifecycle#2.6.1) License: [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) =========================================================================== -MapLibre Native Android uses portions of Android Lifecycle-Common. -URL: [https://developer.android.com/jetpack/androidx/releases/lifecycle#2.6.1](https://developer.android.com/jetpack/androidx/releases/lifecycle#2.6.1) +MapLibre Native Android uses portions of Android Lifecycle-Common. +URL: [https://developer.android.com/jetpack/androidx/releases/lifecycle#2.6.1](https://developer.android.com/jetpack/androidx/releases/lifecycle#2.6.1) License: [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) =========================================================================== -MapLibre Native Android uses portions of Android Support Library Annotations. -URL: [http://developer.android.com/tools/extras/support-library.html](http://developer.android.com/tools/extras/support-library.html) +MapLibre Native Android uses portions of Android Support Library Annotations. +URL: [http://developer.android.com/tools/extras/support-library.html](http://developer.android.com/tools/extras/support-library.html) License: [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) =========================================================================== -MapLibre Native Android uses portions of Android Support Library collections. -URL: [http://developer.android.com/tools/extras/support-library.html](http://developer.android.com/tools/extras/support-library.html) +MapLibre Native Android uses portions of Android Support Library collections. +URL: [http://developer.android.com/tools/extras/support-library.html](http://developer.android.com/tools/extras/support-library.html) License: [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) =========================================================================== -MapLibre Native Android uses portions of Android Support Library compat. -URL: [https://developer.android.com/jetpack/androidx/releases/core#1.8.0](https://developer.android.com/jetpack/androidx/releases/core#1.8.0) +MapLibre Native Android uses portions of Android Support Library compat. +URL: [https://developer.android.com/jetpack/androidx/releases/core#1.8.0](https://developer.android.com/jetpack/androidx/releases/core#1.8.0) License: [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) =========================================================================== -MapLibre Native Android uses portions of Android Support Library Custom View. -URL: [http://developer.android.com/tools/extras/support-library.html](http://developer.android.com/tools/extras/support-library.html) +MapLibre Native Android uses portions of Android Support Library Custom View. +URL: [http://developer.android.com/tools/extras/support-library.html](http://developer.android.com/tools/extras/support-library.html) License: [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) =========================================================================== -MapLibre Native Android uses portions of Android Support Library Interpolators. -URL: [http://developer.android.com/tools/extras/support-library.html](http://developer.android.com/tools/extras/support-library.html) +MapLibre Native Android uses portions of Android Support Library Interpolators. +URL: [http://developer.android.com/tools/extras/support-library.html](http://developer.android.com/tools/extras/support-library.html) License: [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) =========================================================================== -MapLibre Native Android uses portions of Android Support Library loader. -URL: [http://developer.android.com/tools/extras/support-library.html](http://developer.android.com/tools/extras/support-library.html) +MapLibre Native Android uses portions of Android Support Library loader. +URL: [http://developer.android.com/tools/extras/support-library.html](http://developer.android.com/tools/extras/support-library.html) License: [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) =========================================================================== -MapLibre Native Android uses portions of Android Support Library View Pager. -URL: [http://developer.android.com/tools/extras/support-library.html](http://developer.android.com/tools/extras/support-library.html) +MapLibre Native Android uses portions of Android Support Library View Pager. +URL: [http://developer.android.com/tools/extras/support-library.html](http://developer.android.com/tools/extras/support-library.html) License: [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) =========================================================================== -MapLibre Native Android uses portions of Android Tracing. -URL: [https://developer.android.com/jetpack/androidx/releases/tracing#1.0.0](https://developer.android.com/jetpack/androidx/releases/tracing#1.0.0) +MapLibre Native Android uses portions of Android Tracing. +URL: [https://developer.android.com/jetpack/androidx/releases/tracing#1.0.0](https://developer.android.com/jetpack/androidx/releases/tracing#1.0.0) License: [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) =========================================================================== -MapLibre Native Android uses portions of AndroidX Futures. -URL: [https://developer.android.com/topic/libraries/architecture/index.html](https://developer.android.com/topic/libraries/architecture/index.html) +MapLibre Native Android uses portions of AndroidX Futures. +URL: [https://developer.android.com/topic/libraries/architecture/index.html](https://developer.android.com/topic/libraries/architecture/index.html) License: [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) =========================================================================== -MapLibre Native Android uses portions of androidx.profileinstaller:profileinstaller. -URL: [https://developer.android.com/jetpack/androidx/releases/profileinstaller#1.3.1](https://developer.android.com/jetpack/androidx/releases/profileinstaller#1.3.1) +MapLibre Native Android uses portions of androidx.profileinstaller:profileinstaller. +URL: [https://developer.android.com/jetpack/androidx/releases/profileinstaller#1.3.1](https://developer.android.com/jetpack/androidx/releases/profileinstaller#1.3.1) License: [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) =========================================================================== -MapLibre Native Android uses portions of Annotation. -URL: [https://developer.android.com/jetpack/androidx/releases/annotation#1.8.0](https://developer.android.com/jetpack/androidx/releases/annotation#1.8.0) +MapLibre Native Android uses portions of Annotation. +URL: [https://developer.android.com/jetpack/androidx/releases/annotation#1.8.0](https://developer.android.com/jetpack/androidx/releases/annotation#1.8.0) License: [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) =========================================================================== -MapLibre Native Android uses portions of Core Kotlin Extensions. -URL: [https://developer.android.com/jetpack/androidx](https://developer.android.com/jetpack/androidx) +MapLibre Native Android uses portions of Core Kotlin Extensions. +URL: [https://developer.android.com/jetpack/androidx](https://developer.android.com/jetpack/androidx) License: [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) =========================================================================== -MapLibre Native Android uses portions of Experimental annotation. -URL: [https://developer.android.com/jetpack/androidx/releases/annotation#1.4.0](https://developer.android.com/jetpack/androidx/releases/annotation#1.4.0) +MapLibre Native Android uses portions of Experimental annotation. +URL: [https://developer.android.com/jetpack/androidx/releases/annotation#1.4.0](https://developer.android.com/jetpack/androidx/releases/annotation#1.4.0) License: [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) =========================================================================== -MapLibre Native Android uses portions of fragment. -URL: [https://developer.android.com/jetpack/androidx/releases/fragment#1.7.1](https://developer.android.com/jetpack/androidx/releases/fragment#1.7.1) +MapLibre Native Android uses portions of fragment. +URL: [https://developer.android.com/jetpack/androidx/releases/fragment#1.7.1](https://developer.android.com/jetpack/androidx/releases/fragment#1.7.1) License: [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) =========================================================================== -MapLibre Native Android uses portions of Gson. +MapLibre Native Android uses portions of Gson. License: [Apache-2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) =========================================================================== -MapLibre Native Android uses portions of Guava ListenableFuture only. +MapLibre Native Android uses portions of Guava ListenableFuture only. License: [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) =========================================================================== -MapLibre Native Android uses portions of JetBrains Java Annotations. -URL: [https://github.com/JetBrains/java-annotations](https://github.com/JetBrains/java-annotations) +MapLibre Native Android uses portions of JetBrains Java Annotations. +URL: [https://github.com/JetBrains/java-annotations](https://github.com/JetBrains/java-annotations) License: [The Apache Software License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) =========================================================================== -MapLibre Native Android uses portions of Kotlin Stdlib. -URL: [https://kotlinlang.org/](https://kotlinlang.org/) +MapLibre Native Android uses portions of Kotlin Stdlib. +URL: [https://kotlinlang.org/](https://kotlinlang.org/) License: [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) =========================================================================== -MapLibre Native Android uses portions of Kotlin Stdlib Jdk7. -URL: [https://kotlinlang.org/](https://kotlinlang.org/) +MapLibre Native Android uses portions of Kotlin Stdlib Jdk7. +URL: [https://kotlinlang.org/](https://kotlinlang.org/) License: [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) =========================================================================== -MapLibre Native Android uses portions of Kotlin Stdlib Jdk8. -URL: [https://kotlinlang.org/](https://kotlinlang.org/) +MapLibre Native Android uses portions of Kotlin Stdlib Jdk8. +URL: [https://kotlinlang.org/](https://kotlinlang.org/) License: [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) =========================================================================== -MapLibre Native Android uses portions of kotlinx-coroutines-android. -URL: [https://github.com/Kotlin/kotlinx.coroutines](https://github.com/Kotlin/kotlinx.coroutines) +MapLibre Native Android uses portions of kotlinx-coroutines-android. +URL: [https://github.com/Kotlin/kotlinx.coroutines](https://github.com/Kotlin/kotlinx.coroutines) License: [The Apache Software License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) =========================================================================== -MapLibre Native Android uses portions of kotlinx-coroutines-core. -URL: [https://github.com/Kotlin/kotlinx.coroutines](https://github.com/Kotlin/kotlinx.coroutines) +MapLibre Native Android uses portions of kotlinx-coroutines-core. +URL: [https://github.com/Kotlin/kotlinx.coroutines](https://github.com/Kotlin/kotlinx.coroutines) License: [The Apache Software License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) =========================================================================== -MapLibre Native Android uses portions of Mapbox Android Gestures Library. -URL: [https://github.com/mapbox/mapbox-gestures-android](https://github.com/mapbox/mapbox-gestures-android) +MapLibre Native Android uses portions of Mapbox Android Gestures Library. +URL: [https://github.com/mapbox/mapbox-gestures-android](https://github.com/mapbox/mapbox-gestures-android) License: [BSD](https://opensource.org/licenses/BSD-2-Clause) =========================================================================== -MapLibre Native Android uses portions of MapLibre Android Java Utilities. -URL: [https://github.com/maplibre/maplibre-java](https://github.com/maplibre/maplibre-java) +MapLibre Native Android uses portions of MapLibre Android Java Utilities. +URL: [https://github.com/maplibre/maplibre-java](https://github.com/maplibre/maplibre-java) License: [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) =========================================================================== -MapLibre Native Android uses portions of MapLibre Android Java Utilities. -URL: [https://github.com/maplibre/maplibre-java](https://github.com/maplibre/maplibre-java) +MapLibre Native Android uses portions of MapLibre Android Java Utilities. +URL: [https://github.com/maplibre/maplibre-java](https://github.com/maplibre/maplibre-java) License: [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) =========================================================================== -MapLibre Native Android uses portions of okhttp. -URL: [https://square.github.io/okhttp/](https://square.github.io/okhttp/) +MapLibre Native Android uses portions of okhttp. +URL: [https://square.github.io/okhttp/](https://square.github.io/okhttp/) License: [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) =========================================================================== -MapLibre Native Android uses portions of okio. -URL: [https://github.com/square/okio/](https://github.com/square/okio/) +MapLibre Native Android uses portions of okio. +URL: [https://github.com/square/okio/](https://github.com/square/okio/) License: [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) =========================================================================== -MapLibre Native Android uses portions of Saved State. -URL: [https://developer.android.com/jetpack/androidx/releases/savedstate#1.2.1](https://developer.android.com/jetpack/androidx/releases/savedstate#1.2.1) +MapLibre Native Android uses portions of Saved State. +URL: [https://developer.android.com/jetpack/androidx/releases/savedstate#1.2.1](https://developer.android.com/jetpack/androidx/releases/savedstate#1.2.1) License: [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) =========================================================================== -MapLibre Native Android uses portions of Timber. -URL: [https://github.com/JakeWharton/timber](https://github.com/JakeWharton/timber) +MapLibre Native Android uses portions of Timber. +URL: [https://github.com/JakeWharton/timber](https://github.com/JakeWharton/timber) License: [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) =========================================================================== -MapLibre Native Android uses portions of VersionedParcelable. -URL: [http://developer.android.com/tools/extras/support-library.html](http://developer.android.com/tools/extras/support-library.html) +MapLibre Native Android uses portions of VersionedParcelable. +URL: [http://developer.android.com/tools/extras/support-library.html](http://developer.android.com/tools/extras/support-library.html) License: [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) =========================================================================== -MapLibre Native Android uses portions of Gradle License Plugin. -URL: [https://github.com/jaredsburrows/gradle-license-plugin](https://github.com/jaredsburrows/gradle-license-plugin) +MapLibre Native Android uses portions of Gradle License Plugin. +URL: [https://github.com/jaredsburrows/gradle-license-plugin](https://github.com/jaredsburrows/gradle-license-plugin) License: [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) =========================================================================== @@ -669,7 +669,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ### [wagyu](https://github.com/mapbox/wagyu.git) by Angus Johnson and Mapbox ``` -Parts of the code in the Wagyu Library are derived from the version of the +Parts of the code in the Wagyu Library are derived from the version of the Clipper Library by Angus Johnson listed below. Author : Angus Johnson @@ -677,8 +677,8 @@ Version : 6.4.0 Date : 2 July 2015 Website : http://www.angusj.com -Copyright for portions of the derived code in the Wagyu library are held -by Angus Johnson, 2010-2015. All other copyright for the Wagyu Library are held by +Copyright for portions of the derived code in the Wagyu library are held +by Angus Johnson, 2010-2015. All other copyright for the Wagyu Library are held by Mapbox, 2016. This code is published in accordance with, and retains the same license as the Clipper Library by Angus Johnson. @@ -777,8 +777,8 @@ DEALINGS IN THE SOFTWARE. ### [RapidJSON](https://rapidjson.org) by THL A29 Limited, a Tencent company, and Milo Yip ``` -Tencent is pleased to support the open source community by making RapidJSON available. - +Tencent is pleased to support the open source community by making RapidJSON available. + Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved. If you have downloaded a copy of the RapidJSON binary from Tencent, please note that the RapidJSON binary is licensed under the MIT License. @@ -790,13 +790,13 @@ Other dependencies and licenses: Open Source Software Licensed Under the BSD License: -------------------------------------------------------------------- -The msinttypes r29 -Copyright (c) 2006-2013 Alexander Chemeris +The msinttypes r29 +Copyright (c) 2006-2013 Alexander Chemeris All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: -* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. +* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. @@ -805,7 +805,7 @@ THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY EXPR Open Source Software Licensed Under the JSON License: -------------------------------------------------------------------- -json.org +json.org Copyright (c) 2002 JSON.org All Rights Reserved. @@ -813,7 +813,7 @@ JSON_checker Copyright (c) 2002 JSON.org All Rights Reserved. - + Terms of the JSON License: --------------------------------------------------- diff --git a/platform/android/MapLibreAndroid/src/main/java/org/maplibre/android/style/expressions/Expression.java b/platform/android/MapLibreAndroid/src/main/java/org/maplibre/android/style/expressions/Expression.java index dafd5b4f7b5..51c8d211050 100644 --- a/platform/android/MapLibreAndroid/src/main/java/org/maplibre/android/style/expressions/Expression.java +++ b/platform/android/MapLibreAndroid/src/main/java/org/maplibre/android/style/expressions/Expression.java @@ -1553,7 +1553,7 @@ public static Expression in(@NonNull Expression needle, @NonNull Expression hays } /** - * Returns the first position at which a `needle` can be found in a `haystack`. + * Returns the first position at which a `needle` can be found in a `haystack`. * * @param needle the item expression * @param haystack the array or string expression @@ -1578,7 +1578,7 @@ public static Expression indexOf(@NonNull Expression keyword, @NonNull Expressio } /** - * Returns items from an array or a substring from a string from a specified start index. + * Returns items from an array or a substring from a string from a specified start index. * The return value is inclusive of the start index. * * @param input the array or string expression @@ -1591,7 +1591,7 @@ public static Expression slice(@NonNull Expression input, @NonNull Expression fr } /** - * Returns items from an array or a substring from a string between a start index and an end index if set. + * Returns items from an array or a substring from a string between a start index and an end index if set. * The return value is inclusive of the start index, but not of the end index. * * @param input the array or string expression diff --git a/platform/android/MapLibreAndroid/src/test/java/org/maplibre/android/MapLibreTest.kt b/platform/android/MapLibreAndroid/src/test/java/org/maplibre/android/MapLibreTest.kt index 0c289a5adfc..54d6b103acd 100644 --- a/platform/android/MapLibreAndroid/src/test/java/org/maplibre/android/MapLibreTest.kt +++ b/platform/android/MapLibreAndroid/src/test/java/org/maplibre/android/MapLibreTest.kt @@ -75,7 +75,7 @@ class MapLibreTest { .thenReturn(typedArray) expectedException.expect(MapLibreConfigurationException::class.java) expectedException.expectMessage(""" - + Using MapView requires calling MapLibre.getInstance(Context context, String apiKey, WellKnownTileServer wellKnownTileServer) before inflating or creating the view. """.trimIndent()) MapView(context!!) diff --git a/platform/android/MapLibreAndroidTestApp/lint/lint-baseline-ci.xml b/platform/android/MapLibreAndroidTestApp/lint/lint-baseline-ci.xml index 51c61212688..531cc1d2a61 100644 --- a/platform/android/MapLibreAndroidTestApp/lint/lint-baseline-ci.xml +++ b/platform/android/MapLibreAndroidTestApp/lint/lint-baseline-ci.xml @@ -7,7 +7,7 @@ lint-baseline-ci.xml (THIS FILE) which is the only one included in the repo. Eventually, it'll be removed (when we remove all current lint errors included). --> - + println("Thermal status changed $status") } } - + mapView = findViewById(R.id.mapView) as MapView mapView.getMapAsync { maplibreMap: MapLibreMap -> val benchmarkResult = BenchmarkResult(arrayListOf()) diff --git a/platform/android/MapLibreAndroidTestApp/src/main/res/layout/activity_textureview_resize.xml b/platform/android/MapLibreAndroidTestApp/src/main/res/layout/activity_textureview_resize.xml index 70e51c2c0df..a945162096b 100644 --- a/platform/android/MapLibreAndroidTestApp/src/main/res/layout/activity_textureview_resize.xml +++ b/platform/android/MapLibreAndroidTestApp/src/main/res/layout/activity_textureview_resize.xml @@ -7,7 +7,7 @@ android:layout_height="match_parent" android:orientation="vertical"> - + 0dp false false - + road-label diff --git a/platform/android/android.cmake b/platform/android/android.cmake index 63fa9e20e3d..a2b2e2d8ed1 100644 --- a/platform/android/android.cmake +++ b/platform/android/android.cmake @@ -152,7 +152,7 @@ target_include_directories( # this is needed because Android is not officially supported # https://discourse.cmake.org/t/error-when-crosscompiling-with-whole-archive-target-link/9394 # https://cmake.org/cmake/help/latest/release/3.24.html#generator-expressions -set(CMAKE_LINK_LIBRARY_USING_WHOLE_ARCHIVE +set(CMAKE_LINK_LIBRARY_USING_WHOLE_ARCHIVE "-Wl,--whole-archive -Wl,--no-whole-archive" ) set(CMAKE_LINK_LIBRARY_USING_WHOLE_ARCHIVE_SUPPORTED True) diff --git a/platform/android/checkstyle.xml b/platform/android/checkstyle.xml index b75250c7786..c73ada1565d 100644 --- a/platform/android/checkstyle.xml +++ b/platform/android/checkstyle.xml @@ -221,6 +221,6 @@ - + diff --git a/platform/android/docs/camera/cameraposition.md b/platform/android/docs/camera/cameraposition.md index b4118b5f9c7..9cb11d4487b 100644 --- a/platform/android/docs/camera/cameraposition.md +++ b/platform/android/docs/camera/cameraposition.md @@ -10,7 +10,7 @@ This example showcases how to listen to camera change events. -The camera animation is kicked off with this code: +The camera animation is kicked off with this code: ```kotlin --8<-- "MapLibreAndroidTestApp/src/main/java/org/maplibre/android/testapp/activity/camera/CameraPositionActivity.kt:cameraPosition" diff --git a/platform/android/docs/geojson-guide.md b/platform/android/docs/geojson-guide.md index 28072e08383..02e42c64689 100644 --- a/platform/android/docs/geojson-guide.md +++ b/platform/android/docs/geojson-guide.md @@ -97,7 +97,7 @@ There are various ways you can create a `GeoJSONSource`. Some of the options are --8<-- "MapLibreAndroidTestApp/src/main/java/org/maplibre/android/testapp/activity/style/HeatmapLayerActivity.kt:createEarthquakeSource" ``` -```kotlin +```kotlin --8<-- "MapLibreAndroidTestApp/src/main/java/org/maplibre/android/testapp/activity/style/HeatmapLayerActivity.kt:constants" ``` diff --git a/platform/android/docs/location-component.md b/platform/android/docs/location-component.md index 2dc7b7595e2..d7b2c6f26d2 100644 --- a/platform/android/docs/location-component.md +++ b/platform/android/docs/location-component.md @@ -82,8 +82,8 @@ Here is the final results with different color configurations. For the complete -[^1]: A variety of [camera modes] determine how the camera will track the user location. - They provide the right context to your users at the correct time. +[^1]: A variety of [camera modes] determine how the camera will track the user location. + They provide the right context to your users at the correct time. [LocationComponent]: https://maplibre.org/maplibre-native/android/api/-map-libre%20-native%20-android/org.maplibre.android.location/-location-component/index.html [Android Developer Documentation]: https://developer.android.com/training/location/permissions diff --git a/platform/android/docs/styling/building-layer.md b/platform/android/docs/styling/building-layer.md index 5e8a6a880f0..0e86dd08a63 100644 --- a/platform/android/docs/styling/building-layer.md +++ b/platform/android/docs/styling/building-layer.md @@ -2,7 +2,7 @@ {{ activity_source_note("BuildingFillExtrusionActivity.kt") }} -In this example will show how to add a [Fill Extrusion](https://maplibre.org/maplibre-style-spec/layers/#fill-extrusion) layer to a style. +In this example will show how to add a [Fill Extrusion](https://maplibre.org/maplibre-style-spec/layers/#fill-extrusion) layer to a style.
-We use the [OpenFreeMap Bright](https://openfreemap.org/quick_start/) style which, unlike OpenFreeMap Libery, does not have a fill extrusion layer by default. However, if you inspect this style with [Maputnik](https://maplibre.org/maputnik) you will find that the multipolygons in the `building` layer (of the `openfreemap` source) each have `render_min_height` and `render_height` properties. +We use the [OpenFreeMap Bright](https://openfreemap.org/quick_start/) style which, unlike OpenFreeMap Libery, does not have a fill extrusion layer by default. However, if you inspect this style with [Maputnik](https://maplibre.org/maputnik) you will find that the multipolygons in the `building` layer (of the `openfreemap` source) each have `render_min_height` and `render_height` properties. ```kotlin title="Setting up the fill extrusion layer" --8<-- "MapLibreAndroidTestApp/src/main/java/org/maplibre/android/testapp/activity/style/BuildingFillExtrusionActivity.kt:setupBuildings" diff --git a/platform/android/docs/styling/data-driven-style.md b/platform/android/docs/styling/data-driven-style.md index 7aa7d499f09..29ce1f70a33 100644 --- a/platform/android/docs/styling/data-driven-style.md +++ b/platform/android/docs/styling/data-driven-style.md @@ -4,7 +4,7 @@ In this example we will look at various types of data-driven styling. -The examples with 'Source' in the title apply data-driven styling the [parks of Amsterdam](https://github.com/maplibre/maplibre-native/blob/main/platform/android/MapLibreAndroidTestApp/src/main/res/raw/amsterdam.geojson). Those examples often are based on the somewhat arbitrary `stroke-width` property part of the GeoJSON features. These examples are therefore most interesting to learn about the Kotlin API that can be used for data-driven styling. +The examples with 'Source' in the title apply data-driven styling the [parks of Amsterdam](https://github.com/maplibre/maplibre-native/blob/main/platform/android/MapLibreAndroidTestApp/src/main/res/raw/amsterdam.geojson). Those examples often are based on the somewhat arbitrary `stroke-width` property part of the GeoJSON features. These examples are therefore most interesting to learn about the Kotlin API that can be used for data-driven styling. !!! tip Refer to the [MapLibre Style Spec](https://maplibre.org/maplibre-style-spec/) for more information about [expressions](https://maplibre.org/maplibre-style-spec/expressions/) such as [`interpolate`](https://maplibre.org/maplibre-style-spec/expressions/#interpolate) and [`step`](https://maplibre.org/maplibre-style-spec/expressions/#step). diff --git a/platform/android/docs/styling/live-realtime-data.md b/platform/android/docs/styling/live-realtime-data.md index 3ca725a9ad3..16562ef1032 100644 --- a/platform/android/docs/styling/live-realtime-data.md +++ b/platform/android/docs/styling/live-realtime-data.md @@ -2,7 +2,7 @@ {{ activity_source_note("RealTimeGeoJsonActivity.kt") }} -In this example you will learn how to add a live GeoJSON source. We have set up a [lambda function](https://m6rgfvqjp34nnwqcdm4cmmy3cm0dtupu.lambda-url.us-east-1.on.aws/) that returns a new GeoJSON point every time it is called. +In this example you will learn how to add a live GeoJSON source. We have set up a [lambda function](https://m6rgfvqjp34nnwqcdm4cmmy3cm0dtupu.lambda-url.us-east-1.on.aws/) that returns a new GeoJSON point every time it is called.