diff --git a/.github/workflows/android-ci-pull.yml b/.github/workflows/android-ci-pull.yml index 86370f26ae4..8cd743ba99f 100644 --- a/.github/workflows/android-ci-pull.yml +++ b/.github/workflows/android-ci-pull.yml @@ -18,7 +18,6 @@ on: - "src/**" - "test/**" - "vendor/**" - - maplibre-gl-js - ".gitmodules" - "!**/*.md" diff --git a/.github/workflows/android-ci.yml b/.github/workflows/android-ci.yml index 0905fc72f52..d89e6c061d0 100644 --- a/.github/workflows/android-ci.yml +++ b/.github/workflows/android-ci.yml @@ -20,7 +20,6 @@ on: - "src/**" - "test/**" - "vendor/**" - - maplibre-gl-js - ".gitmodules" - "!**/*.md" diff --git a/.github/workflows/core-build.yml b/.github/workflows/core-build.yml index 8c206188777..63f18fe8b5b 100644 --- a/.github/workflows/core-build.yml +++ b/.github/workflows/core-build.yml @@ -10,7 +10,6 @@ on: - "include/**" - "workflows/core-build.yml" - "vendor/**" - - maplibre-gl-js - "CMakeLists.txt" concurrency: diff --git a/.github/workflows/ios-ci.yml b/.github/workflows/ios-ci.yml index 0028d3d81a0..a6da002aac0 100644 --- a/.github/workflows/ios-ci.yml +++ b/.github/workflows/ios-ci.yml @@ -21,7 +21,6 @@ on: - "src/**" - "test/**" - "vendor/**" - - maplibre-gl-js - ".gitmodules" - "!**/*.md" diff --git a/.github/workflows/macos-ci.yml b/.github/workflows/macos-ci.yml index fc582b6c86b..ce9e214b44b 100644 --- a/.github/workflows/macos-ci.yml +++ b/.github/workflows/macos-ci.yml @@ -21,7 +21,6 @@ on: - "src/**" - "test/**" - "vendor/**" - - maplibre-gl-js - ".gitmodules" - "!**/*.md" @@ -42,7 +41,6 @@ on: - "src/**" - "test/**" - "vendor/**" - - maplibre-gl-js - ".gitmodules" - "!**/*.md" diff --git a/.github/workflows/node-ci.yml b/.github/workflows/node-ci.yml index 24eb94de388..f40054fe6d5 100644 --- a/.github/workflows/node-ci.yml +++ b/.github/workflows/node-ci.yml @@ -25,7 +25,6 @@ on: - "src/**" - "test/**" - "vendor/**" - - maplibre-gl-js - ".gitmodules" - "!**/*.md" @@ -50,7 +49,6 @@ on: - "src/**" - "test/**" - "vendor/**" - - maplibre-gl-js - ".gitmodules" - "!**/*.md" diff --git a/.github/workflows/qt-ci.yml b/.github/workflows/qt-ci.yml index bff5703fe3a..cb508451a57 100644 --- a/.github/workflows/qt-ci.yml +++ b/.github/workflows/qt-ci.yml @@ -22,7 +22,6 @@ on: - "src/**" - "test/**" - "vendor/**" - - maplibre-gl-js - ".gitmodules" - "!**/*.md" @@ -44,7 +43,6 @@ on: - "src/**" - "test/**" - "vendor/**" - - maplibre-gl-js - ".gitmodules" - "!**/*.md" diff --git a/.github/workflows/update-gl-js.yml b/.github/workflows/update-gl-js.yml deleted file mode 100644 index a26b225dcb5..00000000000 --- a/.github/workflows/update-gl-js.yml +++ /dev/null @@ -1,56 +0,0 @@ -name: update-gl-js - -on: - workflow_dispatch: - inputs: - commit: - description: 'Commit' - required: true - default: '49bc4ca45' - -jobs: - update-gl-js: - runs-on: macos-12 - steps: - - uses: actions/checkout@v3 - with: - submodules: recursive - fetch-depth: 0 - - uses: actions/setup-node@v3 - with: - node-version: 10 - - - name: Setup git and create branch - run: | - git config --global user.email "mail@example.com" - git config --global user.name "GitHub Action" - git checkout -b update-gl-js-to-${{ github.event.inputs.commit }} - - - name: Checkout MapLibre GL JS - working-directory: maplibre-gl-js - run: | - git checkout ${{ github.event.inputs.commit }} - yarn install - - - name: Generate code for main repo - run: | - npm ci --ignore-scripts - node scripts/generate-shaders.js - - - name: Generate code for iOS - working-directory: platform/ios - run: | - npm install --ignore-scripts - node platform/darwin/scripts/generate-style-code.js - node platform/darwin/scripts/update-examples.js - - - name: Commit and push changes - run: | - git add -u - git commit -m "Update MapLibre GL JS to ${{ github.event.inputs.commit }}" - git push --set-upstream origin update-gl-js-to-${{ github.event.inputs.commit }} - - - name: Create pull request - run: gh pr create --base main --fill - env: - GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} diff --git a/.gitmodules b/.gitmodules index e91d2c31721..ba7433b9eea 100644 --- a/.gitmodules +++ b/.gitmodules @@ -46,9 +46,6 @@ [submodule "platform/android/vendor/mapbox-gestures-android"] path = platform/android/vendor/mapbox-gestures-android url = https://github.com/mapbox/mapbox-gestures-android.git -[submodule "maplibre-gl-js"] - path = maplibre-gl-js - url = https://github.com/maplibre/maplibre-gl-js.git [submodule "docs/doxygen/doxygen-awesome-css"] path = docs/doxygen/doxygen-awesome-css url = https://github.com/jothepro/doxygen-awesome-css.git diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md index 4cabb0d0757..d2464610580 100644 --- a/ARCHITECTURE.md +++ b/ARCHITECTURE.md @@ -21,14 +21,6 @@ Code and build scripts belonging to platform SDKs are contained in the `platform - `platform/android` - Android SDK, forked from https://github.com/mapbox/mapbox-gl-native-android/commit/4c12fb2c. - `platform/glfw` - [GLFW](https://www.glfw.org) is library to support OpenGL development on the desktop. The code in this directory builds an executable application `mbgl-glfw` for demo/dev/local testing purposes. -## Maplibre-gl-js - -`maplibre-gl-js` is added to this repostiory as a top-level submodule to provide - -- Test cases and test data, e.g. all rendering test manifests json files under `render-test` load test cases from `maplibre-gl-js/test/*`. -- Shader written in GLSL ES. -- Style specification - ## Other directories - `benchmark` contains the performance tests built using https://github.com/google/benchmark/. The code under this directory builds the `mbgl-benchmark-test` executable to execute the benchmark tests. diff --git a/DEVELOPING.md b/DEVELOPING.md index c17c95db5a6..b14112ac474 100644 --- a/DEVELOPING.md +++ b/DEVELOPING.md @@ -7,14 +7,13 @@ To check that the output of the rendering is correct, we compare actual rendered The directory sturcture of the render tests looks like: ``` -maplibre-gl-js/ - test/ - integration/ - render-tests/ - / - / - expected.png - style.json +maetrics/ + integration/ + render-tests/ + / + / + expected.png + style.json ``` After the render test run, the folder will also contain an `actual.png` file and a `diff.png` which is the difference between the expected and the actual image. There is a pixel difference threshold value which is used to decide if a render test passed or failed. diff --git a/expression-test/expression_test_parser.cpp b/expression-test/expression_test_parser.cpp index e7b826087b2..ca504a01424 100644 --- a/expression-test/expression_test_parser.cpp +++ b/expression-test/expression_test_parser.cpp @@ -342,7 +342,7 @@ std::tuple, bool, uint32_t> pars exit(2); } - filesystem::path rootPath {std::string(TEST_RUNNER_ROOT_PATH).append("/maplibre-gl-js/test/integration/expression-tests")}; + filesystem::path rootPath {std::string(TEST_RUNNER_ROOT_PATH).append("/metrics/integration/expression-tests")}; if (!filesystem::exists(rootPath)) { Log::Error(Event::General, "Test path '" + rootPath.string() + "' does not exist."); exit(3); diff --git a/maplibre-gl-js b/maplibre-gl-js deleted file mode 160000 index 9489d7654ef..00000000000 --- a/maplibre-gl-js +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 9489d7654ef9bb36a44c9b98446b84eccb98628a diff --git a/metrics/FIXME-linux-asan-style.json b/metrics/FIXME-linux-asan-style.json index 09eafcc9649..d5e2f28dc37 100644 --- a/metrics/FIXME-linux-asan-style.json +++ b/metrics/FIXME-linux-asan-style.json @@ -1,5 +1,5 @@ { - "base_test_path": "../maplibre-gl-js/test/integration", + "base_test_path": "integration", "cache_path": "cache-style.db", "expectation_paths": [ "expectations/platform-all" diff --git a/metrics/android-render-test-runner-style.json b/metrics/android-render-test-runner-style.json index 9754c166291..b6b0a73e889 100644 --- a/metrics/android-render-test-runner-style.json +++ b/metrics/android-render-test-runner-style.json @@ -1,5 +1,5 @@ { - "base_test_path": "../maplibre-gl-js/test/integration", + "base_test_path": "integration", "cache_path": "cache-style.db", "expectation_paths": [ "expectations/platform-all", diff --git a/metrics/integration/README.md b/metrics/integration/README.md new file mode 100644 index 00000000000..77c43e037bf --- /dev/null +++ b/metrics/integration/README.md @@ -0,0 +1,157 @@ +These integration tests verify the correctness and consistency of [mapbox-gl-js](https://github.com/mapbox/mapbox-gl-js) and +[mapbox-gl-native](https://github.com/mapbox/mapbox-gl-native) rendering. + +## Organization + +Tests are contained in a directory tree, generally organized by [style specification](https://github.com/mapbox/mapbox-gl-style-spec) +property: `background-color`, `line-width`, etc., with a second level of directories below that for individual tests. For example, the test for specifying a literal `circle-radius` value lives in [`test/integration/render-tests/circle-radius/literal/`](https://github.com/mapbox/mapbox-gl-js/tree/master/test/integration/render-tests/circle-radius/literal). + +Within a leaf directory is a `style.json` file (e.g. [`circle-radius/literal/style.json`](https://github.com/mapbox/mapbox-gl-js/blob/master/test/integration/render-tests/circle-radius/literal/style.json)), which contains the minimal style needed for the given test case. The style can specify the map size, center, bearing, and pitch, and additional test metadata (e.g. output image dimensions). + +The expected output for a given test case is in `expected.png`, e.g. [`circle-radius/literal/expected.png`](https://github.com/mapbox/mapbox-gl-js/blob/master/test/integration/render-tests/circle-radius/literal/expected.png). + +Supporting files -- glyphs, sprites, and tiles -- live in their own respective subdirectories at the top level. The test +harness sets up the environment such that requests for these resources are directed to the correct location. + +The contents of vector tile fixtures can be read using the [`vt2geojson`](https://github.com/mapbox/vt2geojson) tool (see below). + +## Running tests + +To run the entire integration test suite (both render or query tests), from within the `mapbox-gl-js` directory run the command: +``` +yarn run test-suite +``` + +To run only the render/query tests: + +``` +yarn run test-render +``` +or +``` +yarn run test-query-node +``` + +### Running specific tests + +To run a subset of tests or an individual test, you can pass a specific subdirectory to the `test-render` script. For example, to run all the tests for a given property, e.g. `circle-radius`: +``` +$ yarn run test-render circle-radius +... +* passed circle-radius/antimeridian +* passed circle-radius/default +* passed circle-radius/function +* passed circle-radius/literal +* passed circle-radius/property-function +* passed circle-radius/zoom-and-property-function +6 passed (100.0%) +Results at: ./test/integration/render-tests/index.html +Done in 2.71s. +``` +Or to run a single test: +``` +$ yarn run test-render circle-radius/literal +... +* passed circle-radius/literal +1 passed (100.0%) +Results at: ./test/integration/render-tests/index.html +Done in 2.32s. +``` + +### Viewing test results + +During a test run, the test harness will use GL-JS to create an `actual.png` image from the given `style.json`, and will then use [pixelmatch](https://github.com/mapbox/pixelmatch) to compare that image to `expected.png`, generating a `diff.png` highlighting the mismatching pixels (if any) in red. + +After the test(s) have run, you can view the results graphically by opening the `index.html` file generated by the harness: + +``` +open ./test/integration/render-tests/index.html +``` +or +``` +open ./test/integration/query-tests/index.html +``` + +## Running tests in the browser + +Query tests can be run in the browser, the server for serving up the test page and test fixtures starts when you run +``` +yarn run start +``` +OR +``` +yarn run start-debug +``` + +If you want to run only the test server run: +``` +yarn run watch-query +``` + +Then open the following url in the browser of your choice to start running the tests. +``` +http://localhost:7357/ +``` + +### Running specific tests + +A filter can be specified by using the `filter` query param in the url. E.g, adding +``` +?filter=circle-pitch +``` +to the end of the url will only run the tests that contain `circle-pitch` in the name. + +### Build Notifications + +The terminal window can be very noisy with both the build and the test servers running in the same session. +So the server uses platform notifications to inform when the build has finished. If this behaviour is annoying, it can be disabled by setting the following env-var +``` +DISABLE_BUILD_NOTIFICATIONS=true +``` + + +## Writing new tests + +_Note: Expected results are always generated with the **js** implementation. This is merely for consistency and does not +imply that in the event of a rendering discrepancy, the js implementation is always correct._ + +To add a new render test: +1. Create a new directory `test/integration/render-tests//` + +2. Create a new `style.json` file within that directory, specifying the map to load. Feel free to copy & modify one of the existing `style.json` files from the `render-tests` subdirectories. + +3. Generate an `expected.png` image from the given style by running the new test with the `UPDATE` flag enabled: + ``` + $ UPDATE=1 yarn run test-render / + ``` + The test will appear to fail, but you'll now see a new `expected.png` in the test directory. + +4. Manually inspect `expected.png` to verify it looks as expected, and optionally run the test again without the update flag (`yarn run test-render /`) to watch it pass (enjoy that dopamine kick!) + +5. Commit the new `style.json` and `expected.png` :rocket: + + +## Reading Vector Tile Fixtures + +Install `vt2geojson`, a command line utility which turns vector tiles into geojson, and `harp`, a simple file server. + +``` +npm install -g vt2geojson harp +``` + +Start a static file server +``` +harp server . +``` + +Read the contents of an entire vector tile + +``` +vt2geojson -z 14 -y 8803 -x 5374 http://localhost:9000/tiles/14-8803-5374.mvt +``` + +Read the contents of a particular layer in a vector tile + +``` +vt2geojson --layer poi_label -z 14 -y 8803 -x 5374 http://localhost:9000/tiles/14-8803-5374.mvt +``` diff --git a/metrics/integration/custom_layer_implementations.js b/metrics/integration/custom_layer_implementations.js new file mode 100644 index 00000000000..1da7b1f7a8f --- /dev/null +++ b/metrics/integration/custom_layer_implementations.js @@ -0,0 +1,123 @@ +class NullIsland { + constructor() { + this.id = 'null-island'; + this.type = 'custom'; + this.renderingMode = '2d'; + } + + onAdd(map, gl) { + const vertexSource = ` + uniform mat4 u_matrix; + void main() { + gl_Position = u_matrix * vec4(0.5, 0.5, 0.0, 1.0); + gl_PointSize = 20.0; + }`; + + const fragmentSource = ` + void main() { + gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0); + }`; + + const vertexShader = gl.createShader(gl.VERTEX_SHADER); + gl.shaderSource(vertexShader, vertexSource); + gl.compileShader(vertexShader); + const fragmentShader = gl.createShader(gl.FRAGMENT_SHADER); + gl.shaderSource(fragmentShader, fragmentSource); + gl.compileShader(fragmentShader); + + this.program = gl.createProgram(); + gl.attachShader(this.program, vertexShader); + gl.attachShader(this.program, fragmentShader); + gl.linkProgram(this.program); + } + + render(gl, matrix) { + gl.useProgram(this.program); + gl.uniformMatrix4fv(gl.getUniformLocation(this.program, "u_matrix"), false, matrix); + gl.drawArrays(gl.POINTS, 0, 1); + } +} + +class Tent3D { + constructor() { + this.id = 'tent-3d'; + this.type = 'custom'; + this.renderingMode = '3d'; + } + + onAdd(map, gl) { + + const vertexSource = ` + + attribute vec3 aPos; + uniform mat4 uMatrix; + + void main() { + gl_Position = uMatrix * vec4(aPos, 1.0); + } + `; + + const fragmentSource = ` + void main() { + gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0); + } + `; + + const vertexShader = gl.createShader(gl.VERTEX_SHADER); + gl.shaderSource(vertexShader, vertexSource); + gl.compileShader(vertexShader); + const fragmentShader = gl.createShader(gl.FRAGMENT_SHADER); + gl.shaderSource(fragmentShader, fragmentSource); + gl.compileShader(fragmentShader); + + this.program = gl.createProgram(); + gl.attachShader(this.program, vertexShader); + gl.attachShader(this.program, fragmentShader); + gl.linkProgram(this.program); + gl.validateProgram(this.program); + + this.program.aPos = gl.getAttribLocation(this.program, "aPos"); + this.program.uMatrix = gl.getUniformLocation(this.program, "uMatrix"); + + const x = 0.5 - 0.015; + const y = 0.5 - 0.01; + const z = 0.01; + const d = 0.01; + + const vertexArray = new Float32Array([ + x, y, 0, + x + d, y, 0, + x, y + d, z, + x + d, y + d, z, + x, y + d + d, 0, + x + d, y + d + d, 0]); + const indexArray = new Uint16Array([ + 0, 1, 2, + 1, 2, 3, + 2, 3, 4, + 3, 4, 5 + ]); + + this.vertexBuffer = gl.createBuffer(); + gl.bindBuffer(gl.ARRAY_BUFFER, this.vertexBuffer); + gl.bufferData(gl.ARRAY_BUFFER, vertexArray, gl.STATIC_DRAW); + this.indexBuffer = gl.createBuffer(); + gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, this.indexBuffer); + gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, indexArray, gl.STATIC_DRAW); + } + + render(gl, matrix) { + gl.useProgram(this.program); + gl.bindBuffer(gl.ARRAY_BUFFER, this.vertexBuffer); + gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, this.indexBuffer); + gl.enableVertexAttribArray(this.program.a_pos); + gl.vertexAttribPointer(this.program.aPos, 3, gl.FLOAT, false, 0, 0); + gl.uniformMatrix4fv(this.program.uMatrix, false, matrix); + gl.drawElements(gl.TRIANGLES, 12, gl.UNSIGNED_SHORT, 0); + } +} + +export default { + "tent-3d": Tent3D, + "null-island": NullIsland +}; diff --git a/metrics/integration/data/121points.geojson b/metrics/integration/data/121points.geojson new file mode 100644 index 00000000000..8866bbbad67 --- /dev/null +++ b/metrics/integration/data/121points.geojson @@ -0,0 +1,1457 @@ +{ + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": {}, + "id": 121, + "geometry": { + "type": "Point", + "coordinates": [ + -5, + -5 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 1, + "geometry": { + "type": "Point", + "coordinates": [ + -5, + -4 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 2, + "geometry": { + "type": "Point", + "coordinates": [ + -5, + -3 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 3, + "geometry": { + "type": "Point", + "coordinates": [ + -5, + -2 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 4, + "geometry": { + "type": "Point", + "coordinates": [ + -5, + -1 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 5, + "geometry": { + "type": "Point", + "coordinates": [ + -5, + 0 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 6, + "geometry": { + "type": "Point", + "coordinates": [ + -5, + 1 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 7, + "geometry": { + "type": "Point", + "coordinates": [ + -5, + 2 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 8, + "geometry": { + "type": "Point", + "coordinates": [ + -5, + 3 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 9, + "geometry": { + "type": "Point", + "coordinates": [ + -5, + 4 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 10, + "geometry": { + "type": "Point", + "coordinates": [ + -5, + 5 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 11, + "geometry": { + "type": "Point", + "coordinates": [ + -4, + -5 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 119, + "geometry": { + "type": "Point", + "coordinates": [ + -4, + -4 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 12, + "geometry": { + "type": "Point", + "coordinates": [ + -4, + -3 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 13, + "geometry": { + "type": "Point", + "coordinates": [ + -4, + -2 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 14, + "geometry": { + "type": "Point", + "coordinates": [ + -4, + -1 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 15, + "geometry": { + "type": "Point", + "coordinates": [ + -4, + 0 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 16, + "geometry": { + "type": "Point", + "coordinates": [ + -4, + 1 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 17, + "geometry": { + "type": "Point", + "coordinates": [ + -4, + 2 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 18, + "geometry": { + "type": "Point", + "coordinates": [ + -4, + 3 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 19, + "geometry": { + "type": "Point", + "coordinates": [ + -4, + 4 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 20, + "geometry": { + "type": "Point", + "coordinates": [ + -4, + 5 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 21, + "geometry": { + "type": "Point", + "coordinates": [ + -3, + -5 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 22, + "geometry": { + "type": "Point", + "coordinates": [ + -3, + -4 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 23, + "geometry": { + "type": "Point", + "coordinates": [ + -3, + -3 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 24, + "geometry": { + "type": "Point", + "coordinates": [ + -3, + -2 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 25, + "geometry": { + "type": "Point", + "coordinates": [ + -3, + -1 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 26, + "geometry": { + "type": "Point", + "coordinates": [ + -3, + 0 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 27, + "geometry": { + "type": "Point", + "coordinates": [ + -3, + 1 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 28, + "geometry": { + "type": "Point", + "coordinates": [ + -3, + 2 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 29, + "geometry": { + "type": "Point", + "coordinates": [ + -3, + 3 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 30, + "geometry": { + "type": "Point", + "coordinates": [ + -3, + 4 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 31, + "geometry": { + "type": "Point", + "coordinates": [ + -3, + 5 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 32, + "geometry": { + "type": "Point", + "coordinates": [ + -2, + -5 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 33, + "geometry": { + "type": "Point", + "coordinates": [ + -2, + -4 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 34, + "geometry": { + "type": "Point", + "coordinates": [ + -2, + -3 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 35, + "geometry": { + "type": "Point", + "coordinates": [ + -2, + -2 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 36, + "geometry": { + "type": "Point", + "coordinates": [ + -2, + -1 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 37, + "geometry": { + "type": "Point", + "coordinates": [ + -2, + -0 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 38, + "geometry": { + "type": "Point", + "coordinates": [ + -2, + 1 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 39, + "geometry": { + "type": "Point", + "coordinates": [ + -2, + 2 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 40, + "geometry": { + "type": "Point", + "coordinates": [ + -2, + 3 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 41, + "geometry": { + "type": "Point", + "coordinates": [ + -2, + 4 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 42, + "geometry": { + "type": "Point", + "coordinates": [ + -2, + 5 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 43, + "geometry": { + "type": "Point", + "coordinates": [ + -1, + -5 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 44, + "geometry": { + "type": "Point", + "coordinates": [ + -1, + -4 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 45, + "geometry": { + "type": "Point", + "coordinates": [ + -1, + -3 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 46, + "geometry": { + "type": "Point", + "coordinates": [ + -1, + -2 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 47, + "geometry": { + "type": "Point", + "coordinates": [ + -1, + -1 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 48, + "geometry": { + "type": "Point", + "coordinates": [ + -1, + 0 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 49, + "geometry": { + "type": "Point", + "coordinates": [ + -1, + 1 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 50, + "geometry": { + "type": "Point", + "coordinates": [ + -1, + 2 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 51, + "geometry": { + "type": "Point", + "coordinates": [ + -1, + 3 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 52, + "geometry": { + "type": "Point", + "coordinates": [ + -1, + 4 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 53, + "geometry": { + "type": "Point", + "coordinates": [ + -1, + 5 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 54, + "geometry": { + "type": "Point", + "coordinates": [ + 0, + -5 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 55, + "geometry": { + "type": "Point", + "coordinates": [ + 0, + -4 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 56, + "geometry": { + "type": "Point", + "coordinates": [ + 0, + -3 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 57, + "geometry": { + "type": "Point", + "coordinates": [ + 0, + -2 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 58, + "geometry": { + "type": "Point", + "coordinates": [ + 0, + -1 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 59, + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 60, + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 1 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 61, + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 2 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 62, + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 3 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 63, + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 4 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 64, + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 5 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 65, + "geometry": { + "type": "Point", + "coordinates": [ + 1, + -5 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 66, + "geometry": { + "type": "Point", + "coordinates": [ + 1, + -4 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 67, + "geometry": { + "type": "Point", + "coordinates": [ + 1, + -3 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 68, + "geometry": { + "type": "Point", + "coordinates": [ + 1, + -2 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 69, + "geometry": { + "type": "Point", + "coordinates": [ + 1, + -1 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 70, + "geometry": { + "type": "Point", + "coordinates": [ + 1, + 0 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 71, + "geometry": { + "type": "Point", + "coordinates": [ + 1, + 1 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 72, + "geometry": { + "type": "Point", + "coordinates": [ + 1, + 2 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 73, + "geometry": { + "type": "Point", + "coordinates": [ + 1, + 3 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 74, + "geometry": { + "type": "Point", + "coordinates": [ + 1, + 4 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 75, + "geometry": { + "type": "Point", + "coordinates": [ + 1, + 5 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 76, + "geometry": { + "type": "Point", + "coordinates": [ + 2, + -5 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 77, + "geometry": { + "type": "Point", + "coordinates": [ + 2, + -4 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 78, + "geometry": { + "type": "Point", + "coordinates": [ + 2, + -3 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 79, + "geometry": { + "type": "Point", + "coordinates": [ + 2, + -2 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 80, + "geometry": { + "type": "Point", + "coordinates": [ + 2, + -1 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 81, + "geometry": { + "type": "Point", + "coordinates": [ + 2, + 0 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 82, + "geometry": { + "type": "Point", + "coordinates": [ + 2, + 1 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 83, + "geometry": { + "type": "Point", + "coordinates": [ + 2, + 2 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 84, + "geometry": { + "type": "Point", + "coordinates": [ + 2, + 3 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 85, + "geometry": { + "type": "Point", + "coordinates": [ + 2, + 4 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 86, + "geometry": { + "type": "Point", + "coordinates": [ + 2, + 5 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 87, + "geometry": { + "type": "Point", + "coordinates": [ + 3, + -5 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 88, + "geometry": { + "type": "Point", + "coordinates": [ + 3, + -4 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 89, + "geometry": { + "type": "Point", + "coordinates": [ + 3, + -3 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 90, + "geometry": { + "type": "Point", + "coordinates": [ + 3, + -2 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 91, + "geometry": { + "type": "Point", + "coordinates": [ + 3, + -1 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 92, + "geometry": { + "type": "Point", + "coordinates": [ + 3, + 0 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 93, + "geometry": { + "type": "Point", + "coordinates": [ + 3, + 1 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 94, + "geometry": { + "type": "Point", + "coordinates": [ + 3, + 2 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 95, + "geometry": { + "type": "Point", + "coordinates": [ + 3, + 3 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 96, + "geometry": { + "type": "Point", + "coordinates": [ + 3, + 4 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 97, + "geometry": { + "type": "Point", + "coordinates": [ + 3, + 5 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 98, + "geometry": { + "type": "Point", + "coordinates": [ + 4, + -5 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 99, + "geometry": { + "type": "Point", + "coordinates": [ + 4, + -4 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 100, + "geometry": { + "type": "Point", + "coordinates": [ + 4, + -3 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 101, + "geometry": { + "type": "Point", + "coordinates": [ + 4, + -2 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 102, + "geometry": { + "type": "Point", + "coordinates": [ + 4, + -1 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 103, + "geometry": { + "type": "Point", + "coordinates": [ + 4, + 0 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 104, + "geometry": { + "type": "Point", + "coordinates": [ + 4, + 1 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 105, + "geometry": { + "type": "Point", + "coordinates": [ + 4, + 2 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 106, + "geometry": { + "type": "Point", + "coordinates": [ + 4, + 3 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 107, + "geometry": { + "type": "Point", + "coordinates": [ + 4, + 4 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 108, + "geometry": { + "type": "Point", + "coordinates": [ + 4, + 5 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 109, + "geometry": { + "type": "Point", + "coordinates": [ + 5, + -5 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 110, + "geometry": { + "type": "Point", + "coordinates": [ + 5, + -4 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 111, + "geometry": { + "type": "Point", + "coordinates": [ + 5, + -3 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 112, + "geometry": { + "type": "Point", + "coordinates": [ + 5, + -2 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 113, + "geometry": { + "type": "Point", + "coordinates": [ + 5, + -1 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 114, + "geometry": { + "type": "Point", + "coordinates": [ + 5, + 0 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 115, + "geometry": { + "type": "Point", + "coordinates": [ + 5, + 1 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 116, + "geometry": { + "type": "Point", + "coordinates": [ + 5, + 2 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 117, + "geometry": { + "type": "Point", + "coordinates": [ + 5, + 3 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 118, + "geometry": { + "type": "Point", + "coordinates": [ + 5, + 4 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 119, + "geometry": { + "type": "Point", + "coordinates": [ + 5, + 5 + ] + } + } + ] +} diff --git a/metrics/integration/data/chinese.geojson b/metrics/integration/data/chinese.geojson new file mode 100644 index 00000000000..f1dd53bb31f --- /dev/null +++ b/metrics/integration/data/chinese.geojson @@ -0,0 +1 @@ +{"type":"FeatureCollection","features":[{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.73270889049581,43.41627085800398]},"properties":{"name":"的一是不了"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.76298169713937,43.44261374841698]},"properties":{"name":"在人有我他"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.73750788686539,43.42129081598136]},"properties":{"name":"这个们中来"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.68983653183295,43.36893537983959]},"properties":{"name":"上大为和国"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.78480371728801,43.385713038402734]},"properties":{"name":"地到以说时"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.82444442057749,43.3981364143174]},"properties":{"name":"要就出会可"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.73178458119855,43.42150465372435]},"properties":{"name":"也你对生能"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.81785610131647,43.36772142802819]},"properties":{"name":"而子那得于"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.71407211903534,43.396000025590936]},"properties":{"name":"着下自之年"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.79407351218833,43.41860722639433]},"properties":{"name":"过发后作里"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.67633907003255,43.4171921149322]},"properties":{"name":"用道行所然"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.77300637827193,43.39388127052078]},"properties":{"name":"家种事成方"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.81926263607329,43.339585481875]},"properties":{"name":"多经么去法"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.76701252093699,43.35773661014847]},"properties":{"name":"学如都同现"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.7737515090821,43.44366259492489]},"properties":{"name":"当没动面起"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.73829309937992,43.34378736524005]},"properties":{"name":"看定天分还"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.71836466571312,43.33057012451926]},"properties":{"name":"进好小部其"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.8115615374345,43.43176089412675]},"properties":{"name":"些主样理心"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.72375031275442,43.427220939712534]},"properties":{"name":"她本前开但"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.70314387005055,43.389688637563765]},"properties":{"name":"因只从想实"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.76039207819576,43.36975807892726]},"properties":{"name":"日军者意无"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.78682420394216,43.365202354108135]},"properties":{"name":"力它与长把"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.78460575433382,43.430490774626286]},"properties":{"name":"机十民第公"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.7823602114513,43.35546405309943]},"properties":{"name":"此已工使情"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.69186049292512,43.422688902696564]},"properties":{"name":"明性知全三"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.80768244315095,43.43381601437478]},"properties":{"name":"又关点正业"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.72756567031774,43.400333914786785]},"properties":{"name":"外将两高间"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.69534099799966,43.422190395818994]},"properties":{"name":"由问很最重"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.83581194006001,43.41564978584469]},"properties":{"name":"并物手应战"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.74950948614969,43.43062747741384]},"properties":{"name":"向头文体政"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.72733267952117,43.39116317525604]},"properties":{"name":"美相见被利"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.72085520401288,43.43205067390052]},"properties":{"name":"什二等产或"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.74851416375623,43.44382863716304]},"properties":{"name":"新己制身果"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.8394813306677,43.37578833067203]},"properties":{"name":"加西斯月话"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.77187743426293,43.359984149537226]},"properties":{"name":"合回特代内"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.69004478877105,43.32857475596884]},"properties":{"name":"信表化老给"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.7543304983983,43.45029457922705]},"properties":{"name":"世位次度门"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.74270392666222,43.436224623306195]},"properties":{"name":"任常先海通"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.70207094875059,43.39809173301537]},"properties":{"name":"教儿原东声"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.75571436014798,43.3468089398027]},"properties":{"name":"提立及比员"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.8233978214821,43.42514681243842]},"properties":{"name":"解水名筱论"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.68193517172404,43.43279789478497]},"properties":{"name":"处走义各入"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.80028992255848,43.33690838162077]},"properties":{"name":"几口认条平"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.71507317067244,43.401143748258455]},"properties":{"name":"系气题活尔"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.78889469900332,43.45182031313233]},"properties":{"name":"更别打女变"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.6791223720029,43.38861188362641]},"properties":{"name":"四神总何电"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.72988047792478,43.33359777731984]},"properties":{"name":"数安少报才"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.76988704019641,43.365757148416336]},"properties":{"name":"结反受目太"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.75657912670522,43.39062671107417]},"properties":{"name":"量再感建务"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.71694934526477,43.376825304235226]},"properties":{"name":"做接必场件"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.67458813089615,43.36108038884236]},"properties":{"name":"计管期市直"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.73092396663014,43.451194179973356]},"properties":{"name":"德资命山金"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.71805769966886,43.441661018342145]},"properties":{"name":"指克许统区"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.81861278781616,43.426572973941695]},"properties":{"name":"保至队形社"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.78874389125303,43.383000090716834]},"properties":{"name":"便空决治展"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.77038527017976,43.357431603981965]},"properties":{"name":"马科司五基"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.76028190008401,43.396620706760984]},"properties":{"name":"眼书非则听"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.72120167890262,43.33581886107876]},"properties":{"name":"白却界达光"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.83215351153285,43.42486709690492]},"properties":{"name":"放强即像难"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.74438919600198,43.33050804734877]},"properties":{"name":"且权思王象"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.78421479421195,43.40712629232671]},"properties":{"name":"完设式色路"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.7497489802472,43.33114312974759]},"properties":{"name":"记南品住告"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.66478914990057,43.38347958366816]},"properties":{"name":"类求据程北"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.79279423940079,43.444583002746775]},"properties":{"name":"边死张该交"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.76906741636776,43.419984311312625]},"properties":{"name":"规万取拉格"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.75612128325247,43.37612751347973]},"properties":{"name":"望觉术领共"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.77176654843697,43.43095760221496]},"properties":{"name":"确传师观清"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.77393503776875,43.373380874335005]},"properties":{"name":"今切院让识"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.71310318142423,43.43803340638478]},"properties":{"name":"候带导争运"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.81563594692398,43.346211434247635]},"properties":{"name":"笑飞风步改"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.69670553324158,43.4029553787535]},"properties":{"name":"收根干造言"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.68140692646466,43.45196741095145]},"properties":{"name":"联持组每济"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.71393977312255,43.352840358239604]},"properties":{"name":"车亲极林服"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.77520183044271,43.370446718107615]},"properties":{"name":"快办议往元"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.7705171135467,43.42031530315453]},"properties":{"name":"英士证近失"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.79700244767992,43.370796588876516]},"properties":{"name":"转夫令准布"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.68495501730467,43.44587605391778]},"properties":{"name":"始怎呢存未"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.66875438862098,43.428265013064504]},"properties":{"name":"远叫台单影"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.78255633374283,43.344190485138526]},"properties":{"name":"具罗字爱击"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.73950662616426,43.39914435521945]},"properties":{"name":"流备兵连调"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.66711705844682,43.42765258781692]},"properties":{"name":"深商算质团"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.67424805301926,43.367364311972324]},"properties":{"name":"集百需价花"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.73542075892419,43.405725847481825]},"properties":{"name":"党华城石级"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.83006410836333,43.35664000828751]},"properties":{"name":"整府离况亚"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.72345388556187,43.34752030391647]},"properties":{"name":"请技际约示"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.74116502544712,43.39729245583676]},"properties":{"name":"复病息究线"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.73088213630854,43.349605386889884]},"properties":{"name":"似官火断精"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.67745194820873,43.41123711240646]},"properties":{"name":"满支视消越"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.6817792850643,43.42344437828406]},"properties":{"name":"器容照须九"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.67395214801763,43.39977158479005]},"properties":{"name":"增研写称企"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.72161818475706,43.382293003810005]},"properties":{"name":"八功吗包片"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.72855664275721,43.41261360254286]},"properties":{"name":"史委乎查轻"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.83086291556356,43.36050725709127]},"properties":{"name":"易早曾除农"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.75354201321716,43.4442740937665]},"properties":{"name":"找装广显吧"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.7131699827778,43.345394151190725]},"properties":{"name":"阿李标谈吃"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.7649695364853,43.44088050766551]},"properties":{"name":"图念六引历"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.71225333661914,43.35591317841684]},"properties":{"name":"首医局突专"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.79971900833698,43.392362357661604]},"properties":{"name":"费号尽另周"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.70626144043672,43.42036951093048]},"properties":{"name":"较注语仅考"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.7040667445608,43.433803705173396]},"properties":{"name":"落青随选列"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.813440070051,43.385923123380685]},"properties":{"name":"武红响虽推"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.7070736167725,43.37259236901997]},"properties":{"name":"势参希古众"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.76888123702702,43.39800691496971]},"properties":{"name":"构房半节土"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.74421053508104,43.34325732766496]},"properties":{"name":"投某案黑维"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.69038090599406,43.366814529767844]},"properties":{"name":"革划敌致陈"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.66650853289048,43.34867037886478]},"properties":{"name":"律足态护七"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.66952516027868,43.40685068681997]},"properties":{"name":"兴派孩验责"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.68151887308431,43.3821590323556]},"properties":{"name":"营星够章音"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.71453679914157,43.41655508237566]},"properties":{"name":"跟志底站严"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.7286383345945,43.389659720807465]},"properties":{"name":"巴例防族供"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.78968425737912,43.42832250510841]},"properties":{"name":"效续施留讲"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.77126855272127,43.432091911546834]},"properties":{"name":"型料终答紧"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.80150644673267,43.384293717872744]},"properties":{"name":"黄绝奇察母"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.70325368034901,43.342142138944126]},"properties":{"name":"京段依批群"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.74350685450099,43.33815688393118]},"properties":{"name":"项故按河米"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.68640694219539,43.32988121926636]},"properties":{"name":"围江织害斗"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.82314765576484,43.36757657335591]},"properties":{"name":"双境客纪采"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.77855847885985,43.44537272495857]},"properties":{"name":"举杀攻父苏"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.69097776744456,43.38523317400271]},"properties":{"name":"密低朝友诉"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.7421211758674,43.3800236955169]},"properties":{"name":"止细愿千值"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.7755043980751,43.36667122483581]},"properties":{"name":"仍男钱破网"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.75295729292066,43.44281164137731]},"properties":{"name":"热助倒育属"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.77224286592354,43.3253127146371]},"properties":{"name":"坐帝限船脸"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.8242325149331,43.347561311210455]},"properties":{"name":"职速刻乐否"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.80801165451248,43.43367913152873]},"properties":{"name":"刚威毛状率"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.77302849618263,43.372749462523885]},"properties":{"name":"甚独球般普"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.73703546176603,43.328032643768076]},"properties":{"name":"怕弹校苦创"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.67624744048317,43.344889116256184]},"properties":{"name":"伟久错承印"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.79964252293848,43.38656670136357]},"properties":{"name":"晚兰试股拿"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.74049655553154,43.344659220383505]},"properties":{"name":"脑预谁益阳"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.72304384605104,43.35607154684429]},"properties":{"name":"若哪微尼继"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.7526981722367,43.39981729891517]},"properties":{"name":"送急血惊伤"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.68568625772969,43.34763712888965]},"properties":{"name":"素药适波夜"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.81743986333095,43.429533375195334]},"properties":{"name":"省初喜卫源"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.80579718643094,43.35988688107485]},"properties":{"name":"食险待述陆"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.83223099273255,43.43425284429113]},"properties":{"name":"习置居劳财"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.80006585484625,43.35132639892201]},"properties":{"name":"环排福纳欢"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.70924590877894,43.383011511165705]},"properties":{"name":"雷警获模充"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.68249560431013,43.35743306628053]},"properties":{"name":"负云停木游"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.68774304395902,43.33419609182944]},"properties":{"name":"龙树疑层冷"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.67733078337824,43.327826458540464]},"properties":{"name":"洲冲射略范"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.68834955622151,43.431281245921824]},"properties":{"name":"竟句室异激"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.8091257333308,43.43459785012007]},"properties":{"name":"汉村哈策演"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.67144809840102,43.397513621281995]},"properties":{"name":"简卡罪判担"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.82363606504714,43.37710068801484]},"properties":{"name":"州静退既衣"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.74061761816665,43.4212255093278]},"properties":{"name":"您宗积余痛"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.7045488688891,43.36750358756782]},"properties":{"name":"检差富灵协"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.82580595102172,43.42392475722188]},"properties":{"name":"角占配征修"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.77008645152546,43.34480018782685]},"properties":{"name":"皮挥胜降阶"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.71651166319498,43.34427801604752]},"properties":{"name":"审沉坚善妈"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.83028376706352,43.39600333853026]},"properties":{"name":"刘读啊超免"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.72932534685151,43.32911672353392]},"properties":{"name":"压银买皇养"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.68036932940231,43.36393499520703]},"properties":{"name":"伊怀执副乱"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.77298183161474,43.44003908109747]},"properties":{"name":"抗犯追帮宣"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.81552785528402,43.34735681961522]},"properties":{"name":"佛岁航优怪"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.78578499835658,43.41906317070564]},"properties":{"name":"香著田铁控"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.78354709597988,43.368113417254776]},"properties":{"name":"税左右份穿"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.82797590542668,43.35143064769927]},"properties":{"name":"艺背阵草脚"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.79055192707074,43.43537476712199]},"properties":{"name":"概恶块顿敢"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.70654512079273,43.41147087462913]},"properties":{"name":"守酒岛托央"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.68733618863007,43.41836228588271]},"properties":{"name":"户烈洋哥索"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.7154416231333,43.33529886942282]},"properties":{"name":"胡款靠评版"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.73493527274877,43.370844496181796]},"properties":{"name":"宝座释景顾"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.73770378945937,43.39088303970504]},"properties":{"name":"弟登货互付"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.83211159305392,43.32846502905939]},"properties":{"name":"伯慢欧换闻"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.68908894596007,43.44014380512324]},"properties":{"name":"危忙核暗姐"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.6902922126892,43.403538514368456]},"properties":{"name":"介坏讨丽良"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.76141611184084,43.36152240176037]},"properties":{"name":"序升监临亮"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.67547588081197,43.34877423379756]},"properties":{"name":"露永呼味野"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.74561868818364,43.40177322844116]},"properties":{"name":"架域沙掉括"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.82147468187486,43.345501872146336]},"properties":{"name":"舰鱼杂误湾"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.72331018618115,43.41869149001808]},"properties":{"name":"吉减编楚肯"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.81418024432423,43.39045046575978]},"properties":{"name":"测败屋跑梦"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.69068592136318,43.3685438560169]},"properties":{"name":"散温困剑渐"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.83747349864097,43.32783583160479]},"properties":{"name":"封救贵枪缺"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.66638697581311,43.38651479270904]},"properties":{"name":"楼县尚毫移"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.73073327718703,43.39856744262681]},"properties":{"name":"娘朋画班智"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.74104845728016,43.38961856762863]},"properties":{"name":"亦耳恩短掌"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.7539775992791,43.37962584070818]},"properties":{"name":"恐遗固席松"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.67308167308965,43.440433177549636]},"properties":{"name":"秘谢鲁遇康"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.68724650885542,43.3438023389739]},"properties":{"name":"虑幸均销钟"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.6690021588247,43.3604969931925]},"properties":{"name":"诗藏赶剧票"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.77503168804014,43.415001819151854]},"properties":{"name":"损忽巨炮旧"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.79229079700326,43.41771721089227]},"properties":{"name":"端探湖录叶"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.75545867980964,43.404726107598385]},"properties":{"name":"春乡附吸予"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.68343503303822,43.32628692794371]},"properties":{"name":"礼港雨呀板"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.7017168198081,43.408124296254805]},"properties":{"name":"庭妇归睛饭"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.75177113079917,43.40327950333013]},"properties":{"name":"额含顺输摇"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.70633448491662,43.33353916165031]},"properties":{"name":"招婚脱补谓"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.80796698838185,43.38855809467828]},"properties":{"name":"督毒油疗旅"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.71316371386729,43.40035203701606]},"properties":{"name":"泽材灭逐莫"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.73512074699465,43.39091219011503]},"properties":{"name":"笔亡鲜词圣"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.8091237096005,43.33089437793854]},"properties":{"name":"择寻厂睡博"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.71888919977027,43.37203728663009]},"properties":{"name":"勒烟授诺伦"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.6680803788322,43.4500067687054]},"properties":{"name":"岸奥唐卖俄"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.66925720953805,43.372341602453425]},"properties":{"name":"炸载洛健堂"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.66882286164855,43.423630694619916]},"properties":{"name":"旁宫喝借君"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.77390029854541,43.445009580661186]},"properties":{"name":"禁阴园谋宋"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.71985438791216,43.398099248509034]},"properties":{"name":"避抓荣姑孙"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.74294883903804,43.4173240632121]},"properties":{"name":"逃牙束跳顶"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.66689798156858,43.34124127734229]},"properties":{"name":"玉镇雪午练"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.75171381658947,43.39159204675984]},"properties":{"name":"迫爷篇肉嘴"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.81096888891352,43.42308178495851]},"properties":{"name":"馆遍凡础洞"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.73965294263871,43.40406594519991]},"properties":{"name":"卷坦牛宁纸"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.72554678621145,43.37774074563721]},"properties":{"name":"诸训私庄祖"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.67178856070768,43.389572230853304]},"properties":{"name":"丝翻暴森塔"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.66509793278783,43.41061135866706]},"properties":{"name":"默握戏隐熟"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.73326538252331,43.44230808801419]},"properties":{"name":"骨访弱蒙歌"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.763294657595,43.42569076002226]},"properties":{"name":"店鬼软典欲"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.70805275051043,43.33022223454242]},"properties":{"name":"萨伙遭盘爸"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.80356155228401,43.35448684283324]},"properties":{"name":"扩盖弄雄稳"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.71671550436804,43.358590543375485]},"properties":{"name":"忘亿刺拥徒"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.79930692168546,43.44009080139547]},"properties":{"name":"姆杨齐赛趣"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.79587187411107,43.353732548898144]},"properties":{"name":"曲刀床迎冰"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.79719578990535,43.37696041213408]},"properties":{"name":"虚玩析窗醒"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.69965497394605,43.36639187084689]},"properties":{"name":"妻透购替塞"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.7921343910175,43.39881694771324]},"properties":{"name":"努休虎扬途"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.72017632396182,43.38361317683319]},"properties":{"name":"侵刑绿兄迅"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.68359785932444,43.34831766076865]},"properties":{"name":"套贸毕唯谷"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.81414767105343,43.40958963502256]},"properties":{"name":"轮库迹尤竞"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.80253128177446,43.36605742276838]},"properties":{"name":"街促延震弃"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.70089574338908,43.44275792279891]},"properties":{"name":"甲伟麻川申"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.83317739247832,43.442243183384164]},"properties":{"name":"缓潜闪售灯"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.67721696102126,43.42843016937564]},"properties":{"name":"针哲络抵朱"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.71723432403815,43.36649527257002]},"properties":{"name":"埃抱鼓植纯"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.69481568423726,43.40301142667125]},"properties":{"name":"夏忍页杰筑"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.68468959578695,43.35720648266311]},"properties":{"name":"折郑贝尊吴"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.72149391956373,43.361699359813706]},"properties":{"name":"秀混臣雅振"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.70660354920619,43.38448871648363]},"properties":{"name":"染盛怒舞圆"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.76299651747377,43.35074913433199]},"properties":{"name":"搞狂措姓残"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.77539316698676,43.39435306815789]},"properties":{"name":"秋培迷诚宽"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.71830531729574,43.35119394975593]},"properties":{"name":"宇猛摆梅毁"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.81118685367528,43.37563814779732]},"properties":{"name":"伸摩盟末乃"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.79642660311492,43.377657505705734]},"properties":{"name":"悲拍丁赵硬"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.7888253988358,43.337163828964385]},"properties":{"name":"麦蒋操耶阻"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.70485407817159,43.42571907384735]},"properties":{"name":"订彩抽赞魔"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.66969568481909,43.35045513475347]},"properties":{"name":"纷沿喊违妹"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.66930716449406,43.44367042306718]},"properties":{"name":"浪汇币丰蓝"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.69189873670894,43.43076512052666]},"properties":{"name":"殊献桌啦瓦"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.79353235204508,43.37368059280777]},"properties":{"name":"莱援译夺汽"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.70219104390617,43.33231431216638]},"properties":{"name":"烧距裁偏符"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.76689379197433,43.36916089976166]},"properties":{"name":"勇触课敬哭"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.82121823517355,43.3890494143254]},"properties":{"name":"懂墙袭召罚"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.83471876958811,43.40298009860645]},"properties":{"name":"侠厅拜巧侧"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.79381721196569,43.43790173544968]},"properties":{"name":"韩冒债曼融"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.78649372015207,43.36341720491033]},"properties":{"name":"惯享戴童犹"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.78560735030351,43.44361961433385]},"properties":{"name":"乘挂奖绍厚"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.75079314695358,43.33861416363164]},"properties":{"name":"纵障讯涉彻"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.74953762736641,43.40607632034917]},"properties":{"name":"刊丈爆乌役"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.74238703575702,43.35555088566464]},"properties":{"name":"描洗玛患妙"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.83816796506198,43.41942390467601]},"properties":{"name":"镜唱烦签仙"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.81616133746593,43.350962266236195]},"properties":{"name":"彼弗症仿倾"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.79219311701308,43.387858965559424]},"properties":{"name":"牌陷鸟轰咱"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.66780267369268,43.36965922024568]},"properties":{"name":"菜闭奋庆撤"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.76678459362029,43.41517258008821]},"properties":{"name":"泪茶疾缘播"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.80142993141635,43.341730907669636]},"properties":{"name":"朗杜奶季丹"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.77921260855874,43.421873232284376]},"properties":{"name":"狗尾仪偷奔"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.83144706066832,43.36621272347986]},"properties":{"name":"珠虫驻孔宜"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.70722008394114,43.35038684779588]},"properties":{"name":"艾桥淡翼恨"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.79020734973255,43.33479279298051]},"properties":{"name":"繁寒伴叹旦"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.67291568124347,43.43540548255966]},"properties":{"name":"愈潮粮缩罢"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.82768299138934,43.36836454991645]},"properties":{"name":"聚径恰挑袋"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.75399246803045,43.418397519140655]},"properties":{"name":"灰捕徐珍幕"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.74220063622761,43.35676855353936]},"properties":{"name":"映裂泰隔启"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.67156749173591,43.32753321179319]},"properties":{"name":"尖忠累炎暂"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.7337656762229,43.362393286271406]},"properties":{"name":"估泛荒偿横"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.72030044521398,43.382476256772236]},"properties":{"name":"拒瑞忆孤鼻"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.7526464325656,43.436104808005915]},"properties":{"name":"闹羊呆厉衡"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.71485882023808,43.429619924972954]},"properties":{"name":"胞零穷舍码"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.75909970307748,43.330400132266675]},"properties":{"name":"赫婆魂灾洪"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.81135682893091,43.42006743640997]},"properties":{"name":"腿胆津俗辩"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.67022303291196,43.35877085029656]},"properties":{"name":"胸晓劲贫仁"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.73190488058117,43.36210649884719]},"properties":{"name":"偶辑邦恢赖"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.79749258159609,43.43829648566227]},"properties":{"name":"圈摸仰润堆"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.81412739294592,43.42486673759098]},"properties":{"name":"碰艇稍迟辆"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.73942862821696,43.41857560346666]},"properties":{"name":"废净凶署壁"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.73194496367705,43.36236970705654]},"properties":{"name":"御奉旋冬矿"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.77277965716348,43.42795996100599]},"properties":{"name":"抬蛋晨伏吹"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.79677774850097,43.386918730187254]},"properties":{"name":"鸡倍糊秦盾"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.7755677565865,43.41930911043181]},"properties":{"name":"杯租骑乏隆"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.83969235862696,43.40300089042435]},"properties":{"name":"诊奴摄丧污"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.79056823232804,43.36644340374012]},"properties":{"name":"渡旗甘耐凭"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.79024794978068,43.450759361929514]},"properties":{"name":"扎抢绪粗肩"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.7960531583467,43.42912547125532]},"properties":{"name":"梁幻菲皆碎"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.71188677769896,43.40578991754939]},"properties":{"name":"宙叔岩荡综"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.80973210979664,43.405074830026]},"properties":{"name":"爬荷悉蒂返"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.83094842280389,43.383506992650275]},"properties":{"name":"井壮薄悄扫"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.68880786616319,43.4408736919135]},"properties":{"name":"敏碍殖详迪"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.83637982623713,43.37932687230065]},"properties":{"name":"矛霍允幅撒"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.7120551129583,43.38478419358865]},"properties":{"name":"剩凯颗骂赏"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.79655496709165,43.353914671185876]},"properties":{"name":"液番箱贴漫"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.82183396335495,43.34951148058995]},"properties":{"name":"酸郎腰舒眉"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.7386077853289,43.42153859100138]},"properties":{"name":"忧浮辛恋餐"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.70073597694773,43.3950412068982]},"properties":{"name":"吓挺励辞艘"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.67738562238901,43.37299568230138]},"properties":{"name":"键伍峰尺昨"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.76967766127837,43.43523403455177]},"properties":{"name":"黎辈贯侦滑"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.66711217868942,43.34498516856536]},"properties":{"name":"券崇扰宪绕"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.71263407544393,43.44878125927471]},"properties":{"name":"趋慈乔阅汗"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.81736193811139,43.3268554930083]},"properties":{"name":"枝拖墨胁插"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.72823672941468,43.39913772571227]},"properties":{"name":"箭腊粉泥氏"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.80909585278732,43.42911070681641]},"properties":{"name":"彭拔骗凤慧"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.75079532407926,43.42721943663759]},"properties":{"name":"媒佩愤扑龄"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.71058457033814,43.367755763373076]},"properties":{"name":"驱惜豪掩兼"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.69298119807172,43.42626514840551]},"properties":{"name":"跃尸肃帕驶"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.83650346598006,43.41933636859189]},"properties":{"name":"堡届欣惠册"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.7067569578021,43.4410164115811]},"properties":{"name":"储飘桑闲惨"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.8266463758855,43.429931233602844]},"properties":{"name":"洁踪勃宾频"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.78659303223958,43.338321981323276]},"properties":{"name":"仇磨递邪撞"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.80639026067729,43.36026255177993]},"properties":{"name":"拟滚奏巡颜"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.68785430058597,43.391834351083176]},"properties":{"name":"剂绩贡疯坡"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.77329479710443,43.331029684633386]},"properties":{"name":"瞧截燃焦殿"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.83944140776111,43.36094548943541]},"properties":{"name":"伪柳锁逼颇"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.77328811212737,43.39281904629793]},"properties":{"name":"昏劝呈搜勤"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.80847732751408,43.37011711911654]},"properties":{"name":"戒驾漂饮曹"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.69083308544123,43.34616816533698]},"properties":{"name":"朵仔柔俩孟"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.71997028929218,43.39262356330771]},"properties":{"name":"腐幼践籍牧"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.70795456797441,43.43662706130826]},"properties":{"name":"凉牲佳娜浓"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.74983541518577,43.36433290673387]},"properties":{"name":"芳稿竹腹跌"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.72199664814889,43.399196067397874]},"properties":{"name":"逻垂遵脉貌"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.76282152809654,43.33979211362029]},"properties":{"name":"柏狱猜怜惑"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.72295717357065,43.32965718674516]},"properties":{"name":"陶兽帐饰贷"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.76962927584191,43.417191219398504]},"properties":{"name":"昌叙躺钢沟"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.79867291448863,43.44693460246704]},"properties":{"name":"寄扶铺邓寿"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.80762496150783,43.447198828628444]},"properties":{"name":"惧询汤盗肥"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.73700170958546,43.42215816219742]},"properties":{"name":"尝匆辉奈扣"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.79048870955376,43.368949995240996]},"properties":{"name":"廷澳嘛董迁"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.8255365161358,43.39707569876099]},"properties":{"name":"凝慰厌脏腾"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.67286163429799,43.38896639656718]},"properties":{"name":"幽怨鞋丢埋"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.76401826500387,43.37508033645364]},"properties":{"name":"泉涌辖躲晋"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.77611649584469,43.400255751529066]},"properties":{"name":"紫艰魏吾慌"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.70951490545667,43.33112009433672]},"properties":{"name":"祝邮吐狠鉴"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.7066983545883,43.42345908175173]},"properties":{"name":"曰械咬邻赤"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.82127073113952,43.339820786610595]},"properties":{"name":"挤弯椅陪割"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.71675786236483,43.43096503945724]},"properties":{"name":"揭韦悟聪雾"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.78950346431157,43.40237228555073]},"properties":{"name":"锋梯猫祥阔"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.75258281784954,43.390836247816566]},"properties":{"name":"誉筹丛牵鸣"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.76638218213247,43.32741343188597]},"properties":{"name":"沈阁穆屈旨"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.72154484965267,43.45222086361347]},"properties":{"name":"袖猎臂蛇贺"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.76627772335996,43.437491216616706]},"properties":{"name":"柱抛鼠瑟戈"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.73925198284087,43.44218709248913]},"properties":{"name":"牢逊迈欺吨"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.77499563521542,43.418523278482645]},"properties":{"name":"琴衰瓶恼燕"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.8169860967655,43.384473967748534]},"properties":{"name":"仲诱狼池疼"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.78032431371867,43.446660440194194]},"properties":{"name":"卢仗冠粒遥"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.71753936465939,43.45285380044917]},"properties":{"name":"吕玄尘冯抚"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.69263196333395,43.419665985695886]},"properties":{"name":"浅敦纠钻晶"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.70765474537438,43.42017682128563]},"properties":{"name":"岂峡苍喷耗"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.69765841770732,43.33820610443803]},"properties":{"name":"凌敲菌赔涂"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.82267605236211,43.42357169093535]},"properties":{"name":"粹扁亏寂煤"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.73336307802492,43.42297002833131]},"properties":{"name":"熊恭湿循暖"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.83811908518328,43.33925460912034]},"properties":{"name":"糖赋抑秩帽"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.73171881207145,43.354563903522724]},"properties":{"name":"哀宿踏烂袁"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.6961362492757,43.35411874665983]},"properties":{"name":"侯抖夹昆肝"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.68661836305637,43.36823198552959]},"properties":{"name":"擦猪炼恒慎"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.83961700277996,43.3510427803368]},"properties":{"name":"搬纽纹玻渔"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.74947187088583,43.39389891860199]},"properties":{"name":"磁铜齿跨押"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.72910695071641,43.36486528376062]},"properties":{"name":"怖漠疲叛遣"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.69754557797296,43.39387045930845]},"properties":{"name":"兹祭醉拳弥"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.73710033565021,43.384584096889725]},"properties":{"name":"斜档稀捷肤"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.68689162255396,43.36871487059363]},"properties":{"name":"疫肿豆削岗"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.7994804315831,43.33013942649552]},"properties":{"name":"晃吞宏癌肚"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.7988314518434,43.39336940273254]},"properties":{"name":"隶履涨耀扭"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.71307712205453,43.41174462631271]},"properties":{"name":"坛拨沃绘伐"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.72580987651236,43.38478891558823]},"properties":{"name":"堪仆郭牺歼"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.7036186715095,43.41690955477799]},"properties":{"name":"墓雇廉契拼"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.76149458704094,43.367965367570484]},"properties":{"name":"惩捉覆刷劫"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.8058814547212,43.403167911414506]},"properties":{"name":"嫌瓜歇雕闷"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.71361559233537,43.376334729032095]},"properties":{"name":"乳串娃缴唤"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.73154162252649,43.38490610787597]},"properties":{"name":"赢莲霸桃妥"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.79186204272446,43.376665125080876]},"properties":{"name":"瘦搭赴岳嘉"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.6661296359971,43.452468442692734]},"properties":{"name":"舱俊址庞耕"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.7616259928136,43.44408598398389]},"properties":{"name":"锐缝悔邀玲"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.78766358344183,43.37143374956189]},"properties":{"name":"惟斥宅添挖"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.68890499690951,43.44979275747692]},"properties":{"name":"呵讼氧浩羽"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.67281208362147,43.3973497257669]},"properties":{"name":"斤酷掠妖祸"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.71588028401948,43.442055130438646]},"properties":{"name":"侍乙妨贪挣"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.71721666322901,43.32562249083662]},"properties":{"name":"汪尿莉悬唇"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.67841066689653,43.34185192725603]},"properties":{"name":"翰仓轨枚盐"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.73531620540507,43.36415708253743]},"properties":{"name":"览傅帅庙芬"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.72425220806053,43.351560221312894]},"properties":{"name":"屏寺胖璃愚"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.68594161715737,43.409583613235085]},"properties":{"name":"滴疏萧姿颤"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.73655883818446,43.33441638119229]},"properties":{"name":"丑劣柯寸扔"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.6752721298426,43.32966752267923]},"properties":{"name":"盯辱匹俱辨"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.6904923700813,43.327341256271836]},"properties":{"name":"饿蜂哦腔郁"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.78054278610125,43.394614279098086]},"properties":{"name":"溃谨糟葛苗"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.74335729998438,43.40451717893259]},"properties":{"name":"肠忌溜鸿爵"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.7569937171229,43.44689633183004]},"properties":{"name":"鹏鹰笼丘桂"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.8360965058364,43.40171500153021]},"properties":{"name":"滋聊挡纲肌"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.71513986618811,43.43457019529001]},"properties":{"name":"茨壳痕碗穴"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.7952919780746,43.44165282752506]},"properties":{"name":"膀卓贤卧膜"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.68173948092863,43.44800154193802]},"properties":{"name":"毅锦欠哩函"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.81701665551464,43.389228319829925]},"properties":{"name":"茫昂薛皱夸"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.77895341666135,43.394861202037575]},"properties":{"name":"豫胃舌剥傲"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.75351540071551,43.4219368264491]},"properties":{"name":"拾窝睁携陵"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.81052088748493,43.424322611524985]},"properties":{"name":"哼棉晴铃填"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.69578376327627,43.37844309252077]},"properties":{"name":"饲渴吻扮逆"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.78368098309056,43.388133327996385]},"properties":{"name":"脆喘罩卜炉"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.70213684589817,43.400458123228596]},"properties":{"name":"柴愉绳胎蓄"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.75735508441994,43.33521557571769]},"properties":{"name":"眠竭喂傻慕"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.7165813035499,43.449836563440115]},"properties":{"name":"浑奸扇柜悦"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.67118947948529,43.32648454903178]},"properties":{"name":"拦诞饱乾泡"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.73583864324974,43.40494189377406]},"properties":{"name":"贼亭夕爹酬"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.7592708719767,43.37376037403405]},"properties":{"name":"儒姻卵氛泄"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.81937170824858,43.42605432516992]},"properties":{"name":"杆挨僧蜜吟"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.82074352007112,43.36580652869758]},"properties":{"name":"猩遂狭肖甜"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.7436711727496,43.372504265635634]},"properties":{"name":"霞驳裕顽於"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.67000504535372,43.38201541721379]},"properties":{"name":"摘矮秒卿畜"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.77440106794256,43.37650136295896]},"properties":{"name":"咽披辅勾盆"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.68061636193306,43.33728440664312]},"properties":{"name":"疆赌塑畏吵"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.66503257911336,43.38062935022041]},"properties":{"name":"囊嗯泊肺骤"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.70403178494416,43.36877483548238]},"properties":{"name":"缠冈羞瞪吊"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.75963805364609,43.40329643349728]},"properties":{"name":"贾漏斑涛悠"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.67318084901217,43.42404258860719]},"properties":{"name":"鹿俘锡卑葬"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.7664044443527,43.43862549454096]},"properties":{"name":"铭滩嫁催璇"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.76699292336798,43.37550577167776]},"properties":{"name":"翅盒蛮矣潘"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.73291945020628,43.3674976351091]},"properties":{"name":"歧赐鲍锅廊"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.80291150700305,43.3459863032626]},"properties":{"name":"拆灌勉盲宰"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.67799156621277,43.336989953022176]},"properties":{"name":"佐啥胀扯禧"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.75967314468016,43.44864855947221]},"properties":{"name":"辽抹筒棋裤"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.77895542262922,43.37606635807544]},"properties":{"name":"唉朴咐孕誓"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.74354294751629,43.401586326632675]},"properties":{"name":"喉妄拘链驰"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.71739241962405,43.32949392714524]},"properties":{"name":"栏逝窃艳臭"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.78738846011674,43.347806614069704]},"properties":{"name":"纤玑棵趁匠"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.68105058004221,43.384474385118985]},"properties":{"name":"盈翁愁瞬婴"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.74292700712704,43.43924277428903]},"properties":{"name":"孝颈倘浙谅"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.72330992960815,43.44448236676838]},"properties":{"name":"蔽畅赠妮莎"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.80374649087389,43.423236258780996]},"properties":{"name":"尉冻跪闯葡"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.7843960910941,43.37735348316894]},"properties":{"name":"後厨鸭颠遮"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.77111562727168,43.377397868656345]},"properties":{"name":"谊圳吁仑辟"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.75822663806775,43.403893701294244]},"properties":{"name":"瘤嫂陀框谭"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.76760909818859,43.365752206325446]},"properties":{"name":"亨钦庸歉芝"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.67688920728415,43.35171094097246]},"properties":{"name":"吼甫衫摊宴"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.81636243364756,43.37912531315445]},"properties":{"name":"嘱衷娇陕矩"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.76577508596074,43.34670065336113]},"properties":{"name":"浦讶耸裸碧"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.6734781883506,43.339763982233066]},"properties":{"name":"摧薪淋耻胶"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.67229678701096,43.37951866037416]},"properties":{"name":"屠鹅饥盼脖"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.67370422785643,43.33477495020771]},"properties":{"name":"虹翠崩账萍"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.72454219260635,43.38020083184419]},"properties":{"name":"逢赚撑翔倡"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.8127777939444,43.33011026808491]},"properties":{"name":"绵猴枯巫昭"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.82476845378096,43.345917052691725]},"properties":{"name":"怔渊凑溪蠢"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.79458199273176,43.37007854115475]},"properties":{"name":"禅阐旺寓藤"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.77530815590762,43.3745956095525]},"properties":{"name":"匪伞碑挪琼"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.81943466645043,43.38442804867082]},"properties":{"name":"脂谎慨菩萄"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.7111729135977,43.41659485703934]},"properties":{"name":"狮掘抄岭晕"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.81519536270207,43.35551688679179]},"properties":{"name":"逮砍掏狄晰"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.80141816757077,43.373296346452975]},"properties":{"name":"罕挽脾舟痴"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.73913970139529,43.36766474919193]},"properties":{"name":"蔡剪脊弓懒"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.68861229532558,43.447177904904464]},"properties":{"name":"叉拐喃僚捐"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.70887924537146,43.36989440125427]},"properties":{"name":"姊骚拓歪粘"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.72727783404389,43.43862238253905]},"properties":{"name":"柄坑陌窄湘"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.80459063938179,43.337120260313164]},"properties":{"name":"兆崖骄刹鞭"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.76679035695634,43.335932458145194]},"properties":{"name":"芒筋聘钩棍"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.6765199485153,43.33916485424814]},"properties":{"name":"嚷腺弦焰耍"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.80245708208167,43.40137212585799]},"properties":{"name":"俯厘愣厦恳"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.77978667389289,43.32653195985271]},"properties":{"name":"饶钉寡憾摔"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.83554141642708,43.36208645578587]},"properties":{"name":"叠惹喻谱愧"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.78226428764992,43.45214674512842]},"properties":{"name":"煌徽溶坠煞"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.68707804799033,43.389474442588785]},"properties":{"name":"巾滥洒堵瓷"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.80216082023526,43.35618116364861]},"properties":{"name":"咒姨棒郡浴"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.70300949696957,43.338949270378016]},"properties":{"name":"媚稣淮哎屁"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.68015060855032,43.40296808063941]},"properties":{"name":"漆淫巢吩撰"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.68989328476619,43.39232508258088]},"properties":{"name":"啸滞玫硕钓"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.71598403078042,43.38262581866229]},"properties":{"name":"蝶膝姚茂躯"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.71912615539532,43.452016174114505]},"properties":{"name":"吏猿寨恕渠"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.74577920821866,43.36541829164119]},"properties":{"name":"戚辰舶颁惶"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.72712613526619,43.39671896203547]},"properties":{"name":"狐讽笨袍嘲"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.70664604422745,43.34278992771991]},"properties":{"name":"啡泼衔倦涵"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.68493815003421,43.39354964761166]},"properties":{"name":"雀旬僵撕肢"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.75455462754235,43.36155500394566]},"properties":{"name":"垄夷逸茅侨"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.77873016450667,43.366122899933224]},"properties":{"name":"舆窑涅蒲谦"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.80791232048796,43.33394744370124]},"properties":{"name":"杭噢弊勋刮"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.6997965679875,43.40806371864969]},"properties":{"name":"郊凄捧浸砖"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.66838019631632,43.35606605074788]},"properties":{"name":"鼎篮蒸饼亩"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.7069571753982,43.34266177851345]},"properties":{"name":"肾陡爪兔殷"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.71273809195645,43.35495186858789]},"properties":{"name":"贞荐哑炭坟"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.73519729235159,43.4163297000404]},"properties":{"name":"眨搏咳拢舅"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.71910739744908,43.45181104214278]},"properties":{"name":"昧擅爽咖搁"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.72594206510075,43.33440744203501]},"properties":{"name":"禄雌哨巩绢"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.69001132062567,43.36003830098169]},"properties":{"name":"螺裹昔轩谬"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.76804370175068,43.37362703079163]},"properties":{"name":"谍龟媳姜瞎"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.77043742133355,43.325828830544545]},"properties":{"name":"冤鸦蓬巷琳"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.66452596219278,43.377082454312294]},"properties":{"name":"栽沾诈斋瞒"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.78052164197288,43.39882235229331]},"properties":{"name":"彪厄咨纺罐"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.74768201610368,43.34347333416988]},"properties":{"name":"桶壤糕颂膨"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.77257029502562,43.353659062164375]},"properties":{"name":"谐垒咕隙辣"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.82229997433387,43.36602478810474]},"properties":{"name":"绑宠嘿兑霉"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.77697418935259,43.39302377957722]},"properties":{"name":"挫稽辐乞纱"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.82932283412902,43.344460090153106]},"properties":{"name":"裙嘻哇绣杖"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.75834764860247,43.43886099129135]},"properties":{"name":"塘衍轴攀膊"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.71397262576284,43.43847474002368]},"properties":{"name":"譬斌祈踢肆"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.78490097957456,43.41708495277058]},"properties":{"name":"坎轿棚泣屡"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.82596603943784,43.37280499147228]},"properties":{"name":"躁邱凰溢椎"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.80376452461223,43.41299359444341]},"properties":{"name":"砸趟帘帆栖"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.73771479115749,43.38964563062126]},"properties":{"name":"窜丸斩堤塌"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.77914081236031,43.36200438697811]},"properties":{"name":"贩厢掀喀乖"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.6885010122187,43.3536150480067]},"properties":{"name":"谜捏阎滨虏"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.6809883295955,43.4279302964151]},"properties":{"name":"匙芦苹卸沼"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.66638088219406,43.356600228775875]},"properties":{"name":"钥株祷剖熙"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.81508020435649,43.44503598067335]},"properties":{"name":"哗劈怯棠胳"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.80562566482058,43.441746093418764]},"properties":{"name":"桩瑰娱娶沫"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.69680728921867,43.37119072206014]},"properties":{"name":"嗓蹲焚淘嫩"}}]} \ No newline at end of file diff --git a/metrics/integration/data/feature.geojson b/metrics/integration/data/feature.geojson new file mode 100644 index 00000000000..e1f58b06a5b --- /dev/null +++ b/metrics/integration/data/feature.geojson @@ -0,0 +1,707 @@ +{ + "type": "Feature", + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -77.066104, + 38.910203 + ], + [ + -77.066106, + 38.910321 + ], + [ + -77.066112, + 38.910758 + ], + [ + -77.065249, + 38.910775 + ], + [ + -77.065178, + 38.910793 + ], + [ + -77.065139, + 38.910804 + ], + [ + -77.064904, + 38.91036 + ], + [ + -77.064855, + 38.910268 + ], + [ + -77.064621, + 38.909825 + ], + [ + -77.06459, + 38.909766 + ], + [ + -77.064342, + 38.909298 + ], + [ + -77.064281, + 38.909182 + ], + [ + -77.064201, + 38.909226 + ], + [ + -77.064175, + 38.909235 + ], + [ + -77.064149, + 38.909241 + ], + [ + -77.064122, + 38.909244 + ], + [ + -77.06336, + 38.90926 + ], + [ + -77.061442, + 38.909288 + ], + [ + -77.060801, + 38.909297 + ], + [ + -77.059237, + 38.909315 + ], + [ + -77.058186, + 38.90933 + ], + [ + -77.057113, + 38.909343 + ], + [ + -77.055623, + 38.909368 + ], + [ + -77.054762, + 38.909377 + ], + [ + -77.053951, + 38.909389 + ], + [ + -77.053904, + 38.909393 + ], + [ + -77.053858, + 38.909399 + ], + [ + -77.053813, + 38.909408 + ], + [ + -77.052833, + 38.909635 + ], + [ + -77.052799, + 38.909642 + ], + [ + -77.052772, + 38.909645 + ], + [ + -77.052692, + 38.90965 + ], + [ + -77.052443, + 38.909649 + ], + [ + -77.05096, + 38.909639 + ], + [ + -77.050327, + 38.909634 + ], + [ + -77.049545, + 38.909631 + ], + [ + -77.049533, + 38.909635 + ], + [ + -77.049341, + 38.909635 + ], + [ + -77.048903, + 38.909635 + ], + [ + -77.048797, + 38.909634 + ], + [ + -77.04773, + 38.909639 + ], + [ + -77.046632, + 38.90964 + ], + [ + -77.045758, + 38.909641 + ], + [ + -77.044877, + 38.909643 + ], + [ + -77.044578, + 38.909641 + ], + [ + -77.044493, + 38.909635 + ], + [ + -77.04442, + 38.909626 + ], + [ + -77.044345, + 38.909608 + ], + [ + -77.044283, + 38.909578 + ], + [ + -77.044249, + 38.909541 + ], + [ + -77.044212, + 38.909496 + ], + [ + -77.044199, + 38.909458 + ], + [ + -77.044182, + 38.909421 + ], + [ + -77.044162, + 38.909385 + ], + [ + -77.04414, + 38.90935 + ], + [ + -77.044113, + 38.909313 + ], + [ + -77.044083, + 38.90928 + ], + [ + -77.044051, + 38.909247 + ], + [ + -77.044018, + 38.909165 + ], + [ + -77.044018, + 38.909117 + ], + [ + -77.044029, + 38.909071 + ], + [ + -77.044037, + 38.909038 + ], + [ + -77.044058, + 38.908981 + ], + [ + -77.043996, + 38.909021 + ], + [ + -77.043919, + 38.909052 + ], + [ + -77.043854, + 38.909067 + ], + [ + -77.043798, + 38.909073 + ], + [ + -77.043755, + 38.909075 + ], + [ + -77.043689, + 38.909056 + ], + [ + -77.043656, + 38.909048 + ], + [ + -77.04359, + 38.909036 + ], + [ + -77.043527, + 38.909028 + ], + [ + -77.043486, + 38.909026 + ], + [ + -77.043444, + 38.909025 + ], + [ + -77.043402, + 38.909026 + ], + [ + -77.043344, + 38.909029 + ], + [ + -77.043286, + 38.909037 + ], + [ + -77.043263, + 38.909041 + ], + [ + -77.04323, + 38.909047 + ], + [ + -77.043194, + 38.909056 + ], + [ + -77.043022, + 38.909118 + ], + [ + -77.042995, + 38.909132 + ], + [ + -77.04296, + 38.909151 + ], + [ + -77.042938, + 38.909165 + ], + [ + -77.042915, + 38.90918 + ], + [ + -77.042875, + 38.909209 + ], + [ + -77.04284, + 38.909239 + ], + [ + -77.042823, + 38.909255 + ], + [ + -77.042791, + 38.909288 + ], + [ + -77.042774, + 38.909307 + ], + [ + -77.042712, + 38.909315 + ], + [ + -77.042637, + 38.909322 + ], + [ + -77.042551, + 38.909317 + ], + [ + -77.042422, + 38.909299 + ], + [ + -77.041676, + 38.90903 + ], + [ + -77.039935, + 38.908425 + ], + [ + -77.038503, + 38.907925 + ], + [ + -77.037656, + 38.907632 + ], + [ + -77.037477, + 38.907534 + ], + [ + -77.037317, + 38.907438 + ], + [ + -77.037238, + 38.90739 + ], + [ + -77.037121, + 38.907315 + ], + [ + -77.036997, + 38.907233 + ], + [ + -77.036875, + 38.907137 + ], + [ + -77.036833, + 38.907094 + ], + [ + -77.036817, + 38.907081 + ], + [ + -77.036795, + 38.907068 + ], + [ + -77.036774, + 38.907058 + ], + [ + -77.036767, + 38.907052 + ], + [ + -77.036712, + 38.907034 + ], + [ + -77.03669, + 38.907028 + ], + [ + -77.036643, + 38.907022 + ], + [ + -77.03661, + 38.907021 + ], + [ + -77.03653, + 38.907021 + ], + [ + -77.036474, + 38.907021 + ], + [ + -77.03643, + 38.907025 + ], + [ + -77.03639, + 38.907033 + ], + [ + -77.036295, + 38.907058 + ], + [ + -77.036005, + 38.906995 + ], + [ + -77.035439, + 38.906869 + ], + [ + -77.035142, + 38.906757 + ], + [ + -77.035049, + 38.906725 + ], + [ + -77.0348, + 38.906641 + ], + [ + -77.034673, + 38.906594 + ], + [ + -77.034568, + 38.906558 + ], + [ + -77.034059, + 38.906382 + ], + [ + -77.033931, + 38.906338 + ], + [ + -77.032623, + 38.905883 + ], + [ + -77.03129, + 38.905426 + ], + [ + -77.030031, + 38.904982 + ], + [ + -77.029623, + 38.904835 + ], + [ + -77.028082, + 38.904304 + ], + [ + -77.027679, + 38.904167 + ], + [ + -77.02705, + 38.903949 + ], + [ + -77.026409, + 38.903729 + ], + [ + -77.025984, + 38.903579 + ], + [ + -77.024321, + 38.902997 + ], + [ + -77.024139, + 38.902954 + ], + [ + -77.023952, + 38.902954 + ], + [ + -77.023188, + 38.902956 + ], + [ + -77.022699, + 38.902958 + ], + [ + -77.021917, + 38.90296 + ], + [ + -77.021918, + 38.902902 + ], + [ + -77.021918, + 38.902521 + ], + [ + -77.019907, + 38.902521 + ], + [ + -77.018928, + 38.902521 + ], + [ + -77.016176, + 38.902519 + ], + [ + -77.015177, + 38.902518 + ], + [ + -77.013722, + 38.902514 + ], + [ + -77.012171, + 38.902516 + ], + [ + -77.011237, + 38.902516 + ], + [ + -77.009846, + 38.902515 + ], + [ + -77.009117, + 38.902514 + ], + [ + -77.009126, + 38.901346 + ], + [ + -77.00912, + 38.900203 + ], + [ + -77.009062, + 38.900203 + ], + [ + -77.008975, + 38.900203 + ], + [ + -77.008004, + 38.900198 + ], + [ + -77.00631, + 38.900193 + ], + [ + -77.005531, + 38.900197 + ], + [ + -77.002929, + 38.9002 + ], + [ + -77.002038, + 38.900203 + ], + [ + -77.001892, + 38.900203 + ], + [ + -77.000571, + 38.900205 + ], + [ + -76.999507, + 38.900204 + ], + [ + -76.998442, + 38.900204 + ], + [ + -76.998369, + 38.900204 + ], + [ + -76.996167, + 38.900205 + ], + [ + -76.994961, + 38.900203 + ], + [ + -76.994962, + 38.899748 + ], + [ + -76.994961, + 38.899626 + ], + [ + -76.994961, + 38.899367 + ], + [ + -76.994961, + 38.898908 + ], + [ + -76.994962, + 38.898447 + ] + ] + }, + "properties": { + "name": "P Street Northwest - Massachusetts Avenue Northwest" + } +} diff --git a/metrics/integration/data/invalid.geojson b/metrics/integration/data/invalid.geojson new file mode 100644 index 00000000000..d81cc0710eb --- /dev/null +++ b/metrics/integration/data/invalid.geojson @@ -0,0 +1 @@ +42 diff --git a/metrics/integration/data/linestring.geojson b/metrics/integration/data/linestring.geojson new file mode 100644 index 00000000000..0075931f29c --- /dev/null +++ b/metrics/integration/data/linestring.geojson @@ -0,0 +1,701 @@ +{ + "type": "LineString", + "coordinates": [ + [ + -77.066104, + 38.910203 + ], + [ + -77.066106, + 38.910321 + ], + [ + -77.066112, + 38.910758 + ], + [ + -77.065249, + 38.910775 + ], + [ + -77.065178, + 38.910793 + ], + [ + -77.065139, + 38.910804 + ], + [ + -77.064904, + 38.91036 + ], + [ + -77.064855, + 38.910268 + ], + [ + -77.064621, + 38.909825 + ], + [ + -77.06459, + 38.909766 + ], + [ + -77.064342, + 38.909298 + ], + [ + -77.064281, + 38.909182 + ], + [ + -77.064201, + 38.909226 + ], + [ + -77.064175, + 38.909235 + ], + [ + -77.064149, + 38.909241 + ], + [ + -77.064122, + 38.909244 + ], + [ + -77.06336, + 38.90926 + ], + [ + -77.061442, + 38.909288 + ], + [ + -77.060801, + 38.909297 + ], + [ + -77.059237, + 38.909315 + ], + [ + -77.058186, + 38.90933 + ], + [ + -77.057113, + 38.909343 + ], + [ + -77.055623, + 38.909368 + ], + [ + -77.054762, + 38.909377 + ], + [ + -77.053951, + 38.909389 + ], + [ + -77.053904, + 38.909393 + ], + [ + -77.053858, + 38.909399 + ], + [ + -77.053813, + 38.909408 + ], + [ + -77.052833, + 38.909635 + ], + [ + -77.052799, + 38.909642 + ], + [ + -77.052772, + 38.909645 + ], + [ + -77.052692, + 38.90965 + ], + [ + -77.052443, + 38.909649 + ], + [ + -77.05096, + 38.909639 + ], + [ + -77.050327, + 38.909634 + ], + [ + -77.049545, + 38.909631 + ], + [ + -77.049533, + 38.909635 + ], + [ + -77.049341, + 38.909635 + ], + [ + -77.048903, + 38.909635 + ], + [ + -77.048797, + 38.909634 + ], + [ + -77.04773, + 38.909639 + ], + [ + -77.046632, + 38.90964 + ], + [ + -77.045758, + 38.909641 + ], + [ + -77.044877, + 38.909643 + ], + [ + -77.044578, + 38.909641 + ], + [ + -77.044493, + 38.909635 + ], + [ + -77.04442, + 38.909626 + ], + [ + -77.044345, + 38.909608 + ], + [ + -77.044283, + 38.909578 + ], + [ + -77.044249, + 38.909541 + ], + [ + -77.044212, + 38.909496 + ], + [ + -77.044199, + 38.909458 + ], + [ + -77.044182, + 38.909421 + ], + [ + -77.044162, + 38.909385 + ], + [ + -77.04414, + 38.90935 + ], + [ + -77.044113, + 38.909313 + ], + [ + -77.044083, + 38.90928 + ], + [ + -77.044051, + 38.909247 + ], + [ + -77.044018, + 38.909165 + ], + [ + -77.044018, + 38.909117 + ], + [ + -77.044029, + 38.909071 + ], + [ + -77.044037, + 38.909038 + ], + [ + -77.044058, + 38.908981 + ], + [ + -77.043996, + 38.909021 + ], + [ + -77.043919, + 38.909052 + ], + [ + -77.043854, + 38.909067 + ], + [ + -77.043798, + 38.909073 + ], + [ + -77.043755, + 38.909075 + ], + [ + -77.043689, + 38.909056 + ], + [ + -77.043656, + 38.909048 + ], + [ + -77.04359, + 38.909036 + ], + [ + -77.043527, + 38.909028 + ], + [ + -77.043486, + 38.909026 + ], + [ + -77.043444, + 38.909025 + ], + [ + -77.043402, + 38.909026 + ], + [ + -77.043344, + 38.909029 + ], + [ + -77.043286, + 38.909037 + ], + [ + -77.043263, + 38.909041 + ], + [ + -77.04323, + 38.909047 + ], + [ + -77.043194, + 38.909056 + ], + [ + -77.043022, + 38.909118 + ], + [ + -77.042995, + 38.909132 + ], + [ + -77.04296, + 38.909151 + ], + [ + -77.042938, + 38.909165 + ], + [ + -77.042915, + 38.90918 + ], + [ + -77.042875, + 38.909209 + ], + [ + -77.04284, + 38.909239 + ], + [ + -77.042823, + 38.909255 + ], + [ + -77.042791, + 38.909288 + ], + [ + -77.042774, + 38.909307 + ], + [ + -77.042712, + 38.909315 + ], + [ + -77.042637, + 38.909322 + ], + [ + -77.042551, + 38.909317 + ], + [ + -77.042422, + 38.909299 + ], + [ + -77.041676, + 38.90903 + ], + [ + -77.039935, + 38.908425 + ], + [ + -77.038503, + 38.907925 + ], + [ + -77.037656, + 38.907632 + ], + [ + -77.037477, + 38.907534 + ], + [ + -77.037317, + 38.907438 + ], + [ + -77.037238, + 38.90739 + ], + [ + -77.037121, + 38.907315 + ], + [ + -77.036997, + 38.907233 + ], + [ + -77.036875, + 38.907137 + ], + [ + -77.036833, + 38.907094 + ], + [ + -77.036817, + 38.907081 + ], + [ + -77.036795, + 38.907068 + ], + [ + -77.036774, + 38.907058 + ], + [ + -77.036767, + 38.907052 + ], + [ + -77.036712, + 38.907034 + ], + [ + -77.03669, + 38.907028 + ], + [ + -77.036643, + 38.907022 + ], + [ + -77.03661, + 38.907021 + ], + [ + -77.03653, + 38.907021 + ], + [ + -77.036474, + 38.907021 + ], + [ + -77.03643, + 38.907025 + ], + [ + -77.03639, + 38.907033 + ], + [ + -77.036295, + 38.907058 + ], + [ + -77.036005, + 38.906995 + ], + [ + -77.035439, + 38.906869 + ], + [ + -77.035142, + 38.906757 + ], + [ + -77.035049, + 38.906725 + ], + [ + -77.0348, + 38.906641 + ], + [ + -77.034673, + 38.906594 + ], + [ + -77.034568, + 38.906558 + ], + [ + -77.034059, + 38.906382 + ], + [ + -77.033931, + 38.906338 + ], + [ + -77.032623, + 38.905883 + ], + [ + -77.03129, + 38.905426 + ], + [ + -77.030031, + 38.904982 + ], + [ + -77.029623, + 38.904835 + ], + [ + -77.028082, + 38.904304 + ], + [ + -77.027679, + 38.904167 + ], + [ + -77.02705, + 38.903949 + ], + [ + -77.026409, + 38.903729 + ], + [ + -77.025984, + 38.903579 + ], + [ + -77.024321, + 38.902997 + ], + [ + -77.024139, + 38.902954 + ], + [ + -77.023952, + 38.902954 + ], + [ + -77.023188, + 38.902956 + ], + [ + -77.022699, + 38.902958 + ], + [ + -77.021917, + 38.90296 + ], + [ + -77.021918, + 38.902902 + ], + [ + -77.021918, + 38.902521 + ], + [ + -77.019907, + 38.902521 + ], + [ + -77.018928, + 38.902521 + ], + [ + -77.016176, + 38.902519 + ], + [ + -77.015177, + 38.902518 + ], + [ + -77.013722, + 38.902514 + ], + [ + -77.012171, + 38.902516 + ], + [ + -77.011237, + 38.902516 + ], + [ + -77.009846, + 38.902515 + ], + [ + -77.009117, + 38.902514 + ], + [ + -77.009126, + 38.901346 + ], + [ + -77.00912, + 38.900203 + ], + [ + -77.009062, + 38.900203 + ], + [ + -77.008975, + 38.900203 + ], + [ + -77.008004, + 38.900198 + ], + [ + -77.00631, + 38.900193 + ], + [ + -77.005531, + 38.900197 + ], + [ + -77.002929, + 38.9002 + ], + [ + -77.002038, + 38.900203 + ], + [ + -77.001892, + 38.900203 + ], + [ + -77.000571, + 38.900205 + ], + [ + -76.999507, + 38.900204 + ], + [ + -76.998442, + 38.900204 + ], + [ + -76.998369, + 38.900204 + ], + [ + -76.996167, + 38.900205 + ], + [ + -76.994961, + 38.900203 + ], + [ + -76.994962, + 38.899748 + ], + [ + -76.994961, + 38.899626 + ], + [ + -76.994961, + 38.899367 + ], + [ + -76.994961, + 38.898908 + ], + [ + -76.994962, + 38.898447 + ] + ] +} diff --git a/metrics/integration/data/malformed.geojson b/metrics/integration/data/malformed.geojson new file mode 100644 index 00000000000..cf22d738365 --- /dev/null +++ b/metrics/integration/data/malformed.geojson @@ -0,0 +1,7 @@ +{ + "type": "Model", + "geometry": [ -77.050327, 38.909634 ], + "properties": { + "name": "P Street Northwest - Massachusetts Avenue Northwest" + } +} diff --git a/metrics/integration/data/places.geojson b/metrics/integration/data/places.geojson new file mode 100644 index 00000000000..b9ffbd329da --- /dev/null +++ b/metrics/integration/data/places.geojson @@ -0,0 +1 @@ +{"type":"FeatureCollection","features":[{"type":"Feature","properties":{"scalerank":2,"name":"Niagara Falls","comment":null,"name_alt":null,"lat_y":43.087653,"long_x":-79.044073,"region":"North America","subregion":null,"featureclass":"waterfall"},"geometry":{"type":"Point","coordinates":[-79.04411780507252,43.08771393436908]},"id":163},{"type":"Feature","properties":{"scalerank":2,"name":"Salto Angel","comment":null,"name_alt":"Angel Falls","lat_y":5.686836,"long_x":-62.061848,"region":"South America","subregion":null,"featureclass":"waterfall"},"geometry":{"type":"Point","coordinates":[-62.06181800038502,5.686896063275327]},"id":164},{"type":"Feature","properties":{"scalerank":2,"name":"Iguazu Falls","comment":null,"name_alt":null,"lat_y":-25.568265,"long_x":-54.582842,"region":"South America","subregion":null,"featureclass":"waterfall"},"geometry":{"type":"Point","coordinates":[-54.58299719960377,-25.568291925005923]},"id":165},{"type":"Feature","properties":{"scalerank":3,"name":"Gees Gwardafuy","comment":null,"name_alt":null,"lat_y":11.812855,"long_x":51.235173,"region":"Africa","subregion":null,"featureclass":"cape"},"geometry":{"type":"Point","coordinates":[51.258313644180184,11.822028799226407]},"id":166},{"type":"Feature","properties":{"scalerank":3,"name":"Victoria Falls","comment":null,"name_alt":null,"lat_y":-17.77079,"long_x":25.460133,"region":"Africa","subregion":null,"featureclass":"waterfall"},"geometry":{"type":"Point","coordinates":[25.852793816021233,-17.928033135943423]},"id":167},{"type":"Feature","properties":{"scalerank":3,"name":"Wright I.","comment":null,"name_alt":null,"lat_y":-50.959168,"long_x":-72.995002,"region":"Antarctica","subregion":null,"featureclass":"island"},"geometry":{"type":"Point","coordinates":[-116.89262854726002,-74.06670501094342]},"id":168},{"type":"Feature","properties":{"scalerank":3,"name":"Grant I.","comment":null,"name_alt":null,"lat_y":-50.959168,"long_x":-72.995002,"region":"Antarctica","subregion":null,"featureclass":"island"},"geometry":{"type":"Point","coordinates":[-131.48540198476002,-74.48272063594342]},"id":169},{"type":"Feature","properties":{"scalerank":3,"name":"Newman I.","comment":null,"name_alt":null,"lat_y":-50.959168,"long_x":-72.995002,"region":"Antarctica","subregion":null,"featureclass":"island"},"geometry":{"type":"Point","coordinates":[-145.68681800038502,-75.59185149531842]},"id":170},{"type":"Feature","properties":{"scalerank":3,"name":"Dean I.","comment":null,"name_alt":null,"lat_y":-50.959168,"long_x":-72.995002,"region":"Antarctica","subregion":null,"featureclass":"island"},"geometry":{"type":"Point","coordinates":[-127.63438880116627,-74.50066497188092]},"id":171},{"type":"Feature","properties":{"scalerank":3,"name":"Cape Canaveral","comment":null,"name_alt":null,"lat_y":28.483713,"long_x":-80.534941,"region":"North America","subregion":null,"featureclass":"cape"},"geometry":{"type":"Point","coordinates":[-80.53625603636821,28.473056814472134]},"id":172},{"type":"Feature","properties":{"scalerank":3,"name":"Cape Mendocino","comment":null,"name_alt":null,"lat_y":40.350222,"long_x":-124.323474,"region":"North America","subregion":null,"featureclass":"cape"},"geometry":{"type":"Point","coordinates":[-124.39201745043425,40.44222065537283]},"id":173},{"type":"Feature","properties":{"scalerank":3,"name":"Cabo San Lucas","comment":null,"name_alt":null,"lat_y":22.887711,"long_x":-109.969843,"region":"North America","subregion":null,"featureclass":"cape"},"geometry":{"type":"Point","coordinates":[-109.96983801991627,22.887762762494077]},"id":174},{"type":"Feature","properties":{"scalerank":3,"name":"Cape Churchill","comment":null,"name_alt":null,"lat_y":58.752014,"long_x":-93.182023,"region":"North America","subregion":null,"featureclass":"cape"},"geometry":{"type":"Point","coordinates":[-93.18211829335377,58.75208161015033]},"id":175},{"type":"Feature","properties":{"scalerank":3,"name":"Cape Cod","comment":null,"name_alt":null,"lat_y":41.734867,"long_x":-69.964865,"region":"North America","subregion":null,"featureclass":"cape"},"geometry":{"type":"Point","coordinates":[-70.03687833567446,41.9914589934385]},"id":176},{"type":"Feature","properties":{"scalerank":3,"name":"Cape May","comment":null,"name_alt":null,"lat_y":37.2017,"long_x":-75.926791,"region":"North America","subregion":null,"featureclass":"cape"},"geometry":{"type":"Point","coordinates":[-74.95121933164988,38.92969645987068]},"id":177},{"type":"Feature","properties":{"scalerank":3,"name":"Cabo de Hornos","comment":null,"name_alt":"Cape Horn","lat_y":-55.862824,"long_x":-67.169425,"region":"South America","subregion":null,"featureclass":"cape"},"geometry":{"type":"Point","coordinates":[-67.16942298085377,-55.86284758906842]},"id":178},{"type":"Feature","properties":{"scalerank":3,"name":"Cape of Good Hope","comment":null,"name_alt":null,"lat_y":-34.307311,"long_x":18.441206,"region":"Africa","subregion":null,"featureclass":"cape"},"geometry":{"type":"Point","coordinates":[18.441294792583733,-34.30718352656842]},"id":179},{"type":"Feature","properties":{"scalerank":3,"name":"Cape Palmas","comment":null,"name_alt":null,"lat_y":4.373924,"long_x":-7.457356,"region":"Africa","subregion":null,"featureclass":"cape"},"geometry":{"type":"Point","coordinates":[-7.457386848041267,4.373968817181577]},"id":180},{"type":"Feature","properties":{"scalerank":3,"name":"Cape Verde","comment":null,"name_alt":null,"lat_y":14.732312,"long_x":-17.471776,"region":"Africa","subregion":null,"featureclass":"cape"},"geometry":{"type":"Point","coordinates":[-17.471730109760017,14.732489324994077]},"id":181},{"type":"Feature","properties":{"scalerank":3,"name":"Cap Bon","comment":null,"name_alt":null,"lat_y":37.073954,"long_x":11.024061,"region":"Africa","subregion":null,"featureclass":"cape"},"geometry":{"type":"Point","coordinates":[11.024180534771233,37.07398102421283]},"id":182},{"type":"Feature","properties":{"scalerank":3,"name":"Oceanic pole of inaccessibility","comment":null,"name_alt":null,"lat_y":-48.865032,"long_x":-123.401986,"region":"Seven seas (open ocean)","subregion":"South Pacific Ocean","featureclass":"pole"},"geometry":{"type":"Point","coordinates":[-123.40202796132252,-48.86504485469342]},"id":183},{"type":"Feature","properties":{"scalerank":3,"name":"South Magnetic Pole 2005 (est)","comment":null,"name_alt":null,"lat_y":-48.865032,"long_x":-123.401986,"region":"Antarctica","subregion":"Southern Ocean","featureclass":"pole"},"geometry":{"type":"Point","coordinates":[137.85425865977123,-64.51824309688092]},"id":184},{"type":"Feature","properties":{"scalerank":3,"name":"North Magnetic Pole 2005 (est)","comment":null,"name_alt":null,"lat_y":-48.865032,"long_x":-123.401986,"region":"Seven seas (open ocean)","subregion":"Arctic Ocean","featureclass":"pole"},"geometry":{"type":"Point","coordinates":[-114.40569007069752,82.71008942265033]},"id":185},{"type":"Feature","properties":{"scalerank":4,"name":"Lands End","comment":null,"name_alt":null,"lat_y":50.069677,"long_x":-5.668629,"region":"Europe","subregion":"British Isles","featureclass":"cape"},"geometry":{"type":"Point","coordinates":[-5.668629523822517,50.06970856327533]},"id":186},{"type":"Feature","properties":{"scalerank":4,"name":"Cape York","comment":null,"name_alt":null,"lat_y":76.218919,"long_x":-68.218612,"region":"North America","subregion":"Greenland","featureclass":"cape"},"geometry":{"type":"Point","coordinates":[-68.21861731679127,76.21887848515033]},"id":187},{"type":"Feature","properties":{"scalerank":4,"name":"Nunap Isua","comment":null,"name_alt":"Cape Farewell","lat_y":59.862583,"long_x":-43.90088,"region":"North America","subregion":"Greenland","featureclass":"cape"},"geometry":{"type":"Point","coordinates":[-43.90080725819752,59.86267731327533]},"id":188},{"type":"Feature","properties":{"scalerank":4,"name":"Cape Vohimena","comment":null,"name_alt":null,"lat_y":-25.546355,"long_x":45.158683,"region":"Africa","subregion":"Indian Ocean","featureclass":"cape"},"geometry":{"type":"Point","coordinates":[45.15870201914623,-25.546319268755923]},"id":189},{"type":"Feature","properties":{"scalerank":4,"name":"Vavau","comment":null,"name_alt":null,"lat_y":-18.590062,"long_x":-173.976769,"region":"Oceania","subregion":"Polynesia","featureclass":"island"},"geometry":{"type":"Point","coordinates":[-173.97673499257252,-18.590020440630923]},"id":190},{"type":"Feature","properties":{"scalerank":4,"name":"I. de Pascua","comment":null,"name_alt":"Easter I.","lat_y":-27.102117,"long_x":-109.367953,"region":"Oceania","subregion":"Polynesia","featureclass":"island"},"geometry":{"type":"Point","coordinates":[-109.36790930897877,-27.102227471880923]},"id":191},{"type":"Feature","properties":{"scalerank":4,"name":"Cape Agulhas","comment":null,"name_alt":null,"lat_y":-34.801182,"long_x":19.993472,"region":"Africa","subregion":null,"featureclass":"cape"},"geometry":{"type":"Point","coordinates":[19.993418816021233,-34.80108001094342]},"id":192},{"type":"Feature","properties":{"scalerank":4,"name":"Plain of Jars","comment":null,"name_alt":null,"lat_y":20.550709,"long_x":101.890532,"region":"Asia","subregion":null,"featureclass":"plain"},"geometry":{"type":"Point","coordinates":[101.89063561289623,20.550909735150327]},"id":193},{"type":"Feature","properties":{"scalerank":4,"name":"Cabo Corrientes","comment":null,"name_alt":null,"lat_y":20.409471,"long_x":-105.683581,"region":"North America","subregion":null,"featureclass":"cape"},"geometry":{"type":"Point","coordinates":[-105.67795873874799,20.420365114940253]},"id":194},{"type":"Feature","properties":{"scalerank":4,"name":"Pt. Eugenia","comment":null,"name_alt":null,"lat_y":27.861925,"long_x":-115.07629,"region":"North America","subregion":null,"featureclass":"cape"},"geometry":{"type":"Point","coordinates":[-115.04623945046137,27.842887092585283]},"id":195},{"type":"Feature","properties":{"scalerank":4,"name":"Point Conception","comment":null,"name_alt":null,"lat_y":34.582313,"long_x":-120.659016,"region":"North America","subregion":null,"featureclass":"cape"},"geometry":{"type":"Point","coordinates":[-120.46360036202867,34.46027592467621]},"id":196},{"type":"Feature","properties":{"scalerank":4,"name":"Cape Hatteras","comment":null,"name_alt":null,"lat_y":35.437762,"long_x":-75.450543,"region":"North America","subregion":null,"featureclass":"cape"},"geometry":{"type":"Point","coordinates":[-75.54032952413311,35.24475263812895]},"id":197},{"type":"Feature","properties":{"scalerank":4,"name":"Cape Sable","comment":null,"name_alt":null,"lat_y":25.124896,"long_x":-81.090442,"region":"North America","subregion":null,"featureclass":"cape"},"geometry":{"type":"Point","coordinates":[-81.09044348866627,25.124762274212827]},"id":198},{"type":"Feature","properties":{"scalerank":4,"name":"Cape Hope","comment":null,"name_alt":null,"lat_y":68.35638,"long_x":-166.815582,"region":"North America","subregion":null,"featureclass":"cape"},"geometry":{"type":"Point","coordinates":[-166.81321268769543,68.35380207543972]},"id":199},{"type":"Feature","properties":{"scalerank":4,"name":"Point Barrow","comment":null,"name_alt":null,"lat_y":71.372637,"long_x":-156.615894,"region":"North America","subregion":null,"featureclass":"cape"},"geometry":{"type":"Point","coordinates":[-156.4719492091668,71.40589128763096]},"id":200},{"type":"Feature","properties":{"scalerank":4,"name":"Punta Negra","comment":null,"name_alt":null,"lat_y":-5.948875,"long_x":-81.108252,"region":"South America","subregion":null,"featureclass":"cape"},"geometry":{"type":"Point","coordinates":[-81.10832678944752,-5.948663018755923]},"id":201},{"type":"Feature","properties":{"scalerank":4,"name":"Punta Lavapié","comment":null,"name_alt":null,"lat_y":-37.262867,"long_x":-73.606377,"region":"South America","subregion":null,"featureclass":"cape"},"geometry":{"type":"Point","coordinates":[-73.60304396243782,-37.17120002933805]},"id":202},{"type":"Feature","properties":{"scalerank":4,"name":"Punta Galera","comment":null,"name_alt":null,"lat_y":0.731221,"long_x":-80.062205,"region":"South America","subregion":null,"featureclass":"cape"},"geometry":{"type":"Point","coordinates":[-80.06212317616627,0.731207586712827]},"id":203},{"type":"Feature","properties":{"scalerank":4,"name":"Cap Lopez","comment":null,"name_alt":null,"lat_y":-0.604761,"long_x":8.726423,"region":"Africa","subregion":null,"featureclass":"cape"},"geometry":{"type":"Point","coordinates":[8.727299789450319,-0.615086490513119]},"id":204},{"type":"Feature","properties":{"scalerank":4,"name":"Cape Bobaomby","comment":null,"name_alt":null,"lat_y":-11.966598,"long_x":49.262904,"region":"Africa","subregion":null,"featureclass":"cape"},"geometry":{"type":"Point","coordinates":[49.26282799570873,-11.966485284380923]},"id":205},{"type":"Feature","properties":{"scalerank":4,"name":"Cap Blanc","comment":null,"name_alt":null,"lat_y":20.822108,"long_x":-17.052856,"region":"Africa","subregion":null,"featureclass":"cape"},"geometry":{"type":"Point","coordinates":[-17.052906867572517,20.822088934369077]},"id":206},{"type":"Feature","properties":{"scalerank":5,"name":"South West Cape","comment":null,"name_alt":null,"lat_y":-43.510984,"long_x":146.054227,"region":"Oceania","subregion":"Australia","featureclass":"cape"},"geometry":{"type":"Point","coordinates":[146.03379804609568,-43.5404025683706]},"id":207},{"type":"Feature","properties":{"scalerank":5,"name":"Cape Howe","comment":null,"name_alt":null,"lat_y":-37.488775,"long_x":149.95853,"region":"Oceania","subregion":"Australia","featureclass":"cape"},"geometry":{"type":"Point","coordinates":[149.95838463633373,-37.48894622188092]},"id":208},{"type":"Feature","properties":{"scalerank":5,"name":"Cape Otway","comment":null,"name_alt":null,"lat_y":-38.857622,"long_x":143.565403,"region":"Oceania","subregion":"Australia","featureclass":"cape"},"geometry":{"type":"Point","coordinates":[143.537005108191,-38.85472383068997]},"id":209},{"type":"Feature","properties":{"scalerank":5,"name":"Cape Jaffa","comment":null,"name_alt":null,"lat_y":-36.944244,"long_x":139.690866,"region":"Oceania","subregion":"Australia","featureclass":"cape"},"geometry":{"type":"Point","coordinates":[139.68061977964746,-36.95624316107086]},"id":210},{"type":"Feature","properties":{"scalerank":5,"name":"Cape Carnot","comment":null,"name_alt":null,"lat_y":-34.920233,"long_x":135.656027,"region":"Oceania","subregion":"Australia","featureclass":"cape"},"geometry":{"type":"Point","coordinates":[135.65378326897053,-34.93870859313661]},"id":211},{"type":"Feature","properties":{"scalerank":5,"name":"Cape Byron","comment":null,"name_alt":null,"lat_y":-28.658282,"long_x":153.632849,"region":"Oceania","subregion":"Australia","featureclass":"cape"},"geometry":{"type":"Point","coordinates":[153.62799176015545,-28.66197417050363]},"id":212},{"type":"Feature","properties":{"scalerank":5,"name":"Cape Manifold","comment":null,"name_alt":null,"lat_y":-22.702081,"long_x":150.811228,"region":"Oceania","subregion":"Australia","featureclass":"cape"},"geometry":{"type":"Point","coordinates":[150.81116783945873,-22.702080987505923]},"id":213},{"type":"Feature","properties":{"scalerank":5,"name":"Cape York","comment":null,"name_alt":null,"lat_y":-10.710859,"long_x":142.522018,"region":"Oceania","subregion":"Australia","featureclass":"cape"},"geometry":{"type":"Point","coordinates":[142.52173912852123,-10.710747979693423]},"id":214},{"type":"Feature","properties":{"scalerank":5,"name":"Cape Melville","comment":null,"name_alt":null,"lat_y":-14.163629,"long_x":144.506417,"region":"Oceania","subregion":"Australia","featureclass":"cape"},"geometry":{"type":"Point","coordinates":[144.50660240977123,-14.163506768755923]},"id":215},{"type":"Feature","properties":{"scalerank":5,"name":"Cape Arnhem","comment":null,"name_alt":null,"lat_y":-12.337984,"long_x":136.952429,"region":"Oceania","subregion":"Australia","featureclass":"cape"},"geometry":{"type":"Point","coordinates":[136.91481885262823,-12.295662864626316]},"id":216},{"type":"Feature","properties":{"scalerank":5,"name":"West Cape Howe","comment":null,"name_alt":null,"lat_y":-35.104301,"long_x":117.597011,"region":"Oceania","subregion":"Australia","featureclass":"cape"},"geometry":{"type":"Point","coordinates":[117.59693444102123,-35.10430266719342]},"id":217},{"type":"Feature","properties":{"scalerank":5,"name":"Cape Leeuwin","comment":null,"name_alt":null,"lat_y":-34.297841,"long_x":115.10633,"region":"Oceania","subregion":"Australia","featureclass":"cape"},"geometry":{"type":"Point","coordinates":[115.1280088910596,-34.328007092559645]},"id":218},{"type":"Feature","properties":{"scalerank":5,"name":"Cape Pasley","comment":null,"name_alt":null,"lat_y":-33.929054,"long_x":123.517283,"region":"Oceania","subregion":"Australia","featureclass":"cape"},"geometry":{"type":"Point","coordinates":[123.51722252695873,-33.92888762813092]},"id":219},{"type":"Feature","properties":{"scalerank":5,"name":"Cape Londonderry","comment":null,"name_alt":null,"lat_y":-13.713856,"long_x":126.964514,"region":"Oceania","subregion":"Australia","featureclass":"cape"},"geometry":{"type":"Point","coordinates":[126.94130045687105,-13.74290642667802]},"id":220},{"type":"Feature","properties":{"scalerank":5,"name":"Steep Point","comment":null,"name_alt":null,"lat_y":-26.16822,"long_x":113.169959,"region":"Oceania","subregion":"Australia","featureclass":"cape"},"geometry":{"type":"Point","coordinates":[113.14519563289093,-26.157463616878637]},"id":221},{"type":"Feature","properties":{"scalerank":5,"name":"North West Cape","comment":null,"name_alt":null,"lat_y":-21.809776,"long_x":114.117534,"region":"Oceania","subregion":"Australia","featureclass":"cape"},"geometry":{"type":"Point","coordinates":[114.16010761213809,-21.801474697071743]},"id":222},{"type":"Feature","properties":{"scalerank":5,"name":"Cabo Gracias a Dios","comment":null,"name_alt":null,"lat_y":14.994242,"long_x":-83.15866,"region":"North America","subregion":"Central America","featureclass":"cape"},"geometry":{"type":"Point","coordinates":[-83.15874182851002,14.994208074994077]},"id":223},{"type":"Feature","properties":{"scalerank":5,"name":"Cape Brewster","comment":null,"name_alt":null,"lat_y":70.150754,"long_x":-22.122616,"region":"North America","subregion":"Greenland","featureclass":"cape"},"geometry":{"type":"Point","coordinates":[-22.122731086322517,70.15088532108783]},"id":224},{"type":"Feature","properties":{"scalerank":5,"name":"Cape Morris Jesup","comment":null,"name_alt":null,"lat_y":83.626331,"long_x":-32.491541,"region":"North America","subregion":"Greenland","featureclass":"cape"},"geometry":{"type":"Point","coordinates":[-32.49150550038502,83.62628815311908]},"id":225},{"type":"Feature","properties":{"scalerank":5,"name":"Grmsey","comment":null,"name_alt":null,"lat_y":66.669359,"long_x":-18.251096,"region":"Europe","subregion":"Iceland","featureclass":"island"},"geometry":{"type":"Point","coordinates":[-18.251088019916267,66.66937897343158]},"id":226},{"type":"Feature","properties":{"scalerank":5,"name":"Surtsey","comment":null,"name_alt":null,"lat_y":63.217764,"long_x":-20.434929,"region":"Europe","subregion":"Iceland","featureclass":"island"},"geometry":{"type":"Point","coordinates":[-20.434803840228767,63.21771881718158]},"id":227},{"type":"Feature","properties":{"scalerank":5,"name":"Cap Est","comment":null,"name_alt":null,"lat_y":-15.274849,"long_x":50.499889,"region":"Africa","subregion":"Indian Ocean","featureclass":"cape"},"geometry":{"type":"Point","coordinates":[50.49976647227123,-15.274956964068423]},"id":228},{"type":"Feature","properties":{"scalerank":5,"name":"Cape Cretin","comment":null,"name_alt":null,"lat_y":-6.637492,"long_x":147.852392,"region":"Oceania","subregion":"Melanesia","featureclass":"cape"},"geometry":{"type":"Point","coordinates":[147.85242760508373,-6.637261651568423]},"id":229},{"type":"Feature","properties":{"scalerank":5,"name":"Îles Chesterfield","comment":null,"name_alt":null,"lat_y":-19.20447,"long_x":159.95171,"region":"Oceania","subregion":"Melanesia","featureclass":"island"},"geometry":{"type":"Point","coordinates":[159.95167076914623,-19.204644464068423]},"id":230},{"type":"Feature","properties":{"scalerank":5,"name":"Pagan","comment":null,"name_alt":null,"lat_y":18.119631,"long_x":145.785087,"region":"Oceania","subregion":"Micronesia","featureclass":"island"},"geometry":{"type":"Point","coordinates":[145.78492272227123,18.119635321087827]},"id":231},{"type":"Feature","properties":{"scalerank":5,"name":"Wake I.","comment":null,"name_alt":null,"lat_y":19.303497,"long_x":166.63626,"region":"Oceania","subregion":"Micronesia","featureclass":"island"},"geometry":{"type":"Point","coordinates":[166.63624108164623,19.303595282025327]},"id":232},{"type":"Feature","properties":{"scalerank":5,"name":"Tabiteuea","comment":null,"name_alt":null,"lat_y":-1.201405,"long_x":174.755207,"region":"Oceania","subregion":"Micronesia","featureclass":"island"},"geometry":{"type":"Point","coordinates":[174.75513756602123,-1.201348565630923]},"id":233},{"type":"Feature","properties":{"scalerank":5,"name":"Aranuka","comment":null,"name_alt":null,"lat_y":0.226766,"long_x":173.626286,"region":"Oceania","subregion":"Micronesia","featureclass":"island"},"geometry":{"type":"Point","coordinates":[173.62623131602123,0.226752020306577]},"id":234},{"type":"Feature","properties":{"scalerank":5,"name":"Nauru","comment":null,"name_alt":null,"lat_y":-0.505856,"long_x":166.930778,"region":"Oceania","subregion":"Micronesia","featureclass":"island"},"geometry":{"type":"Point","coordinates":[166.93067467539623,-0.505791925005923]},"id":235},{"type":"Feature","properties":{"scalerank":5,"name":"Ebon","comment":null,"name_alt":null,"lat_y":4.59977,"long_x":168.736432,"region":"Oceania","subregion":"Micronesia","featureclass":"island"},"geometry":{"type":"Point","coordinates":[168.73633873789623,4.599798895306577]},"id":236},{"type":"Feature","properties":{"scalerank":5,"name":"Jaluit","comment":null,"name_alt":null,"lat_y":5.964455,"long_x":169.682894,"region":"Oceania","subregion":"Micronesia","featureclass":"island"},"geometry":{"type":"Point","coordinates":[169.68299401133373,5.964483953900327]},"id":237},{"type":"Feature","properties":{"scalerank":5,"name":"Mili","comment":null,"name_alt":null,"lat_y":6.107334,"long_x":171.725875,"region":"Oceania","subregion":"Micronesia","featureclass":"island"},"geometry":{"type":"Point","coordinates":[171.72584069102123,6.107489324994077]},"id":238},{"type":"Feature","properties":{"scalerank":5,"name":"Majuro","comment":null,"name_alt":null,"lat_y":7.118009,"long_x":171.159743,"region":"Oceania","subregion":"Micronesia","featureclass":"island"},"geometry":{"type":"Point","coordinates":[171.15980065195873,7.117987371869077]},"id":239},{"type":"Feature","properties":{"scalerank":5,"name":"Ailinglapalap","comment":null,"name_alt":null,"lat_y":7.276392,"long_x":168.596926,"region":"Oceania","subregion":"Micronesia","featureclass":"island"},"geometry":{"type":"Point","coordinates":[168.59693444102123,7.276495672650327]},"id":240},{"type":"Feature","properties":{"scalerank":5,"name":"Kwajalein","comment":null,"name_alt":null,"lat_y":8.746619,"long_x":167.735072,"region":"Oceania","subregion":"Micronesia","featureclass":"island"},"geometry":{"type":"Point","coordinates":[167.73511803477123,8.746710516400327]},"id":241},{"type":"Feature","properties":{"scalerank":5,"name":"Rongelap","comment":null,"name_alt":null,"lat_y":11.164329,"long_x":166.869876,"region":"Oceania","subregion":"Micronesia","featureclass":"island"},"geometry":{"type":"Point","coordinates":[166.86988365977123,11.164496160931577]},"id":242},{"type":"Feature","properties":{"scalerank":5,"name":"Bikini","comment":null,"name_alt":null,"lat_y":11.639231,"long_x":165.550698,"region":"Oceania","subregion":"Micronesia","featureclass":"island"},"geometry":{"type":"Point","coordinates":[165.55042565195873,11.639288641400327]},"id":243},{"type":"Feature","properties":{"scalerank":5,"name":"Cape Reinga","comment":null,"name_alt":null,"lat_y":-34.432767,"long_x":172.7285,"region":"Oceania","subregion":"New Zealand","featureclass":"cape"},"geometry":{"type":"Point","coordinates":[172.70558117137455,-34.42039113947056]},"id":244},{"type":"Feature","properties":{"scalerank":5,"name":"Kanton","comment":null,"name_alt":null,"lat_y":-2.757106,"long_x":-171.71703,"region":"Oceania","subregion":"Polynesia","featureclass":"island"},"geometry":{"type":"Point","coordinates":[-171.71703040272877,-2.757134698443423]},"id":245},{"type":"Feature","properties":{"scalerank":5,"name":"Tabuaeran","comment":null,"name_alt":"Fanning I.","lat_y":3.866545,"long_x":-159.326781,"region":"Oceania","subregion":"Polynesia","featureclass":"island"},"geometry":{"type":"Point","coordinates":[-159.32683264882252,3.866705633587827]},"id":246},{"type":"Feature","properties":{"scalerank":5,"name":"Malden","comment":null,"name_alt":null,"lat_y":-4.042491,"long_x":-154.983478,"region":"Oceania","subregion":"Polynesia","featureclass":"island"},"geometry":{"type":"Point","coordinates":[-154.98350989491627,-4.042657159380923]},"id":247},{"type":"Feature","properties":{"scalerank":5,"name":"Rarotonga","comment":null,"name_alt":null,"lat_y":-21.201867,"long_x":-159.797637,"region":"Oceania","subregion":"Polynesia","featureclass":"island"},"geometry":{"type":"Point","coordinates":[-159.79771887929127,-21.201836846880923]},"id":248},{"type":"Feature","properties":{"scalerank":5,"name":"Rangiroa","comment":null,"name_alt":null,"lat_y":-15.2046,"long_x":-147.773967,"region":"Oceania","subregion":"Polynesia","featureclass":"island"},"geometry":{"type":"Point","coordinates":[-147.77403723866627,-15.204766534380923]},"id":249},{"type":"Feature","properties":{"scalerank":5,"name":"Funafuti","comment":null,"name_alt":null,"lat_y":-8.491577,"long_x":179.19841,"region":"Oceania","subregion":"Polynesia","featureclass":"island"},"geometry":{"type":"Point","coordinates":[179.19837487070873,-8.491631768755923]},"id":250},{"type":"Feature","properties":{"scalerank":5,"name":"St. Croix","comment":null,"name_alt":null,"lat_y":17.762944,"long_x":-64.763088,"region":"North America","subregion":"West Indies","featureclass":"island"},"geometry":{"type":"Point","coordinates":[-64.76317298085377,17.763006903119077]},"id":251},{"type":"Feature","properties":{"scalerank":5,"name":"Grand Cayman","comment":null,"name_alt":null,"lat_y":19.315829,"long_x":-81.271416,"region":"North America","subregion":"West Indies","featureclass":"island"},"geometry":{"type":"Point","coordinates":[-81.27159583241627,19.315802313275327]},"id":252},{"type":"Feature","properties":{"scalerank":5,"name":"San Salvador","comment":null,"name_alt":null,"lat_y":24.052793,"long_x":-74.492848,"region":"North America","subregion":"West Indies","featureclass":"island"},"geometry":{"type":"Point","coordinates":[-74.49290930897877,24.052801824994077]},"id":253},{"type":"Feature","properties":{"scalerank":5,"name":"Grenada","comment":null,"name_alt":null,"lat_y":12.105978,"long_x":-61.723079,"region":"North America","subregion":"West Indies","featureclass":"island"},"geometry":{"type":"Point","coordinates":[-61.72319495351002,12.105963446087827]},"id":254},{"type":"Feature","properties":{"scalerank":5,"name":"Barbuda","comment":null,"name_alt":null,"lat_y":17.622525,"long_x":-61.789243,"region":"North America","subregion":"West Indies","featureclass":"island"},"geometry":{"type":"Point","coordinates":[-61.78929602772877,17.622626043744077]},"id":255},{"type":"Feature","properties":{"scalerank":5,"name":"Antigua","comment":null,"name_alt":null,"lat_y":17.040441,"long_x":-61.775982,"region":"North America","subregion":"West Indies","featureclass":"island"},"geometry":{"type":"Point","coordinates":[-61.77592932851002,17.040594793744077]},"id":256},{"type":"Feature","properties":{"scalerank":5,"name":"Guadeloupe","comment":null,"name_alt":null,"lat_y":16.180583,"long_x":-61.656947,"region":"North America","subregion":"West Indies","featureclass":"island"},"geometry":{"type":"Point","coordinates":[-61.65703284413502,16.180670477337827]},"id":257},{"type":"Feature","properties":{"scalerank":5,"name":"Dominica","comment":null,"name_alt":null,"lat_y":15.452943,"long_x":-61.352652,"region":"North America","subregion":"West Indies","featureclass":"island"},"geometry":{"type":"Point","coordinates":[-61.35271155507252,15.452887274212827]},"id":258},{"type":"Feature","properties":{"scalerank":5,"name":"Martinique","comment":null,"name_alt":null,"lat_y":14.672462,"long_x":-61.008715,"region":"North America","subregion":"West Indies","featureclass":"island"},"geometry":{"type":"Point","coordinates":[-61.00883948476002,14.672491766400327]},"id":259},{"type":"Feature","properties":{"scalerank":5,"name":"Saint Lucia","comment":null,"name_alt":null,"lat_y":13.918332,"long_x":-60.982225,"region":"North America","subregion":"West Indies","featureclass":"island"},"geometry":{"type":"Point","coordinates":[-60.98222815663502,13.918280340619077]},"id":260},{"type":"Feature","properties":{"scalerank":5,"name":"Saint Vincent","comment":null,"name_alt":null,"lat_y":13.270131,"long_x":-61.207143,"region":"North America","subregion":"West Indies","featureclass":"island"},"geometry":{"type":"Point","coordinates":[-61.20720374257252,13.270209051556577]},"id":261},{"type":"Feature","properties":{"scalerank":5,"name":"Barbados","comment":null,"name_alt":null,"lat_y":13.164326,"long_x":-59.566742,"region":"North America","subregion":"West Indies","featureclass":"island"},"geometry":{"type":"Point","coordinates":[-59.56682288319752,13.164252020306577]},"id":262},{"type":"Feature","properties":{"scalerank":5,"name":"Tobago","comment":null,"name_alt":null,"lat_y":11.259334,"long_x":-60.677992,"region":"South America","subregion":"West Indies","featureclass":"island"},"geometry":{"type":"Point","coordinates":[-60.67808997304127,11.259283758587827]},"id":263},{"type":"Feature","properties":{"scalerank":5,"name":"Margarita","comment":null,"name_alt":null,"lat_y":10.981467,"long_x":-64.051401,"region":"South America","subregion":"West Indies","featureclass":"island"},"geometry":{"type":"Point","coordinates":[-64.05144202382252,10.981512762494077]},"id":264},{"type":"Feature","properties":{"scalerank":5,"name":"Curaao","comment":null,"name_alt":null,"lat_y":12.185355,"long_x":-68.999109,"region":"North America","subregion":"West Indies","featureclass":"island"},"geometry":{"type":"Point","coordinates":[-68.99919593007252,12.185309149212827]},"id":265},{"type":"Feature","properties":{"scalerank":5,"name":"Aruba","comment":null,"name_alt":null,"lat_y":12.502849,"long_x":-69.96488,"region":"North America","subregion":"West Indies","featureclass":"island"},"geometry":{"type":"Point","coordinates":[-69.96501624257252,12.502752996869077]},"id":266},{"type":"Feature","properties":{"scalerank":5,"name":"Ra’s Banäs","comment":null,"name_alt":null,"lat_y":23.950592,"long_x":35.778059,"region":"Africa","subregion":null,"featureclass":"cape"},"geometry":{"type":"Point","coordinates":[35.77808678477123,23.950628973431577]},"id":267},{"type":"Feature","properties":{"scalerank":5,"name":"Ponta das Salinas","comment":null,"name_alt":null,"lat_y":-12.832908,"long_x":12.928991,"region":"Africa","subregion":null,"featureclass":"cape"},"geometry":{"type":"Point","coordinates":[12.968705086077254,-12.855718342716505]},"id":268},{"type":"Feature","properties":{"scalerank":5,"name":"Ponta das Palmeirinhas","comment":null,"name_alt":null,"lat_y":-9.071387,"long_x":12.999549,"region":"Africa","subregion":null,"featureclass":"cape"},"geometry":{"type":"Point","coordinates":[13.033811372274608,-9.099938228394153]},"id":269},{"type":"Feature","properties":{"scalerank":5,"name":"Cabo Bojador","comment":null,"name_alt":null,"lat_y":26.157836,"long_x":-14.473111,"region":"Africa","subregion":null,"featureclass":"cape"},"geometry":{"type":"Point","coordinates":[-14.473194953510017,26.157965399212827]},"id":270},{"type":"Feature","properties":{"scalerank":5,"name":"Cape Comorin","comment":null,"name_alt":null,"lat_y":8.143554,"long_x":77.471497,"region":"Asia","subregion":null,"featureclass":"cape"},"geometry":{"type":"Point","coordinates":[77.51210506924555,8.085338515340696]},"id":271},{"type":"Feature","properties":{"scalerank":5,"name":"Dondra Head","comment":null,"name_alt":null,"lat_y":5.947528,"long_x":80.616321,"region":"Asia","subregion":null,"featureclass":"cape"},"geometry":{"type":"Point","coordinates":[80.59180925571331,5.929580617022318]},"id":272},{"type":"Feature","properties":{"scalerank":5,"name":"Cape Yelizavety","comment":null,"name_alt":null,"lat_y":54.416083,"long_x":142.720445,"region":"Asia","subregion":null,"featureclass":"cape"},"geometry":{"type":"Point","coordinates":[142.72059166758373,54.41620514530658]},"id":273},{"type":"Feature","properties":{"scalerank":5,"name":"Pt. Yuzhnyy","comment":null,"name_alt":null,"lat_y":57.733572,"long_x":156.796426,"region":"Asia","subregion":null,"featureclass":"cape"},"geometry":{"type":"Point","coordinates":[156.79664147227123,57.73346588749408]},"id":274},{"type":"Feature","properties":{"scalerank":5,"name":"Cape Sata","comment":null,"name_alt":null,"lat_y":31.026941,"long_x":130.695089,"region":"Asia","subregion":null,"featureclass":"cape"},"geometry":{"type":"Point","coordinates":[130.69520104258373,31.026922918744077]},"id":275},{"type":"Feature","properties":{"scalerank":5,"name":"Cape Aniva","comment":null,"name_alt":null,"lat_y":46.081706,"long_x":143.43487,"region":"Asia","subregion":null,"featureclass":"cape"},"geometry":{"type":"Point","coordinates":[143.43482506602123,46.08179352421283]},"id":276},{"type":"Feature","properties":{"scalerank":5,"name":"Cape Terpeniya","comment":null,"name_alt":null,"lat_y":48.66928,"long_x":144.712582,"region":"Asia","subregion":null,"featureclass":"cape"},"geometry":{"type":"Point","coordinates":[144.71253502695873,48.66937897343158]},"id":277},{"type":"Feature","properties":{"scalerank":5,"name":"Cape Lopatka","comment":null,"name_alt":null,"lat_y":50.914155,"long_x":156.651536,"region":"Asia","subregion":null,"featureclass":"cape"},"geometry":{"type":"Point","coordinates":[156.65162194102123,50.91412994999408]},"id":278},{"type":"Feature","properties":{"scalerank":5,"name":"Cape Ozernoy","comment":null,"name_alt":null,"lat_y":57.7708,"long_x":163.246685,"region":"Asia","subregion":null,"featureclass":"cape"},"geometry":{"type":"Point","coordinates":[163.24683678477123,57.77088043827533]},"id":279},{"type":"Feature","properties":{"scalerank":5,"name":"Cape Olyutorskiy","comment":null,"name_alt":null,"lat_y":59.960807,"long_x":170.31265,"region":"Asia","subregion":null,"featureclass":"cape"},"geometry":{"type":"Point","coordinates":[170.31287682383373,59.96082184452533]},"id":280},{"type":"Feature","properties":{"scalerank":5,"name":"Cape Navarin","comment":null,"name_alt":null,"lat_y":62.327239,"long_x":179.074225,"region":"Asia","subregion":null,"featureclass":"cape"},"geometry":{"type":"Point","coordinates":[179.07422936289623,62.32727692265033]},"id":281},{"type":"Feature","properties":{"scalerank":5,"name":"Cape Lopatka","comment":null,"name_alt":null,"lat_y":71.907853,"long_x":150.066042,"region":"Asia","subregion":null,"featureclass":"cape"},"geometry":{"type":"Point","coordinates":[150.06592858164623,71.90778229374408]},"id":282},{"type":"Feature","properties":{"scalerank":5,"name":"Cape Ince","comment":null,"name_alt":null,"lat_y":42.084312,"long_x":34.983358,"region":"Asia","subregion":null,"featureclass":"cape"},"geometry":{"type":"Point","coordinates":[34.98328698008373,42.08417389530658]},"id":283},{"type":"Feature","properties":{"scalerank":5,"name":"Ra’s Fartak","comment":null,"name_alt":null,"lat_y":15.677412,"long_x":52.229105,"region":"Asia","subregion":null,"featureclass":"cape"},"geometry":{"type":"Point","coordinates":[52.2389696999939,15.65795249845498]},"id":284},{"type":"Feature","properties":{"scalerank":5,"name":"Ras Sharbatat","comment":null,"name_alt":null,"lat_y":18.164534,"long_x":56.56827,"region":"Asia","subregion":null,"featureclass":"cape"},"geometry":{"type":"Point","coordinates":[56.558165806017215,18.166986171245085]},"id":285},{"type":"Feature","properties":{"scalerank":5,"name":"Ra's al Had","comment":null,"name_alt":null,"lat_y":22.530158,"long_x":59.849134,"region":"Asia","subregion":null,"featureclass":"cape"},"geometry":{"type":"Point","coordinates":[59.7995168175437,22.518675327148298]},"id":286},{"type":"Feature","properties":{"scalerank":5,"name":"Hachijjima","comment":null,"name_alt":null,"lat_y":33.109796,"long_x":139.804903,"region":"Asia","subregion":null,"featureclass":"island"},"geometry":{"type":"Point","coordinates":[139.80482018320873,33.10980866093158]},"id":287},{"type":"Feature","properties":{"scalerank":5,"name":"Nordkapp","comment":null,"name_alt":null,"lat_y":71.18337,"long_x":25.662398,"region":"Europe","subregion":null,"featureclass":"cape"},"geometry":{"type":"Point","coordinates":[25.66067519711473,71.15450206702127]},"id":288},{"type":"Feature","properties":{"scalerank":5,"name":"Cabo de São Vicentete","comment":null,"name_alt":null,"lat_y":37.038304,"long_x":-8.969391,"region":"Europe","subregion":null,"featureclass":"cape"},"geometry":{"type":"Point","coordinates":[-8.969410773822517,37.03827545780658]},"id":289},{"type":"Feature","properties":{"scalerank":5,"name":"Cabo Fisterra","comment":null,"name_alt":null,"lat_y":42.952418,"long_x":-9.267837,"region":"Europe","subregion":null,"featureclass":"cape"},"geometry":{"type":"Point","coordinates":[-9.26996282865152,42.92873605781255]},"id":290},{"type":"Feature","properties":{"scalerank":5,"name":"Cape San Blas","comment":null,"name_alt":null,"lat_y":29.713967,"long_x":-85.270961,"region":"North America","subregion":null,"featureclass":"cape"},"geometry":{"type":"Point","coordinates":[-85.27092444569752,29.713995672650327]},"id":291},{"type":"Feature","properties":{"scalerank":5,"name":"Cape Sable","comment":null,"name_alt":null,"lat_y":43.469097,"long_x":-65.610769,"region":"North America","subregion":null,"featureclass":"cape"},"geometry":{"type":"Point","coordinates":[-65.61082923085377,43.46900055546283]},"id":292},{"type":"Feature","properties":{"scalerank":5,"name":"Cape Bauld","comment":null,"name_alt":null,"lat_y":51.568576,"long_x":-55.430306,"region":"North America","subregion":null,"featureclass":"cape"},"geometry":{"type":"Point","coordinates":[-55.43028723866627,51.56848786015033]},"id":293},{"type":"Feature","properties":{"scalerank":5,"name":"Cape Fear","comment":null,"name_alt":null,"lat_y":33.867949,"long_x":-77.990568,"region":"North America","subregion":null,"featureclass":"cape"},"geometry":{"type":"Point","coordinates":[-77.99058997304127,33.86798737186908]},"id":294},{"type":"Feature","properties":{"scalerank":5,"name":"I. Guadalupe","comment":null,"name_alt":null,"lat_y":29.052552,"long_x":-118.317465,"region":"Seven seas (open ocean)","subregion":"North Pacific Ocean","featureclass":"island"},"geometry":{"type":"Point","coordinates":[-118.31749426991627,29.052496649212827]},"id":295},{"type":"Feature","properties":{"scalerank":5,"name":"Miquelon","comment":null,"name_alt":null,"lat_y":46.929526,"long_x":-56.329884,"region":"North America","subregion":null,"featureclass":"island"},"geometry":{"type":"Point","coordinates":[-56.32988440663502,46.92938873905658]},"id":296},{"type":"Feature","properties":{"scalerank":5,"name":"I. Robinson Crusoe","comment":null,"name_alt":null,"lat_y":-33.589852,"long_x":-78.872522,"region":"Seven seas (open ocean)","subregion":"South Pacific Ocean","featureclass":"island"},"geometry":{"type":"Point","coordinates":[-78.87254798085377,-33.58965422969342]},"id":297},{"type":"Feature","properties":{"scalerank":5,"name":"Cabo Orange","comment":null,"name_alt":null,"lat_y":4.125735,"long_x":-51.242144,"region":"South America","subregion":null,"featureclass":"cape"},"geometry":{"type":"Point","coordinates":[-51.26287766987179,4.135614177285231]},"id":298},{"type":"Feature","properties":{"scalerank":5,"name":"Cabo de Santa Marta Grande","comment":null,"name_alt":null,"lat_y":-28.558078,"long_x":-48.735526,"region":"South America","subregion":null,"featureclass":"cape"},"geometry":{"type":"Point","coordinates":[-48.80338037734664,-28.57198267323537]},"id":299},{"type":"Feature","properties":{"scalerank":5,"name":"Punta del Este","comment":null,"name_alt":null,"lat_y":-34.975503,"long_x":-54.933154,"region":"South America","subregion":null,"featureclass":"cape"},"geometry":{"type":"Point","coordinates":[-54.94628769070382,-34.96658679840526]},"id":300},{"type":"Feature","properties":{"scalerank":5,"name":"Cabo San Antonio","comment":null,"name_alt":null,"lat_y":-36.381052,"long_x":-56.655377,"region":"South America","subregion":null,"featureclass":"cape"},"geometry":{"type":"Point","coordinates":[-56.716792100626165,-36.40959917438929]},"id":301},{"type":"Feature","properties":{"scalerank":5,"name":"Cabo Corrientes","comment":null,"name_alt":null,"lat_y":-38.135985,"long_x":-57.546212,"region":"South America","subregion":null,"featureclass":"cape"},"geometry":{"type":"Point","coordinates":[-57.56252349612641,-38.066376942128464]},"id":302},{"type":"Feature","properties":{"scalerank":5,"name":"Punta Rasa","comment":null,"name_alt":null,"lat_y":-40.834718,"long_x":-62.282201,"region":"South America","subregion":null,"featureclass":"cape"},"geometry":{"type":"Point","coordinates":[-62.25911745789756,-40.72626411656719]},"id":303},{"type":"Feature","properties":{"scalerank":5,"name":"Cabo Dos Bahías","comment":null,"name_alt":null,"lat_y":-44.9887,"long_x":-65.615952,"region":"South America","subregion":null,"featureclass":"cape"},"geometry":{"type":"Point","coordinates":[-65.5438334451688,-44.89439847091873]},"id":304},{"type":"Feature","properties":{"scalerank":5,"name":"Cabo Delgado","comment":null,"name_alt":null,"lat_y":-10.670103,"long_x":40.624309,"region":"Africa","subregion":null,"featureclass":"cape"},"geometry":{"type":"Point","coordinates":[40.62440026133373,-10.670098565630923]},"id":305},{"type":"Feature","properties":{"scalerank":5,"name":"Ponta da Barra","comment":null,"name_alt":null,"lat_y":-23.829888,"long_x":35.515696,"region":"Africa","subregion":null,"featureclass":"cape"},"geometry":{"type":"Point","coordinates":[35.51563561289623,-23.830010675005923]},"id":306},{"type":"Feature","properties":{"scalerank":5,"name":"Ponta São Sebastio","comment":null,"name_alt":null,"lat_y":-22.118899,"long_x":35.480417,"region":"Africa","subregion":null,"featureclass":"cape"},"geometry":{"type":"Point","coordinates":[35.48023522227123,-22.118829034380923]},"id":307},{"type":"Feature","properties":{"scalerank":5,"name":"Ras Cantin","comment":null,"name_alt":null,"lat_y":32.581636,"long_x":-9.273918,"region":"Africa","subregion":null,"featureclass":"cape"},"geometry":{"type":"Point","coordinates":[-9.273915168353767,32.58161041874408]},"id":308},{"type":"Feature","properties":{"scalerank":5,"name":"Ra’s Kasr","comment":null,"name_alt":null,"lat_y":18.076817,"long_x":38.573746,"region":"Africa","subregion":null,"featureclass":"cape"},"geometry":{"type":"Point","coordinates":[38.58027735871919,18.075167704493374]},"id":309},{"type":"Feature","properties":{"scalerank":5,"name":"Ponta de Jericoacoara","comment":null,"name_alt":null,"lat_y":-2.85044,"long_x":-40.067208,"region":"South America","subregion":null,"featureclass":"cape"},"geometry":{"type":"Point","coordinates":[-39.991649927946355,-2.851822991583529]},"id":310},{"type":"Feature","properties":{"scalerank":5,"name":"Cabo de São Roque","comment":null,"name_alt":null,"lat_y":-5.193476,"long_x":-35.447654,"region":"South America","subregion":null,"featureclass":"cape"},"geometry":{"type":"Point","coordinates":[-35.50994900651512,-5.156866121305913]},"id":311},{"type":"Feature","properties":{"scalerank":5,"name":"Ponta da Baleia","comment":null,"name_alt":null,"lat_y":-17.710136,"long_x":-39.157619,"region":"South America","subregion":null,"featureclass":"cape"},"geometry":{"type":"Point","coordinates":[-39.14557867836578,-17.678753845220847]},"id":312},{"type":"Feature","properties":{"scalerank":5,"name":"Cabo de São Tomé","comment":null,"name_alt":null,"lat_y":-21.996382,"long_x":-41.009692,"region":"South America","subregion":null,"featureclass":"cape"},"geometry":{"type":"Point","coordinates":[-40.98763990313761,-21.971754611783773]},"id":313},{"type":"Feature","properties":{"scalerank":5,"name":"Cabo Frio","comment":null,"name_alt":null,"lat_y":-22.869501,"long_x":-41.962188,"region":"South America","subregion":null,"featureclass":"cape"},"geometry":{"type":"Point","coordinates":[-41.89015627474056,-22.759730815669258]},"id":314},{"type":"Feature","properties":{"scalerank":5,"name":"Cabo San Diego","comment":null,"name_alt":null,"lat_y":-54.6406,"long_x":-65.21365,"region":"South America","subregion":null,"featureclass":"cape"},"geometry":{"type":"Point","coordinates":[-65.21361243397877,-54.64067962031842]},"id":315},{"type":"Feature","properties":{"scalerank":5,"name":"Cabo Tres Puntas","comment":null,"name_alt":null,"lat_y":-47.237629,"long_x":-65.774707,"region":"South America","subregion":null,"featureclass":"cape"},"geometry":{"type":"Point","coordinates":[-65.74439816328368,-47.328778975372465]},"id":316},{"type":"Feature","properties":{"scalerank":5,"name":"Cap Saint André","comment":null,"name_alt":null,"lat_y":-16.174457,"long_x":44.467405,"region":"Africa","subregion":null,"featureclass":"cape"},"geometry":{"type":"Point","coordinates":[44.46729576914623,-16.174493096880923]},"id":317},{"type":"Feature","properties":{"scalerank":5,"name":"Cape St. Lucia","comment":null,"name_alt":null,"lat_y":-28.552694,"long_x":32.367221,"region":"Africa","subregion":null,"featureclass":"cape"},"geometry":{"type":"Point","coordinates":[32.36732018320873,-28.552666925005923]},"id":318},{"type":"Feature","properties":{"scalerank":5,"name":"Cape St. Francis","comment":null,"name_alt":null,"lat_y":-34.171766,"long_x":24.817688,"region":"Africa","subregion":null,"featureclass":"cape"},"geometry":{"type":"Point","coordinates":[24.84143613032799,-34.18861022316314]},"id":319},{"type":"Feature","properties":{"scalerank":5,"name":"Minamitori-shima","comment":null,"name_alt":"Marcus I.","lat_y":24.319813,"long_x":153.958899,"region":"Seven seas (open ocean)","subregion":"North Pacific Ocean","featureclass":"island"},"geometry":{"type":"Point","coordinates":[153.95887291758373,24.319769598431577]},"id":320},{"type":"Feature","properties":{"scalerank":5,"name":"Is. Martin Vaz","comment":null,"name_alt":null,"lat_y":-20.559422,"long_x":-29.338439,"region":"Seven seas (open ocean)","subregion":"Southern Atlantic Ocean","featureclass":"island"},"geometry":{"type":"Point","coordinates":[-29.338429328510017,-20.559502862505923]},"id":321},{"type":"Feature","properties":{"scalerank":5,"name":"Rockall","comment":null,"name_alt":null,"lat_y":58.163524,"long_x":-12.408715,"region":"Seven seas (open ocean)","subregion":"North Atlantic Ocean","featureclass":"island"},"geometry":{"type":"Point","coordinates":[-12.408741828510017,58.16339752811908]},"id":322},{"type":"Feature","properties":{"scalerank":5,"name":"I. de Cozumel","comment":null,"name_alt":null,"lat_y":20.444687,"long_x":-86.880555,"region":"North America","subregion":null,"featureclass":"island"},"geometry":{"type":"Point","coordinates":[-86.88060462147877,20.444708563275327]},"id":323},{"type":"Feature","properties":{"scalerank":5,"name":"Bermuda Islands","comment":null,"name_alt":null,"lat_y":32.317339,"long_x":-64.742895,"region":"Seven seas (open ocean)","subregion":"North Atlantic Ocean","featureclass":"island"},"geometry":{"type":"Point","coordinates":[-64.74290930897877,32.31726715702533]},"id":324}]} \ No newline at end of file diff --git a/metrics/integration/data/winding.geojson b/metrics/integration/data/winding.geojson new file mode 100644 index 00000000000..b7d141d0911 --- /dev/null +++ b/metrics/integration/data/winding.geojson @@ -0,0 +1 @@ +{"type":"FeatureCollection","features":[{"type":"Feature","id":"112025b24165963ca83d2b9e6e5943e3","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-48.51562499999926,44.08758502824452],[-48.86718749999943,1.7575368113081424],[5.9765624999998295,-2.2737367544323206e-13],[3.8671874999998295,44.5904671813081],[-48.51562499999926,44.08758502824452]]]}},{"type":"Feature","id":"c5aece77e9cb2eac3b1e3a146e9df170","properties":{},"geometry":{"type":"Polygon","coordinates":[[[29.531249999999517,15.623036831527799],[29.882812499999574,-27.994401411045992],[-17.57812499999983,-22.268764039073815],[-14.062499999999801,24.84656534821923],[29.531249999999517,15.623036831527799]]]}}]} diff --git a/metrics/integration/dist/.gitkeep b/metrics/integration/dist/.gitkeep new file mode 100644 index 00000000000..e69de29bb2d diff --git a/metrics/integration/expression-tests/abs/basic/test.json b/metrics/integration/expression-tests/abs/basic/test.json new file mode 100644 index 00000000000..4d068dbfc8f --- /dev/null +++ b/metrics/integration/expression-tests/abs/basic/test.json @@ -0,0 +1,18 @@ +{ + "expression": ["abs", ["get", "x"]], + "inputs": [ + [{}, {"properties": {"x": -2}}], + [{}, {"properties": {"x": 2}}], + [{}, {"properties": {"x": -1.1}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "number" + }, + "outputs": [2, 2, 1.1], + "serialized": ["abs", ["number", ["get", "x"]]] + } +} diff --git a/metrics/integration/expression-tests/acos/basic/test.json b/metrics/integration/expression-tests/acos/basic/test.json new file mode 100644 index 00000000000..95b6a304f94 --- /dev/null +++ b/metrics/integration/expression-tests/acos/basic/test.json @@ -0,0 +1,14 @@ +{ + "expression": ["acos", 0.5], + "inputs": [[{}, {}]], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": true, + "isZoomConstant": true, + "type": "number" + }, + "outputs": [1.04719], + "serialized": 1.0471975511965979 + } +} diff --git a/metrics/integration/expression-tests/all/arity-0/test.json b/metrics/integration/expression-tests/all/arity-0/test.json new file mode 100644 index 00000000000..b7c4d291741 --- /dev/null +++ b/metrics/integration/expression-tests/all/arity-0/test.json @@ -0,0 +1,14 @@ +{ + "expression": ["all"], + "inputs": [[{}, {}]], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": true, + "isZoomConstant": true, + "type": "boolean" + }, + "outputs": [true], + "serialized": true + } +} diff --git a/metrics/integration/expression-tests/all/arity-1/test.json b/metrics/integration/expression-tests/all/arity-1/test.json new file mode 100644 index 00000000000..a56dcf856fe --- /dev/null +++ b/metrics/integration/expression-tests/all/arity-1/test.json @@ -0,0 +1,14 @@ +{ + "expression": ["all", false], + "inputs": [[{}, {}]], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": true, + "isZoomConstant": true, + "type": "boolean" + }, + "outputs": [false], + "serialized": false + } +} diff --git a/metrics/integration/expression-tests/all/basic/test.json b/metrics/integration/expression-tests/all/basic/test.json new file mode 100644 index 00000000000..9c1e31f4e30 --- /dev/null +++ b/metrics/integration/expression-tests/all/basic/test.json @@ -0,0 +1,17 @@ +{ + "expression": ["all", ["boolean", ["get", "x"]], ["boolean", ["get", "y"]]], + "inputs": [ + [{}, {"properties": {"x": true, "y": false}}], + [{}, {"properties": {"x": true, "y": true}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "boolean" + }, + "outputs": [false, true], + "serialized": ["all", ["boolean", ["get", "x"]], ["boolean", ["get", "y"]]] + } +} diff --git a/metrics/integration/expression-tests/all/short-circuiting/test.json b/metrics/integration/expression-tests/all/short-circuiting/test.json new file mode 100644 index 00000000000..572836742d2 --- /dev/null +++ b/metrics/integration/expression-tests/all/short-circuiting/test.json @@ -0,0 +1,14 @@ +{ + "expression": ["all", false, ["error", "unreachable"]], + "inputs": [[{}, {}]], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": true, + "isZoomConstant": true, + "type": "boolean" + }, + "outputs": [false], + "serialized": ["all", false, ["error", "unreachable"]] + } +} diff --git a/metrics/integration/expression-tests/any/arity-0/test.json b/metrics/integration/expression-tests/any/arity-0/test.json new file mode 100644 index 00000000000..3e91e145666 --- /dev/null +++ b/metrics/integration/expression-tests/any/arity-0/test.json @@ -0,0 +1,14 @@ +{ + "expression": ["any"], + "inputs": [[{}, {}]], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": true, + "isZoomConstant": true, + "type": "boolean" + }, + "outputs": [false], + "serialized": false + } +} diff --git a/metrics/integration/expression-tests/any/arity-1/test.json b/metrics/integration/expression-tests/any/arity-1/test.json new file mode 100644 index 00000000000..e9d2a0e0c14 --- /dev/null +++ b/metrics/integration/expression-tests/any/arity-1/test.json @@ -0,0 +1,14 @@ +{ + "expression": ["any", false], + "inputs": [[{}, {}]], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": true, + "isZoomConstant": true, + "type": "boolean" + }, + "outputs": [false], + "serialized": false + } +} diff --git a/metrics/integration/expression-tests/any/basic/test.json b/metrics/integration/expression-tests/any/basic/test.json new file mode 100644 index 00000000000..2e9397fa62c --- /dev/null +++ b/metrics/integration/expression-tests/any/basic/test.json @@ -0,0 +1,19 @@ +{ + "expression": ["any", ["boolean", ["get", "x"]], ["boolean", ["get", "y"]]], + "inputs": [ + [{}, {"properties": {"x": true, "y": true}}], + [{}, {"properties": {"x": true, "y": false}}], + [{}, {"properties": {"x": false, "y": true}}], + [{}, {"properties": {"x": false, "y": false}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "boolean" + }, + "outputs": [true, true, true, false], + "serialized": ["any", ["boolean", ["get", "x"]], ["boolean", ["get", "y"]]] + } +} diff --git a/metrics/integration/expression-tests/any/short-circuiting/test.json b/metrics/integration/expression-tests/any/short-circuiting/test.json new file mode 100644 index 00000000000..553d7284982 --- /dev/null +++ b/metrics/integration/expression-tests/any/short-circuiting/test.json @@ -0,0 +1,14 @@ +{ + "expression": ["any", true, ["error", "unreachable"]], + "inputs": [[{}, {}]], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": true, + "isZoomConstant": true, + "type": "boolean" + }, + "outputs": [true], + "serialized": ["any", true, ["error", "unreachable"]] + } +} diff --git a/metrics/integration/expression-tests/array/basic/test.json b/metrics/integration/expression-tests/array/basic/test.json new file mode 100644 index 00000000000..b9ceb78b92d --- /dev/null +++ b/metrics/integration/expression-tests/array/basic/test.json @@ -0,0 +1,14 @@ +{ + "expression": ["array", ["literal", [1, 2, 3]]], + "inputs": [[{}, {}]], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": true, + "isZoomConstant": true, + "type": "array" + }, + "outputs": [[1, 2, 3]], + "serialized": ["literal", [1, 2, 3]] + } +} diff --git a/metrics/integration/expression-tests/array/default-value/test.json b/metrics/integration/expression-tests/array/default-value/test.json new file mode 100644 index 00000000000..40a849028dc --- /dev/null +++ b/metrics/integration/expression-tests/array/default-value/test.json @@ -0,0 +1,22 @@ +{ + "expression": ["array", "number", null, ["get", "x"], ["literal", [0]]], + "inputs": [ + [{}, {}], + [{}, {"properties": {"x": []}}], + [{}, {"properties": {"x": ["1"]}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "array" + }, + "outputs": [ + [0], + [], + [0] + ], + "serialized": ["array", "number", null, ["get", "x"], ["literal", [0]]] + } +} diff --git a/metrics/integration/expression-tests/array/implicit-1/test.json b/metrics/integration/expression-tests/array/implicit-1/test.json new file mode 100644 index 00000000000..d55f44e291d --- /dev/null +++ b/metrics/integration/expression-tests/array/implicit-1/test.json @@ -0,0 +1,20 @@ +{ + "expression": ["at", 0, ["get", "array"]], + "inputs": [ + [{}, {"properties": {"array": [0, 1, 2]}}], + [{}, {"properties": {"array": "not"}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "value" + }, + "outputs": [ + 0, + {"error": "Expected value to be of type array, but found string instead."} + ], + "serialized": ["at", 0, ["array", ["get", "array"]]] + } +} diff --git a/metrics/integration/expression-tests/array/implicit-2/test.json b/metrics/integration/expression-tests/array/implicit-2/test.json new file mode 100644 index 00000000000..8c6fe029c57 --- /dev/null +++ b/metrics/integration/expression-tests/array/implicit-2/test.json @@ -0,0 +1,32 @@ +{ + "propertySpec": { + "type": "array", + "value": "string", + "property-type": "data-driven", + "expression": {"parameters": ["zoom", "feature"]} + }, + "expression": ["get", "array"], + "inputs": [ + [{}, {"properties": {"array": ["a", "b"]}}], + [{}, {"properties": {"array": [1, 2]}}], + [{}, {"properties": {"array": "not"}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "array" + }, + "outputs": [ + ["a", "b"], + { + "error": "Expected value to be of type array, but found array instead." + }, + { + "error": "Expected value to be of type array, but found string instead." + } + ], + "serialized": ["array", "string", ["get", "array"]] + } +} diff --git a/metrics/integration/expression-tests/array/implicit-3/test.json b/metrics/integration/expression-tests/array/implicit-3/test.json new file mode 100644 index 00000000000..2b095e411b8 --- /dev/null +++ b/metrics/integration/expression-tests/array/implicit-3/test.json @@ -0,0 +1,33 @@ +{ + "propertySpec": { + "type": "array", + "value": "number", + "length": 2, + "property-type": "data-driven", + "expression": {"parameters": ["zoom", "feature"]} + }, + "expression": ["get", "array"], + "inputs": [ + [{}, {"properties": {"array": [1, 2]}}], + [{}, {"properties": {"array": [1, 2, 3]}}], + [{}, {"properties": {"array": "not"}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "array" + }, + "outputs": [ + [1, 2], + { + "error": "Expected value to be of type array, but found array instead." + }, + { + "error": "Expected value to be of type array, but found string instead." + } + ], + "serialized": ["array", "number", 2, ["get", "array"]] + } +} diff --git a/metrics/integration/expression-tests/array/item-type-and-length/test.json b/metrics/integration/expression-tests/array/item-type-and-length/test.json new file mode 100644 index 00000000000..cac818e08e1 --- /dev/null +++ b/metrics/integration/expression-tests/array/item-type-and-length/test.json @@ -0,0 +1,26 @@ +{ + "expression": ["array", "number", 2, ["get", "x"]], + "inputs": [ + [{}, {"properties": {"x": [1, 0]}}], + [{}, {"properties": {"x": [0]}}], + [{}, {"properties": {"x": [1, 2, 3]}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "array" + }, + "outputs": [ + [1, 0], + { + "error": "Expected value to be of type array, but found array instead." + }, + { + "error": "Expected value to be of type array, but found array instead." + } + ], + "serialized": ["array", "number", 2, ["get", "x"]] + } +} diff --git a/metrics/integration/expression-tests/array/item-type/test.json b/metrics/integration/expression-tests/array/item-type/test.json new file mode 100644 index 00000000000..bd3b326bbb6 --- /dev/null +++ b/metrics/integration/expression-tests/array/item-type/test.json @@ -0,0 +1,28 @@ +{ + "expression": ["array", "string", ["get", "x"]], + "inputs": [ + [{}, {"properties": {"x": ["a", "b"]}}], + [{}, {"properties": {"x": [1, 2]}}], + [{}, {"properties": {"x": [1, "b"]}}], + [{}, {"properties": {"x": []}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "array" + }, + "outputs": [ + ["a", "b"], + { + "error": "Expected value to be of type array, but found array instead." + }, + { + "error": "Expected value to be of type array, but found array instead." + }, + [] + ], + "serialized": ["array", "string", ["get", "x"]] + } +} diff --git a/metrics/integration/expression-tests/asin/basic/test.json b/metrics/integration/expression-tests/asin/basic/test.json new file mode 100644 index 00000000000..1da64326710 --- /dev/null +++ b/metrics/integration/expression-tests/asin/basic/test.json @@ -0,0 +1,14 @@ +{ + "expression": ["asin", 0.5], + "inputs": [[{}, {}]], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": true, + "isZoomConstant": true, + "type": "number" + }, + "outputs": [0.523598], + "serialized": 0.5235987755982989 + } +} diff --git a/metrics/integration/expression-tests/at/basic/test.json b/metrics/integration/expression-tests/at/basic/test.json new file mode 100644 index 00000000000..47ba77bccfc --- /dev/null +++ b/metrics/integration/expression-tests/at/basic/test.json @@ -0,0 +1,30 @@ +{ + "expression": [ + "number", + ["at", ["number", ["get", "i"]], ["array", ["get", "arr"]]] + ], + "inputs": [ + [{}, {"properties": {"i": 1, "arr": [9, 8, 7]}}], + [{}, {"properties": {"i": -1, "arr": [9, 8, 7]}}], + [{}, {"properties": {"i": 4, "arr": [9, 8, 7]}}], + [{}, {"properties": {"i": 1.5, "arr": [9, 8, 7]}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "number" + }, + "outputs": [ + 8, + {"error": "Array index out of bounds: -1 < 0."}, + {"error": "Array index out of bounds: 4 > 2."}, + {"error": "Array index must be an integer, but found 1.5 instead."} + ], + "serialized": [ + "number", + ["at", ["number", ["get", "i"]], ["array", ["get", "arr"]]] + ] + } +} diff --git a/metrics/integration/expression-tests/at/infer-array-type/test.json b/metrics/integration/expression-tests/at/infer-array-type/test.json new file mode 100644 index 00000000000..e3e6c2ac1cc --- /dev/null +++ b/metrics/integration/expression-tests/at/infer-array-type/test.json @@ -0,0 +1,20 @@ +{ + "propertySpec": { + "type": "string", + "property-type": "data-driven", + "expression": {"parameters": ["zoom", "feature"]} + }, + "expression": ["at", 1, ["literal", [1, 2, 3]]], + "inputs": [], + "expected": { + "compiled": { + "result": "error", + "errors": [ + { + "key": "[2]", + "error": "Expected array but found array instead." + } + ] + } + } +} diff --git a/metrics/integration/expression-tests/atan/basic/test.json b/metrics/integration/expression-tests/atan/basic/test.json new file mode 100644 index 00000000000..1789434a632 --- /dev/null +++ b/metrics/integration/expression-tests/atan/basic/test.json @@ -0,0 +1,14 @@ +{ + "expression": ["atan", 1], + "inputs": [[{}, {}]], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": true, + "isZoomConstant": true, + "type": "number" + }, + "outputs": [0.785398], + "serialized": 0.7853981633974483 + } +} diff --git a/metrics/integration/expression-tests/boolean/basic/test.json b/metrics/integration/expression-tests/boolean/basic/test.json new file mode 100644 index 00000000000..1bb399c31af --- /dev/null +++ b/metrics/integration/expression-tests/boolean/basic/test.json @@ -0,0 +1,42 @@ +{ + "expression": ["boolean", ["get", "x"]], + "inputs": [ + [{}, {}], + [{}, {"properties": {"x": true}}], + [{}, {"properties": {"x": false}}], + [{}, {"properties": {"x": ""}}], + [{}, {"properties": {"x": "false"}}], + [{}, {"properties": {"x": 0}}], + [{}, {"properties": {"x": 1}}], + [{}, {"properties": {"x": null}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "boolean" + }, + "outputs": [ + { + "error": "Expected value to be of type boolean, but found null instead." + }, + true, + false, + { + "error": "Expected value to be of type boolean, but found string instead." + }, + { + "error": "Expected value to be of type boolean, but found string instead." + }, + { + "error": "Expected value to be of type boolean, but found number instead." + }, + { + "error": "Expected value to be of type boolean, but found number instead." + }, + {"error": "Expected value to be of type boolean, but found null instead."} + ], + "serialized": ["boolean", ["get", "x"]] + } +} diff --git a/metrics/integration/expression-tests/boolean/default-value/test.json b/metrics/integration/expression-tests/boolean/default-value/test.json new file mode 100644 index 00000000000..10083134608 --- /dev/null +++ b/metrics/integration/expression-tests/boolean/default-value/test.json @@ -0,0 +1,23 @@ +{ + "expression": ["boolean", ["get", "x"], false], + "inputs": [ + [{}, {}], + [{}, {"properties": {"x": true}}], + [{}, {"properties": {"x": false}}], + [{}, {"properties": {"x": ""}}], + [{}, {"properties": {"x": "false"}}], + [{}, {"properties": {"x": 0}}], + [{}, {"properties": {"x": 1}}], + [{}, {"properties": {"x": null}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "boolean" + }, + "outputs": [false, true, false, false, false, false, false, false], + "serialized": ["boolean", ["get", "x"], false] + } +} diff --git a/metrics/integration/expression-tests/case/basic/test.json b/metrics/integration/expression-tests/case/basic/test.json new file mode 100644 index 00000000000..510e4eb391a --- /dev/null +++ b/metrics/integration/expression-tests/case/basic/test.json @@ -0,0 +1,40 @@ +{ + "propertySpec": { + "type": "string", + "property-type": "data-driven", + "expression": {"parameters": ["zoom", "feature"]} + }, + "expression": ["case", ["get", "x"], "x", ["get", "y"], "y", "otherwise"], + "inputs": [ + [{}, {"properties": {"x": true, "y": true}}], + [{}, {"properties": {"x": true, "y": false}}], + [{}, {"properties": {"x": false, "y": true}}], + [{}, {"properties": {"x": false, "y": false}}], + [{}, {"properties": {"x": "false", "y": false}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "string" + }, + "outputs": [ + "x", + "x", + "y", + "otherwise", + { + "error": "Expected value to be of type boolean, but found string instead." + } + ], + "serialized": [ + "case", + ["boolean", ["get", "x"]], + "x", + ["boolean", ["get", "y"]], + "y", + "otherwise" + ] + } +} diff --git a/metrics/integration/expression-tests/case/infer-array-type/test.json b/metrics/integration/expression-tests/case/infer-array-type/test.json new file mode 100644 index 00000000000..9c5e3ec25f8 --- /dev/null +++ b/metrics/integration/expression-tests/case/infer-array-type/test.json @@ -0,0 +1,30 @@ +{ + "propertySpec": { + "type": "array", + "value": "string", + "property-type": "data-driven", + "expression": {"parameters": ["zoom", "feature"]} + }, + "expression": [ + "case", + ["boolean", ["get", "x"]], + ["literal", ["one"]], + ["literal", ["one", "two"]] + ], + "inputs": [], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "array" + }, + "outputs": [], + "serialized": [ + "case", + ["boolean", ["get", "x"]], + ["literal", ["one"]], + ["literal", ["one", "two"]] + ] + } +} diff --git a/metrics/integration/expression-tests/case/precedence/test.json b/metrics/integration/expression-tests/case/precedence/test.json new file mode 100644 index 00000000000..07e732e8267 --- /dev/null +++ b/metrics/integration/expression-tests/case/precedence/test.json @@ -0,0 +1,14 @@ +{ + "expression": ["boolean", ["all", false, ["case", true, true, true]]], + "inputs": [[{}, {}]], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": true, + "isZoomConstant": true, + "type": "boolean" + }, + "outputs": [false], + "serialized": false + } +} diff --git a/metrics/integration/expression-tests/ceil/basic/test.json b/metrics/integration/expression-tests/ceil/basic/test.json new file mode 100644 index 00000000000..8fbee7c586f --- /dev/null +++ b/metrics/integration/expression-tests/ceil/basic/test.json @@ -0,0 +1,23 @@ +{ + "expression": ["ceil", ["get", "x"]], + "inputs": [ + [{}, {"properties": {"x": -2.6}}], + [{}, {"properties": {"x": -2.5}}], + [{}, {"properties": {"x": -2.4}}], + [{}, {"properties": {"x": -2}}], + [{}, {"properties": {"x": 2.6}}], + [{}, {"properties": {"x": 2.5}}], + [{}, {"properties": {"x": 2.4}}], + [{}, {"properties": {"x": 2}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "number" + }, + "outputs": [-2, -2, -2, -2, 3, 3, 3, 2], + "serialized": ["ceil", ["number", ["get", "x"]]] + } +} diff --git a/metrics/integration/expression-tests/coalesce/argument-type-mismatch/test.json b/metrics/integration/expression-tests/coalesce/argument-type-mismatch/test.json new file mode 100644 index 00000000000..b10de788bd0 --- /dev/null +++ b/metrics/integration/expression-tests/coalesce/argument-type-mismatch/test.json @@ -0,0 +1,12 @@ +{ + "propertySpec": {"type": "string"}, + "expression": ["coalesce", ["get", "a"], 5], + "expected": { + "compiled": { + "result": "error", + "errors": [ + {"key": "[2]", "error": "Expected string but found number instead."} + ] + } + } +} diff --git a/metrics/integration/expression-tests/coalesce/basic/test.json b/metrics/integration/expression-tests/coalesce/basic/test.json new file mode 100644 index 00000000000..1df53771fef --- /dev/null +++ b/metrics/integration/expression-tests/coalesce/basic/test.json @@ -0,0 +1,20 @@ +{ + "expression": ["coalesce", ["get", "x"], ["get", "y"], ["get", "z"], 0], + "inputs": [ + [{}, {"properties": {"x": 1}}], + [{}, {"properties": {"x": 1, "y": 2, "z": 3}}], + [{}, {"properties": {"y": 2}}], + [{}, {"properties": {"z": 3}}], + [{}, {}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "value" + }, + "outputs": [1, 1, 2, 3, 0], + "serialized": ["coalesce", ["get", "x"], ["get", "y"], ["get", "z"], 0] + } +} diff --git a/metrics/integration/expression-tests/coalesce/error/test.json b/metrics/integration/expression-tests/coalesce/error/test.json new file mode 100644 index 00000000000..703151b208a --- /dev/null +++ b/metrics/integration/expression-tests/coalesce/error/test.json @@ -0,0 +1,36 @@ +{ + "expression": [ + "coalesce", + ["number", ["get", "x"]], + ["number", ["get", "y"]], + ["number", ["get", "z"]] + ], + "inputs": [ + [{}, {"properties": {"x": 1}}], + [{}, {"properties": {"x": 1, "y": 2, "z": 3}}], + [{}, {"properties": {"y": 2}}], + [{}, {"properties": {"z": 3}}], + [{}, {}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "number" + }, + "outputs": [ + 1, + 1, + {"error": "Expected value to be of type number, but found null instead."}, + {"error": "Expected value to be of type number, but found null instead."}, + {"error": "Expected value to be of type number, but found null instead."} + ], + "serialized": [ + "coalesce", + ["number", ["get", "x"]], + ["number", ["get", "y"]], + ["number", ["get", "z"]] + ] + } +} diff --git a/metrics/integration/expression-tests/coalesce/infer-array-type/test.json b/metrics/integration/expression-tests/coalesce/infer-array-type/test.json new file mode 100644 index 00000000000..8661cffed26 --- /dev/null +++ b/metrics/integration/expression-tests/coalesce/infer-array-type/test.json @@ -0,0 +1,26 @@ +{ + "propertySpec": { + "type": "array", + "value": "string", + "property-type": "data-driven", + "expression": {"parameters": ["zoom", "feature"]} + }, + "expression": [ + "coalesce", + ["literal", ["one"]], + ["literal", ["one", "two"]], + null + ], + "inputs": [], + "expected": { + "compiled": { + "result": "error", + "errors": [ + { + "key": "[3]", + "error": "Expected array but found null instead." + } + ] + } + } +} diff --git a/metrics/integration/expression-tests/coalesce/inference/test.json b/metrics/integration/expression-tests/coalesce/inference/test.json new file mode 100644 index 00000000000..8399bb10035 --- /dev/null +++ b/metrics/integration/expression-tests/coalesce/inference/test.json @@ -0,0 +1,25 @@ +{ + "propertySpec": {"type": "string"}, + "expression": ["coalesce", ["get", "a"], ["get", "b"]], + "inputs": [ + [{}, {"properties": {"a": "one"}}], + [{}, {"properties": {"b": "two"}}], + [{}, {"properties": {"b": 5}}], + [{}, {"properties": {}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "string" + }, + "outputs": [ + "one", + "two", + "5", + "" + ], + "serialized": ["to-string", ["coalesce", ["get", "a"], ["get", "b"]]] + } +} diff --git a/metrics/integration/expression-tests/coalesce/null/test.json b/metrics/integration/expression-tests/coalesce/null/test.json new file mode 100644 index 00000000000..a0ceaf77852 --- /dev/null +++ b/metrics/integration/expression-tests/coalesce/null/test.json @@ -0,0 +1,15 @@ +{ + "expectExpressionType": null, + "expression": ["coalesce", ["get", "z"], 0], + "inputs": [[{}, {"properties": {"z": 1}}], [{}, {"properties": {"z": null}}]], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "value" + }, + "outputs": [1, 0], + "serialized": ["coalesce", ["get", "z"], 0] + } +} diff --git a/metrics/integration/expression-tests/collator/accent-equals-de/test.json b/metrics/integration/expression-tests/collator/accent-equals-de/test.json new file mode 100644 index 00000000000..e69ebb8943b --- /dev/null +++ b/metrics/integration/expression-tests/collator/accent-equals-de/test.json @@ -0,0 +1,67 @@ +{ + "expression": [ + "case", + [ + "==", + [ + "resolved-locale", + [ + "collator", + {"case-sensitive": true, "diacritic-sensitive": false, "locale": "de"} + ] + ], + "de" + ], + [ + "==", + ["string", ["get", "lhs"]], + ["get", "rhs"], + [ + "collator", + {"case-sensitive": true, "diacritic-sensitive": false, "locale": "de"} + ] + ], + ["case", ["==", ["get", "rhs"], "ue"], true, false] + ], + "inputs": [ + [{}, {"properties": {"lhs": "ü", "rhs": "ue"}}], + [{}, {"properties": {"lhs": "ü", "rhs": "u"}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "boolean" + }, + "outputs": [true, false], + "serialized": [ + "case", + [ + "==", + [ + "resolved-locale", + [ + "collator", + { + "case-sensitive": true, + "diacritic-sensitive": false, + "locale": "de" + } + ] + ], + "de" + ], + [ + "==", + ["string", ["get", "lhs"]], + ["get", "rhs"], + [ + "collator", + {"case-sensitive": true, "diacritic-sensitive": false, "locale": "de"} + ] + ], + ["case", ["==", ["get", "rhs"], "ue"], true, false] + ] + } +} diff --git a/metrics/integration/expression-tests/collator/accent-lt-en/test.json b/metrics/integration/expression-tests/collator/accent-lt-en/test.json new file mode 100644 index 00000000000..f2932b72641 --- /dev/null +++ b/metrics/integration/expression-tests/collator/accent-lt-en/test.json @@ -0,0 +1,34 @@ +{ + "expression": [ + "<", + ["string", ["get", "lhs"]], + ["get", "rhs"], + [ + "collator", + {"case-sensitive": true, "diacritic-sensitive": false, "locale": "en"} + ] + ], + "inputs": [ + [{}, {"properties": {"lhs": "a", "rhs": "ä"}}], + [{}, {"properties": {"lhs": "a", "rhs": "A"}}], + [{}, {"properties": {"lhs": "ä", "rhs": "b"}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "boolean" + }, + "outputs": [false, true, true], + "serialized": [ + "<", + ["string", ["get", "lhs"]], + ["string", ["get", "rhs"]], + [ + "collator", + {"case-sensitive": true, "diacritic-sensitive": false, "locale": "en"} + ] + ] + } +} diff --git a/metrics/integration/expression-tests/collator/accent-not-equals-en/test.json b/metrics/integration/expression-tests/collator/accent-not-equals-en/test.json new file mode 100644 index 00000000000..190cb925129 --- /dev/null +++ b/metrics/integration/expression-tests/collator/accent-not-equals-en/test.json @@ -0,0 +1,40 @@ +{ + "expression": [ + "!", + [ + "!=", + ["string", ["get", "lhs"]], + ["get", "rhs"], + [ + "collator", + {"case-sensitive": true, "diacritic-sensitive": false, "locale": "en"} + ] + ] + ], + "inputs": [ + [{}, {"properties": {"lhs": "a", "rhs": "ä"}}], + [{}, {"properties": {"lhs": "a", "rhs": "A"}}], + [{}, {"properties": {"lhs": "b", "rhs": "ä"}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "boolean" + }, + "outputs": [true, false, false], + "serialized": [ + "!", + [ + "!=", + ["string", ["get", "lhs"]], + ["get", "rhs"], + [ + "collator", + {"case-sensitive": true, "diacritic-sensitive": false, "locale": "en"} + ] + ] + ] + } +} diff --git a/metrics/integration/expression-tests/collator/base-default-locale/test.json b/metrics/integration/expression-tests/collator/base-default-locale/test.json new file mode 100644 index 00000000000..46675af49d1 --- /dev/null +++ b/metrics/integration/expression-tests/collator/base-default-locale/test.json @@ -0,0 +1,28 @@ +{ + "expression": [ + "==", + ["string", ["get", "lhs"]], + ["get", "rhs"], + ["collator", {"case-sensitive": false, "diacritic-sensitive": false}] + ], + "inputs": [ + [{}, {"properties": {"lhs": "a", "rhs": "a"}}], + [{}, {"properties": {"lhs": "A", "rhs": "A"}}], + [{}, {"properties": {"lhs": "b", "rhs": "a"}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "boolean" + }, + "outputs": [true, true, false], + "serialized": [ + "==", + ["string", ["get", "lhs"]], + ["get", "rhs"], + ["collator", {"case-sensitive": false, "diacritic-sensitive": false}] + ] + } +} diff --git a/metrics/integration/expression-tests/collator/base-equals-en/test.json b/metrics/integration/expression-tests/collator/base-equals-en/test.json new file mode 100644 index 00000000000..554e90d5624 --- /dev/null +++ b/metrics/integration/expression-tests/collator/base-equals-en/test.json @@ -0,0 +1,34 @@ +{ + "expression": [ + "==", + ["string", ["get", "lhs"]], + ["get", "rhs"], + [ + "collator", + {"case-sensitive": false, "diacritic-sensitive": false, "locale": "en"} + ] + ], + "inputs": [ + [{}, {"properties": {"lhs": "a", "rhs": "ä"}}], + [{}, {"properties": {"lhs": "a", "rhs": "A"}}], + [{}, {"properties": {"lhs": "b", "rhs": "ä"}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "boolean" + }, + "outputs": [true, true, false], + "serialized": [ + "==", + ["string", ["get", "lhs"]], + ["get", "rhs"], + [ + "collator", + {"case-sensitive": false, "diacritic-sensitive": false, "locale": "en"} + ] + ] + } +} diff --git a/metrics/integration/expression-tests/collator/base-gt-en/test.json b/metrics/integration/expression-tests/collator/base-gt-en/test.json new file mode 100644 index 00000000000..0a33197f63a --- /dev/null +++ b/metrics/integration/expression-tests/collator/base-gt-en/test.json @@ -0,0 +1,34 @@ +{ + "expression": [ + ">", + ["string", ["get", "lhs"]], + ["get", "rhs"], + [ + "collator", + {"case-sensitive": false, "diacritic-sensitive": false, "locale": "en"} + ] + ], + "inputs": [ + [{}, {"properties": {"lhs": "a", "rhs": "ä"}}], + [{}, {"properties": {"lhs": "a", "rhs": "A"}}], + [{}, {"properties": {"lhs": "b", "rhs": "ä"}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "boolean" + }, + "outputs": [false, false, true], + "serialized": [ + ">", + ["string", ["get", "lhs"]], + ["string", ["get", "rhs"]], + [ + "collator", + {"case-sensitive": false, "diacritic-sensitive": false, "locale": "en"} + ] + ] + } +} diff --git a/metrics/integration/expression-tests/collator/case-lteq-en/test.json b/metrics/integration/expression-tests/collator/case-lteq-en/test.json new file mode 100644 index 00000000000..bdbfa6802ac --- /dev/null +++ b/metrics/integration/expression-tests/collator/case-lteq-en/test.json @@ -0,0 +1,35 @@ +{ + "expression": [ + "<=", + ["string", ["get", "lhs"]], + ["get", "rhs"], + [ + "collator", + {"case-sensitive": false, "diacritic-sensitive": true, "locale": "en"} + ] + ], + "inputs": [ + [{}, {"properties": {"lhs": "ä", "rhs": "a"}}], + [{}, {"properties": {"lhs": "A", "rhs": "a"}}], + [{}, {"properties": {"lhs": "a", "rhs": "a"}}], + [{}, {"properties": {"lhs": "ä", "rhs": "b"}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "boolean" + }, + "outputs": [false, true, true, true], + "serialized": [ + "<=", + ["string", ["get", "lhs"]], + ["string", ["get", "rhs"]], + [ + "collator", + {"case-sensitive": false, "diacritic-sensitive": true, "locale": "en"} + ] + ] + } +} diff --git a/metrics/integration/expression-tests/collator/case-not-equals-en/test.json b/metrics/integration/expression-tests/collator/case-not-equals-en/test.json new file mode 100644 index 00000000000..ee494a4d5f9 --- /dev/null +++ b/metrics/integration/expression-tests/collator/case-not-equals-en/test.json @@ -0,0 +1,40 @@ +{ + "expression": [ + "!", + [ + "!=", + ["string", ["get", "lhs"]], + ["get", "rhs"], + [ + "collator", + {"case-sensitive": false, "diacritic-sensitive": true, "locale": "en"} + ] + ] + ], + "inputs": [ + [{}, {"properties": {"lhs": "a", "rhs": "ä"}}], + [{}, {"properties": {"lhs": "a", "rhs": "A"}}], + [{}, {"properties": {"lhs": "b", "rhs": "ä"}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "boolean" + }, + "outputs": [false, true, false], + "serialized": [ + "!", + [ + "!=", + ["string", ["get", "lhs"]], + ["get", "rhs"], + [ + "collator", + {"case-sensitive": false, "diacritic-sensitive": true, "locale": "en"} + ] + ] + ] + } +} diff --git a/metrics/integration/expression-tests/collator/case-omitted-en/test.json b/metrics/integration/expression-tests/collator/case-omitted-en/test.json new file mode 100644 index 00000000000..b852f5c8835 --- /dev/null +++ b/metrics/integration/expression-tests/collator/case-omitted-en/test.json @@ -0,0 +1,32 @@ +{ + "expression": [ + "==", + ["string", ["get", "lhs"]], + ["get", "rhs"], + ["collator", {"diacritic-sensitive": true, "locale": "en"}] + ], + "inputs": [ + [{}, {"properties": {"lhs": "ä", "rhs": "a"}}], + [{}, {"properties": {"lhs": "A", "rhs": "a"}}], + [{}, {"properties": {"lhs": "a", "rhs": "a"}}], + [{}, {"properties": {"lhs": "ä", "rhs": "b"}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "boolean" + }, + "outputs": [false, true, true, false], + "serialized": [ + "==", + ["string", ["get", "lhs"]], + ["get", "rhs"], + [ + "collator", + {"case-sensitive": false, "diacritic-sensitive": true, "locale": "en"} + ] + ] + } +} diff --git a/metrics/integration/expression-tests/collator/comparison-number-error/test.json b/metrics/integration/expression-tests/collator/comparison-number-error/test.json new file mode 100644 index 00000000000..921caa41d19 --- /dev/null +++ b/metrics/integration/expression-tests/collator/comparison-number-error/test.json @@ -0,0 +1,16 @@ +{ + "expression": [ + "<", + 1, + 2, + ["collator", {"case-sensitive": false, "diacritic-sensitive": false}] + ], + "expected": { + "compiled": { + "result": "error", + "errors": [ + {"key": "", "error": "Cannot use collator to compare non-string types."} + ] + } + } +} diff --git a/metrics/integration/expression-tests/collator/diacritic-omitted-en/test.json b/metrics/integration/expression-tests/collator/diacritic-omitted-en/test.json new file mode 100644 index 00000000000..db8416c792a --- /dev/null +++ b/metrics/integration/expression-tests/collator/diacritic-omitted-en/test.json @@ -0,0 +1,31 @@ +{ + "expression": [ + "<", + ["string", ["get", "lhs"]], + ["get", "rhs"], + ["collator", {"case-sensitive": ["==", 1, 1], "locale": "en"}] + ], + "inputs": [ + [{}, {"properties": {"lhs": "a", "rhs": "ä"}}], + [{}, {"properties": {"lhs": "a", "rhs": "A"}}], + [{}, {"properties": {"lhs": "ä", "rhs": "b"}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "boolean" + }, + "outputs": [false, true, true], + "serialized": [ + "<", + ["string", ["get", "lhs"]], + ["string", ["get", "rhs"]], + [ + "collator", + {"case-sensitive": true, "diacritic-sensitive": false, "locale": "en"} + ] + ] + } +} diff --git a/metrics/integration/expression-tests/collator/equals-non-string-error/test.json b/metrics/integration/expression-tests/collator/equals-non-string-error/test.json new file mode 100644 index 00000000000..4d566f90b13 --- /dev/null +++ b/metrics/integration/expression-tests/collator/equals-non-string-error/test.json @@ -0,0 +1,16 @@ +{ + "expression": [ + "==", + 1, + 2, + ["collator", {"case-sensitive": false, "diacritic-sensitive": false}] + ], + "expected": { + "compiled": { + "result": "error", + "errors": [ + {"key": "", "error": "Cannot use collator to compare non-string types."} + ] + } + } +} diff --git a/metrics/integration/expression-tests/collator/non-object-error/test.json b/metrics/integration/expression-tests/collator/non-object-error/test.json new file mode 100644 index 00000000000..148c9f1b5f9 --- /dev/null +++ b/metrics/integration/expression-tests/collator/non-object-error/test.json @@ -0,0 +1,11 @@ +{ + "expression": ["==", "foo", "bar", ["collator", ["subexpression"]]], + "expected": { + "compiled": { + "result": "error", + "errors": [ + {"key": "[3]", "error": "Collator options argument must be an object."} + ] + } + } +} diff --git a/metrics/integration/expression-tests/collator/variant-equals-en/test.json b/metrics/integration/expression-tests/collator/variant-equals-en/test.json new file mode 100644 index 00000000000..c632b45e854 --- /dev/null +++ b/metrics/integration/expression-tests/collator/variant-equals-en/test.json @@ -0,0 +1,34 @@ +{ + "expression": [ + "==", + ["string", ["get", "lhs"]], + ["get", "rhs"], + [ + "collator", + {"case-sensitive": true, "diacritic-sensitive": true, "locale": "en"} + ] + ], + "inputs": [ + [{}, {"properties": {"lhs": "a", "rhs": "ä"}}], + [{}, {"properties": {"lhs": "a", "rhs": "A"}}], + [{}, {"properties": {"lhs": "b", "rhs": "ä"}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "boolean" + }, + "outputs": [false, false, false], + "serialized": [ + "==", + ["string", ["get", "lhs"]], + ["get", "rhs"], + [ + "collator", + {"case-sensitive": true, "diacritic-sensitive": true, "locale": "en"} + ] + ] + } +} diff --git a/metrics/integration/expression-tests/collator/variant-gteq-en/test.json b/metrics/integration/expression-tests/collator/variant-gteq-en/test.json new file mode 100644 index 00000000000..ffdb3025bc1 --- /dev/null +++ b/metrics/integration/expression-tests/collator/variant-gteq-en/test.json @@ -0,0 +1,35 @@ +{ + "expression": [ + ">=", + ["string", ["get", "lhs"]], + ["get", "rhs"], + [ + "collator", + {"case-sensitive": true, "diacritic-sensitive": true, "locale": "en"} + ] + ], + "inputs": [ + [{}, {"properties": {"lhs": "a", "rhs": "ä"}}], + [{}, {"properties": {"lhs": "a", "rhs": "A"}}], + [{}, {"properties": {"lhs": "a", "rhs": "a"}}], + [{}, {"properties": {"lhs": "b", "rhs": "ä"}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "boolean" + }, + "outputs": [false, false, true, true], + "serialized": [ + ">=", + ["string", ["get", "lhs"]], + ["string", ["get", "rhs"]], + [ + "collator", + {"case-sensitive": true, "diacritic-sensitive": true, "locale": "en"} + ] + ] + } +} diff --git a/metrics/integration/expression-tests/concat/arity-0/test.json b/metrics/integration/expression-tests/concat/arity-0/test.json new file mode 100644 index 00000000000..19b57cf180b --- /dev/null +++ b/metrics/integration/expression-tests/concat/arity-0/test.json @@ -0,0 +1,14 @@ +{ + "expression": ["concat"], + "inputs": [[{}, {}]], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": true, + "isZoomConstant": true, + "type": "string" + }, + "outputs": [""], + "serialized": "" + } +} diff --git a/metrics/integration/expression-tests/concat/arity-1/test.json b/metrics/integration/expression-tests/concat/arity-1/test.json new file mode 100644 index 00000000000..a5b25ab15f1 --- /dev/null +++ b/metrics/integration/expression-tests/concat/arity-1/test.json @@ -0,0 +1,14 @@ +{ + "expression": ["concat", "foo"], + "inputs": [[{}, {}]], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": true, + "isZoomConstant": true, + "type": "string" + }, + "outputs": ["foo"], + "serialized": "foo" + } +} diff --git a/metrics/integration/expression-tests/concat/basic/test.json b/metrics/integration/expression-tests/concat/basic/test.json new file mode 100644 index 00000000000..833fd294982 --- /dev/null +++ b/metrics/integration/expression-tests/concat/basic/test.json @@ -0,0 +1,14 @@ +{ + "expression": ["concat", "a", "b", "c"], + "inputs": [[{}, {}]], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": true, + "isZoomConstant": true, + "type": "string" + }, + "outputs": ["abc"], + "serialized": "abc" + } +} diff --git a/metrics/integration/expression-tests/concat/coercion/test.json b/metrics/integration/expression-tests/concat/coercion/test.json new file mode 100644 index 00000000000..9b872b8ad84 --- /dev/null +++ b/metrics/integration/expression-tests/concat/coercion/test.json @@ -0,0 +1,14 @@ +{ + "expression": ["concat", ["get", "a"], ["get", "1"], ["get", "true"]], + "inputs": [[{}, {"properties": {"a": "a", "1": 1, "true": true}}]], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "string" + }, + "outputs": ["a1true"], + "serialized": ["concat", ["get", "a"], ["get", "1"], ["get", "true"]] + } +} diff --git a/metrics/integration/expression-tests/constant-folding/evaluation-error/test.json b/metrics/integration/expression-tests/constant-folding/evaluation-error/test.json new file mode 100644 index 00000000000..1cde4dc3584 --- /dev/null +++ b/metrics/integration/expression-tests/constant-folding/evaluation-error/test.json @@ -0,0 +1,23 @@ +{ + "propertySpec": { + "type": "color", + "property-type": "data-driven", + "expression": {"parameters": ["zoom", "feature"]} + }, + "expression": ["step", ["get", "x"], "black", 0, "invalid", 10, "blue"], + "inputs": [ + [{}, {"properties": {"x": -1}}], + [{}, {"properties": {"x": 0}}], + [{}, {"properties": {"x": 5}}], + [{}, {"properties": {"x": 10}}], + [{}, {"properties": {"x": 11}}] + ], + "expected": { + "compiled": { + "result": "error", + "errors": [ + {"key": "[4]", "error": "Could not parse color from value 'invalid'"} + ] + } + } +} diff --git a/metrics/integration/expression-tests/constant-folding/to-color-inferred/test.json b/metrics/integration/expression-tests/constant-folding/to-color-inferred/test.json new file mode 100644 index 00000000000..2d1279aa215 --- /dev/null +++ b/metrics/integration/expression-tests/constant-folding/to-color-inferred/test.json @@ -0,0 +1,15 @@ +{ + "propertySpec": {"type": "color"}, + "expression": "red", + "inputs": [[{}, {}]], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": true, + "isZoomConstant": true, + "type": "color" + }, + "outputs": [[1, 0, 0, 1]], + "serialized": ["rgba", 255, 0, 0, 1] + } +} diff --git a/metrics/integration/expression-tests/constant-folding/to-color/test.json b/metrics/integration/expression-tests/constant-folding/to-color/test.json new file mode 100644 index 00000000000..e3dfe9d4ebf --- /dev/null +++ b/metrics/integration/expression-tests/constant-folding/to-color/test.json @@ -0,0 +1,14 @@ +{ + "expression": ["to-color", "red"], + "inputs": [[{}, {}]], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": true, + "isZoomConstant": true, + "type": "color" + }, + "outputs": [[1, 0, 0, 1]], + "serialized": ["rgba", 255, 0, 0, 1] + } +} diff --git a/metrics/integration/expression-tests/constant-folding/var/test.json b/metrics/integration/expression-tests/constant-folding/var/test.json new file mode 100644 index 00000000000..7b35bddd7d3 --- /dev/null +++ b/metrics/integration/expression-tests/constant-folding/var/test.json @@ -0,0 +1,21 @@ +{ + "expression": [ + "let", + "a", + 1, + "b", + 2, + ["+", ["+", ["var", "a"], ["var", "b"]], ["var", "a"]] + ], + "inputs": [[{}, {}]], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": true, + "isZoomConstant": true, + "type": "number" + }, + "outputs": [4], + "serialized": 4 + } +} diff --git a/metrics/integration/expression-tests/cos/basic/test.json b/metrics/integration/expression-tests/cos/basic/test.json new file mode 100644 index 00000000000..3d495d60f46 --- /dev/null +++ b/metrics/integration/expression-tests/cos/basic/test.json @@ -0,0 +1,14 @@ +{ + "expression": ["cos", 0], + "inputs": [[{}, {}]], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": true, + "isZoomConstant": true, + "type": "number" + }, + "outputs": [1], + "serialized": 1 + } +} diff --git a/metrics/integration/expression-tests/divide/basic/test.json b/metrics/integration/expression-tests/divide/basic/test.json new file mode 100644 index 00000000000..9c10acab2c6 --- /dev/null +++ b/metrics/integration/expression-tests/divide/basic/test.json @@ -0,0 +1,14 @@ +{ + "expression": ["/", 10, 5], + "inputs": [[{}, {}]], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": true, + "isZoomConstant": true, + "type": "number" + }, + "outputs": [2], + "serialized": 2 + } +} diff --git a/metrics/integration/expression-tests/downcase/basic/test.json b/metrics/integration/expression-tests/downcase/basic/test.json new file mode 100644 index 00000000000..7bf06fcaeed --- /dev/null +++ b/metrics/integration/expression-tests/downcase/basic/test.json @@ -0,0 +1,14 @@ +{ + "expression": ["downcase", "StRiNg"], + "inputs": [[{}, {}]], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": true, + "isZoomConstant": true, + "type": "string" + }, + "outputs": ["string"], + "serialized": "string" + } +} diff --git a/metrics/integration/expression-tests/e/basic/test.json b/metrics/integration/expression-tests/e/basic/test.json new file mode 100644 index 00000000000..fdf524abb1e --- /dev/null +++ b/metrics/integration/expression-tests/e/basic/test.json @@ -0,0 +1,14 @@ +{ + "expression": ["e"], + "inputs": [[{}, {}]], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": true, + "isZoomConstant": true, + "type": "number" + }, + "outputs": [2.71828], + "serialized": 2.718281828459045 + } +} diff --git a/metrics/integration/expression-tests/equal/array/test.json b/metrics/integration/expression-tests/equal/array/test.json new file mode 100644 index 00000000000..fe28d07984b --- /dev/null +++ b/metrics/integration/expression-tests/equal/array/test.json @@ -0,0 +1,14 @@ +{ + "expression": ["==", ["get", "x"], ["literal", [1]]], + "expected": { + "compiled": { + "result": "error", + "errors": [ + { + "key": "[2]", + "error": "\"==\" comparisons are not supported for type 'array'." + } + ] + } + } +} diff --git a/metrics/integration/expression-tests/equal/collator-value/test.json b/metrics/integration/expression-tests/equal/collator-value/test.json new file mode 100644 index 00000000000..4d0db1e8dc0 --- /dev/null +++ b/metrics/integration/expression-tests/equal/collator-value/test.json @@ -0,0 +1,31 @@ +{ + "expression": [ + "==", + ["get", "x"], + ["get", "y"], + ["collator", {"case-sensitive": false, "diacritic-sensitive": false}] + ], + "inputs": [ + [{}, {"properties": {"x": "a", "y": "A"}}], + [{}, {"properties": {"x": "1", "y": "2"}}], + [{}, {"properties": {"x": "1", "y": null}}], + [{}, {"properties": {"x": null, "y": null}}], + [{}, {"properties": {"x": 1, "y": "1"}}], + [{}, {"properties": {"x": 1, "y": 1}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "boolean" + }, + "outputs": [true, false, false, true, false, true], + "serialized": [ + "==", + ["get", "x"], + ["get", "y"], + ["collator", {"case-sensitive": false, "diacritic-sensitive": false}] + ] + } +} diff --git a/metrics/integration/expression-tests/equal/color/test.json b/metrics/integration/expression-tests/equal/color/test.json new file mode 100644 index 00000000000..6e04c74104c --- /dev/null +++ b/metrics/integration/expression-tests/equal/color/test.json @@ -0,0 +1,14 @@ +{ + "expression": ["==", ["get", "x"], ["to-color", "red"]], + "expected": { + "compiled": { + "result": "error", + "errors": [ + { + "key": "[2]", + "error": "\"==\" comparisons are not supported for type 'color'." + } + ] + } + } +} diff --git a/metrics/integration/expression-tests/equal/mismatch/test.json b/metrics/integration/expression-tests/equal/mismatch/test.json new file mode 100644 index 00000000000..a1b44024485 --- /dev/null +++ b/metrics/integration/expression-tests/equal/mismatch/test.json @@ -0,0 +1,11 @@ +{ + "expression": ["==", ["string", ["get", "x"]], ["number", ["get", "y"]]], + "expected": { + "compiled": { + "result": "error", + "errors": [ + {"key": "", "error": "Cannot compare types 'string' and 'number'."} + ] + } + } +} diff --git a/metrics/integration/expression-tests/equal/null-lhs/test.json b/metrics/integration/expression-tests/equal/null-lhs/test.json new file mode 100644 index 00000000000..69cc18bf3b3 --- /dev/null +++ b/metrics/integration/expression-tests/equal/null-lhs/test.json @@ -0,0 +1,14 @@ +{ + "expression": ["==", null, ["get", "x"]], + "inputs": [[{}, {"properties": {}}], [{}, {"properties": {"x": 1}}]], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "boolean" + }, + "outputs": [true, false], + "serialized": ["==", null, ["get", "x"]] + } +} diff --git a/metrics/integration/expression-tests/equal/null-rhs/test.json b/metrics/integration/expression-tests/equal/null-rhs/test.json new file mode 100644 index 00000000000..69cc18bf3b3 --- /dev/null +++ b/metrics/integration/expression-tests/equal/null-rhs/test.json @@ -0,0 +1,14 @@ +{ + "expression": ["==", null, ["get", "x"]], + "inputs": [[{}, {"properties": {}}], [{}, {"properties": {"x": 1}}]], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "boolean" + }, + "outputs": [true, false], + "serialized": ["==", null, ["get", "x"]] + } +} diff --git a/metrics/integration/expression-tests/equal/number/test.json b/metrics/integration/expression-tests/equal/number/test.json new file mode 100644 index 00000000000..ec4e9687219 --- /dev/null +++ b/metrics/integration/expression-tests/equal/number/test.json @@ -0,0 +1,18 @@ +{ + "expression": ["==", ["number", ["get", "x"]], ["get", "y"]], + "inputs": [ + [{}, {"properties": {"x": 1, "y": 1}}], + [{}, {"properties": {"x": 1, "y": 2}}], + [{}, {"properties": {"x": 1, "y": "1"}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "boolean" + }, + "outputs": [true, false, false], + "serialized": ["==", ["number", ["get", "x"]], ["get", "y"]] + } +} diff --git a/metrics/integration/expression-tests/equal/object/test.json b/metrics/integration/expression-tests/equal/object/test.json new file mode 100644 index 00000000000..97a51854e82 --- /dev/null +++ b/metrics/integration/expression-tests/equal/object/test.json @@ -0,0 +1,14 @@ +{ + "expression": ["==", ["get", "x"], ["literal", {}]], + "expected": { + "compiled": { + "result": "error", + "errors": [ + { + "key": "[2]", + "error": "\"==\" comparisons are not supported for type 'object'." + } + ] + } + } +} diff --git a/metrics/integration/expression-tests/equal/string/test.json b/metrics/integration/expression-tests/equal/string/test.json new file mode 100644 index 00000000000..8a28af37b73 --- /dev/null +++ b/metrics/integration/expression-tests/equal/string/test.json @@ -0,0 +1,18 @@ +{ + "expression": ["==", ["string", ["get", "x"]], ["get", "y"]], + "inputs": [ + [{}, {"properties": {"x": "1", "y": "1"}}], + [{}, {"properties": {"x": "1", "y": 2}}], + [{}, {"properties": {"x": "1", "y": 1}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "boolean" + }, + "outputs": [true, false, false], + "serialized": ["==", ["string", ["get", "x"]], ["get", "y"]] + } +} diff --git a/metrics/integration/expression-tests/equal/value/test.json b/metrics/integration/expression-tests/equal/value/test.json new file mode 100644 index 00000000000..52d65fd40e2 --- /dev/null +++ b/metrics/integration/expression-tests/equal/value/test.json @@ -0,0 +1,21 @@ +{ + "expression": ["==", ["get", "x"], ["get", "y"]], + "inputs": [ + [{}, {"properties": {"x": 0, "y": 0}}], + [{}, {"properties": {"x": "0", "y": "0"}}], + [{}, {"properties": {"x": 0, "y": false}}], + [{}, {"properties": {"x": 0, "y": "0"}}], + [{}, {"properties": {"x": 0, "y": null}}], + [{}, {"properties": {"x": "0", "y": null}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "boolean" + }, + "outputs": [true, true, false, false, false, false], + "serialized": ["==", ["get", "x"], ["get", "y"]] + } +} diff --git a/metrics/integration/expression-tests/floor/basic/test.json b/metrics/integration/expression-tests/floor/basic/test.json new file mode 100644 index 00000000000..ad28186cec9 --- /dev/null +++ b/metrics/integration/expression-tests/floor/basic/test.json @@ -0,0 +1,23 @@ +{ + "expression": ["floor", ["get", "x"]], + "inputs": [ + [{}, {"properties": {"x": -2.6}}], + [{}, {"properties": {"x": -2.5}}], + [{}, {"properties": {"x": -2.4}}], + [{}, {"properties": {"x": -2}}], + [{}, {"properties": {"x": 2.6}}], + [{}, {"properties": {"x": 2.5}}], + [{}, {"properties": {"x": 2.4}}], + [{}, {"properties": {"x": 2}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "number" + }, + "outputs": [-3, -3, -3, -2, 2, 2, 2, 2], + "serialized": ["floor", ["number", ["get", "x"]]] + } +} diff --git a/metrics/integration/expression-tests/format/basic/test.json b/metrics/integration/expression-tests/format/basic/test.json new file mode 100644 index 00000000000..3f6eeaddc55 --- /dev/null +++ b/metrics/integration/expression-tests/format/basic/test.json @@ -0,0 +1,96 @@ +{ + "expression": [ + "format", + "a", + {}, + "b", + { + "font-scale": 2 + }, + "c", + { + "text-font": [ + "literal", + [ + "a", + "b" + ] + ] + }, + "d", + { + "text-color": "rgb(0, 255, 0)" + } + ], + "inputs": [ + [ + {}, + {} + ] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": true, + "isZoomConstant": true, + "type": "formatted" + }, + "outputs": [ + { + "sections": [ + { + "text": "a", + "image": null, + "scale": null, + "fontStack": null, + "textColor": null + }, + { + "text": "b", + "image": null, + "scale": 2, + "fontStack": null, + "textColor": null + }, + { + "text": "c", + "image": null, + "scale": null, + "fontStack": "a,b", + "textColor": null + }, + { + "text": "d", + "image": null, + "scale": null, + "fontStack": null, + "textColor": {"r":0,"g":1,"b":0,"a":1} + } + ] + } + ], + "serialized": [ + "format", + "a", + {}, + "b", + { + "font-scale": 2 + }, + "c", + { + "text-font": [ + "literal", + [ + "a", + "b" + ] + ] + }, + "d", + { + "text-color": ["rgba", 0, 255, 0, 1] + } + ] + } +} diff --git a/metrics/integration/expression-tests/format/coercion/test.json b/metrics/integration/expression-tests/format/coercion/test.json new file mode 100644 index 00000000000..213eb961575 --- /dev/null +++ b/metrics/integration/expression-tests/format/coercion/test.json @@ -0,0 +1,56 @@ +{ + "expression": [ + "format", + ["get", "a"], + {}, + ["get", "1"], + {}, + ["get", "true"], + {} + ], + "inputs": [[{}, {"properties": {"a": "a", "1": 1, "true": true}}]], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "formatted" + }, + "outputs": [ + { + "sections": [ + { + "text": "a", + "image": null, + "scale": null, + "fontStack": null, + "textColor": null + }, + { + "text": "1", + "image": null, + "scale": null, + "fontStack": null, + "textColor": null + }, + { + "text": "true", + "image": null, + "scale": null, + "fontStack": null, + "textColor": null + } + ] + } + ], + "serialized": [ + "format", + ["get", "a"], + {}, + ["get", "1"], + {}, + ["get", "true"], + {} + ] + } +} diff --git a/metrics/integration/expression-tests/format/data-driven-font/test.json b/metrics/integration/expression-tests/format/data-driven-font/test.json new file mode 100644 index 00000000000..c81fff8e8f1 --- /dev/null +++ b/metrics/integration/expression-tests/format/data-driven-font/test.json @@ -0,0 +1,52 @@ +{ + "expression": [ + "format", + "a", + { + "font-scale": ["get", "font-scale"] + } + ], + "inputs": [ + [{}, {"properties": {"font-scale": 1.5}}], + [{}, {"properties": {"font-scale": 0.5}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "formatted" + }, + "outputs": [ + { + "sections": [ + { + "text": "a", + "image": null, + "scale": 1.5, + "fontStack": null, + "textColor": null + } + ] + }, + { + "sections": [ + { + "text": "a", + "image": null, + "scale": 0.5, + "fontStack": null, + "textColor": null + } + ] + } + ], + "serialized": [ + "format", + "a", + { + "font-scale": ["number", ["get", "font-scale"]] + } + ] + } +} diff --git a/metrics/integration/expression-tests/format/data-driven-scale/test.json b/metrics/integration/expression-tests/format/data-driven-scale/test.json new file mode 100644 index 00000000000..c34d1a6b9c4 --- /dev/null +++ b/metrics/integration/expression-tests/format/data-driven-scale/test.json @@ -0,0 +1,23 @@ +{ + "expression": [ + "format", + "a", + { + "text-font": ["array", ["string", ["get", "text-font"]]] + } + ], + "inputs": [ + [{}, {"properties": {"text-font": "test"}}] + ], + "expected": { + "compiled": { + "result": "error", + "errors": [ + { + "error": "Expected array but found array instead.", + "key": "[1]" + } + ] + } + } +} diff --git a/metrics/integration/expression-tests/format/image-sections/test.json b/metrics/integration/expression-tests/format/image-sections/test.json new file mode 100644 index 00000000000..63f40ec477c --- /dev/null +++ b/metrics/integration/expression-tests/format/image-sections/test.json @@ -0,0 +1,54 @@ +{ + "expression": [ + "format", + ["image", "monument-15"], + ["image", "beach-11"] + ], + "inputs": [ + [ + {"availableImages": ["monument-15"]}, + {} + ] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": true, + "isZoomConstant": true, + "type": "formatted" + }, + "outputs": [ + { + "sections": [ + { + "text": "", + "image": {"name": "monument-15", "available": true}, + "scale": null, + "fontStack": null, + "textColor": null + }, + { + "text": "", + "image": {"name": "beach-11", "available": false}, + "scale": null, + "fontStack": null, + "textColor": null + } + ] + } + ], + "serialized": [ + "format", + [ + "image", + "monument-15" + ], + {}, + [ + "image", + "beach-11" + ], + {} + ] + } +} diff --git a/metrics/integration/expression-tests/format/implicit-assert/test.json b/metrics/integration/expression-tests/format/implicit-assert/test.json new file mode 100644 index 00000000000..ee26d2f0b43 --- /dev/null +++ b/metrics/integration/expression-tests/format/implicit-assert/test.json @@ -0,0 +1,14 @@ +{ + "expression": ["number", ["get", "p"]], + "propertySpec": { + "type": "formatted" + }, + "expected": { + "compiled": { + "result": "error", + "errors": [ + {"key": "", "error": "Expected formatted but found number instead."} + ] + } + } +} diff --git a/metrics/integration/expression-tests/format/implicit-coerce/test.json b/metrics/integration/expression-tests/format/implicit-coerce/test.json new file mode 100644 index 00000000000..6b0877bc6a9 --- /dev/null +++ b/metrics/integration/expression-tests/format/implicit-coerce/test.json @@ -0,0 +1,59 @@ +{ + "expression": ["to-string", ["get", "p"]], + "propertySpec": { + "type": "formatted" + }, + "inputs": [ + [{}, {"properties": {}}], + [{}, {"properties": {"p": 0}}], + [{}, {"properties": {"p": "a"}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "formatted" + }, + "outputs": [ + { + "sections": [ + { + "text": "", + "image": null, + "scale": null, + "fontStack": null, + "textColor": null + } + ] + }, + { + "sections": [ + { + "text": "0", + "image": null, + "scale": null, + "fontStack": null, + "textColor": null + } + ] + }, + { + "sections": [ + { + "text": "a", + "image": null, + "scale": null, + "fontStack": null, + "textColor": null + } + ] + } + ], + "serialized": [ + "format", + ["to-string", ["get", "p"]], + {} + ] + } +} diff --git a/metrics/integration/expression-tests/format/implicit-omit/test.json b/metrics/integration/expression-tests/format/implicit-omit/test.json new file mode 100644 index 00000000000..c586958ede4 --- /dev/null +++ b/metrics/integration/expression-tests/format/implicit-omit/test.json @@ -0,0 +1,59 @@ +{ + "expression": ["coalesce", ["get", "q"], ["get", "p"]], + "propertySpec": { + "type": "formatted" + }, + "inputs": [ + [{}, {"properties": {}}], + [{}, {"properties": {"p": 0}}], + [{}, {"properties": {"p": "a"}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "formatted" + }, + "outputs": [ + { + "sections": [ + { + "text": "", + "image": null, + "scale": null, + "fontStack": null, + "textColor": null + } + ] + }, + { + "sections": [ + { + "text": "0", + "image": null, + "scale": null, + "fontStack": null, + "textColor": null + } + ] + }, + { + "sections": [ + { + "text": "a", + "image": null, + "scale": null, + "fontStack": null, + "textColor": null + } + ] + } + ], + "serialized": [ + "format", + ["coalesce", ["get", "q"], ["get", "p"]], + {} + ] + } +} diff --git a/metrics/integration/expression-tests/format/implicit/test.json b/metrics/integration/expression-tests/format/implicit/test.json new file mode 100644 index 00000000000..097bdf814e4 --- /dev/null +++ b/metrics/integration/expression-tests/format/implicit/test.json @@ -0,0 +1,59 @@ +{ + "expression": ["get", "p"], + "propertySpec": { + "type": "formatted" + }, + "inputs": [ + [{}, {"properties": {}}], + [{}, {"properties": {"p": 0}}], + [{}, {"properties": {"p": "a"}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "formatted" + }, + "outputs": [ + { + "sections": [ + { + "text": "", + "image": null, + "scale": null, + "fontStack": null, + "textColor": null + } + ] + }, + { + "sections": [ + { + "text": "0", + "image": null, + "scale": null, + "fontStack": null, + "textColor": null + } + ] + }, + { + "sections": [ + { + "text": "a", + "image": null, + "scale": null, + "fontStack": null, + "textColor": null + } + ] + } + ], + "serialized": [ + "format", + ["get", "p"], + {} + ] + } +} diff --git a/metrics/integration/expression-tests/format/to-string/test.json b/metrics/integration/expression-tests/format/to-string/test.json new file mode 100644 index 00000000000..2c505712fbd --- /dev/null +++ b/metrics/integration/expression-tests/format/to-string/test.json @@ -0,0 +1,42 @@ +{ + "expression": [ + "to-string", + [ + "format", + "a", + {}, + "b", + { + "font-scale": 2 + }, + "c", + { + "text-font": [ + "literal", + [ + "a", + "b" + ] + ] + } + ] + ], + "inputs": [ + [ + {}, + {} + ] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": true, + "isZoomConstant": true, + "type": "string" + }, + "outputs": [ + "abc" + ], + "serialized": "abc" + } +} diff --git a/metrics/integration/expression-tests/geometry-type/basic/test.json b/metrics/integration/expression-tests/geometry-type/basic/test.json new file mode 100644 index 00000000000..999521d88e0 --- /dev/null +++ b/metrics/integration/expression-tests/geometry-type/basic/test.json @@ -0,0 +1,16 @@ +{ + "expression": ["geometry-type"], + "inputs": [ + [{}, {"geometry": {"type": "LineString", "coordinates": [[0, 0], [10, 0]]}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "string" + }, + "outputs": ["LineString"], + "serialized": ["geometry-type"] + } +} diff --git a/metrics/integration/expression-tests/get/basic/test.json b/metrics/integration/expression-tests/get/basic/test.json new file mode 100644 index 00000000000..b5b8da5a40b --- /dev/null +++ b/metrics/integration/expression-tests/get/basic/test.json @@ -0,0 +1,17 @@ +{ + "expression": ["number", ["get", "x"]], + "inputs": [[{}, {}], [{}, {"properties": {"x": 1}}]], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "number" + }, + "outputs": [ + {"error": "Expected value to be of type number, but found null instead."}, + 1 + ], + "serialized": ["number", ["get", "x"]] + } +} diff --git a/metrics/integration/expression-tests/get/from-literal--missing/test.json b/metrics/integration/expression-tests/get/from-literal--missing/test.json new file mode 100644 index 00000000000..dcd403efd4e --- /dev/null +++ b/metrics/integration/expression-tests/get/from-literal--missing/test.json @@ -0,0 +1,15 @@ +{ + "expression": ["number", ["get", "x", ["literal", {"y": 0}]]], + "inputs": [[{}, {}]], + "expected": { + "compiled": { + "result": "error", + "errors": [ + { + "key": "", + "error": "Expected value to be of type number, but found null instead." + } + ] + } + } +} diff --git a/metrics/integration/expression-tests/get/from-literal/test.json b/metrics/integration/expression-tests/get/from-literal/test.json new file mode 100644 index 00000000000..e7ee4478b83 --- /dev/null +++ b/metrics/integration/expression-tests/get/from-literal/test.json @@ -0,0 +1,14 @@ +{ + "expression": ["number", ["get", "x", ["literal", {"x": 0}]]], + "inputs": [[{}, {}]], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": true, + "isZoomConstant": true, + "type": "number" + }, + "outputs": [0], + "serialized": 0 + } +} diff --git a/metrics/integration/expression-tests/get/from-object-property/test.json b/metrics/integration/expression-tests/get/from-object-property/test.json new file mode 100644 index 00000000000..6d1c091e2ab --- /dev/null +++ b/metrics/integration/expression-tests/get/from-object-property/test.json @@ -0,0 +1,14 @@ +{ + "expression": ["number", ["get", "x", ["object", ["get", "a"]]]], + "inputs": [[{}, {"properties": {"a": {"x": 1}}}]], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "number" + }, + "outputs": [1], + "serialized": ["number", ["get", "x", ["object", ["get", "a"]]]] + } +} diff --git a/metrics/integration/expression-tests/greater/boolean/test.json b/metrics/integration/expression-tests/greater/boolean/test.json new file mode 100644 index 00000000000..0947dcf6eee --- /dev/null +++ b/metrics/integration/expression-tests/greater/boolean/test.json @@ -0,0 +1,14 @@ +{ + "expression": [">", ["boolean", ["get", "x"]], ["boolean", ["get", "y"]]], + "expected": { + "compiled": { + "result": "error", + "errors": [ + { + "key": "[1]", + "error": "\">\" comparisons are not supported for type 'boolean'." + } + ] + } + } +} diff --git a/metrics/integration/expression-tests/greater/mismatch/test.json b/metrics/integration/expression-tests/greater/mismatch/test.json new file mode 100644 index 00000000000..e073c4848a1 --- /dev/null +++ b/metrics/integration/expression-tests/greater/mismatch/test.json @@ -0,0 +1,11 @@ +{ + "expression": [">", ["string", ["get", "x"]], ["number", ["get", "y"]]], + "expected": { + "compiled": { + "result": "error", + "errors": [ + {"key": "", "error": "Cannot compare types 'string' and 'number'."} + ] + } + } +} diff --git a/metrics/integration/expression-tests/greater/null/test.json b/metrics/integration/expression-tests/greater/null/test.json new file mode 100644 index 00000000000..44c8e864d72 --- /dev/null +++ b/metrics/integration/expression-tests/greater/null/test.json @@ -0,0 +1,14 @@ +{ + "expression": [">", null, null], + "expected": { + "compiled": { + "result": "error", + "errors": [ + { + "key": "[1]", + "error": "\">\" comparisons are not supported for type 'null'." + } + ] + } + } +} diff --git a/metrics/integration/expression-tests/greater/number/test.json b/metrics/integration/expression-tests/greater/number/test.json new file mode 100644 index 00000000000..15d24ab9528 --- /dev/null +++ b/metrics/integration/expression-tests/greater/number/test.json @@ -0,0 +1,18 @@ +{ + "expression": [">", ["number", ["get", "x"]], ["number", ["get", "y"]]], + "inputs": [ + [{}, {"properties": {"x": 1, "y": 1}}], + [{}, {"properties": {"x": 1, "y": 2}}], + [{}, {"properties": {"x": 2, "y": 1}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "boolean" + }, + "outputs": [false, false, true], + "serialized": [">", ["number", ["get", "x"]], ["number", ["get", "y"]]] + } +} diff --git a/metrics/integration/expression-tests/greater/string-and-value/test.json b/metrics/integration/expression-tests/greater/string-and-value/test.json new file mode 100644 index 00000000000..e345c087acb --- /dev/null +++ b/metrics/integration/expression-tests/greater/string-and-value/test.json @@ -0,0 +1,26 @@ +{ + "expression": [">", ["string", ["get", "x"]], ["get", "y"]], + "inputs": [ + [{}, {"properties": {"x": "2", "y": "1"}}], + [{}, {"properties": {"x": "2", "y": 1}}], + [{}, {"properties": {"x": 2, "y": "1"}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "boolean" + }, + "outputs": [ + true, + { + "error": "Expected value to be of type string, but found number instead." + }, + { + "error": "Expected value to be of type string, but found number instead." + } + ], + "serialized": [">", ["string", ["get", "x"]], ["string", ["get", "y"]]] + } +} diff --git a/metrics/integration/expression-tests/greater/string/test.json b/metrics/integration/expression-tests/greater/string/test.json new file mode 100644 index 00000000000..26927b20a6f --- /dev/null +++ b/metrics/integration/expression-tests/greater/string/test.json @@ -0,0 +1,21 @@ +{ + "expression": [">", ["string", ["get", "x"]], ["string", ["get", "y"]]], + "inputs": [ + [{}, {"properties": {"x": "1", "y": "1"}}], + [{}, {"properties": {"x": "1", "y": "2"}}], + [{}, {"properties": {"x": "2", "y": "1"}}], + [{}, {"properties": {"x": "abc", "y": "azz"}}], + [{}, {"properties": {"x": "abc", "y": "aaa"}}], + [{}, {"properties": {"x": "abc", "y": "abc"}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "boolean" + }, + "outputs": [false, false, true, false, true, false], + "serialized": [">", ["string", ["get", "x"]], ["string", ["get", "y"]]] + } +} diff --git a/metrics/integration/expression-tests/greater/value/test.json b/metrics/integration/expression-tests/greater/value/test.json new file mode 100644 index 00000000000..75c314eeccd --- /dev/null +++ b/metrics/integration/expression-tests/greater/value/test.json @@ -0,0 +1,28 @@ +{ + "expression": [">", ["get", "x"], ["get", "y"]], + "inputs": [ + [{}, {"properties": {"x": "2", "y": "10"}}], + [{}, {"properties": {"x": 10, "y": 1}}], + [{}, {"properties": {"x": "1", "y": 1}}], + [{}, {"properties": {"x": 1, "y": "1"}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "boolean" + }, + "outputs": [ + true, + true, + { + "error": "Expected arguments for \">\" to be (string, string) or (number, number), but found (string, number) instead." + }, + { + "error": "Expected arguments for \">\" to be (string, string) or (number, number), but found (number, string) instead." + } + ], + "serialized": [">", ["get", "x"], ["get", "y"]] + } +} diff --git a/metrics/integration/expression-tests/greater_or_equal/boolean/test.json b/metrics/integration/expression-tests/greater_or_equal/boolean/test.json new file mode 100644 index 00000000000..5ec7d802104 --- /dev/null +++ b/metrics/integration/expression-tests/greater_or_equal/boolean/test.json @@ -0,0 +1,14 @@ +{ + "expression": [">=", ["boolean", ["get", "x"]], ["boolean", ["get", "y"]]], + "expected": { + "compiled": { + "result": "error", + "errors": [ + { + "key": "[1]", + "error": "\">=\" comparisons are not supported for type 'boolean'." + } + ] + } + } +} diff --git a/metrics/integration/expression-tests/greater_or_equal/mismatch/test.json b/metrics/integration/expression-tests/greater_or_equal/mismatch/test.json new file mode 100644 index 00000000000..9b2275f0f2c --- /dev/null +++ b/metrics/integration/expression-tests/greater_or_equal/mismatch/test.json @@ -0,0 +1,11 @@ +{ + "expression": [">=", ["string", ["get", "x"]], ["number", ["get", "y"]]], + "expected": { + "compiled": { + "result": "error", + "errors": [ + {"key": "", "error": "Cannot compare types 'string' and 'number'."} + ] + } + } +} diff --git a/metrics/integration/expression-tests/greater_or_equal/null/test.json b/metrics/integration/expression-tests/greater_or_equal/null/test.json new file mode 100644 index 00000000000..4fbf753fcf8 --- /dev/null +++ b/metrics/integration/expression-tests/greater_or_equal/null/test.json @@ -0,0 +1,14 @@ +{ + "expression": [">=", null, null], + "expected": { + "compiled": { + "result": "error", + "errors": [ + { + "key": "[1]", + "error": "\">=\" comparisons are not supported for type 'null'." + } + ] + } + } +} diff --git a/metrics/integration/expression-tests/greater_or_equal/number/test.json b/metrics/integration/expression-tests/greater_or_equal/number/test.json new file mode 100644 index 00000000000..cf731070fb6 --- /dev/null +++ b/metrics/integration/expression-tests/greater_or_equal/number/test.json @@ -0,0 +1,18 @@ +{ + "expression": [">=", ["number", ["get", "x"]], ["number", ["get", "y"]]], + "inputs": [ + [{}, {"properties": {"x": 1, "y": 1}}], + [{}, {"properties": {"x": 1, "y": 2}}], + [{}, {"properties": {"x": 2, "y": 1}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "boolean" + }, + "outputs": [true, false, true], + "serialized": [">=", ["number", ["get", "x"]], ["number", ["get", "y"]]] + } +} diff --git a/metrics/integration/expression-tests/greater_or_equal/string-and-value/test.json b/metrics/integration/expression-tests/greater_or_equal/string-and-value/test.json new file mode 100644 index 00000000000..0cdd25d88a2 --- /dev/null +++ b/metrics/integration/expression-tests/greater_or_equal/string-and-value/test.json @@ -0,0 +1,26 @@ +{ + "expression": [">=", ["string", ["get", "x"]], ["get", "y"]], + "inputs": [ + [{}, {"properties": {"x": "1", "y": "1"}}], + [{}, {"properties": {"x": "1", "y": 1}}], + [{}, {"properties": {"x": 1, "y": "1"}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "boolean" + }, + "outputs": [ + true, + { + "error": "Expected value to be of type string, but found number instead." + }, + { + "error": "Expected value to be of type string, but found number instead." + } + ], + "serialized": [">=", ["string", ["get", "x"]], ["string", ["get", "y"]]] + } +} diff --git a/metrics/integration/expression-tests/greater_or_equal/string/test.json b/metrics/integration/expression-tests/greater_or_equal/string/test.json new file mode 100644 index 00000000000..bd4153ba89b --- /dev/null +++ b/metrics/integration/expression-tests/greater_or_equal/string/test.json @@ -0,0 +1,21 @@ +{ + "expression": [">=", ["string", ["get", "x"]], ["string", ["get", "y"]]], + "inputs": [ + [{}, {"properties": {"x": "1", "y": "1"}}], + [{}, {"properties": {"x": "1", "y": "2"}}], + [{}, {"properties": {"x": "2", "y": "1"}}], + [{}, {"properties": {"x": "abc", "y": "azz"}}], + [{}, {"properties": {"x": "abc", "y": "aaa"}}], + [{}, {"properties": {"x": "abc", "y": "abc"}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "boolean" + }, + "outputs": [true, false, true, false, true, true], + "serialized": [">=", ["string", ["get", "x"]], ["string", ["get", "y"]]] + } +} diff --git a/metrics/integration/expression-tests/greater_or_equal/value/test.json b/metrics/integration/expression-tests/greater_or_equal/value/test.json new file mode 100644 index 00000000000..e92a5684bba --- /dev/null +++ b/metrics/integration/expression-tests/greater_or_equal/value/test.json @@ -0,0 +1,28 @@ +{ + "expression": [">=", ["get", "x"], ["get", "y"]], + "inputs": [ + [{}, {"properties": {"x": "2", "y": "10"}}], + [{}, {"properties": {"x": 10, "y": 1}}], + [{}, {"properties": {"x": "1", "y": 1}}], + [{}, {"properties": {"x": 1, "y": "1"}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "boolean" + }, + "outputs": [ + true, + true, + { + "error": "Expected arguments for \">=\" to be (string, string) or (number, number), but found (string, number) instead." + }, + { + "error": "Expected arguments for \">=\" to be (string, string) or (number, number), but found (number, string) instead." + } + ], + "serialized": [">=", ["get", "x"], ["get", "y"]] + } +} diff --git a/metrics/integration/expression-tests/has/basic/test.json b/metrics/integration/expression-tests/has/basic/test.json new file mode 100644 index 00000000000..45b1fdfe17c --- /dev/null +++ b/metrics/integration/expression-tests/has/basic/test.json @@ -0,0 +1,20 @@ +{ + "expression": ["has", "x"], + "inputs": [ + [{}, {}], + [{}, {"properties": {"x": 1}}], + [{}, {"properties": {"x": 0}}], + [{}, {"properties": {"x": false}}], + [{}, {"properties": {"x": null}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "boolean" + }, + "outputs": [false, true, true, true, true], + "serialized": ["has", "x"] + } +} diff --git a/metrics/integration/expression-tests/heatmap-density/basic/test.json b/metrics/integration/expression-tests/heatmap-density/basic/test.json new file mode 100644 index 00000000000..f5f9b76f4aa --- /dev/null +++ b/metrics/integration/expression-tests/heatmap-density/basic/test.json @@ -0,0 +1,45 @@ +{ + "propertySpec": { + "type": "color", + "default": { + "stops": [ + [0, "rgba(0, 0, 255, 0)"], + [0.1, "royalblue"], + [0.3, "cyan"], + [0.5, "lime"], + [0.7, "yellow"], + [1, "red"] + ] + }, + "property-type": "data-driven", + "expression": {"parameters": ["zoom", "feature"]} + }, + "expression": [ + "interpolate", + ["linear"], + ["heatmap-density"], + 0, + "#000000", + 1, + "#ff0000" + ], + "inputs": [[{"heatmapDensity": 0.5}, {}]], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": true, + "isZoomConstant": true, + "type": "color" + }, + "outputs": [[0.5, 0, 0, 1]], + "serialized": [ + "interpolate", + ["linear"], + ["heatmap-density"], + 0, + ["rgba", 0, 0, 0, 1], + 1, + ["rgba", 255, 0, 0, 1] + ] + } +} diff --git a/metrics/integration/expression-tests/id/basic/test.json b/metrics/integration/expression-tests/id/basic/test.json new file mode 100644 index 00000000000..e6aa009ad87 --- /dev/null +++ b/metrics/integration/expression-tests/id/basic/test.json @@ -0,0 +1,14 @@ +{ + "expression": ["id"], + "inputs": [[{}, {}], [{}, {"id": 1}], [{}, {"id": "one"}]], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "value" + }, + "outputs": [null, 1, "one"], + "serialized": ["id"] + } +} diff --git a/metrics/integration/expression-tests/image/basic/test.json b/metrics/integration/expression-tests/image/basic/test.json new file mode 100644 index 00000000000..797966e7e7f --- /dev/null +++ b/metrics/integration/expression-tests/image/basic/test.json @@ -0,0 +1,27 @@ +{ + "expression": [ + "image", + "monument-15" + ], + "inputs": [ + [ + {"availableImages": ["monument-15"]}, + {} + ] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": true, + "isZoomConstant": true, + "type": "resolvedImage" + }, + "outputs": [ + {"name":"monument-15","available":true} + ], + "serialized": [ + "image", + "monument-15" + ] + } +} diff --git a/metrics/integration/expression-tests/image/coalesce/test.json b/metrics/integration/expression-tests/image/coalesce/test.json new file mode 100644 index 00000000000..75f168207eb --- /dev/null +++ b/metrics/integration/expression-tests/image/coalesce/test.json @@ -0,0 +1,29 @@ +{ + "expression": ["coalesce", ["image", "foo"], ["image", "bar"], ["image", "monument-15"]], + "propertySpec": { + "type": "resolvedImage" + }, + "inputs": [ + [ + {"availableImages": ["monument-15"]}, + {} + ] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": true, + "isZoomConstant": true, + "type": "resolvedImage" + }, + "outputs": [ + {"name":"monument-15","available":true} + ], + "serialized": [ + "coalesce", + ["image", "foo"], + ["image", "bar"], + ["image", "monument-15"] + ] + } +} diff --git a/metrics/integration/expression-tests/image/compound/test.json b/metrics/integration/expression-tests/image/compound/test.json new file mode 100644 index 00000000000..0b2b8bbcf28 --- /dev/null +++ b/metrics/integration/expression-tests/image/compound/test.json @@ -0,0 +1,29 @@ +{ + "expression": [ + "image", + ["get", "icon"] + ], + "inputs": [ + [ + {"availableImages": ["monument-15"]}, + { + "properties": {"icon": "monument-15"} + } + ] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "resolvedImage" + }, + "outputs": [ + {"name":"monument-15","available":true} + ], + "serialized": [ + "image", + ["string", ["get", "icon"]] + ] + } +} diff --git a/metrics/integration/expression-tests/image/implicit-assert/test.json b/metrics/integration/expression-tests/image/implicit-assert/test.json new file mode 100644 index 00000000000..beb6630d537 --- /dev/null +++ b/metrics/integration/expression-tests/image/implicit-assert/test.json @@ -0,0 +1,14 @@ +{ + "expression": ["number", ["get", "icon"]], + "propertySpec": { + "type": "resolvedImage" + }, + "expected": { + "compiled": { + "result": "error", + "errors": [ + {"key": "", "error": "Expected resolvedImage but found number instead."} + ] + } + } +} diff --git a/metrics/integration/expression-tests/in/assert-array/test.json b/metrics/integration/expression-tests/in/assert-array/test.json new file mode 100644 index 00000000000..e3da9d024f0 --- /dev/null +++ b/metrics/integration/expression-tests/in/assert-array/test.json @@ -0,0 +1,30 @@ +{ + "expression": [ + "boolean", + ["in", ["get", "i"], ["array", ["get", "arr"]]] + ], + "inputs": [ + [{}, {"properties": {"i": null, "arr": [9, 8, 7]}}], + [{}, {"properties": {"i": 1, "arr": [9, 8, 7]}}], + [{}, {"properties": {"i": 9, "arr": [9, 8, 7]}}], + [{}, {"properties": {"i": 1, "arr": null}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "boolean" + }, + "outputs": [ + false, + false, + true, + {"error":"Expected value to be of type array, but found null instead."} + ], + "serialized": [ + "boolean", + ["in", ["get", "i"], ["array", ["get", "arr"]]] + ] + } +} diff --git a/metrics/integration/expression-tests/in/assert-string/test.json b/metrics/integration/expression-tests/in/assert-string/test.json new file mode 100644 index 00000000000..ce59df2ab02 --- /dev/null +++ b/metrics/integration/expression-tests/in/assert-string/test.json @@ -0,0 +1,30 @@ +{ + "expression": [ + "boolean", + ["in", ["get", "substr"], ["string", ["get", "str"]]] + ], + "inputs": [ + [{}, {"properties": {"substr": null, "str": "helloworld"}}], + [{}, {"properties": {"substr": "foo", "str": "helloworld"}}], + [{}, {"properties": {"substr": "low", "str": "helloworld"}}], + [{}, {"properties": {"substr": "low", "str": null}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "boolean" + }, + "outputs": [ + false, + false, + true, + {"error":"Expected value to be of type string, but found null instead."} + ], + "serialized": [ + "boolean", + ["in", ["get", "substr"], ["string", ["get", "str"]]] + ] + } +} diff --git a/metrics/integration/expression-tests/in/basic-array/test.json b/metrics/integration/expression-tests/in/basic-array/test.json new file mode 100644 index 00000000000..91b2270d2c5 --- /dev/null +++ b/metrics/integration/expression-tests/in/basic-array/test.json @@ -0,0 +1,34 @@ +{ + "expression": [ + "boolean", + ["in", ["get", "i"], ["get", "arr"]] + ], + "inputs": [ + [{}, {"properties": {"i": null, "arr": [9, 8, 7]}}], + [{}, {"properties": {"i": 1, "arr": [9, 8, 7]}}], + [{}, {"properties": {"i": 9, "arr": [9, 8, 7]}}], + [{}, {"properties": {"i": "foo", "arr": ["baz", "bar", "hello", "foo", "world"]}}], + [{}, {"properties": {"i": true, "arr": ["foo", 123, null, 456, false, {}, true]}}], + [{}, {"properties": {"i": 1, "arr": null}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "boolean" + }, + "outputs": [ + false, + false, + true, + true, + true, + false + ], + "serialized": [ + "boolean", + ["in", ["get", "i"], ["get", "arr"]] + ] + } +} diff --git a/metrics/integration/expression-tests/in/basic-string/test.json b/metrics/integration/expression-tests/in/basic-string/test.json new file mode 100644 index 00000000000..728f1d0846a --- /dev/null +++ b/metrics/integration/expression-tests/in/basic-string/test.json @@ -0,0 +1,36 @@ +{ + "expression": [ + "boolean", + ["in", ["get", "substr"], ["get", "str"]] + ], + "inputs": [ + [{}, {"properties": {"substr": null, "str": "helloworld"}}], + [{}, {"properties": {"substr": "foo", "str": "helloworld"}}], + [{}, {"properties": {"substr": "low", "str": "helloworld"}}], + [{}, {"properties": {"substr": true, "str": "falsetrue"}}], + [{}, {"properties": {"substr": false, "str": "falsetrue"}}], + [{}, {"properties": {"substr": 123, "str": "hello123world"}}], + [{}, {"properties": {"substr": "low", "str": null}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "boolean" + }, + "outputs": [ + false, + false, + true, + true, + true, + true, + false + ], + "serialized": [ + "boolean", + ["in", ["get", "substr"], ["get", "str"]] + ] + } +} diff --git a/metrics/integration/expression-tests/in/invalid-haystack/test.json b/metrics/integration/expression-tests/in/invalid-haystack/test.json new file mode 100644 index 00000000000..f855578eb8d --- /dev/null +++ b/metrics/integration/expression-tests/in/invalid-haystack/test.json @@ -0,0 +1,28 @@ +{ + "expression": [ + "boolean", + ["in", ["get", "needle"], ["get", "haystack"]] + ], + "inputs": [ + [{}, {"properties": {"needle": 1, "haystack": 123}}], + [{}, {"properties": {"needle": "foo", "haystack": {}}}], + [{}, {"properties": {"needle": "foo", "haystack": null}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "boolean" + }, + "outputs": [ + {"error":"Expected second argument to be of type array or string, but found number instead."}, + {"error":"Expected second argument to be of type array or string, but found object instead."}, + false + ], + "serialized": [ + "boolean", + ["in", ["get", "needle"], ["get", "haystack"]] + ] + } +} diff --git a/metrics/integration/expression-tests/in/invalid-needle/test.json b/metrics/integration/expression-tests/in/invalid-needle/test.json new file mode 100644 index 00000000000..0ff5cae1b2e --- /dev/null +++ b/metrics/integration/expression-tests/in/invalid-needle/test.json @@ -0,0 +1,26 @@ +{ + "expression": [ + "boolean", + ["in", ["get", "needle"], ["get", "haystack"]] + ], + "inputs": [ + [{}, {"properties": {"needle": {}, "haystack": [9, 8, 7]}}], + [{}, {"properties": {"needle": {}, "haystack": "helloworld"}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "boolean" + }, + "outputs": [ + {"error":"Expected first argument to be of type boolean, string or number, but found object instead."}, + {"error":"Expected first argument to be of type boolean, string or number, but found object instead."} + ], + "serialized": [ + "boolean", + ["in", ["get", "needle"], ["get", "haystack"]] + ] + } +} diff --git a/metrics/integration/expression-tests/interpolate-hcl/linear/test.json b/metrics/integration/expression-tests/interpolate-hcl/linear/test.json new file mode 100644 index 00000000000..53392e33ba9 --- /dev/null +++ b/metrics/integration/expression-tests/interpolate-hcl/linear/test.json @@ -0,0 +1,40 @@ +{ + "expression": [ + "interpolate-hcl", + ["linear"], + ["get", "x"], + 1, + "red", + 11, + ["get", "color"] + ], + "inputs": [ + [{}, {"properties": {"x": 0, "color": "blue"}}], + [{}, {"properties": {"x": 5, "color": "blue"}}], + [{}, {"properties": {"x": 11, "color": "blue"}}], + [{}, {"properties": {"x": 11, "color": "oops blue"}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "color" + }, + "outputs": [ + [1, 0, 0, 1], + [0.870599, -0.0798922, 0.394264, 1], + [0, 0, 1, 1], + {"error": "Could not parse color from value 'oops blue'"} + ], + "serialized": [ + "interpolate-hcl", + ["linear"], + ["number", ["get", "x"]], + 1, + ["rgba", 255, 0, 0, 1], + 11, + ["to-color", ["get", "color"]] + ] + } +} diff --git a/metrics/integration/expression-tests/interpolate-lab/linear/test.json b/metrics/integration/expression-tests/interpolate-lab/linear/test.json new file mode 100644 index 00000000000..8710e00ef15 --- /dev/null +++ b/metrics/integration/expression-tests/interpolate-lab/linear/test.json @@ -0,0 +1,40 @@ +{ + "expression": [ + "interpolate-lab", + ["linear"], + ["get", "x"], + 1, + "red", + 11, + ["get", "color"] + ], + "inputs": [ + [{}, {"properties": {"x": 0, "color": "blue"}}], + [{}, {"properties": {"x": 5, "color": "blue"}}], + [{}, {"properties": {"x": 11, "color": "blue"}}], + [{}, {"properties": {"x": 11, "color": "oops blue"}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "color" + }, + "outputs": [ + [1, 0, 0, 1], + [0.599999, 7.22057e-8, 0.4, 1], + [0, 0, 1, 1], + {"error": "Could not parse color from value 'oops blue'"} + ], + "serialized": [ + "interpolate-lab", + ["linear"], + ["number", ["get", "x"]], + 1, + ["rgba", 255, 0, 0, 1], + 11, + ["to-color", ["get", "color"]] + ] + } +} diff --git a/metrics/integration/expression-tests/interpolate/cubic-bezier-3-args/test.json b/metrics/integration/expression-tests/interpolate/cubic-bezier-3-args/test.json new file mode 100644 index 00000000000..b7155f43e7c --- /dev/null +++ b/metrics/integration/expression-tests/interpolate/cubic-bezier-3-args/test.json @@ -0,0 +1,26 @@ +{ + "expression": [ + "number", + [ + "interpolate", + ["cubic-bezier", 0, 0, 1], + ["number", ["get", "x"]], + 0, + 0, + 100, + 100 + ] + ], + "inputs": [], + "expected": { + "compiled": { + "result": "error", + "errors": [ + { + "key": "[1][1]", + "error": "Cubic bezier interpolation requires four numeric arguments with values between 0 and 1." + } + ] + } + } +} diff --git a/metrics/integration/expression-tests/interpolate/cubic-bezier-5-args/test.json b/metrics/integration/expression-tests/interpolate/cubic-bezier-5-args/test.json new file mode 100644 index 00000000000..fa6a1c2d5e7 --- /dev/null +++ b/metrics/integration/expression-tests/interpolate/cubic-bezier-5-args/test.json @@ -0,0 +1,26 @@ +{ + "expression": [ + "number", + [ + "interpolate", + ["cubic-bezier", 0, 0, 1, 1, 1], + ["number", ["get", "x"]], + 0, + 0, + 100, + 100 + ] + ], + "inputs": [], + "expected": { + "compiled": { + "result": "error", + "errors": [ + { + "key": "[1][1]", + "error": "Cubic bezier interpolation requires four numeric arguments with values between 0 and 1." + } + ] + } + } +} diff --git a/metrics/integration/expression-tests/interpolate/cubic-bezier-invalid-control-point/test.json b/metrics/integration/expression-tests/interpolate/cubic-bezier-invalid-control-point/test.json new file mode 100644 index 00000000000..d61d2c096f8 --- /dev/null +++ b/metrics/integration/expression-tests/interpolate/cubic-bezier-invalid-control-point/test.json @@ -0,0 +1,26 @@ +{ + "expression": [ + "number", + [ + "interpolate", + ["cubic-bezier", 0, 1.75, 1, 1], + ["number", ["get", "x"]], + 0, + 0, + 100, + 100 + ] + ], + "inputs": [], + "expected": { + "compiled": { + "result": "error", + "errors": [ + { + "key": "[1][1]", + "error": "Cubic bezier interpolation requires four numeric arguments with values between 0 and 1." + } + ] + } + } +} diff --git a/metrics/integration/expression-tests/interpolate/cubic-bezier/test.json b/metrics/integration/expression-tests/interpolate/cubic-bezier/test.json new file mode 100644 index 00000000000..f723cc1f8a2 --- /dev/null +++ b/metrics/integration/expression-tests/interpolate/cubic-bezier/test.json @@ -0,0 +1,60 @@ +{ + "expression": [ + "number", + [ + "interpolate", + ["cubic-bezier", 0.42, 0, 0.58, 1], + ["number", ["get", "x"]], + 0, + 0, + 100, + 100 + ] + ], + "inputs": [ + [{}, {"properties": {"x": 0}}], + [{}, {"properties": {"x": 10}}], + [{}, {"properties": {"x": 20}}], + [{}, {"properties": {"x": 30}}], + [{}, {"properties": {"x": 40}}], + [{}, {"properties": {"x": 50}}], + [{}, {"properties": {"x": 60}}], + [{}, {"properties": {"x": 70}}], + [{}, {"properties": {"x": 80}}], + [{}, {"properties": {"x": 90}}], + [{}, {"properties": {"x": 100}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "number" + }, + "outputs": [ + 0, + 1.97224, + 8.16597, + 18.7395, + 33.1883, + 50, + 66.8116, + 81.2604, + 91.834, + 98.0277, + 100 + ], + "serialized": [ + "number", + [ + "interpolate", + ["cubic-bezier", 0.42, 0, 0.58, 1], + ["number", ["get", "x"]], + 0, + 0, + 100, + 100 + ] + ] + } +} diff --git a/metrics/integration/expression-tests/interpolate/duplicate_stops/test.json b/metrics/integration/expression-tests/interpolate/duplicate_stops/test.json new file mode 100644 index 00000000000..00888d77569 --- /dev/null +++ b/metrics/integration/expression-tests/interpolate/duplicate_stops/test.json @@ -0,0 +1,15 @@ +{ + "expression": ["interpolate", ["linear"], 0, 0, 1, 0, 2], + "inputs": [[{}, {}]], + "expected": { + "compiled": { + "result": "error", + "errors": [ + { + "key": "[5]", + "error": "Input/output pairs for \"interpolate\" expressions must be arranged with input values in strictly ascending order." + } + ] + } + } +} diff --git a/metrics/integration/expression-tests/interpolate/exponential-number-array/test.json b/metrics/integration/expression-tests/interpolate/exponential-number-array/test.json new file mode 100644 index 00000000000..ee6b64ef5c6 --- /dev/null +++ b/metrics/integration/expression-tests/interpolate/exponential-number-array/test.json @@ -0,0 +1,36 @@ +{ + "expression": [ + "interpolate", + ["exponential", 2], + ["number", ["get", "x"]], + 1, + ["literal", [2, 1]], + 3, + ["literal", [6, 1]] + ], + "inputs": [ + [{}, {"properties": {"x": 0}}], + [{}, {"properties": {"x": 1}}], + [{}, {"properties": {"x": 2}}], + [{}, {"properties": {"x": 3}}], + [{}, {"properties": {"x": 4}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "array" + }, + "outputs": [[2, 1], [2, 1], [3.33333, 1], [6, 1], [6, 1]], + "serialized": [ + "interpolate", + ["exponential", 2], + ["number", ["get", "x"]], + 1, + ["literal", [2, 1]], + 3, + ["literal", [6, 1]] + ] + } +} diff --git a/metrics/integration/expression-tests/interpolate/exponential-single-stop/test.json b/metrics/integration/expression-tests/interpolate/exponential-single-stop/test.json new file mode 100644 index 00000000000..68d35ef0d08 --- /dev/null +++ b/metrics/integration/expression-tests/interpolate/exponential-single-stop/test.json @@ -0,0 +1,24 @@ +{ + "expression": [ + "number", + ["interpolate", ["exponential", 2], ["number", ["get", "x"]], 1, 2] + ], + "inputs": [ + [{}, {"properties": {"x": 0}}], + [{}, {"properties": {"x": 1}}], + [{}, {"properties": {"x": 2}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "number" + }, + "outputs": [2, 2, 2], + "serialized": [ + "number", + ["interpolate", ["exponential", 2], ["number", ["get", "x"]], 1, 2] + ] + } +} diff --git a/metrics/integration/expression-tests/interpolate/exponential-string-array/test.json b/metrics/integration/expression-tests/interpolate/exponential-string-array/test.json new file mode 100644 index 00000000000..10fac5af72d --- /dev/null +++ b/metrics/integration/expression-tests/interpolate/exponential-string-array/test.json @@ -0,0 +1,20 @@ +{ + "expression": [ + "interpolate", + ["exponential", 2], + ["number", ["get", "x"]], + 1, + ["literal", ["a"]], + 3, + ["literal", ["b"]] + ], + "inputs": [], + "expected": { + "compiled": { + "result": "error", + "errors": [ + {"key": "", "error": "Type array is not interpolatable."} + ] + } + } +} diff --git a/metrics/integration/expression-tests/interpolate/exponential-uninterpolatable-numeric-array/test.json b/metrics/integration/expression-tests/interpolate/exponential-uninterpolatable-numeric-array/test.json new file mode 100644 index 00000000000..5e9ed776c0f --- /dev/null +++ b/metrics/integration/expression-tests/interpolate/exponential-uninterpolatable-numeric-array/test.json @@ -0,0 +1,20 @@ +{ + "expression": [ + "interpolate", + ["exponential", 2], + ["number", ["get", "x"]], + 1, + ["array", "number", ["get", "array"]], + 3, + ["array", "number", ["get", "array_two"]] + ], + "inputs": [], + "expected": { + "compiled": { + "result": "error", + "errors": [ + {"key": "", "error": "Type array is not interpolatable."} + ] + } + } +} diff --git a/metrics/integration/expression-tests/interpolate/exponential/test.json b/metrics/integration/expression-tests/interpolate/exponential/test.json new file mode 100644 index 00000000000..7db09899f4f --- /dev/null +++ b/metrics/integration/expression-tests/interpolate/exponential/test.json @@ -0,0 +1,26 @@ +{ + "expression": [ + "number", + ["interpolate", ["exponential", 2], ["number", ["get", "x"]], 1, 2, 3, 6] + ], + "inputs": [ + [{}, {"properties": {"x": 0}}], + [{}, {"properties": {"x": 1}}], + [{}, {"properties": {"x": 2}}], + [{}, {"properties": {"x": 3}}], + [{}, {"properties": {"x": 4}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "number" + }, + "outputs": [2, 2, 3.33333, 6, 6], + "serialized": [ + "number", + ["interpolate", ["exponential", 2], ["number", ["get", "x"]], 1, 2, 3, 6] + ] + } +} diff --git a/metrics/integration/expression-tests/interpolate/infer-array-type/test.json b/metrics/integration/expression-tests/interpolate/infer-array-type/test.json new file mode 100644 index 00000000000..fa2b0ad1445 --- /dev/null +++ b/metrics/integration/expression-tests/interpolate/infer-array-type/test.json @@ -0,0 +1,32 @@ +{ + "propertySpec": { + "type": "array", + "value": "string", + "property-type": "data-driven", + "expression": {"parameters": ["zoom", "feature"]} + }, + "expression": [ + "step", + ["number", ["get", "x"]], + ["literal", ["one"]], + 10, + ["literal", ["one", "two"]] + ], + "inputs": [], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "array" + }, + "outputs": [], + "serialized": [ + "step", + ["number", ["get", "x"]], + ["literal", ["one"]], + 10, + ["literal", ["one", "two"]] + ] + } +} diff --git a/metrics/integration/expression-tests/interpolate/linear-color/test.json b/metrics/integration/expression-tests/interpolate/linear-color/test.json new file mode 100644 index 00000000000..39cb7bcc3cd --- /dev/null +++ b/metrics/integration/expression-tests/interpolate/linear-color/test.json @@ -0,0 +1,46 @@ +{ + "expression": [ + "to-rgba", + [ + "interpolate", + ["exponential", 1], + ["get", "x"], + 1, + "red", + 11, + ["get", "color"] + ] + ], + "inputs": [ + [{}, {"properties": {"x": 0, "color": "blue"}}], + [{}, {"properties": {"x": 5, "color": "blue"}}], + [{}, {"properties": {"x": 11, "color": "blue"}}], + [{}, {"properties": {"x": 11, "color": "oops blue"}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "array" + }, + "outputs": [ + [255, 0, 0, 1], + [153, 0, 102, 1], + [0, 0, 255, 1], + {"error": "Could not parse color from value 'oops blue'"} + ], + "serialized": [ + "to-rgba", + [ + "interpolate", + ["linear"], + ["number", ["get", "x"]], + 1, + ["rgba", 255, 0, 0, 1], + 11, + ["to-color", ["get", "color"]] + ] + ] + } +} diff --git a/metrics/integration/expression-tests/interpolate/linear-many-stops/test.json b/metrics/integration/expression-tests/interpolate/linear-many-stops/test.json new file mode 100644 index 00000000000..cd54491e53c --- /dev/null +++ b/metrics/integration/expression-tests/interpolate/linear-many-stops/test.json @@ -0,0 +1,104 @@ +{ + "expression": [ + "number", + [ + "interpolate", + ["exponential", 1], + ["number", ["get", "x"]], + 2, + 100, + 55, + 200, + 132, + 300, + 607, + 400, + 1287, + 500, + 1985, + 600, + 2650, + 700, + 3299, + 800, + 3995, + 900, + 4927, + 1000, + 7147, + 10000, + 10028, + 100000, + 12889, + 1000000, + 40000, + 10000000 + ] + ], + "inputs": [ + [{}, {"properties": {"x": 2}}], + [{}, {"properties": {"x": 20}}], + [{}, {"properties": {"x": 607}}], + [{}, {"properties": {"x": 680}}], + [{}, {"properties": {"x": 4927}}], + [{}, {"properties": {"x": 7300}}], + [{}, {"properties": {"x": 10000}}], + [{}, {"properties": {"x": 20000}}], + [{}, {"properties": {"x": 40000}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "number" + }, + "outputs": [ + 100, + 133.962, + 400, + 410.735, + 1000, + 14779.5, + 99125.3, + 3360628, + 10000000 + ], + "serialized": [ + "number", + [ + "interpolate", + ["linear"], + ["number", ["get", "x"]], + 2, + 100, + 55, + 200, + 132, + 300, + 607, + 400, + 1287, + 500, + 1985, + 600, + 2650, + 700, + 3299, + 800, + 3995, + 900, + 4927, + 1000, + 7147, + 10000, + 10028, + 100000, + 12889, + 1000000, + 40000, + 10000000 + ] + ] + } +} diff --git a/metrics/integration/expression-tests/interpolate/linear/test.json b/metrics/integration/expression-tests/interpolate/linear/test.json new file mode 100644 index 00000000000..e23ff29bfa4 --- /dev/null +++ b/metrics/integration/expression-tests/interpolate/linear/test.json @@ -0,0 +1,43 @@ +{ + "propertySpec": { + "type": "number", + "property-type": "data-driven", + "expression": {"parameters": ["zoom", "feature"]} + }, + "expression": ["interpolate", ["linear"], ["get", "x"], 0, 100, 10, 200], + "inputs": [ + [{}, {"properties": {"x": 0}}], + [{}, {"properties": {"x": 5}}], + [{}, {"properties": {"x": 10}}], + [{}, {"properties": {"x": -1234}}], + [{}, {"properties": {"x": 1234}}], + [{}, {"properties": {"x": "abcd"}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "number" + }, + "outputs": [ + 100, + 150, + 200, + 100, + 200, + { + "error": "Expected value to be of type number, but found string instead." + } + ], + "serialized": [ + "interpolate", + ["linear"], + ["number", ["get", "x"]], + 0, + 100, + 10, + 200 + ] + } +} diff --git a/metrics/integration/expression-tests/is-supported-script/default/test.json b/metrics/integration/expression-tests/is-supported-script/default/test.json new file mode 100644 index 00000000000..55c09886818 --- /dev/null +++ b/metrics/integration/expression-tests/is-supported-script/default/test.json @@ -0,0 +1,18 @@ +{ + "expression": ["is-supported-script", ["get", "x"]], + "description": "'is-supported-script' always returns true when run without global context providing an 'isSupportedScript' function (as in the expression tests). The 'is-supported-script' render tests provide the necessary global context and exercise the functionality.", + "inputs": [ + [{}, {"properties": {"x": "שָׁלוֹם"}}], + [{}, {"properties": {"x": "देवनागरी"}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "boolean" + }, + "outputs": [true, true], + "serialized": ["is-supported-script", ["string", ["get", "x"]]] + } +} diff --git a/metrics/integration/expression-tests/legacy/categorical/array-default/test.json b/metrics/integration/expression-tests/legacy/categorical/array-default/test.json new file mode 100644 index 00000000000..5914ac9345c --- /dev/null +++ b/metrics/integration/expression-tests/legacy/categorical/array-default/test.json @@ -0,0 +1,39 @@ +{ + "expression": { + "type": "categorical", + "property": "p", + "stops": [[0, [0]], [1, [1]]], + "default": [-1] + }, + "propertySpec": { + "type": "array", + "value": "number", + "property-type": "data-driven", + "expression": {"interpolated": false, "parameters": ["zoom", "feature"]} + }, + "inputs": [ + [{}, {"properties": {}}], + [{}, {"properties": {"p": 0}}], + [{}, {"properties": {"p": 1}}], + [{}, {"properties": {"p": 2}}], + [{}, {"properties": {"p": "0"}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "array" + }, + "outputs": [[-1], [0], [1], [-1], [-1]], + "serialized": [ + "match", + ["get", "p"], + 0, + ["literal", [0]], + 1, + ["literal", [1]], + ["literal", [-1]] + ] + } +} diff --git a/metrics/integration/expression-tests/legacy/categorical/array/test.json b/metrics/integration/expression-tests/legacy/categorical/array/test.json new file mode 100644 index 00000000000..f61226de8ff --- /dev/null +++ b/metrics/integration/expression-tests/legacy/categorical/array/test.json @@ -0,0 +1,39 @@ +{ + "expression": { + "type": "categorical", + "property": "p", + "stops": [[0, [0]], [1, [1]]] + }, + "propertySpec": { + "type": "array", + "value": "number", + "property-type": "data-driven", + "expression": {"interpolated": false, "parameters": ["zoom", "feature"]}, + "default": [-1] + }, + "inputs": [ + [{}, {"properties": {}}], + [{}, {"properties": {"p": 0}}], + [{}, {"properties": {"p": 1}}], + [{}, {"properties": {"p": 2}}], + [{}, {"properties": {"p": "0"}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "array" + }, + "outputs": [[-1], [0], [1], [-1], [-1]], + "serialized": [ + "match", + ["get", "p"], + 0, + ["literal", [0]], + 1, + ["literal", [1]], + ["literal", [-1]] + ] + } +} diff --git a/metrics/integration/expression-tests/legacy/categorical/boolean-default/test.json b/metrics/integration/expression-tests/legacy/categorical/boolean-default/test.json new file mode 100644 index 00000000000..c7c8d866eea --- /dev/null +++ b/metrics/integration/expression-tests/legacy/categorical/boolean-default/test.json @@ -0,0 +1,36 @@ +{ + "expression": { + "type": "categorical", + "property": "p", + "stops": [[true, true], [false, false]], + "default": true + }, + "propertySpec": { + "type": "boolean", + "property-type": "data-driven", + "expression": {"interpolated": false, "parameters": ["zoom", "feature"]} + }, + "inputs": [ + [{}, {"properties": {}}], + [{}, {"properties": {"p": true}}], + [{}, {"properties": {"p": false}}], + [{}, {"properties": {"p": "wrong type"}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "boolean" + }, + "outputs": [true, true, false, true], + "serialized": [ + "case", + ["==", ["get", "p"], true], + true, + ["==", ["get", "p"], false], + false, + true + ] + } +} diff --git a/metrics/integration/expression-tests/legacy/categorical/boolean/test.json b/metrics/integration/expression-tests/legacy/categorical/boolean/test.json new file mode 100644 index 00000000000..df84076f037 --- /dev/null +++ b/metrics/integration/expression-tests/legacy/categorical/boolean/test.json @@ -0,0 +1,36 @@ +{ + "expression": { + "type": "categorical", + "property": "p", + "stops": [[true, true], [false, false]] + }, + "propertySpec": { + "type": "boolean", + "property-type": "data-driven", + "expression": {"interpolated": false, "parameters": ["zoom", "feature"]}, + "default": true + }, + "inputs": [ + [{}, {"properties": {}}], + [{}, {"properties": {"p": true}}], + [{}, {"properties": {"p": false}}], + [{}, {"properties": {"p": "wrong type"}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "boolean" + }, + "outputs": [true, true, false, true], + "serialized": [ + "case", + ["==", ["get", "p"], true], + true, + ["==", ["get", "p"], false], + false, + true + ] + } +} diff --git a/metrics/integration/expression-tests/legacy/categorical/color-default/test.json b/metrics/integration/expression-tests/legacy/categorical/color-default/test.json new file mode 100644 index 00000000000..33e72370df5 --- /dev/null +++ b/metrics/integration/expression-tests/legacy/categorical/color-default/test.json @@ -0,0 +1,37 @@ +{ + "expression": { + "type": "categorical", + "property": "p", + "stops": [["0", "red"], ["1", "lime"]], + "default": "blue" + }, + "propertySpec": { + "type": "color", + "property-type": "data-driven", + "expression": {"interpolated": false, "parameters": ["zoom", "feature"]} + }, + "inputs": [ + [{}, {"properties": {}}], + [{}, {"properties": {"p": "0"}}], + [{}, {"properties": {"p": "1"}}], + [{}, {"properties": {"p": 0}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "color" + }, + "outputs": [[0, 0, 1, 1], [1, 0, 0, 1], [0, 1, 0, 1], [0, 0, 1, 1]], + "serialized": [ + "match", + ["get", "p"], + "0", + ["rgba", 255, 0, 0, 1], + "1", + ["rgba", 0, 255, 0, 1], + ["rgba", 0, 0, 255, 1] + ] + } +} diff --git a/metrics/integration/expression-tests/legacy/categorical/color/test.json b/metrics/integration/expression-tests/legacy/categorical/color/test.json new file mode 100644 index 00000000000..54c9e001a29 --- /dev/null +++ b/metrics/integration/expression-tests/legacy/categorical/color/test.json @@ -0,0 +1,37 @@ +{ + "expression": { + "type": "categorical", + "property": "p", + "stops": [["0", "red"], ["1", "lime"]] + }, + "propertySpec": { + "type": "color", + "property-type": "data-driven", + "expression": {"interpolated": false, "parameters": ["zoom", "feature"]}, + "default": "blue" + }, + "inputs": [ + [{}, {"properties": {}}], + [{}, {"properties": {"p": "0"}}], + [{}, {"properties": {"p": "1"}}], + [{}, {"properties": {"p": 0}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "color" + }, + "outputs": [[0, 0, 1, 1], [1, 0, 0, 1], [0, 1, 0, 1], [0, 0, 1, 1]], + "serialized": [ + "match", + ["get", "p"], + "0", + ["rgba", 255, 0, 0, 1], + "1", + ["rgba", 0, 255, 0, 1], + ["rgba", 0, 0, 255, 1] + ] + } +} diff --git a/metrics/integration/expression-tests/legacy/categorical/number-default/test.json b/metrics/integration/expression-tests/legacy/categorical/number-default/test.json new file mode 100644 index 00000000000..09c9a2d4aa2 --- /dev/null +++ b/metrics/integration/expression-tests/legacy/categorical/number-default/test.json @@ -0,0 +1,31 @@ +{ + "expression": { + "type": "categorical", + "property": "p", + "stops": [[0, 0], [1, 1]], + "default": -1 + }, + "propertySpec": { + "type": "number", + "property-type": "data-driven", + "expression": {"interpolated": false, "parameters": ["zoom", "feature"]} + }, + "inputs": [ + [{}, {"properties": {}}], + [{}, {"properties": {"p": -1}}], + [{}, {"properties": {"p": 0}}], + [{}, {"properties": {"p": 1}}], + [{}, {"properties": {"p": 2}}], + [{}, {"properties": {"p": "0"}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "number" + }, + "outputs": [-1, -1, 0, 1, -1, -1], + "serialized": ["match", ["get", "p"], 0, 0, 1, 1, -1] + } +} diff --git a/metrics/integration/expression-tests/legacy/categorical/number/test.json b/metrics/integration/expression-tests/legacy/categorical/number/test.json new file mode 100644 index 00000000000..53c63247a93 --- /dev/null +++ b/metrics/integration/expression-tests/legacy/categorical/number/test.json @@ -0,0 +1,31 @@ +{ + "expression": { + "type": "categorical", + "property": "p", + "stops": [[0, 0], [1, 1]] + }, + "propertySpec": { + "type": "number", + "property-type": "data-driven", + "expression": {"interpolated": false, "parameters": ["zoom", "feature"]}, + "default": -1 + }, + "inputs": [ + [{}, {"properties": {}}], + [{}, {"properties": {"p": -1}}], + [{}, {"properties": {"p": 0}}], + [{}, {"properties": {"p": 1}}], + [{}, {"properties": {"p": 2}}], + [{}, {"properties": {"p": "0"}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "number" + }, + "outputs": [-1, -1, 0, 1, -1, -1], + "serialized": ["match", ["get", "p"], 0, 0, 1, 1, -1] + } +} diff --git a/metrics/integration/expression-tests/legacy/categorical/string-default/test.json b/metrics/integration/expression-tests/legacy/categorical/string-default/test.json new file mode 100644 index 00000000000..98cf34d5cc2 --- /dev/null +++ b/metrics/integration/expression-tests/legacy/categorical/string-default/test.json @@ -0,0 +1,29 @@ +{ + "expression": { + "type": "categorical", + "property": "p", + "stops": [["0", "0"], ["1", "1"]], + "default": "-1" + }, + "propertySpec": { + "type": "string", + "property-type": "data-driven", + "expression": {"interpolated": false, "parameters": ["zoom", "feature"]} + }, + "inputs": [ + [{}, {"properties": {}}], + [{}, {"properties": {"p": "0"}}], + [{}, {"properties": {"p": "1"}}], + [{}, {"properties": {"p": 0}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "string" + }, + "outputs": ["-1", "0", "1", "-1"], + "serialized": ["match", ["get", "p"], "0", "0", "1", "1", "-1"] + } +} diff --git a/metrics/integration/expression-tests/legacy/categorical/string/test.json b/metrics/integration/expression-tests/legacy/categorical/string/test.json new file mode 100644 index 00000000000..938b6102bba --- /dev/null +++ b/metrics/integration/expression-tests/legacy/categorical/string/test.json @@ -0,0 +1,29 @@ +{ + "expression": { + "type": "categorical", + "property": "p", + "stops": [["0", "0"], ["1", "1"]] + }, + "propertySpec": { + "type": "string", + "property-type": "data-driven", + "expression": {"interpolated": false, "parameters": ["zoom", "feature"]}, + "default": "-1" + }, + "inputs": [ + [{}, {"properties": {}}], + [{}, {"properties": {"p": "0"}}], + [{}, {"properties": {"p": "1"}}], + [{}, {"properties": {"p": 0}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "string" + }, + "outputs": ["-1", "0", "1", "-1"], + "serialized": ["match", ["get", "p"], "0", "0", "1", "1", "-1"] + } +} diff --git a/metrics/integration/expression-tests/legacy/categorical/tokens/test.json b/metrics/integration/expression-tests/legacy/categorical/tokens/test.json new file mode 100644 index 00000000000..bef9f23caf4 --- /dev/null +++ b/metrics/integration/expression-tests/legacy/categorical/tokens/test.json @@ -0,0 +1,30 @@ +{ + "expression": { + "type": "categorical", + "property": "p", + "stops": [["0", "0 {a}"], ["1", "1 {b}"]], + "default": "default" + }, + "propertySpec": { + "type": "string", + "property-type": "data-driven", + "expression": {"interpolated": true, "parameters": ["zoom", "feature"]}, + "tokens": true + }, + "inputs": [ + [{}, {"properties": {}}], + [{}, {"properties": {"p": "0", "a": "a"}}], + [{}, {"properties": {"p": "1", "b": "b"}}], + [{}, {"properties": {"p": 0}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "string" + }, + "outputs": ["default", "0 {a}", "1 {b}", "default"], + "serialized": ["match", ["get", "p"], "0", "0 {a}", "1", "1 {b}", "default"] + } +} diff --git a/metrics/integration/expression-tests/legacy/exponential/array-default/test.json b/metrics/integration/expression-tests/legacy/exponential/array-default/test.json new file mode 100644 index 00000000000..7b867c04660 --- /dev/null +++ b/metrics/integration/expression-tests/legacy/exponential/array-default/test.json @@ -0,0 +1,47 @@ +{ + "expression": { + "type": "exponential", + "property": "p", + "stops": [[0, [0]], [1, [1]]], + "default": [-1] + }, + "propertySpec": { + "type": "array", + "value": "number", + "length": 1, + "property-type": "data-driven", + "expression": {"interpolated": true, "parameters": ["zoom", "feature"]} + }, + "inputs": [ + [{}, {"properties": {}}], + [{}, {"properties": {"p": -1}}], + [{}, {"properties": {"p": 0}}], + [{}, {"properties": {"p": 0.5}}], + [{}, {"properties": {"p": 1}}], + [{}, {"properties": {"p": 2}}], + [{}, {"properties": {"p": "0"}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "array" + }, + "outputs": [[-1], [0], [0], [0.5], [1], [1], [-1]], + "serialized": [ + "case", + ["==", ["typeof", ["get", "p"]], "number"], + [ + "interpolate", + ["linear"], + ["number", ["get", "p"]], + 0, + ["literal", [0]], + 1, + ["literal", [1]] + ], + ["literal", [-1]] + ] + } +} diff --git a/metrics/integration/expression-tests/legacy/exponential/array/test.json b/metrics/integration/expression-tests/legacy/exponential/array/test.json new file mode 100644 index 00000000000..8ac806db1b7 --- /dev/null +++ b/metrics/integration/expression-tests/legacy/exponential/array/test.json @@ -0,0 +1,51 @@ +{ + "expression": { + "type": "exponential", + "property": "p", + "stops": [[0, [0]], [1, [1]]] + }, + "propertySpec": { + "type": "array", + "value": "number", + "length": 1, + "property-type": "data-driven", + "expression": {"interpolated": true, "parameters": ["zoom", "feature"]} + }, + "inputs": [ + [{}, {"properties": {}}], + [{}, {"properties": {"p": -1}}], + [{}, {"properties": {"p": 0}}], + [{}, {"properties": {"p": 0.5}}], + [{}, {"properties": {"p": 1}}], + [{}, {"properties": {"p": 2}}], + [{}, {"properties": {"p": "0"}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "array" + }, + "outputs": [ + {"error": "Expected value to be of type number, but found null instead."}, + [0], + [0], + [0.5], + [1], + [1], + { + "error": "Expected value to be of type number, but found string instead." + } + ], + "serialized": [ + "interpolate", + ["linear"], + ["number", ["get", "p"]], + 0, + ["literal", [0]], + 1, + ["literal", [1]] + ] + } +} diff --git a/metrics/integration/expression-tests/legacy/exponential/base/test.json b/metrics/integration/expression-tests/legacy/exponential/base/test.json new file mode 100644 index 00000000000..43018f48b0e --- /dev/null +++ b/metrics/integration/expression-tests/legacy/exponential/base/test.json @@ -0,0 +1,19 @@ +{ + "expression": {"type": "exponential", "base": 0.5, "stops": [[0, 0], [1, 1]]}, + "propertySpec": { + "type": "number", + "property-type": "data-driven", + "expression": {"interpolated": true, "parameters": ["zoom", "feature"]} + }, + "inputs": [[{"zoom": 0.5}, {}]], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": true, + "isZoomConstant": false, + "type": "number" + }, + "outputs": [0.585786], + "serialized": ["interpolate", ["exponential", 0.5], ["zoom"], 0, 0, 1, 1] + } +} diff --git a/metrics/integration/expression-tests/legacy/exponential/color-default/test.json b/metrics/integration/expression-tests/legacy/exponential/color-default/test.json new file mode 100644 index 00000000000..c3e353725a1 --- /dev/null +++ b/metrics/integration/expression-tests/legacy/exponential/color-default/test.json @@ -0,0 +1,53 @@ +{ + "expression": { + "type": "exponential", + "property": "p", + "stops": [[0, "black"], [1, "white"]], + "default": "red" + }, + "propertySpec": { + "type": "color", + "property-type": "data-driven", + "expression": {"interpolated": true, "parameters": ["zoom", "feature"]} + }, + "inputs": [ + [{}, {"properties": {}}], + [{}, {"properties": {"p": -1}}], + [{}, {"properties": {"p": 0}}], + [{}, {"properties": {"p": 0.5}}], + [{}, {"properties": {"p": 1}}], + [{}, {"properties": {"p": 2}}], + [{}, {"properties": {"p": "0"}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "color" + }, + "outputs": [ + [1, 0, 0, 1], + [0, 0, 0, 1], + [0, 0, 0, 1], + [0.5, 0.5, 0.5, 1], + [1, 1, 1, 1], + [1, 1, 1, 1], + [1, 0, 0, 1] + ], + "serialized": [ + "case", + ["==", ["typeof", ["get", "p"]], "number"], + [ + "interpolate", + ["linear"], + ["number", ["get", "p"]], + 0, + ["rgba", 0, 0, 0, 1], + 1, + ["rgba", 255, 255, 255, 1] + ], + ["rgba", 255, 0, 0, 1] + ] + } +} diff --git a/metrics/integration/expression-tests/legacy/exponential/color-hcl/test.json b/metrics/integration/expression-tests/legacy/exponential/color-hcl/test.json new file mode 100644 index 00000000000..58fdc24971c --- /dev/null +++ b/metrics/integration/expression-tests/legacy/exponential/color-hcl/test.json @@ -0,0 +1,50 @@ +{ + "expression": { + "type": "exponential", + "property": "p", + "stops": [[0, "black"], [1, "white"]], + "colorSpace": "hcl" + }, + "propertySpec": { + "type": "color", + "property-type": "data-driven", + "expression": {"interpolated": true, "parameters": ["zoom", "feature"]} + }, + "inputs": [ + [{}, {"properties": {}}], + [{}, {"properties": {"p": -1}}], + [{}, {"properties": {"p": 0}}], + [{}, {"properties": {"p": 0.5}}], + [{}, {"properties": {"p": 1}}], + [{}, {"properties": {"p": 2}}], + [{}, {"properties": {"p": "0"}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "color" + }, + "outputs": [ + {"error": "Expected value to be of type number, but found null instead."}, + [0, 0, 0, 1], + [0, 0, 0, 1], + [0.5, 0.5, 0.499999, 1], + [1, 1, 1, 1], + [1, 1, 1, 1], + { + "error": "Expected value to be of type number, but found string instead." + } + ], + "serialized": [ + "interpolate-hcl", + ["linear"], + ["number", ["get", "p"]], + 0, + ["rgba", 0, 0, 0, 1], + 1, + ["rgba", 255, 255, 255, 1] + ] + } +} diff --git a/metrics/integration/expression-tests/legacy/exponential/color-lab/test.json b/metrics/integration/expression-tests/legacy/exponential/color-lab/test.json new file mode 100644 index 00000000000..60ae68cdd71 --- /dev/null +++ b/metrics/integration/expression-tests/legacy/exponential/color-lab/test.json @@ -0,0 +1,50 @@ +{ + "expression": { + "type": "exponential", + "property": "p", + "stops": [[0, "black"], [1, "white"]], + "colorSpace": "lab" + }, + "propertySpec": { + "type": "color", + "property-type": "data-driven", + "expression": {"interpolated": true, "parameters": ["zoom", "feature"]} + }, + "inputs": [ + [{}, {"properties": {}}], + [{}, {"properties": {"p": -1}}], + [{}, {"properties": {"p": 0}}], + [{}, {"properties": {"p": 0.5}}], + [{}, {"properties": {"p": 1}}], + [{}, {"properties": {"p": 2}}], + [{}, {"properties": {"p": "0"}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "color" + }, + "outputs": [ + {"error": "Expected value to be of type number, but found null instead."}, + [0, 0, 0, 1], + [0, 0, 0, 1], + [0.499999, 0.5, 0.499999, 1], + [1, 1, 1, 1], + [1, 1, 1, 1], + { + "error": "Expected value to be of type number, but found string instead." + } + ], + "serialized": [ + "interpolate-lab", + ["linear"], + ["number", ["get", "p"]], + 0, + ["rgba", 0, 0, 0, 1], + 1, + ["rgba", 255, 255, 255, 1] + ] + } +} diff --git a/metrics/integration/expression-tests/legacy/exponential/color/test.json b/metrics/integration/expression-tests/legacy/exponential/color/test.json new file mode 100644 index 00000000000..bbc8f6ecdcd --- /dev/null +++ b/metrics/integration/expression-tests/legacy/exponential/color/test.json @@ -0,0 +1,49 @@ +{ + "expression": { + "type": "exponential", + "property": "p", + "stops": [[0, "black"], [1, "white"]] + }, + "propertySpec": { + "type": "color", + "property-type": "data-driven", + "expression": {"interpolated": true, "parameters": ["zoom", "feature"]} + }, + "inputs": [ + [{}, {"properties": {}}], + [{}, {"properties": {"p": -1}}], + [{}, {"properties": {"p": 0}}], + [{}, {"properties": {"p": 0.5}}], + [{}, {"properties": {"p": 1}}], + [{}, {"properties": {"p": 2}}], + [{}, {"properties": {"p": "0"}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "color" + }, + "outputs": [ + {"error": "Expected value to be of type number, but found null instead."}, + [0, 0, 0, 1], + [0, 0, 0, 1], + [0.5, 0.5, 0.5, 1], + [1, 1, 1, 1], + [1, 1, 1, 1], + { + "error": "Expected value to be of type number, but found string instead." + } + ], + "serialized": [ + "interpolate", + ["linear"], + ["number", ["get", "p"]], + 0, + ["rgba", 0, 0, 0, 1], + 1, + ["rgba", 255, 255, 255, 1] + ] + } +} diff --git a/metrics/integration/expression-tests/legacy/exponential/composite-default/test.json b/metrics/integration/expression-tests/legacy/exponential/composite-default/test.json new file mode 100644 index 00000000000..f6b66e77c2d --- /dev/null +++ b/metrics/integration/expression-tests/legacy/exponential/composite-default/test.json @@ -0,0 +1,55 @@ +{ + "expression": { + "type": "exponential", + "property": "p", + "stops": [ + [{"zoom": 0, "value": 0}, 0], + [{"zoom": 0, "value": 1}, 1], + [{"zoom": 1, "value": 0}, 2], + [{"zoom": 1, "value": 1}, 3] + ], + "default": -1 + }, + "propertySpec": { + "type": "number", + "property-type": "data-driven", + "expression": {"interpolated": true, "parameters": ["zoom", "feature"]} + }, + "inputs": [ + [{"zoom": 0.5}, {"properties": {}}], + [{"zoom": 0.5}, {"properties": {"p": -1}}], + [{"zoom": 0.5}, {"properties": {"p": 0}}], + [{"zoom": 0.5}, {"properties": {"p": 0.5}}], + [{"zoom": 0.5}, {"properties": {"p": 1}}], + [{"zoom": 0.5}, {"properties": {"p": 2}}], + [{"zoom": 0.5}, {"properties": {"p": "0"}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": false, + "type": "number" + }, + "outputs": [-1, 1, 1, 1.5, 2, 2, -1], + "serialized": [ + "interpolate", + ["linear"], + ["zoom"], + 0, + [ + "case", + ["==", ["typeof", ["get", "p"]], "number"], + ["interpolate", ["linear"], ["number", ["get", "p"]], 0, 0, 1, 1], + -1 + ], + 1, + [ + "case", + ["==", ["typeof", ["get", "p"]], "number"], + ["interpolate", ["linear"], ["number", ["get", "p"]], 0, 2, 1, 3], + -1 + ] + ] + } +} diff --git a/metrics/integration/expression-tests/legacy/exponential/composite/test.json b/metrics/integration/expression-tests/legacy/exponential/composite/test.json new file mode 100644 index 00000000000..a032a0849cf --- /dev/null +++ b/metrics/integration/expression-tests/legacy/exponential/composite/test.json @@ -0,0 +1,54 @@ +{ + "expression": { + "type": "exponential", + "property": "p", + "stops": [ + [{"zoom": 0, "value": 0}, 0], + [{"zoom": 0, "value": 1}, 1], + [{"zoom": 1, "value": 0}, 2], + [{"zoom": 1, "value": 1}, 3] + ] + }, + "propertySpec": { + "type": "number", + "property-type": "data-driven", + "expression": {"interpolated": true, "parameters": ["zoom", "feature"]} + }, + "inputs": [ + [{"zoom": 0.5}, {"properties": {}}], + [{"zoom": 0.5}, {"properties": {"p": -1}}], + [{"zoom": 0.5}, {"properties": {"p": 0}}], + [{"zoom": 0.5}, {"properties": {"p": 0.5}}], + [{"zoom": 0.5}, {"properties": {"p": 1}}], + [{"zoom": 0.5}, {"properties": {"p": 2}}], + [{"zoom": 0.5}, {"properties": {"p": "0"}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": false, + "type": "number" + }, + "outputs": [ + {"error": "Expected value to be of type number, but found null instead."}, + 1, + 1, + 1.5, + 2, + 2, + { + "error": "Expected value to be of type number, but found string instead." + } + ], + "serialized": [ + "interpolate", + ["linear"], + ["zoom"], + 0, + ["interpolate", ["linear"], ["number", ["get", "p"]], 0, 0, 1, 1], + 1, + ["interpolate", ["linear"], ["number", ["get", "p"]], 0, 2, 1, 3] + ] + } +} diff --git a/metrics/integration/expression-tests/legacy/exponential/duplicate-stops/test.json b/metrics/integration/expression-tests/legacy/exponential/duplicate-stops/test.json new file mode 100644 index 00000000000..af8e8f8335b --- /dev/null +++ b/metrics/integration/expression-tests/legacy/exponential/duplicate-stops/test.json @@ -0,0 +1,22 @@ +{ + "expression": { + "type": "exponential", + "stops": [[0, 10], [1, 20], [1, 25], [2, 30]] + }, + "propertySpec": { + "type": "number", + "property-type": "data-driven", + "expression": {"interpolated": true, "parameters": ["zoom", "feature"]} + }, + "inputs": [[{"zoom": 1}, {}]], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": true, + "isZoomConstant": false, + "type": "number" + }, + "outputs": [20], + "serialized": ["interpolate", ["linear"], ["zoom"], 0, 10, 1, 20, 2, 30] + } +} diff --git a/metrics/integration/expression-tests/legacy/exponential/implicit/test.json b/metrics/integration/expression-tests/legacy/exponential/implicit/test.json new file mode 100644 index 00000000000..236c99d4425 --- /dev/null +++ b/metrics/integration/expression-tests/legacy/exponential/implicit/test.json @@ -0,0 +1,45 @@ +{ + "expression": {"property": "p", "stops": [[0, 0], [1, 1]]}, + "propertySpec": { + "type": "number", + "property-type": "data-driven", + "expression": {"interpolated": true, "parameters": ["zoom", "feature"]} + }, + "inputs": [ + [{}, {"properties": {}}], + [{}, {"properties": {"p": -1}}], + [{}, {"properties": {"p": 0}}], + [{}, {"properties": {"p": 0.5}}], + [{}, {"properties": {"p": 1}}], + [{}, {"properties": {"p": 2}}], + [{}, {"properties": {"p": "0"}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "number" + }, + "outputs": [ + {"error": "Expected value to be of type number, but found null instead."}, + 0, + 0, + 0.5, + 1, + 1, + { + "error": "Expected value to be of type number, but found string instead." + } + ], + "serialized": [ + "interpolate", + ["linear"], + ["number", ["get", "p"]], + 0, + 0, + 1, + 1 + ] + } +} diff --git a/metrics/integration/expression-tests/legacy/exponential/number-default/test.json b/metrics/integration/expression-tests/legacy/exponential/number-default/test.json new file mode 100644 index 00000000000..2441c6da3bc --- /dev/null +++ b/metrics/integration/expression-tests/legacy/exponential/number-default/test.json @@ -0,0 +1,37 @@ +{ + "expression": { + "type": "exponential", + "property": "p", + "stops": [[0, 0], [1, 1]], + "default": -1 + }, + "propertySpec": { + "type": "number", + "property-type": "data-driven", + "expression": {"interpolated": true, "parameters": ["zoom", "feature"]} + }, + "inputs": [ + [{}, {"properties": {}}], + [{}, {"properties": {"p": -1}}], + [{}, {"properties": {"p": 0}}], + [{}, {"properties": {"p": 0.5}}], + [{}, {"properties": {"p": 1}}], + [{}, {"properties": {"p": 2}}], + [{}, {"properties": {"p": "0"}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "number" + }, + "outputs": [-1, 0, 0, 0.5, 1, 1, -1], + "serialized": [ + "case", + ["==", ["typeof", ["get", "p"]], "number"], + ["interpolate", ["linear"], ["number", ["get", "p"]], 0, 0, 1, 1], + -1 + ] + } +} diff --git a/metrics/integration/expression-tests/legacy/exponential/number/test.json b/metrics/integration/expression-tests/legacy/exponential/number/test.json new file mode 100644 index 00000000000..5287be63306 --- /dev/null +++ b/metrics/integration/expression-tests/legacy/exponential/number/test.json @@ -0,0 +1,49 @@ +{ + "expression": { + "type": "exponential", + "property": "p", + "stops": [[0, 0], [1, 1]] + }, + "propertySpec": { + "type": "number", + "property-type": "data-driven", + "expression": {"interpolated": true, "parameters": ["zoom", "feature"]} + }, + "inputs": [ + [{}, {"properties": {}}], + [{}, {"properties": {"p": -1}}], + [{}, {"properties": {"p": 0}}], + [{}, {"properties": {"p": 0.5}}], + [{}, {"properties": {"p": 1}}], + [{}, {"properties": {"p": 2}}], + [{}, {"properties": {"p": "0"}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "number" + }, + "outputs": [ + {"error": "Expected value to be of type number, but found null instead."}, + 0, + 0, + 0.5, + 1, + 1, + { + "error": "Expected value to be of type number, but found string instead." + } + ], + "serialized": [ + "interpolate", + ["linear"], + ["number", ["get", "p"]], + 0, + 0, + 1, + 1 + ] + } +} diff --git a/metrics/integration/expression-tests/legacy/identity/array-default/test.json b/metrics/integration/expression-tests/legacy/identity/array-default/test.json new file mode 100644 index 00000000000..8e8f62829c2 --- /dev/null +++ b/metrics/integration/expression-tests/legacy/identity/array-default/test.json @@ -0,0 +1,25 @@ +{ + "expression": {"type": "identity", "property": "p", "default": [-1]}, + "inputs": [ + [{}, {"properties": {}}], + [{}, {"properties": {"p": [0]}}], + [{}, {"properties": {"p": [1]}}], + [{}, {"properties": {"p": "wrong type"}}] + ], + "propertySpec": { + "type": "array", + "value": "number", + "property-type": "data-driven", + "expression": {"interpolated": false, "parameters": ["zoom", "feature"]} + }, + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "array" + }, + "outputs": [[-1], [0], [1], [-1]], + "serialized": ["array", "number", null, ["get", "p"], ["literal", [-1]]] + } +} diff --git a/metrics/integration/expression-tests/legacy/identity/array/test.json b/metrics/integration/expression-tests/legacy/identity/array/test.json new file mode 100644 index 00000000000..40c71deb964 --- /dev/null +++ b/metrics/integration/expression-tests/legacy/identity/array/test.json @@ -0,0 +1,34 @@ +{ + "expression": {"type": "identity", "property": "p"}, + "inputs": [ + [{}, {"properties": {}}], + [{}, {"properties": {"p": [0]}}], + [{}, {"properties": {"p": [1]}}], + [{}, {"properties": {"p": "wrong type"}}] + ], + "propertySpec": { + "type": "array", + "value": "number", + "property-type": "data-driven", + "expression": {"interpolated": false, "parameters": ["zoom", "feature"]} + }, + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "array" + }, + "outputs": [ + { + "error": "Expected value to be of type array, but found null instead." + }, + [0], + [1], + { + "error": "Expected value to be of type array, but found string instead." + } + ], + "serialized": ["array", "number", ["get", "p"]] + } +} diff --git a/metrics/integration/expression-tests/legacy/identity/boolean-default/test.json b/metrics/integration/expression-tests/legacy/identity/boolean-default/test.json new file mode 100644 index 00000000000..05d420cc86e --- /dev/null +++ b/metrics/integration/expression-tests/legacy/identity/boolean-default/test.json @@ -0,0 +1,24 @@ +{ + "expression": {"type": "identity", "property": "p", "default": true}, + "inputs": [ + [{}, {"properties": {}}], + [{}, {"properties": {"p": true}}], + [{}, {"properties": {"p": false}}], + [{}, {"properties": {"p": "wrong type"}}] + ], + "propertySpec": { + "type": "boolean", + "property-type": "data-driven", + "expression": {"interpolated": false, "parameters": ["zoom", "feature"]} + }, + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "boolean" + }, + "outputs": [true, true, false, true], + "serialized": ["boolean", ["get", "p"], true] + } +} diff --git a/metrics/integration/expression-tests/legacy/identity/boolean/test.json b/metrics/integration/expression-tests/legacy/identity/boolean/test.json new file mode 100644 index 00000000000..0fcc53f9856 --- /dev/null +++ b/metrics/integration/expression-tests/legacy/identity/boolean/test.json @@ -0,0 +1,33 @@ +{ + "expression": {"type": "identity", "property": "p"}, + "inputs": [ + [{}, {"properties": {}}], + [{}, {"properties": {"p": true}}], + [{}, {"properties": {"p": false}}], + [{}, {"properties": {"p": "wrong type"}}] + ], + "propertySpec": { + "type": "boolean", + "property-type": "data-driven", + "expression": {"interpolated": false, "parameters": ["zoom", "feature"]} + }, + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "boolean" + }, + "outputs": [ + { + "error": "Expected value to be of type boolean, but found null instead." + }, + true, + false, + { + "error": "Expected value to be of type boolean, but found string instead." + } + ], + "serialized": ["boolean", ["get", "p"]] + } +} diff --git a/metrics/integration/expression-tests/legacy/identity/color-default/test.json b/metrics/integration/expression-tests/legacy/identity/color-default/test.json new file mode 100644 index 00000000000..26e0f75f991 --- /dev/null +++ b/metrics/integration/expression-tests/legacy/identity/color-default/test.json @@ -0,0 +1,23 @@ +{ + "expression": {"type": "identity", "property": "p", "default": "red"}, + "inputs": [ + [{}, {"properties": {}}], + [{}, {"properties": {"p": "blue"}}], + [{}, {"properties": {"p": 0}}] + ], + "propertySpec": { + "type": "color", + "property-type": "data-driven", + "expression": {"interpolated": false, "parameters": ["zoom", "feature"]} + }, + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "color" + }, + "outputs": [[1, 0, 0, 1], [0, 0, 1, 1], [1, 0, 0, 1]], + "serialized": ["to-color", ["get", "p"], "red"] + } +} diff --git a/metrics/integration/expression-tests/legacy/identity/color/test.json b/metrics/integration/expression-tests/legacy/identity/color/test.json new file mode 100644 index 00000000000..8e612e0ba0a --- /dev/null +++ b/metrics/integration/expression-tests/legacy/identity/color/test.json @@ -0,0 +1,27 @@ +{ + "expression": {"type": "identity", "property": "p"}, + "inputs": [ + [{}, {"properties": {}}], + [{}, {"properties": {"p": "blue"}}], + [{}, {"properties": {"p": 0}}] + ], + "propertySpec": { + "type": "color", + "property-type": "data-driven", + "expression": {"interpolated": false, "parameters": ["zoom", "feature"]} + }, + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "color" + }, + "outputs": [ + {"error": "Could not parse color from value 'null'"}, + [0, 0, 1, 1], + {"error": "Could not parse color from value '0'"} + ], + "serialized": ["to-color", ["get", "p"]] + } +} diff --git a/metrics/integration/expression-tests/legacy/identity/enum-default/test.json b/metrics/integration/expression-tests/legacy/identity/enum-default/test.json new file mode 100644 index 00000000000..a3dab4843c2 --- /dev/null +++ b/metrics/integration/expression-tests/legacy/identity/enum-default/test.json @@ -0,0 +1,31 @@ +{ + "expression": {"type": "identity", "property": "p", "default": "a"}, + "inputs": [ + [{}, {"properties": {}}], + [{}, {"properties": {"p": "a"}}], + [{}, {"properties": {"p": "b"}}], + [{}, {"properties": {"p": "c"}}] + ], + "propertySpec": { + "type": "enum", + "values": {"a": {}, "b": {}}, + "property-type": "data-driven", + "expression": {"interpolated": false, "parameters": ["zoom", "feature"]} + }, + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "string" + }, + "outputs": ["a", "a", "b", "a"], + "serialized": [ + "match", + ["get", "p"], + ["a", "b"], + ["string", ["get", "p"]], + "a" + ] + } +} diff --git a/metrics/integration/expression-tests/legacy/identity/enum/test.json b/metrics/integration/expression-tests/legacy/identity/enum/test.json new file mode 100644 index 00000000000..28e39fd5cb0 --- /dev/null +++ b/metrics/integration/expression-tests/legacy/identity/enum/test.json @@ -0,0 +1,30 @@ +{ + "expression": {"type": "identity", "property": "p"}, + "inputs": [ + [{}, {"properties": {}}], + [{}, {"properties": {"p": "a"}}], + [{}, {"properties": {"p": "b"}}], + [{}, {"properties": {"p": "c"}}] + ], + "propertySpec": { + "type": "enum", + "values": {"a": {}, "b": {}}, + "property-type": "data-driven", + "expression": {"interpolated": false, "parameters": ["zoom", "feature"]} + }, + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "string" + }, + "outputs": [ + {"error": "Expected value to be of type string, but found null instead."}, + "a", + "b", + "c" + ], + "serialized": ["string", ["get", "p"]] + } +} diff --git a/metrics/integration/expression-tests/legacy/identity/number-default/test.json b/metrics/integration/expression-tests/legacy/identity/number-default/test.json new file mode 100644 index 00000000000..85a4d055992 --- /dev/null +++ b/metrics/integration/expression-tests/legacy/identity/number-default/test.json @@ -0,0 +1,24 @@ +{ + "expression": {"type": "identity", "property": "p", "default": -1}, + "inputs": [ + [{}, {"properties": {}}], + [{}, {"properties": {"p": 0}}], + [{}, {"properties": {"p": 1}}], + [{}, {"properties": {"p": "wrong type"}}] + ], + "propertySpec": { + "type": "number", + "property-type": "data-driven", + "expression": {"interpolated": false, "parameters": ["zoom", "feature"]} + }, + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "number" + }, + "outputs": [-1, 0, 1, -1], + "serialized": ["number", ["get", "p"], -1] + } +} diff --git a/metrics/integration/expression-tests/legacy/identity/number/test.json b/metrics/integration/expression-tests/legacy/identity/number/test.json new file mode 100644 index 00000000000..979775ab916 --- /dev/null +++ b/metrics/integration/expression-tests/legacy/identity/number/test.json @@ -0,0 +1,31 @@ +{ + "expression": {"type": "identity", "property": "p"}, + "inputs": [ + [{}, {"properties": {}}], + [{}, {"properties": {"p": 0}}], + [{}, {"properties": {"p": 1}}], + [{}, {"properties": {"p": "wrong type"}}] + ], + "propertySpec": { + "type": "number", + "property-type": "data-driven", + "expression": {"interpolated": false, "parameters": ["zoom", "feature"]} + }, + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "number" + }, + "outputs": [ + {"error": "Expected value to be of type number, but found null instead."}, + 0, + 1, + { + "error": "Expected value to be of type number, but found string instead." + } + ], + "serialized": ["number", ["get", "p"]] + } +} diff --git a/metrics/integration/expression-tests/legacy/identity/string-default/test.json b/metrics/integration/expression-tests/legacy/identity/string-default/test.json new file mode 100644 index 00000000000..9525ee5f076 --- /dev/null +++ b/metrics/integration/expression-tests/legacy/identity/string-default/test.json @@ -0,0 +1,24 @@ +{ + "expression": {"type": "identity", "property": "p", "default": "default"}, + "inputs": [ + [{}, {"properties": {}}], + [{}, {"properties": {"p": "0"}}], + [{}, {"properties": {"p": "1"}}], + [{}, {"properties": {"p": 0}}] + ], + "propertySpec": { + "type": "string", + "property-type": "data-driven", + "expression": {"interpolated": false, "parameters": ["zoom", "feature"]} + }, + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "string" + }, + "outputs": ["default", "0", "1", "default"], + "serialized": ["string", ["get", "p"], "default"] + } +} diff --git a/metrics/integration/expression-tests/legacy/identity/string/test.json b/metrics/integration/expression-tests/legacy/identity/string/test.json new file mode 100644 index 00000000000..70b9ef12610 --- /dev/null +++ b/metrics/integration/expression-tests/legacy/identity/string/test.json @@ -0,0 +1,31 @@ +{ + "expression": {"type": "identity", "property": "p"}, + "inputs": [ + [{}, {"properties": {}}], + [{}, {"properties": {"p": "0"}}], + [{}, {"properties": {"p": "1"}}], + [{}, {"properties": {"p": 0}}] + ], + "propertySpec": { + "type": "string", + "property-type": "data-driven", + "expression": {"interpolated": false, "parameters": ["zoom", "feature"]} + }, + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "string" + }, + "outputs": [ + {"error": "Expected value to be of type string, but found null instead."}, + "0", + "1", + { + "error": "Expected value to be of type string, but found number instead." + } + ], + "serialized": ["string", ["get", "p"]] + } +} diff --git a/metrics/integration/expression-tests/legacy/interval/array-default/test.json b/metrics/integration/expression-tests/legacy/interval/array-default/test.json new file mode 100644 index 00000000000..c79cec3c8b6 --- /dev/null +++ b/metrics/integration/expression-tests/legacy/interval/array-default/test.json @@ -0,0 +1,39 @@ +{ + "expression": { + "type": "interval", + "property": "p", + "stops": [[0, [0]], [1, [1]]], + "default": [-1] + }, + "propertySpec": { + "type": "array", + "value": "number", + "length": 1, + "property-type": "data-driven", + "expression": {"interpolated": true, "parameters": ["zoom", "feature"]} + }, + "inputs": [ + [{}, {"properties": {}}], + [{}, {"properties": {"p": -1}}], + [{}, {"properties": {"p": 0}}], + [{}, {"properties": {"p": 0.5}}], + [{}, {"properties": {"p": 1}}], + [{}, {"properties": {"p": 2}}], + [{}, {"properties": {"p": "0"}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "array" + }, + "outputs": [[-1], [0], [0], [0], [1], [1], [-1]], + "serialized": [ + "case", + ["==", ["typeof", ["get", "p"]], "number"], + ["step", ["number", ["get", "p"]], ["literal", [0]], 1, ["literal", [1]]], + ["literal", [-1]] + ] + } +} diff --git a/metrics/integration/expression-tests/legacy/interval/array/test.json b/metrics/integration/expression-tests/legacy/interval/array/test.json new file mode 100644 index 00000000000..26c4fd020ff --- /dev/null +++ b/metrics/integration/expression-tests/legacy/interval/array/test.json @@ -0,0 +1,49 @@ +{ + "expression": { + "type": "interval", + "property": "p", + "stops": [[0, [0]], [1, [1]]] + }, + "propertySpec": { + "type": "array", + "value": "number", + "length": 1, + "property-type": "data-driven", + "expression": {"interpolated": true, "parameters": ["zoom", "feature"]} + }, + "inputs": [ + [{}, {"properties": {}}], + [{}, {"properties": {"p": -1}}], + [{}, {"properties": {"p": 0}}], + [{}, {"properties": {"p": 0.5}}], + [{}, {"properties": {"p": 1}}], + [{}, {"properties": {"p": 2}}], + [{}, {"properties": {"p": "0"}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "array" + }, + "outputs": [ + {"error": "Expected value to be of type number, but found null instead."}, + [0], + [0], + [0], + [1], + [1], + { + "error": "Expected value to be of type number, but found string instead." + } + ], + "serialized": [ + "step", + ["number", ["get", "p"]], + ["literal", [0]], + 1, + ["literal", [1]] + ] + } +} diff --git a/metrics/integration/expression-tests/legacy/interval/color-default/test.json b/metrics/integration/expression-tests/legacy/interval/color-default/test.json new file mode 100644 index 00000000000..fa41b1f0589 --- /dev/null +++ b/metrics/integration/expression-tests/legacy/interval/color-default/test.json @@ -0,0 +1,51 @@ +{ + "expression": { + "type": "interval", + "property": "p", + "stops": [[0, "black"], [1, "white"]], + "default": "red" + }, + "propertySpec": { + "type": "color", + "property-type": "data-driven", + "expression": {"interpolated": true, "parameters": ["zoom", "feature"]} + }, + "inputs": [ + [{}, {"properties": {}}], + [{}, {"properties": {"p": -1}}], + [{}, {"properties": {"p": 0}}], + [{}, {"properties": {"p": 0.5}}], + [{}, {"properties": {"p": 1}}], + [{}, {"properties": {"p": 2}}], + [{}, {"properties": {"p": "0"}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "color" + }, + "outputs": [ + [1, 0, 0, 1], + [0, 0, 0, 1], + [0, 0, 0, 1], + [0, 0, 0, 1], + [1, 1, 1, 1], + [1, 1, 1, 1], + [1, 0, 0, 1] + ], + "serialized": [ + "case", + ["==", ["typeof", ["get", "p"]], "number"], + [ + "step", + ["number", ["get", "p"]], + ["rgba", 0, 0, 0, 1], + 1, + ["rgba", 255, 255, 255, 1] + ], + ["rgba", 255, 0, 0, 1] + ] + } +} diff --git a/metrics/integration/expression-tests/legacy/interval/color/test.json b/metrics/integration/expression-tests/legacy/interval/color/test.json new file mode 100644 index 00000000000..79ecf03ec8e --- /dev/null +++ b/metrics/integration/expression-tests/legacy/interval/color/test.json @@ -0,0 +1,47 @@ +{ + "expression": { + "type": "interval", + "property": "p", + "stops": [[0, "black"], [1, "white"]] + }, + "propertySpec": { + "type": "color", + "property-type": "data-driven", + "expression": {"interpolated": true, "parameters": ["zoom", "feature"]} + }, + "inputs": [ + [{}, {"properties": {}}], + [{}, {"properties": {"p": -1}}], + [{}, {"properties": {"p": 0}}], + [{}, {"properties": {"p": 0.5}}], + [{}, {"properties": {"p": 1}}], + [{}, {"properties": {"p": 2}}], + [{}, {"properties": {"p": "0"}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "color" + }, + "outputs": [ + {"error": "Expected value to be of type number, but found null instead."}, + [0, 0, 0, 1], + [0, 0, 0, 1], + [0, 0, 0, 1], + [1, 1, 1, 1], + [1, 1, 1, 1], + { + "error": "Expected value to be of type number, but found string instead." + } + ], + "serialized": [ + "step", + ["number", ["get", "p"]], + ["rgba", 0, 0, 0, 1], + 1, + ["rgba", 255, 255, 255, 1] + ] + } +} diff --git a/metrics/integration/expression-tests/legacy/interval/composite-default/test.json b/metrics/integration/expression-tests/legacy/interval/composite-default/test.json new file mode 100644 index 00000000000..f9ec014f526 --- /dev/null +++ b/metrics/integration/expression-tests/legacy/interval/composite-default/test.json @@ -0,0 +1,53 @@ +{ + "expression": { + "type": "interval", + "property": "p", + "stops": [ + [{"zoom": 0, "value": 0}, 0], + [{"zoom": 0, "value": 1}, 1], + [{"zoom": 1, "value": 0}, 2], + [{"zoom": 1, "value": 1}, 3] + ], + "default": -1 + }, + "propertySpec": { + "type": "number", + "property-type": "data-driven", + "expression": {"interpolated": false, "parameters": ["zoom", "feature"]} + }, + "inputs": [ + [{"zoom": 0.5}, {"properties": {}}], + [{"zoom": 0.5}, {"properties": {"p": -1}}], + [{"zoom": 0.5}, {"properties": {"p": 0}}], + [{"zoom": 0.5}, {"properties": {"p": 0.5}}], + [{"zoom": 0.5}, {"properties": {"p": 1}}], + [{"zoom": 0.5}, {"properties": {"p": 2}}], + [{"zoom": 0.5}, {"properties": {"p": "0"}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": false, + "type": "number" + }, + "outputs": [-1, 0, 0, 0, 1, 1, -1], + "serialized": [ + "step", + ["zoom"], + [ + "case", + ["==", ["typeof", ["get", "p"]], "number"], + ["step", ["number", ["get", "p"]], 0, 1, 1], + -1 + ], + 1, + [ + "case", + ["==", ["typeof", ["get", "p"]], "number"], + ["step", ["number", ["get", "p"]], 2, 1, 3], + -1 + ] + ] + } +} diff --git a/metrics/integration/expression-tests/legacy/interval/composite/test.json b/metrics/integration/expression-tests/legacy/interval/composite/test.json new file mode 100644 index 00000000000..6b182fb656b --- /dev/null +++ b/metrics/integration/expression-tests/legacy/interval/composite/test.json @@ -0,0 +1,52 @@ +{ + "expression": { + "type": "interval", + "property": "p", + "stops": [ + [{"zoom": 0, "value": 0}, 0], + [{"zoom": 0, "value": 1}, 1], + [{"zoom": 1, "value": 0}, 2], + [{"zoom": 1, "value": 1}, 3] + ] + }, + "propertySpec": { + "type": "number", + "property-type": "data-driven", + "expression": {"interpolated": false, "parameters": ["zoom", "feature"]} + }, + "inputs": [ + [{"zoom": 0.5}, {"properties": {}}], + [{"zoom": 0.5}, {"properties": {"p": -1}}], + [{"zoom": 0.5}, {"properties": {"p": 0}}], + [{"zoom": 0.5}, {"properties": {"p": 0.5}}], + [{"zoom": 0.5}, {"properties": {"p": 1}}], + [{"zoom": 0.5}, {"properties": {"p": 2}}], + [{"zoom": 0.5}, {"properties": {"p": "0"}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": false, + "type": "number" + }, + "outputs": [ + {"error": "Expected value to be of type number, but found null instead."}, + 0, + 0, + 0, + 1, + 1, + { + "error": "Expected value to be of type number, but found string instead." + } + ], + "serialized": [ + "step", + ["zoom"], + ["step", ["number", ["get", "p"]], 0, 1, 1], + 1, + ["step", ["number", ["get", "p"]], 2, 1, 3] + ] + } +} diff --git a/metrics/integration/expression-tests/legacy/interval/duplicate-stops/test.json b/metrics/integration/expression-tests/legacy/interval/duplicate-stops/test.json new file mode 100644 index 00000000000..b68507971eb --- /dev/null +++ b/metrics/integration/expression-tests/legacy/interval/duplicate-stops/test.json @@ -0,0 +1,22 @@ +{ + "expression": { + "type": "interval", + "stops": [[0, "a"], [1, "b"], [1, "c"], [2, "d"]] + }, + "propertySpec": { + "type": "string", + "property-type": "data-driven", + "expression": {"interpolated": true, "parameters": ["zoom", "feature"]} + }, + "inputs": [[{"zoom": 1}, {}]], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": true, + "isZoomConstant": false, + "type": "string" + }, + "outputs": ["b"], + "serialized": ["step", ["zoom"], "a", 1, "b", 2, "d"] + } +} diff --git a/metrics/integration/expression-tests/legacy/interval/implicit/test.json b/metrics/integration/expression-tests/legacy/interval/implicit/test.json new file mode 100644 index 00000000000..f8ce664b90d --- /dev/null +++ b/metrics/integration/expression-tests/legacy/interval/implicit/test.json @@ -0,0 +1,37 @@ +{ + "expression": {"property": "p", "stops": [[0, "0"], [1, "1"]]}, + "propertySpec": { + "type": "string", + "property-type": "data-driven", + "expression": {"interpolated": false, "parameters": ["zoom", "feature"]} + }, + "inputs": [ + [{}, {"properties": {}}], + [{}, {"properties": {"p": -1}}], + [{}, {"properties": {"p": 0}}], + [{}, {"properties": {"p": 0.5}}], + [{}, {"properties": {"p": 1}}], + [{}, {"properties": {"p": 2}}], + [{}, {"properties": {"p": "0"}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "string" + }, + "outputs": [ + {"error": "Expected value to be of type number, but found null instead."}, + "0", + "0", + "0", + "1", + "1", + { + "error": "Expected value to be of type number, but found string instead." + } + ], + "serialized": ["step", ["number", ["get", "p"]], "0", 1, "1"] + } +} diff --git a/metrics/integration/expression-tests/legacy/interval/number-default/test.json b/metrics/integration/expression-tests/legacy/interval/number-default/test.json new file mode 100644 index 00000000000..0399bf124ed --- /dev/null +++ b/metrics/integration/expression-tests/legacy/interval/number-default/test.json @@ -0,0 +1,37 @@ +{ + "expression": { + "type": "interval", + "property": "p", + "stops": [[0, 0], [1, 1]], + "default": -1 + }, + "propertySpec": { + "type": "number", + "property-type": "data-driven", + "expression": {"interpolated": true, "parameters": ["zoom", "feature"]} + }, + "inputs": [ + [{}, {"properties": {}}], + [{}, {"properties": {"p": -1}}], + [{}, {"properties": {"p": 0}}], + [{}, {"properties": {"p": 0.5}}], + [{}, {"properties": {"p": 1}}], + [{}, {"properties": {"p": 2}}], + [{}, {"properties": {"p": "0"}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "number" + }, + "outputs": [-1, 0, 0, 0, 1, 1, -1], + "serialized": [ + "case", + ["==", ["typeof", ["get", "p"]], "number"], + ["step", ["number", ["get", "p"]], 0, 1, 1], + -1 + ] + } +} diff --git a/metrics/integration/expression-tests/legacy/interval/number/test.json b/metrics/integration/expression-tests/legacy/interval/number/test.json new file mode 100644 index 00000000000..d08ca7f4a5a --- /dev/null +++ b/metrics/integration/expression-tests/legacy/interval/number/test.json @@ -0,0 +1,41 @@ +{ + "expression": { + "type": "interval", + "property": "p", + "stops": [[0, 0], [1, 1]] + }, + "propertySpec": { + "type": "number", + "property-type": "data-driven", + "expression": {"interpolated": true, "parameters": ["zoom", "feature"]} + }, + "inputs": [ + [{}, {"properties": {}}], + [{}, {"properties": {"p": -1}}], + [{}, {"properties": {"p": 0}}], + [{}, {"properties": {"p": 0.5}}], + [{}, {"properties": {"p": 1}}], + [{}, {"properties": {"p": 2}}], + [{}, {"properties": {"p": "0"}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "number" + }, + "outputs": [ + {"error": "Expected value to be of type number, but found null instead."}, + 0, + 0, + 0, + 1, + 1, + { + "error": "Expected value to be of type number, but found string instead." + } + ], + "serialized": ["step", ["number", ["get", "p"]], 0, 1, 1] + } +} diff --git a/metrics/integration/expression-tests/legacy/interval/string-default/test.json b/metrics/integration/expression-tests/legacy/interval/string-default/test.json new file mode 100644 index 00000000000..259a0a1c606 --- /dev/null +++ b/metrics/integration/expression-tests/legacy/interval/string-default/test.json @@ -0,0 +1,37 @@ +{ + "expression": { + "type": "interval", + "property": "p", + "stops": [[0, "0"], [1, "1"]], + "default": "default" + }, + "propertySpec": { + "type": "string", + "property-type": "data-driven", + "expression": {"interpolated": true, "parameters": ["zoom", "feature"]} + }, + "inputs": [ + [{}, {"properties": {}}], + [{}, {"properties": {"p": -1}}], + [{}, {"properties": {"p": 0}}], + [{}, {"properties": {"p": 0.5}}], + [{}, {"properties": {"p": 1}}], + [{}, {"properties": {"p": 2}}], + [{}, {"properties": {"p": "0"}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "string" + }, + "outputs": ["default", "0", "0", "0", "1", "1", "default"], + "serialized": [ + "case", + ["==", ["typeof", ["get", "p"]], "number"], + ["step", ["number", ["get", "p"]], "0", 1, "1"], + "default" + ] + } +} diff --git a/metrics/integration/expression-tests/legacy/interval/string/test.json b/metrics/integration/expression-tests/legacy/interval/string/test.json new file mode 100644 index 00000000000..91740cb156e --- /dev/null +++ b/metrics/integration/expression-tests/legacy/interval/string/test.json @@ -0,0 +1,41 @@ +{ + "expression": { + "type": "interval", + "property": "p", + "stops": [[0, "0"], [1, "1"]] + }, + "propertySpec": { + "type": "string", + "property-type": "data-driven", + "expression": {"interpolated": true, "parameters": ["zoom", "feature"]} + }, + "inputs": [ + [{}, {"properties": {}}], + [{}, {"properties": {"p": -1}}], + [{}, {"properties": {"p": 0}}], + [{}, {"properties": {"p": 0.5}}], + [{}, {"properties": {"p": 1}}], + [{}, {"properties": {"p": 2}}], + [{}, {"properties": {"p": "0"}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "string" + }, + "outputs": [ + {"error": "Expected value to be of type number, but found null instead."}, + "0", + "0", + "0", + "1", + "1", + { + "error": "Expected value to be of type number, but found string instead." + } + ], + "serialized": ["step", ["number", ["get", "p"]], "0", 1, "1"] + } +} diff --git a/metrics/integration/expression-tests/legacy/interval/tokens-property/test.json b/metrics/integration/expression-tests/legacy/interval/tokens-property/test.json new file mode 100644 index 00000000000..1980dcbbe3a --- /dev/null +++ b/metrics/integration/expression-tests/legacy/interval/tokens-property/test.json @@ -0,0 +1,34 @@ +{ + "expression": { + "type": "interval", + "property": "p", + "stops": [[0, "0 {a}"], [1, "1 {b}"]] + }, + "propertySpec": { + "type": "string", + "property-type": "data-driven", + "expression": {"interpolated": true, "parameters": ["zoom", "feature"]}, + "tokens": true + }, + "inputs": [ + [{}, {"properties": {}}], + [{}, {"properties": {"p": 0, "a": "a"}}], + [{}, {"properties": {"p": 1, "b": "b"}}], + [{}, {"properties": {"p": 0}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "string" + }, + "outputs": [ + {"error": "Expected value to be of type number, but found null instead."}, + "0 {a}", + "1 {b}", + "0 {a}" + ], + "serialized": ["step", ["number", ["get", "p"]], "0 {a}", 1, "1 {b}"] + } +} diff --git a/metrics/integration/expression-tests/legacy/interval/tokens-zoom/test.json b/metrics/integration/expression-tests/legacy/interval/tokens-zoom/test.json new file mode 100644 index 00000000000..fed8f4f31bb --- /dev/null +++ b/metrics/integration/expression-tests/legacy/interval/tokens-zoom/test.json @@ -0,0 +1,30 @@ +{ + "expression": {"type": "interval", "stops": [[0, "0 {a}"], [1, "{b}"]]}, + "inputs": [ + [{"zoom": 0}, {"properties": {"a": "a", "b": 2}}], + [{"zoom": 1}, {"properties": {"a": "a", "b": 2}}], + [{"zoom": 0}, {"properties": {}}] + ], + "propertySpec": { + "type": "string", + "property-type": "data-driven", + "expression": {"interpolated": true, "parameters": ["zoom", "feature"]}, + "tokens": true + }, + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": false, + "type": "string" + }, + "outputs": ["0 a", "2", "0 "], + "serialized": [ + "step", + ["zoom"], + ["concat", "0 ", ["get", "a"]], + 1, + ["to-string", ["get", "b"]] + ] + } +} diff --git a/metrics/integration/expression-tests/length/array/test.json b/metrics/integration/expression-tests/length/array/test.json new file mode 100644 index 00000000000..29f67e73073 --- /dev/null +++ b/metrics/integration/expression-tests/length/array/test.json @@ -0,0 +1,14 @@ +{ + "expression": ["length", ["array", ["get", "x"]]], + "inputs": [[{}, {"properties": {"x": [1, 2, 3, 4, 5]}}]], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "number" + }, + "outputs": [5], + "serialized": ["length", ["array", ["get", "x"]]] + } +} diff --git a/metrics/integration/expression-tests/length/implicit/test.json b/metrics/integration/expression-tests/length/implicit/test.json new file mode 100644 index 00000000000..a2708af3269 --- /dev/null +++ b/metrics/integration/expression-tests/length/implicit/test.json @@ -0,0 +1,24 @@ +{ + "expression": ["length", ["get", "x"]], + "inputs": [ + [{}, {"properties": {"x": "a string"}}], + [{}, {"properties": {"x": []}}], + [{}, {"properties": {"x": 0}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "number" + }, + "outputs": [ + 8, + 0, + { + "error": "Expected value to be of type string or array, but found number instead." + } + ], + "serialized": ["length", ["get", "x"]] + } +} diff --git a/metrics/integration/expression-tests/length/invalid/test.json b/metrics/integration/expression-tests/length/invalid/test.json new file mode 100644 index 00000000000..3fedfc70a2d --- /dev/null +++ b/metrics/integration/expression-tests/length/invalid/test.json @@ -0,0 +1,15 @@ +{ + "expression": ["length", 0], + "inputs": [[{}, {}]], + "expected": { + "compiled": { + "result": "error", + "errors": [ + { + "key": "", + "error": "Expected argument of type string or array, but found number instead." + } + ] + } + } +} diff --git a/metrics/integration/expression-tests/length/string/test.json b/metrics/integration/expression-tests/length/string/test.json new file mode 100644 index 00000000000..bcbba9efe2b --- /dev/null +++ b/metrics/integration/expression-tests/length/string/test.json @@ -0,0 +1,14 @@ +{ + "expression": ["length", ["string", ["get", "x"]]], + "inputs": [[{}, {"properties": {"x": "a string"}}]], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "number" + }, + "outputs": [8], + "serialized": ["length", ["string", ["get", "x"]]] + } +} diff --git a/metrics/integration/expression-tests/less/boolean/test.json b/metrics/integration/expression-tests/less/boolean/test.json new file mode 100644 index 00000000000..731d6dbb78c --- /dev/null +++ b/metrics/integration/expression-tests/less/boolean/test.json @@ -0,0 +1,14 @@ +{ + "expression": ["<", ["boolean", ["get", "x"]], ["boolean", ["get", "y"]]], + "expected": { + "compiled": { + "result": "error", + "errors": [ + { + "key": "[1]", + "error": "\"<\" comparisons are not supported for type 'boolean'." + } + ] + } + } +} diff --git a/metrics/integration/expression-tests/less/mismatch/test.json b/metrics/integration/expression-tests/less/mismatch/test.json new file mode 100644 index 00000000000..c33f34feabd --- /dev/null +++ b/metrics/integration/expression-tests/less/mismatch/test.json @@ -0,0 +1,11 @@ +{ + "expression": ["<", ["string", ["get", "x"]], ["number", ["get", "y"]]], + "expected": { + "compiled": { + "result": "error", + "errors": [ + {"key": "", "error": "Cannot compare types 'string' and 'number'."} + ] + } + } +} diff --git a/metrics/integration/expression-tests/less/null/test.json b/metrics/integration/expression-tests/less/null/test.json new file mode 100644 index 00000000000..ac9a426fdd1 --- /dev/null +++ b/metrics/integration/expression-tests/less/null/test.json @@ -0,0 +1,14 @@ +{ + "expression": ["<", null, null], + "expected": { + "compiled": { + "result": "error", + "errors": [ + { + "key": "[1]", + "error": "\"<\" comparisons are not supported for type 'null'." + } + ] + } + } +} diff --git a/metrics/integration/expression-tests/less/number/test.json b/metrics/integration/expression-tests/less/number/test.json new file mode 100644 index 00000000000..efe025199e1 --- /dev/null +++ b/metrics/integration/expression-tests/less/number/test.json @@ -0,0 +1,18 @@ +{ + "expression": ["<", ["number", ["get", "x"]], ["number", ["get", "y"]]], + "inputs": [ + [{}, {"properties": {"x": 1, "y": 1}}], + [{}, {"properties": {"x": 1, "y": 2}}], + [{}, {"properties": {"x": 2, "y": 1}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "boolean" + }, + "outputs": [false, true, false], + "serialized": ["<", ["number", ["get", "x"]], ["number", ["get", "y"]]] + } +} diff --git a/metrics/integration/expression-tests/less/string-and-value/test.json b/metrics/integration/expression-tests/less/string-and-value/test.json new file mode 100644 index 00000000000..1674ece373f --- /dev/null +++ b/metrics/integration/expression-tests/less/string-and-value/test.json @@ -0,0 +1,26 @@ +{ + "expression": ["<", ["string", ["get", "x"]], ["get", "y"]], + "inputs": [ + [{}, {"properties": {"x": "1", "y": "2"}}], + [{}, {"properties": {"x": "1", "y": 2}}], + [{}, {"properties": {"x": 1, "y": "2"}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "boolean" + }, + "outputs": [ + true, + { + "error": "Expected value to be of type string, but found number instead." + }, + { + "error": "Expected value to be of type string, but found number instead." + } + ], + "serialized": ["<", ["string", ["get", "x"]], ["string", ["get", "y"]]] + } +} diff --git a/metrics/integration/expression-tests/less/string/test.json b/metrics/integration/expression-tests/less/string/test.json new file mode 100644 index 00000000000..42f4fda591a --- /dev/null +++ b/metrics/integration/expression-tests/less/string/test.json @@ -0,0 +1,21 @@ +{ + "expression": ["<", ["string", ["get", "x"]], ["string", ["get", "y"]]], + "inputs": [ + [{}, {"properties": {"x": "1", "y": "1"}}], + [{}, {"properties": {"x": "1", "y": "2"}}], + [{}, {"properties": {"x": "2", "y": "1"}}], + [{}, {"properties": {"x": "abc", "y": "azz"}}], + [{}, {"properties": {"x": "abc", "y": "aaa"}}], + [{}, {"properties": {"x": "abc", "y": "abc"}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "boolean" + }, + "outputs": [false, true, false, true, false, false], + "serialized": ["<", ["string", ["get", "x"]], ["string", ["get", "y"]]] + } +} diff --git a/metrics/integration/expression-tests/less/value/test.json b/metrics/integration/expression-tests/less/value/test.json new file mode 100644 index 00000000000..1d12eb582c8 --- /dev/null +++ b/metrics/integration/expression-tests/less/value/test.json @@ -0,0 +1,28 @@ +{ + "expression": ["<", ["get", "x"], ["get", "y"]], + "inputs": [ + [{}, {"properties": {"x": "10", "y": "2"}}], + [{}, {"properties": {"x": 1, "y": 10}}], + [{}, {"properties": {"x": "1", "y": 1}}], + [{}, {"properties": {"x": 1, "y": "1"}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "boolean" + }, + "outputs": [ + true, + true, + { + "error": "Expected arguments for \"<\" to be (string, string) or (number, number), but found (string, number) instead." + }, + { + "error": "Expected arguments for \"<\" to be (string, string) or (number, number), but found (number, string) instead." + } + ], + "serialized": ["<", ["get", "x"], ["get", "y"]] + } +} diff --git a/metrics/integration/expression-tests/less_or_equal/boolean/test.json b/metrics/integration/expression-tests/less_or_equal/boolean/test.json new file mode 100644 index 00000000000..1b657359ef6 --- /dev/null +++ b/metrics/integration/expression-tests/less_or_equal/boolean/test.json @@ -0,0 +1,14 @@ +{ + "expression": ["<=", ["boolean", ["get", "x"]], ["boolean", ["get", "y"]]], + "expected": { + "compiled": { + "result": "error", + "errors": [ + { + "key": "[1]", + "error": "\"<=\" comparisons are not supported for type 'boolean'." + } + ] + } + } +} diff --git a/metrics/integration/expression-tests/less_or_equal/mismatch/test.json b/metrics/integration/expression-tests/less_or_equal/mismatch/test.json new file mode 100644 index 00000000000..40e257af409 --- /dev/null +++ b/metrics/integration/expression-tests/less_or_equal/mismatch/test.json @@ -0,0 +1,11 @@ +{ + "expression": ["<=", ["string", ["get", "x"]], ["number", ["get", "y"]]], + "expected": { + "compiled": { + "result": "error", + "errors": [ + {"key": "", "error": "Cannot compare types 'string' and 'number'."} + ] + } + } +} diff --git a/metrics/integration/expression-tests/less_or_equal/null/test.json b/metrics/integration/expression-tests/less_or_equal/null/test.json new file mode 100644 index 00000000000..c16be2ca756 --- /dev/null +++ b/metrics/integration/expression-tests/less_or_equal/null/test.json @@ -0,0 +1,14 @@ +{ + "expression": ["<=", null, null], + "expected": { + "compiled": { + "result": "error", + "errors": [ + { + "key": "[1]", + "error": "\"<=\" comparisons are not supported for type 'null'." + } + ] + } + } +} diff --git a/metrics/integration/expression-tests/less_or_equal/number/test.json b/metrics/integration/expression-tests/less_or_equal/number/test.json new file mode 100644 index 00000000000..e835843af86 --- /dev/null +++ b/metrics/integration/expression-tests/less_or_equal/number/test.json @@ -0,0 +1,18 @@ +{ + "expression": ["<=", ["number", ["get", "x"]], ["number", ["get", "y"]]], + "inputs": [ + [{}, {"properties": {"x": 1, "y": 1}}], + [{}, {"properties": {"x": 1, "y": 2}}], + [{}, {"properties": {"x": 2, "y": 1}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "boolean" + }, + "outputs": [true, true, false], + "serialized": ["<=", ["number", ["get", "x"]], ["number", ["get", "y"]]] + } +} diff --git a/metrics/integration/expression-tests/less_or_equal/string-and-value/test.json b/metrics/integration/expression-tests/less_or_equal/string-and-value/test.json new file mode 100644 index 00000000000..24b4fe682ce --- /dev/null +++ b/metrics/integration/expression-tests/less_or_equal/string-and-value/test.json @@ -0,0 +1,26 @@ +{ + "expression": ["<", ["string", ["get", "x"]], ["get", "y"]], + "inputs": [ + [{}, {"properties": {"x": "1", "y": "1"}}], + [{}, {"properties": {"x": "1", "y": 1}}], + [{}, {"properties": {"x": 1, "y": "1"}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "boolean" + }, + "outputs": [ + false, + { + "error": "Expected value to be of type string, but found number instead." + }, + { + "error": "Expected value to be of type string, but found number instead." + } + ], + "serialized": ["<", ["string", ["get", "x"]], ["string", ["get", "y"]]] + } +} diff --git a/metrics/integration/expression-tests/less_or_equal/string/test.json b/metrics/integration/expression-tests/less_or_equal/string/test.json new file mode 100644 index 00000000000..d0692038e58 --- /dev/null +++ b/metrics/integration/expression-tests/less_or_equal/string/test.json @@ -0,0 +1,21 @@ +{ + "expression": ["<=", ["string", ["get", "x"]], ["string", ["get", "y"]]], + "inputs": [ + [{}, {"properties": {"x": "1", "y": "1"}}], + [{}, {"properties": {"x": "1", "y": "2"}}], + [{}, {"properties": {"x": "2", "y": "1"}}], + [{}, {"properties": {"x": "abc", "y": "azz"}}], + [{}, {"properties": {"x": "abc", "y": "aaa"}}], + [{}, {"properties": {"x": "abc", "y": "abc"}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "boolean" + }, + "outputs": [true, true, false, true, false, true], + "serialized": ["<=", ["string", ["get", "x"]], ["string", ["get", "y"]]] + } +} diff --git a/metrics/integration/expression-tests/less_or_equal/value/test.json b/metrics/integration/expression-tests/less_or_equal/value/test.json new file mode 100644 index 00000000000..71b3fe81095 --- /dev/null +++ b/metrics/integration/expression-tests/less_or_equal/value/test.json @@ -0,0 +1,28 @@ +{ + "expression": ["<=", ["get", "x"], ["get", "y"]], + "inputs": [ + [{}, {"properties": {"x": "10", "y": "2"}}], + [{}, {"properties": {"x": 1, "y": 10}}], + [{}, {"properties": {"x": "1", "y": 1}}], + [{}, {"properties": {"x": 1, "y": "1"}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "boolean" + }, + "outputs": [ + true, + true, + { + "error": "Expected arguments for \"<=\" to be (string, string) or (number, number), but found (string, number) instead." + }, + { + "error": "Expected arguments for \"<=\" to be (string, string) or (number, number), but found (number, string) instead." + } + ], + "serialized": ["<=", ["get", "x"], ["get", "y"]] + } +} diff --git a/metrics/integration/expression-tests/let/basic/test.json b/metrics/integration/expression-tests/let/basic/test.json new file mode 100644 index 00000000000..9c6ba7073e8 --- /dev/null +++ b/metrics/integration/expression-tests/let/basic/test.json @@ -0,0 +1,28 @@ +{ + "expression": [ + "let", + "a", + ["number", ["get", "a"]], + "b", + ["number", ["get", "b"]], + ["+", ["+", ["var", "a"], ["var", "b"]], ["var", "a"]] + ], + "inputs": [[{}, {"properties": {"a": 1, "b": 2}}]], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "number" + }, + "outputs": [4], + "serialized": [ + "let", + "a", + ["number", ["get", "a"]], + "b", + ["number", ["get", "b"]], + ["+", ["+", ["var", "a"], ["var", "b"]], ["var", "a"]] + ] + } +} diff --git a/metrics/integration/expression-tests/let/expected-value/test.json b/metrics/integration/expression-tests/let/expected-value/test.json new file mode 100644 index 00000000000..157652e8d17 --- /dev/null +++ b/metrics/integration/expression-tests/let/expected-value/test.json @@ -0,0 +1,58 @@ +{ + "expression": [ + "let", + "density", + ["/", ["get", "population"], ["get", "sq-km"]], + [ + "interpolate", + ["linear"], + ["var", "density"], + 1, + "#000000", + 100, + "#ffffff" + ] + ], + "propertySpec": { + "type": "color" + }, + "description": "let should preserve expected type for child expressions. If the expected 'color' type in this test were not preserved, it would not get passed into the interpolation and the literal strings wouldn't automatically coerce to the 'color' type", + "inputs": [[{}, {"properties": {"population": 100, "sq-km": 10}}]], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "color" + }, + "outputs": [ + [0.09090909090909091,0.09090909090909091,0.09090909090909091,1] + ], + "serialized": [ + "let", + "density", + ["/", ["number", ["get", "population"]], ["number", ["get", "sq-km"]]], + [ + "interpolate", + ["linear"], + ["var", "density"], + 1, + [ + "rgba", + 0, + 0, + 0, + 1 + ], + 100, + [ + "rgba", + 255, + 255, + 255, + 1 + ] + ] + ] + } +} diff --git a/metrics/integration/expression-tests/let/invalid-name/test.json b/metrics/integration/expression-tests/let/invalid-name/test.json new file mode 100644 index 00000000000..085d6897cea --- /dev/null +++ b/metrics/integration/expression-tests/let/invalid-name/test.json @@ -0,0 +1,15 @@ +{ + "expression": ["let", "$a", 1, ["var", "$a"]], + "inputs": [], + "expected": { + "compiled": { + "result": "error", + "errors": [ + { + "key": "[1]", + "error": "Variable names must contain only alphanumeric characters or '_'." + } + ] + } + } +} diff --git a/metrics/integration/expression-tests/let/nested/test.json b/metrics/integration/expression-tests/let/nested/test.json new file mode 100644 index 00000000000..63909c54736 --- /dev/null +++ b/metrics/integration/expression-tests/let/nested/test.json @@ -0,0 +1,24 @@ +{ + "expression": [ + "let", + "a", + ["number", ["get", "a"]], + ["let", "b", ["+", 1, ["var", "a"]], ["+", ["var", "a"], ["var", "b"]]] + ], + "inputs": [[{}, {"properties": {"a": 1}}]], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "number" + }, + "outputs": [3], + "serialized": [ + "let", + "a", + ["number", ["get", "a"]], + ["let", "b", ["+", 1, ["var", "a"]], ["+", ["var", "a"], ["var", "b"]]] + ] + } +} diff --git a/metrics/integration/expression-tests/let/property-function/test.json b/metrics/integration/expression-tests/let/property-function/test.json new file mode 100644 index 00000000000..4de97803ea2 --- /dev/null +++ b/metrics/integration/expression-tests/let/property-function/test.json @@ -0,0 +1,14 @@ +{ + "expression": ["let", "a", ["get", "x"], ["+", 1, ["number", ["var", "a"]]]], + "inputs": [[{}, {"properties": {"x": 5}}]], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "number" + }, + "outputs": [6], + "serialized": ["let", "a", ["get", "x"], ["+", 1, ["number", ["var", "a"]]]] + } +} diff --git a/metrics/integration/expression-tests/let/shadow/test.json b/metrics/integration/expression-tests/let/shadow/test.json new file mode 100644 index 00000000000..07ec409794d --- /dev/null +++ b/metrics/integration/expression-tests/let/shadow/test.json @@ -0,0 +1,24 @@ +{ + "expression": [ + "let", + "a", + ["get", "one"], + ["let", "a", ["get", "two"], ["var", "a"]] + ], + "inputs": [[{}, {"properties": {"one": 1, "two": 2}}]], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "value" + }, + "outputs": [2], + "serialized": [ + "let", + "a", + ["get", "one"], + ["let", "a", ["get", "two"], ["var", "a"]] + ] + } +} diff --git a/metrics/integration/expression-tests/let/unbound/test.json b/metrics/integration/expression-tests/let/unbound/test.json new file mode 100644 index 00000000000..14d430ed3b1 --- /dev/null +++ b/metrics/integration/expression-tests/let/unbound/test.json @@ -0,0 +1,19 @@ +{ + "expression": [ + "let", + "a", + 1, + ["+", ["+", ["var", "a"], ["var", "b"]], ["var", "a"]] + ], + "expected": { + "compiled": { + "result": "error", + "errors": [ + { + "key": "[3][1][2][1]", + "error": "Unknown variable \"b\". Make sure \"b\" has been bound in an enclosing \"let\" expression before using it." + } + ] + } + } +} diff --git a/metrics/integration/expression-tests/let/zoom/test.json b/metrics/integration/expression-tests/let/zoom/test.json new file mode 100644 index 00000000000..7a34f68436d --- /dev/null +++ b/metrics/integration/expression-tests/let/zoom/test.json @@ -0,0 +1,44 @@ +{ + "expression": [ + "let", + "z0_value", + ["number", ["get", "a"]], + "z20_value", + ["number", ["get", "b"]], + [ + "interpolate", + ["linear"], + ["zoom"], + 0, + ["var", "z0_value"], + 20, + ["var", "z20_value"] + ] + ], + "inputs": [[{"zoom": 10}, {"properties": {"a": 10, "b": 30}}]], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": false, + "type": "number" + }, + "outputs": [20], + "serialized": [ + "let", + "z0_value", + ["number", ["get", "a"]], + "z20_value", + ["number", ["get", "b"]], + [ + "interpolate", + ["linear"], + ["zoom"], + 0, + ["var", "z0_value"], + 20, + ["var", "z20_value"] + ] + ] + } +} diff --git a/metrics/integration/expression-tests/literal/boolean-array/test.json b/metrics/integration/expression-tests/literal/boolean-array/test.json new file mode 100644 index 00000000000..f9bedc9d222 --- /dev/null +++ b/metrics/integration/expression-tests/literal/boolean-array/test.json @@ -0,0 +1,14 @@ +{ + "expression": ["literal", [true, false]], + "inputs": [[{}, {}]], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": true, + "isZoomConstant": true, + "type": "array" + }, + "outputs": [[true, false]], + "serialized": ["literal", [true, false]] + } +} diff --git a/metrics/integration/expression-tests/literal/empty/test.json b/metrics/integration/expression-tests/literal/empty/test.json new file mode 100644 index 00000000000..3f7255afa76 --- /dev/null +++ b/metrics/integration/expression-tests/literal/empty/test.json @@ -0,0 +1,15 @@ +{ + "expression": ["literal"], + "inputs": [[{}, {}]], + "expected": { + "compiled": { + "result": "error", + "errors": [ + { + "key": "", + "error": "'literal' expression requires exactly one argument, but found 0 instead." + } + ] + } + } +} diff --git a/metrics/integration/expression-tests/literal/infer-empty-array-type/test.json b/metrics/integration/expression-tests/literal/infer-empty-array-type/test.json new file mode 100644 index 00000000000..8ad21ba861c --- /dev/null +++ b/metrics/integration/expression-tests/literal/infer-empty-array-type/test.json @@ -0,0 +1,20 @@ +{ + "propertySpec": { + "type": "array", + "value": "number", + "property-type": "data-driven", + "expression": {"parameters": ["zoom", "feature"]} + }, + "expression": ["literal", []], + "inputs": [], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": true, + "isZoomConstant": true, + "type": "array" + }, + "outputs": [], + "serialized": ["literal", []] + } +} diff --git a/metrics/integration/expression-tests/literal/mixed-primitive-array/test.json b/metrics/integration/expression-tests/literal/mixed-primitive-array/test.json new file mode 100644 index 00000000000..602763f8478 --- /dev/null +++ b/metrics/integration/expression-tests/literal/mixed-primitive-array/test.json @@ -0,0 +1,14 @@ +{ + "expression": ["literal", [1, "2"]], + "inputs": [[{}, {}]], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": true, + "isZoomConstant": true, + "type": "array" + }, + "outputs": [[1, "2"]], + "serialized": ["literal", [1, "2"]] + } +} diff --git a/metrics/integration/expression-tests/literal/multiple-args/test.json b/metrics/integration/expression-tests/literal/multiple-args/test.json new file mode 100644 index 00000000000..922cd270116 --- /dev/null +++ b/metrics/integration/expression-tests/literal/multiple-args/test.json @@ -0,0 +1,15 @@ +{ + "expression": ["literal", {}, []], + "inputs": [[{}, {}]], + "expected": { + "compiled": { + "result": "error", + "errors": [ + { + "key": "", + "error": "'literal' expression requires exactly one argument, but found 2 instead." + } + ] + } + } +} diff --git a/metrics/integration/expression-tests/literal/nested-array/test.json b/metrics/integration/expression-tests/literal/nested-array/test.json new file mode 100644 index 00000000000..1cdf9fde0e8 --- /dev/null +++ b/metrics/integration/expression-tests/literal/nested-array/test.json @@ -0,0 +1,14 @@ +{ + "expression": ["literal", [1, [3, 4]]], + "inputs": [[{}, {}]], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": true, + "isZoomConstant": true, + "type": "array" + }, + "outputs": [[1, [3, 4]]], + "serialized": ["literal", [1, [3, 4]]] + } +} diff --git a/metrics/integration/expression-tests/literal/number-array/test.json b/metrics/integration/expression-tests/literal/number-array/test.json new file mode 100644 index 00000000000..c68af83e07c --- /dev/null +++ b/metrics/integration/expression-tests/literal/number-array/test.json @@ -0,0 +1,14 @@ +{ + "expression": ["literal", [1, 2]], + "inputs": [[{}, {}]], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": true, + "isZoomConstant": true, + "type": "array" + }, + "outputs": [[1, 2]], + "serialized": ["literal", [1, 2]] + } +} diff --git a/metrics/integration/expression-tests/literal/object/test.json b/metrics/integration/expression-tests/literal/object/test.json new file mode 100644 index 00000000000..d273a91298c --- /dev/null +++ b/metrics/integration/expression-tests/literal/object/test.json @@ -0,0 +1,14 @@ +{ + "expression": ["literal", {"x": 1}], + "inputs": [[{}, {}]], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": true, + "isZoomConstant": true, + "type": "object" + }, + "outputs": [{"x": 1}], + "serialized": ["literal", {"x": 1}] + } +} diff --git a/metrics/integration/expression-tests/literal/string-array/test.json b/metrics/integration/expression-tests/literal/string-array/test.json new file mode 100644 index 00000000000..f6f8845b787 --- /dev/null +++ b/metrics/integration/expression-tests/literal/string-array/test.json @@ -0,0 +1,14 @@ +{ + "expression": ["literal", ["1", "2"]], + "inputs": [[{}, {}]], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": true, + "isZoomConstant": true, + "type": "array" + }, + "outputs": [["1", "2"]], + "serialized": ["literal", ["1", "2"]] + } +} diff --git a/metrics/integration/expression-tests/literal/string/test.json b/metrics/integration/expression-tests/literal/string/test.json new file mode 100644 index 00000000000..510dd85b8f3 --- /dev/null +++ b/metrics/integration/expression-tests/literal/string/test.json @@ -0,0 +1,14 @@ +{ + "expression": "ahoy!", + "inputs": [[{}, {}]], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": true, + "isZoomConstant": true, + "type": "string" + }, + "outputs": ["ahoy!"], + "serialized": "ahoy!" + } +} diff --git a/metrics/integration/expression-tests/literal/u2028u2029/test.json b/metrics/integration/expression-tests/literal/u2028u2029/test.json new file mode 100644 index 00000000000..3818f9ad7a5 --- /dev/null +++ b/metrics/integration/expression-tests/literal/u2028u2029/test.json @@ -0,0 +1,14 @@ +{ + "expression": "ah\u2028\u2029oy!", + "inputs": [[{}, {}]], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": true, + "isZoomConstant": true, + "type": "string" + }, + "outputs": ["ah\u2028\u2029oy!"], + "serialized": "ah\u2028\u2029oy!" + } +} diff --git a/metrics/integration/expression-tests/ln/basic/test.json b/metrics/integration/expression-tests/ln/basic/test.json new file mode 100644 index 00000000000..e96e292e614 --- /dev/null +++ b/metrics/integration/expression-tests/ln/basic/test.json @@ -0,0 +1,14 @@ +{ + "expression": ["ln", ["e"]], + "inputs": [[{}, {}]], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": true, + "isZoomConstant": true, + "type": "number" + }, + "outputs": [1], + "serialized": 1 + } +} diff --git a/metrics/integration/expression-tests/ln2/basic/test.json b/metrics/integration/expression-tests/ln2/basic/test.json new file mode 100644 index 00000000000..655ea41cd38 --- /dev/null +++ b/metrics/integration/expression-tests/ln2/basic/test.json @@ -0,0 +1,14 @@ +{ + "expression": ["ln2"], + "inputs": [[{}, {}]], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": true, + "isZoomConstant": true, + "type": "number" + }, + "outputs": [0.693147], + "serialized": 0.6931471805599453 + } +} diff --git a/metrics/integration/expression-tests/log10/basic/test.json b/metrics/integration/expression-tests/log10/basic/test.json new file mode 100644 index 00000000000..6ed428ed959 --- /dev/null +++ b/metrics/integration/expression-tests/log10/basic/test.json @@ -0,0 +1,14 @@ +{ + "expression": ["log10", 100], + "inputs": [[{}, {}]], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": true, + "isZoomConstant": true, + "type": "number" + }, + "outputs": [2], + "serialized": 2 + } +} diff --git a/metrics/integration/expression-tests/log2/basic/test.json b/metrics/integration/expression-tests/log2/basic/test.json new file mode 100644 index 00000000000..db0af445b49 --- /dev/null +++ b/metrics/integration/expression-tests/log2/basic/test.json @@ -0,0 +1,14 @@ +{ + "expression": ["log2", 1024], + "inputs": [[{}, {}]], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": true, + "isZoomConstant": true, + "type": "number" + }, + "outputs": [10], + "serialized": 10 + } +} diff --git a/metrics/integration/expression-tests/match/arity-0/test.json b/metrics/integration/expression-tests/match/arity-0/test.json new file mode 100644 index 00000000000..2a2822b1663 --- /dev/null +++ b/metrics/integration/expression-tests/match/arity-0/test.json @@ -0,0 +1,11 @@ +{ + "expression": ["match"], + "expected": { + "compiled": { + "result": "error", + "errors": [ + {"key": "", "error": "Expected at least 4 arguments, but found only 0."} + ] + } + } +} diff --git a/metrics/integration/expression-tests/match/arity-1/test.json b/metrics/integration/expression-tests/match/arity-1/test.json new file mode 100644 index 00000000000..5b0ddcc0d40 --- /dev/null +++ b/metrics/integration/expression-tests/match/arity-1/test.json @@ -0,0 +1,11 @@ +{ + "expression": ["match", "x"], + "expected": { + "compiled": { + "result": "error", + "errors": [ + {"key": "", "error": "Expected at least 4 arguments, but found only 1."} + ] + } + } +} diff --git a/metrics/integration/expression-tests/match/arity-2/test.json b/metrics/integration/expression-tests/match/arity-2/test.json new file mode 100644 index 00000000000..07ba0590c54 --- /dev/null +++ b/metrics/integration/expression-tests/match/arity-2/test.json @@ -0,0 +1,12 @@ +{ + "expression": ["match", "x", "y"], + "inputs": [[{}, {}]], + "expected": { + "compiled": { + "result": "error", + "errors": [ + {"key": "", "error": "Expected at least 4 arguments, but found only 2."} + ] + } + } +} diff --git a/metrics/integration/expression-tests/match/arity-3/test.json b/metrics/integration/expression-tests/match/arity-3/test.json new file mode 100644 index 00000000000..4c7fb31ccc0 --- /dev/null +++ b/metrics/integration/expression-tests/match/arity-3/test.json @@ -0,0 +1,12 @@ +{ + "expression": ["match", "x", "y", "z"], + "inputs": [[{}, {}]], + "expected": { + "compiled": { + "result": "error", + "errors": [ + {"key": "", "error": "Expected at least 4 arguments, but found only 3."} + ] + } + } +} diff --git a/metrics/integration/expression-tests/match/basic/test.json b/metrics/integration/expression-tests/match/basic/test.json new file mode 100644 index 00000000000..266eacdb3b2 --- /dev/null +++ b/metrics/integration/expression-tests/match/basic/test.json @@ -0,0 +1,28 @@ +{ + "expression": ["match", ["get", "x"], "a", "Apple", "b", "Banana", "Kumquat"], + "inputs": [ + [{}, {"properties": {"x": "a"}}], + [{}, {"properties": {"x": "b"}}], + [{}, {"properties": {"x": "c"}}], + [{}, {"properties": {"x": 0}}], + [{}, {"properties": {}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "string" + }, + "outputs": ["Apple", "Banana", "Kumquat", "Kumquat", "Kumquat"], + "serialized": [ + "match", + ["get", "x"], + "a", + "Apple", + "b", + "Banana", + "Kumquat" + ] + } +} diff --git a/metrics/integration/expression-tests/match/empty-case/test.json b/metrics/integration/expression-tests/match/empty-case/test.json new file mode 100644 index 00000000000..61c7ba21dc5 --- /dev/null +++ b/metrics/integration/expression-tests/match/empty-case/test.json @@ -0,0 +1,9 @@ +{ + "expression": ["match", ["get", "x"], [], "thing one", "thing two"], + "expected": { + "compiled": { + "result": "error", + "errors": [{"key": "[2]", "error": "Expected at least one branch label."}] + } + } +} diff --git a/metrics/integration/expression-tests/match/infer-array-type/test.json b/metrics/integration/expression-tests/match/infer-array-type/test.json new file mode 100644 index 00000000000..2b1041fd36a --- /dev/null +++ b/metrics/integration/expression-tests/match/infer-array-type/test.json @@ -0,0 +1,36 @@ +{ + "propertySpec": { + "type": "array", + "value": "string", + "property-type": "data-driven", + "expression": {"parameters": ["zoom", "feature"]} + }, + "expression": [ + "match", + ["number", ["get", "x"]], + 0, + ["literal", ["one"]], + 10, + ["literal", ["one", "two"]], + ["literal", ["one", "two", "three"]] + ], + "inputs": [], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "array" + }, + "outputs": [], + "serialized": [ + "match", + ["number", ["get", "x"]], + 0, + ["literal", ["one"]], + 10, + ["literal", ["one", "two"]], + ["literal", ["one", "two", "three"]] + ] + } +} diff --git a/metrics/integration/expression-tests/match/label-array/test.json b/metrics/integration/expression-tests/match/label-array/test.json new file mode 100644 index 00000000000..078d8165730 --- /dev/null +++ b/metrics/integration/expression-tests/match/label-array/test.json @@ -0,0 +1,17 @@ +{ + "expression": [ + "match", + "x", + ["string", ["get", "y"]], + "thing one", + "thing two" + ], + "expected": { + "compiled": { + "result": "error", + "errors": [ + {"key": "[2]", "error": "Branch labels must be numbers or strings."} + ] + } + } +} diff --git a/metrics/integration/expression-tests/match/label-boolean/test.json b/metrics/integration/expression-tests/match/label-boolean/test.json new file mode 100644 index 00000000000..5f5b0837ec5 --- /dev/null +++ b/metrics/integration/expression-tests/match/label-boolean/test.json @@ -0,0 +1,25 @@ +{ + "expression": [ + "match", + ["boolean", ["get", "x"]], + true, + "match", + "otherwise" + ], + "inputs": [ + [{}, {"properties": {"x": true}}], + [{}, {"properties": {"x": false}}], + [{}, {"properties": {"x": "true"}}], + [{}, {"properties": {"x": 1}}], + [{}, {"properties": {"x": null}}], + [{}, {"properties": {}}] + ], + "expected": { + "compiled": { + "result": "error", + "errors": [ + {"key": "[2]", "error": "Branch labels must be numbers or strings."} + ] + } + } +} diff --git a/metrics/integration/expression-tests/match/label-non-integer/test.json b/metrics/integration/expression-tests/match/label-non-integer/test.json new file mode 100644 index 00000000000..f89961f1403 --- /dev/null +++ b/metrics/integration/expression-tests/match/label-non-integer/test.json @@ -0,0 +1,11 @@ +{ + "expression": ["match", 1, 1.5, "thing one", "thing two"], + "expected": { + "compiled": { + "result": "error", + "errors": [ + {"key": "[2]", "error": "Numeric branch labels must be integer values."} + ] + } + } +} diff --git a/metrics/integration/expression-tests/match/label-null/test.json b/metrics/integration/expression-tests/match/label-null/test.json new file mode 100644 index 00000000000..004cb8c756d --- /dev/null +++ b/metrics/integration/expression-tests/match/label-null/test.json @@ -0,0 +1,12 @@ +{ + "expression": ["match", null, null, "match", "otherwise"], + "inputs": [[{}, {"properties": {}}]], + "expected": { + "compiled": { + "result": "error", + "errors": [ + {"key": "[2]", "error": "Branch labels must be numbers or strings."} + ] + } + } +} diff --git a/metrics/integration/expression-tests/match/label-number/test.json b/metrics/integration/expression-tests/match/label-number/test.json new file mode 100644 index 00000000000..2e1bad800e8 --- /dev/null +++ b/metrics/integration/expression-tests/match/label-number/test.json @@ -0,0 +1,30 @@ +{ + "expression": ["match", ["get", "x"], 0, "match", "otherwise"], + "inputs": [ + [{}, {"properties": {"x": 0}}], + [{}, {"properties": {"x": 1}}], + [{}, {"properties": {"x": 0.5}}], + [{}, {"properties": {"x": "0"}}], + [{}, {"properties": {"x": false}}], + [{}, {"properties": {"x": null}}], + [{}, {"properties": {}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "string" + }, + "outputs": [ + "match", + "otherwise", + "otherwise", + "otherwise", + "otherwise", + "otherwise", + "otherwise" + ], + "serialized": ["match", ["get", "x"], 0, "match", "otherwise"] + } +} diff --git a/metrics/integration/expression-tests/match/label-object/test.json b/metrics/integration/expression-tests/match/label-object/test.json new file mode 100644 index 00000000000..692106968f3 --- /dev/null +++ b/metrics/integration/expression-tests/match/label-object/test.json @@ -0,0 +1,11 @@ +{ + "expression": ["match", "x", {}, "thing one", "thing two"], + "expected": { + "compiled": { + "result": "error", + "errors": [ + {"key": "[2]", "error": "Branch labels must be numbers or strings."} + ] + } + } +} diff --git a/metrics/integration/expression-tests/match/label-overflow/test.json b/metrics/integration/expression-tests/match/label-overflow/test.json new file mode 100644 index 00000000000..9eac280f4f0 --- /dev/null +++ b/metrics/integration/expression-tests/match/label-overflow/test.json @@ -0,0 +1,14 @@ +{ + "expression": ["match", 0, 10000000000000000, "thing one", "thing two"], + "expected": { + "compiled": { + "result": "error", + "errors": [ + { + "key": "[2]", + "error": "Branch labels must be integers no larger than 9007199254740991." + } + ] + } + } +} diff --git a/metrics/integration/expression-tests/match/label-string-invalid-identifier/test.json b/metrics/integration/expression-tests/match/label-string-invalid-identifier/test.json new file mode 100644 index 00000000000..f68eb48e3d2 --- /dev/null +++ b/metrics/integration/expression-tests/match/label-string-invalid-identifier/test.json @@ -0,0 +1,32 @@ +{ + "expression": [ + "match", + ["string", ["get", "x"]], + ["0-1", "a.b", "{}", "weird\u2028json\u2029issue"], + "match", + "otherwise" + ], + "inputs": [ + [{}, {"properties": {"x": "0-1"}}], + [{}, {"properties": {"x": "a.b"}}], + [{}, {"properties": {"x": "{}"}}], + [{}, {"properties": {"x": "weird\u2028json\u2029issue"}}], + [{}, {"properties": {"x": "1"}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "string" + }, + "outputs": ["match", "match", "match", "match", "otherwise"], + "serialized": [ + "match", + ["string", ["get", "x"]], + ["0-1", "a.b", "weird\u2028json\u2029issue", "{}"], + "match", + "otherwise" + ] + } +} diff --git a/metrics/integration/expression-tests/match/label-string/test.json b/metrics/integration/expression-tests/match/label-string/test.json new file mode 100644 index 00000000000..01ffbe79914 --- /dev/null +++ b/metrics/integration/expression-tests/match/label-string/test.json @@ -0,0 +1,32 @@ +{ + "expression": ["match", ["string", ["get", "x"]], "0", "match", "otherwise"], + "inputs": [ + [{}, {"properties": {"x": "0"}}], + [{}, {"properties": {"x": "1"}}], + [{}, {"properties": {"x": 0}}], + [{}, {"properties": {"x": false}}], + [{}, {"properties": {"x": null}}], + [{}, {"properties": {}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "string" + }, + "outputs": [ + "match", + "otherwise", + { + "error": "Expected value to be of type string, but found number instead." + }, + { + "error": "Expected value to be of type string, but found boolean instead." + }, + {"error": "Expected value to be of type string, but found null instead."}, + {"error": "Expected value to be of type string, but found null instead."} + ], + "serialized": ["match", ["string", ["get", "x"]], "0", "match", "otherwise"] + } +} diff --git a/metrics/integration/expression-tests/match/mismatch-input/test.json b/metrics/integration/expression-tests/match/mismatch-input/test.json new file mode 100644 index 00000000000..804933ddd96 --- /dev/null +++ b/metrics/integration/expression-tests/match/mismatch-input/test.json @@ -0,0 +1,11 @@ +{ + "expression": ["match", ["string", ["get", "x"]], 0, "match", "otherwise"], + "expected": { + "compiled": { + "result": "error", + "errors": [ + {"key": "[1]", "error": "Expected number but found string instead."} + ] + } + } +} diff --git a/metrics/integration/expression-tests/match/mismatch-label-1/test.json b/metrics/integration/expression-tests/match/mismatch-label-1/test.json new file mode 100644 index 00000000000..46d78cf4024 --- /dev/null +++ b/metrics/integration/expression-tests/match/mismatch-label-1/test.json @@ -0,0 +1,21 @@ +{ + "expression": [ + "match", + ["get", "x"], + "a", + "the letter a", + 0, + "the number 0", + true, + "The Truth", + "otherwise" + ], + "expected": { + "compiled": { + "result": "error", + "errors": [ + {"key": "[4]", "error": "Expected string but found number instead."} + ] + } + } +} diff --git a/metrics/integration/expression-tests/match/mismatch-label-2/test.json b/metrics/integration/expression-tests/match/mismatch-label-2/test.json new file mode 100644 index 00000000000..67cef7ce776 --- /dev/null +++ b/metrics/integration/expression-tests/match/mismatch-label-2/test.json @@ -0,0 +1,11 @@ +{ + "expression": ["match", ["get", "x"], ["0", 0], "zero", "otherwise"], + "expected": { + "compiled": { + "result": "error", + "errors": [ + {"key": "[2]", "error": "Expected string but found number instead."} + ] + } + } +} diff --git a/metrics/integration/expression-tests/match/mismatch-output/test.json b/metrics/integration/expression-tests/match/mismatch-output/test.json new file mode 100644 index 00000000000..2a95152d329 --- /dev/null +++ b/metrics/integration/expression-tests/match/mismatch-output/test.json @@ -0,0 +1,11 @@ +{ + "expression": ["match", ["string", ["get", "x"]], "0", "match", false], + "expected": { + "compiled": { + "result": "error", + "errors": [ + {"key": "[4]", "error": "Expected string but found boolean instead."} + ] + } + } +} diff --git a/metrics/integration/expression-tests/match/mixed-type/test.json b/metrics/integration/expression-tests/match/mixed-type/test.json new file mode 100644 index 00000000000..7c4104f6bbc --- /dev/null +++ b/metrics/integration/expression-tests/match/mixed-type/test.json @@ -0,0 +1,27 @@ +{ + "expression": [ + "match", + ["get", "x"], + "a", + "the letter a", + 0, + "the number 0", + true, + "The Truth", + "otherwise" + ], + "inputs": [ + [{}, {"properties": {"x": "a"}}], + [{}, {"properties": {"x": 0}}], + [{}, {"properties": {"x": "0"}}], + [{}, {"properties": {"x": true}}] + ], + "expected": { + "compiled": { + "result": "error", + "errors": [ + {"key": "[4]", "error": "Expected string but found number instead."} + ] + } + } +} diff --git a/metrics/integration/expression-tests/match/multi-value/test.json b/metrics/integration/expression-tests/match/multi-value/test.json new file mode 100644 index 00000000000..28b430fbeec --- /dev/null +++ b/metrics/integration/expression-tests/match/multi-value/test.json @@ -0,0 +1,42 @@ +{ + "expression": [ + "string", + [ + "match", + ["string", ["get", "x"]], + ["a", "A"], + "Apple", + ["b", "B"], + "Banana", + "Kumquat" + ] + ], + "inputs": [ + [{}, {"properties": {"x": "a"}}], + [{}, {"properties": {"x": "A"}}], + [{}, {"properties": {"x": "b"}}], + [{}, {"properties": {"x": "B"}}], + [{}, {"properties": {"x": "c"}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "string" + }, + "outputs": ["Apple", "Apple", "Banana", "Banana", "Kumquat"], + "serialized": [ + "string", + [ + "match", + ["string", ["get", "x"]], + ["A", "a"], + "Apple", + ["B", "b"], + "Banana", + "Kumquat" + ] + ] + } +} diff --git a/metrics/integration/expression-tests/match/unreachable-branch-1/test.json b/metrics/integration/expression-tests/match/unreachable-branch-1/test.json new file mode 100644 index 00000000000..9fa8868788e --- /dev/null +++ b/metrics/integration/expression-tests/match/unreachable-branch-1/test.json @@ -0,0 +1,17 @@ +{ + "expression": [ + "match", + ["string", ["get", "x"]], + "0", + "match", + "0", + "match", + "otherwise" + ], + "expected": { + "compiled": { + "result": "error", + "errors": [{"key": "[4]", "error": "Branch labels must be unique."}] + } + } +} diff --git a/metrics/integration/expression-tests/match/unreachable-branch-2/test.json b/metrics/integration/expression-tests/match/unreachable-branch-2/test.json new file mode 100644 index 00000000000..34d6ca326ae --- /dev/null +++ b/metrics/integration/expression-tests/match/unreachable-branch-2/test.json @@ -0,0 +1,17 @@ +{ + "expression": [ + "match", + ["string", ["get", "x"]], + ["0", "1"], + "match", + ["0", "2"], + "match", + "otherwise" + ], + "expected": { + "compiled": { + "result": "error", + "errors": [{"key": "[4]", "error": "Branch labels must be unique."}] + } + } +} diff --git a/metrics/integration/expression-tests/max/arity-0/test.json b/metrics/integration/expression-tests/max/arity-0/test.json new file mode 100644 index 00000000000..04528b6ae8d --- /dev/null +++ b/metrics/integration/expression-tests/max/arity-0/test.json @@ -0,0 +1,14 @@ +{ + "expression": ["all", ["<", ["max"], 0], ["==", 0, ["/", 1, ["max"]]]], + "inputs": [[{}, {}]], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": true, + "isZoomConstant": true, + "type": "boolean" + }, + "outputs": [true], + "serialized": true + } +} diff --git a/metrics/integration/expression-tests/max/arity-1/test.json b/metrics/integration/expression-tests/max/arity-1/test.json new file mode 100644 index 00000000000..dcbb50880ca --- /dev/null +++ b/metrics/integration/expression-tests/max/arity-1/test.json @@ -0,0 +1,14 @@ +{ + "expression": ["max", 1], + "inputs": [[{}, {}]], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": true, + "isZoomConstant": true, + "type": "number" + }, + "outputs": [1], + "serialized": 1 + } +} diff --git a/metrics/integration/expression-tests/max/basic/test.json b/metrics/integration/expression-tests/max/basic/test.json new file mode 100644 index 00000000000..0e16cfd8b36 --- /dev/null +++ b/metrics/integration/expression-tests/max/basic/test.json @@ -0,0 +1,14 @@ +{ + "expression": ["max", 0, -1, 100], + "inputs": [[{}, {}]], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": true, + "isZoomConstant": true, + "type": "number" + }, + "outputs": [100], + "serialized": 100 + } +} diff --git a/metrics/integration/expression-tests/min/arity-0/test.json b/metrics/integration/expression-tests/min/arity-0/test.json new file mode 100644 index 00000000000..713715d5587 --- /dev/null +++ b/metrics/integration/expression-tests/min/arity-0/test.json @@ -0,0 +1,14 @@ +{ + "expression": ["all", [">", ["min"], 0], ["==", 0, ["/", 1, ["min"]]]], + "inputs": [[{}, {}]], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": true, + "isZoomConstant": true, + "type": "boolean" + }, + "outputs": [true], + "serialized": true + } +} diff --git a/metrics/integration/expression-tests/min/arity-1/test.json b/metrics/integration/expression-tests/min/arity-1/test.json new file mode 100644 index 00000000000..f7d663ba700 --- /dev/null +++ b/metrics/integration/expression-tests/min/arity-1/test.json @@ -0,0 +1,14 @@ +{ + "expression": ["min", 1], + "inputs": [[{}, {}]], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": true, + "isZoomConstant": true, + "type": "number" + }, + "outputs": [1], + "serialized": 1 + } +} diff --git a/metrics/integration/expression-tests/min/basic/test.json b/metrics/integration/expression-tests/min/basic/test.json new file mode 100644 index 00000000000..cf8162f6f48 --- /dev/null +++ b/metrics/integration/expression-tests/min/basic/test.json @@ -0,0 +1,14 @@ +{ + "expression": ["min", 0, -1, 10], + "inputs": [[{}, {}]], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": true, + "isZoomConstant": true, + "type": "number" + }, + "outputs": [-1], + "serialized": -1 + } +} diff --git a/metrics/integration/expression-tests/minus/arity-0/test.json b/metrics/integration/expression-tests/minus/arity-0/test.json new file mode 100644 index 00000000000..cc5a6d94dcb --- /dev/null +++ b/metrics/integration/expression-tests/minus/arity-0/test.json @@ -0,0 +1,15 @@ +{ + "expression": ["-"], + "inputs": [[{}, {}]], + "expected": { + "compiled": { + "result": "error", + "errors": [ + { + "key": "", + "error": "Expected arguments of type (number, number) | (number), but found () instead." + } + ] + } + } +} diff --git a/metrics/integration/expression-tests/minus/arity-1/test.json b/metrics/integration/expression-tests/minus/arity-1/test.json new file mode 100644 index 00000000000..55a3993fa7b --- /dev/null +++ b/metrics/integration/expression-tests/minus/arity-1/test.json @@ -0,0 +1,14 @@ +{ + "expression": ["-", 5], + "inputs": [[{}, {}]], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": true, + "isZoomConstant": true, + "type": "number" + }, + "outputs": [-5], + "serialized": -5 + } +} diff --git a/metrics/integration/expression-tests/minus/basic/test.json b/metrics/integration/expression-tests/minus/basic/test.json new file mode 100644 index 00000000000..415192cc8fc --- /dev/null +++ b/metrics/integration/expression-tests/minus/basic/test.json @@ -0,0 +1,14 @@ +{ + "expression": ["-", 5, 7], + "inputs": [[{}, {}]], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": true, + "isZoomConstant": true, + "type": "number" + }, + "outputs": [-2], + "serialized": -2 + } +} diff --git a/metrics/integration/expression-tests/minus/inference-arity-2/test.json b/metrics/integration/expression-tests/minus/inference-arity-2/test.json new file mode 100644 index 00000000000..542027e417e --- /dev/null +++ b/metrics/integration/expression-tests/minus/inference-arity-2/test.json @@ -0,0 +1,14 @@ +{ + "expression": ["-", ["get", "x"], 7], + "inputs": [[{}, {"properties": {"x": 0}}]], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "number" + }, + "outputs": [-7], + "serialized": ["-", ["number", ["get", "x"]], 7] + } +} diff --git a/metrics/integration/expression-tests/mod/basic/test.json b/metrics/integration/expression-tests/mod/basic/test.json new file mode 100644 index 00000000000..391e61ba148 --- /dev/null +++ b/metrics/integration/expression-tests/mod/basic/test.json @@ -0,0 +1,14 @@ +{ + "expression": ["%", 18, 12], + "inputs": [[{}, {}]], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": true, + "isZoomConstant": true, + "type": "number" + }, + "outputs": [6], + "serialized": 6 + } +} diff --git a/metrics/integration/expression-tests/not/basic/test.json b/metrics/integration/expression-tests/not/basic/test.json new file mode 100644 index 00000000000..22ab93d4e18 --- /dev/null +++ b/metrics/integration/expression-tests/not/basic/test.json @@ -0,0 +1,17 @@ +{ + "expression": ["!", ["boolean", ["get", "x"]]], + "inputs": [ + [{}, {"properties": {"x": true}}], + [{}, {"properties": {"x": false}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "boolean" + }, + "outputs": [false, true], + "serialized": ["!", ["boolean", ["get", "x"]]] + } +} diff --git a/metrics/integration/expression-tests/not_equal/mismatch/test.json b/metrics/integration/expression-tests/not_equal/mismatch/test.json new file mode 100644 index 00000000000..8a455e01bee --- /dev/null +++ b/metrics/integration/expression-tests/not_equal/mismatch/test.json @@ -0,0 +1,11 @@ +{ + "expression": ["!=", ["string", ["get", "x"]], ["number", ["get", "y"]]], + "expected": { + "compiled": { + "result": "error", + "errors": [ + {"key": "", "error": "Cannot compare types 'string' and 'number'."} + ] + } + } +} diff --git a/metrics/integration/expression-tests/not_equal/number/test.json b/metrics/integration/expression-tests/not_equal/number/test.json new file mode 100644 index 00000000000..4d8b1030d14 --- /dev/null +++ b/metrics/integration/expression-tests/not_equal/number/test.json @@ -0,0 +1,18 @@ +{ + "expression": ["!=", ["number", ["get", "x"]], ["get", "y"]], + "inputs": [ + [{}, {"properties": {"x": 1, "y": 1}}], + [{}, {"properties": {"x": 1, "y": "1"}}], + [{}, {"properties": {"x": 1, "y": 2}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "boolean" + }, + "outputs": [false, true, true], + "serialized": ["!=", ["number", ["get", "x"]], ["get", "y"]] + } +} diff --git a/metrics/integration/expression-tests/not_equal/string/test.json b/metrics/integration/expression-tests/not_equal/string/test.json new file mode 100644 index 00000000000..a76faf12ff5 --- /dev/null +++ b/metrics/integration/expression-tests/not_equal/string/test.json @@ -0,0 +1,18 @@ +{ + "expression": ["!=", ["string", ["get", "x"]], ["get", "y"]], + "inputs": [ + [{}, {"properties": {"x": "1", "y": "1"}}], + [{}, {"properties": {"x": "1", "y": 1}}], + [{}, {"properties": {"x": "1", "y": "2"}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "boolean" + }, + "outputs": [false, true, true], + "serialized": ["!=", ["string", ["get", "x"]], ["get", "y"]] + } +} diff --git a/metrics/integration/expression-tests/not_equal/value/test.json b/metrics/integration/expression-tests/not_equal/value/test.json new file mode 100644 index 00000000000..62951ff58d8 --- /dev/null +++ b/metrics/integration/expression-tests/not_equal/value/test.json @@ -0,0 +1,21 @@ +{ + "expression": ["!=", ["get", "x"], ["get", "y"]], + "inputs": [ + [{}, {"properties": {"x": 0, "y": 0}}], + [{}, {"properties": {"x": "0", "y": "0"}}], + [{}, {"properties": {"x": 0, "y": false}}], + [{}, {"properties": {"x": 0, "y": "0"}}], + [{}, {"properties": {"x": 0, "y": null}}], + [{}, {"properties": {"x": "0", "y": null}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "boolean" + }, + "outputs": [false, false, true, true, true, true], + "serialized": ["!=", ["get", "x"], ["get", "y"]] + } +} diff --git a/metrics/integration/expression-tests/number-format/currency/test.json b/metrics/integration/expression-tests/number-format/currency/test.json new file mode 100644 index 00000000000..a25b057baad --- /dev/null +++ b/metrics/integration/expression-tests/number-format/currency/test.json @@ -0,0 +1,31 @@ +{ + "expression": [ + "number-format", + 123456.789, + { + "locale": ["get", "locale"], + "currency": ["get", "currency"] + } + ], + "inputs": [ + [{}, {"properties": {"locale": "en-US", "currency": "JPY"}}], + [{}, {"properties": {"locale": "en-US", "currency": "EUR"}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "string" + }, + "outputs": ["¥123,457", "€123,456.79"], + "serialized": [ + "number-format", + 123456.789, + { + "locale": ["string", ["get", "locale"]], + "currency": ["string", ["get", "currency"]] + } + ] + } +} diff --git a/metrics/integration/expression-tests/number-format/default/test.json b/metrics/integration/expression-tests/number-format/default/test.json new file mode 100644 index 00000000000..78f2e77862a --- /dev/null +++ b/metrics/integration/expression-tests/number-format/default/test.json @@ -0,0 +1,21 @@ + +{ + "expression": [ + "number-format", + 123456.789, + {} + ], + "inputs": [ + [{}, {}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": true, + "isZoomConstant": true, + "type": "string" + }, + "outputs": ["123,456.789"], + "serialized": "123,456.789" + } +} diff --git a/metrics/integration/expression-tests/number-format/precision/test.json b/metrics/integration/expression-tests/number-format/precision/test.json new file mode 100644 index 00000000000..c4266201f22 --- /dev/null +++ b/metrics/integration/expression-tests/number-format/precision/test.json @@ -0,0 +1,33 @@ +{ + "expression": [ + "number-format", + 987654321.234567, + { + "locale": ["get", "locale"], + "min-fraction-digits": ["get", "min"], + "max-fraction-digits": ["get", "max"] + } + ], + "inputs": [ + [{}, {"properties": {"locale": "en-US", "min": 15, "max": 20}}], + [{}, {"properties": {"locale": "en-US", "min": 2, "max": 4}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "string" + }, + "outputs": ["987,654,321.234567000000000", "987,654,321.2346"], + "serialized": [ + "number-format", + 987654321.234567, + { + "locale": ["string", ["get", "locale"]], + "min-fraction-digits": ["number", ["get", "min"]], + "max-fraction-digits": ["number", ["get", "max"]] + } + ] + } +} diff --git a/metrics/integration/expression-tests/number/basic/test.json b/metrics/integration/expression-tests/number/basic/test.json new file mode 100644 index 00000000000..a428ac19291 --- /dev/null +++ b/metrics/integration/expression-tests/number/basic/test.json @@ -0,0 +1,28 @@ +{ + "expression": ["number", ["get", "x"]], + "inputs": [ + [{}, {"properties": {"x": 1}}], + [{}, {"properties": {"x": "1"}}], + [{}, {"properties": {"x": false}}], + [{}, {"properties": {"x": null}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "number" + }, + "outputs": [ + 1, + { + "error": "Expected value to be of type number, but found string instead." + }, + { + "error": "Expected value to be of type number, but found boolean instead." + }, + {"error": "Expected value to be of type number, but found null instead."} + ], + "serialized": ["number", ["get", "x"]] + } +} diff --git a/metrics/integration/expression-tests/number/default-value/test.json b/metrics/integration/expression-tests/number/default-value/test.json new file mode 100644 index 00000000000..7f082ba09cb --- /dev/null +++ b/metrics/integration/expression-tests/number/default-value/test.json @@ -0,0 +1,19 @@ +{ + "expression": ["number", ["get", "x"], -1], + "inputs": [ + [{}, {"properties": {"x": 1}}], + [{}, {"properties": {"x": "1"}}], + [{}, {"properties": {"x": false}}], + [{}, {"properties": {"x": null}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "number" + }, + "outputs": [1, -1, -1, -1], + "serialized": ["number", ["get", "x"], -1] + } +} diff --git a/metrics/integration/expression-tests/object/basic/test.json b/metrics/integration/expression-tests/object/basic/test.json new file mode 100644 index 00000000000..dc0dad4e736 --- /dev/null +++ b/metrics/integration/expression-tests/object/basic/test.json @@ -0,0 +1,32 @@ +{ + "expression": ["object", ["get", "x"]], + "inputs": [ + [{}, {"properties": {"x": {"inner": "object"}}}], + [{}, {"properties": {"x": 1}}], + [{}, {"properties": {"x": "1"}}], + [{}, {"properties": {"x": false}}], + [{}, {"properties": {"x": null}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "object" + }, + "outputs": [ + {"inner": "object"}, + { + "error": "Expected value to be of type object, but found number instead." + }, + { + "error": "Expected value to be of type object, but found string instead." + }, + { + "error": "Expected value to be of type object, but found boolean instead." + }, + {"error": "Expected value to be of type object, but found null instead."} + ], + "serialized": ["object", ["get", "x"]] + } +} diff --git a/metrics/integration/expression-tests/object/default-value/test.json b/metrics/integration/expression-tests/object/default-value/test.json new file mode 100644 index 00000000000..384620c0af0 --- /dev/null +++ b/metrics/integration/expression-tests/object/default-value/test.json @@ -0,0 +1,26 @@ +{ + "expression": ["object", ["get", "x"], ["literal", {"default": "value"}]], + "inputs": [ + [{}, {"properties": {"x": {"inner": "object"}}}], + [{}, {"properties": {"x": 1}}], + [{}, {"properties": {"x": "1"}}], + [{}, {"properties": {"x": false}}], + [{}, {"properties": {"x": null}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "object" + }, + "outputs": [ + {"inner": "object"}, + {"default": "value"}, + {"default": "value"}, + {"default": "value"}, + {"default": "value"} + ], + "serialized": ["object", ["get", "x"], ["literal", {"default": "value"}]] + } +} diff --git a/metrics/integration/expression-tests/object/implicit/test.json b/metrics/integration/expression-tests/object/implicit/test.json new file mode 100644 index 00000000000..70dc100d293 --- /dev/null +++ b/metrics/integration/expression-tests/object/implicit/test.json @@ -0,0 +1,22 @@ +{ + "expression": ["get", "b", ["get", "a"]], + "inputs": [ + [{}, {"properties": {"a": {"b": 0}}}], + [{}, {"properties": {"a": "not"}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "value" + }, + "outputs": [ + 0, + { + "error": "Expected value to be of type object, but found string instead." + } + ], + "serialized": ["get", "b", ["object", ["get", "a"]]] + } +} diff --git a/metrics/integration/expression-tests/parse/empty/test.json b/metrics/integration/expression-tests/parse/empty/test.json new file mode 100644 index 00000000000..737b33dc3c2 --- /dev/null +++ b/metrics/integration/expression-tests/parse/empty/test.json @@ -0,0 +1,14 @@ +{ + "expression": [], + "expected": { + "compiled": { + "result": "error", + "errors": [ + { + "key": "", + "error": "Expected an array with at least one element. If you wanted a literal array, use [\"literal\", []]." + } + ] + } + } +} diff --git a/metrics/integration/expression-tests/parse/non-array/test.json b/metrics/integration/expression-tests/parse/non-array/test.json new file mode 100644 index 00000000000..ce9ad331281 --- /dev/null +++ b/metrics/integration/expression-tests/parse/non-array/test.json @@ -0,0 +1,14 @@ +{ + "expression": ["+", ["-", 0, {}], 10], + "expected": { + "compiled": { + "result": "error", + "errors": [ + { + "key": "[1][2]", + "error": "Bare objects invalid. Use [\"literal\", {...}] instead." + } + ] + } + } +} diff --git a/metrics/integration/expression-tests/parse/non-string/test.json b/metrics/integration/expression-tests/parse/non-string/test.json new file mode 100644 index 00000000000..def3386e06e --- /dev/null +++ b/metrics/integration/expression-tests/parse/non-string/test.json @@ -0,0 +1,14 @@ +{ + "expression": [1, 2], + "expected": { + "compiled": { + "result": "error", + "errors": [ + { + "key": "[0]", + "error": "Expression name must be a string, but found number instead. If you wanted a literal array, use [\"literal\", [...]]." + } + ] + } + } +} diff --git a/metrics/integration/expression-tests/parse/unknown-expression/test.json b/metrics/integration/expression-tests/parse/unknown-expression/test.json new file mode 100644 index 00000000000..d4ba1782a4b --- /dev/null +++ b/metrics/integration/expression-tests/parse/unknown-expression/test.json @@ -0,0 +1,14 @@ +{ + "expression": ["+", ["*", 1, 2, 3, ["FAKE-EXPRESSION", 1]], 10], + "expected": { + "compiled": { + "result": "error", + "errors": [ + { + "key": "[1][4][0]", + "error": "Unknown expression \"FAKE-EXPRESSION\". If you wanted a literal array, use [\"literal\", [...]]." + } + ] + } + } +} diff --git a/metrics/integration/expression-tests/pi/basic/test.json b/metrics/integration/expression-tests/pi/basic/test.json new file mode 100644 index 00000000000..8f17841fc26 --- /dev/null +++ b/metrics/integration/expression-tests/pi/basic/test.json @@ -0,0 +1,14 @@ +{ + "expression": ["pi"], + "inputs": [[{}, {}]], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": true, + "isZoomConstant": true, + "type": "number" + }, + "outputs": [3.14159], + "serialized": 3.141592653589793 + } +} diff --git a/metrics/integration/expression-tests/plus/arity-0/test.json b/metrics/integration/expression-tests/plus/arity-0/test.json new file mode 100644 index 00000000000..4a92b220c14 --- /dev/null +++ b/metrics/integration/expression-tests/plus/arity-0/test.json @@ -0,0 +1,14 @@ +{ + "expression": ["+"], + "inputs": [[{}, {}]], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": true, + "isZoomConstant": true, + "type": "number" + }, + "outputs": [0], + "serialized": 0 + } +} diff --git a/metrics/integration/expression-tests/plus/arity-1/test.json b/metrics/integration/expression-tests/plus/arity-1/test.json new file mode 100644 index 00000000000..cb7154d7f2d --- /dev/null +++ b/metrics/integration/expression-tests/plus/arity-1/test.json @@ -0,0 +1,14 @@ +{ + "expression": ["+", 1], + "inputs": [[{}, {}]], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": true, + "isZoomConstant": true, + "type": "number" + }, + "outputs": [1], + "serialized": 1 + } +} diff --git a/metrics/integration/expression-tests/plus/basic/test.json b/metrics/integration/expression-tests/plus/basic/test.json new file mode 100644 index 00000000000..3ecdf42fc79 --- /dev/null +++ b/metrics/integration/expression-tests/plus/basic/test.json @@ -0,0 +1,14 @@ +{ + "expression": ["+", 1, 2, 3, 4], + "inputs": [[{}, {}]], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": true, + "isZoomConstant": true, + "type": "number" + }, + "outputs": [10], + "serialized": 10 + } +} diff --git a/metrics/integration/expression-tests/pow/basic/test.json b/metrics/integration/expression-tests/pow/basic/test.json new file mode 100644 index 00000000000..299f4cedc8b --- /dev/null +++ b/metrics/integration/expression-tests/pow/basic/test.json @@ -0,0 +1,14 @@ +{ + "expression": ["^", 4, ["number", ["get", "x"]]], + "inputs": [[{}, {"properties": {"x": 2}}], [{}, {"properties": {"x": 0.5}}]], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "number" + }, + "outputs": [16, 2], + "serialized": ["^", 4, ["number", ["get", "x"]]] + } +} diff --git a/metrics/integration/expression-tests/properties/basic/test.json b/metrics/integration/expression-tests/properties/basic/test.json new file mode 100644 index 00000000000..ddbcdd83158 --- /dev/null +++ b/metrics/integration/expression-tests/properties/basic/test.json @@ -0,0 +1,14 @@ +{ + "expression": ["properties"], + "inputs": [[{}, {"properties": {"x": 5}}]], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "object" + }, + "outputs": [{"x": 5}], + "serialized": ["properties"] + } +} diff --git a/metrics/integration/expression-tests/resolved-locale/basic/test.json b/metrics/integration/expression-tests/resolved-locale/basic/test.json new file mode 100644 index 00000000000..012a1520c52 --- /dev/null +++ b/metrics/integration/expression-tests/resolved-locale/basic/test.json @@ -0,0 +1,34 @@ +{ + "expression": [ + "==", + [ + "resolved-locale", + [ + "collator", + {"case-sensitive": true, "diacritic-sensitive": true, "locale": "en"} + ] + ], + "en" + ], + "inputs": [[{}, {}]], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": true, + "isZoomConstant": true, + "type": "boolean" + }, + "outputs": [true], + "serialized": [ + "==", + [ + "resolved-locale", + [ + "collator", + {"case-sensitive": true, "diacritic-sensitive": true, "locale": "en"} + ] + ], + "en" + ] + } +} diff --git a/metrics/integration/expression-tests/result_item.html.tmpl b/metrics/integration/expression-tests/result_item.html.tmpl new file mode 100644 index 00000000000..c975529605f --- /dev/null +++ b/metrics/integration/expression-tests/result_item.html.tmpl @@ -0,0 +1,16 @@ +
+

<%- r.status %> <%- r.id %>

+
<%- r.expression %>
+ + <% if (r.error) { %>

Error: <%- r.error.message %>

<% } %> + + <% if (r.difference) { %> + Difference: +
<%- r.difference %>
+ <% } %> + + <% if (r.serialized) { %> + Serialized: +
<%- r.serialized %>
+ <% } %> +
diff --git a/metrics/integration/expression-tests/rgb/basic/test.json b/metrics/integration/expression-tests/rgb/basic/test.json new file mode 100644 index 00000000000..ebd432dec97 --- /dev/null +++ b/metrics/integration/expression-tests/rgb/basic/test.json @@ -0,0 +1,14 @@ +{ + "expression": ["rgb", 0, 0, 255], + "inputs": [[{}, {}]], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": true, + "isZoomConstant": true, + "type": "color" + }, + "outputs": [[0, 0, 1, 1]], + "serialized": ["rgba", 0, 0, 255, 1] + } +} diff --git a/metrics/integration/expression-tests/rgba/basic/test.json b/metrics/integration/expression-tests/rgba/basic/test.json new file mode 100644 index 00000000000..9bbed51ee33 --- /dev/null +++ b/metrics/integration/expression-tests/rgba/basic/test.json @@ -0,0 +1,14 @@ +{ + "expression": ["rgba", 0, 0, 255, 1], + "inputs": [[{}, {}]], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": true, + "isZoomConstant": true, + "type": "color" + }, + "outputs": [[0, 0, 1, 1]], + "serialized": ["rgba", 0, 0, 255, 1] + } +} diff --git a/metrics/integration/expression-tests/rgba/out-of-bounds/test.json b/metrics/integration/expression-tests/rgba/out-of-bounds/test.json new file mode 100644 index 00000000000..7d9f8242100 --- /dev/null +++ b/metrics/integration/expression-tests/rgba/out-of-bounds/test.json @@ -0,0 +1,44 @@ +{ + "expression": [ + "rgba", + 0, + 0, + ["number", ["get", "b"]], + ["number", ["get", "a"]] + ], + "inputs": [ + [{}, {"properties": {"b": -1, "a": 1}}], + [{}, {"properties": {"b": 256, "a": 1}}], + [{}, {"properties": {"b": 255, "a": -0.5}}], + [{}, {"properties": {"b": 256, "a": 1.5}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "color" + }, + "outputs": [ + { + "error": "Invalid rgba value [0, 0, -1, 1]: 'r', 'g', and 'b' must be between 0 and 255." + }, + { + "error": "Invalid rgba value [0, 0, 256, 1]: 'r', 'g', and 'b' must be between 0 and 255." + }, + { + "error": "Invalid rgba value [0, 0, 255, -0.5]: 'a' must be between 0 and 1." + }, + { + "error": "Invalid rgba value [0, 0, 256, 1.5]: 'r', 'g', and 'b' must be between 0 and 255." + } + ], + "serialized": [ + "rgba", + 0, + 0, + ["number", ["get", "b"]], + ["number", ["get", "a"]] + ] + } +} diff --git a/metrics/integration/expression-tests/round/basic/test.json b/metrics/integration/expression-tests/round/basic/test.json new file mode 100644 index 00000000000..5c6f4a6f45b --- /dev/null +++ b/metrics/integration/expression-tests/round/basic/test.json @@ -0,0 +1,23 @@ +{ + "expression": ["round", ["get", "x"]], + "inputs": [ + [{}, {"properties": {"x": -2.6}}], + [{}, {"properties": {"x": -2.5}}], + [{}, {"properties": {"x": -2.4}}], + [{}, {"properties": {"x": -2}}], + [{}, {"properties": {"x": 2.6}}], + [{}, {"properties": {"x": 2.5}}], + [{}, {"properties": {"x": 2.4}}], + [{}, {"properties": {"x": 2}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "number" + }, + "outputs": [-3, -3, -2, -2, 3, 3, 2, 2], + "serialized": ["round", ["number", ["get", "x"]]] + } +} diff --git a/metrics/integration/expression-tests/sin/basic/test.json b/metrics/integration/expression-tests/sin/basic/test.json new file mode 100644 index 00000000000..ec3880135a8 --- /dev/null +++ b/metrics/integration/expression-tests/sin/basic/test.json @@ -0,0 +1,14 @@ +{ + "expression": ["sin", 0], + "inputs": [[{}, {}]], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": true, + "isZoomConstant": true, + "type": "number" + }, + "outputs": [0], + "serialized": 0 + } +} diff --git a/metrics/integration/expression-tests/sqrt/basic/test.json b/metrics/integration/expression-tests/sqrt/basic/test.json new file mode 100644 index 00000000000..38077afbcaf --- /dev/null +++ b/metrics/integration/expression-tests/sqrt/basic/test.json @@ -0,0 +1,14 @@ +{ + "expression": ["sqrt", ["get", "x"]], + "inputs": [[{}, {"properties": {"x": 4}}], [{}, {"properties": {"x": 0.25}}]], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "number" + }, + "outputs": [2, 0.5], + "serialized": ["sqrt", ["number", ["get", "x"]]] + } +} diff --git a/metrics/integration/expression-tests/step/basic/test.json b/metrics/integration/expression-tests/step/basic/test.json new file mode 100644 index 00000000000..723ae2e8912 --- /dev/null +++ b/metrics/integration/expression-tests/step/basic/test.json @@ -0,0 +1,27 @@ +{ + "expression": [ + "number", + ["step", ["number", ["get", "x"]], 11, 0, 111, 1, 1111] + ], + "inputs": [ + [{}, {"properties": {"x": -1.5}}], + [{}, {"properties": {"x": -0.5}}], + [{}, {"properties": {"x": 0}}], + [{}, {"properties": {"x": 0.5}}], + [{}, {"properties": {"x": 1}}], + [{}, {"properties": {"x": 1.5}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "number" + }, + "outputs": [11, 11, 111, 111, 1111, 1111], + "serialized": [ + "number", + ["step", ["number", ["get", "x"]], 11, 0, 111, 1, 1111] + ] + } +} diff --git a/metrics/integration/expression-tests/step/duplicate_stops/test.json b/metrics/integration/expression-tests/step/duplicate_stops/test.json new file mode 100644 index 00000000000..de52123697e --- /dev/null +++ b/metrics/integration/expression-tests/step/duplicate_stops/test.json @@ -0,0 +1,15 @@ +{ + "expression": ["step", 0, "a", 0, "b", 0, "c"], + "inputs": [[{}, {}]], + "expected": { + "compiled": { + "result": "error", + "errors": [ + { + "key": "[5]", + "error": "Input/output pairs for \"step\" expressions must be arranged with input values in strictly ascending order." + } + ] + } + } +} diff --git a/metrics/integration/expression-tests/string/basic/test.json b/metrics/integration/expression-tests/string/basic/test.json new file mode 100644 index 00000000000..d40c2593ce3 --- /dev/null +++ b/metrics/integration/expression-tests/string/basic/test.json @@ -0,0 +1,28 @@ +{ + "expression": ["string", ["get", "x"]], + "inputs": [ + [{}, {"properties": {"x": "1"}}], + [{}, {"properties": {"x": 1}}], + [{}, {"properties": {"x": false}}], + [{}, {"properties": {"x": null}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "string" + }, + "outputs": [ + "1", + { + "error": "Expected value to be of type string, but found number instead." + }, + { + "error": "Expected value to be of type string, but found boolean instead." + }, + {"error": "Expected value to be of type string, but found null instead."} + ], + "serialized": ["string", ["get", "x"]] + } +} diff --git a/metrics/integration/expression-tests/string/default-value/test.json b/metrics/integration/expression-tests/string/default-value/test.json new file mode 100644 index 00000000000..0f6cc8b0fce --- /dev/null +++ b/metrics/integration/expression-tests/string/default-value/test.json @@ -0,0 +1,19 @@ +{ + "expression": ["string", ["get", "x"], "default"], + "inputs": [ + [{}, {"properties": {"x": "1"}}], + [{}, {"properties": {"x": 1}}], + [{}, {"properties": {"x": false}}], + [{}, {"properties": {"x": null}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "string" + }, + "outputs": ["1", "default", "default", "default"], + "serialized": ["string", ["get", "x"], "default"] + } +} diff --git a/metrics/integration/expression-tests/tan/basic/test.json b/metrics/integration/expression-tests/tan/basic/test.json new file mode 100644 index 00000000000..9016d430c46 --- /dev/null +++ b/metrics/integration/expression-tests/tan/basic/test.json @@ -0,0 +1,14 @@ +{ + "expression": ["tan", 0.7853981633974483], + "inputs": [[{}, {}]], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": true, + "isZoomConstant": true, + "type": "number" + }, + "outputs": [0.999999], + "serialized": 0.9999999999999999 + } +} diff --git a/metrics/integration/expression-tests/times/arity-0/test.json b/metrics/integration/expression-tests/times/arity-0/test.json new file mode 100644 index 00000000000..0cd892d635b --- /dev/null +++ b/metrics/integration/expression-tests/times/arity-0/test.json @@ -0,0 +1,14 @@ +{ + "expression": ["*"], + "inputs": [[{}, {}]], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": true, + "isZoomConstant": true, + "type": "number" + }, + "outputs": [1], + "serialized": 1 + } +} diff --git a/metrics/integration/expression-tests/times/arity-1/test.json b/metrics/integration/expression-tests/times/arity-1/test.json new file mode 100644 index 00000000000..021b933ccfd --- /dev/null +++ b/metrics/integration/expression-tests/times/arity-1/test.json @@ -0,0 +1,14 @@ +{ + "expression": ["*", 0], + "inputs": [[{}, {}]], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": true, + "isZoomConstant": true, + "type": "number" + }, + "outputs": [0], + "serialized": 0 + } +} diff --git a/metrics/integration/expression-tests/times/basic/test.json b/metrics/integration/expression-tests/times/basic/test.json new file mode 100644 index 00000000000..09c7e54ff1d --- /dev/null +++ b/metrics/integration/expression-tests/times/basic/test.json @@ -0,0 +1,14 @@ +{ + "expression": ["*", 3, 2, 0.5, 2], + "inputs": [[{}, {}]], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": true, + "isZoomConstant": true, + "type": "number" + }, + "outputs": [6], + "serialized": 6 + } +} diff --git a/metrics/integration/expression-tests/to-boolean/2-ary/test.json b/metrics/integration/expression-tests/to-boolean/2-ary/test.json new file mode 100644 index 00000000000..94de6a23d81 --- /dev/null +++ b/metrics/integration/expression-tests/to-boolean/2-ary/test.json @@ -0,0 +1,10 @@ +{ + "expression": ["to-boolean", ["get", "x"], ["get", "y"]], + "inputs": [[{}, {}]], + "expected": { + "compiled": { + "result": "error", + "errors": [{"key": "", "error": "Expected one argument."}] + } + } +} diff --git a/metrics/integration/expression-tests/to-boolean/basic/test.json b/metrics/integration/expression-tests/to-boolean/basic/test.json new file mode 100644 index 00000000000..4cf336e57ea --- /dev/null +++ b/metrics/integration/expression-tests/to-boolean/basic/test.json @@ -0,0 +1,23 @@ +{ + "expression": ["to-boolean", ["get", "x"]], + "inputs": [ + [{}, {}], + [{}, {"properties": {"x": true}}], + [{}, {"properties": {"x": false}}], + [{}, {"properties": {"x": ""}}], + [{}, {"properties": {"x": "false"}}], + [{}, {"properties": {"x": 0}}], + [{}, {"properties": {"x": 1}}], + [{}, {"properties": {"x": null}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "boolean" + }, + "outputs": [false, true, false, false, true, false, true, false], + "serialized": ["to-boolean", ["get", "x"]] + } +} diff --git a/metrics/integration/expression-tests/to-color/2-ary/test.json b/metrics/integration/expression-tests/to-color/2-ary/test.json new file mode 100644 index 00000000000..ec301ce781f --- /dev/null +++ b/metrics/integration/expression-tests/to-color/2-ary/test.json @@ -0,0 +1,30 @@ +{ + "expression": ["to-color", ["get", "x"], ["get", "y"]], + "inputs": [ + [{}, {"properties": {"x": "red", "y": "#000000"}}], + [{}, {"properties": {"x": "invalid", "y": "#000000"}}], + [{}, {"properties": {"x": "rgba(0, 255, 0, 1)", "y": "#000000"}}], + [{}, {"properties": {"x": [0, 255, 0, 1], "y": "#000000"}}], + [{}, {"properties": {"x": [0, 255, 0], "y": "#000000"}}], + [{}, {"properties": {"x": [0, 255], "y": "#000000"}}], + [{}, {"properties": {"x": [0, 255], "y": "invalid"}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "color" + }, + "outputs": [ + [1, 0, 0, 1], + [0, 0, 0, 1], + [0, 1, 0, 1], + [0, 1, 0, 1], + [0, 1, 0, 1], + [0, 0, 0, 1], + {"error": "Could not parse color from value 'invalid'"} + ], + "serialized": ["to-color", ["get", "x"], ["get", "y"]] + } +} diff --git a/metrics/integration/expression-tests/to-color/basic/test.json b/metrics/integration/expression-tests/to-color/basic/test.json new file mode 100644 index 00000000000..6660157c7b0 --- /dev/null +++ b/metrics/integration/expression-tests/to-color/basic/test.json @@ -0,0 +1,30 @@ +{ + "expression": ["to-color", ["get", "x"]], + "inputs": [ + [{}, {"properties": {"x": "red"}}], + [{}, {"properties": {"x": "invalid"}}], + [{}, {"properties": {"x": "rgba(0, 255, 0, 1)"}}], + [{}, {"properties": {"x": [0, 255, 0, 1]}}], + [{}, {"properties": {"x": [0, 255, 0]}}], + [{}, {"properties": {"x": [0, 255]}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "color" + }, + "outputs": [ + [1, 0, 0, 1], + {"error": "Could not parse color from value 'invalid'"}, + [0, 1, 0, 1], + [0, 1, 0, 1], + [0, 1, 0, 1], + { + "error": "Invalid rbga value [0,255]: expected an array containing either three or four numeric values." + } + ], + "serialized": ["to-color", ["get", "x"]] + } +} diff --git a/metrics/integration/expression-tests/to-color/color/test.json b/metrics/integration/expression-tests/to-color/color/test.json new file mode 100644 index 00000000000..c3ca158caea --- /dev/null +++ b/metrics/integration/expression-tests/to-color/color/test.json @@ -0,0 +1,18 @@ +{ + "expression": ["to-color", ["rgba", 0, 0, 0, 1]], + "inputs": [ + [{}, {}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": true, + "isZoomConstant": true, + "type": "color" + }, + "outputs": [ + [0, 0, 0, 1] + ], + "serialized": ["rgba", 0, 0, 0, 1] + } +} diff --git a/metrics/integration/expression-tests/to-number/2-ary/test.json b/metrics/integration/expression-tests/to-number/2-ary/test.json new file mode 100644 index 00000000000..bbed5b9cbab --- /dev/null +++ b/metrics/integration/expression-tests/to-number/2-ary/test.json @@ -0,0 +1,34 @@ +{ + "expression": ["to-number", ["get", "x"], ["get", "y"]], + "inputs": [ + [{}, {"properties": {"x": 1, "y": -1}}], + [{}, {"properties": {"x": "1", "y": -1}}], + [{}, {"properties": {"x": "6.02e-23", "y": -1}}], + [{}, {"properties": {"x": "Not a number", "y": -1}}], + [{}, {"properties": {"x": null, "y": -1}}], + [{}, {"properties": {"x": [1, 2], "y": -1}}], + [{}, {"properties": {"x": {"y": 1}, "y": -1}}], + [{}, {"properties": {"y": -1}}], + [{}, {"properties": {"y": "bad fallback"}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "number" + }, + "outputs": [ + 1, + 1, + 6.02e-23, + -1, + 0, + -1, + -1, + 0, + 0 + ], + "serialized": ["to-number", ["get", "x"], ["get", "y"]] + } +} diff --git a/metrics/integration/expression-tests/to-number/basic/test.json b/metrics/integration/expression-tests/to-number/basic/test.json new file mode 100644 index 00000000000..1d769c89f0d --- /dev/null +++ b/metrics/integration/expression-tests/to-number/basic/test.json @@ -0,0 +1,30 @@ +{ + "expression": ["to-number", ["get", "x"]], + "inputs": [ + [{}, {"properties": {"x": 1}}], + [{}, {"properties": {"x": "1"}}], + [{}, {"properties": {"x": "6.02e-23"}}], + [{}, {"properties": {"x": "Not a number"}}], + [{}, {"properties": {"x": null}}], + [{}, {"properties": {"x": [1, 2]}}], + [{}, {"properties": {"x": {"y": 1}}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "number" + }, + "outputs": [ + 1, + 1, + 6.02e-23, + {"error": "Could not convert \"Not a number\" to number."}, + 0, + {"error": "Could not convert [1,2] to number."}, + {"error": "Could not convert {\"y\":1} to number."} + ], + "serialized": ["to-number", ["get", "x"]] + } +} diff --git a/metrics/integration/expression-tests/to-rgba/alpha/test.json b/metrics/integration/expression-tests/to-rgba/alpha/test.json new file mode 100644 index 00000000000..3cafddae261 --- /dev/null +++ b/metrics/integration/expression-tests/to-rgba/alpha/test.json @@ -0,0 +1,14 @@ +{ + "expression": ["to-rgba", ["rgba", 0, 128, 255, 0.5]], + "inputs": [[{}, {}]], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": true, + "isZoomConstant": true, + "type": "array" + }, + "outputs": [[0, 128, 255, 0.5]], + "serialized": ["literal", [0, 128, 255, 0.5]] + } +} diff --git a/metrics/integration/expression-tests/to-rgba/basic/test.json b/metrics/integration/expression-tests/to-rgba/basic/test.json new file mode 100644 index 00000000000..7f2175b548e --- /dev/null +++ b/metrics/integration/expression-tests/to-rgba/basic/test.json @@ -0,0 +1,19 @@ +{ + "expression": ["to-rgba", ["get", "x"]], + "inputs": [ + [{}, {"properties": {"x": "red"}}], + [{}, {"properties": {"x": "rgba(0, 255, 0, 1)"}}], + [{}, {"properties": {"x": [0, 255, 0, 1]}}], + [{}, {"properties": {"x": [0, 0, 255]}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "array" + }, + "outputs": [[255, 0, 0, 1], [0, 255, 0, 1], [0, 255, 0, 1], [0, 0, 255, 1]], + "serialized": ["to-rgba", ["to-color", ["get", "x"]]] + } +} diff --git a/metrics/integration/expression-tests/to-rgba/zero/test.json b/metrics/integration/expression-tests/to-rgba/zero/test.json new file mode 100644 index 00000000000..1e206dc06e5 --- /dev/null +++ b/metrics/integration/expression-tests/to-rgba/zero/test.json @@ -0,0 +1,14 @@ +{ + "expression": ["to-rgba", ["rgba", 0, 0, 0, 0]], + "inputs": [[{}, {}]], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": true, + "isZoomConstant": true, + "type": "array" + }, + "outputs": [[0, 0, 0, 0]], + "serialized": ["literal", [0, 0, 0, 0]] + } +} diff --git a/metrics/integration/expression-tests/to-string/2-ary/test.json b/metrics/integration/expression-tests/to-string/2-ary/test.json new file mode 100644 index 00000000000..4ee8bde793d --- /dev/null +++ b/metrics/integration/expression-tests/to-string/2-ary/test.json @@ -0,0 +1,10 @@ +{ + "expression": ["to-string", ["get", "x"], ["get", "y"]], + "inputs": [[{}, {}]], + "expected": { + "compiled": { + "result": "error", + "errors": [{"key": "", "error": "Expected one argument."}] + } + } +} diff --git a/metrics/integration/expression-tests/to-string/basic/test.json b/metrics/integration/expression-tests/to-string/basic/test.json new file mode 100644 index 00000000000..7a17dc320b3 --- /dev/null +++ b/metrics/integration/expression-tests/to-string/basic/test.json @@ -0,0 +1,21 @@ +{ + "expression": ["to-string", ["get", "x"]], + "inputs": [ + [{}, {"properties": {"x": 1}}], + [{}, {"properties": {"x": false}}], + [{}, {"properties": {"x": null}}], + [{}, {"properties": {"x": "string"}}], + [{}, {"properties": {"x": [1, 2]}}], + [{}, {"properties": {"x": {"y": 1}}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "string" + }, + "outputs": ["1", "false", "", "string", "[1,2]", "{\"y\":1}"], + "serialized": ["to-string", ["get", "x"]] + } +} diff --git a/metrics/integration/expression-tests/to-string/color/test.json b/metrics/integration/expression-tests/to-string/color/test.json new file mode 100644 index 00000000000..d22d9943f6f --- /dev/null +++ b/metrics/integration/expression-tests/to-string/color/test.json @@ -0,0 +1,14 @@ +{ + "expression": ["to-string", ["rgba", 85, 255, 0, 0.5]], + "inputs": [[{}, {}]], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": true, + "isZoomConstant": true, + "type": "string" + }, + "outputs": ["rgba(85,255,0,0.5)"], + "serialized": "rgba(85,255,0,0.5)" + } +} diff --git a/metrics/integration/expression-tests/to-string/implicit/test.json b/metrics/integration/expression-tests/to-string/implicit/test.json new file mode 100644 index 00000000000..d13d2b807d0 --- /dev/null +++ b/metrics/integration/expression-tests/to-string/implicit/test.json @@ -0,0 +1,24 @@ +{ + "expression": ["get", "p"], + "propertySpec": { + "type": "string" + }, + "inputs": [ + [{}, {"properties": {}}], + [{}, {"properties": {"p": 0}}], + [{}, {"properties": {"p": "a"}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "string" + }, + "outputs": ["", "0", "a"], + "serialized": [ + "to-string", + ["get", "p"] + ] + } +} diff --git a/metrics/integration/expression-tests/typecheck/array-invalid-item/test.json b/metrics/integration/expression-tests/typecheck/array-invalid-item/test.json new file mode 100644 index 00000000000..07c9f8f1701 --- /dev/null +++ b/metrics/integration/expression-tests/typecheck/array-invalid-item/test.json @@ -0,0 +1,22 @@ +{ + "propertySpec": { + "type": "array", + "value": "string", + "length": 2, + "property-type": "data-driven", + "expression": {"parameters": ["zoom", "feature"]} + }, + "expression": ["array", "number", 2, ["get", "x"]], + "inputs": [], + "expected": { + "compiled": { + "result": "error", + "errors": [ + { + "key": "", + "error": "Expected array but found array instead." + } + ] + } + } +} diff --git a/metrics/integration/expression-tests/typecheck/array-item-subtyping/test.json b/metrics/integration/expression-tests/typecheck/array-item-subtyping/test.json new file mode 100644 index 00000000000..a2859348cc5 --- /dev/null +++ b/metrics/integration/expression-tests/typecheck/array-item-subtyping/test.json @@ -0,0 +1,19 @@ +{ + "propertySpec": { + "type": "array", + "property-type": "data-driven", + "expression": {"parameters": ["zoom", "feature"]} + }, + "expression": ["array", "number", 2, ["get", "x"]], + "inputs": [], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "array" + }, + "outputs": [], + "serialized": ["array", "number", 2, ["get", "x"]] + } +} diff --git a/metrics/integration/expression-tests/typecheck/array-length-subtyping--no-length/test.json b/metrics/integration/expression-tests/typecheck/array-length-subtyping--no-length/test.json new file mode 100644 index 00000000000..d180e38bac3 --- /dev/null +++ b/metrics/integration/expression-tests/typecheck/array-length-subtyping--no-length/test.json @@ -0,0 +1,22 @@ +{ + "propertySpec": { + "type": "array", + "value": "number", + "length": 3, + "property-type": "data-driven", + "expression": {"parameters": ["zoom", "feature"]} + }, + "expression": ["array", "number", ["get", "x"]], + "inputs": [], + "expected": { + "compiled": { + "result": "error", + "errors": [ + { + "key": "", + "error": "Expected array but found array instead." + } + ] + } + } +} diff --git a/metrics/integration/expression-tests/typecheck/array-length-subtyping/test.json b/metrics/integration/expression-tests/typecheck/array-length-subtyping/test.json new file mode 100644 index 00000000000..2600dec7e2d --- /dev/null +++ b/metrics/integration/expression-tests/typecheck/array-length-subtyping/test.json @@ -0,0 +1,20 @@ +{ + "propertySpec": { + "type": "array", + "value": "string", + "property-type": "data-driven", + "expression": {"parameters": ["zoom", "feature"]} + }, + "expression": ["array", "string", 2, ["get", "x"]], + "inputs": [], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "array" + }, + "outputs": [], + "serialized": ["array", "string", 2, ["get", "x"]] + } +} diff --git a/metrics/integration/expression-tests/typecheck/array-wrong-length/test.json b/metrics/integration/expression-tests/typecheck/array-wrong-length/test.json new file mode 100644 index 00000000000..a5e08bd02d6 --- /dev/null +++ b/metrics/integration/expression-tests/typecheck/array-wrong-length/test.json @@ -0,0 +1,22 @@ +{ + "propertySpec": { + "type": "array", + "value": "number", + "length": 3, + "property-type": "data-driven", + "expression": {"parameters": ["zoom", "feature"]} + }, + "expression": ["array", "number", 2, ["get", "x"]], + "inputs": [], + "expected": { + "compiled": { + "result": "error", + "errors": [ + { + "key": "", + "error": "Expected array but found array instead." + } + ] + } + } +} diff --git a/metrics/integration/expression-tests/typeof/basic/test.json b/metrics/integration/expression-tests/typeof/basic/test.json new file mode 100644 index 00000000000..81b3b5e7d5a --- /dev/null +++ b/metrics/integration/expression-tests/typeof/basic/test.json @@ -0,0 +1,34 @@ +{ + "expression": ["typeof", ["get", "x"]], + "inputs": [ + [{}, {"properties": {"x": null}}], + [{}, {"properties": {"x": "s"}}], + [{}, {"properties": {"x": 0}}], + [{}, {"properties": {"x": false}}], + [{}, {"properties": {"x": [1, 2, 3]}}], + [{}, {"properties": {"x": ["a", "b", "c"]}}], + [{}, {"properties": {"x": [true, false]}}], + [{}, {"properties": {"x": [1, false]}}], + [{}, {"properties": {"x": {}}}] + ], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": true, + "type": "string" + }, + "outputs": [ + "null", + "string", + "number", + "boolean", + "array", + "array", + "array", + "array", + "object" + ], + "serialized": ["typeof", ["get", "x"]] + } +} diff --git a/metrics/integration/expression-tests/upcase/basic/test.json b/metrics/integration/expression-tests/upcase/basic/test.json new file mode 100644 index 00000000000..b4d05b85ed4 --- /dev/null +++ b/metrics/integration/expression-tests/upcase/basic/test.json @@ -0,0 +1,14 @@ +{ + "expression": ["upcase", "string"], + "inputs": [[{}, {}]], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": true, + "isZoomConstant": true, + "type": "string" + }, + "outputs": ["STRING"], + "serialized": "STRING" + } +} diff --git a/metrics/integration/expression-tests/within/invalid-geojson/test.json b/metrics/integration/expression-tests/within/invalid-geojson/test.json new file mode 100644 index 00000000000..5a6ccfa38fb --- /dev/null +++ b/metrics/integration/expression-tests/within/invalid-geojson/test.json @@ -0,0 +1,52 @@ +{ + "expression": ["within", { + "type": "LineString", + "coordinates": [[0, 0], [0, 5], [5, 5], [5, 0]] + }], + "inputs": [[{ + "zoom": 3, + "canonicalID": { + "z": 3, + "x": 3, + "y": 3 + } + }, { + "geometry": { + "type": "Point", + "coordinates": [6, 6] + } + }], [{ + "zoom": 3, + "canonicalID": { + "z": 3, + "x": 3, + "y": 3 + } + }, { + "geometry": { + "type": "Point", + "coordinates": [2, 2] + } + }], [{ + "zoom": 3, + "canonicalID": { + "z": 3, + "x": 3, + "y": 3 + } + }, { + "geometry": { + "type": "LineString", + "coordinates": [[3, 3], [4, 1]] + } + }]], + "expected": { + "compiled": { + "errors": [{ + "key": "", + "error": "'within' expression requires valid geojson source that contains polygon geometry type." + }], + "result": "error" + } + } +} diff --git a/metrics/integration/expression-tests/within/line-within-polygon/test.json b/metrics/integration/expression-tests/within/line-within-polygon/test.json new file mode 100644 index 00000000000..b42c19c999b --- /dev/null +++ b/metrics/integration/expression-tests/within/line-within-polygon/test.json @@ -0,0 +1,44 @@ +{ + "expression": ["within", { + "type": "Polygon", + "coordinates": [[[0, 0], [0, 5], [5, 5], [5, 0], [0, 0]]] + }], + "inputs": [[{ + "zoom": 3, + "canonicalID": { + "z": 3, + "x": 3, + "y": 3 + } + }, { + "geometry": { + "type": "LineString", + "coordinates": [[3, 3], [4, 1]] + } + }], [{ + "zoom": 3, + "canonicalID": { + "z": 3, + "x": 3, + "y": 3 + } + }, { + "geometry": { + "type": "LineString", + "coordinates": [[3, 3], [6, 6]] + } + }]], + "expected": { + "compiled": { + "type": "boolean", + "isFeatureConstant": false, + "isZoomConstant": true, + "result": "success" + }, + "outputs": [true, false], + "serialized": ["within", { + "coordinates": [[[0, 0], [0, 5], [5, 5], [5, 0], [0, 0]]], + "type": "Polygon" + }] + } +} diff --git a/metrics/integration/expression-tests/within/non-supported/test.json b/metrics/integration/expression-tests/within/non-supported/test.json new file mode 100644 index 00000000000..16659a5fc16 --- /dev/null +++ b/metrics/integration/expression-tests/within/non-supported/test.json @@ -0,0 +1,32 @@ +{ + "expression": ["within", { + "type": "Polygon", + "coordinates": [[[0, 0], [0, 5], [5, 5], [5, 0], [0, 0]]] + }], + "inputs": [[{ + "zoom": 3, + "canonicalID": { + "z": 3, + "x": 3, + "y": 3 + } + }, { + "geometry": { + "type": "Polygon", + "coordinates": [[[3, 3], [6, 6], [3, 3]]] + } + }]], + "expected": { + "compiled": { + "type": "boolean", + "isFeatureConstant": false, + "isZoomConstant": true, + "result": "success" + }, + "outputs": [false], + "serialized": ["within", { + "coordinates": [[[0, 0], [0, 5], [5, 5], [5, 0], [0, 0]]], + "type": "Polygon" + }] + } +} diff --git a/metrics/integration/expression-tests/within/point-within-polygon/test.json b/metrics/integration/expression-tests/within/point-within-polygon/test.json new file mode 100644 index 00000000000..8da9fbdceec --- /dev/null +++ b/metrics/integration/expression-tests/within/point-within-polygon/test.json @@ -0,0 +1,44 @@ +{ + "expression": ["within", { + "type": "Polygon", + "coordinates": [[[0, 0], [0, 5], [5, 5], [5, 0], [0, 0]]] + }], + "inputs": [[{ + "zoom": 3, + "canonicalID": { + "z": 3, + "x": 3, + "y": 3 + } + }, { + "geometry": { + "type": "Point", + "coordinates": [6, 6] + } + }], [{ + "zoom": 3, + "canonicalID": { + "z": 3, + "x": 3, + "y": 3 + } + }, { + "geometry": { + "type": "Point", + "coordinates": [2, 2] + } + }]], + "expected": { + "compiled": { + "type": "boolean", + "isFeatureConstant": false, + "isZoomConstant": true, + "result": "success" + }, + "outputs": [false, true], + "serialized": ["within", { + "coordinates": [[[0, 0], [0, 5], [5, 5], [5, 0], [0, 0]]], + "type": "Polygon" + }] + } +} diff --git a/metrics/integration/expression-tests/zoom/basic/test.json b/metrics/integration/expression-tests/zoom/basic/test.json new file mode 100644 index 00000000000..a3ea663cd1e --- /dev/null +++ b/metrics/integration/expression-tests/zoom/basic/test.json @@ -0,0 +1,14 @@ +{ + "expression": ["interpolate", ["linear"], ["zoom"], 0, 0, 30, 30], + "inputs": [[{"zoom": 5}, {}]], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": true, + "isZoomConstant": false, + "type": "number" + }, + "outputs": [5], + "serialized": ["interpolate", ["linear"], ["zoom"], 0, 0, 30, 30] + } +} diff --git a/metrics/integration/expression-tests/zoom/invalid-nested-1/test.json b/metrics/integration/expression-tests/zoom/invalid-nested-1/test.json new file mode 100644 index 00000000000..1f260101706 --- /dev/null +++ b/metrics/integration/expression-tests/zoom/invalid-nested-1/test.json @@ -0,0 +1,15 @@ +{ + "expression": ["+", 0.5, ["interpolate", ["linear"], ["zoom"], 0, 0, 1, 1]], + "inputs": [[{}, {}]], + "expected": { + "compiled": { + "result": "error", + "errors": [ + { + "key": "", + "error": "\"zoom\" expression may only be used as input to a top-level \"step\" or \"interpolate\" expression." + } + ] + } + } +} diff --git a/metrics/integration/expression-tests/zoom/invalid-nested-2/test.json b/metrics/integration/expression-tests/zoom/invalid-nested-2/test.json new file mode 100644 index 00000000000..06947e70d9b --- /dev/null +++ b/metrics/integration/expression-tests/zoom/invalid-nested-2/test.json @@ -0,0 +1,23 @@ +{ + "expression": [ + "interpolate", + ["linear"], + ["zoom"], + 0, + 0, + 1, + ["interpolate", ["linear"], ["zoom"], 0, 0, 1, 1] + ], + "inputs": [[{}, {}]], + "expected": { + "compiled": { + "result": "error", + "errors": [ + { + "key": "", + "error": "Only one zoom-based \"step\" or \"interpolate\" subexpression may be used in an expression." + } + ] + } + } +} diff --git a/metrics/integration/expression-tests/zoom/invalid-nested-3/test.json b/metrics/integration/expression-tests/zoom/invalid-nested-3/test.json new file mode 100644 index 00000000000..277772c9dae --- /dev/null +++ b/metrics/integration/expression-tests/zoom/invalid-nested-3/test.json @@ -0,0 +1,20 @@ +{ + "expression": [ + "let", + "x", + ["interpolate", ["linear"], ["zoom"], 0, 0, 1, 1], + ["interpolate", ["linear"], ["zoom"], 0, 0, 1, 1] + ], + "inputs": [[{}, {}]], + "expected": { + "compiled": { + "result": "error", + "errors": [ + { + "key": "", + "error": "Only one zoom-based \"step\" or \"interpolate\" subexpression may be used in an expression." + } + ] + } + } +} diff --git a/metrics/integration/expression-tests/zoom/invalid-nested-4/test.json b/metrics/integration/expression-tests/zoom/invalid-nested-4/test.json new file mode 100644 index 00000000000..7f8005a02e4 --- /dev/null +++ b/metrics/integration/expression-tests/zoom/invalid-nested-4/test.json @@ -0,0 +1,19 @@ +{ + "expression": [ + "coalesce", + ["interpolate", ["linear"], ["zoom"], 0, 0, 1, 1], + ["interpolate", ["linear"], ["zoom"], 0, 0, 1, 1] + ], + "inputs": [[{}, {}]], + "expected": { + "compiled": { + "result": "error", + "errors": [ + { + "key": "", + "error": "Only one zoom-based \"step\" or \"interpolate\" subexpression may be used in an expression." + } + ] + } + } +} diff --git a/metrics/integration/expression-tests/zoom/invalid-nested-5/test.json b/metrics/integration/expression-tests/zoom/invalid-nested-5/test.json new file mode 100644 index 00000000000..d5e0619b91f --- /dev/null +++ b/metrics/integration/expression-tests/zoom/invalid-nested-5/test.json @@ -0,0 +1,20 @@ +{ + "expression": [ + "let", + "x", + ["interpolate", ["linear"], ["zoom"], 0, 0, 1, 1], + ["+", 0.5, ["get", "x"]] + ], + "inputs": [[{}, {}]], + "expected": { + "compiled": { + "result": "error", + "errors": [ + { + "key": "", + "error": "\"zoom\" expression may only be used as input to a top-level \"step\" or \"interpolate\" expression." + } + ] + } + } +} diff --git a/metrics/integration/expression-tests/zoom/invalid-no-curve/test.json b/metrics/integration/expression-tests/zoom/invalid-no-curve/test.json new file mode 100644 index 00000000000..dc90f8289e8 --- /dev/null +++ b/metrics/integration/expression-tests/zoom/invalid-no-curve/test.json @@ -0,0 +1,15 @@ +{ + "expression": ["+", ["zoom"], 0], + "inputs": [[{"zoom": 5}, {}]], + "expected": { + "compiled": { + "result": "error", + "errors": [ + { + "key": "", + "error": "\"zoom\" expression may only be used as input to a top-level \"step\" or \"interpolate\" expression." + } + ] + } + } +} diff --git a/metrics/integration/expression-tests/zoom/nested-coalesce/test.json b/metrics/integration/expression-tests/zoom/nested-coalesce/test.json new file mode 100644 index 00000000000..664c53c1a74 --- /dev/null +++ b/metrics/integration/expression-tests/zoom/nested-coalesce/test.json @@ -0,0 +1,20 @@ +{ + "expression": [ + "coalesce", + ["interpolate", ["linear"], ["zoom"], 0, 0, 30, 30] + ], + "inputs": [[{"zoom": 5}, {}]], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": true, + "isZoomConstant": false, + "type": "number" + }, + "outputs": [5], + "serialized": [ + "coalesce", + ["interpolate", ["linear"], ["zoom"], 0, 0, 30, 30] + ] + } +} diff --git a/metrics/integration/expression-tests/zoom/nested-let/test.json b/metrics/integration/expression-tests/zoom/nested-let/test.json new file mode 100644 index 00000000000..480c46aa88f --- /dev/null +++ b/metrics/integration/expression-tests/zoom/nested-let/test.json @@ -0,0 +1,26 @@ +{ + "expression": [ + "let", + "x", + ["number", ["get", "a"]], + ["interpolate", ["linear"], ["zoom"], 0, 0, 30, ["var", "x"]] + ], + "inputs": [[{"zoom": 5}, {"a": 30}]], + "expected": { + "compiled": { + "result": "success", + "isFeatureConstant": false, + "isZoomConstant": false, + "type": "number" + }, + "outputs": [ + {"error": "Expected value to be of type number, but found null instead."} + ], + "serialized": [ + "let", + "x", + ["number", ["get", "a"]], + ["interpolate", ["linear"], ["zoom"], 0, 0, 30, ["var", "x"]] + ] + } +} diff --git a/metrics/integration/geojson/anchors.json b/metrics/integration/geojson/anchors.json new file mode 100644 index 00000000000..8a8840cb78f --- /dev/null +++ b/metrics/integration/geojson/anchors.json @@ -0,0 +1,85 @@ +{ + "type": "FeatureCollection", + "features": [{ + "type": "Feature", + "properties": { + "anchor": "center" + }, + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + }, { + "type": "Feature", + "properties": { + "anchor": "left" + }, + "geometry": { + "type": "Point", + "coordinates": [ 30, 0 ] + } + }, { + "type": "Feature", + "properties": { + "anchor": "top-left" + }, + "geometry": { + "type": "Point", + "coordinates": [ 20, -15 ] + } + }, { + "type": "Feature", + "properties": { + "anchor": "top" + }, + "geometry": { + "type": "Point", + "coordinates": [ 0, -25 ] + } + }, { + "type": "Feature", + "properties": { + "anchor": "top-right" + }, + "geometry": { + "type": "Point", + "coordinates": [ -20, -15 ] + } + }, { + "type": "Feature", + "properties": { + "anchor": "right" + }, + "geometry": { + "type": "Point", + "coordinates": [ -30, 0 ] + } + }, { + "type": "Feature", + "properties": { + "anchor": "bottom-left" + }, + "geometry": { + "type": "Point", + "coordinates": [ 20, 15 ] + } + }, { + "type": "Feature", + "properties": { + "anchor": "bottom" + }, + "geometry": { + "type": "Point", + "coordinates": [ 0, 25 ] + } + }, { + "type": "Feature", + "properties": { + "anchor": "bottom-right" + }, + "geometry": { + "type": "Point", + "coordinates": [ -20, 15 ] + } + }] +} \ No newline at end of file diff --git a/metrics/integration/geojson/point.json b/metrics/integration/geojson/point.json new file mode 100644 index 00000000000..32ad660f67b --- /dev/null +++ b/metrics/integration/geojson/point.json @@ -0,0 +1,7 @@ +{ + "type": "Point", + "coordinates": [ + 0, + 0 + ] +} diff --git a/metrics/integration/glyphs/NotoCJK/0-255.pbf b/metrics/integration/glyphs/NotoCJK/0-255.pbf new file mode 100644 index 00000000000..5a0f7c2cc39 Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/0-255.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/1024-1279.pbf b/metrics/integration/glyphs/NotoCJK/1024-1279.pbf new file mode 100644 index 00000000000..01797f7b972 Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/1024-1279.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/10240-10495.pbf b/metrics/integration/glyphs/NotoCJK/10240-10495.pbf new file mode 100644 index 00000000000..d47e8a46736 --- /dev/null +++ b/metrics/integration/glyphs/NotoCJK/10240-10495.pbf @@ -0,0 +1,3 @@ + +$ +Noto Sans CJK JP Thin 10240-10495 \ No newline at end of file diff --git a/metrics/integration/glyphs/NotoCJK/10496-10751.pbf b/metrics/integration/glyphs/NotoCJK/10496-10751.pbf new file mode 100644 index 00000000000..cdd4469dcec Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/10496-10751.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/10752-11007.pbf b/metrics/integration/glyphs/NotoCJK/10752-11007.pbf new file mode 100644 index 00000000000..fe59b88c262 --- /dev/null +++ b/metrics/integration/glyphs/NotoCJK/10752-11007.pbf @@ -0,0 +1,3 @@ + +$ +Noto Sans CJK JP Thin 10752-11007 \ No newline at end of file diff --git a/metrics/integration/glyphs/NotoCJK/11008-11263.pbf b/metrics/integration/glyphs/NotoCJK/11008-11263.pbf new file mode 100644 index 00000000000..7056c758cac Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/11008-11263.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/11264-11519.pbf b/metrics/integration/glyphs/NotoCJK/11264-11519.pbf new file mode 100644 index 00000000000..193259ea1c8 --- /dev/null +++ b/metrics/integration/glyphs/NotoCJK/11264-11519.pbf @@ -0,0 +1,3 @@ + +$ +Noto Sans CJK JP Thin 11264-11519 \ No newline at end of file diff --git a/metrics/integration/glyphs/NotoCJK/11520-11775.pbf b/metrics/integration/glyphs/NotoCJK/11520-11775.pbf new file mode 100644 index 00000000000..923c5ede3d6 --- /dev/null +++ b/metrics/integration/glyphs/NotoCJK/11520-11775.pbf @@ -0,0 +1,3 @@ + +$ +Noto Sans CJK JP Thin 11520-11775 \ No newline at end of file diff --git a/metrics/integration/glyphs/NotoCJK/11776-12031.pbf b/metrics/integration/glyphs/NotoCJK/11776-12031.pbf new file mode 100644 index 00000000000..48a1fea2c9b Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/11776-12031.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/12032-12287.pbf b/metrics/integration/glyphs/NotoCJK/12032-12287.pbf new file mode 100644 index 00000000000..de306323ac8 Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/12032-12287.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/12288-12543.pbf b/metrics/integration/glyphs/NotoCJK/12288-12543.pbf new file mode 100644 index 00000000000..b3e361ec34b Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/12288-12543.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/12544-12799.pbf b/metrics/integration/glyphs/NotoCJK/12544-12799.pbf new file mode 100644 index 00000000000..6f1f9aa3213 Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/12544-12799.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/1280-1535.pbf b/metrics/integration/glyphs/NotoCJK/1280-1535.pbf new file mode 100644 index 00000000000..835a3554bef --- /dev/null +++ b/metrics/integration/glyphs/NotoCJK/1280-1535.pbf @@ -0,0 +1,3 @@ + +" +Noto Sans CJK JP Thin 1280-1535 \ No newline at end of file diff --git a/metrics/integration/glyphs/NotoCJK/12800-13055.pbf b/metrics/integration/glyphs/NotoCJK/12800-13055.pbf new file mode 100644 index 00000000000..0e646200b26 Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/12800-13055.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/13056-13311.pbf b/metrics/integration/glyphs/NotoCJK/13056-13311.pbf new file mode 100644 index 00000000000..4ca46634fe7 Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/13056-13311.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/13312-13567.pbf b/metrics/integration/glyphs/NotoCJK/13312-13567.pbf new file mode 100644 index 00000000000..4615002ce05 Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/13312-13567.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/13568-13823.pbf b/metrics/integration/glyphs/NotoCJK/13568-13823.pbf new file mode 100644 index 00000000000..ff4c0853981 Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/13568-13823.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/13824-14079.pbf b/metrics/integration/glyphs/NotoCJK/13824-14079.pbf new file mode 100644 index 00000000000..4af676134a5 Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/13824-14079.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/14080-14335.pbf b/metrics/integration/glyphs/NotoCJK/14080-14335.pbf new file mode 100644 index 00000000000..b4f351940f3 Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/14080-14335.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/14336-14591.pbf b/metrics/integration/glyphs/NotoCJK/14336-14591.pbf new file mode 100644 index 00000000000..5f5d6df6a71 Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/14336-14591.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/14592-14847.pbf b/metrics/integration/glyphs/NotoCJK/14592-14847.pbf new file mode 100644 index 00000000000..99f514391c0 Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/14592-14847.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/14848-15103.pbf b/metrics/integration/glyphs/NotoCJK/14848-15103.pbf new file mode 100644 index 00000000000..f59cb54a31f Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/14848-15103.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/15104-15359.pbf b/metrics/integration/glyphs/NotoCJK/15104-15359.pbf new file mode 100644 index 00000000000..23d123ddab0 Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/15104-15359.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/1536-1791.pbf b/metrics/integration/glyphs/NotoCJK/1536-1791.pbf new file mode 100644 index 00000000000..4d1770001f8 --- /dev/null +++ b/metrics/integration/glyphs/NotoCJK/1536-1791.pbf @@ -0,0 +1,3 @@ + +" +Noto Sans CJK JP Thin 1536-1791 \ No newline at end of file diff --git a/metrics/integration/glyphs/NotoCJK/15360-15615.pbf b/metrics/integration/glyphs/NotoCJK/15360-15615.pbf new file mode 100644 index 00000000000..a1f992589dc Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/15360-15615.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/15616-15871.pbf b/metrics/integration/glyphs/NotoCJK/15616-15871.pbf new file mode 100644 index 00000000000..7cb7afd4a54 Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/15616-15871.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/15872-16127.pbf b/metrics/integration/glyphs/NotoCJK/15872-16127.pbf new file mode 100644 index 00000000000..9616366e6fb Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/15872-16127.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/16128-16383.pbf b/metrics/integration/glyphs/NotoCJK/16128-16383.pbf new file mode 100644 index 00000000000..8e7e5d35031 Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/16128-16383.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/16384-16639.pbf b/metrics/integration/glyphs/NotoCJK/16384-16639.pbf new file mode 100644 index 00000000000..d938224206b Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/16384-16639.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/16640-16895.pbf b/metrics/integration/glyphs/NotoCJK/16640-16895.pbf new file mode 100644 index 00000000000..81a5092ddaf Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/16640-16895.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/16896-17151.pbf b/metrics/integration/glyphs/NotoCJK/16896-17151.pbf new file mode 100644 index 00000000000..bb1e5b5da5b Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/16896-17151.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/17152-17407.pbf b/metrics/integration/glyphs/NotoCJK/17152-17407.pbf new file mode 100644 index 00000000000..3f1946024b6 Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/17152-17407.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/17408-17663.pbf b/metrics/integration/glyphs/NotoCJK/17408-17663.pbf new file mode 100644 index 00000000000..6b3ffbf52bd Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/17408-17663.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/17664-17919.pbf b/metrics/integration/glyphs/NotoCJK/17664-17919.pbf new file mode 100644 index 00000000000..3002699c447 Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/17664-17919.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/1792-2047.pbf b/metrics/integration/glyphs/NotoCJK/1792-2047.pbf new file mode 100644 index 00000000000..769e27e7a6b --- /dev/null +++ b/metrics/integration/glyphs/NotoCJK/1792-2047.pbf @@ -0,0 +1,3 @@ + +" +Noto Sans CJK JP Thin 1792-2047 \ No newline at end of file diff --git a/metrics/integration/glyphs/NotoCJK/17920-18175.pbf b/metrics/integration/glyphs/NotoCJK/17920-18175.pbf new file mode 100644 index 00000000000..9377601085e Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/17920-18175.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/18176-18431.pbf b/metrics/integration/glyphs/NotoCJK/18176-18431.pbf new file mode 100644 index 00000000000..b395162c33f Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/18176-18431.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/18432-18687.pbf b/metrics/integration/glyphs/NotoCJK/18432-18687.pbf new file mode 100644 index 00000000000..759902b6265 Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/18432-18687.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/18688-18943.pbf b/metrics/integration/glyphs/NotoCJK/18688-18943.pbf new file mode 100644 index 00000000000..f5247326ea7 Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/18688-18943.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/18944-19199.pbf b/metrics/integration/glyphs/NotoCJK/18944-19199.pbf new file mode 100644 index 00000000000..c7ae80936f8 Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/18944-19199.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/19200-19455.pbf b/metrics/integration/glyphs/NotoCJK/19200-19455.pbf new file mode 100644 index 00000000000..301932f37c0 Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/19200-19455.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/19456-19711.pbf b/metrics/integration/glyphs/NotoCJK/19456-19711.pbf new file mode 100644 index 00000000000..166d00ec2e2 Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/19456-19711.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/19712-19967.pbf b/metrics/integration/glyphs/NotoCJK/19712-19967.pbf new file mode 100644 index 00000000000..2e1992175f8 Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/19712-19967.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/19968-20223.pbf b/metrics/integration/glyphs/NotoCJK/19968-20223.pbf new file mode 100644 index 00000000000..2f488061a59 Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/19968-20223.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/20224-20479.pbf b/metrics/integration/glyphs/NotoCJK/20224-20479.pbf new file mode 100644 index 00000000000..ea4d7b51926 Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/20224-20479.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/2048-2303.pbf b/metrics/integration/glyphs/NotoCJK/2048-2303.pbf new file mode 100644 index 00000000000..7e778022c8e --- /dev/null +++ b/metrics/integration/glyphs/NotoCJK/2048-2303.pbf @@ -0,0 +1,3 @@ + +" +Noto Sans CJK JP Thin 2048-2303 \ No newline at end of file diff --git a/metrics/integration/glyphs/NotoCJK/20480-20735.pbf b/metrics/integration/glyphs/NotoCJK/20480-20735.pbf new file mode 100644 index 00000000000..d16dd57f625 Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/20480-20735.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/20736-20991.pbf b/metrics/integration/glyphs/NotoCJK/20736-20991.pbf new file mode 100644 index 00000000000..c1b685f9620 Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/20736-20991.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/20992-21247.pbf b/metrics/integration/glyphs/NotoCJK/20992-21247.pbf new file mode 100644 index 00000000000..2caf94419b2 Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/20992-21247.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/21248-21503.pbf b/metrics/integration/glyphs/NotoCJK/21248-21503.pbf new file mode 100644 index 00000000000..42d37287352 Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/21248-21503.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/21504-21759.pbf b/metrics/integration/glyphs/NotoCJK/21504-21759.pbf new file mode 100644 index 00000000000..da11ab214f0 Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/21504-21759.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/21760-22015.pbf b/metrics/integration/glyphs/NotoCJK/21760-22015.pbf new file mode 100644 index 00000000000..8f709444886 Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/21760-22015.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/22016-22271.pbf b/metrics/integration/glyphs/NotoCJK/22016-22271.pbf new file mode 100644 index 00000000000..8cdc64a1c87 Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/22016-22271.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/22272-22527.pbf b/metrics/integration/glyphs/NotoCJK/22272-22527.pbf new file mode 100644 index 00000000000..d068d6a67e0 --- /dev/null +++ b/metrics/integration/glyphs/NotoCJK/22272-22527.pbf @@ -0,0 +1,190 @@ + + +Noto Sans CJK JP Thin 22272-22527EXdffffffffffffffffffffdYF[ss[ijlƭml̵ǯͭml̵¤ͭml̵uǹ´ͭml̵ɯôͭml̵˵ƾøͭml̵²¿ͭml̵¿ͭml̵ͭml̵ϴͭml̵˫ͭml̵utͭml̵umƼбͭml̵u}ͱϯͭml̵}ľxv˫ͭml̵ìĥͭml̵®þͭml̵ȹͭml̵ͭml̿ͭmlǵǭmij[syb____________axt\FYegf]L????????????K]fgeZG (08EXdffffffffffffffffffffdYF[ss[ijlƭml̵ͭml̵ͭml̵´ͭml̵ͭml̵ļͭml̵ͭml̵ͭml̵ͭml̵ͭml̵ƻͭml̵ͭml̵ͭml̵þͭml̵þͭml̵þͭml̵ľͭml̵ͭml̵ͭml̿ͭmlǵǭmij[syb____________axt\FYegf]L????????????K]fgeZG (08EXdffffffffffffffffffffdYF[ss[ijlƭml̵ͭml̵ͭml̵¿ͭml̵γͭml̵ĿǷͭml̵Ⱥůͭml̵ʽȺɬĮͭml̵¼˰Ÿͭml̵ʹ̺ͭml̵ʹƷtͭml̵ŵûǭ}ͭml̵Ƽªͭml̵ȷȨͭml̵ƿäðͭml̵Ƶȴͭml̵öʲy|ͭml̵ͭml̵ͭml̿ͭmlǵǭmij[syb____________axt\FYegf]L????????????K]fgeZG (08H\giiiiiiiiiiiiiiiiiiiig\H]vv]jjmɭmmͳͭmmͳ¾´ͭmmͳ¾ͭmmͳ¿ͭmmͳ¾ͭmmͳ¾ͭmmͳɲͭmmͳа¾ϲͭmmͳа¾ϲͭmmͳвͭmmͳа¾ϲͭmmͳе¾ϲͭmmͳϲͭmmͳа¾ϲͭmmͳа¾ϲͭmmͳа¾αͭmmͳͭmmͳͭmmͭmmijĭmiiZrvbbbbbbbbbbbbbbvrZEXcddZIBBBBBBBBBBBBIZddcXE (08EXdffffffffffffffffffffdXE[ss[iilƬll̴̬ll̴̬ll̴ɼ̬ll̴ʹ̬ll̴ˬ̬ll̴ɫ̬ll̴ŻƧ̬ll̴ͳ¢̬ll̴ɿĿ̬ll̴̬ll̴̬ll̴̬ll̴Ȩ̬ll̴Ȩ̬ll̴ȱ̬ll̴̬ll̴̬ll̵̬ll̬llǴǬlii[tya````````````ayt[GZegg]L@@@@@@@@@@@@L]ggeZG (08% (08I\giiiiiiiiiiiiiiiiiiiig[H^wu\ljoɬloϲ̬loϲ̬loϲŻ̬loϲŻ̬loϲŻ̬loϲ̬loϲ̬loϲĵ̬loϲDZ˵̬loϲǧ¢˵̬loϲǧ¢˵̬loϲǧ¾˵̬loϲǧ˴˵̬loϲǧĽ˵̬loϲž̬loϲɾ̬loϲƾʵ̬loϲ̬lo̬loIJĬlkh\subbbbbbbbbbbbbbvrZFXcddZHBBBBBBBBBBBBI[ddcWD (08@TaddddddddddddddddddddaTATmnVbdfĨhfƺȨhfƺȰȨhfƺzw˸ƱxyȨhfƺ{ͺ˷~ȨhfƺȴǾȨhfƺ¼ŴȨhfƺʻùȨhfƺȨhfƺëȨhfƺγòʶ˫Ȩhfƺγãʶ˫Ȩhfƺ˫Ȩhfƺεõʶ˫Ȩhfƺγãʶ˫Ȩhfƺγãʶ˫Ȩhfƺγãʶ˫ȨhfƺóȨhfƺȨhfƽȨhfźŨhc}}}}}}}}}}}}}}dUn{e]]]]]]]]]]]]ezoWAUbee^N============M^eebVB (08H[fggggggggggggggggggggf[H]uu]kknǮnnγήnnγ˸ήnnγǻб˵ήnnγǨʲήnnγǻȮήnnγ­ϱʵøήnnγ¦ήnnγóήnnγƼɱήnnγîįήnnγɼDZήnnγ³ήƺ˼ήnnγήȸήnnγήƮήnnγή½ήnnγuϵɺήnnγήnnεήnnήnnųŮnjj[sw``````````````ws[FYdee[J@@@@@@@@@@@@J[eedYF (08EXdffffffffffffffffffffdYF[ss[ijlƭml̵ͭml̵¿ͭml̵¿ͭml̵ºͭml̵¿ͭml̵¿ͭml̵ôͭml̵ʶ̰ͭml̵Ũýͭml̵ƻͭml̵¿ͭml̵¿ͭml̵¿ͭml̵¿ͭml̵¿ͭml̵{{{{¿{{{{ͭml̵¿ͭml̵ͭml̿ͭmlǵǭmij[syb____________axt\FYegf]L????????????K]fgeZG (08M[````````````````````[Leyxexw~µ¾~¢¿¾~¢ɽ¾~¢¿¾~¢ū¾~¢¿¾~¾¿¾~·¾~¢¾~¢ȹ¿þ¾~¢ʪ¿þ¾~¢ʵ¿þ¾~¢ľ¾~¢ʪþ¾~¢ʪþ¾~¢ʪz~þ¾~¢ʪƵ¾~º¾~¼¾~¢~z}|||||||||||||wi}k\\\\\\\\\\\\gzxdQ`ffaS><<<<<<<<<<<<<<<<<<<<Sl~~kRa}_eãceżãceżϲʭãceż¥ļãceż̴ȭãceżг½ͰãceżƿæÿãceżѶ͸ãceżýãceżͻϱȼνãceż¾ɷ¼ϵ½ãceżɷϷãceżɷʻ·ƼϼĽãceżþɷ˻ŴʷʶϲνãceżɷɷżťʷίϲɽãceżίɷťʼǯϲĽãceż©ɷʸϲãceżƷƲãceżãceãceżca{^Tm{gbbbbbbbbbbbbcwygO@Tbee_OBBBBBBBBBBBBKY__[N: (08H\giiiiiiiiiiiiiiiiiiiig\H]vv]jjmɭmmͳͭmmͳƫʷũͭmmͳ͵ɴδͭmmͳǻ̳Ⱥȯͭmm͹̸ú̶ͭmmͳʹǿ˵ijͭmmͻƻ˷ͭmmͳǶͭmmͳȹͳƺͳɸγͳͭmmͳΰƺúʹͰǹýͭmmͿȿĺͭmmͳǹͭmmͳºͭmmͳ³ͭmmͳ˹ǹŴͭmmͳ°ǹͭmmͳɸǹͭmmͳͭmmͭmmijĭmiiZrvbbbbbbbbbbbbbbvrZEXcddZIBBBBBBBBBBBBIZddcXE (08 '@UdiicT>% 7SmkQ4 @_~{\="Bb¿_?"Bb¿_? "Bb¿_?  ',,,,,Bb¿_?,,,,,' %8FLLLLLLb¿_LLLLLLF8%!;Rdlllllll¿llllllldR;!/Mh¿hM/7Wv¿vW78XxɸxX87Vu¿uV7.Kf|¿|fK.9Paiiiiiii¿iiiiiiiaP9 "5CIIIIIIb¿_IIIIIIC5" $)))))Bb¿_?)))))$ "Bb¿_? )1333333Bb¿_?3333332)4FQSSSSSSSb¿_SSSSSSSQF5Kapssssssss¿sssssssspbL]x¿y^g¿hg¨hcdTl}~mU?S_bbbbbbbbbbbbbbbbbbbbbb_S@ (08 VisoaO3A`˽̯tV8ITUNB7, 8VthJ,460%-IcwsZ>6K]nwxyyyyyyuhYE- (08 (AVejjdT?% +8TnlQ4!A`|]="Bb¿_?"Bb¿_? "Bb¿_?  +00000Bb¿_?00000+ (Ugppppppp¿pppppppgU>#1Nj¿jN18Ww¿wW88XxŸxX86Ut¿tU6,Idy¿ydI,6L]eeeeeee¿¬~ge]L6 2?EEEEEEb¿ì|eM6  %%%%%Bb¿zcI/"Bb¿}ſv\A% /8999999Bb¿hǼmO09LWYYYYYYYb¿_jʹtT9Pfvyyyyyyyy¿yyyvfPa}¿}ah¿hhhb~~bQhx||||||||||||||||||||||xhQ (08,CVacbZI2%%%%%%%%%%%%%% =Xpv`EEEEEEEEEEEEEED<- +)IgpeeeeeeeeeeeeeedYG ,Llõt\ ,Ll̵k-=HLl̵ůoEYgjl̵nYr̵|be̵pppppnbNgʬl_aPPOF6e̵j_aA0/(Ys̵v]_aA! F[hkl̵uki]I_aA!.?ILl̵uUNH?_aA!!,Ll̵ujnfT_aA! ,Ll̵}j_aA!*7BMl̵w_aA!DU`kv̵ļ}_aA!\q~ɽx_aA!m·|g_aA!tǻvj_P_aA!o{odXfopoaA!a}ti]QKhaA!PftwmbVK?5TtaA!9KUWOD8-!5Tt²}^>-671&-KinS6"?[s|mW@' .FYdffffb]R@* (087Qftvvvvvvvvvvvvvvvvvyq_K2Eb~x_C%LlkL, Ll¿ƩlM- Hfɺ϶~bE';Vm}̵żoS7)@S^_pͷvov\B' '6>C^u͹ȿ}cI/!'1H^t˽ɾ|fO82-%*8AGMU_hrȷ{pg^WRMC2DV`flt}Ƹ|wql_JZq˽w]jûioƿihy^\x|fLKaptn_O94FRgeG=,CXfiiuvvvvvvvvvvuiifYDWqqXcdfǧgdeXrsYEZhllllllllllllllllllllllh[F (08*AT`baYH2@VgmmiZD*2'=]}ãcC#6HSUMB6+ =]}ãcC#+35/$ ;Zx}_@! 0Mf{}jQ5 9N]cc_Q=% + (08+DYhmmfV@& +:WqmR5  """"Bb{\=""""! '6@BBBBCcþ~^BBBBB@8( (?S_bbbbbcþ~bbbbbb`UB+9Um~þoW<%DcþfH)(Hh«kK+(GgþkK+'@^yþ{aC&?Tbfpssssssþ~ssssssqfaS>SlþkR`~þ}_c¢bbȺϲaXs˶ϲqVF[koooosϰsϲroooooj[D/@LOOO\{ǨoϲrRWhniZK7#-/2MioϲrRnvdM)8K^y̵xoϲr]|y\,-,Jf~ydlllllllhZE,3SsrX<4Tt̬dD%"1:Tt̬ǧhH(;NZ\t̬˫kK+ Qhx||̬~ήnO/a}̬x}αrS3g̼ķxX9g̹½~^?_|̬v£dD%Oeuyy̬yyssлȩjJ+ 8KVYt̬lY\{ɳήoP0.7Tt̬lnm˴vX:4Tt̬ȸýcD&+9DTt̬ϰȪmO1FWbmx̬ʯŧдwY;\rĸ̶ľdG,mʾħ|ɫsX="sĸ˵|pȺiN5lw|mc˰zbK5`{|qj|ë{_WtxbONdrtk_rŭ~fNGa{Ƚ|e7HSTMeƯhQ94Nh̼t+35HgjS;$!;UnƳw "A_zlU=&(A[rl3Md|weR?(.EYmlY 7Oaki\J8&,@TchcS@ (08 (BYinnnnnnnnnnnnnnnnnnnnjZE7TorW?^~a @`ãc @`~` @`ƭmS @`gggtͭmggggggcU@ @``GTtͭmMGGGGGD9( @`ffftͭmfffff_N8 @`ͭ{eK. @`ͭuV7 @`ƹyY9!AaͯxX9%DdýͭkO1)IhǸyoootͭoooooogU>#-Ml̳tTOTtͭmOOOOOI;(1QqίoP4TtͭmM//////(:XwʪkOOTtͭmOOOOOONE6Db¤ooootͭooooooonbNNlǸͭ{b^z˭ͯmkƯomkc~t]Qf{rfffffffffffffffffffdZG9N`ifYFFFFFFFFFFFFFFFFFFFE=. (08"RlвkQ]|é{]`ɿ_^}ƫ|]Sm̷mR@VfkkpũpkkkkkkeV@);GOiͳ~a``[[[XK;)#8Ne|ʻ{{{{{{{veM2Si}бcCdǰбcCkïбx\>gбyyyyyyyytcL1YqбqYY``YYYVI6D[oxtбqQA``AAAA=3".CRXpбqaaaaaaaa\N:'3PpбzgO0Ppбz]0Ppбa0Pp±a-LktX#@[rtttttttttttttttto^G.EWabaWTTTTTTTTTTTTTTTPD1 (08 $=RaffaR=?AAAAAAAAAAAA@8*4Pj~~jR^aaaaaaaaaaaa`VD->]|{m}qZ@ @`jL'@`pP6EM`ǴoOOblmzǧeHd|vttzǧtttrfR9phZzǧgTTSJ:%rǩiZzǧgXXXWN=oxxzǧxxxxvjU`xǧgK]ggǸp1?G`ǽp!@`ǧi!/@`}}}ǧ}}}}{nX2%.NnƦgG'&5?@:.! -MlcC$ + %CapV:7Sl~{o[C* &>R_ccca\RC. (08 '@Tbff_P:9QdnleYE.8Tm|gMJf~sZ>! "BaxYUshI,,,,,*"$Ddļ|\^}ɪkLLLLLLJ?.$Ddļ|\iĿllllllli[F/@Kdļ|\xδsYG\jmļ|lĬeZtļǧgeļèdgǯϴqWdļǽ|eXCWpļ²pQ1CWdgļ­qR2*;Edļ|ǿfI+$Ddļ|uwʼ|gR:!.Ddļldy͹zdO:'@:.!1OluX + $?ZrgJ.EXfswyyyyyyyyyxpdR: (088N_ggeXD+ *4=IVcicT?*-Je{qX<,5?IR\fslX?$6UteFKT]gqzkN08XxǨhbjr|DzuV68XxȨysT4/:XxȨ{dI, 6KY^xȨļήyl`N7Kdw~~Ȩήqg\OB4!YwȨήnN>8=@<1 ^~ȾsήnPTX\`[M9^~ȷsήnotx|yfMVsȨ{sήy[F^pwxȨήa1DRXxȨ¾c(8XxȨĿγvZ +8XxȨή~zvo_I%5AXxȨήngc__ZQE2=Q_jxȨäήnNdwxfWAQj}ɽήnYwoT_}·tήn_`cǼvjsήn`a]z{odXSsή`Njui]QF:Ssήź}^=UhqnbWK?4(1PoˮsV(G]}ĤpŻzodP =]}ĤqͳpP7)=]}ĤʳsS39HR]}ĤϯpP0Repzĭ»ˬlL-fɿqlllzȨhI)st_LL`ĤeE%s¸xmb_WQSQgļ~_@!jyodYODMbprqo˴vW8\t{qf[PF;1B`z̭oP1GZff]SH=2(*JjågH) +.=FG?4* )Ih°|_@!&'! "@_}iP55Qj|{jU<# +$88871$-AQXXXXXb¿_XXXXWO>) &AZnxxxxxx¿xxxxxwkV=!2Pm¿iL-7Ww¿rR27Ww¿rR2"8Rp¿kM8#6Odrt}}}}}}¿}}}}}|treP7Eb|¿}cELl¿mMLlmMIghJ=Xo¿pY>+B_w¿v\C,-Lk¿iJ*.NnʫkK+,Lk¿iJ*+B^w¿u\@-BXgllllllll¿llllllllhZDUo¿rW`¿caĤd_~bSmoU@UdiiiiiiiiiiiiiiiiiiiiiieWB (085L]efdXD2222222222222+ *GbyrYQRRRRRRRRRRRRI:% 4SrgqrrrrrrrrrrrqfR:6Vvƫ~fI+#6Vv˫qQ1/@KVv˫ϲrR2G\jmv˫ϲrR2Zt˫ϲrR2e˭vbbbbboϲrR2gǸxXRRRRoϲrR2d˫trrrrrrϲrR2Wp˫ϲrR2CWdgv˫ϲrR2*;EVv˫ϲrR26Vv˫¾ͲrR2-9Vv˫¾pQ1:KWcv˫¾~ccccz|cM#4Onfnµ¾~^>::Rrplr¾~^ZZZZsίo`~{nab¾~zzzzzz˫lRj{wj]PDb¾ťf=P]`YM@3@`ʻȷa$4>@;/"9VspU  ,Id{x_D7N_lx{{{{{{{{{wl_K3 (082J\fgf[H=@@@@@@@@@@@@?7( 'D_wu^\````````````_TA*/Onlz~nW<1QqǯzgH"1QqϯlL1@IQqϯ̬lLI]ijqϯ̬lL^wϯuuuuu̬lLkϯ_UUUt̬lLm_NNTt̬lLkϯnnnnt̬lL^wϯ̬lLI]ijqϯ̬lL1@IQqϯ̬lL"1Qqϯ̬lL(2QqϯlL7FQ[qϯggggjdFPcoyϯ_GGGXl||lVe}Ƚ_?'/Oogq_AAAQq®orøaaaaasͭmfyncɩjXq|qf[PaãdCWdf^SH=Fcþ÷ƻ̬lL#Ccþƻ˫kK!.CcþƻȨhHQ]_WK>2@_}ɳz^%4=?9-!6TqkO  )E^qr[@0EUeoqrrrrrrrrodWE. (08#,6?LZef\M_hhfZG. '.8AKT^iwwczt[?"'6>FMV`is|{hI* +AS]elu~ȫkK+ Xn|ʽ˫kK+ hοu˫kK+ nû˶viu˫kK++& i˶veXUu˫kKKKE8%]x˶vjkku˫kkkkcR;Kaoslk˶z˫hMRjy}}}˶˫wWb˶ʹyYi˽˫vWi˸˫~hMa|˶v˫kjjjbQ;Pfuxxx̵xxxru˫kKJJD7$9KVXXpбrXXUu˫kK+*& .78UtͭnN8Uu˫kK+ &B`~ȩiJ5Uu˫kK+&&#;SlżcFFUu˫kKFFF>/,>Phΰuffffu˫kfffe[HDXj}ƾ˫u^Wq˫lcĬ|ưpehn\x~j]w|bKbyvdRJ_loooooooooooooonbN5L^hg[I72CMOOOOOOOOOOOOOONE6 (08-H_pvvp_G--29AIPX`myvcO7:XttXGLRX`how|dH* @``glqwpQ1 @`yƺqR2#@`ûfI+/@K`ľ¾reR9G\jm¾~laUI9% Zt¾~^C7-,%e}eb¾~^MMMLB2gmm¾~mmmmk_Jd¾x^Wp¾jCWehȬl+;F`¾i @`¾t[*8C`hh¾~hhhhfZGDUamĦhb¾~^HHHF=.[qɿfb¾~^>(('kȻt[b¾~^>qĸwj\Gb¾~^>ktgZM@Bb¾~^>[v}pcVI=0#Bb¾~^>I_otl`SF9,"Bb¾~^>2EQTOB5)"Bb¾~^>(240%  @_}y[< +6Rk}hN2 %>Saee`P;" (08"^~¢v|g#>^~¢v˫ǧg/@K^~¢v˫ʪǧgG\jm~¢v˫ʪǧgZt¢˫ʪǧgf­˫ʪǧggǭ˫ʪǧgd§˫ʪǧgWp¢˫ʪǧgCWdg~¢v˫ʪǧg+;E^~¢wʫʪǧg>^~¢wȨʪǧg>^~¢ťʪǧg+8C^~¢ãʪǧgEVam~¥ƽ~ʪǧg\rƻ˵wʪǧglͮvʪǧgrźvʪǧglyͳzvǪǧg`|~rr¥lrǧgOesul`]}ʱz]czyǧg8ITUNBZykOM^ggeyg,4601Ni~qW>3AGGSp|`";Qhx{q\D*"')D]qzzvgP (088N_ggdWC>UemibT@' .Je{pWOkmT8 7VueZyaB)))))%9YyǨhc¤dIIIIIID7"9YyȨhlɹ|iiiiiiibR.?JYyȨhxΰiF[ilyȨléxZsȨɻ{eȬǬǻ{gɷʹȹyeȩȫrlllllʸxXqȨͶdaaaak˷wDXfiyȨ̶v,3(=]|ͯqR,ZrzcH5RllR5 )HgsT?^}}^? +*JjǶvV@``@ *JjʶvV@``@ #3P[]]]]]]vǰq]]]]]]]]VF19Tkz}}}}}}Ǩ}}}}}}}}}r^DFdƽpRJjνwWJjŽ÷wWDb}ǭɸmP6Pftwww̳̳wwwwmZA+;KVgwʸưrbWPA,DXer˶ȳ~odVAYqƳ¿˺nTfɻq¿tƶ`j¾uu¿uucb}¿vZPi¿zcJHVv˫xɩi`pw\I[gq|˫ɫxɩiIUenl^I_v·xɩiI9HOMB2oǻrxɩiI))/-%s{pdXxɩiI) +kti]RFXxɩiI) ^yynbVK?48XxɩiI) Laoqg\PD9-!8XxɩiI) 4EOQJ>2&8XxǩiI) (01+  6UtfG(  -Jd{qY=7N_ggdXD, (08*R^a}ĤĤǹyʶv%5?]}ĤĤǹyʶv +=]}ĤĤǹyʶv%2=]}ĤĤǹyʶv?P[f}ĤĤǹyʶvWlyĻüĤǹyʶviȼĤǹʶvrĤǹʶvn|˶vb~ync|ıʶvRix{rg[P\|Ĥʶv  ,LlfF& -MmǧgG' -MmͳǧgG' -MmͳǧgG' -MmͳǧgG' -MmǧgG' -MmͳǧgG' -MmͳǧgG' -MmͳǧgG' -MmǧgG' -LlfF'2J`y¿u\H0%B_w¿u\@"-Lk¿iI*.NnʫkK+,Lk¿hI*4C^w¿u\C4M`kllllllll¿llllllllk`Maz¿zan¿npɰpmm_ww_J]hiiiiiiiiiiiiiiiiiiiiiih]J (08 $=RaffaR@VhokeXC+4Pj~~kQlqW;>]||^zdD% @`bĥfF222222- #@`iǼ~_RRRRRRRKQ]_WI\r˱ƧjK%4>?9/EXkurŵƴaB ++?NUinT8$0>WmqvnYA'*@SdlhY[efhhgbTA, (08 (AWfllgWDDDDDDDDDDEF@7(6Snodddddddddddf_TA*?_~~nW< @`fH( )@`īkK+ 5FQ`ϲƧgH( Laptб¢cC#]yаqqĽ~^>$gϯokʷx^P=&gͭб{kS9c˫ˬcETl}©iI?R^a{̴dF&6@`~¾˸z[= @`ýɬrɭqR4'5A`ɷǺȺfI+BR_kıбǫƪrV:Yn|ʫǸʷcG+kʽɯèpT8rǺ˵yƮ|`D.#mɫ˿m[L@1a}rvɹDZƿvj]KPgvyobrũǴx`:LWYQbεƵʽn /89CcŸxizƮp*gīzǯkWDgæǯ~fvŭq]cʳs]vıpUm~űiʷz@S`cǧk˵u'7A`ǧk˵e @`yǧk˵u}zjS#0@`ǧk˵u][O=>NYdǧk˵uU<3#UjwŵĤk˵uU5hʾk˵uU5q·ɸ{k˵uU5mwʬqk˵uU5_{{pg{žek˵uU5Nfw|ti]lªvYk˵uU59LY\VK^|Ʈ}dKk˵uU5 0:<7@`hPKkƵuU5:XtlS;IhqR3-H_vygT?&>ZrxaF* 2I\hi^M:'-EXdfe\K4 (085K\ddbVB*2J\ghg]J3 +HbxpW<&C_ww`D' 5TseF'.NmnO/7WwĩiI)0PpȱqQ1%7WwɩiIFFPpбqQ12BLWwɩi_ffcpбqQ1J^kmwɩm|pбqQ1^wɩбqQ887.jɭƦбqXXXVK9kǺƦбxxxxufOhɩƦб|`[sɩƦиhFYegwɩzƦнh-=FWwɩzƦбb7WwɩƦб}}}}yiR!/:WwɩƦбq]]]ZO<Q]_WJfʰp%4>?9Ddm +;Wqx`+DYgjjjjjjjjjjjjjjjji^K (085L]efdXD-'+/5:?DJQY`^R?* *GbyrYCGKOTY_dipx|lW@&4Srgcfjnty~mQ46Vvƫxz[;#6Vv˫{[3"gǻǧtͭmbbb]N:d˫ǧаzgNWp˫ǧβy\CWdgv˫`+;EVv˫dzȹ_6Vv˫ǧĽrV6Vv˫ǧssssm\E*8CVv˫ǧg{Ǩi_`VE5DUalw˫ǧgsͮo~raN[qǻǧglʴ{clǧhrûorƺǧƨαqly{ǧȴήoa|~sgiDZȽªɫlOesvl`UXwɾd8JTVNC9Yx÷v|xZ,560%2PmwmbXg~jN %C_x|pdYND:Qes}yhT=3K_klbRF;0&$8HV]_ZM;' (08® (BXhmmhXBCCCCCCCCCCCCCCB:+7TooYbcccccccccccccbWD?_~~tqZ @`i(@`ím3EP`ϲlK`osϯ|b\xϯrrrrrrrrrrpcOfϯ|nZAgϯmObvVTl}ϾĵίrS?R_bϴίĦhJ&6@`ͭȹuuȻ~_@ @`ʪǫqǫsV7(5B`ǧȹʸdH,BS_lſäǪĨpT8Yo}ɿżǸʹ|`E) kɼ˴˱ƽmQ5rƹ̬px]C1#m«p]MA2`|~qzͰǿ°xk^KOfuxnavȸɷx`9KVXQdǯǾ}ƿn.78Cbpcuǯq:WqwfUI[mg+DYn|}vwj[K:.ASdrmT,AS]][edYM@/&8GUbhcU? (08î/Iarwwp^GIKKKKKKKKKKKKG;)4K^pyzzzzwiXB &>SbgbUG9&1DSYZZZZXM>+ (08Į $=R`ee`Q<]{{]mnS6 @``{}]>#@``}ȿ_?/@K``}è¿_? G\jmm}ã¿_?5+Ztã¿_YTG3fĽ~¿wyr`Hgǿ͵w¿tWdn~_Wpưzt{aCWdgįx[+;E`vdL @`ƩkK7!/@`˶̹~aD%,#o}qdn{˷wj]SKA1cymktzrj]ITk|the|ɺ̿v]>Q]_WTsŸi%4>?9UuǾswk +/Nj}qdWZgt{`#?[twm`SF:=JWdqy~iN/G[giaYOC6) -:GR[cgaQ; (08Ů7KY]]YL8 4K]ghg\J20Kdv}}weM1)E`xw_D)2',IgħlN1I^kmdYMB6+  7Vs̸}_B$1BLNF;/$ ;[{ȫpS5$,.(8WudF)   .JdxpV:7L[djfXC* (08Ʈ +&@VgmmiZE:QdmkdXD,4QmrWKgrY= <\{bUtgG(=]}Ĥd]|ȩjJ8888870")=]}Ĥdf¿cXXXXXXWM<5FQ]}Ĥdn˷yxxxxxxxviTLapt}Ĥtz˭f]yĤogĴͽžogʹ̶hcĤļ~}}ί}{nWTl}ĤȻĦkƧi\RA?R^a}Ĥʺвvɹ~aB5'&6?]}ĤéþʭrT7 =]}ĤDZɬ¾eH* *7C]}ĤǷαvY;DUal}ħƪ¥jL/[qĸrƻ˰{]@#lʿ~iиjS?* rŹ}qpſǮlWD5'lwkex­p`QE7a|~rfgtʽƱ|nbQOetvl`Wqǵʷ~f8JUVODcȿvfyĵt-571Een\L_rıv >\wxeSA3FYlk0Kf|vi\K9',?Rbo|oW9O`ifYL?1 %7ER_gcVB (08Ǯ"?8PpŷtZA]{uW +Igv`G3Og{{eK;Tjq]I3":Nbptttto`N8'=TdkgXD0 !5GQTTTTQE4! (08ɮ $=RaffaR=$5M`jkj^J24Pj~~jP4)Fbzx_C% >]|{]=5PolL5553+ @``UUUrˮnUUUUSH7#@`uuuuuήuuuuurdN/@K`ή{`G\jmεiZtjfήdgǿή|lUdȨήʶvV?WpȨήʶvV6CWdgȨήʶvV6+;E`ȨήʶvV6 @`ȨήʶvV6!/@`ȨήʶvV6]|{]=Pi}xiN1 @``@\{yZ:#@``Dc¾`A"/@K``NlȺŦhJ+ G\jmmgwϱίrT5Ztåȹ|^B% fɸ|æmP4gǿŪqwʹ{aH/d̵~ppçu\EWpƾʻr\CWdg϶o+;E`ɼͷx @`Ǩt!/@`ŽŦzcUfmjcUA( /MhtZPknT88WvfZyaB#9YyȨhbãdD====?9-'9YyȨhjǻ}^]]]]]_WJ93DOYyȨhsϳ}}}}}}}tePJ_nqyȨqǨ}b\wȨǽkfȱθ̸Ħig÷̵Ǻ~_cȨβ̵xϰsUUmȨľ͵¥iK@T`cyȨɮv͵ʵz]@'7AYyȨpкmP3 9YyȨou}`C& -9YyȨzyʫs|xhP5;KWbyȨ̵x\YM:# ThtȻ¶ͳfJ1! gɽħɭvZ>%r÷z˱ĽjR<&pusǷ̱iSB4d|pk{Ȼqím_NTl}vjaxɵw]sĮ{d?R^aYPoïtaJ`{ŵt&6?A;SsŶo[G4MdxĴw !-Li|iUB. 6K`um"=Vm}n_P<) 3H]n|rZ)@Ucg`RC4#0BQ`ifYE (08Ϯ";P`ffbT@222222222222222+1Nh}mSRRRRRRRRRRRRRRRJ:;ZyrrrrrrrrrrrrrrrqfS=]}Ĥf"=]}Ĥq.?J]}ĤòrF[il}Ĥ͵nZsĤ§t^eĬj˰{gccccYHgƦƨn[HC<.eĩžubL6 XqĤºƪȵycM8DXfi}ĤƦ˼{eO,[r̲ɱ¿̹ͶkQk˹u¿˽sʱ|]pɻ¿`i¿uYXoxaIBYq¿xX8,Jg¿mP21BThtuuuuuu¿uuuuuuukYC2I^loooooooo¿ooooooool^I[v¿v\f¿ggƨhdeVopWBVcffffffffffffffffffffffcVC (08Ѯ %>UekkgYC*"/@T`c}Ĥoϲ˵uU5'7A]}Ĥoϲ˵uU5 =]}Ĥzϲrk˵uU5(5@]}Ĥϲrk˵uU=0BS^i}Ĥϲrk˵ud[J;Yo|ľήpk˵wgTkĹȩjk˵irȽdk˵um}|γy\k˵ɷwa|vj{¥kNk˵ɶvPfuxncoĭz]Kk˵̴t9KVXPaƮiOIiƾ̮p.78DdjS;Bag=[wkT=%8UorY0Jd|wfT>')BWhswwwtiXE7Oaki\K:'*=JTWWWTK>, (08Ү1I\hji_M54K^iji^K3&+*"$B^vzbGEayx`D6DKJ@/ ,KkpQOnmNSaki\H3 -MmʳsSQqʰp`o~u`I. -Mmͳsjjqаp}uY; -MmͳаźaA -MmͳаȺ}^? -MmʱгlR5 -Mmͳ¸}k[E -MmͳаyxrW#3Mmͳsszаqff~`KQQYxcevWQQMA.%@Wiqqq{ťqqȹyqqql\E+3QmťȹrV9:Zyűȹ`@:ZzaA8Wuťȹ{]>Ie|ťȹ~hMTséȹwXVvɺzZUt̷ȹxYJf}ǪȹiN9PbkyϷȹykkkkdS<.Li̻¿ȹy__]RF9&3Ssɶ¿|mU;2Qp¿eG(.Nn¿kK+.Nm¿jK+4Gd¿}aD4M`kltvvvvvv¿vvvvvvslk`Maz¿zan¿npɰpmm_ww_J]hiiiiiiiiiiiiiiiiiiiiiih]J (08Ԯ 'AWgmmhYC*,KPPPPPP]}`G\rzgQ8(BXippppppp¢b^t~cF'6So¤kvmM-=]|ɲ}ͷjK+>^~ϱĩʵu\@#;[yĦĺır]H02Nh}̲¯ǼpZE3)";P_emǺ¢ʹsdZRF47M^jxĽ¢žypaKIdzǻ¢ʻx\UtĴ¢ǿeXxŹþfydQn}t}^\jxqWB[t}www¿wwwwww|t_E/G[r¿rXG2>^}¿|]=>^~¿}]=.@Yv¿uX@.E[jnv~~~~~~¿~~~~~~vnj[EXr¿rXc¿cdĤdaaUnnUAVcggggggggggggggggggggggcVA (08ծ ,479;=?ADFJNRVZ^_VE0 +#9JTWY[]_acfimrvz~r]H/6Peswy{}u[>!&Eb}gG( ,LkhH( +Kk˺¿ĥy^A" +Kk˵¿ʫoaL2 +Kk˵w¿̲tU6/Ooγt¿ĺ|]@#8Vtͮn¿~¥jM0+Daƨi¿vβwZA()>Wqƺb¿inV@.AVkˮsb¿_y̴m[ETn˸fb¿_kȰrWažq]b¿_]uŴbc}}}}}}}}b[w¿sXJbz¿v_F5M`~¿}]I24DWs¿rUD4Malnqxxxxxx¿xxxxxxpnlaMaz¿zam¿moǯokk]uu]H[fggggggggggggggggggggggf[H (08֮ (C[nvvvvvvvvvvvvvvvvtfP64Ro}bD&!:ZzkK+(MjkNVuvWVv·wWSqþ̵rTF`vƺ̵xfM3IZbbbbv̳u̵ub}y\/>ITewét̵}}a0H[gr˱̵_A]uƵʶ|]Lkǽ¿oSNnĽ¿y_CGd¿|`K39Rk¿}]=5EYw¿uXE5Nbmnw~~~~~~¿~~~~~~vnmbNc|¿|co¿oqDZqmm_ww_J\fggggggggggggggggggggggf\J (08׮ $=RaffaR=$9N^eebUA(4Pj~~jP4/Kf{nU9>]|{]=8XvbC$" @``BB[{ŦfFBB;-#@``bbb{ƦfbbbXG0/@K`{Ʀt]C&G\jmƦmO0Zt²rR2fƲβrR2gǿƦβrR2d{r{ƦβrR2Wpjb{ƦβrVDCWdgƦβqY+;E`ãβi @`­m!/@`ĻmQ]_WJe˶ydOhǶt%4>?9GguaL;Ti}IJw +"@^yq\H3'Saff`Q<##############5Rk}iOCCCCCCCCCCCCCC>2 ?_}zccccccccccccccc\M7"Bb¾~ydK#Bb¾vX/@Kb¾û{[G\jm¾Ȳz[Zt¾nRf¾ɸ~rrjXAgǻϰdL?+d¾ĨhH(Wp¾¾ŦfF&CWdg¾~nʶãcC#+;Eb¾~w̭qq`@!"Bb¾~ĥhhý}^>"Bb¾~ǻƺ{[;*8Cb¾вɷxX8DUam¾δtT5[q¾ŹϰqQ1(k˿ͭmPOF6qŹ~rpppppwɩppocOkƦ|b`{~°nNdsuleůo7ITVNbk,468Tmt\ (@TaeeeeeeeeeeeeeeeeedYF (08ٮ4L_jkkkkkkkkkkkkkkkkkkkkjaO7Eay|dHOnrSPpʴtTNnqRD`xͳƻʹ{cH3K^i}Ⱥȹn`N7)FazÿŭŽsZB4!1QpëȰĿx_F-3Ssɺì}˸u^E,.Ljʸª˸rYA(">Wn̶ʸnU:*AYpɯ~Ⱥ̳eG(+CZr¦˱qȬlL,/EV_`z¿kvhI*&B\r¿vaH,0Om¿sU63SszZ:3Ss¿yZ:FXi¿nXF[s¿s[j¿joįonnc}}cOdpqqqqqqqqqqqqqqqqqqqqqqpdO (08ڮ$2:;=Q_cc]NFFFFFFFFFHD8)(>PZ[Zj}zffffffffffhbTC-;Uky{z}pZ@#*IgþkL-.NnþDZqQ1.NnβþÿħkM..Nnβþʭ˹}_A$.NnβþŽ¨qT6.Nnβþ~βʰ{aF* .Nnβþ~ê˸iO4.Nnβþ~wɼqWA8/ .Nnβþ~zl`WL:.NnβþɵŵvgQ.Nnβþ˼³~b.Nnþɾżj)Gdwwg8Vs¿tY>^~¿|taH>^~¿}]H35DYw¿uXE5Namnw~~~~~~¿~~~~~~vnmbNb{¿|cn¿opDZqlm^vw_I[fggggggggggggggggggggggf\J (08ۮ (@Tbee_O9)))))))))))))% 8Tm{fLIIIIIIIIIIIIID8%#Cbw`iiiiiiiiiiiiicR<#%EeŻ{{iO2'EeŻ{yZ;6EMeŻ{ɼ|\%sǾ~eeeeeeeeeeeeaR=oŻ~kQaxŻ|^K]ggŻa1@GeŻ˰`%EeŻǾqV +%EeŻ{~{α}ppk[D&4EeŻĩqUL@.AQ^jŻαxǹeI.Xm{ŻķjɭuY=!jͰwruļiL/qȻľ̰wZ=mxȭžhKa}thz̰vYPfvyocVXwžf9LWYRE9Pn}y~j /893('C^turokhda]Zp~b +1GYb`WROKHDA=FbzwgQ-;BA92/+($!5L_ih\L: (08ܮ $=RaffaR=??????????????>5&4Pj~~jY______________]R?>]|{v|lU @`d#@`j/@K`ŵiG\jmť{`Ztťþ~uuuurdNfťý}xxxufP7gǿťļ}aCdŸŻiJWpŽǽʪjJCWdgťɷȨhH+;E`Ĥʵ}ƦfF @`äϱ}ĤeE!/@`þ̬£cCQ]_WJWwĶ|fj}Ȳ~_%4>?98XxxcOQe{` +2Ol}n_K68McyrV$?Woyo`RC2 6Lavo\E*BUac[PD5' 4IZcaUB/ (08ޮ#=ScjjfWB)8QeppdWE.2OjoV<\zwZ;*JitU5 +"Bb_?/Kk˶vV6///)"Bb¿_OOOk˶vVOOOOG8#3Bb¿ooooo˶vooooodQ=O\b¿˶fRjz~¿˶rb~¿ƴtg¿ʫƨpg¿ϲƽwa_{¿Ⱥfvϴwe\JNdtw¿wƨmŨnO>07IUb¿_uδx˷~aD',Bb¿moƩpS6)Bb¿~˭ɸ~bE( 8GRb¿ǻǪpT7Pdpz¿ȶ̵εbE) e~źq˺nT:'qʾwǾzgTA0%qø~r~Ǿ˺mZNB5gwnz̻xl`OYr|pezñǴ|eEYeg^Smɹso˿t,;M`rl7Og{rdWF4#!3EXgsrX +"9O_eaUG:++=JVbjgYE (08/CQVVVVVVVYTFJ[eedYF/*D\ovvvvvvvyr``ws[@#6TqyojK, <\|tŮnN.<\|ŬwʫkK+ <\|Ĥʱ|ɪkL-<\|Ĥ̵ḵtU6<\|Ĥǹujĺ}^@#<\|ĤƸwλåkN2<\|ĤǺů̲z]A(<\|ĤͮɸlU>( <\|ĥƬūɴkTB4$<\|Ĥľ˱ǯo^P><\|Ĥ̸qŮ{kS<\|ĤIJt_yȶc<\|Ĥȼ`bwéi<\{zzzzd5SolT(B`iW?(@`dD)AUcvzbS>TnkQa|]d`c~_XroTE[jnnnnnnnnnnnnnnnnnnnnnnhXB (08 $=RaffaR=$,E[immeU>$4Pj~~jP4;XskO2>]|{]=2DdyZ:23-" @``RRReŻ{[RRSL?/%@`krrrrŻ{rrrsi[G2BL`Żt[J^kmŻg^wƨijãŻƼakǻãŻϳvWhãŻŨlM[sãŻ~`BFYegúŻ~^>-=F`Ƽʹ|]> @`ûǩ̮rS5!/@`˷{ÿgI+ Uivɽ̸żʸgL1hŸΰ̲èqV; rŧȽǰ{`E0%oƼʱyiYNC3cyȬýɵwl_KTk|thɸ̽x^>Q]_Wp˾j%4>?Ooupj +(FbzxiYTdty_5Mcw{zwk\M=9HXgr}zfL 6KZ`\^gdYM@1!,&'2AWgllfWA1#4QklR5BPVonYO='>]{}^D\nv~}xjT<$ @`aTpiQ9 "@`a`~~fN5.?I`anŽë{bI.F[hllͰuZ?YsǼɼkPeŪͲ|`gǷʹèkdjXqw^DXfigJ,]|{]=4Qj~}iP3 $=R`ee`Q<# (08"3@JKD6@VejjdU?8HPPG8'#;O]ikbOSmlRPdppdS@)4Phz|e_}|]d}mU: ?^|za_udE& +!6Ec¿vlƩiI7"7Obm{ȻʹmcP8Gc|βƼ}dHPpqRQqγsSQqϯγsSQqϯγsSQqϯoggg¿gggnγsSQqɯoYYb¿_YYnɳsSOnyyyy¿yyyypQE`x¿ybF4Kg¿bL5'Gg¿bB"#B`}¿y\=5Pgw{{{{{{¿{{{{{{vdL1/@JMY[[[[[b¿_[[[[[WLJ?.G\illllllll¿lllllllli[F[t¿sYf¿ehǧgfdYrqXEYfiiiiiiiiiiiiiiiiiiiiiifXD (08 &>Saee_P;"1J]ikkaN76Rl}hN2$B^w{cH*#"!@_~y[CCKkqRCCB9*#Ccþ~`cccm˳scccbVD%Ccþ~~ͳqY2BLcþ~ͳhJ_kmþìl^xþļͳ̬ljþļͳ̬llǾļ|ͳz̬liþļͳ̬l[sþļͺ̬lFZegþļͻ̬l-=Fcþļͳ̬l#Ccþļ|ͳ{̬l"/Ccþļͳ̬l=MYdþļͳ̬lUivþɽ̬lgŸļͳ̬lqͳkn}wpͳs{acyl`aquummͳsfqqobNSk{uh[OBFRUUPmͳsSQQPF6>Q]_WK>1%)355MmͳsS310)%4=?9-! -MmųsS3 +  +JioP1"?[sw`E( +.EXdee[J3 (08 8M[``[N9=DDDDDDDDDDDB8(1MfyygN[dddddddddddaT@(<[yzawmU9 @`qcD% @`vħgG'*9A`vʱǧgG'CVacvʪǧgG'XpʪqqqzǧgG'gʪ||||ǧgG'lóʪǧgG'kʼǧgG'a{ǹǧgG'NcqsvʪǧgG'7GQ`vʪyyyzǧgG'*@`vʪssszǧgG'"@`{ʪǧgG'2@J`ʳǧgG'K^ir¶ǧgG'axɿʪǧgG'oɿʪǧgG0rʪjggzǧg\Jjʪǧw`^xyrʪǧoJ_lne[uDzr2CMNGTsq&-/-Kf}d:QdmnnnnnnnnnnnnnnnnmbO (08";P`ffbT@CGGGGGGGGGGGG?11Nh}mSbgggggggggggf\J3;Zyj~w`E'=]}ĤznO0"=]}Ĥ~DzrR2.?J]}Ĥ~®ϲrR2F[il}Ĥ~¢ϲrR2ZsĤ¢nnnoϲrR2eĬ¢fffoϲrR2gɪ¢ϲrR2eĩ¦ϲrR2XqĤѲrR2DXfi}Ĥ~¯ϲrR2,NYe}Ĥ¢ϲrR2VjwĽ£ϲrR2hƺϲrR2rqQ3ospj_LdywyaUl|~thkn?Q]^VMmɰp%4=?8Kjm +#A]vx_0H\hiiiiiiiiiiiiiiiih]J (08 :O_ffbUA666666666666666.!0Mg|nVVVVVVVVVVVVVVVUL<:YwvvvvvvvvvvvvvvvuhT<\|ťf .<\|ťo9KW\|ť̿pPfuy|ťťja}ťĽ~pYiŹ͵w______^TCiż̮pTTTTTRF7)b~ťttttttpaK1Rix||ť|z˶x]?' (08 $=RaffaS>%.G\jmmeT="4Pj~kQ5=ZtiN0=]{|^?9FewX9996+ @`aYYYgǹyYYYYUG4"@`uyyyyǹyyyyysaI.?J`ǹuYF[ilǹ`Zsż`eż`gż{{{{`eżĤd[gv`XqĤds}^DXfiĤ¬nS,]|{lpQguV6 @`n̲rRiɷwW7"#@`nβrWiɷwWMQ]_WJ>1% 6Vv˫kK+ %4=?9- 6VvūkK+ 4SrgH) +HbxqY= 5L]eecWD, (084K^hih]J2 :Qcmmj]I0 'E`xw_C-Kg~v]@"0OnlM5UtiI) + + 1QqɯoO6VvʪjJ***)"&1QqϯoO6VvʪjJJJJI@15DLQqϯoOLVvʪjjjjjh]JMalmqϯomk^vʪw^b{ϯwvʪlnϯvʮnpǪvʫllϯvʪx_^vϯrvʪkkkkki^JI[fgqϯovzzzʪzzzzsaI20>GQqϯ}ʪuX: 1Qqϯʺ_?!.9QqϯȻ¿_?Q^`XMB6HhȾ¿_?%5>@:/$(HhƸ¿_? + &Fe~~~~~~y[<;Wpzd^^^^i|{gN1+CVcff^M>>>>P^cc]O:! (08 $=RaffaR=259]|{nrux|nQ @`ɵwW#@`ƹsT/@K`ʿǭżycHG\jmʶǧþ~f]L6Ztʶǧ`@2fʶǧ¢bB"gǼʶǧĤdD$dʶǧƦgG(Wpʶǧ˫lM-CWdg˵ǧбqR2+;E`̴ǧͶwW7 @`аǧǻ|\= @`ˬŦaB"+8C`ǧ¤ŦgG'EValãþͱʫlL-\rƿǻϱtV8lƸʴ̯ƻ~`BrŹίʬŻŧkLlŦǩϱuY`|~r¼ûʹļkOesul`xͱĽͲx8ITUNYy~°x,462Plxxzogsl%@Wm}g^ij_PH_qysi~lV*@Ucg`PAJJB31ESYUQagbS> (08,DWdfe]LEFFFFFFFFFFFFFC7& =YqybefffffffffffffaS>% (HgskQ5 +*Jjƶ|^?*JjʶaA3CLjʶͳaAK_kmʶͳaA_xʶͳ{{{{{{aAkʶͳaAmǰͻaAjʶͺaA\tʶͳwZ@KkmP +&Ec~ooy_B7Qh{u\Xhv}~~~~~~~{oaL3 $;N`jh[G=KX]^^^^^^^\QE4 (08 +%>SaffaR=$/H]knf[K55Qk~jP4>[uxbH,?^|{]=IgsU6%!Aa`@Tr˸xXOA-"Aa`A_}ʬptm[C,/@Ja`KjľqYA)G\illhtϲnV<" [uĦ˳iO5gɶ|ɯ|bH.iĤŨ©u[AfȷĻnRYrƹε}aEYfiũo-=GaǴt!Aal$1AaǻoZ>OZdĽƻ{[BVkxķĽƻ{[;iɽĽ}ooooƻ{[;r¶Ľ}]XXfƻ{[;ovĽ}xxxxƻ{[;a|{oddĽƻ{[;Pgx|sh]QFdĽƻ{[;:MY\UJ?3DdĽƻ{[;!0:<7,!$DdĽû{[;#Ba}}}}}uW88Tn}h]]]]l~ydJ. (AUcggaQ===?S`cc]M7 (08 $=RaffaR=--------------*!4Pj~~jPMMMMMMMMMMMMMMJ>,>]|{mmmmmmmmmmmmmmmhYD @`qV#@`a/@K`ãcG\jmʸ`ZtȫmTfkx˸hhhhcU@gǭoʪzdOHE:(dʼ|fQ;#Wp~ɺʯſ~hP8 CWdgi~ʪ}eM5+;E`ʪ«{cK @`«ʪx_ @`ìʪȽl+8C`ŽʪjnEVal}vʪjn~d\rƻpvʪjYq|gQlevʪjKXeh`O:rźskkvʪkkkkki]Jlyʪw^a|~rkkOesvl`Umʭm8JTVNCLkk,560%B^ww^1I]ijjjjjjjjjjjjjjji]I (08 $=RaffaR@BBBBBBBBBBBBBA9*4Pj~~k_bbbbbbbbbbbbbaVD>]||~qZ @`j#@`¯o/@K`ȹϯoG\jmȹϯoZtȹϯofȹϯogǿȹϯodȹõãϯoWpȹããϯoCWdgȹããϯo+;E`ȹããϯo @`ȹããϯo!.@`ȹããϯoQ]_WL@HhȹyYcϯo%4=?9.(HhĹyYbĽk &EdtVXvx_;VoydIKf{vcK*BUbdd]L69N^eeedaXJ6 (08)AUbff_O9 8Oakki]I19Un|fL0,Ie|w^A$$CbwX94SrjK+'!&Ffƻ{[GGUuˬlLGG?1&Ffƻ{^gggu̬lggg]K3/@Kfƻ{y̬x`E(G\jmƻ{̬oP0ZtƻDzrR2eƻ̮̮βrR2gǹ̬̬βrR2dƻ̬̬βrR2Wpƻ̬̬βrR3CWdgƻ{̬̬βr_L*;Ffƻ̬̬βya&Ffƻ̬ɪβn"/Ffƻʱq=MXfƻ¿nUjvƻĨ˹ɬyahɽȫǺjjji_Lr·|}Ǻȫx_JJB3ovnľubOB3a}{okyë~ȹ|l_LQhy~ti^wȾ~jɼya;N[^WKkǵiUn³o"2<>8Ll¸weRAYoƮq'Eb}n\J8,BUh{f6Oi}~qcTB0);Naq~lS #@:.Ll¸v_zĦtpfT? + 'Ec~w`WubQI9'7Qir_JKezmU9+ $R_bZNUjvupjʺʷyZ%5?B<0=NWVPhƿqR + "#076B_{|aF4OeywnwfO5!8K^ih]UadffdZL9" (08 + *DYimmgWA' + *----9VqnS6----)*JWce\K8# 4QmrW:0.6?IS]gtxeP7<\{bKPMU^hq{~cF(=]}Ĥdjplt|nN.)=]}ĤoʿlM-5FQ]}Ĥ}ȿx_C%Lapt}Ĥûxk^K3]yĤxoeZNB2'gĴulcYWWWWWQB.gwwwwwwwwwn[CcĤoSTl}ĤzZ?R^a}ĤƿzZ&6?]}ĤƻsU =]}ĤƻuaH*7C]}Ĥfƻ{__XI4DUal}ħfƻ{[?:.[qĸfƻ{[;lʿfƻ{[;-'rŹfƻ{[NME5lwnnƻ{nnmbNa|~rvƻ|cOetvl`gƻo8JUVOIiDZq-571GfmSaff`Q<28888888888883'5Rk}iOQXXXXXXXXXXXXQB- ?_}z[nxxxxxxxxxxxxn[B'"Bb¾~mnQ2#Bb¾~vxX8/@Kb¾~xȼʸxX8G\jm¾~{Ʀ˷wW7Zt¾ãɴ˶vV6f¾˵̵uU5gǼ¾˴ʹt[Id¾ļγv_Wp¾ǹвnCWdg¾Ʋr+;Eb¾ͳϯq"Bb¾аͭ}d!/Bb¾ͭ˴̬ncPQ]_WK>2=Q]aaatȬo^Q=%4>?9-!$4>AAQoeG5% + !*IgoU:  ]|{tttttttttttttttsiU @`i$@`t1BK`tI^km˫o\v˫t^h˫kXGjǨð˫kK,gȸа˫kK+Yrȸа˫kK+EYegȸxа˫kK+,! 7Sl~r^G. '?Taffffc_VF0 (08 &?TcggbR=K_klf]K46Sl~jO_xxaF) + @_}z\kpQ1,,,,*""Bb¾~^s˲sSLLLLLJ?. "Bb¾~^|ɪllllllli[F%4Bb¾~hsZ?Q\b¾~u̵eTl{~¾~ǧgd¾ɻƦfj¾ʭĤej¾ɹãca}¾ȴaPftw¾˲ʹ¿`9JUb¾ʹľ~^-Bb¾ʹż|\"Bb¾ʹȺzZ*8Db¾ʹ˶wWDUam¾ĦʹϳsS[q¾ɿϯoOkȻ˫lLqĸǧhHktgpsusqädD[v}pcVJXhmm}Ǻ}^?I_otl`SF9,=IMkͱtU62EQTOB5) *JiĸjL-(240% #Ba~tZ?# +7Rj|}q]G- %=P]aceee_TE0 (08#&)ATacc[K53Oi}lR6:VnxbH+ <\z}_@5EdsT5553*?_¢bUUUhøxXUUURF4!?_¢tuuuuȸxuuuuqaK->I_¢ȸx\EZhl¢ȸeXr¢Ʀfc¬ͭƦfeͭƦfc©ȭƦfVp¢ëcCWei¢ϯpV+N[g§̭qzŦgH* Vjxµ¤gṱpR3iʸ{]mɷz\=sʽǪqScfI-oxxɹcFYw˭tX8KkqX>% 'C_|Dzt&Db}v^D+4Pkj6Pf{r]H1 $>VolX +#9N`ifYE0)BWfkeT? (08#, 3Oi~mSLhy{jYG6" <[z~`WvtbO;&>^~ãcYyɩ|hS>( >^~ãcYyɩ̻kU;+'7A^~ãcbyɩ­fWE@S`c~ãȨƭr[Um~ãǧkcã°pgó³ogóǨe]xãǯs{rfRKaos~ãsrƷz̶xXJ94EP^~ãcoοϯqR2(>^~ãdtε˭ŧjK, >^~ãǩǷǺ~`B$.RdqkS #9J[dbVdhaRB2%8GTagbS= (08!:P`ggcVA)*$'/7?GO[gmgWE00Mg}oUHJCGNV^fnxr^D):Yxbgi`fmu}pS4<\|ťt˸xX8 <\|ťúsU6'7A\|ťſ¼ɹxbH,@S`c|ťʷȺ|rg[K5Um~ťʷǻ{[IA?7(cťʷwż|aaa_TAgôʷþ~nWgųʷf]xťkKaos|ťʷƴk4EP\|ťʷɪ|a(<\|ťʷwtͭtttrdO<\|ťʷwn̳tUTSI7.)=]}Ĥ~»y[;5FQ]}Ĥ}hN2Lapt}Ĥ}tj_P;"]yĤ{tle^VPPPG8gĴpppppppppodPg~dcĤpTl}Ĥűq?R^a}Ĥϲm&6?]}Ĥϲu^ =]}Ĥ¾ϲreedZH*7C]}Ĥûǻϲzm^M=.DUal}ħʸѲyiXC[qĸг´qVlʿɪmsϲbrƹdoϲdlwɸ{\oϲw[`|~riŨpSoϲw~fKOetvmae~ʵ}aOoϲrjlcQ:8JUWOTsnROoϲrRMF7$-575UuĬ{_COoŲrR2' /MjgN3LknO0"=VmjR9$A\tv_D' )?UchbR<$/GYded[I2 (08 $=RaffaR=$ '@Veje]O;"4Pj~~jP46Sm{hO3>]|{]='Da~{]> @``@7RoaA&#@``@Kd}ӻkS<$ /@K``I^wĽͲiQ:" G\jmmgqȭŭgP8! Zt͵ì}eN:&f˸ª{gS@gǾȻmVdɾȹfWp̻ʷƭmCWdg˲h+;E`oX @`ǵuZB @`ŨoQ2+8C`̶}aD'EValo{zotÿoR6\rƻǭx^C' l͵fL1rźt˷ƽnT9lyma\vv\A' a|~rg[ODI_sƾ}fL/Oesvl`UI=1&2F[ovX88JTVNC7+.BWkƷzZ:,560% *>UkpS5'>Ukr\D( '>TemiZE/ (08 $=RaffaS>%-F[immfU>$4Pj~kQ5%/Qeq|ɵuZzǧgG''&e~÷oZzǧgG'qȽt^ZzǧgG'q¶{odXRZzǧgG'guj^RXjrrzǧgG'Yq{ocXL@QmǧgG'DXdf]QF:.:ZyǧgG'+;EF?4(9YxcD$%&! +1OmqW;&B]t|p\D+0GXbccca]TD/ (08+CWcee]L6L`lle[IK^hhg\I1SbggbS>%#&+049=BHPWXP@+5QkkQ@CFKOTX]agovxlXB)>^||]`cfjosx}oV: @`}cD @`fF#3@`Ϲy]@7(qȽͶ˴eM9&q¶{qŻƬzfQC4fujyƿu~m`NXp{oct˹{ay{cCWce]QgǴyeNfĵq*:DF?Iis`L9Sh|İt$&$B`{nZF3&;Ocwi4Nf|scTA-"6J^n|oV!9O`gdWG8( 1CR`gdVB (08%+-.02469ZxȨþƻvY>Sk{Ȩþƻ{kScȨþƻchȿÿƿhhȶþƻh_{Ȩþƻ{_Nds}Ȩþƻ}sdNCbȨþƻbCFf¦fFFfþfF?\wþw\?Lg}þiNWvþxYYyɻ{[XwyZMijOSaff`Q<;Rdmmj]UTJ9(5Rk}iOLhvusfTC1 ?_}z[Vuo]K6 "Bb¾~^XxʪxcN8"#Bb¾~^Xxʪȶ{fO5/@Kb¾~^Yyɩǽ|`B+G\jm¾~lizȨhXCZt¾ǧpWe¾ũcgDzƦfd¾ʬdWp¾¿ʪrXCWdg¾~klżʪ¤dE*;Eb¾~^l˶ʪδz]?"Bb¾~^rаʪlO3 "Bb¾~}zʪʪɮy^A$*7Bb¾ĥʰ˶gM2DUak¾ǺĿpYO?.[q¾ǻ̮ëxxxkZHkʮ~u]qƺ͵ʪolkyƼŶʪx˰p`{~s~êʪͭnNdsvlatȱ̹æj7ITVOVvŰ|_,560NkurwmQ#>WokZcbW]p{}}}}}xjXA)BWejcS>CC:CS[]]]]]YM?+ (08 $=RaffaR=$&?TchhcS>%4Pj~~jP46RlkQ77770">]|{]=?^}{]WWWVM= @``@AawwwwvjU%@``@Aag2BL``KAapJ^kmmk]ap^w{{ijnYkǺsShźͳsS[sťͳsSFYegťzzzzzͳsS-=F`ťͳsS @`ťͳsS!/@`ɳsS=7)Tk|th\mĻbC# + >Q]_WK`}ˮsV9%4>?9Ee¼gI, +"A`}uY=5Qi{|cH- +$>]|{wyyyyyynwxxxxxwjU @`g @`p*:C`˼˵ͼаpCVbd˵˵ͭаpXp˵˵ͭаpf˵˵ͭаpj˵˵ͭаpi˵˵ͭаp_y˵˵ͭаpLanq˵˵ͭаp4EO`˵˵ͭаp'@`˵˺ͭаp @`˵аp)7B`˵аpCU`k˵y{{{{{yаpZp~ȼ˵u^^^^^pаpk˵~~~~~~~аpqƻ˵аpkz˾аp_{shk˷аpNdsvmaUKk˵аp7ITVOC8Kkõwwwwwwwǰp,560%)HgpWWWWWmm =Xpv`E777C^vv^+CVaccZI32I[fgf[I (080I^knf[`kmlaXccYI:* %@\vvz{sueVE15Qlr^J6 /Ha|˱ͳwcL9&,D]uĽʶɸydS=(@YqǭvǹʽjO)>UmδyZBVkȨʲȾ~^ZoȾȪ|]oȨ¥lQzɾȨδ}wtv_xȨvspmũvnmiȨh\lquƺv̰qRgy~yȨhsȺͭn:NZ^yȨhƾƩk!1D[yȨr¿Ǹ~a7Up¿qT>^}¿waF>^~ädJ44C[y¿~`C4M`kl{¿}lk`Mbz¿zbo¿oqɱqnn`xx`K]hiiiiiiiiiiiiiiiiiiiiiih]K (08 $=RaffaR=J_lnh^M64Pj~~kQ]wzcH+ >]||^isT@@@@@@9, @`at̴v```````WG1#@`a~ɫt^D/@K`oŽpQG\jm}vVZt̶vVfϲ͵uUgǿžδtTdȫϳsSWpη̵˫вrRCWdg̵˫ѱqQ+;E`̵uu˫ήnN @`̵˫˫kK+@`̵˫ȨhH9HT`ťeERer~ɿ̵¢bNfȻ̵ʸ{bqĸ̵utnqt̵ujϯoe}pcl̵}}}}}}}ˬmVnyl_SLl̶ŦgAUad[OB5Ihɾɷa(8BD=1%!?\zpU "$2Nh{w^C";O^lvwwwwwwwwwti]I1 (08 $=R`ee`QCKLLLLLLLLLLLLI>,4Pj~}i`kllllllllllllhYD*>]{{zqW: @`bB#@`ĤdD/@K`ѱĤdDG\jmѱĤdDZtѱĤdDfѱĤdDgǿĤdDdѱĮbCWpѱƦrXACWdgѱ~ǧ~~~~|nX+;E`ѱʪh @`Ѿ;o @`Ѷ϶n*8C`ѱʶeDUalѱvļ~vvvuhS[qǻѱq~ĥ{s]lѱqṷnrƺѱwȶȴtlyqѱĨͱra|~sg`xѱĮƷίoOesvlaUMlºǻ¤i8JTVNC7Nnɼ{],560%(Fc|tlmmQ;Xrvne]UMTgx~{kXA,E[jngXOG>6.:MY^`\P>+ (08);FJJJJJJJJJJJJFBBH]jmmdR: '@Vejjjjjjjjjjjjebb^vgK.6Sm}uU6?^}ɷwW7@`¥ɷwW7?^}̴ȫťɷwW7?Vm̴ȨťɷwW7Ok̴ȨťɷwW7Xx̴ȱťɷwW7YyðťɷwW7UtίȨťɷwW7IcxƩȨťɷwW76L]uȹȨ{ɷwW7E`wȫxȨɷwW7Qp̴xȴɶwW7Tt˷oxɩrS4Nlɩ{cH+@ZpɩyZ;,C^~Ƚ}]=4C]|ɭz[C4M`kmɩlk`Mbzɩzaoɬnqɰpnm`xw_K]hiiiiiiiiiiiiiiiiiiiiiih]J (08,DWcff]LBDDDDDDDDDDDDDD=0=Xqycbdddddddddddddd[J(Gfswa +*JjƷq*JjʷĶv5DMjʷ˵˶vNalmʷ˵˶vb{ʷ˵˶voʷ˵ȫ˶vq˵˶vmʷ˵˶v_wʷ˵˶vJ\fjʷ˵ͭ˶v0?Jjʷ˵ħͭ˶v*Jjʷ˵Ĥͭ˶v*Jjʷ˵Ĥͭ˶v6CNjʷ˵Ĥͭ˶vQalwʷ˵ĥͭ˶vh}ȼ˵ͭ˶vx˵İ˶v{ƻ˵˶vqzn˵{pst˶vc|sh\k˵||wj˶vObmlaVJKk˵u\Yu˶v6EMMD8,KkƵuUTsþr'--&)IhqRKi|d !>ZrxaF?ZrwfO-EXdfe\K4-EWbccc_XL9 (08 +%>SbggbS>%+DZjoh]N9!5QkkQ49Wr{gM1>^||]>7CbyZ;76/! @``WWWlǽ~^WWVL; @`mwwwwвwwwwuhS#3@`æepķͳsrrr`@&jtmͳ`@ Zu}pcWmͳ`@ H^nsl_SFMm`@ 1DPSNB5-Mmų`@ '13/$+Kiy\= "@[svccccg{zgN2.FYdee[ICCCO]bb]N:! (08 +%>SbggbS>%-F\jmmfT=#!5QkkQAAYtjOAA>3" >^||^aaexaaa]O;" @`|ƺ{hO3 @`ƺ{]>#3@`aA0ITcrÿĿǮx]A#5BMXcnzƬʫɲgL1:P`kvȺǶmU; Mh|ƹȬɯoW@5%Zx˺ti_R>]}ƺǺij}kSVsǸz|ɻaGc{~ö¿k|¦f6Nal¿|`!<\{¿iP>^~ʽ}fT<5D\{¿z[E5Namn¿nmbNb{¿|cn¿opDZqlm^vw_I[fggggggggggggggggggggggf\J (08*BVcff]M6 +%?VgmjcT?& +:VoycI,6QllRA?5%%EdsT52Hb}|^a^Q?*'GgƷwW7H_vż~|kW?#'GgǷwWH_vƬkN//@KgǷwW_vϾuU5G\jmǷwlzͶʭrS4ZtǷʶŽfH+fǷıõêvX;gǯüɼɰ}dJ.dǷǽ̵jRM?.WpǷzƸsprkZGCWdgǷwr}Ūt[+;GgǷwŷʲi'GgǷ~ŷȪl'GgǷz˵ƽc*8GgǷñʮuXDUbmǷɻʻfJ[qǻ̺ÿsW;kɽ˺ëyaG,qĸzxv}eL4kuils{ʸiP8`{}pdj°zgT<# Ndsul_SZyȼq_M;'7ITVNB<\|ž{iWE3!,460$6Tpui^N<*  )FbzxncWK@3"5L_ihaYPE9." (08-F\jnfYHYtu_WfjcTD4"4Ojopp`O<),8<=F`{˵u{iVC0 +3HV\]^s¿vǷp]J7! ,H`t|}~ǭ¯wdN8!7Vsʹɶ|eO6<\|ʽ|cF9YxoO3RooO7F\pɬpn}cGQclrǺƴyγĭ}fO7f~ǫʰêy`Esɶĭ˵¾qUt¿Žɸbnf`x~|z¿}{yz^K^hp¿veN2A]}¿|\J7,>^~ý}]=+DYgx¿wfXCXr¿qWd¿cgťeecYrqWEZhkkkkkkkkkkkkkkkkkkkkkkgYD (08 $=RaffaR=%6Nalml`M54Pj~~kQ5)Gc|zaE' >]||^>;PpnN;;;;4' @`a[[[rͰp[[[[[RB#@`{{{{{а{{{{{znY/@K`аkG\jmлsZtĺsfͳjgǿʺzymXdſŽeYQ@Wpīvk]K4CWdgDzǯxaF+;E`ʶɱpQ @`~̽DẕsS!/@`îɺjMUivķŴx`F,hɻ{cK3rʾ­p\G1ozʷƲt^H2cwjgr}˶u_ISk{tgZqôθw^>Q]_WJdŶzixκk%4=?9Fe|l]N_uªm  ?\x}n_PA2G^t~c1KczxlaRC4%0G]s~hP6M^geZNC6' /FZhkcQ; (083IYbbbbbbbbbbbbbbbbbbbbbbZJ4E`uvaGRprTVv¸xXUu˳þwWMj˫þlO=Vs˵þ}]?4TtĽ}]=4Tt̬ʪþý}]=4Tt̬þý}]=4Tt̬ɰ¿ý}]=4Tt̬ǵ~ý}]=4Ttʽý}]=4Tṱý}]=4Ttǽ}]=2Qp¿y[;)Fay¿iO2$Dd¿nN.(Dd¿nN.AUcz¿gVATn¿oUa¿bdťecdXrsYE[jnnnnnnnnnnnnnnnnnnnnnnj[F (08,6841358;>BEILPSY_fjcR<% 5HUXSQSUW[^beilosxiR90Kbsxqqsuw{~dG(=[xĬnN.#Cc¾kL,#CcviYB#CcþoT#Ccþ}^#Ccƿ_#Ccþz\#Ccþ}iO#Ccþγs`Q<#CcþѱͳsS6$$DcþѱͳsS3%DdĽѱͳsS3)HhǹγsS3-Ml˵͵rS:1QpϰͭfJ,5Uu˫ͰrR3>]{ƦųsS3Hg½ͭoYFSp̳ͭs[b~ǩͭhoƻǬlpjex^Rg}onnnnnnnnnnnnnnnnnnnl_K:PahdVNNNNNNNNNNNNNNNNNNNLC3 (08 +%>SbggbS>%:ReomcWE- 5QkkQ4,JfrZ?*) >^||]HJUsiKJH>- @``hjjȮnjjgZF- @`sƽsY=#3@`ʮfFJjʷǧjV@*-JjʷǧnWA*:IXjʷȪǧİnWARftʽ̾ƽ£ȲnUfͿȲbqͺȸfp³ʮz^eyj¼kWpzl]\kzȮ̯oBVcf^O]vŰͭm*:DF@Kjîm÷æi%&-Mløk[z|^'Ec}~iSOi~nR7Pi~paQ<# &FerTnjP5 )Ii÷wXwȮħ|bG-*Iiɷw`ĥĤétY<5GSiɷwiƻ~ĤǻgKLbruɷwvβ|Ĥ˯vY^yɷħ|ĤƽffɷɹĤhgյİlbɷµĭmSk{ɷ˵̬i=Q]iɷȼ˵ϯrZ$4Iiɷī˵uvddcXE )Iiɷ²˵uĻ|]DC;,'5Iiɷ˵ucC$AS_kɷ˵w͸ǨjK-Xn}ɽʽ˵ưϱtV8iɻ˵ǼǻaC% pƹ˵ͯƨlR7ktk˵̴~cH2\wqdWk˵˱Ūu_JJarwoaTGKk˵ʺxǼw^4GSWQD7+Kk˵¨sg͹k*472'+KkŶì{aTnm  + +)IhhOA[u}b!>YriR:.G]r~gP-DXcefjcR<$0EYgjbQ: (08";P`ffbT@>;?UfmmiZDAFB8,1Nh}mX^ZPlqW`faVI5;Zyv~xfzh}tcK0=]}Ĥz|Ĥyx[="=]}Ĥ|ĤbB.?J]}Ĥʵ|Ĥ˹}_@F[il}ĤåĤʭqT6ZsĤβĤþeH*eĬ¾ĤβwY<#gƦˬĤj\ONYd}ĤɩãcUURF4UjwĹŵããcqshXHhʾ~ã{t_q·˴}ãpmw¥}ãɷw_{{pvʳz}ã˵uNfw|tiw˸k}ãʹt9LY\Vldzv]}ôɪn 0:CCCCCa|]CCCCC=07M\cccccc¿cccccc[K5.Kdy¿xcH,8Xv¿sU6;[{ùyY9$;[z¿xX;&8Qer¿rgT;Gd~¿gJNn¿rROo³sSKjnO@Zrа˶t^CGbxа˶pW]{{]`x~gK. @``muV6#@``o˸xX8/@K``oϱɸxX8G\jmmoϱɸxXC2%--'2I[eedYF/"$ (08";P`ffbTOPPPPPPPPPPI;'1Nh}moppppppppppgU=";ZyjN0& =]}ĤvWKE8%%=]}Ĥ̶vkkcR<1BL]}ĤǺβiNH]ko}ĤʷήxX[uĤϰ˻{[fįȩūɸxXgƦ̵vVdĦͰ~бsSVoĤʫlMBVcf}ĤĤfF):D]}ĤǾ|˫}gP=]}Ĥ˫}a&3?]}Ĥ˺h@Q]h}ĤʻhXmzȼŻ}aj÷ˮƼ{{whQrʾƭ˫ƽ{iYHn|Į˫ſu`a}v˫rQhwzqerʸ˫̹y;MX[SQpzv˫kr!09;5Gc{q_vƫkevy`6New}ugWSrgJZkuqbL 8LY]XJ?NURG5 0:=9-6L]ffdXD-#/53* (08 '@Tbff`P:F\koi`P:+*"8Tm|hMXs|gLJI@0"BaxZevhji\J5$DdĽ}]pʸvbI-$DdĽ}_{˭uW8" /@KdĽ}oȼ|\CA8(G\jmĽ}αͰvccaUAZtĽƿnVfĽʯɮegǼéidĽòhWpĽƽãy^CWdgĽãoaL+;EdĽãƻĤdF4$DdĽãƦĤdD$!/DdĽãƦ{}ĤdD$Q]_WLkŧͰwZ%4=?9Ooó}iL *HflusZ>:Ti~sYZhsuvvvvvvshZF-'- (08+DZimmgW@&7Oblml`M4:WqmR5*Hd|zaD'&&" "Bb|\FFQpmNFFFA5"#Ccþ~dfffrͯoffff_O:+Ccþ~ϯ|gM6HScþϯwYMcruþƼ|\^yþ̵ż|\gþ̵ż|\g̵Ķż|\bþ|\Sk|þѷtW>Q]cþ~ļбzny~~uaM%4Ccþ~бty~za #Ccþ~бm(6CcþбȲrCT`mþnZp~þɼĿбv_kǺб}xveNrŷбq]yz]mrekjepбq^|d`|}pcUHKJPpб~~~ãcOetwm`SE8+,0Ppбa8JUXPC6(/Ooʿʳy[-682& +)GekN ;Wpv]A*CWfswwwwwwvk]I0 (08 +&>SbggbSGXcjeVA(AXhoi]N:!5Rlk_tnT9SnzgN2 ?^}{peJ`}y\=!AavȬvZnſ`@ "Aaoýj{̰wZ;&.?Jah{αvýkdS=F[ilĽǭjOZsīƶyZeɻ{[gɭγxYeγiNXqγv\?DXfiγgG,R`d]PD7*%((.NnγsS3(((!%6AD?3& .NnƳsS3 !$  ,KjoQ1#@\tw`E( +/FYdfe\J3 (08";P`ffbT@GHHHHHHHHHHHHD8&1Nh}m[fhhhhhhhhhhhhbS>$;ZyukQ4=]}Ĥ{]="=]}Ĥȿ_?.?J]}Ĥγ_?F[il}Ĥγ_?ZsĤγ_?eĬγ_?gƮ¿_?eĩγ_?XqĤγ_?DXfi}Ĥγ_?,NYd}ĤγȵdzhVjwĹŹγħîrZhʾγsɾʹmYEr·γsǮ|iT@,owγ|gRD5b{puγžo`OSjz}ti]tθý|e=P[^VK\|ĽĶs#3<>88Wv~x}ıu0Nkxrle_Ydxk$?Xlvsmf`YSLF@9K_n}nW+?OVTMG@:3-' 2CR`gcVA (081J_lnf[cmmk^ebVG8( %A^xv~yrcTC2$4Qmo^LD=/,F`|˳̬yddZI2 '@YsϯǶv_D !:SmʰxͳʸnP 6Ng̸Ǻ´uU8Nc{ȨÿuVOe{ȯʯ˲iMa|ɹȨʶ̷jTDJQZbaWE/7UppUKGHLRX]cioxr\E, ?_~ekfglqw}rW: @`aB$4@`aA=P]`ſqV9Sj{®{riZD5b¢{uommmmmlaNg¢{bg­o^zȱqMcsv¨n6HT`¢w_+@`¢cJ"@`jJ1@M`ƺʪjJK]jwɿŻƦʪjJ`x̾ʵƦzzzzʪjJo˽ήƦfZZwʪjJrɻǨƦfZZwʪjJiuƦzzzzʪjJZttfvβƦʪjJG\jneWpƺʪjJ0AKNG]}ͳƼʪjJ#,.=]|ƦŪjJ 5Rmx||||gH '@Xpvh~p\\\cyqY=+CVbd[QbhheWC<NYd}ĤĽ}sssu̬lL,VjwĹŹĽ̬lL,hɾĽ̬lL,r·ɬlL8owpdPd{}cTl|~tizn?Q]^V[{ïo%4=?9Xvj +/Kezr[8M]cccccccccccccccccbWE (08/Kcu{{udeeeeeeeeeeeeeeebUA;ZwoV @`d @`ŧg'7A`Űf@S`cʸv\Um~{~ȫwpm_IcŻȻu]F2gÿȫǺs\CgǹɸoU]xͶhKaosɮt4EP`ήt(@`wvtssήss|g%@`ή|eR4CN`γlLM`lw¬lLbzƺήgIpήpX=rǻ~rjjjsήnjjjjh]Jhxήw_\uskήlH\ikbVmʯo0@JLDLkl#*,&B^wx_ 2J]ikkkkkkkkkkkkkkkki^K (08+CWcff]M68Oajg`TA*Iiɷ{e)IiɷveN%2IiɷĤdK8AO[iɷɭĤdD$[myɷŹɩĤdD$oɩmmmm~ĤdD$zʽɩiZZ^~ĤdD$xzzɩzzzz~ĤdD$lvi]zɩĤdD$[q~reYLZzɺĤdD$EV__TH;:ZzɻĤdD$*8@?7*:ZzɩĤdD$  8Xv{{{{{aB"/Lg}r[[[[i}mT8 :QaiifYE;;3Ssſ_?3Ssή¿_?3Ssγ¿_?3Ssÿ_E13Ssή¿r^G,3Ssα¿sW93SsĿ_@ 3Ssήʹï|]>1GXsήŽʽlWK8'D^tήij|ueM1PnζľǼz]4Ttd0Om¿}a&Da|¿oS>^~¿|o[C4C^~¿|\C4M`kt¿rk`Mbz¿zao¿nqɰpnm`xw_K]hiiiiiiiiiiiiiiiiiiiiiih]J (08 $=RaffaR=$ (BYinh^P;"4Pj~~jP47To|hO3>]|{]="@_~z\="" @``BBHgĿ`BBB]{g4Pj~~jP4Pj~zjS $=RaffaR=$=Rafffc\O= (08 &?Sbff`Q<"4L`lmmbO76Sl}iO2&D`y}dH*$$! !@`~z[DDMmqRDDD@4##Ccþ~cdddnͳsdddd_P:$Ccþ~γ|hN1BKcþγy[I^kmþľ~^\vþб¾~^hþб¾~^jǽϱqqqt̬¾~^gþ||||̬|]Yrþ̬hEYegþ̼o,Q]_WK>2%0Pp̬lL, %4=?9-!1PpĻiJ* +  *Hew]A#^}̯ϲeE6To̬ϲuZ=(BYx˶̬ϲ̰u]H.1Njǫ̬ϲƼhL0&6AWrǺ̬ϲȬtYA7&>R`ccʫ̬ϲ˵ec`S?Rk~²̬ϲ~lS`~̬ϲadåeddZu¿v[H^my¿wn_I1Ml¿iJ2.NnǫkK+2Kk¿hI3K_ku¿sk_L_x¿y`k¿mmɯojl]vw^H\giiiiiiiiiiiiiiiiiiiiiig\I (08";P`ffbTIYdjeV@'5NcopeWE.1Nh}mavmS7Ea|r[A$;ZyrcGPnkM-=]}ĤyƪsW\zɰpP0"=]}ĤrƻgiiK,.?J]}Ĥdˮrwͳy_Q=F[il}ĤȺ}jQZsĤŧͱ|^eĬ¢bgƲʶȹaeĩʶȹsXXqĤʶvȹyrm]FDXfi}Ĥmmʶvȹymk`L,NYd}ĤγȹlVjwĸƹήȹv^hʿƧiȹyhg\Ir÷ľhȹyYG?0ow~ͰwhȹyY9!d{pe{þihȹyY9Tl|~ti]jëwZhȹyY9?Q]^VK^|Ʈ~fLhȹyY9%4=?8Bb¯iQHhŹyY9 +=[xlT&;WozdJ-6NbmmaN;(*BVbee^M7 (08 (BXgmmhXB-F\jmmfT=#"+7TooT=YtjO66/#-?JM_~~_VexYVUM>)DZimmovvǺzvvujV="WqȹiL.bɷsT4cǿ˿ʹtT4`βͳsS3Tm²ϯͳsS3\uɽȩͳsYI8jžƴͳvcSm˷ʽȶidyǫð¹xXrȱź{E[uɲ}Ǭɷw?_hyèq<[z|a2PmjO&B\|cS=/A[z`B1F\kopl^IYsv[cfdƧgadTmoV@TbffffffffffffffffffffffcVB (086JX]]YK7EXdee\JVbee^M70Kdv}}weLZrwaozdJ-;Zwy[iptV7 @`alŴtŹyY9 @`al̴tȹyY:.'6@`al̴tȹy^XI5AS^`|~̴~ȹ~~ubIWn}̴ȹtWf̾Ⱦ|\l̷ȹ|\k̴ȹqTb}̴wȹywo]EPfsvvt̴tȹyYRF79JT`pp̴tȹypocO-@`̴ȹ|c%@`̴ȹo4CN`ŰpM`lwɺlbzǻu]p˵|ɺodZGrǻ|n͵iO6hznz«y]nɯ|bGZtthjŭ}fLZsésWG[hjbVZyƯhP9Gazɺd.?IKD;[zjS;#4Nhg!)+%4RolU=%!;Uq{_ + 'BZnzgS?(*FayweN,AUbf^N:&4L_ii]K8 (08 '?Tbff_P:555555555555550%7Sl|gUUUUUUUUUUUUUUUO@,!A`~xuuuuuuuuuuuuuuulZA#CcünQ%CcüyY4CLcü̿ϿyYL`lmüϱϯsU`yüϱϯuaGmüϱϯ|gMnįϱϯxZküίϱϯȼ}]]uüʸϱϯдvWH[fgü£ϱϯʬnO/>Fcü|ˬϱϯ£eG#Ccü|εϱϯɺ|]> #Ccü|ȻϱϯίsU6*8CcüϱϯåhJ,DUalüȯϱϯȹ|^@![qüĸϱϯrS5"kʿϱϯfWN=qŹ}xxϱϯxxxvjUkϱϯg`{~rϸϸpNdsvl`fp7ITVOC`}i,5605Phy}}}}}}}}}}}}}}}}|nX (08 '?Tbff`Q;"6Nallh]K37Sl}hN2Fc{x`D'!!!  !A`~y[APonOAAAA@7(#Ccþ~aaav˯paaaaa_TA#CcþǨ~nV.?JcþŽeF[ilþjZsþ´ȴjeþгƼ{`gɿȼ˸tqcNeþ˷zjVXqþǵ̶iDXfiþïr,NYdþɹy^AVjwþůηqbL3hʾľаqQ5r÷º̬mM-ow~~~~ȨiI) +d{pdYk|zsqodE%Tl|~ti]RG>Q]elȸ{\=?Q]^VK@4)%4>XxϰrS4%4=?8-" +8WvźjK, +0Onu\@#&C]tr`H/0GXacefebVF2 (08+CWcff]M660#5Pfuxxn[B' +)Ca|nQ2'FestvkV>IixX8 )IiƷjPIiɸxX8 +)Iiɷ|bIiɸxX80)0AKiɷèsWiɸxXQPG6H]jmɷǺqqɸxqqocN\vɷʮɸ|agɷƺʶliǶímfɷбiXqɷqZDXeiɷ˫~ʹzcbWD,!)Iiɷw|˫ħ¿hK.+8Iiɷ˫ȷͰvY;EVamɷ˫ĪƽdF]rɷƺ˫̲}ɫoQm˴˺ksζxXtź˭s]ivWnyw˴}}}wab}~rgrƷǾqPftvl`T`̲Ľµu9JUVNB@_~n-560$7Uotxe )BYpxb\hnuzzzzyxwtgR,BVce]L?HOVZZZZYXWUK; (08 $=RaffaR=%+DZimmgV@& +4Pj~~kQ5:WqmQ4%%!>]||^>Bb{\EEE@4" @`aACcý}eeee_O9 #@`aACcý{gL0/@K`aICcýwY9G\jmmgWcż|\Q]_WL@5)#Ccý}]IXbbWE-%4>?9." #Ccý}]=;CB:+ +!A`~yZ;##7Sl|hN1 &?Saee_P:! (08";P`ffbS?053J]ghg]J;=8-"1Nh}lSOUR_ww_Z]VK>+;Zy~dnuqmmy}tiXA=]}ãyȰ}nR#=]}ãаz[/@K]}ãΰаϷzZG\jm}ãǻа˭pRZtãǩаfHfíба̶z\>gǿɹаȪoaMdçаżz_WpãбjCWdg}ã˫k+;E]}ã˫k=]}ã˫k!/=]}ã˫kQ]_WJ?^|˫k%4>?9-5Qj|j +$04Pj~~j`ffaisYdfe\J3>]|{~xsw`E( @`|ƦoQ1#@`ƦƳsS3/@K`ƦͳsS3G\jmƦͳsS3ZtƦͳsS3fγsS3gǿrS3dgJ,WpnN.CWdgήnN.+;E`ήnN. @`|ήnN.!/@`ήnN.Q]_WK>5TtƬuV%4>?9-!-JgfK +R`dd_P[dddd`XK7  (081HZefe[H1 9N\fjbQ: %B]uv^C1Mfz~gL1 .MlmN;Zxx]A++++)!0PpƱqQK^~mRKKKKH>-0Ppбqkkkvɵ}kkkkkhZE1BPpбŨrYI^kpбʵe]wбǧgiбdjťįrXgб˶åɩiIZrб˶ȰɸɩiIEYepб˶ƮʬɩiI,Q]_WJ>KjɩiI%4>?9-$B_yĩiI +3LanpppppppppseF4EOPPPPPPPPPcxoW;'/000000006L\ddbUB* (08 $=R`ee`Q<#4JZhojZD+4Pj~}iP3GavrX?%$$$>]{{]DTrkRDDDD=0 @`dddx˲~ddddd[J3#@`Ūw`F/@K`˺pRG\jmĵuUZtʱ˵uUfʪŽ˵uUgǿʪ̯vq˵uUdſvvuUWpϱfCWdg¶o+;E`ο˿p @`æĥj @`˶ǽ~pY+8C`ç{{ΰv_^TCEValɾiL?7)\rǻ³ϳy\?! lƽp_K7#rźtrνxdP<'lymr{ȷ}iT;`|~rgsǹ̾gJOesul`Tcȹ}ïqQ8ITUNBDdqbsnO,460$=ZurcUGYmy`E.IdzyodUG8,@ThzwcK47M^gdZQG9*';N\`ZK6 (08)AUbff_O9 5J[imeT=& + +9Un{fL/HbwjS;***'$CbvXJUsiPJJJG<+&Ffƻ{ijjyŭ|jjjjfWB)&Ffƻ{çoV9->Jfƻ̶bBDZimƻĤdDVqƻǼbBaƻýϱpV9cǰȪĦkg\O;`~ƻ̵ȸ{hPSmƻżɬ|^@Ucgƻc(9FfƻŴc&FfƻťvZ-Ffƻ~~~ť~~~~zo_I:KWfƻťcERguƻʺžiIdƺŷiInµť|aClrwwww|ťwwwwteO5`}znaUWWW\|ťeWWWUJ9"Qizvi]PD777<\|ťeE776- SbggbSBLMMMMMMMMMMMMF8% 4Qkk^kmmmmmmmmmmmmdR: >]|{wgK. @`tU5 @`ͶvV6#3@`˵ʶvV6NYd}Ĥ£ͳ~bVjwĸƹĽͳ{{{xhQhʿʶͳuvhTr÷ͮͳgoxnͳrd|pgt˰yͳбrTl|~ti^tȺmͳаp?Q]^VKjȵsm̸ƨl%4=?8Mmżt`i~a +(Gdn[G\vqU9SkuhUB0H\o|~~~~{m[D &>TcicWK<(0BS]^^^^\QA. (08)AUacc[KDYhmmfVFLLLLLLMF7%;VnwbWqldllllllmcR>&Ferb{~kR )Ii÷wcý}~a,Iiɷwpý}ĥe7IUiɷýǩʹ}_Mdswɷýǧ̮rT^zɷŹǧgIgɷýǧ͵z\>gɽýǧǩnP3a~ɷýǩǺfL0Qiy}ɷýǧŬwY;;NZiɷĽǧþeG"2IiɷĽǧʬpS'6Iiɷż|ǧʸ|]AS_jɷȹǧ`Xn}ɸõ̵ǧah˿ǧþ`nǺǨǼεwYi}ŻǴnOZusgmʮsyǧt]CH_punb]oͷfyǧyul\G02EQUP^vȾqYyǧgVN@/(25Mlɼx^YyǧgG0$ /OoĸycLYyħgG' *HfwbL7VtcD%:Sjq_J4-JdynU9 &=ScjeVD27M]ddaTA( (08 +%>SbggbS>+3537;?DKRZ`\O<&5QkkQISTRVZ_cjryziS;!>^||]drtrvz~hM/ @``|vV7 @`kwW7#3@`s¾jN0SbggbS>4555555555555/"5QkkQTUUUUUUUUUUUTM>)>^||gsuuuuuuuuuuutjV>" @`jM/ @`tT5#3@`̵uU5R`d^N; (08,CVacZONPPPPPPPNC2 1CYpxkmpppppppm_J0 +):L^pw\?!#7FTfxgG(9QbqʹȨhH8+Kf~ŴʶȨh]VG2Utǽ˶Ȩ{}s_F*Vuδ̭xȨqT5Mjɻƹ~ɻzZ;DXn̻ɹ|\DJQW`ikbP=& $@ZssgXMWWSX]djpv}jS9/Nlrivwsx}dF'4TtǻëkK+?Wo˹gH)RlǸ½p[N;`~β~~~~~yhPdɼβ}_^zɹξeNevŪθ˸e8KZguȭϲ˫y]/=Le͵аxx˫xxxscM/G`yŽƧkv˫kXXUI6*C\uŪüuv˫kK86,;WpʱͲv˫kK3%Ed϶Ⱥ˫kZQ?)Hhÿ¿˫{zlW< B`|¿hJ+4Of¿oO/&@`¿oO/>S`v¿gS?Sl~¿lT`~¿adĥecdZuuZH^mqqqqqqqqqqqqqqqqqqqqqqm^H (08 +%>SbggbSDNPPPPPPPPPPPPI;'4Qkk_mppppppppppppfT]|{wiL/ @`uU6 @`̶vV6#3@`ȸʶvV6SbggbS>%7N_ksn^H. 5QkkQ55Hd{uZ>5552(>^||]UUUriUUUUQE2 @`suuuuͱyuuuup_H @`uY#3@`ʵa]{{wti}tZ> @`vʪtgH#@`ʭvʪwɩiI/@K`ͭ{ʪ{ɩiIG\jmͭʪɩiIZtͻʻɩiIfĺiIgǿ̷~bDd̶}zwhQ7WpɽrdUDCWdg̻ıq[+;E`ɵɳ˺l @`˴ȳs"/@`ʲm=MYdt\Ujwɼͳu_GhĸĽlN2rǬv[@$o}qehhhhhh{˶eJ/cyl`SGHHHHXroT9Tk|th[OB6)((3Ojɮy^C( >Q]_WJ>1% >]{˸gM2%4>?9- !AaqV;  +<[xz_D)0Kdu}gM36JXcg`P:! (08¯ &?Sbff`Q;888888888888887/"6Sl}hXXXXXXXXXXXXXXXWM<!@`~yxxxxxxxxxxxxxxxviS#Ccþe$Ccþn1BKcþнnI^kmþаh\vþвoWhþаpPjǼȸааpPgþȸааpPYrþȸеаpPEYegþаpP,k̳Ͳw^^^^]SB+qƺtjaWQMIB3kyvͺvqmi_L`{sȿźzbNdsvla|Ƽp7ITVO_û|ʯr,568Vrxkamwh+Fay}ti[NDOXakt}qW4L^hg^VL>1&09CLV]bfjgYD (08ï +&?VfmmiZD+6NbmmbVC=8+4QlqW:Fc|qZ]VF1<\{bCSpy}s_I4=]}ĤdD`~ǮwaK3(=]}ĤdRmŽxaI14EP]}Ĥde}ˮȼv_G/Kaos}ĤŻǻt]C]xĤƫʹoUgijͶeg²ȬmcĤͮiTl}Ĥ§rZ?S_b}ĤvǬlL&6@]}ĤƮýjK =]}Ĥ˷ýx_I)7C]}Ĥýw^CTam}ĬƯĽlZp~ʾɮnkȻ˲lqķx`ksfklqɷʹllj_K]x}pcVcn|Ǽǰwj_LKbqul_SUnɼƳya5GRUOBCb²xxɾo*350&Ff¶uabxƮq !@^z{jZIK`qf3Nf~zn_O>.3EVfumS!9Qbkh]QD3#*:JWbhcU? (08į +%>SbggbS>%3L`lmf\J3'' 5QkkQ4C_yw`EGG>.>^||]>QnoegfZI4 @``Ha|˱uaI- @``]uÿuW9#3@``qż}]=! +gľĬzaH>5&gïqf]R@^z˼ɸ|mVMdsw´ǹe7IT`ɷ«k,@`ɻf @`ɺoV*8D`ɷlZCDUamĦɾcF2[qɿɷr_GkȻɷsVqķɻ|\ktɺ|\Zu|pcgɷsUH_osk_RFVkyzzzzɷzzzzzr_F2DPSNA5)?PYZZZiŷwZZZZTF2'13/$$2:::GfsT:::6* ]||^_}~jjleUB+ @`akoX=!#@`ayдhJ+/@K`oȮnNC4G\jmβſmk`LZtǿ̱y`fȭƻmgǿͯodͻȨɸϯoWpȨɸϯoCWdgȨɸϯo+;E`ϯo @`Ȯɸϯo!.@`ȨɸϯoQ]_WaƻlOPpϯo%4>?Ddu\APpľl +>\xzaH/Gey_1KbyxcM4SbggbS>%$>Ufmmj[F-5QkkQ42OksY< >^||]>:YydE3332* @``SS[{ƦfSSSSRH7 @`ssss{ƦsssssqdO#3@`Ʀ}b+BXhmmgWA'5FQSSL=)1K`ossjX@UonS6LbpssiV>#!?\xmP_~}^A_zjN0&FfxYa_VivV6'GgǹyvvvvvɷwW7'GgǹɷwW7'GgǹɷwW7'GgwW76Rk¢pR3@_}ǫt_E)CcĵnN2Ccƪ̴˻dG) +;Yt̴¶òzgR:.-G]mrvɹ¢˷wiaYJ5?Wjuɹ¢ƿvbIOkȴ¢̾uWWwʻ¶Ƽ|\VuuWKg}cI:Sj~ý}eP6L_k}|j^J`yw^ljnɬlki^vu\I\giiiiiiiiiiiiiiiiiiiiiig[G (08˯ +%>Saff`Q?BBBBBBBBBBBBBA8)5Rk}i^bbbbbbbbbbbbb`UB* ?_}z|oW<"Bb¾~fG$Bb¾«kK0AKb¾γ˫kKH]jm¾γ˫kK\v¾γ˫kKg¾γ˫kKiǽ˫kKf¾γ˫kKXq¾γ˫kKDXeg¾γ˫kK,EYgj}Ĥȿ_?YrĤ˶¿_?eĪ˶¿_?gʫ˶¿_?eīȿ_?YsĤ˶¿_?F[hk}Ĥ˶¿_?.?I]}Ĥ˶¿_?!=]}Ĥ˽¿gO!.=]}Ĥ˸Ÿ|_py˶ǹwcPC5d}riu˶˷|maOTl}vk_g˶ɽ|e?R^`XMQqºµt&5?@:0On|tŲv + (Fd|tld]Vh{k:Ul|~vnf]UME>6.&"5FS`heWC (08ͯ +%>SbggbS>HJJJJJJJJJJJG;)5QkkYgjjjjjjjjjjjeV@>^||qnS @`~_ @`a#3@`ƻaR_ccc`YM; (08ί)BVcff^N80I^kmmd]N=+:Vo{eK."@\vziXF3%DcuW8,,Ihs`K6 'GgƺzZLLLLjʸxcM5'GgǺzklllllɸ˺{bH.@KgǺzȸȽv\F[imǺȹìhYsǺɪjdǺаŻheDZаýt[bǺа¿pQUoǺи̭pPBVdgǺнͭãågH):GgǺа̬ťʺ}^?'GgǺа̬ɩʭrU7 'GgǺа˫ήĽeH+&5GgǺϯʪγΰv_M=@R_iǺɪǨzjVUm}Ǻɼäťʯie÷½ãŦsjȼȶ´¿̲ͮseʭìȺΰpZvuý¬ȬʬnJaqvodͰ»e4FSVQg~~zy[*46A_{so{gg~kO 3Nd{y`XotaNQbr|~yhU>!7Nalk_LBU`aXG46GU]^ZN;' (08ϯ+CVaccZI888<9/#&0:DR_d_P<' =Xpv`XXX\XM>EOXbn||iT< )Hgxxxx|vjZdmwiL +KkõyïuU +Kk˵ƹtT(8Kk˵дƱgKAUak˵Ũ½Ʀ~qdQ:Vn˵ʹƦfTG8$c˵ʭƦfXSE1gĨŽήƦxxq_Ff˵ΰήƦsV\w˵ήƸ}]J_nq˵ϵijήƽ}]3DOk˵ήƦuX+Kk˵ļήƦ}}ubI+Kk˵ȫ˵ήƦf]XI55DPk˵ͳ̭ήƦf`\N9Namy˵úťήƦ}yfNc{ŽήƦy\pɼΰ̼ƼcqŸ˱egtʾȵx_Yr~qzηnEYfi`o̸ưq-=GIQqŶth (,Jgu^is|v\;Tkp]HKT]flmnoooool^I&>TdjeUC0,5>GLMNOOOOOMB1 (08Я +%>SbggbS?EEEEEEEEEEED=/5Qkk^eeeeeeeeeeedZI2>^||zv_D' @`nO5& @`Ųr]R@#3@`β|mVkɼʱ̸m[RA+qŸxktȶʼrYQH9%ktjq{λwpeR:[v}pdwɿŸgJI_otl`SjȼɽsS2EQTOBKkĿ}ìsS(240%Da}uian{fJ +5RlxocWLDP]ju}~lS: +%>TbgbZQE:.&3@LV^d`S>& (08ѯ 8Oblmk_K7><:>BGOW_d`R>(*.Hd}x_U]\Y^bgnv~~kU=")3#AXizͭȺe}ãcC#-Mmͭw}ãcC1.Nmƿ}£l^H/'Ed¿u[>>]}¿eF&2B^~ŦfF1K_ky¿j^J_x¿w^k¿jmɬlji]vu\H\giiiiiiiiiiiiiiiiiiiiiig[G (08ү $=RaffaR=8=;;?CHMU\cidUA,4Pj~~kQV]Z[_cglt{nY@%>]||_s}zzlO1 @`rȳvV6#@`{½sT4/@K`ûǭzcH+G\jmǺ£nR7Ztвˬ̵~cGfåϵƪsWgǿ˶{ʹɻddƩnǽɫpWpʴ~drCWdgƻg+;E`ƻk @`p!.@`ƻoQ]_WL@5)0Mg~ƻ{[;%4>?9."  @_xY9 +8UtjO1,Idz{kU=#7M^ffffb\Q>( (08ӯ $=RaffaR=&+06]||aejou{mP1 @`ʵvV8#@`ĿxeL/@K`wZG\jm̷þ~^Zt̴¤ȭwYfƬͮʶfKgǿʸд˸oT9dĦ̸u]C(Wpͷ~_OG8CWdgpɶ¢podQ+;E`¢~e @`°q!.@`Ųr->]|{]=3Hh{jYG0 @``SSSiɷĵt]B#@`sssssɷ±lP/@K`ɷ̰~cG\jmɷnZtnfɷigǿɷpYdɸrRWpļɼβrRCWdgĤɷβrR+;E`ĤɷβrR @`ĻɻβrR!/@`ĹɹβrRQ]_WI;<\|ĤɷβrR%4>?9,<\|ĤƿoO +:Yx|cG0Mg|mm~xgO6!:P_ffbTS_aadfggbZM9" (08կ";P`ffbT@DFFFFFFFFFFFFA5$1Nh}mXdffffffffffff`Q;";Zyr}hN2=]}Ĥy[<"=]}Ĥƾ~^>.?J]}Ĥ˶¾~^>F[il}Ĥ˶¾~^>ZsĤ˶voooo¾~^>eĬ˶zzzzz¾~^>gƫ˶¾~^>eĩ˺¾~^>XqĤ~^>DXfi}Ĥ}_@,#0=]}Ĥ˶veM3>NYd}Ĥ˶v`EVjwĸƹ˶pQhʿĴtTr÷˶sTow˶gKd{ps˶u]Tl|~ti]h˶k?Q]^VKLlƯo%4=?8-Kjm +$B_y{b3L`mooooooooooooooombN (08֯+CWcee]L9Pclmk^[immfU>$ Kjʷǿ̺r]I:+J\htʷ³¢|kpqfVF`w´¢b|r]oɿ¢lnrʽz¢mǴtixk`¢wγs\vuh[M`¢бqI^lneXK>@`Ÿħk1BMOH;.!@`}_%-/)=]{||oS +4Pj~kbu}~~~~~yjYB $=RaffaSHW]^^^^^ZN?, (08ׯ)AUbff_O9!%3L_kmlbO89Un|fL@EE`y}dH+#! +$CbwX^eelqRCC@5%&Ffƻ{ezͳsccc_Q=%&Ffƻ{uγ}jQ6/@Kfƻ{yŨγ}_@G\jmƻ{yȨãcCZtƻȨγcCfƻȨγxkVgǸȨγhdƻȹιqWpƻμqCWdgƻγj+;Ffƻ{|Ǽγź|nX&FfƻΰγεxYA'5FfƻǽγʬnP1AR_mƻǾūγʻeF(Xn}ƸγγǫtX<jƸʷ̷̳dH,qŷǿoT8l~qxɽ{_D( ^y}pbZipwʻzeN4McsxoaSXrõxcM8!6IUXQDDd´v`K6 ,683'Eeº{n^I3 >\wzl_QC10Jd{|tk]OB4&8N`he]UM@3%  (08د +%>Saff`Q<$$$$$$+CWdgg_O85Qk~iPDDDDDD=Wp|eK.?^|{cdddddd[duV7!AavgǹyY9$AaoǹyY90AKaĴtǹyY9*H]jmаʹtǹy`VD\vаʹǹqZgаʹǹjiǻаͽofаʹǹnXqаʹǹ~dDXegδǹyrfQ,NWXWNJh~fK. #18880>YqwhQ9-DWbccc`YM:$  (08ٯ $=RaffaR=IMMMMMMMMMMMI<)4Pj~~jXhmmmmmmmmmmmgW@& +>]|{omR5 @`~|\=#@`ɾ~^>/@K`þ~^>G\jmþ~^>Ztþ~^>f¾~^>gǿ~^B'dnQ3WpxX8CWdgŽȸxX8+;E`ʪȸxX8 @`ʪ˰ȸxX8 @`ʪаȸxX8+8C`ʪаȸxX8EValʪаȸxX8\rǻʪȩȸxX8lʪȸxX8rźɰwW8lymȷóm[Fa|~rgwǵʾsYOesvl`Unƾv}ƴd8JTVNCRrȽn\are,560-KiweSBFWi{v[!=Vpuj\J9'+]|{|}}}}}}}}}}}}}{nW @`h#@`o/@K`иϯoG\jmаϯoZtаˮźϯofаƽ˯ϯogǿа̯ϯodаſʹϯoWpаɮwòϯoCWdgаʹεϯo+;E`аϯo @`аÿήϯo!/@`аãήϯoQ]_WK>Ppа|ήo%4>?9-0Pp°qqmxj +-MkkQPnt\$A[rr[AC]r~~~~yo]G.EWabaWE./EV^^^^YQC0 (08ܯ5NalmlaN5/H]jmmeS<"(Fb{{bF(?\viM0!1:^~ǽ}]=4C]|¿{\C4M`kn¿mk`Mbz¿zbo¿oqɱqnn`xx`K]hiiiiiiiiiiiiiiiiiiiiiih]K (08ݯ,EYfhh`O95L_ijh\H0=Yr|fK.+Fayv]C*'GfuV7) )IiȸxXZsɸĿʵ{jVeɸž͸igɺ̻±seɸqXqɸ|bDXfiɸ{ʸzhO,Q]_WVtŪt%4>?9Xxǰon +3QnkTcs~c +'B[nmU>GVdjpuwwwwwugQ-BVfkeU?(+:EJPVWWWWWVK: (08߯2I[efdZG03K_kmlkj]K9'&C_vt]A$%C_xweS@*/OmkL333LkmWA+1QqƯoSSSSSmʹ¾oY@1QqϯsssssssʹDzlP4DQqϯ͵ɳw[M`lqϯ̵eazϯemϯɷ~aoȹkRkϯǺsS]uϯļżˬoPH[fqϯļ½fG/>QqϯļͶz\=1QqϯļãŨnQ31QqϯļǬɷ}`D'*8Qqϯ̺ǪpS6&DUbqϯ˸qcR?[qϾɼ}lTkƹżѼcqöĺ̼ĥħgkͺͰťe`{|oθĽ¢cNdsuk^`z{˷˶{]7ITVNAMamnemtqR,460$4DNNG`yr]teH '..4Lav|kXG\m~zgR94IY`]P>/AR`ed]M;% (08 (AWfllfWA''AXksncU@''%6SnnSGGQmmTGGD9(?_~}`ggg{gggcUA( @`|ÿnT8*@`̱aB#6GR`ĤdD$MbqtƮĤdD$^zƦĤdD$hƩĤdD$hĤdE*cƬqU7Tl|Ʒ|\Ufmmmmmmmmmmmmmmmmml`M (08+CVcff^MBOSOI^kmjaOQPH>-;Wpzd_msm]v|gqogZF-&Fet{ssZ> (HhƸx̵gG((HhȸyʹϰçiI)/@KhȸxȮʪ̱{`D+G\jmȸxä˺qW:ZtȸżbCeȸĤdDgǩȪaKdȸ¾x]WpȸϲgCWdhȸèh*;Hhȸ̰¿d(Hhȸ|ǻ˸nV(Hhȸľ͵x_*8HhȸϲʷlDUamȸÿϲ«n[qȼɾϲ~ckȻϲ~hPqķwýaBksfaãcC`{}pcVIa`@Ndsvl_RF9@`ɶ}]>7ITVOB5(<[xoS6,560% 1Nj{_C'"=Uhu}sdN4(Q]_WK?3?GHHHHHHdĽ}]HG?0%4=?9-!!((((((DdĽ}]=(! "AayZ;7Sm}hN1 '@Tbff`P;" (08 '@Tbff_P:226Nalmk_K3222-!8Tm|gRRRRc|x_RRRRK<("BaxrrrrrrrrrrhU=$DdļͭjM$DdļͲuV/@Kdļ¶vVG\jmļͭqSZtļ͹hHeļͼjUgǶͭhdļ͸qWpļqCWdgļj*;Edļ|Ƶ|oY$Ddļ|źʵuUB$Ddļ|źʵuU5*8Ddļ˵uU5DUalļźʵuU5[qļǻźʵuU5kźʵuU5qƺŻʵuU5kymźʵuU5`{~sg[eź{{|ʵuU5NdsvlaUIEeźznʵuU57ITVOC7+EeĺzmþrR3,560%#Cbuc}dI+8TmzdUm~wgP8 '@Tadd]M@S`ccc_YL:#  (08(AUbee_O9 8Pcmml_L39Un{fL/+Ie}y_C&&&# $CbwXFFSrlLFFFC8'&FfŻ{fffftͭmffffbT?&FfƻͭlS/@Kfƻͭ~`G\jmƻãcZtƻƺãcfƻƺãcgƺããceƻǻcXqƻлʪvZDXehƻźδ̬ʪjJ+)AVfkeVF5 +=MUVVVVVSH9' (08 (AUbff_PDKLLLLLLLLLLLKB29Un|gaklllllllllllj_K3#Cbx|x`C&%Eeż|lM-%Eeż|̮nN./@Jeż|ͭήnN.G\ilż|ͭήnN.ZtżͷήnN.fż;ήnN.hɾͭήnN.fżͭήnN.YrżͮnN.EYfiż|ʹήnN.,=Geż|ͭήnN.%Eeż~ͭήnN.#1EeżˮnXF>N[hżs\Vjxżkhɾįoqʽnnȼƿ|c_zuhhxƿǵxcOMev|sf\t̹zm˺zc8KX\VLkŲzdSfxʽr/9<7OoŹr`M9L^qdzu*If~kXF3 2DYok;UkrbQ>,,BXmmX(>ScidUF7%*@UejdT@ (08-EXdfe]K5/I^mqhXF/!>ZrxbG*$?[vs\A% +)IhqR37PklN. +KkƵuU5Jc}˱qR9#+Kk˵uUF]wͳ~fQ;%/@Kk˵uU\sƻū~hR<)G\jm˵ujrͳjVD2%Zt˵ͷ­p_OAe˵ͷĮzl[gǩ͹ɷpd˵˶|Wp˵°zCWdk˵k*;Kk˵ǬmU+Kk˵ʶϱή̬lL-Kk˵ʶϱή̬lL9JWk˵ʶϱή̬lLQft˵ɮʶϱή̬lLc~Ǻ̬lLm¶ʶϱή̬lLkʶϱή̬lL`~{njʶϱή̬lLRj{wj]Qjʶϱή̬lL=P]`YM@Jjʶϱή̬lL$4>@;/*JjʶžiJ  )Hh|`B!?[u}yzymyzvfP5/H\ikkbYZZQZZceebYK9# (08(AUbee_O98=;<@DINV]ell`N:#9Un{fLV]Z[`dhmu|zhP5$Cbw_s}z{|`A&FfŻ{rfF&Ffƻ{}aB/@Kfƻ{ľļoV:G\jmƻ{ϳȹ̶fIZtƻæƨɭtXfƻ͵ίǼfg¨ǭmdƻȵhWpƻŭ˵pYCWdgƻť˵v^+;FfƻŨ˵l&Ffƻȯo -FfƻŮ˵m;KWfƻť˵zaShuƻĽť˵uaMfɾƵuU5pĹű˵uU5nwťuU5a|}qe]mqqq|ť|jM/Phzvk_SHGc|ťesuujW>#;N[_XMA61PpťeTUUM>*"2Zst^G--FZfiiifbXG1 (08 +%>Saff`Q<"%=R_hkcQ: 5Rk}iO26Rk}~gL/+++)  ?_}z[KK`~wZKKKKH=+"Bb¾~ikkk¾kkkkkgXC$Bb¾~ͱpV0AKb¾ƽaH]jm¾ãc\v¾̴ãcg¾̴ãciǴ̴˹̷£cf¾ƽ˹}_Xq¾w˹|jQDXeg¾{fq͸pS,,tŹsllmͳsllllhYDmxͳqVb}~rfͳbPftvk`Tfãc9JUVNBDda-560$Zr~s_G7M^ffcVB-DWceeec_VF1 (08 +%>SbggbS>% :Rdmmk^I1 5QkkQ43Kgw]@3332,>^||]SSUtiSSSSRJ: @`ssssvʪsssssrfR @`ʪf#3@`ʳqGbxpXCUcgaQ;*0!5K\ddbVC+9DGB6$ (08(AUbee_O9 &?VfmmhYD+ 9Un{fL77QlqW:773($CbwXWW\{bWWWRD1&FfŻ{swww}ãwwwwp^F+&Ffƻ{ãrV8/@Kfƻ÷}^>G\jmƻ¾~^IZtƻã¾v_fƻæ¾ngƲrdƻð¾qWpƻã¾~eCWdgƻé¾~dQ+;Ffƻɾ~`C&FfƻвkK -FfƻƽɼjK;KVfƻȻȬǼx^BShtƻĺ̶ûʺxbK2fʾóεybK4pĸŽãĪjUG8nôãrdQa|}Ŷãį~ePhzvjtƷãǹr;N[_XQpãzs"2SbggbS>*2;Rdmmj]H:91#5QkkQHRShv\ZYN?/>^||]cqsvmyxj[G. @``{ɩt[>! @`jǧgH(#3@`qγť§iI)# gȸq_M9$gʺzfQ<^zéʸ~jPMdsw­|^7IT`ȺťĿb,@`¸ťx[ @`ɭťδfL*8C`Ʀť¿lR9DUamİ̶ˬʯx\A%[qɿçɴɷhL0kȻïļijqW-ktuʵɸrhYD[v}p{ƵƼrXI_otl`rʻroȺc2EQTOUuĺ~n[Zme(240NkscRBASeww[ +#?Wp}shXG7&&8J\lwzcJ+CWdg_UJ<, 0ANZeg^M6 (08 (AUbff_O9 $?VgokdVA( 9Un|fL02PlnT8'''' #CbwXGG[yaGGGGF>/%EeŻ{gggggggggf[H%EeŻʷu]3CLeŻɬkL_lmŻǯo_yŻȭεmlŻʷŪzamDzŽȨſwl`MjŻêȨ˼ziU\tŻýȽкiGZfgŻɿɸȸs.=FeŻʪȨίq%EeŻʪȨή{c %EeŻ}ήzgN*7EeŻʭȭήnN:DUalŻʪȨήnN7[qŻȼʪȩήsdPkˮ}cqƺʫȫokztȨϯo`{sh\hxȨͭmNdsvlaUJ>SfopmwȲæj7ITVOC8,&:IPPTsõ{^,560% *00Ie|nQ 8Obt{mZB "5HYbcccccc]PA- (08 '@Tbff`P:1549>DIQYajmeTA+8Tm|hMPUTY^chpxnX>""Bax]nusx~iK-$DdĽ}rDZqQ1$DdĽ}~lM./@KdĽ}½s\B%G\jmĽ}ɹΰʹ~bG+ZtĽвǻŪsW;fĽŧťȺgKgǿǹ~̭ʯuXdĽ̮tsƽdWpĽŽ|k~hCWdgĽw|Ĥww~b+;EdĽĤ{_$DdĽķg!/DdĽþg\y®lnj 3PlnW]t|a %?Whpppo|hUAG^u{eO)=JPPPVdg_O;(0G[hj`N8 (08 +%>Saff`Q<"$>UgnkeXC+5Rk}iO===PkqW===8, ?_}z[]]]]yd]]]VG2"Bb¾~y}}}}~Ŧ}}}}s`G#Bb¾~rU/@Kb¾ȽzZG\jm¾θzZZt¾ʫpSe¾iIgǸ̹iNd¾Ȫ{aWp¾ȹlCWdg¾ím*;Eb¾̵ʹh"Bb¾~ǼȹȱqY"Bb¾ƽȹȱ{d*8Cb¾ǿŻȶsDUal¾ȹƳw[q¾ƻȹlkȹpYqźȽnNkyyȹgI`{~rg[ew}}}}ȹ}}}}{mWSbggbS>/H]koiaP:!!! 5QkkQ>[u}gLAAA@8)>^||]Gfvaaaa_UC @``Po˸pY @``Yxίi#3@``eo?84Tsm ,Id{x_7N`iiiiiiiiiiiiiiiih]J (08 *CWehhaP:)BVdhhbQ;" +2;Wp}gL9Uo~hN1$9IQRdwXRbxY:8Qeqrrƺzrrnļ|\<Gd~ƺļ|\><3$Ooƺļ|^^\P=& Ppåż~~~zjR7OkƺƻbD$a|ƺƾhH(kƺǹȨhH(kɸȨhH(f˸ͭ˶ȨhH(Vm}ɬͭŶʹȨhH(axʹͭɸаȨhH(pǾƼɶ˫ȨhH(tɹƺƧɩiI) jƺ˫kK+Xqƽʸì̬lN>,LlƺˮͮziYCFdƺĬʯpUL_kvyzƺͳDZ``yƺǼlĴalý«uZc~^mý¬~dIWu|\f~hQ7LjŮqSZs~ytn{~hQ;$A]vgIFZgid_YTOeyweQ;$0Iav~mW<->GID?:48K^ih]K8$ 3IYcgaR@) (087Oblml`L38Pcmml_L3 -3Hd|y`CIe}y_C%&;KSTplTSrlL, :SgsttͮttqtͭmM40&Jgή|ͭmTTOC0Qqδͭtttn]F+Rr«ͭsW9Umήʹ_? eή`@ mλͭ¿_?mͭ¿_?eȸ̮ͭ¿_?Tjyŧ̬¾~^>`}ί̴ƴɩ¾~^>g»̼Ĥ¾~^>gιȿþ~^>&_{ήaQBVsήϱ}n[]}ιåǼo]}λ̶¦ĵyWtή§æƹyHas{{{ή˰{o{ħǸx3HV[[rή̵iSoʮǷw,7;RrήͶqWGe˰r2RrĮȴr[D;Xvèj0Ons\E..Lg~b 'D^un[E. :Qgz|iR2HZddcfkeUA. $:O]fh`O< (08 (AUbff_PFMMMMMMMMMMMMMG9&9Un|gdmmmmmmmmmmmmmdS;#CbxhM%Eeż|vV%Eeż|̸xX/@Keż|ʪɸxXG\jmż|ʪɸxXZtżʳɸxXfżɸxXgǿʪɸxXdżʪɸxXWpżʸɸxXCWdgż|ͽxX+;EeżŨn%Eeżδ|2APeżưǾ~K^l{żŶƪɫż|`xǸŭͷžȹynȹ­αʷwqʻīʹtgrȯ̱ͮoYtsdd~̳ȻȨiG\knfWNmɴª¢c/ALNH;LkŭƼ}]$,.)$B^wįuW  +1I_t{s~dI2GW_]_rsygQ7,9?=EZhkcXbdffc\L:$ (08 $>TdjjfXC*5M`lmlbO7 3PkpV9-Eaz|cG---+!<[zbMMNmpQMMMJ>,=]}ĤmmmmoͲrmmmmhYC&=]}ĤϲpU2DN]}Ĥϲ`J_mq}Ĥ¢b\wĤŭþ~_fıǻεmSgĦŧkǩndXGcĤвƺt]VnĤʸɬlAUad}Ĥñq(8B]}Ĥp =]}Ĥ~e#0=]}ĤxeQ>NYd}ĤȸxX8VjwĽβȸxX8hǻβȸxX8rβraaahȸxX8osβ{{{{{ȸxX8cynbnβȸxX8Sjz}sh\PNnλȸxX8=P[^VJ>2NnλȸxX8$3<>8, .NnŲøxX8 ,Lj{{{{{sU6#@\tv_[[[[mxbH,/FYdee[I;;;@T`cc[K5 (08 +0H]jmmdR; 9Pclmk^J1 )1?\vhL22Je}w]A1)5FPRhuVRRSsiRPF5 3Laorrɷwrrrru˫rrpbM3A^yɷ˫z_BIiɷ˲jJIiêjJFeɷ˫fG;Vnɷ˫oW<*AT`ciɿ˫kcaUB**8AIiɷ˫kKA8*6GRTTiɷ˫kTTRG6Mbqtttɾ˫tttqbM^zɷ˫z^hɷ˴hhhcǻȮcTl|¿Ʋ|lTVl|ƽ¿˷v_fʺɵƽmmƶ¿Ʈpi¿fYq¿lTD\uĵuU?4TttU5.KhhL.!;TgqqqqqqqqqqqqqqqqqqqqgTUfmmj[F- :Vo{fL44OksY<4443+%DcvXTTYydTTTTRH7'Ggƻ{tttt{ƦtttttqdO'GgǻƦ|a/@KgǻƴkG\jmǻ«kZtǻffǻoWgǼʹaUBdǻʹaA(WpǻʹaA!CWdgǻ{aA!+;Ggǻ{aA!'Ggǻ{|^?!/GgǻͼaA2Q]_WJ=6DKeƦfKKKKJB3%4>?9- &FeùdD++++$ +>\ztY< 3Oi}s^G-#4$?_~~_````|a```]Q= @`~¢{kS+@`b6HS`gMcru̶f^y̵y]gȽĶyqbLgĴqVbƸbSk|Ľ½k>Q]`r%4@`ʹr @`ʪi#0@`ʪxlW>NZfзȨʪjP?VjwƹбȨʪjJ*h¶бȨʪjJ*r˿бȨʪjJ*o{pȨʪjJ*bwj^pбʪjJ*Sjz}sfZMPpʪjJ*=P[^VI<0JgxʪjJ*#3<>8, OXYXPnv[?!#1898D_vs_H/2I[efffd_WG2 (08-EXegg^MLSSSSSSSSSSSSM?, >YrzdisssssssssssskYA' + (HgsnR4 +*JjǷwzZK;*Jjʷwǻ{sgS/@KjʷƻeG\jmʷƻoZtʷpfʷƻjgȸƻ~pZeʷ|iPXqʷ|^DXejʷ¢b+>^~ãа˱mP3%>^~üаèƭz`C&?P^~ùаƼ˳gM9,Vly~ãаdzyjaWFgîаòs^n¾аõnkͺƴtb~~¿{uunRhwz¿v\;M_¿o_I&@`eE3>S`y¿~`S?Sl~¿lT`~¿adĥecdZuuZH^mqqqqqqqqqqqqqqqqqqqqqqm^H (08/FXbaXNCDNPPPPPPPPPPPPPMB0'B\svla`npppppppppppppl]G.5Rn}xtZ<<\{dD@[zŵťeERm˯ʷťeEb~ʷťeEiżʷťeEe;åeEWo˶ɫaBBUblvδ˫ȻlS<)9CYqǮˬ˴ƽ~iO)@Wo̳äz[=Vm˹ƻ˫þ~^Miɼɭˮɻ{[TtȾɺëuVSr¿~dJId}¿|jR87Ph{¿~^>%*;Zy¿}^>+BWdo¿reXCVo¿qWb¿deǧgdfYstZF[immmmmmmmmmmmmmmmmmmmmmj\G (08 \ No newline at end of file diff --git a/metrics/integration/glyphs/NotoCJK/22528-22783.pbf b/metrics/integration/glyphs/NotoCJK/22528-22783.pbf new file mode 100644 index 00000000000..5572a193fad Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/22528-22783.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/22784-23039.pbf b/metrics/integration/glyphs/NotoCJK/22784-23039.pbf new file mode 100644 index 00000000000..0b637f674ba Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/22784-23039.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/2304-2559.pbf b/metrics/integration/glyphs/NotoCJK/2304-2559.pbf new file mode 100644 index 00000000000..2952a61057a --- /dev/null +++ b/metrics/integration/glyphs/NotoCJK/2304-2559.pbf @@ -0,0 +1,3 @@ + +" +Noto Sans CJK JP Thin 2304-2559 \ No newline at end of file diff --git a/metrics/integration/glyphs/NotoCJK/23040-23295.pbf b/metrics/integration/glyphs/NotoCJK/23040-23295.pbf new file mode 100644 index 00000000000..5724871350f Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/23040-23295.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/23296-23551.pbf b/metrics/integration/glyphs/NotoCJK/23296-23551.pbf new file mode 100644 index 00000000000..20215ef787b Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/23296-23551.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/23552-23807.pbf b/metrics/integration/glyphs/NotoCJK/23552-23807.pbf new file mode 100644 index 00000000000..3d2131c6d15 Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/23552-23807.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/23808-24063.pbf b/metrics/integration/glyphs/NotoCJK/23808-24063.pbf new file mode 100644 index 00000000000..ff913bfba2a Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/23808-24063.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/24064-24319.pbf b/metrics/integration/glyphs/NotoCJK/24064-24319.pbf new file mode 100644 index 00000000000..b957670fab7 Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/24064-24319.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/24320-24575.pbf b/metrics/integration/glyphs/NotoCJK/24320-24575.pbf new file mode 100644 index 00000000000..fb5bf01fff1 Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/24320-24575.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/24576-24831.pbf b/metrics/integration/glyphs/NotoCJK/24576-24831.pbf new file mode 100644 index 00000000000..6e40f45f16a Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/24576-24831.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/24832-25087.pbf b/metrics/integration/glyphs/NotoCJK/24832-25087.pbf new file mode 100644 index 00000000000..f7fae4e1509 Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/24832-25087.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/25088-25343.pbf b/metrics/integration/glyphs/NotoCJK/25088-25343.pbf new file mode 100644 index 00000000000..722b88a5703 Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/25088-25343.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/25344-25599.pbf b/metrics/integration/glyphs/NotoCJK/25344-25599.pbf new file mode 100644 index 00000000000..c98627f45bc Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/25344-25599.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/256-511.pbf b/metrics/integration/glyphs/NotoCJK/256-511.pbf new file mode 100644 index 00000000000..fce1e95e4f4 Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/256-511.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/2560-2815.pbf b/metrics/integration/glyphs/NotoCJK/2560-2815.pbf new file mode 100644 index 00000000000..57c4bca6140 --- /dev/null +++ b/metrics/integration/glyphs/NotoCJK/2560-2815.pbf @@ -0,0 +1,3 @@ + +" +Noto Sans CJK JP Thin 2560-2815 \ No newline at end of file diff --git a/metrics/integration/glyphs/NotoCJK/25600-25855.pbf b/metrics/integration/glyphs/NotoCJK/25600-25855.pbf new file mode 100644 index 00000000000..28759537741 Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/25600-25855.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/25856-26111.pbf b/metrics/integration/glyphs/NotoCJK/25856-26111.pbf new file mode 100644 index 00000000000..9a4aca1ffc7 Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/25856-26111.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/26112-26367.pbf b/metrics/integration/glyphs/NotoCJK/26112-26367.pbf new file mode 100644 index 00000000000..5817c1b1ae4 Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/26112-26367.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/26368-26623.pbf b/metrics/integration/glyphs/NotoCJK/26368-26623.pbf new file mode 100644 index 00000000000..fd59e205884 Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/26368-26623.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/26624-26879.pbf b/metrics/integration/glyphs/NotoCJK/26624-26879.pbf new file mode 100644 index 00000000000..df482c01221 Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/26624-26879.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/26880-27135.pbf b/metrics/integration/glyphs/NotoCJK/26880-27135.pbf new file mode 100644 index 00000000000..b5583233619 Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/26880-27135.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/27136-27391.pbf b/metrics/integration/glyphs/NotoCJK/27136-27391.pbf new file mode 100644 index 00000000000..af939e8e58f Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/27136-27391.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/27392-27647.pbf b/metrics/integration/glyphs/NotoCJK/27392-27647.pbf new file mode 100644 index 00000000000..0fe4e639d7d Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/27392-27647.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/27648-27903.pbf b/metrics/integration/glyphs/NotoCJK/27648-27903.pbf new file mode 100644 index 00000000000..1ae064d5942 Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/27648-27903.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/27904-28159.pbf b/metrics/integration/glyphs/NotoCJK/27904-28159.pbf new file mode 100644 index 00000000000..15a7cc90868 Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/27904-28159.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/2816-3071.pbf b/metrics/integration/glyphs/NotoCJK/2816-3071.pbf new file mode 100644 index 00000000000..193e3651703 --- /dev/null +++ b/metrics/integration/glyphs/NotoCJK/2816-3071.pbf @@ -0,0 +1,3 @@ + +" +Noto Sans CJK JP Thin 2816-3071 \ No newline at end of file diff --git a/metrics/integration/glyphs/NotoCJK/28160-28415.pbf b/metrics/integration/glyphs/NotoCJK/28160-28415.pbf new file mode 100644 index 00000000000..e00a0e7d5a8 Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/28160-28415.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/28416-28671.pbf b/metrics/integration/glyphs/NotoCJK/28416-28671.pbf new file mode 100644 index 00000000000..442bc102fa4 Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/28416-28671.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/28672-28927.pbf b/metrics/integration/glyphs/NotoCJK/28672-28927.pbf new file mode 100644 index 00000000000..e4dab0154ce Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/28672-28927.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/28928-29183.pbf b/metrics/integration/glyphs/NotoCJK/28928-29183.pbf new file mode 100644 index 00000000000..5058319e3e1 Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/28928-29183.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/29184-29439.pbf b/metrics/integration/glyphs/NotoCJK/29184-29439.pbf new file mode 100644 index 00000000000..ff5c06081a8 Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/29184-29439.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/29440-29695.pbf b/metrics/integration/glyphs/NotoCJK/29440-29695.pbf new file mode 100644 index 00000000000..4288df57ef4 Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/29440-29695.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/29696-29951.pbf b/metrics/integration/glyphs/NotoCJK/29696-29951.pbf new file mode 100644 index 00000000000..34dc68c12f5 Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/29696-29951.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/29952-30207.pbf b/metrics/integration/glyphs/NotoCJK/29952-30207.pbf new file mode 100644 index 00000000000..1335fdda2a6 Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/29952-30207.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/30208-30463.pbf b/metrics/integration/glyphs/NotoCJK/30208-30463.pbf new file mode 100644 index 00000000000..b7e46b77e0f Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/30208-30463.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/30464-30719.pbf b/metrics/integration/glyphs/NotoCJK/30464-30719.pbf new file mode 100644 index 00000000000..3a918c4a20c Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/30464-30719.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/3072-3327.pbf b/metrics/integration/glyphs/NotoCJK/3072-3327.pbf new file mode 100644 index 00000000000..79b76e21383 --- /dev/null +++ b/metrics/integration/glyphs/NotoCJK/3072-3327.pbf @@ -0,0 +1,3 @@ + +" +Noto Sans CJK JP Thin 3072-3327 \ No newline at end of file diff --git a/metrics/integration/glyphs/NotoCJK/30720-30975.pbf b/metrics/integration/glyphs/NotoCJK/30720-30975.pbf new file mode 100644 index 00000000000..848224cdb71 Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/30720-30975.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/30976-31231.pbf b/metrics/integration/glyphs/NotoCJK/30976-31231.pbf new file mode 100644 index 00000000000..24d76853da6 Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/30976-31231.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/31232-31487.pbf b/metrics/integration/glyphs/NotoCJK/31232-31487.pbf new file mode 100644 index 00000000000..20d69d28fc7 Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/31232-31487.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/31488-31743.pbf b/metrics/integration/glyphs/NotoCJK/31488-31743.pbf new file mode 100644 index 00000000000..81f0fc30eb4 Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/31488-31743.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/31744-31999.pbf b/metrics/integration/glyphs/NotoCJK/31744-31999.pbf new file mode 100644 index 00000000000..2cdf9ecf731 Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/31744-31999.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/32000-32255.pbf b/metrics/integration/glyphs/NotoCJK/32000-32255.pbf new file mode 100644 index 00000000000..27026ba0585 Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/32000-32255.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/32256-32511.pbf b/metrics/integration/glyphs/NotoCJK/32256-32511.pbf new file mode 100644 index 00000000000..67b5c56044a Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/32256-32511.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/32512-32767.pbf b/metrics/integration/glyphs/NotoCJK/32512-32767.pbf new file mode 100644 index 00000000000..fb71ce494e3 Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/32512-32767.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/32768-33023.pbf b/metrics/integration/glyphs/NotoCJK/32768-33023.pbf new file mode 100644 index 00000000000..16a3efdc56e Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/32768-33023.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/33024-33279.pbf b/metrics/integration/glyphs/NotoCJK/33024-33279.pbf new file mode 100644 index 00000000000..3ef3b8ff768 Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/33024-33279.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/3328-3583.pbf b/metrics/integration/glyphs/NotoCJK/3328-3583.pbf new file mode 100644 index 00000000000..25c6289aa8a --- /dev/null +++ b/metrics/integration/glyphs/NotoCJK/3328-3583.pbf @@ -0,0 +1,3 @@ + +" +Noto Sans CJK JP Thin 3328-3583 \ No newline at end of file diff --git a/metrics/integration/glyphs/NotoCJK/33280-33535.pbf b/metrics/integration/glyphs/NotoCJK/33280-33535.pbf new file mode 100644 index 00000000000..c5e30a318ed Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/33280-33535.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/33536-33791.pbf b/metrics/integration/glyphs/NotoCJK/33536-33791.pbf new file mode 100644 index 00000000000..d13c174a9d7 Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/33536-33791.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/33792-34047.pbf b/metrics/integration/glyphs/NotoCJK/33792-34047.pbf new file mode 100644 index 00000000000..a07026ea9d6 Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/33792-34047.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/34048-34303.pbf b/metrics/integration/glyphs/NotoCJK/34048-34303.pbf new file mode 100644 index 00000000000..3d0ed0cae5d Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/34048-34303.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/34304-34559.pbf b/metrics/integration/glyphs/NotoCJK/34304-34559.pbf new file mode 100644 index 00000000000..753a186ad83 Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/34304-34559.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/34560-34815.pbf b/metrics/integration/glyphs/NotoCJK/34560-34815.pbf new file mode 100644 index 00000000000..b5aff64c049 Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/34560-34815.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/34816-35071.pbf b/metrics/integration/glyphs/NotoCJK/34816-35071.pbf new file mode 100644 index 00000000000..552052e1b6d Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/34816-35071.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/35072-35327.pbf b/metrics/integration/glyphs/NotoCJK/35072-35327.pbf new file mode 100644 index 00000000000..5486c9d209e Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/35072-35327.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/35328-35583.pbf b/metrics/integration/glyphs/NotoCJK/35328-35583.pbf new file mode 100644 index 00000000000..4eb02381045 Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/35328-35583.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/35584-35839.pbf b/metrics/integration/glyphs/NotoCJK/35584-35839.pbf new file mode 100644 index 00000000000..006e2e86100 Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/35584-35839.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/3584-3839.pbf b/metrics/integration/glyphs/NotoCJK/3584-3839.pbf new file mode 100644 index 00000000000..a81798f3511 --- /dev/null +++ b/metrics/integration/glyphs/NotoCJK/3584-3839.pbf @@ -0,0 +1,3 @@ + +" +Noto Sans CJK JP Thin 3584-3839 \ No newline at end of file diff --git a/metrics/integration/glyphs/NotoCJK/35840-36095.pbf b/metrics/integration/glyphs/NotoCJK/35840-36095.pbf new file mode 100644 index 00000000000..0af57954eb2 Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/35840-36095.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/36096-36351.pbf b/metrics/integration/glyphs/NotoCJK/36096-36351.pbf new file mode 100644 index 00000000000..21215ac3316 Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/36096-36351.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/36352-36607.pbf b/metrics/integration/glyphs/NotoCJK/36352-36607.pbf new file mode 100644 index 00000000000..dfc553fdcfc Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/36352-36607.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/36608-36863.pbf b/metrics/integration/glyphs/NotoCJK/36608-36863.pbf new file mode 100644 index 00000000000..eb1bf73498e Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/36608-36863.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/36864-37119.pbf b/metrics/integration/glyphs/NotoCJK/36864-37119.pbf new file mode 100644 index 00000000000..ec7e508191f Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/36864-37119.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/37120-37375.pbf b/metrics/integration/glyphs/NotoCJK/37120-37375.pbf new file mode 100644 index 00000000000..e8df4d940f4 Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/37120-37375.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/37376-37631.pbf b/metrics/integration/glyphs/NotoCJK/37376-37631.pbf new file mode 100644 index 00000000000..42d917ddefc Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/37376-37631.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/37632-37887.pbf b/metrics/integration/glyphs/NotoCJK/37632-37887.pbf new file mode 100644 index 00000000000..e62b3a078ae Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/37632-37887.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/37888-38143.pbf b/metrics/integration/glyphs/NotoCJK/37888-38143.pbf new file mode 100644 index 00000000000..c2dfacfc933 Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/37888-38143.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/38144-38399.pbf b/metrics/integration/glyphs/NotoCJK/38144-38399.pbf new file mode 100644 index 00000000000..8466ff9112d Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/38144-38399.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/3840-4095.pbf b/metrics/integration/glyphs/NotoCJK/3840-4095.pbf new file mode 100644 index 00000000000..e6b2d01e1c1 --- /dev/null +++ b/metrics/integration/glyphs/NotoCJK/3840-4095.pbf @@ -0,0 +1,3 @@ + +" +Noto Sans CJK JP Thin 3840-4095 \ No newline at end of file diff --git a/metrics/integration/glyphs/NotoCJK/38400-38655.pbf b/metrics/integration/glyphs/NotoCJK/38400-38655.pbf new file mode 100644 index 00000000000..27c53cd105f Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/38400-38655.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/38656-38911.pbf b/metrics/integration/glyphs/NotoCJK/38656-38911.pbf new file mode 100644 index 00000000000..54c6927c7db Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/38656-38911.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/38912-39167.pbf b/metrics/integration/glyphs/NotoCJK/38912-39167.pbf new file mode 100644 index 00000000000..538277d783a Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/38912-39167.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/39168-39423.pbf b/metrics/integration/glyphs/NotoCJK/39168-39423.pbf new file mode 100644 index 00000000000..734cc94c06e Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/39168-39423.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/39424-39679.pbf b/metrics/integration/glyphs/NotoCJK/39424-39679.pbf new file mode 100644 index 00000000000..90ce8f388f0 Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/39424-39679.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/39680-39935.pbf b/metrics/integration/glyphs/NotoCJK/39680-39935.pbf new file mode 100644 index 00000000000..8c4d7b0f2c1 Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/39680-39935.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/39936-40191.pbf b/metrics/integration/glyphs/NotoCJK/39936-40191.pbf new file mode 100644 index 00000000000..14f24592fd3 Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/39936-40191.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/40192-40447.pbf b/metrics/integration/glyphs/NotoCJK/40192-40447.pbf new file mode 100644 index 00000000000..838ec4cf647 Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/40192-40447.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/40448-40703.pbf b/metrics/integration/glyphs/NotoCJK/40448-40703.pbf new file mode 100644 index 00000000000..86214d5cb1f Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/40448-40703.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/40704-40959.pbf b/metrics/integration/glyphs/NotoCJK/40704-40959.pbf new file mode 100644 index 00000000000..5bc2eabba36 Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/40704-40959.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/4096-4351.pbf b/metrics/integration/glyphs/NotoCJK/4096-4351.pbf new file mode 100644 index 00000000000..eccf1d0a320 --- /dev/null +++ b/metrics/integration/glyphs/NotoCJK/4096-4351.pbf @@ -0,0 +1,3 @@ + +" +Noto Sans CJK JP Thin 4096-4351 \ No newline at end of file diff --git a/metrics/integration/glyphs/NotoCJK/4352-4607.pbf b/metrics/integration/glyphs/NotoCJK/4352-4607.pbf new file mode 100644 index 00000000000..8032d467889 Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/4352-4607.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/4608-4863.pbf b/metrics/integration/glyphs/NotoCJK/4608-4863.pbf new file mode 100644 index 00000000000..c39c61e7529 --- /dev/null +++ b/metrics/integration/glyphs/NotoCJK/4608-4863.pbf @@ -0,0 +1,3 @@ + +" +Noto Sans CJK JP Thin 4608-4863 \ No newline at end of file diff --git a/metrics/integration/glyphs/NotoCJK/4864-5119.pbf b/metrics/integration/glyphs/NotoCJK/4864-5119.pbf new file mode 100644 index 00000000000..7d575e0688a --- /dev/null +++ b/metrics/integration/glyphs/NotoCJK/4864-5119.pbf @@ -0,0 +1,3 @@ + +" +Noto Sans CJK JP Thin 4864-5119 \ No newline at end of file diff --git a/metrics/integration/glyphs/NotoCJK/512-767.pbf b/metrics/integration/glyphs/NotoCJK/512-767.pbf new file mode 100644 index 00000000000..7e2b891899d Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/512-767.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/5120-5375.pbf b/metrics/integration/glyphs/NotoCJK/5120-5375.pbf new file mode 100644 index 00000000000..b60075f9d75 --- /dev/null +++ b/metrics/integration/glyphs/NotoCJK/5120-5375.pbf @@ -0,0 +1,3 @@ + +" +Noto Sans CJK JP Thin 5120-5375 \ No newline at end of file diff --git a/metrics/integration/glyphs/NotoCJK/5376-5631.pbf b/metrics/integration/glyphs/NotoCJK/5376-5631.pbf new file mode 100644 index 00000000000..be00d4602d5 --- /dev/null +++ b/metrics/integration/glyphs/NotoCJK/5376-5631.pbf @@ -0,0 +1,3 @@ + +" +Noto Sans CJK JP Thin 5376-5631 \ No newline at end of file diff --git a/metrics/integration/glyphs/NotoCJK/5632-5887.pbf b/metrics/integration/glyphs/NotoCJK/5632-5887.pbf new file mode 100644 index 00000000000..3a2bd8c5879 --- /dev/null +++ b/metrics/integration/glyphs/NotoCJK/5632-5887.pbf @@ -0,0 +1,3 @@ + +" +Noto Sans CJK JP Thin 5632-5887 \ No newline at end of file diff --git a/metrics/integration/glyphs/NotoCJK/5888-6143.pbf b/metrics/integration/glyphs/NotoCJK/5888-6143.pbf new file mode 100644 index 00000000000..886094ccb68 --- /dev/null +++ b/metrics/integration/glyphs/NotoCJK/5888-6143.pbf @@ -0,0 +1,3 @@ + +" +Noto Sans CJK JP Thin 5888-6143 \ No newline at end of file diff --git a/metrics/integration/glyphs/NotoCJK/6144-6399.pbf b/metrics/integration/glyphs/NotoCJK/6144-6399.pbf new file mode 100644 index 00000000000..4e8f5b831b4 --- /dev/null +++ b/metrics/integration/glyphs/NotoCJK/6144-6399.pbf @@ -0,0 +1,3 @@ + +" +Noto Sans CJK JP Thin 6144-6399 \ No newline at end of file diff --git a/metrics/integration/glyphs/NotoCJK/6400-6655.pbf b/metrics/integration/glyphs/NotoCJK/6400-6655.pbf new file mode 100644 index 00000000000..492f1deee4b --- /dev/null +++ b/metrics/integration/glyphs/NotoCJK/6400-6655.pbf @@ -0,0 +1,3 @@ + +" +Noto Sans CJK JP Thin 6400-6655 \ No newline at end of file diff --git a/metrics/integration/glyphs/NotoCJK/65024-65279.pbf b/metrics/integration/glyphs/NotoCJK/65024-65279.pbf new file mode 100644 index 00000000000..4ae147acfa3 Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/65024-65279.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/65280-65535.pbf b/metrics/integration/glyphs/NotoCJK/65280-65535.pbf new file mode 100644 index 00000000000..0ec8f841839 Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/65280-65535.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/6656-6911.pbf b/metrics/integration/glyphs/NotoCJK/6656-6911.pbf new file mode 100644 index 00000000000..738bc9fdc4a --- /dev/null +++ b/metrics/integration/glyphs/NotoCJK/6656-6911.pbf @@ -0,0 +1,3 @@ + +" +Noto Sans CJK JP Thin 6656-6911 \ No newline at end of file diff --git a/metrics/integration/glyphs/NotoCJK/6912-7167.pbf b/metrics/integration/glyphs/NotoCJK/6912-7167.pbf new file mode 100644 index 00000000000..3edcc555bbc --- /dev/null +++ b/metrics/integration/glyphs/NotoCJK/6912-7167.pbf @@ -0,0 +1,3 @@ + +" +Noto Sans CJK JP Thin 6912-7167 \ No newline at end of file diff --git a/metrics/integration/glyphs/NotoCJK/7168-7423.pbf b/metrics/integration/glyphs/NotoCJK/7168-7423.pbf new file mode 100644 index 00000000000..c2acfd66901 --- /dev/null +++ b/metrics/integration/glyphs/NotoCJK/7168-7423.pbf @@ -0,0 +1,3 @@ + +" +Noto Sans CJK JP Thin 7168-7423 \ No newline at end of file diff --git a/metrics/integration/glyphs/NotoCJK/7424-7679.pbf b/metrics/integration/glyphs/NotoCJK/7424-7679.pbf new file mode 100644 index 00000000000..4b8da0bf723 --- /dev/null +++ b/metrics/integration/glyphs/NotoCJK/7424-7679.pbf @@ -0,0 +1,3 @@ + +" +Noto Sans CJK JP Thin 7424-7679 \ No newline at end of file diff --git a/metrics/integration/glyphs/NotoCJK/768-1023.pbf b/metrics/integration/glyphs/NotoCJK/768-1023.pbf new file mode 100644 index 00000000000..2804b86d48f Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/768-1023.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/7680-7935.pbf b/metrics/integration/glyphs/NotoCJK/7680-7935.pbf new file mode 100644 index 00000000000..336417b75e1 Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/7680-7935.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/7936-8191.pbf b/metrics/integration/glyphs/NotoCJK/7936-8191.pbf new file mode 100644 index 00000000000..e24434f9877 --- /dev/null +++ b/metrics/integration/glyphs/NotoCJK/7936-8191.pbf @@ -0,0 +1,3 @@ + +" +Noto Sans CJK JP Thin 7936-8191 \ No newline at end of file diff --git a/metrics/integration/glyphs/NotoCJK/8192-8447.pbf b/metrics/integration/glyphs/NotoCJK/8192-8447.pbf new file mode 100644 index 00000000000..739bf8ae7dd Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/8192-8447.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/8448-8703.pbf b/metrics/integration/glyphs/NotoCJK/8448-8703.pbf new file mode 100644 index 00000000000..c66c4d6b9f4 Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/8448-8703.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/8704-8959.pbf b/metrics/integration/glyphs/NotoCJK/8704-8959.pbf new file mode 100644 index 00000000000..bae8a4e655c Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/8704-8959.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/8960-9215.pbf b/metrics/integration/glyphs/NotoCJK/8960-9215.pbf new file mode 100644 index 00000000000..9836dca78a2 Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/8960-9215.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/9216-9471.pbf b/metrics/integration/glyphs/NotoCJK/9216-9471.pbf new file mode 100644 index 00000000000..db34a314082 Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/9216-9471.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/9472-9727.pbf b/metrics/integration/glyphs/NotoCJK/9472-9727.pbf new file mode 100644 index 00000000000..9e1017fc0f1 Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/9472-9727.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/9728-9983.pbf b/metrics/integration/glyphs/NotoCJK/9728-9983.pbf new file mode 100644 index 00000000000..ca2876c8d5f Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/9728-9983.pbf differ diff --git a/metrics/integration/glyphs/NotoCJK/9984-10239.pbf b/metrics/integration/glyphs/NotoCJK/9984-10239.pbf new file mode 100644 index 00000000000..6ee87db2819 Binary files /dev/null and b/metrics/integration/glyphs/NotoCJK/9984-10239.pbf differ diff --git a/metrics/integration/glyphs/Open Sans Semibold,Arial Unicode MS Bold/0-255.pbf b/metrics/integration/glyphs/Open Sans Semibold,Arial Unicode MS Bold/0-255.pbf new file mode 100644 index 00000000000..cea1c094d6a Binary files /dev/null and b/metrics/integration/glyphs/Open Sans Semibold,Arial Unicode MS Bold/0-255.pbf differ diff --git a/metrics/integration/glyphs/Open Sans Semibold,Arial Unicode MS Bold/12288-12543.pbf b/metrics/integration/glyphs/Open Sans Semibold,Arial Unicode MS Bold/12288-12543.pbf new file mode 100644 index 00000000000..0a8788bfd8a Binary files /dev/null and b/metrics/integration/glyphs/Open Sans Semibold,Arial Unicode MS Bold/12288-12543.pbf differ diff --git a/metrics/integration/glyphs/Open Sans Semibold,Arial Unicode MS Bold/1536-1791.pbf b/metrics/integration/glyphs/Open Sans Semibold,Arial Unicode MS Bold/1536-1791.pbf new file mode 100644 index 00000000000..e1cf821dbc1 Binary files /dev/null and b/metrics/integration/glyphs/Open Sans Semibold,Arial Unicode MS Bold/1536-1791.pbf differ diff --git a/metrics/integration/glyphs/Open Sans Semibold,Arial Unicode MS Bold/256-511.pbf b/metrics/integration/glyphs/Open Sans Semibold,Arial Unicode MS Bold/256-511.pbf new file mode 100644 index 00000000000..0ddfb2db759 Binary files /dev/null and b/metrics/integration/glyphs/Open Sans Semibold,Arial Unicode MS Bold/256-511.pbf differ diff --git a/metrics/integration/glyphs/Open Sans Semibold,Arial Unicode MS Bold/5888-6143.pbf b/metrics/integration/glyphs/Open Sans Semibold,Arial Unicode MS Bold/5888-6143.pbf new file mode 100644 index 00000000000..8853216c64f --- /dev/null +++ b/metrics/integration/glyphs/Open Sans Semibold,Arial Unicode MS Bold/5888-6143.pbf @@ -0,0 +1,3 @@ + +; +.DIN Offc Pro Regular, Arial Unicode MS Regular 5888-6143 \ No newline at end of file diff --git a/metrics/integration/glyphs/Open Sans Semibold,Arial Unicode MS Bold/64256-64511.pbf b/metrics/integration/glyphs/Open Sans Semibold,Arial Unicode MS Bold/64256-64511.pbf new file mode 100644 index 00000000000..c84d1f0760a Binary files /dev/null and b/metrics/integration/glyphs/Open Sans Semibold,Arial Unicode MS Bold/64256-64511.pbf differ diff --git a/metrics/integration/glyphs/Open Sans Semibold,Arial Unicode MS Bold/65024-65279.pbf b/metrics/integration/glyphs/Open Sans Semibold,Arial Unicode MS Bold/65024-65279.pbf new file mode 100644 index 00000000000..64ba93ba61b Binary files /dev/null and b/metrics/integration/glyphs/Open Sans Semibold,Arial Unicode MS Bold/65024-65279.pbf differ diff --git a/metrics/integration/glyphs/Open Sans Semibold,Arial Unicode MS Bold/8192-8447.pbf b/metrics/integration/glyphs/Open Sans Semibold,Arial Unicode MS Bold/8192-8447.pbf new file mode 100644 index 00000000000..1890910b8fc Binary files /dev/null and b/metrics/integration/glyphs/Open Sans Semibold,Arial Unicode MS Bold/8192-8447.pbf differ diff --git a/metrics/integration/glyphs/mapbox/Open Sans Bold,Arial Unicode MS Bold/0-255.pbf b/metrics/integration/glyphs/mapbox/Open Sans Bold,Arial Unicode MS Bold/0-255.pbf new file mode 100644 index 00000000000..cea1c094d6a Binary files /dev/null and b/metrics/integration/glyphs/mapbox/Open Sans Bold,Arial Unicode MS Bold/0-255.pbf differ diff --git a/metrics/integration/glyphs/mapbox/Open Sans Semibold,Arial Unicode MS Bold/0-255.pbf b/metrics/integration/glyphs/mapbox/Open Sans Semibold,Arial Unicode MS Bold/0-255.pbf new file mode 100644 index 00000000000..cea1c094d6a Binary files /dev/null and b/metrics/integration/glyphs/mapbox/Open Sans Semibold,Arial Unicode MS Bold/0-255.pbf differ diff --git a/metrics/integration/image/0.png b/metrics/integration/image/0.png new file mode 100644 index 00000000000..15db2edd536 Binary files /dev/null and b/metrics/integration/image/0.png differ diff --git a/metrics/integration/image/1.png b/metrics/integration/image/1.png new file mode 100644 index 00000000000..d319b4de66a Binary files /dev/null and b/metrics/integration/image/1.png differ diff --git a/metrics/integration/image/line.sdf.png b/metrics/integration/image/line.sdf.png new file mode 100644 index 00000000000..c227122996d Binary files /dev/null and b/metrics/integration/image/line.sdf.png differ diff --git a/metrics/integration/image/marker.png b/metrics/integration/image/marker.png new file mode 100644 index 00000000000..75359862470 Binary files /dev/null and b/metrics/integration/image/marker.png differ diff --git a/metrics/integration/image/rocket.png b/metrics/integration/image/rocket.png new file mode 100644 index 00000000000..36b68b19655 Binary files /dev/null and b/metrics/integration/image/rocket.png differ diff --git a/metrics/integration/lib/expression.js b/metrics/integration/lib/expression.js new file mode 100644 index 00000000000..1d253078c0e --- /dev/null +++ b/metrics/integration/lib/expression.js @@ -0,0 +1,194 @@ +import path from 'path'; +import * as diff from 'diff'; +import fs from 'fs'; +import harness from './harness'; +import compactStringify from 'json-stringify-pretty-compact'; + +// we have to handle this edge case here because we have test fixtures for this +// edge case, and we don't want UPDATE=1 to mess with them +function stringify(v) { + let s = compactStringify(v); + // http://timelessrepo.com/json-isnt-a-javascript-subset + if (s.indexOf('\u2028') >= 0) { + s = s.replace(/\u2028/g, '\\u2028'); + } + if (s.indexOf('\u2029') >= 0) { + s = s.replace(/\u2029/g, '\\u2029'); + } + return s; +} + +const decimalSigFigs = 6; + +function stripPrecision(x) { + // Intended for test output serialization: + // strips down to 6 decimal sigfigs but stops at decimal point + if (typeof x === 'number') { + if (x === 0) { return x; } + + const multiplier = Math.pow(10, + Math.max(0, + decimalSigFigs - Math.ceil(Math.log10(Math.abs(x))))); + + // We strip precision twice in a row here to avoid cases where + // stripping an already stripped number will modify its value + // due to bad floating point precision luck + // eg `Math.floor(8.16598 * 100000) / 100000` -> 8.16597 + const firstStrip = Math.floor(x * multiplier) / multiplier; + return Math.floor(firstStrip * multiplier) / multiplier; + } else if (typeof x !== 'object') { + return x; + } else if (Array.isArray(x)) { + return x.map(stripPrecision); + } else { + const stripped = {}; + for (const key of Object.keys(x)) { + stripped[key] = stripPrecision(x[key]); + } + return stripped; + } +} + +function deepEqual(a, b) { + if (typeof a !== typeof b) + return false; + if (typeof a === 'number') { + return stripPrecision(a) === stripPrecision(b); + } + if (a === null || b === null || typeof a !== 'object') + return a === b; + + const ka = Object.keys(a); + const kb = Object.keys(b); + + if (ka.length !== kb.length) + return false; + + ka.sort(); + kb.sort(); + + for (let i = 0; i < ka.length; i++) + if (ka[i] !== kb[i] || !deepEqual(a[ka[i]], b[ka[i]])) + return false; + + return true; +} + +/** + * Run the expression suite. + * + * @param {string} implementation - identify the implementation under test; used to + * deal with implementation-specific test exclusions and fudge-factors + * @param {Object} options + * @param {Array} [options.tests] - array of test names to run; tests not in the array will be skipped + * @param {Array} [options.ignores] - array of test names to ignore. + * @param {} runExpressionTest - a function that runs a single expression test fixture + * @returns {undefined} terminates the process when testing is complete + */ +export function run(implementation, options, runExpressionTest) { + const directory = path.join(__dirname, '../expression-tests'); + options.fixtureFilename = 'test.json'; + harness(directory, implementation, options, (fixture, params, done) => { + try { + const result = runExpressionTest(fixture, params); + const dir = path.join(directory, params.id); + + if (process.env.UPDATE) { + fixture.expected = { + compiled: result.compiled, + outputs: stripPrecision(result.outputs), + serialized: result.serialized + }; + + delete fixture.metadata; + + fs.writeFile(path.join(dir, 'test.json'), `${stringify(fixture, null, 2)}\n`, done); + return; + } + + const expected = fixture.expected; + const compileOk = deepEqual(result.compiled, expected.compiled); + const evalOk = compileOk && deepEqual(result.outputs, expected.outputs); + + let recompileOk = true; + let roundTripOk = true; + let serializationOk = true; + if (expected.compiled.result !== 'error') { + serializationOk = compileOk && deepEqual(expected.serialized, result.serialized); + recompileOk = compileOk && deepEqual(result.recompiled, expected.compiled); + roundTripOk = recompileOk && deepEqual(result.roundTripOutputs, expected.outputs); + } + + params.ok = compileOk && evalOk && recompileOk && roundTripOk && serializationOk; + + const diffOutput = { + text: '', + html: '' + }; + + const diffJson = (label, expectedJson, actualJson) => { + let text = ''; + let html = ''; + diff.diffJson(expectedJson, actualJson) + .forEach((hunk) => { + if (hunk.added) { + text += `+ ${hunk.value}`; + html += ` ${hunk.value}`; + } else if (hunk.removed) { + text += `- ${hunk.value}`; + html += ` ${hunk.value}`; + } else { + text += ` ${hunk.value}`; + html += ` ${hunk.value}`; + } + }); + if (text) { + diffOutput.text += `${label}\n${text}`; + diffOutput.html += `

${label}

\n${html}`; + } + }; + + if (!compileOk) { + diffJson('Compiled', expected.compiled, result.compiled); + } + if (compileOk && !serializationOk) { + diffJson('Serialized', expected.serialized, result.serialized); + } + if (compileOk && !recompileOk) { + diffJson('Serialized and re-compiled', expected.compiled, result.recompiled); + } + + const diffOutputs = (testOutputs) => { + return expected.outputs.map((expectedOutput, i) => { + if (!deepEqual(expectedOutput, testOutputs[i])) { + return `f(${JSON.stringify(fixture.inputs[i])})\nExpected: ${JSON.stringify(expectedOutput)}\nActual: ${JSON.stringify(testOutputs[i])}`; + } + return false; + }) + .filter(Boolean) + .join('\n'); + }; + + if (compileOk && !evalOk) { + const differences = `Original\n${diffOutputs(result.outputs)}\n`; + diffOutput.text += differences; + diffOutput.html += differences; + } + if (recompileOk && !roundTripOk) { + const differences = `\nRoundtripped through serialize()\n${diffOutputs(result.roundTripOutputs)}\n`; + diffOutput.text += differences; + diffOutput.html += differences; + } + + params.difference = diffOutput.html; + if (diffOutput.text) { console.log(diffOutput.text); } + + params.expression = compactStringify(fixture.expression); + params.serialized = compactStringify(result.serialized); + + done(); + } catch (e) { + done(e); + } + }); +} diff --git a/metrics/integration/lib/generate-fixture-json.js b/metrics/integration/lib/generate-fixture-json.js new file mode 100644 index 00000000000..b4bf77377ff --- /dev/null +++ b/metrics/integration/lib/generate-fixture-json.js @@ -0,0 +1,120 @@ +/* eslint-disable import/no-commonjs */ +const path = require('path'); +const fs = require('fs'); +const glob = require('glob'); +const localizeURLs = require('./localize-urls'); + +const OUTPUT_FILE = 'fixtures.json'; + +exports.generateFixtureJson = generateFixtureJson; +exports.getAllFixtureGlobs = getAllFixtureGlobs; + +/** + * Analyzes the contents of the specified `path.join(rootDirectory, suiteDirectory)`, and inlines + * the contents into a single json file which can then be imported and built into a bundle + * to be shipped to the browser. + * + * @param {string} rootDirectory + * @param {string} suiteDirectory + * @param {boolean} includeImages + */ +function generateFixtureJson(rootDirectory, suiteDirectory, outputDirectory = 'test/integration/dist', includeImages = false) { + const globs = getAllFixtureGlobs(rootDirectory, suiteDirectory); + const jsonPaths = globs[0]; + const imagePaths = globs[1]; + //Extract the filedata into a flat dictionary + const allFiles = {}; + let allPaths = glob.sync(jsonPaths); + if (includeImages) { + allPaths = allPaths.concat(glob.sync(imagePaths)); + } + + //A Set that stores test names that are malformed so they can be removed later + const malformedTests = {}; + + for (const fixturePath of allPaths) { + const testName = path.dirname(fixturePath); + const fileName = path.basename(fixturePath); + const extension = path.extname(fixturePath); + try { + if (extension === '.json') { + let json = parseJsonFromFile(fixturePath); + + //Special case for style json which needs some preprocessing + if (fileName === 'style.json') { + json = processStyle(testName, json); + } + + allFiles[fixturePath] = json; + } else if (extension === '.png') { + allFiles[fixturePath] = pngToBase64Str(fixturePath); + } else { + throw new Error(`${extension} is incompatible , file path ${fixturePath}`); + } + } catch (e) { + console.log(`Error parsing file: ${fixturePath}`); + malformedTests[testName] = true; + } + } + + // Re-nest by directory path, each directory path defines a testcase. + const result = {}; + for (const fullPath in allFiles) { + const testName = path.dirname(fullPath).replace(rootDirectory, ''); + //Skip if test is malformed + if (malformedTests[testName]) { continue; } + + //Lazily initaialize an object to store each file wihin a particular testName + if (result[testName] == null) { + result[testName] = {}; + } + //Trim extension from filename + const fileName = path.basename(fullPath, path.extname(fullPath)); + result[testName][fileName] = allFiles[fullPath]; + } + + const outputStr = JSON.stringify(result, null, 4); + const outputPath = path.join(outputDirectory, OUTPUT_FILE); + + return new Promise((resolve, reject) => { + fs.writeFile(outputPath, outputStr, {encoding: 'utf8'}, (err) => { + if (err) { reject(err); } + + resolve(); + }); + }); +} + +function getAllFixtureGlobs(rootDirectory, suiteDirectory) { + const basePath = path.join(rootDirectory, suiteDirectory); + const jsonPaths = path.join(basePath, '/**/*.json'); + const imagePaths = path.join(basePath, '/**/*.png'); + + return [jsonPaths, imagePaths]; +} + +function parseJsonFromFile(filePath) { + return JSON.parse(fs.readFileSync(filePath, {encoding: 'utf8'})); +} + +function pngToBase64Str(filePath) { + return fs.readFileSync(filePath).toString('base64'); +} + +function processStyle(testName, style) { + const clone = JSON.parse(JSON.stringify(style)); + // 7357 is testem's default port + localizeURLs(clone, 7357); + + clone.metadata = clone.metadata || {}; + clone.metadata.test = Object.assign({ + testName, + width: 512, + height: 512, + pixelRatio: 1, + recycleMap: false, + allowed: 0.00015 + }, clone.metadata.test); + + return clone; +} diff --git a/metrics/integration/lib/harness.js b/metrics/integration/lib/harness.js new file mode 100644 index 00000000000..dff138568b0 --- /dev/null +++ b/metrics/integration/lib/harness.js @@ -0,0 +1,210 @@ +/* eslint-disable no-process-exit */ + +import path from 'path'; +import fs from 'fs'; +import glob from 'glob'; +import {shuffle} from 'shuffle-seed'; +import {queue} from 'd3'; +import colors from 'chalk'; +import template from 'lodash.template'; +import createServer from './server'; + +export default function (directory, implementation, options, run) { + const q = queue(1); + const server = createServer(); + + const tests = options.tests || []; + const ignores = options.ignores || {}; + + let sequence = glob.sync(`**/${options.fixtureFilename || 'style.json'}`, {cwd: directory}) + .map(fixture => { + const id = path.dirname(fixture); + const style = require(path.join(directory, fixture)); + + server.localizeURLs(style); + + style.metadata = style.metadata || {}; + style.metadata.test = Object.assign({ + id, + ignored: ignores[`${path.basename(directory)}/${id}`], + width: 512, + height: 512, + pixelRatio: 1, + recycleMap: options.recycleMap || false, + allowed: 0.00015 + }, style.metadata.test); + + return style; + }) + .filter(style => { + const test = style.metadata.test; + + if (tests.length !== 0 && !tests.some(t => test.id.indexOf(t) !== -1)) { + return false; + } + + if (implementation === 'native' && process.env.BUILDTYPE !== 'Debug' && test.id.match(/^debug\//)) { + console.log(colors.gray(`* skipped ${test.id}`)); + return false; + } + + if (/^skip/.test(test.ignored)) { + console.log(colors.gray(`* skipped ${test.id} (${test.ignored})`)); + return false; + } + + return true; + }); + + if (options.shuffle) { + console.log(colors.white(`* shuffle seed: `) + colors.bold(`${options.seed}`)); + sequence = shuffle(sequence, options.seed); + } + + q.defer(server.listen); + + sequence.forEach(style => { + q.defer((callback) => { + const test = style.metadata.test; + + try { + run(style, test, handleResult); + } catch (error) { + handleResult(error); + } + + function handleResult (error) { + if (error) { + test.error = error; + } + + if (test.ignored && !test.ok) { + test.color = '#9E9E9E'; + test.status = 'ignored failed'; + console.log(colors.white(`* ignore ${test.id} (${test.ignored})`)); + } else if (test.ignored) { + test.color = '#E8A408'; + test.status = 'ignored passed'; + console.log(colors.yellow(`* ignore ${test.id} (${test.ignored})`)); + } else if (test.error) { + test.color = 'red'; + test.status = 'errored'; + console.log(colors.red(`* errored ${test.id}`)); + } else if (!test.ok) { + test.color = 'red'; + test.status = 'failed'; + console.log(colors.red(`* failed ${test.id}`)); + } else { + test.color = 'green'; + test.status = 'passed'; + console.log(colors.green(`* passed ${test.id}`)); + } + + callback(null, test); + } + }); + }); + + q.defer(server.close); + + q.awaitAll((err, results) => { + if (err) { + console.error(err); + setTimeout(() => { process.exit(-1); }, 0); + return; + } + + const tests = results.slice(1, -1); + + if (process.env.UPDATE) { + console.log(`Updated ${tests.length} tests.`); + process.exit(0); + } + + let passedCount = 0, + ignoreCount = 0, + ignorePassCount = 0, + failedCount = 0, + erroredCount = 0; + + tests.forEach((test) => { + if (test.ignored && !test.ok) { + ignoreCount++; + } else if (test.ignored) { + ignorePassCount++; + } else if (test.error) { + erroredCount++; + } else if (!test.ok) { + failedCount++; + } else { + passedCount++; + } + }); + + const totalCount = passedCount + ignorePassCount + ignoreCount + failedCount + erroredCount; + + if (passedCount > 0) { + console.log(colors.green('%d passed (%s%)'), + passedCount, (100 * passedCount / totalCount).toFixed(1)); + } + + if (ignorePassCount > 0) { + console.log(colors.yellow('%d passed but were ignored (%s%)'), + ignorePassCount, (100 * ignorePassCount / totalCount).toFixed(1)); + } + + if (ignoreCount > 0) { + console.log(colors.white('%d ignored (%s%)'), + ignoreCount, (100 * ignoreCount / totalCount).toFixed(1)); + } + + if (failedCount > 0) { + console.log(colors.red('%d failed (%s%)'), + failedCount, (100 * failedCount / totalCount).toFixed(1)); + } + + if (erroredCount > 0) { + console.log(colors.red('%d errored (%s%)'), + erroredCount, (100 * erroredCount / totalCount).toFixed(1)); + } + + const resultsTemplate = template(fs.readFileSync(path.join(__dirname, '..', 'results.html.tmpl'), 'utf8')); + const itemTemplate = template(fs.readFileSync(path.join(directory, 'result_item.html.tmpl'), 'utf8')); + + const stats = {}; + for (const test of tests) { + stats[test.status] = (stats[test.status] || 0) + 1; + } + + const unsuccessful = tests.filter(test => + test.status === 'failed' || test.status === 'errored'); + + const resultsShell = resultsTemplate({unsuccessful, tests, stats, shuffle: options.shuffle, seed: options.seed}) + .split(''); + + const p = path.join(directory, options.recycleMap ? 'index-recycle-map.html' : 'index.html'); + const out = fs.createWriteStream(p); + + const q = queue(1); + q.defer(write, out, resultsShell[0]); + for (const test of tests) { + q.defer(write, out, itemTemplate({r: test, hasFailedTests: unsuccessful.length > 0})); + } + q.defer(write, out, resultsShell[1]); + q.await(() => { + out.end(); + out.on('close', () => { + console.log(`Results at: ${p}`); + process.exit((failedCount + erroredCount) === 0 ? 0 : 1); + }); + }); + }); +} + +function write(stream, data, cb) { + if (!stream.write(data)) { + stream.once('drain', cb); + } else { + process.nextTick(cb); + } +} diff --git a/metrics/integration/lib/json-diff.js b/metrics/integration/lib/json-diff.js new file mode 100644 index 00000000000..730a5b89989 --- /dev/null +++ b/metrics/integration/lib/json-diff.js @@ -0,0 +1,37 @@ +import diff from 'diff'; + +export function generateDiffLog(expected, actual) { + return diff.diffJson(expected, actual).map((hunk) => { + if (hunk.added) { + return `+ ${hunk.value}`; + } else if (hunk.removed) { + return `- ${hunk.value}`; + } else { + return ` ${hunk.value}`; + } + }).join(''); +} + +export function deepEqual(a, b) { + if (typeof a !== typeof b) + return false; + if (typeof a === 'number') + return Math.abs(a - b) < 1e-10; + if (a === null || typeof a !== 'object') + return a === b; + + const ka = Object.keys(a); + const kb = Object.keys(b); + + if (ka.length !== kb.length) + return false; + + ka.sort(); + kb.sort(); + + for (let i = 0; i < ka.length; i++) + if (ka[i] !== kb[i] || !deepEqual(a[ka[i]], b[ka[i]])) + return false; + + return true; +} diff --git a/metrics/integration/lib/localize-urls.js b/metrics/integration/lib/localize-urls.js new file mode 100644 index 00000000000..040572cf1f9 --- /dev/null +++ b/metrics/integration/lib/localize-urls.js @@ -0,0 +1,102 @@ +/* eslint-disable import/no-commonjs */ +const path = require('path'); +const fs = require('fs'); +const colors = require('chalk'); + +module.exports = function localizeURLs(style, port) { + localizeStyleURLs(style, port); + if (style.metadata && style.metadata.test && style.metadata.test.operations) { + style.metadata.test.operations.forEach((op) => { + if (op[0] === 'addSource') { + localizeSourceURLs(op[2], port); + } else if (op[0] === 'setStyle') { + if (typeof op[1] === 'object') { + localizeStyleURLs(op[1], port); + return; + } + + let styleJSON; + try { + const relativePath = op[1].replace(/^local:\/\//, ''); + if (relativePath.startsWith('mapbox-gl-styles')) { + styleJSON = fs.readFileSync(path.join(path.dirname(require.resolve('mapbox-gl-styles')), '..', relativePath)); + } else { + styleJSON = fs.readFileSync(path.join(__dirname, '..', relativePath)); + } + } catch (error) { + console.log(colors.blue(`* ${error}`)); + return; + } + + try { + styleJSON = JSON.parse(styleJSON); + } catch (error) { + console.log(colors.blue(`* Error while parsing ${op[1]}: ${error}`)); + return; + } + + localizeStyleURLs(styleJSON, port); + + op[1] = styleJSON; + op[2] = {diff: false}; + } + }); + } +}; + +function localizeURL(url, port) { + return url.replace(/^local:\/\//, `http://localhost:${port}/`); +} + +function localizeMapboxSpriteURL(url, port) { + return url.replace(/^mapbox:\/\//, `http://localhost:${port}/`); +} + +function localizeMapboxFontsURL(url, port) { + return url.replace(/^mapbox:\/\/fonts/, `http://localhost:${port}/glyphs`); +} + +function localizeMapboxTilesURL(url, port) { + return url.replace(/^mapbox:\/\//, `http://localhost:${port}/tiles/`); +} + +function localizeMapboxTilesetURL(url, port) { + return url.replace(/^mapbox:\/\//, `http://localhost:${port}/tilesets/`); +} + +function localizeSourceURLs(source, port) { + for (const tile in source.tiles) { + source.tiles[tile] = localizeMapboxTilesURL(source.tiles[tile], port); + source.tiles[tile] = localizeURL(source.tiles[tile], port); + } + + if (source.urls) { + source.urls = source.urls.map((url) => localizeMapboxTilesetURL(url, port)); + source.urls = source.urls.map((url) => localizeURL(url, port)); + } + + if (source.url) { + source.url = localizeMapboxTilesetURL(source.url, port); + source.url = localizeURL(source.url, port); + } + + if (source.data && typeof source.data == 'string') { + source.data = localizeURL(source.data, port); + } +} + +function localizeStyleURLs (style, port) { + for (const source in style.sources) { + localizeSourceURLs(style.sources[source], port); + } + + if (style.sprite) { + style.sprite = localizeMapboxSpriteURL(style.sprite, port); + style.sprite = localizeURL(style.sprite, port); + } + + if (style.glyphs) { + style.glyphs = localizeMapboxFontsURL(style.glyphs, port); + style.glyphs = localizeURL(style.glyphs, port); + } +} diff --git a/metrics/integration/lib/operation-handlers.js b/metrics/integration/lib/operation-handlers.js new file mode 100644 index 00000000000..d653c892943 --- /dev/null +++ b/metrics/integration/lib/operation-handlers.js @@ -0,0 +1,56 @@ +function handleOperation(map, operations, opIndex, doneCb) { + const operation = operations[opIndex]; + const opName = operation[0]; + //Delegate to special handler if one is available + if (opName in operationHandlers) { + operationHandlers[opName](map, operation.slice(1), () => { + doneCb(opIndex); + }); + } else { + map[opName](...operation.slice(1)); + doneCb(opIndex); + } +} + +export const operationHandlers = { + wait(map, params, doneCb) { + const wait = function() { + if (map.loaded()) { + doneCb(); + } else { + map.once('render', wait); + } + }; + wait(); + }, + idle(map, params, doneCb) { + const idle = function() { + if (!map.isMoving()) { + doneCb(); + } else { + map.once('render', idle); + } + }; + idle(); + } +}; + +export function applyOperations(map, operations, doneCb) { + // No operations specified, end immediately adn invoke doneCb. + if (!operations || operations.length === 0) { + doneCb(); + return; + } + + // Start recursive chain + const scheduleNextOperation = (lastOpIndex) => { + if (lastOpIndex === operations.length - 1) { + // Stop recusive chain when at the end of the operations + doneCb(); + return; + } + + handleOperation(map, operations, ++lastOpIndex, scheduleNextOperation); + }; + scheduleNextOperation(-1); +} diff --git a/metrics/integration/lib/query-browser.js b/metrics/integration/lib/query-browser.js new file mode 100644 index 00000000000..4eb275a70af --- /dev/null +++ b/metrics/integration/lib/query-browser.js @@ -0,0 +1,86 @@ +/* eslint-env browser */ +/* global tape:readonly, mapboxgl:readonly */ +/* eslint-disable import/no-unresolved */ +// fixtures.json is automatically generated before this file gets built +// refer testem.js#before_tests() +import fixtures from '../dist/fixtures.json'; +import ignores from '../../ignores.json'; +import {applyOperations} from './operation-handlers'; +import {deepEqual, generateDiffLog} from './json-diff'; + +for (const testName in fixtures) { + if (testName in ignores) { + tape.skip(testName, testFunc); + } else { + tape(testName, {timeout: 20000}, testFunc); + } +} + +function testFunc(t) { + // This needs to be read from the `t` object because this function runs async in a closure. + const currentTestName = t.name; + const style = fixtures[currentTestName].style; + const expected = fixtures[currentTestName].expected; + const options = style.metadata.test; + const skipLayerDelete = style.metadata.skipLayerDelete; + + window.devicePixelRatio = options.pixelRatio; + + //1. Create and position the container, floating at the bottom right + const container = document.createElement('div'); + container.style.position = 'fixed'; + container.style.bottom = '10px'; + container.style.right = '10px'; + container.style.width = `${options.width}px`; + container.style.height = `${options.height}px`; + document.body.appendChild(container); + + //2. Initialize the Map + const map = new mapboxgl.Map({ + container, + style, + classes: options.classes, + interactive: false, + attributionControl: false, + preserveDrawingBuffer: true, + axonometric: options.axonometric || false, + skew: options.skew || [0, 0], + fadeDuration: options.fadeDuration || 0, + localIdeographFontFamily: options.localIdeographFontFamily || false, + crossSourceCollisions: typeof options.crossSourceCollisions === "undefined" ? true : options.crossSourceCollisions + }); + map.repaint = true; + map.once('load', () => { + //3. Run the operations on the map + applyOperations(map, options.operations, () => { + + //4. Perform query operation and compare results from expected values + const results = options.queryGeometry ? + map.queryRenderedFeatures(options.queryGeometry, options.queryOptions || {}) : + []; + + const actual = results.map((feature) => { + const featureJson = JSON.parse(JSON.stringify(feature.toJSON())); + if (!skipLayerDelete) delete featureJson.layer; + return featureJson; + }); + + const testMetaData = { + name: t.name, + actual: map.getCanvas().toDataURL() + }; + const success = deepEqual(actual, expected); + if (success) { + t.pass(JSON.stringify(testMetaData)); + } else { + testMetaData['difference'] = generateDiffLog(expected, actual); + t.fail(JSON.stringify(testMetaData)); + } + //Cleanup WebGL context + map.remove(); + delete map.painter.context.gl; + document.body.removeChild(container); + t.end(); + }); + }); +} diff --git a/metrics/integration/lib/query.js b/metrics/integration/lib/query.js new file mode 100644 index 00000000000..5485d39d078 --- /dev/null +++ b/metrics/integration/lib/query.js @@ -0,0 +1,153 @@ +import path from 'path'; +import fs from 'fs'; +import * as diff from 'diff'; +import {PNG} from 'pngjs'; +import harness from './harness'; + +function deepEqual(a, b) { + if (typeof a !== typeof b) + return false; + if (typeof a === 'number') + return Math.abs(a - b) < 1e-10; + if (a === null || typeof a !== 'object') + return a === b; + + const ka = Object.keys(a); + const kb = Object.keys(b); + + if (ka.length !== kb.length) + return false; + + ka.sort(); + kb.sort(); + + for (let i = 0; i < ka.length; i++) + if (ka[i] !== kb[i] || !deepEqual(a[ka[i]], b[ka[i]])) + return false; + + return true; +} + +/** + * Run the query suite. + * + * @param {string} implementation - identify the implementation under test; used to + * deal with implementation-specific test exclusions and fudge-factors + * @param {Object} options + * @param {Array} [options.tests] - array of test names to run; tests not in the + * array will be skipped + * @param {queryFn} query - a function that performs the query + * @returns {undefined} terminates the process when testing is complete + */ +export function run(implementation, options, query) { + const directory = path.join(__dirname, '../query-tests'); + harness(directory, implementation, options, (style, params, done) => { + query(style, params, (err, data, results) => { + if (err) return done(err); + + const dir = path.join(directory, params.id); + + if (process.env.UPDATE) { + fs.writeFile(path.join(dir, 'expected.json'), JSON.stringify(results, null, 2), done); + return; + } + + const expected = require(path.join(dir, 'expected.json')); + + params.ok = deepEqual(results, expected); + + if (!params.ok) { + const msg = diff.diffJson(expected, results) + .map((hunk) => { + if (hunk.added) { + return `+ ${hunk.value}`; + } else if (hunk.removed) { + return `- ${hunk.value}`; + } else { + return ` ${hunk.value}`; + } + }) + .join(''); + + params.difference = msg; + console.log(msg); + } + + const width = params.width * params.pixelRatio; + const height = params.height * params.pixelRatio; + + const color = [255, 0, 0, 255]; + + function scaleByPixelRatio(x) { + return x * params.pixelRatio; + } + + if (!Array.isArray(params.queryGeometry[0])) { + const p = params.queryGeometry.map(scaleByPixelRatio); + const d = 30; + drawAxisAlignedLine([p[0] - d, p[1]], [p[0] + d, p[1]], data, width, height, color); + drawAxisAlignedLine([p[0], p[1] - d], [p[0], p[1] + d], data, width, height, color); + } else { + const a = params.queryGeometry[0].map(scaleByPixelRatio); + const b = params.queryGeometry[1].map(scaleByPixelRatio); + drawAxisAlignedLine([a[0], a[1]], [a[0], b[1]], data, width, height, color); + drawAxisAlignedLine([a[0], b[1]], [b[0], b[1]], data, width, height, color); + drawAxisAlignedLine([b[0], b[1]], [b[0], a[1]], data, width, height, color); + drawAxisAlignedLine([b[0], a[1]], [a[0], a[1]], data, width, height, color); + } + + const actualJSON = path.join(dir, 'actual.json'); + fs.writeFile(actualJSON, JSON.stringify(results, null, 2), () => {}); + + const actualPNG = path.join(dir, 'actual.png'); + + const png = new PNG({ + width: params.width * params.pixelRatio, + height: params.height * params.pixelRatio + }); + + png.data = data; + + png.pack() + .pipe(fs.createWriteStream(actualPNG)) + .on('finish', () => { + params.actual = fs.readFileSync(actualPNG).toString('base64'); + done(); + }); + }); + }); +} + +function drawAxisAlignedLine(a, b, pixels, width, height, color) { + const fromX = clamp(Math.min(a[0], b[0]), 0, width); + const toX = clamp(Math.max(a[0], b[0]), 0, width); + const fromY = clamp(Math.min(a[1], b[1]), 0, height); + const toY = clamp(Math.max(a[1], b[1]), 0, height); + + let index; + if (fromX === toX) { + for (let y = fromY; y <= toY; y++) { + index = getIndex(fromX, y); + pixels[index + 0] = color[0]; + pixels[index + 1] = color[1]; + pixels[index + 2] = color[2]; + pixels[index + 3] = color[3]; + } + } else { + for (let x = fromX; x <= toX; x++) { + index = getIndex(x, fromY); + pixels[index + 0] = color[0]; + pixels[index + 1] = color[1]; + pixels[index + 2] = color[2]; + pixels[index + 3] = color[3]; + } + } + + function getIndex(x, y) { + return (y * width + x) * 4; + } +} + +function clamp(x, a, b) { + return Math.max(a, Math.min(b, x)); +} diff --git a/metrics/integration/lib/render.js b/metrics/integration/lib/render.js new file mode 100644 index 00000000000..e2846a47c0b --- /dev/null +++ b/metrics/integration/lib/render.js @@ -0,0 +1,183 @@ +import path from 'path'; +import fs from 'fs'; +import {PNG} from 'pngjs'; +import harness from './harness'; +import pixelmatch from 'pixelmatch'; +import * as glob from 'glob'; + +/** + * Run the render test suite, compute differences to expected values (making exceptions based on + * implementation vagaries), print results to standard output, write test artifacts to the + * filesystem (optionally updating expected results), and exit the process with a success or + * failure code. + * + * Caller must supply a `render` function that does the actual rendering and passes the raw image + * result on to the `render` function's callback. + * + * A local server is launched that is capable of serving requests for the source, sprite, + * font, and tile assets needed by the tests, and the URLs within the test styles are + * rewritten to point to that server. + * + * As the tests run, results are printed to standard output, and test artifacts are written + * to the filesystem. If the environment variable `UPDATE` is set, the expected artifacts are + * updated in place based on the test rendering. + * + * If all the tests are successful, this function exits the process with exit code 0. Otherwise + * it exits with 1. If an unexpected error occurs, it exits with -1. + * + * @param {string} implementation - identify the implementation under test; used to + * deal with implementation-specific test exclusions and fudge-factors + * @param {Object} [ignores] - map of test names to disable. A key is the relative + * path to a test directory, e.g. `"render-tests/background-color/default"`. A value is a string + * that by convention links to an issue that explains why the test is currently disabled. By default, + * disabled tests will be run, but not fail the test run if the result does not match the expected + * result. If the value begins with "skip", the test will not be run at all -- use this for tests + * that would crash the test harness entirely if they were run. + * @param {renderFn} render - a function that performs the rendering + * @returns {undefined} terminates the process when testing is complete + */ +export function run(implementation, ignores, render) { + const options = {ignores, tests:[], shuffle:false, recycleMap:false, seed:makeHash()}; + + // https://stackoverflow.com/a/1349426/229714 + function makeHash() { + const array = []; + const possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; + + for (let i = 0; i < 10; ++i) + array.push(possible.charAt(Math.floor(Math.random() * possible.length))); + + // join array elements without commas. + return array.join(''); + } + + function checkParameter(param) { + const index = options.tests.indexOf(param); + if (index === -1) + return false; + options.tests.splice(index, 1); + return true; + } + + function checkValueParameter(defaultValue, param) { + const index = options.tests.findIndex((elem) => { return String(elem).startsWith(param); }); + if (index === -1) + return defaultValue; + + const split = String(options.tests.splice(index, 1)).split('='); + if (split.length !== 2) + return defaultValue; + + return split[1]; + } + + if (process.argv.length > 2) { + options.tests = process.argv.slice(2).filter((value, index, self) => { return self.indexOf(value) === index; }) || []; + options.shuffle = checkParameter('--shuffle'); + options.recycleMap = checkParameter('--recycle-map'); + options.seed = checkValueParameter(options.seed, '--seed'); + } + + const directory = path.join(__dirname, '../render-tests'); + harness(directory, implementation, options, (style, params, done) => { + render(style, params, (err, data) => { + if (err) return done(err); + + let stats; + const dir = path.join(directory, params.id); + try { + stats = fs.statSync(dir, fs.R_OK | fs.W_OK); + if (!stats.isDirectory()) throw new Error(); + } catch (e) { + fs.mkdirSync(dir); + } + + const expectedPath = path.join(dir, 'expected.png'); + const actualPath = path.join(dir, 'actual.png'); + const diffPath = path.join(dir, 'diff.png'); + + const width = Math.floor(params.width * params.pixelRatio); + const height = Math.floor(params.height * params.pixelRatio); + const actualImg = new PNG({width, height}); + + // PNG data must be unassociated (not premultiplied) + for (let i = 0; i < data.length; i++) { + const a = data[i * 4 + 3] / 255; + if (a !== 0) { + data[i * 4 + 0] /= a; + data[i * 4 + 1] /= a; + data[i * 4 + 2] /= a; + } + } + actualImg.data = data; + + // there may be multiple expected images, covering different platforms + const expectedPaths = glob.sync(path.join(dir, 'expected*.png')); + + if (!process.env.UPDATE && expectedPaths.length === 0) { + throw new Error('No expected*.png files found; did you mean to run tests with UPDATE=true?'); + } + + if (process.env.UPDATE) { + fs.writeFileSync(expectedPath, PNG.sync.write(actualImg)); + + } else { + // if we have multiple expected images, we'll compare against each one and pick the one with + // the least amount of difference; this is useful for covering features that render differently + // depending on platform, i.e. heatmaps use half-float textures for improved rendering where supported + let minDiff = Infinity; + let minDiffImg, minExpectedBuf; + + for (const path of expectedPaths) { + const expectedBuf = fs.readFileSync(path); + const expectedImg = PNG.sync.read(expectedBuf); + const diffImg = new PNG({width, height}); + + const diff = pixelmatch( + actualImg.data, expectedImg.data, diffImg.data, + width, height, {threshold: 0.1285}) / (width * height); + + if (diff < minDiff) { + minDiff = diff; + minDiffImg = diffImg; + minExpectedBuf = expectedBuf; + } + } + + const diffBuf = PNG.sync.write(minDiffImg, {filterType: 4}); + const actualBuf = PNG.sync.write(actualImg, {filterType: 4}); + + fs.writeFileSync(diffPath, diffBuf); + fs.writeFileSync(actualPath, actualBuf); + + params.difference = minDiff; + params.ok = minDiff <= params.allowed; + + params.actual = actualBuf.toString('base64'); + params.expected = minExpectedBuf.toString('base64'); + params.diff = diffBuf.toString('base64'); + } + + done(); + }); + }); +} + +/** + * @callback renderFn + * @param {Object} style - style to render + * @param {Object} options + * @param {number} options.width - render this wide + * @param {number} options.height - render this high + * @param {number} options.pixelRatio - render with this pixel ratio + * @param {boolean} options.shuffle - shuffle tests sequence + * @param {String} options.seed - Shuffle seed + * @param {boolean} options.recycleMap - trigger map object recycling + * @param {renderCallback} callback - callback to call with the results of rendering + */ + +/** + * @callback renderCallback + * @param {?Error} error + * @param {Buffer} [result] - raw RGBA image data + */ diff --git a/metrics/integration/lib/server.js b/metrics/integration/lib/server.js new file mode 100644 index 00000000000..b20eea261fc --- /dev/null +++ b/metrics/integration/lib/server.js @@ -0,0 +1,50 @@ +/* eslint-disable import/no-commonjs */ +const path = require('path'); +const fs = require('fs'); +const st = require('st'); +const {createServer} = require('http'); +const localizeURLs = require('./localize-urls'); + +module.exports = function () { + const port = 2900; + const integrationMount = st({path: path.join(__dirname, '..')}); + const mapboxGLStylesMount = st({path: path.dirname(require.resolve('mapbox-gl-styles')), url: 'mapbox-gl-styles'}); + const mapboxMVTFixturesMount = st({path: path.dirname(require.resolve('@mapbox/mvt-fixtures')), url: 'mvt-fixtures'}); + const server = createServer((req, res) => { + if (req.method === 'POST' && req.url === '/write-file') { + let body = ''; + req.on('data', (data) => { + body += data; + }); + req.on('end', () => { + + //Write data to disk + const {filePath, data} = JSON.parse(body); + fs.writeFile(path.join(process.cwd(), filePath), data, 'base64', () => { + res.writeHead(200, {'Content-Type': 'text/html'}); + res.end('ok'); + }); + }); + } + + return mapboxMVTFixturesMount(req, res, () => { + return mapboxGLStylesMount(req, res, () => { + return integrationMount(req, res); + }); + }); + }); + + return { + listen(callback) { + server.listen(port, callback); + }, + + close(callback) { + server.close(callback); + }, + + localizeURLs(style) { + return localizeURLs(style, port); + } + }; +}; diff --git a/metrics/integration/query-tests/circle-pitch-scale/map-inside-align-map/expected.json b/metrics/integration/query-tests/circle-pitch-scale/map-inside-align-map/expected.json new file mode 100644 index 00000000000..7ea210cebb9 --- /dev/null +++ b/metrics/integration/query-tests/circle-pitch-scale/map-inside-align-map/expected.json @@ -0,0 +1,15 @@ +[ + { + "geometry": { + "type": "Point", + "coordinates": [ + -84.3310546875, + 33.92512970007199 + ] + }, + "type": "Feature", + "properties": {}, + "source": "geojson", + "state": {} + } +] \ No newline at end of file diff --git a/metrics/integration/query-tests/circle-pitch-scale/map-inside-align-map/style.json b/metrics/integration/query-tests/circle-pitch-scale/map-inside-align-map/style.json new file mode 100644 index 00000000000..91e488103ff --- /dev/null +++ b/metrics/integration/query-tests/circle-pitch-scale/map-inside-align-map/style.json @@ -0,0 +1,45 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256, + "queryGeometry": [ + 292, + 35 + ] + } + }, + "center": [ + -92.3780691249957, + -20 + ], + "zoom": 2, + "pitch": 60, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [{ + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [-84.333565, 33.925575] + } + }] + } + } + }, + "layers": [ + { + "id": "road", + "type": "circle", + "source": "geojson", + "paint": { + "circle-pitch-alignment": "map", + "circle-pitch-scale": "map", + "circle-radius": 20 + } + } + ] +} diff --git a/metrics/integration/query-tests/circle-pitch-scale/map-inside-align-viewport/expected.json b/metrics/integration/query-tests/circle-pitch-scale/map-inside-align-viewport/expected.json new file mode 100644 index 00000000000..7ea210cebb9 --- /dev/null +++ b/metrics/integration/query-tests/circle-pitch-scale/map-inside-align-viewport/expected.json @@ -0,0 +1,15 @@ +[ + { + "geometry": { + "type": "Point", + "coordinates": [ + -84.3310546875, + 33.92512970007199 + ] + }, + "type": "Feature", + "properties": {}, + "source": "geojson", + "state": {} + } +] \ No newline at end of file diff --git a/metrics/integration/query-tests/circle-pitch-scale/map-inside-align-viewport/style.json b/metrics/integration/query-tests/circle-pitch-scale/map-inside-align-viewport/style.json new file mode 100644 index 00000000000..d76b20e3646 --- /dev/null +++ b/metrics/integration/query-tests/circle-pitch-scale/map-inside-align-viewport/style.json @@ -0,0 +1,45 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256, + "queryGeometry": [ + 292, + 35 + ] + } + }, + "center": [ + -92.3780691249957, + -20 + ], + "zoom": 2, + "pitch": 60, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [{ + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [-84.333565, 33.925575] + } + }] + } + } + }, + "layers": [ + { + "id": "road", + "type": "circle", + "source": "geojson", + "paint": { + "circle-pitch-alignment": "viewport", + "circle-pitch-scale": "map", + "circle-radius": 20 + } + } + ] +} diff --git a/metrics/integration/query-tests/circle-pitch-scale/map-outside-align-map/expected.json b/metrics/integration/query-tests/circle-pitch-scale/map-outside-align-map/expected.json new file mode 100644 index 00000000000..0637a088a01 --- /dev/null +++ b/metrics/integration/query-tests/circle-pitch-scale/map-outside-align-map/expected.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/metrics/integration/query-tests/circle-pitch-scale/map-outside-align-map/style.json b/metrics/integration/query-tests/circle-pitch-scale/map-outside-align-map/style.json new file mode 100644 index 00000000000..9908102df6b --- /dev/null +++ b/metrics/integration/query-tests/circle-pitch-scale/map-outside-align-map/style.json @@ -0,0 +1,45 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256, + "queryGeometry": [ + 295, + 35 + ] + } + }, + "center": [ + -92.3780691249957, + -20 + ], + "zoom": 2, + "pitch": 60, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [{ + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [-84.333565, 33.925575] + } + }] + } + } + }, + "layers": [ + { + "id": "road", + "type": "circle", + "source": "geojson", + "paint": { + "circle-pitch-alignment": "map", + "circle-pitch-scale": "map", + "circle-radius": 20 + } + } + ] +} diff --git a/metrics/integration/query-tests/circle-pitch-scale/map-outside-align-viewport/expected.json b/metrics/integration/query-tests/circle-pitch-scale/map-outside-align-viewport/expected.json new file mode 100644 index 00000000000..0637a088a01 --- /dev/null +++ b/metrics/integration/query-tests/circle-pitch-scale/map-outside-align-viewport/expected.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/metrics/integration/query-tests/circle-pitch-scale/map-outside-align-viewport/style.json b/metrics/integration/query-tests/circle-pitch-scale/map-outside-align-viewport/style.json new file mode 100644 index 00000000000..8596caf102c --- /dev/null +++ b/metrics/integration/query-tests/circle-pitch-scale/map-outside-align-viewport/style.json @@ -0,0 +1,45 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256, + "queryGeometry": [ + 295, + 35 + ] + } + }, + "center": [ + -92.3780691249957, + -20 + ], + "zoom": 2, + "pitch": 60, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [{ + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [-84.333565, 33.925575] + } + }] + } + } + }, + "layers": [ + { + "id": "road", + "type": "circle", + "source": "geojson", + "paint": { + "circle-pitch-alignment": "viewport", + "circle-pitch-scale": "map", + "circle-radius": 20 + } + } + ] +} diff --git a/metrics/integration/query-tests/circle-pitch-scale/viewport-inside-align-map/expected.json b/metrics/integration/query-tests/circle-pitch-scale/viewport-inside-align-map/expected.json new file mode 100644 index 00000000000..7ea210cebb9 --- /dev/null +++ b/metrics/integration/query-tests/circle-pitch-scale/viewport-inside-align-map/expected.json @@ -0,0 +1,15 @@ +[ + { + "geometry": { + "type": "Point", + "coordinates": [ + -84.3310546875, + 33.92512970007199 + ] + }, + "type": "Feature", + "properties": {}, + "source": "geojson", + "state": {} + } +] \ No newline at end of file diff --git a/metrics/integration/query-tests/circle-pitch-scale/viewport-inside-align-map/style.json b/metrics/integration/query-tests/circle-pitch-scale/viewport-inside-align-map/style.json new file mode 100644 index 00000000000..96a880be0ba --- /dev/null +++ b/metrics/integration/query-tests/circle-pitch-scale/viewport-inside-align-map/style.json @@ -0,0 +1,45 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256, + "queryGeometry": [ + 300, + 35 + ] + } + }, + "center": [ + -92.3780691249957, + -20 + ], + "zoom": 2, + "pitch": 60, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [{ + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [-84.333565, 33.925575] + } + }] + } + } + }, + "layers": [ + { + "id": "road", + "type": "circle", + "source": "geojson", + "paint": { + "circle-pitch-alignment": "map", + "circle-pitch-scale": "viewport", + "circle-radius": 20 + } + } + ] +} diff --git a/metrics/integration/query-tests/circle-pitch-scale/viewport-inside-align-viewport/expected.json b/metrics/integration/query-tests/circle-pitch-scale/viewport-inside-align-viewport/expected.json new file mode 100644 index 00000000000..7ea210cebb9 --- /dev/null +++ b/metrics/integration/query-tests/circle-pitch-scale/viewport-inside-align-viewport/expected.json @@ -0,0 +1,15 @@ +[ + { + "geometry": { + "type": "Point", + "coordinates": [ + -84.3310546875, + 33.92512970007199 + ] + }, + "type": "Feature", + "properties": {}, + "source": "geojson", + "state": {} + } +] \ No newline at end of file diff --git a/metrics/integration/query-tests/circle-pitch-scale/viewport-inside-align-viewport/style.json b/metrics/integration/query-tests/circle-pitch-scale/viewport-inside-align-viewport/style.json new file mode 100644 index 00000000000..947c0065c79 --- /dev/null +++ b/metrics/integration/query-tests/circle-pitch-scale/viewport-inside-align-viewport/style.json @@ -0,0 +1,45 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256, + "queryGeometry": [ + 300, + 35 + ] + } + }, + "center": [ + -92.3780691249957, + -20 + ], + "zoom": 2, + "pitch": 60, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [{ + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [-84.333565, 33.925575] + } + }] + } + } + }, + "layers": [ + { + "id": "road", + "type": "circle", + "source": "geojson", + "paint": { + "circle-pitch-alignment": "viewport", + "circle-pitch-scale": "viewport", + "circle-radius": 20 + } + } + ] +} diff --git a/metrics/integration/query-tests/circle-pitch-scale/viewport-outside-align-map/expected.json b/metrics/integration/query-tests/circle-pitch-scale/viewport-outside-align-map/expected.json new file mode 100644 index 00000000000..0637a088a01 --- /dev/null +++ b/metrics/integration/query-tests/circle-pitch-scale/viewport-outside-align-map/expected.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/metrics/integration/query-tests/circle-pitch-scale/viewport-outside-align-map/style.json b/metrics/integration/query-tests/circle-pitch-scale/viewport-outside-align-map/style.json new file mode 100644 index 00000000000..8d3897db2c3 --- /dev/null +++ b/metrics/integration/query-tests/circle-pitch-scale/viewport-outside-align-map/style.json @@ -0,0 +1,45 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256, + "queryGeometry": [ + 303, + 35 + ] + } + }, + "center": [ + -92.3780691249957, + -20 + ], + "zoom": 2, + "pitch": 60, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [{ + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [-84.333565, 33.925575] + } + }] + } + } + }, + "layers": [ + { + "id": "road", + "type": "circle", + "source": "geojson", + "paint": { + "circle-pitch-alignment": "map", + "circle-pitch-scale": "viewport", + "circle-radius": 20 + } + } + ] +} diff --git a/metrics/integration/query-tests/circle-pitch-scale/viewport-outside-align-viewport/expected.json b/metrics/integration/query-tests/circle-pitch-scale/viewport-outside-align-viewport/expected.json new file mode 100644 index 00000000000..0637a088a01 --- /dev/null +++ b/metrics/integration/query-tests/circle-pitch-scale/viewport-outside-align-viewport/expected.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/metrics/integration/query-tests/circle-pitch-scale/viewport-outside-align-viewport/style.json b/metrics/integration/query-tests/circle-pitch-scale/viewport-outside-align-viewport/style.json new file mode 100644 index 00000000000..8d3897db2c3 --- /dev/null +++ b/metrics/integration/query-tests/circle-pitch-scale/viewport-outside-align-viewport/style.json @@ -0,0 +1,45 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256, + "queryGeometry": [ + 303, + 35 + ] + } + }, + "center": [ + -92.3780691249957, + -20 + ], + "zoom": 2, + "pitch": 60, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [{ + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [-84.333565, 33.925575] + } + }] + } + } + }, + "layers": [ + { + "id": "road", + "type": "circle", + "source": "geojson", + "paint": { + "circle-pitch-alignment": "map", + "circle-pitch-scale": "viewport", + "circle-radius": 20 + } + } + ] +} diff --git a/metrics/integration/query-tests/circle-radius-features-in/inside/expected.json b/metrics/integration/query-tests/circle-radius-features-in/inside/expected.json new file mode 100644 index 00000000000..9539d0b183a --- /dev/null +++ b/metrics/integration/query-tests/circle-radius-features-in/inside/expected.json @@ -0,0 +1,90 @@ +[ + { + "geometry": { + "type": "LineString", + "coordinates": [ + [ + 13.406662344932556, + 52.49845542419487 + ], + [ + 13.406715989112854, + 52.49853706825692 + ], + [ + 13.407037854194641, + 52.499007335102704 + ], + [ + 13.40782642364502, + 52.50002296369735 + ], + [ + 13.409215807914734, + 52.50175045812034 + ] + ] + }, + "type": "Feature", + "properties": { + "class": "main", + "oneway": 0, + "osm_id": 4612696, + "type": "secondary" + }, + "id": 4612696, + "source": "mapbox", + "sourceLayer": "road", + "state": {} + }, + { + "geometry": { + "type": "LineString", + "coordinates": [ + [ + 13.404956459999084, + 52.50075446300568 + ], + [ + 13.405857682228088, + 52.500525870779285 + ], + [ + 13.40782642364502, + 52.50002296369735 + ], + [ + 13.41029942035675, + 52.49939268890719 + ], + [ + 13.410347700119019, + 52.49937962612168 + ], + [ + 13.410476446151733, + 52.49934370344147 + ], + [ + 13.410674929618835, + 52.499291452217875 + ], + [ + 13.4122896194458, + 52.498840782836766 + ] + ] + }, + "type": "Feature", + "properties": { + "class": "street", + "oneway": 0, + "osm_id": 4612752, + "type": "residential" + }, + "id": 4612752, + "source": "mapbox", + "sourceLayer": "road", + "state": {} + } +] \ No newline at end of file diff --git a/metrics/integration/query-tests/circle-radius-features-in/inside/style.json b/metrics/integration/query-tests/circle-radius-features-in/inside/style.json new file mode 100644 index 00000000000..97282ea18a5 --- /dev/null +++ b/metrics/integration/query-tests/circle-radius-features-in/inside/style.json @@ -0,0 +1,44 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256, + "queryGeometry": [ + [ + 1, + 100 + ], + [ + 10, + 120 + ] + ] + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "layers": [ + { + "id": "road", + "type": "circle", + "source": "mapbox", + "source-layer": "road", + "paint": { + "circle-radius": 10 + }, + "interactive": true + } + ] +} \ No newline at end of file diff --git a/metrics/integration/query-tests/circle-radius-features-in/outside/expected.json b/metrics/integration/query-tests/circle-radius-features-in/outside/expected.json new file mode 100644 index 00000000000..0637a088a01 --- /dev/null +++ b/metrics/integration/query-tests/circle-radius-features-in/outside/expected.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/metrics/integration/query-tests/circle-radius-features-in/outside/style.json b/metrics/integration/query-tests/circle-radius-features-in/outside/style.json new file mode 100644 index 00000000000..d66b712f769 --- /dev/null +++ b/metrics/integration/query-tests/circle-radius-features-in/outside/style.json @@ -0,0 +1,44 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256, + "queryGeometry": [ + [ + 1, + 101 + ], + [ + 9, + 120 + ] + ] + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "layers": [ + { + "id": "road", + "type": "circle", + "source": "mapbox", + "source-layer": "road", + "paint": { + "circle-radius": 10 + }, + "interactive": true + } + ] +} \ No newline at end of file diff --git a/metrics/integration/query-tests/circle-radius/feature-state/expected.json b/metrics/integration/query-tests/circle-radius/feature-state/expected.json new file mode 100644 index 00000000000..b35900c5e72 --- /dev/null +++ b/metrics/integration/query-tests/circle-radius/feature-state/expected.json @@ -0,0 +1,13 @@ +[ + { + "type": "Feature", + "id": 1, + "geometry": { + "type": "Point", + "coordinates": [0, 0] + }, + "properties": {}, + "source": "mapbox", + "state": { "big": true } + } +] \ No newline at end of file diff --git a/metrics/integration/query-tests/circle-radius/feature-state/style.json b/metrics/integration/query-tests/circle-radius/feature-state/style.json new file mode 100644 index 00000000000..45881d1bf2b --- /dev/null +++ b/metrics/integration/query-tests/circle-radius/feature-state/style.json @@ -0,0 +1,72 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "wait" + ], + [ + "setFeatureState", + { "source": "mapbox", "id": 1}, + { "big": true } + ], + [ + "wait" + ] + ], + "queryGeometry": [ + 32, + 16 + ] + } + }, + "sources": { + "mapbox": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "id": 1, + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + }, + { + "id": 2, + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ + 5, + 15 + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "mapbox", + "paint": { + "circle-radius": ["case", + ["boolean", ["feature-state", "big"], false], + ["number", 20], + ["number", 3] + ] + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/query-tests/circle-radius/inside/expected.json b/metrics/integration/query-tests/circle-radius/inside/expected.json new file mode 100644 index 00000000000..9539d0b183a --- /dev/null +++ b/metrics/integration/query-tests/circle-radius/inside/expected.json @@ -0,0 +1,90 @@ +[ + { + "geometry": { + "type": "LineString", + "coordinates": [ + [ + 13.406662344932556, + 52.49845542419487 + ], + [ + 13.406715989112854, + 52.49853706825692 + ], + [ + 13.407037854194641, + 52.499007335102704 + ], + [ + 13.40782642364502, + 52.50002296369735 + ], + [ + 13.409215807914734, + 52.50175045812034 + ] + ] + }, + "type": "Feature", + "properties": { + "class": "main", + "oneway": 0, + "osm_id": 4612696, + "type": "secondary" + }, + "id": 4612696, + "source": "mapbox", + "sourceLayer": "road", + "state": {} + }, + { + "geometry": { + "type": "LineString", + "coordinates": [ + [ + 13.404956459999084, + 52.50075446300568 + ], + [ + 13.405857682228088, + 52.500525870779285 + ], + [ + 13.40782642364502, + 52.50002296369735 + ], + [ + 13.41029942035675, + 52.49939268890719 + ], + [ + 13.410347700119019, + 52.49937962612168 + ], + [ + 13.410476446151733, + 52.49934370344147 + ], + [ + 13.410674929618835, + 52.499291452217875 + ], + [ + 13.4122896194458, + 52.498840782836766 + ] + ] + }, + "type": "Feature", + "properties": { + "class": "street", + "oneway": 0, + "osm_id": 4612752, + "type": "residential" + }, + "id": 4612752, + "source": "mapbox", + "sourceLayer": "road", + "state": {} + } +] \ No newline at end of file diff --git a/metrics/integration/query-tests/circle-radius/inside/style.json b/metrics/integration/query-tests/circle-radius/inside/style.json new file mode 100644 index 00000000000..2c73321b56e --- /dev/null +++ b/metrics/integration/query-tests/circle-radius/inside/style.json @@ -0,0 +1,38 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256, + "queryGeometry": [ + 10, + 100 + ] + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "layers": [ + { + "id": "road", + "type": "circle", + "source": "mapbox", + "source-layer": "road", + "paint": { + "circle-radius": 10 + }, + "interactive": true + } + ] +} \ No newline at end of file diff --git a/metrics/integration/query-tests/circle-radius/multiple-layers/expected.json b/metrics/integration/query-tests/circle-radius/multiple-layers/expected.json new file mode 100644 index 00000000000..7ea5f07d1c0 --- /dev/null +++ b/metrics/integration/query-tests/circle-radius/multiple-layers/expected.json @@ -0,0 +1,16 @@ +[ + { + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + }, + "type": "Feature", + "properties": {}, + "id": 1, + "source": "mapbox", + "state": {} + } +] diff --git a/metrics/integration/query-tests/circle-radius/multiple-layers/style.json b/metrics/integration/query-tests/circle-radius/multiple-layers/style.json new file mode 100644 index 00000000000..5d6bfa18cb5 --- /dev/null +++ b/metrics/integration/query-tests/circle-radius/multiple-layers/style.json @@ -0,0 +1,51 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 100, + "height": 100, + "queryGeometry": [ + 30, + 30 + ] + } + }, + "sources": { + "mapbox": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "id": 1, + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ 0, 0] + } + } + ] + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "mapbox", + "paint": { + "circle-color": "red" + } + }, + { + "id": "circle2", + "type": "circle", + "source": "mapbox", + "paint": { + "circle-color": "yellow", + "circle-radius": 50, + "circle-opacity": 0.5 + } + } + ] +} diff --git a/metrics/integration/query-tests/circle-radius/outside/expected.json b/metrics/integration/query-tests/circle-radius/outside/expected.json new file mode 100644 index 00000000000..0637a088a01 --- /dev/null +++ b/metrics/integration/query-tests/circle-radius/outside/expected.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/metrics/integration/query-tests/circle-radius/outside/style.json b/metrics/integration/query-tests/circle-radius/outside/style.json new file mode 100644 index 00000000000..e640eb83f31 --- /dev/null +++ b/metrics/integration/query-tests/circle-radius/outside/style.json @@ -0,0 +1,38 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256, + "queryGeometry": [ + 9, + 101 + ] + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "layers": [ + { + "id": "road", + "type": "circle", + "source": "mapbox", + "source-layer": "road", + "paint": { + "circle-radius": 10 + }, + "interactive": true + } + ] +} \ No newline at end of file diff --git a/metrics/integration/query-tests/circle-radius/property-function/expected.json b/metrics/integration/query-tests/circle-radius/property-function/expected.json new file mode 100644 index 00000000000..78cdaddf9e1 --- /dev/null +++ b/metrics/integration/query-tests/circle-radius/property-function/expected.json @@ -0,0 +1,17 @@ +[ + { + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + }, + "type": "Feature", + "properties": { + "radius": 20 + }, + "source": "mapbox", + "state": {} + } +] \ No newline at end of file diff --git a/metrics/integration/query-tests/circle-radius/property-function/style.json b/metrics/integration/query-tests/circle-radius/property-function/style.json new file mode 100644 index 00000000000..9012e0edb89 --- /dev/null +++ b/metrics/integration/query-tests/circle-radius/property-function/style.json @@ -0,0 +1,62 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "queryGeometry": [ + 32, + 16 + ] + } + }, + "sources": { + "mapbox": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "radius": 20 + }, + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + "radius": 5 + }, + "geometry": { + "type": "Point", + "coordinates": [ + 5, + 15 + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "mapbox", + "paint": { + "circle-radius": { + "type": "identity", + "property": "radius" + } + } + } + ] +} diff --git a/metrics/integration/query-tests/circle-radius/tile-boundary/expected.json b/metrics/integration/query-tests/circle-radius/tile-boundary/expected.json new file mode 100644 index 00000000000..7ea210cebb9 --- /dev/null +++ b/metrics/integration/query-tests/circle-radius/tile-boundary/expected.json @@ -0,0 +1,15 @@ +[ + { + "geometry": { + "type": "Point", + "coordinates": [ + -84.3310546875, + 33.92512970007199 + ] + }, + "type": "Feature", + "properties": {}, + "source": "geojson", + "state": {} + } +] \ No newline at end of file diff --git a/metrics/integration/query-tests/circle-radius/tile-boundary/style.json b/metrics/integration/query-tests/circle-radius/tile-boundary/style.json new file mode 100644 index 00000000000..d0d8bafb0b1 --- /dev/null +++ b/metrics/integration/query-tests/circle-radius/tile-boundary/style.json @@ -0,0 +1,43 @@ +{ + "version": 8, + "metadata": { + "test": { + "debug": true, + "height": 256, + "queryGeometry": [ + 240, + 125 + ] + } + }, + "center": [ + -92.3780691249957, + 35.94102132783915 + ], + "zoom": 2, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [{ + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [-84.333565, 33.925575] + } + }] + } + } + }, + "layers": [ + { + "id": "road", + "type": "circle", + "source": "geojson", + "paint": { + "circle-radius": 100 + } + } + ] +} diff --git a/metrics/integration/query-tests/circle-radius/zoom-and-property-function/expected.json b/metrics/integration/query-tests/circle-radius/zoom-and-property-function/expected.json new file mode 100644 index 00000000000..78cdaddf9e1 --- /dev/null +++ b/metrics/integration/query-tests/circle-radius/zoom-and-property-function/expected.json @@ -0,0 +1,17 @@ +[ + { + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + }, + "type": "Feature", + "properties": { + "radius": 20 + }, + "source": "mapbox", + "state": {} + } +] \ No newline at end of file diff --git a/metrics/integration/query-tests/circle-radius/zoom-and-property-function/style.json b/metrics/integration/query-tests/circle-radius/zoom-and-property-function/style.json new file mode 100644 index 00000000000..fb0ff1827b4 --- /dev/null +++ b/metrics/integration/query-tests/circle-radius/zoom-and-property-function/style.json @@ -0,0 +1,68 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "queryGeometry": [ + 32, + 16 + ] + } + }, + "sources": { + "mapbox": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "radius": 20 + }, + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + "radius": 5 + }, + "geometry": { + "type": "Point", + "coordinates": [ + 5, + 15 + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "mapbox", + "paint": { + "circle-radius": { + "type": "exponential", + "property": "radius", + "stops": [ + [{"zoom": 0, "value": 5}, 5], + [{"zoom": 0, "value": 20}, 20], + [{"zoom": 10, "value": 5}, 10], + [{"zoom": 10, "value": 20}, 40] + ] + } + } + } + ] +} 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 new file mode 100644 index 00000000000..b35900c5e72 --- /dev/null +++ b/metrics/integration/query-tests/circle-stroke-width/feature-state/expected.json @@ -0,0 +1,13 @@ +[ + { + "type": "Feature", + "id": 1, + "geometry": { + "type": "Point", + "coordinates": [0, 0] + }, + "properties": {}, + "source": "mapbox", + "state": { "big": true } + } +] \ No newline at end of file diff --git a/metrics/integration/query-tests/circle-stroke-width/feature-state/style.json b/metrics/integration/query-tests/circle-stroke-width/feature-state/style.json new file mode 100644 index 00000000000..a9bebb96ea4 --- /dev/null +++ b/metrics/integration/query-tests/circle-stroke-width/feature-state/style.json @@ -0,0 +1,73 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "wait" + ], + [ + "setFeatureState", + { "source": "mapbox", "id": 1}, + { "big": true } + ], + [ + "wait" + ] + ], + "queryGeometry": [ + 32, + 16 + ] + } + }, + "sources": { + "mapbox": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "id": 1, + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + }, + { + "id": 2, + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ + 5, + 15 + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "mapbox", + "paint": { + "circle-radius": 3, + "circle-stroke-width": ["case", + ["boolean", ["feature-state", "big"], false], + ["number", 20], + ["number", 3] + ] + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/query-tests/circle-stroke-width/inside/expected.json b/metrics/integration/query-tests/circle-stroke-width/inside/expected.json new file mode 100644 index 00000000000..5387f9c0317 --- /dev/null +++ b/metrics/integration/query-tests/circle-stroke-width/inside/expected.json @@ -0,0 +1,15 @@ +[ + { + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + }, + "type": "Feature", + "properties": {}, + "source": "geojson", + "state": {} + } +] \ No newline at end of file diff --git a/metrics/integration/query-tests/circle-stroke-width/inside/style.json b/metrics/integration/query-tests/circle-stroke-width/inside/style.json new file mode 100644 index 00000000000..fd43d8d5da4 --- /dev/null +++ b/metrics/integration/query-tests/circle-stroke-width/inside/style.json @@ -0,0 +1,38 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "queryGeometry": [ + 18, + 32 + ] + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson", + "paint": { + "circle-radius": 10, + "circle-color": "white", + "circle-stroke-width": 10, + "circle-stroke-color": "black" + } + } + ] +} diff --git a/metrics/integration/query-tests/circle-stroke-width/outside/expected.json b/metrics/integration/query-tests/circle-stroke-width/outside/expected.json new file mode 100644 index 00000000000..0637a088a01 --- /dev/null +++ b/metrics/integration/query-tests/circle-stroke-width/outside/expected.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/metrics/integration/query-tests/circle-stroke-width/outside/style.json b/metrics/integration/query-tests/circle-stroke-width/outside/style.json new file mode 100644 index 00000000000..997f6d3275c --- /dev/null +++ b/metrics/integration/query-tests/circle-stroke-width/outside/style.json @@ -0,0 +1,38 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "queryGeometry": [ + 10, + 32 + ] + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson", + "paint": { + "circle-radius": 10, + "circle-color": "white", + "circle-stroke-width": 10, + "circle-stroke-color": "black" + } + } + ] +} diff --git a/metrics/integration/query-tests/circle-translate-anchor/map/expected.json b/metrics/integration/query-tests/circle-translate-anchor/map/expected.json new file mode 100644 index 00000000000..5ae714dbf93 --- /dev/null +++ b/metrics/integration/query-tests/circle-translate-anchor/map/expected.json @@ -0,0 +1,70 @@ +[ + { + "geometry": { + "type": "LineString", + "coordinates": [ + [ + 13.409215807914734, + 52.50175045812034 + ], + [ + 13.40954840183258, + 52.50165249238836 + ], + [ + 13.411592245101929, + 52.501048365550304 + ], + [ + 13.413957953453064, + 52.500342996142365 + ], + [ + 13.41431200504303, + 52.500235230375125 + ], + [ + 13.4145587682724, + 52.500160120744795 + ] + ] + }, + "type": "Feature", + "properties": { + "class": "street", + "oneway": 0, + "osm_id": 4887461, + "type": "residential" + }, + "id": 4887461, + "source": "mapbox", + "sourceLayer": "road", + "state": {} + }, + { + "geometry": { + "type": "LineString", + "coordinates": [ + [ + 13.411592245101929, + 52.501048365550304 + ], + [ + 13.41029942035675, + 52.49939268890719 + ] + ] + }, + "type": "Feature", + "properties": { + "class": "street", + "oneway": 0, + "osm_id": 4612753, + "type": "residential" + }, + "id": 4612753, + "source": "mapbox", + "sourceLayer": "road", + "state": {} + } +] \ No newline at end of file diff --git a/metrics/integration/query-tests/circle-translate-anchor/map/style.json b/metrics/integration/query-tests/circle-translate-anchor/map/style.json new file mode 100644 index 00000000000..2a0dc187f86 --- /dev/null +++ b/metrics/integration/query-tests/circle-translate-anchor/map/style.json @@ -0,0 +1,44 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256, + "queryGeometry": [ + 126, + 187 + ] + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "bearing": 45, + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "layers": [ + { + "id": "road", + "type": "circle", + "source": "mapbox", + "source-layer": "road", + "paint": { + "circle-translate-anchor": "map", + "circle-translate": [ + 20, + 30 + ], + "circle-radius": 10 + }, + "interactive": true + } + ] +} \ No newline at end of file diff --git a/metrics/integration/query-tests/circle-translate-anchor/viewport/expected.json b/metrics/integration/query-tests/circle-translate-anchor/viewport/expected.json new file mode 100644 index 00000000000..5ae714dbf93 --- /dev/null +++ b/metrics/integration/query-tests/circle-translate-anchor/viewport/expected.json @@ -0,0 +1,70 @@ +[ + { + "geometry": { + "type": "LineString", + "coordinates": [ + [ + 13.409215807914734, + 52.50175045812034 + ], + [ + 13.40954840183258, + 52.50165249238836 + ], + [ + 13.411592245101929, + 52.501048365550304 + ], + [ + 13.413957953453064, + 52.500342996142365 + ], + [ + 13.41431200504303, + 52.500235230375125 + ], + [ + 13.4145587682724, + 52.500160120744795 + ] + ] + }, + "type": "Feature", + "properties": { + "class": "street", + "oneway": 0, + "osm_id": 4887461, + "type": "residential" + }, + "id": 4887461, + "source": "mapbox", + "sourceLayer": "road", + "state": {} + }, + { + "geometry": { + "type": "LineString", + "coordinates": [ + [ + 13.411592245101929, + 52.501048365550304 + ], + [ + 13.41029942035675, + 52.49939268890719 + ] + ] + }, + "type": "Feature", + "properties": { + "class": "street", + "oneway": 0, + "osm_id": 4612753, + "type": "residential" + }, + "id": 4612753, + "source": "mapbox", + "sourceLayer": "road", + "state": {} + } +] \ No newline at end of file diff --git a/metrics/integration/query-tests/circle-translate-anchor/viewport/style.json b/metrics/integration/query-tests/circle-translate-anchor/viewport/style.json new file mode 100644 index 00000000000..b7bdf9c06c5 --- /dev/null +++ b/metrics/integration/query-tests/circle-translate-anchor/viewport/style.json @@ -0,0 +1,44 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256, + "queryGeometry": [ + 116, + 207 + ] + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "bearing": 45, + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "layers": [ + { + "id": "road", + "type": "circle", + "source": "mapbox", + "source-layer": "road", + "paint": { + "circle-translate-anchor": "viewport", + "circle-translate": [ + 20, + 30 + ], + "circle-radius": 10 + }, + "interactive": true + } + ] +} \ No newline at end of file diff --git a/metrics/integration/query-tests/circle-translate/box/expected.json b/metrics/integration/query-tests/circle-translate/box/expected.json new file mode 100644 index 00000000000..9539d0b183a --- /dev/null +++ b/metrics/integration/query-tests/circle-translate/box/expected.json @@ -0,0 +1,90 @@ +[ + { + "geometry": { + "type": "LineString", + "coordinates": [ + [ + 13.406662344932556, + 52.49845542419487 + ], + [ + 13.406715989112854, + 52.49853706825692 + ], + [ + 13.407037854194641, + 52.499007335102704 + ], + [ + 13.40782642364502, + 52.50002296369735 + ], + [ + 13.409215807914734, + 52.50175045812034 + ] + ] + }, + "type": "Feature", + "properties": { + "class": "main", + "oneway": 0, + "osm_id": 4612696, + "type": "secondary" + }, + "id": 4612696, + "source": "mapbox", + "sourceLayer": "road", + "state": {} + }, + { + "geometry": { + "type": "LineString", + "coordinates": [ + [ + 13.404956459999084, + 52.50075446300568 + ], + [ + 13.405857682228088, + 52.500525870779285 + ], + [ + 13.40782642364502, + 52.50002296369735 + ], + [ + 13.41029942035675, + 52.49939268890719 + ], + [ + 13.410347700119019, + 52.49937962612168 + ], + [ + 13.410476446151733, + 52.49934370344147 + ], + [ + 13.410674929618835, + 52.499291452217875 + ], + [ + 13.4122896194458, + 52.498840782836766 + ] + ] + }, + "type": "Feature", + "properties": { + "class": "street", + "oneway": 0, + "osm_id": 4612752, + "type": "residential" + }, + "id": 4612752, + "source": "mapbox", + "sourceLayer": "road", + "state": {} + } +] \ No newline at end of file diff --git a/metrics/integration/query-tests/circle-translate/box/style.json b/metrics/integration/query-tests/circle-translate/box/style.json new file mode 100644 index 00000000000..ef76b5184db --- /dev/null +++ b/metrics/integration/query-tests/circle-translate/box/style.json @@ -0,0 +1,47 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256, + "queryGeometry": [ + [ + 30, + 130 + ], [ + 35, + 131 + ] + ] + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "layers": [ + { + "id": "road", + "type": "circle", + "source": "mapbox", + "source-layer": "road", + "paint": { + "circle-translate": [ + 20, + 30 + ], + "circle-radius": 10 + }, + "interactive": true + } + ] +} \ No newline at end of file diff --git a/metrics/integration/query-tests/circle-translate/inside/expected.json b/metrics/integration/query-tests/circle-translate/inside/expected.json new file mode 100644 index 00000000000..9539d0b183a --- /dev/null +++ b/metrics/integration/query-tests/circle-translate/inside/expected.json @@ -0,0 +1,90 @@ +[ + { + "geometry": { + "type": "LineString", + "coordinates": [ + [ + 13.406662344932556, + 52.49845542419487 + ], + [ + 13.406715989112854, + 52.49853706825692 + ], + [ + 13.407037854194641, + 52.499007335102704 + ], + [ + 13.40782642364502, + 52.50002296369735 + ], + [ + 13.409215807914734, + 52.50175045812034 + ] + ] + }, + "type": "Feature", + "properties": { + "class": "main", + "oneway": 0, + "osm_id": 4612696, + "type": "secondary" + }, + "id": 4612696, + "source": "mapbox", + "sourceLayer": "road", + "state": {} + }, + { + "geometry": { + "type": "LineString", + "coordinates": [ + [ + 13.404956459999084, + 52.50075446300568 + ], + [ + 13.405857682228088, + 52.500525870779285 + ], + [ + 13.40782642364502, + 52.50002296369735 + ], + [ + 13.41029942035675, + 52.49939268890719 + ], + [ + 13.410347700119019, + 52.49937962612168 + ], + [ + 13.410476446151733, + 52.49934370344147 + ], + [ + 13.410674929618835, + 52.499291452217875 + ], + [ + 13.4122896194458, + 52.498840782836766 + ] + ] + }, + "type": "Feature", + "properties": { + "class": "street", + "oneway": 0, + "osm_id": 4612752, + "type": "residential" + }, + "id": 4612752, + "source": "mapbox", + "sourceLayer": "road", + "state": {} + } +] \ No newline at end of file diff --git a/metrics/integration/query-tests/circle-translate/inside/style.json b/metrics/integration/query-tests/circle-translate/inside/style.json new file mode 100644 index 00000000000..185b589207c --- /dev/null +++ b/metrics/integration/query-tests/circle-translate/inside/style.json @@ -0,0 +1,42 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256, + "queryGeometry": [ + 30, + 130 + ] + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "layers": [ + { + "id": "road", + "type": "circle", + "source": "mapbox", + "source-layer": "road", + "paint": { + "circle-translate": [ + 20, + 30 + ], + "circle-radius": 10 + }, + "interactive": true + } + ] +} \ No newline at end of file diff --git a/metrics/integration/query-tests/circle-translate/outside/expected.json b/metrics/integration/query-tests/circle-translate/outside/expected.json new file mode 100644 index 00000000000..0637a088a01 --- /dev/null +++ b/metrics/integration/query-tests/circle-translate/outside/expected.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/metrics/integration/query-tests/circle-translate/outside/style.json b/metrics/integration/query-tests/circle-translate/outside/style.json new file mode 100644 index 00000000000..b5042984f6e --- /dev/null +++ b/metrics/integration/query-tests/circle-translate/outside/style.json @@ -0,0 +1,42 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256, + "queryGeometry": [ + 29, + 131 + ] + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "layers": [ + { + "id": "road", + "type": "circle", + "source": "mapbox", + "source-layer": "road", + "paint": { + "circle-translate": [ + 20, + 30 + ], + "circle-radius": 10 + }, + "interactive": true + } + ] +} \ No newline at end of file diff --git a/metrics/integration/query-tests/edge-cases/box-cutting-antimeridian-z0/expected.json b/metrics/integration/query-tests/edge-cases/box-cutting-antimeridian-z0/expected.json new file mode 100644 index 00000000000..efc26533257 --- /dev/null +++ b/metrics/integration/query-tests/edge-cases/box-cutting-antimeridian-z0/expected.json @@ -0,0 +1,32 @@ +[ + { + "geometry": { + "type": "Point", + "coordinates": [ + 90, + 0 + ] + }, + "type": "Feature", + "properties": { + "id": "B" + }, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -90, + 0 + ] + }, + "type": "Feature", + "properties": { + "id": "C" + }, + "source": "geojson", + "state": {} + } +] \ No newline at end of file diff --git a/metrics/integration/query-tests/edge-cases/box-cutting-antimeridian-z0/style.json b/metrics/integration/query-tests/edge-cases/box-cutting-antimeridian-z0/style.json new file mode 100644 index 00000000000..c418fede32a --- /dev/null +++ b/metrics/integration/query-tests/edge-cases/box-cutting-antimeridian-z0/style.json @@ -0,0 +1,84 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 512, + "height": 512, + "debug": true, + "queryGeometry": [ + [ + 112, + 200 + ], + [ + 400, + 281 + ] + ] + } + }, + "center": [ + 180, + 0 + ], + "zoom": 0, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "id": "A" + }, + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + "id": "B" + }, + "geometry": { + "type": "Point", + "coordinates": [ + 90, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + "id": "C" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -90, + 0 + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "circles", + "type": "circle", + "source": "geojson", + "paint": { + "circle-radius": 5 + } + } + ] +} diff --git a/metrics/integration/query-tests/edge-cases/box-cutting-antimeridian-z1/expected.json b/metrics/integration/query-tests/edge-cases/box-cutting-antimeridian-z1/expected.json new file mode 100644 index 00000000000..2ea43d9a36c --- /dev/null +++ b/metrics/integration/query-tests/edge-cases/box-cutting-antimeridian-z1/expected.json @@ -0,0 +1,32 @@ +[ + { + "geometry": { + "type": "Point", + "coordinates": [ + 109.9951171875, + 44.99588261816547 + ] + }, + "type": "Feature", + "properties": { + "id": "B" + }, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -109.9951171875, + 44.99588261816547 + ] + }, + "type": "Feature", + "properties": { + "id": "C" + }, + "source": "geojson", + "state": {} + } +] \ No newline at end of file diff --git a/metrics/integration/query-tests/edge-cases/box-cutting-antimeridian-z1/style.json b/metrics/integration/query-tests/edge-cases/box-cutting-antimeridian-z1/style.json new file mode 100644 index 00000000000..d06f54a8786 --- /dev/null +++ b/metrics/integration/query-tests/edge-cases/box-cutting-antimeridian-z1/style.json @@ -0,0 +1,97 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 512, + "height": 512, + "debug": true, + "queryGeometry": [ + [ + 50, + 200 + ], + [ + 462, + 281 + ] + ] + } + }, + "center": [ + 180, + 45 + ], + "zoom": 1, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "id": "A" + }, + "geometry": { + "type": "Point", + "coordinates": [ + 100, + 45 + ] + } + }, + { + "type": "Feature", + "properties": { + "id": "B" + }, + "geometry": { + "type": "Point", + "coordinates": [ + 110, + 45 + ] + } + }, + { + "type": "Feature", + "properties": { + "id": "C" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -110, + 45 + ] + } + }, + { + "type": "Feature", + "properties": { + "id": "D" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -100, + 45 + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "circles", + "type": "circle", + "source": "geojson", + "paint": { + "circle-radius": 5 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/query-tests/edge-cases/null-island/expected.json b/metrics/integration/query-tests/edge-cases/null-island/expected.json new file mode 100644 index 00000000000..5387f9c0317 --- /dev/null +++ b/metrics/integration/query-tests/edge-cases/null-island/expected.json @@ -0,0 +1,15 @@ +[ + { + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + }, + "type": "Feature", + "properties": {}, + "source": "geojson", + "state": {} + } +] \ No newline at end of file diff --git a/metrics/integration/query-tests/edge-cases/null-island/style.json b/metrics/integration/query-tests/edge-cases/null-island/style.json new file mode 100644 index 00000000000..2f3828a9c98 --- /dev/null +++ b/metrics/integration/query-tests/edge-cases/null-island/style.json @@ -0,0 +1,47 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 512, + "height": 512, + "debug": true, + "queryGeometry": [ + [ + 0, + 0 + ], + [ + 512, + 512 + ] + ] + } + }, + "center": [ + 0, + 0 + ], + "zoom": 1, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "layers": [ + { + "id": "circles", + "type": "circle", + "source": "geojson", + "paint": { + "circle-radius": 5 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/query-tests/edge-cases/unsorted-keys/expected.json b/metrics/integration/query-tests/edge-cases/unsorted-keys/expected.json new file mode 100644 index 00000000000..936dc899de7 --- /dev/null +++ b/metrics/integration/query-tests/edge-cases/unsorted-keys/expected.json @@ -0,0 +1,28 @@ +[ + { + "geometry": { + "type": "Point", + "coordinates": [ + -84.26383852958679, + 39.268954879518304 + ] + }, + "type": "Feature", + "properties": { + "ldir": "E", + "localrank": 1, + "name": "Loveland", + "name_de": "Loveland", + "name_en": "Loveland", + "name_es": "Loveland", + "name_fr": "Loveland", + "name_ru": "Лавленд", + "name_zh": "洛弗兰德", + "type": "town" + }, + "id": 1540753080, + "source": "mapbox", + "sourceLayer": "place_label", + "state": {} + } +] \ No newline at end of file diff --git a/metrics/integration/query-tests/edge-cases/unsorted-keys/style.json b/metrics/integration/query-tests/edge-cases/unsorted-keys/style.json new file mode 100644 index 00000000000..1008c72e0c9 --- /dev/null +++ b/metrics/integration/query-tests/edge-cases/unsorted-keys/style.json @@ -0,0 +1,50 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 8, + "height": 8, + "queryGeometry": [ + 4, + 4 + ] + } + }, + "center": [ + -84.2638406, + 39.2689562 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "sprite": "local://sprites/emerald", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "place-town", + "type": "symbol", + "source": "mapbox", + "source-layer": "place_label", + "layout": { + "icon-image": "interstate_3", + "text-field": "{name_en}", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-size": 20 + }, + "paint": { + "text-color": "hsl(0, 0%, 0%)" + }, + "interactive": true + } + ] +} diff --git a/metrics/integration/query-tests/evaluated/line-width/expected.json b/metrics/integration/query-tests/evaluated/line-width/expected.json new file mode 100644 index 00000000000..e53c8e492ae --- /dev/null +++ b/metrics/integration/query-tests/evaluated/line-width/expected.json @@ -0,0 +1,33 @@ +[ + { + "geometry": { + "type": "LineString", + "coordinates": [ + [ + 0, + 0 + ], + [ + 5.009765625, + 14.987239525774243 + ] + ] + }, + "type": "Feature", + "properties": {}, + "id": 1, + "layer": { + "id": "line", + "type": "line", + "source": "mapbox", + "paint": { + "line-width": 20 + }, + "layout": {} + }, + "source": "mapbox", + "state": { + "big": true + } + } +] diff --git a/metrics/integration/query-tests/evaluated/line-width/style.json b/metrics/integration/query-tests/evaluated/line-width/style.json new file mode 100644 index 00000000000..2e30e2dee4a --- /dev/null +++ b/metrics/integration/query-tests/evaluated/line-width/style.json @@ -0,0 +1,62 @@ +{ + "version": 8, + "metadata": { + "skipLayerDelete": true, + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "wait" + ], + [ + "setFeatureState", + { "source": "mapbox", "id": 1}, + { "big": true } + ], + [ + "wait" + ] + ], + "queryGeometry": [ + 32, + 16 + ] + } + }, + "sources": { + "mapbox": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "id": 1, + "type": "Feature", + "geometry": { + "type": "LineString", + "coordinates": [ + [ 0, 0], + [ 5, 15] + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "line", + "type": "line", + "source": "mapbox", + "paint": { + "line-width": ["case", + ["boolean", ["feature-state", "big"], false], + ["number", 20], + ["number", 1] + ] + } + } + ] +} diff --git a/metrics/integration/query-tests/feature-state/default/expected.json b/metrics/integration/query-tests/feature-state/default/expected.json new file mode 100644 index 00000000000..60e978ac5bc --- /dev/null +++ b/metrics/integration/query-tests/feature-state/default/expected.json @@ -0,0 +1,100 @@ +[ + { + "geometry": { + "type": "LineString", + "coordinates": [ + [ + 13.406662344932556, + 52.49845542419487 + ], + [ + 13.406715989112854, + 52.49853706825692 + ], + [ + 13.407037854194641, + 52.499007335102704 + ], + [ + 13.40782642364502, + 52.50002296369735 + ], + [ + 13.409215807914734, + 52.50175045812034 + ] + ] + }, + "type": "Feature", + "properties": { + "class": "main", + "oneway": 0, + "osm_id": 4612696, + "type": "secondary" + }, + "id": 4612696, + "source": "mapbox", + "sourceLayer": "road", + "state": { + "stateA": 1, + "stateB": "feature_id as number" + } + }, + { + "geometry": { + "type": "LineString", + "coordinates": [ + [ + 13.404956459999084, + 52.50075446300568 + ], + [ + 13.405857682228088, + 52.500525870779285 + ], + [ + 13.40782642364502, + 52.50002296369735 + ], + [ + 13.41029942035675, + 52.49939268890719 + ], + [ + 13.410347700119019, + 52.49937962612168 + ], + [ + 13.410476446151733, + 52.49934370344147 + ], + [ + 13.410674929618835, + 52.499291452217875 + ], + [ + 13.4122896194458, + 52.498840782836766 + ] + ] + }, + "type": "Feature", + "properties": { + "class": "street", + "oneway": 0, + "osm_id": 4612752, + "type": "residential" + }, + "id": 4612752, + "source": "mapbox", + "sourceLayer": "road", + "state": { + "stateB": { + "stateKey": [ + 4, + 2 + ] + } + } + } +] \ No newline at end of file diff --git a/metrics/integration/query-tests/feature-state/default/style.json b/metrics/integration/query-tests/feature-state/default/style.json new file mode 100644 index 00000000000..31af9fbfdac --- /dev/null +++ b/metrics/integration/query-tests/feature-state/default/style.json @@ -0,0 +1,71 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256, + "operations": [ + [ + "setFeatureState", + { + "source": "mapbox", + "sourceLayer": "road", + "id": "4612696" + }, + { + "stateA": 1 + } + ], [ + "setFeatureState", + { + "source": "mapbox", + "sourceLayer": "road", + "id": 4612696 + }, + { + "stateB": "feature_id as number" + } + ], [ + "setFeatureState", + { + "source": "mapbox", + "sourceLayer": "road", + "id": "4612752" + }, + { + "stateB": { "stateKey" : [ 4, 2] } + } + ] + ], + "queryGeometry": [ + 10, + 100 + ] + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "layers": [ + { + "id": "road", + "type": "circle", + "source": "mapbox", + "source-layer": "road", + "paint": { + "circle-radius": 10 + }, + "interactive": true + } + ] +} \ No newline at end of file diff --git a/metrics/integration/query-tests/fill-extrusion-translate/multiple-layers/expected.json b/metrics/integration/query-tests/fill-extrusion-translate/multiple-layers/expected.json new file mode 100644 index 00000000000..a9d7bf3b86a --- /dev/null +++ b/metrics/integration/query-tests/fill-extrusion-translate/multiple-layers/expected.json @@ -0,0 +1,36 @@ +[ + { + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + 0, + 0 + ], + [ + 0, + 10.012129557908153 + ], + [ + 10.01953125, + 10.012129557908153 + ], + [ + 10.01953125, + 0 + ], + [ + 0, + 0 + ] + ] + ] + }, + "type": "Feature", + "properties": {}, + "id": 1, + "source": "mapbox", + "state": {} + } +] diff --git a/metrics/integration/query-tests/fill-extrusion-translate/multiple-layers/style.json b/metrics/integration/query-tests/fill-extrusion-translate/multiple-layers/style.json new file mode 100644 index 00000000000..8bb07969133 --- /dev/null +++ b/metrics/integration/query-tests/fill-extrusion-translate/multiple-layers/style.json @@ -0,0 +1,61 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 50, + "height": 50, + "queryGeometry": [ + 20, 30 + ] + } + }, + "sources": { + "mapbox": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "id": 1, + "type": "Feature", + "geometry": { + "type": "Polygon", + "coordinates": [[ + [0, 0], + [0, 10], + [10, 10], + [10, 0], + [0, 0] + ]] + } + } + ] + } + } + }, + "layers": [ + { + "id": "fill-extrusion", + "type": "fill-extrusion", + "source": "mapbox", + "paint": { + "fill-extrusion-color": "orange", + "fill-extrusion-height": 20, + "fill-extrusion-base": 0, + "fill-extrusion-opacity": 0.5 + } + }, + { + "id": "fill-extrusion2", + "type": "fill-extrusion", + "source": "mapbox", + "paint": { + "fill-extrusion-color": "white", + "fill-extrusion-height": 20, + "fill-extrusion-base": 0, + "fill-extrusion-opacity": 0.5, + "fill-extrusion-translate": [-15, 15] + } + } + ] +} diff --git a/metrics/integration/query-tests/fill-extrusion/base-in/expected.json b/metrics/integration/query-tests/fill-extrusion/base-in/expected.json new file mode 100644 index 00000000000..30655dcba5b --- /dev/null +++ b/metrics/integration/query-tests/fill-extrusion/base-in/expected.json @@ -0,0 +1,35 @@ +[ + { + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -79.46205139160156, + 43.63532972467448 + ], + [ + -79.46205139160156, + 43.642535173141056 + ], + [ + -79.4556999206543, + 43.642535173141056 + ], + [ + -79.4556999206543, + 43.63532972467448 + ], + [ + -79.46205139160156, + 43.63532972467448 + ] + ] + ] + }, + "type": "Feature", + "properties": {}, + "source": "zones", + "state": {} + } +] \ No newline at end of file diff --git a/metrics/integration/query-tests/fill-extrusion/base-in/style.json b/metrics/integration/query-tests/fill-extrusion/base-in/style.json new file mode 100644 index 00000000000..f5ad7456511 --- /dev/null +++ b/metrics/integration/query-tests/fill-extrusion/base-in/style.json @@ -0,0 +1,75 @@ +{ + "version": 8, + "metadata": { + "test": { + "debug": true, + "width": 200, + "height": 400, + "queryGeometry": [ + 176, + 214 + ] + } + }, + "pitch": 60, + "center": [ + -79.46462631225589, + 43.64750394449096 + ], + "zoom": 13, + "sources": { + "zones": { + "type": "geojson", + "maxzoom": 13, + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -79.46205139160156, + 43.635329724674484 + ], + [ + -79.45569992065428, + 43.635329724674484 + ], + [ + -79.45569992065428, + 43.642535173141056 + ], + [ + -79.46205139160156, + 43.642535173141056 + ], + [ + -79.46205139160156, + 43.635329724674484 + ] + ] + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "zones", + "type": "fill-extrusion", + "source": "zones", + "paint": { + "fill-extrusion-color": "#ccc", + "fill-extrusion-height": 1000, + "fill-extrusion-base": 700 + } + } + ] +} diff --git a/metrics/integration/query-tests/fill-extrusion/base-out/expected.json b/metrics/integration/query-tests/fill-extrusion/base-out/expected.json new file mode 100644 index 00000000000..0637a088a01 --- /dev/null +++ b/metrics/integration/query-tests/fill-extrusion/base-out/expected.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/metrics/integration/query-tests/fill-extrusion/base-out/style.json b/metrics/integration/query-tests/fill-extrusion/base-out/style.json new file mode 100644 index 00000000000..a2a98f7cba3 --- /dev/null +++ b/metrics/integration/query-tests/fill-extrusion/base-out/style.json @@ -0,0 +1,75 @@ +{ + "version": 8, + "metadata": { + "test": { + "debug": true, + "width": 200, + "height": 400, + "queryGeometry": [ + 176, + 217 + ] + } + }, + "pitch": 60, + "center": [ + -79.46462631225589, + 43.64750394449096 + ], + "zoom": 13, + "sources": { + "zones": { + "type": "geojson", + "maxzoom": 13, + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -79.46205139160156, + 43.635329724674484 + ], + [ + -79.45569992065428, + 43.635329724674484 + ], + [ + -79.45569992065428, + 43.642535173141056 + ], + [ + -79.46205139160156, + 43.642535173141056 + ], + [ + -79.46205139160156, + 43.635329724674484 + ] + ] + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "zones", + "type": "fill-extrusion", + "source": "zones", + "paint": { + "fill-extrusion-color": "#ccc", + "fill-extrusion-height": 1000, + "fill-extrusion-base": 700 + } + } + ] +} diff --git a/metrics/integration/query-tests/fill-extrusion/box-in/expected.json b/metrics/integration/query-tests/fill-extrusion/box-in/expected.json new file mode 100644 index 00000000000..27e2e01d665 --- /dev/null +++ b/metrics/integration/query-tests/fill-extrusion/box-in/expected.json @@ -0,0 +1,72 @@ +[ + { + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -79.46205139160156, + 43.63532972467448 + ], + [ + -79.46205139160156, + 43.642535173141056 + ], + [ + -79.4556999206543, + 43.642535173141056 + ], + [ + -79.4556999206543, + 43.63532972467448 + ], + [ + -79.46205139160156, + 43.63532972467448 + ] + ] + ] + }, + "type": "Feature", + "properties": { + "position": "bottom" + }, + "source": "zones", + "state": {} + }, + { + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -79.46462631225586, + 43.64750394449095 + ], + [ + -79.46462631225586, + 43.65458373355483 + ], + [ + -79.45793151855469, + 43.65458373355483 + ], + [ + -79.45793151855469, + 43.64750394449095 + ], + [ + -79.46462631225586, + 43.64750394449095 + ] + ] + ] + }, + "type": "Feature", + "properties": { + "position": "middle" + }, + "source": "zones", + "state": {} + } +] \ No newline at end of file diff --git a/metrics/integration/query-tests/fill-extrusion/box-in/style.json b/metrics/integration/query-tests/fill-extrusion/box-in/style.json new file mode 100644 index 00000000000..34ce9acddf2 --- /dev/null +++ b/metrics/integration/query-tests/fill-extrusion/box-in/style.json @@ -0,0 +1,141 @@ +{ + "version": 8, + "metadata": { + "test": { + "debug": true, + "width": 200, + "height": 400, + "queryGeometry": [ + [100,195], + [136,240] + ] + } + }, + "pitch": 60, + "center": [ + -79.46462631225589, + 43.64750394449096 + ], + "zoom": 13, + "sources": { + "zones": { + "type": "geojson", + "maxzoom": 13, + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "position": "middle" + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -79.46462631225589, + 43.64750394449096 + ], + [ + -79.45793151855469, + 43.64750394449096 + ], + [ + -79.45793151855469, + 43.6545837335548 + ], + [ + -79.46462631225589, + 43.6545837335548 + ], + [ + -79.46462631225589, + 43.64750394449096 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "position": "bottom" + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -79.46205139160156, + 43.635329724674484 + ], + [ + -79.45569992065428, + 43.635329724674484 + ], + [ + -79.45569992065428, + 43.642535173141056 + ], + [ + -79.46205139160156, + 43.642535173141056 + ], + [ + -79.46205139160156, + 43.635329724674484 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "position": "top" + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -79.46788787841795, + 43.65557732137429 + ], + [ + -79.45700806884764, + 43.65557732137429 + ], + [ + -79.45700806884764, + 43.66290452383666 + ], + [ + -79.46788787841795, + 43.66290452383666 + ], + [ + -79.46788787841795, + 43.65557732137429 + ] + ] + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "zones", + "type": "fill-extrusion", + "source": "zones", + "paint": { + "fill-extrusion-color": "#ccc", + "fill-extrusion-height": 1000 + } + } + ] +} diff --git a/metrics/integration/query-tests/fill-extrusion/box-out/expected.json b/metrics/integration/query-tests/fill-extrusion/box-out/expected.json new file mode 100644 index 00000000000..0637a088a01 --- /dev/null +++ b/metrics/integration/query-tests/fill-extrusion/box-out/expected.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/metrics/integration/query-tests/fill-extrusion/box-out/style.json b/metrics/integration/query-tests/fill-extrusion/box-out/style.json new file mode 100644 index 00000000000..2bda8b401b6 --- /dev/null +++ b/metrics/integration/query-tests/fill-extrusion/box-out/style.json @@ -0,0 +1,141 @@ +{ + "version": 8, + "metadata": { + "test": { + "debug": true, + "width": 200, + "height": 400, + "queryGeometry": [ + [100,205], + [130,240] + ] + } + }, + "pitch": 60, + "center": [ + -79.46462631225589, + 43.64750394449096 + ], + "zoom": 13, + "sources": { + "zones": { + "type": "geojson", + "maxzoom": 13, + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "position": "middle" + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -79.46462631225589, + 43.64750394449096 + ], + [ + -79.45793151855469, + 43.64750394449096 + ], + [ + -79.45793151855469, + 43.6545837335548 + ], + [ + -79.46462631225589, + 43.6545837335548 + ], + [ + -79.46462631225589, + 43.64750394449096 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "position": "bottom" + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -79.46205139160156, + 43.635329724674484 + ], + [ + -79.45569992065428, + 43.635329724674484 + ], + [ + -79.45569992065428, + 43.642535173141056 + ], + [ + -79.46205139160156, + 43.642535173141056 + ], + [ + -79.46205139160156, + 43.635329724674484 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "position": "top" + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -79.46788787841795, + 43.65557732137429 + ], + [ + -79.45700806884764, + 43.65557732137429 + ], + [ + -79.45700806884764, + 43.66290452383666 + ], + [ + -79.46788787841795, + 43.66290452383666 + ], + [ + -79.46788787841795, + 43.65557732137429 + ] + ] + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "zones", + "type": "fill-extrusion", + "source": "zones", + "paint": { + "fill-extrusion-color": "#ccc", + "fill-extrusion-height": 1000 + } + } + ] +} diff --git a/metrics/integration/query-tests/fill-extrusion/side-in/expected.json b/metrics/integration/query-tests/fill-extrusion/side-in/expected.json new file mode 100644 index 00000000000..30655dcba5b --- /dev/null +++ b/metrics/integration/query-tests/fill-extrusion/side-in/expected.json @@ -0,0 +1,35 @@ +[ + { + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -79.46205139160156, + 43.63532972467448 + ], + [ + -79.46205139160156, + 43.642535173141056 + ], + [ + -79.4556999206543, + 43.642535173141056 + ], + [ + -79.4556999206543, + 43.63532972467448 + ], + [ + -79.46205139160156, + 43.63532972467448 + ] + ] + ] + }, + "type": "Feature", + "properties": {}, + "source": "zones", + "state": {} + } +] \ No newline at end of file diff --git a/metrics/integration/query-tests/fill-extrusion/side-in/style.json b/metrics/integration/query-tests/fill-extrusion/side-in/style.json new file mode 100644 index 00000000000..6c0508cdc53 --- /dev/null +++ b/metrics/integration/query-tests/fill-extrusion/side-in/style.json @@ -0,0 +1,74 @@ +{ + "version": 8, + "metadata": { + "test": { + "debug": true, + "width": 200, + "height": 400, + "queryGeometry": [ + 138, + 149 + ] + } + }, + "pitch": 60, + "center": [ + -79.46462631225589, + 43.64750394449096 + ], + "zoom": 13, + "sources": { + "zones": { + "type": "geojson", + "maxzoom": 13, + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -79.46205139160156, + 43.635329724674484 + ], + [ + -79.45569992065428, + 43.635329724674484 + ], + [ + -79.45569992065428, + 43.642535173141056 + ], + [ + -79.46205139160156, + 43.642535173141056 + ], + [ + -79.46205139160156, + 43.635329724674484 + ] + ] + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "zones", + "type": "fill-extrusion", + "source": "zones", + "paint": { + "fill-extrusion-color": "#ccc", + "fill-extrusion-height": 1000 + } + } + ] +} diff --git a/metrics/integration/query-tests/fill-extrusion/side-out/expected.json b/metrics/integration/query-tests/fill-extrusion/side-out/expected.json new file mode 100644 index 00000000000..0637a088a01 --- /dev/null +++ b/metrics/integration/query-tests/fill-extrusion/side-out/expected.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/metrics/integration/query-tests/fill-extrusion/side-out/style.json b/metrics/integration/query-tests/fill-extrusion/side-out/style.json new file mode 100644 index 00000000000..0e3eedc0af5 --- /dev/null +++ b/metrics/integration/query-tests/fill-extrusion/side-out/style.json @@ -0,0 +1,74 @@ +{ + "version": 8, + "metadata": { + "test": { + "debug": true, + "width": 200, + "height": 400, + "queryGeometry": [ + 136, + 149 + ] + } + }, + "pitch": 60, + "center": [ + -79.46462631225589, + 43.64750394449096 + ], + "zoom": 13, + "sources": { + "zones": { + "type": "geojson", + "maxzoom": 13, + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -79.46205139160156, + 43.635329724674484 + ], + [ + -79.45569992065428, + 43.635329724674484 + ], + [ + -79.45569992065428, + 43.642535173141056 + ], + [ + -79.46205139160156, + 43.642535173141056 + ], + [ + -79.46205139160156, + 43.635329724674484 + ] + ] + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "zones", + "type": "fill-extrusion", + "source": "zones", + "paint": { + "fill-extrusion-color": "#ccc", + "fill-extrusion-height": 1000 + } + } + ] +} diff --git a/metrics/integration/query-tests/fill-extrusion/sort-concave-inner/expected.json b/metrics/integration/query-tests/fill-extrusion/sort-concave-inner/expected.json new file mode 100644 index 00000000000..158c2a25462 --- /dev/null +++ b/metrics/integration/query-tests/fill-extrusion/sort-concave-inner/expected.json @@ -0,0 +1,86 @@ +[ + { + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -20.390625, + 25.16517336866393 + ], + [ + -20.390625, + 39.90973623453718 + ], + [ + 52.03125, + 39.90973623453718 + ], + [ + 52.03125, + 25.16517336866393 + ], + [ + -20.390625, + 25.16517336866393 + ] + ] + ] + }, + "type": "Feature", + "properties": {}, + "source": "zones", + "state": {} + }, + { + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + 89.296875, + 73.82482034613932 + ], + [ + 92.109375, + 49.38237278700956 + ], + [ + -52.03125, + 50.289339253291786 + ], + [ + -54.140625, + 11.867350911459312 + ], + [ + 16.171875, + 11.178401873711778 + ], + [ + 15.46875, + -17.308687886770016 + ], + [ + -73.125, + -15.284185114076436 + ], + [ + -71.015625, + 69.65708627301174 + ], + [ + 89.296875, + 73.82482034613932 + ] + ] + ] + }, + "type": "Feature", + "properties": { + "outside": true + }, + "source": "zones", + "state": {} + } +] \ No newline at end of file diff --git a/metrics/integration/query-tests/fill-extrusion/sort-concave-inner/style.json b/metrics/integration/query-tests/fill-extrusion/sort-concave-inner/style.json new file mode 100644 index 00000000000..bd18c5fab65 --- /dev/null +++ b/metrics/integration/query-tests/fill-extrusion/sort-concave-inner/style.json @@ -0,0 +1,125 @@ +{ + "version": 8, + "metadata": { + "test": { + "debug": true, + "width": 200, + "height": 400, + "queryGeometry": [ + 156, + 131 + ] + } + }, + "pitch": 60, + "center": [ + 0, + 0 + ], + "zoom": 0, + "sources": { + "zones": { + "type": "geojson", + "maxzoom": 1, + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "outside": true + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + 89.296875, + 73.82482034613932 + ], + [ + -71.015625, + 69.65708627301174 + ], + [ + -73.125, + -15.28418511407642 + ], + [ + 15.468749999999998, + -17.308687886770024 + ], + [ + 16.171875, + 11.178401873711785 + ], + [ + -54.140625, + 11.867350911459308 + ], + [ + -52.03125, + 50.28933925329178 + ], + [ + 92.10937499999999, + 49.38237278700955 + ], + [ + 89.296875, + 73.82482034613932 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Polygon", + "properties": { + "inside": true + }, + "coordinates": [ + [ + [ + -20.390625, + 25.16517336866393 + ], + [ + 52.03125, + 25.16517336866393 + ], + [ + 52.03125, + 39.90973623453719 + ], + [ + -20.390625, + 39.90973623453719 + ], + [ + -20.390625, + 25.16517336866393 + ] + ] + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "zones", + "type": "fill-extrusion", + "source": "zones", + "paint": { + "fill-extrusion-color": "#ccc", + "fill-extrusion-height": 10000000 + } + } + ] +} diff --git a/metrics/integration/query-tests/fill-extrusion/sort-concave-outer/expected.json b/metrics/integration/query-tests/fill-extrusion/sort-concave-outer/expected.json new file mode 100644 index 00000000000..d9195fc86c8 --- /dev/null +++ b/metrics/integration/query-tests/fill-extrusion/sort-concave-outer/expected.json @@ -0,0 +1,86 @@ +[ + { + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + 89.296875, + 73.82482034613932 + ], + [ + 92.109375, + 49.38237278700956 + ], + [ + -52.03125, + 50.289339253291786 + ], + [ + -54.140625, + 11.867350911459312 + ], + [ + 16.171875, + 11.178401873711778 + ], + [ + 15.46875, + -17.308687886770016 + ], + [ + -73.125, + -15.284185114076436 + ], + [ + -71.015625, + 69.65708627301174 + ], + [ + 89.296875, + 73.82482034613932 + ] + ] + ] + }, + "type": "Feature", + "properties": { + "outside": true + }, + "source": "zones", + "state": {} + }, + { + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -20.390625, + 25.16517336866393 + ], + [ + -20.390625, + 39.90973623453718 + ], + [ + 52.03125, + 39.90973623453718 + ], + [ + 52.03125, + 25.16517336866393 + ], + [ + -20.390625, + 25.16517336866393 + ] + ] + ] + }, + "type": "Feature", + "properties": {}, + "source": "zones", + "state": {} + } +] \ No newline at end of file diff --git a/metrics/integration/query-tests/fill-extrusion/sort-concave-outer/style.json b/metrics/integration/query-tests/fill-extrusion/sort-concave-outer/style.json new file mode 100644 index 00000000000..24f1e191857 --- /dev/null +++ b/metrics/integration/query-tests/fill-extrusion/sort-concave-outer/style.json @@ -0,0 +1,125 @@ +{ + "version": 8, + "metadata": { + "test": { + "debug": true, + "width": 200, + "height": 400, + "queryGeometry": [ + 106, + 131 + ] + } + }, + "pitch": 60, + "center": [ + 0, + 0 + ], + "zoom": 0, + "sources": { + "zones": { + "type": "geojson", + "maxzoom": 1, + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "outside": true + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + 89.296875, + 73.82482034613932 + ], + [ + -71.015625, + 69.65708627301174 + ], + [ + -73.125, + -15.28418511407642 + ], + [ + 15.468749999999998, + -17.308687886770024 + ], + [ + 16.171875, + 11.178401873711785 + ], + [ + -54.140625, + 11.867350911459308 + ], + [ + -52.03125, + 50.28933925329178 + ], + [ + 92.10937499999999, + 49.38237278700955 + ], + [ + 89.296875, + 73.82482034613932 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Polygon", + "properties": { + "inside": true + }, + "coordinates": [ + [ + [ + -20.390625, + 25.16517336866393 + ], + [ + 52.03125, + 25.16517336866393 + ], + [ + 52.03125, + 39.90973623453719 + ], + [ + -20.390625, + 39.90973623453719 + ], + [ + -20.390625, + 25.16517336866393 + ] + ] + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "zones", + "type": "fill-extrusion", + "source": "zones", + "paint": { + "fill-extrusion-color": "#ccc", + "fill-extrusion-height": 10000000 + } + } + ] +} diff --git a/metrics/integration/query-tests/fill-extrusion/sort-rotated/expected.json b/metrics/integration/query-tests/fill-extrusion/sort-rotated/expected.json new file mode 100644 index 00000000000..ce524bff662 --- /dev/null +++ b/metrics/integration/query-tests/fill-extrusion/sort-rotated/expected.json @@ -0,0 +1,107 @@ +[ + { + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -79.46788787841797, + 43.655577321374295 + ], + [ + -79.46788787841797, + 43.66290452383666 + ], + [ + -79.45700883865356, + 43.66290452383666 + ], + [ + -79.45700883865356, + 43.655577321374295 + ], + [ + -79.46788787841797, + 43.655577321374295 + ] + ] + ] + }, + "type": "Feature", + "properties": { + "position": "top" + }, + "source": "zones", + "state": {} + }, + { + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -79.46462631225586, + 43.64750394449095 + ], + [ + -79.46462631225586, + 43.65458373355483 + ], + [ + -79.45793151855469, + 43.65458373355483 + ], + [ + -79.45793151855469, + 43.64750394449095 + ], + [ + -79.46462631225586, + 43.64750394449095 + ] + ] + ] + }, + "type": "Feature", + "properties": { + "position": "middle" + }, + "source": "zones", + "state": {} + }, + { + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -79.46205139160156, + 43.63532972467448 + ], + [ + -79.46205139160156, + 43.642535173141056 + ], + [ + -79.4556999206543, + 43.642535173141056 + ], + [ + -79.4556999206543, + 43.63532972467448 + ], + [ + -79.46205139160156, + 43.63532972467448 + ] + ] + ] + }, + "type": "Feature", + "properties": { + "position": "bottom" + }, + "source": "zones", + "state": {} + } +] \ No newline at end of file diff --git a/metrics/integration/query-tests/fill-extrusion/sort-rotated/style.json b/metrics/integration/query-tests/fill-extrusion/sort-rotated/style.json new file mode 100644 index 00000000000..338d9d1f016 --- /dev/null +++ b/metrics/integration/query-tests/fill-extrusion/sort-rotated/style.json @@ -0,0 +1,142 @@ +{ + "version": 8, + "metadata": { + "test": { + "debug": true, + "width": 200, + "height": 400, + "queryGeometry": [ + 56, + 131 + ] + } + }, + "bearing": 180, + "pitch": 60, + "center": [ + -79.46462631225589, + 43.64750394449096 + ], + "zoom": 13, + "sources": { + "zones": { + "type": "geojson", + "maxzoom": 13, + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "position": "middle" + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -79.46462631225589, + 43.64750394449096 + ], + [ + -79.45793151855469, + 43.64750394449096 + ], + [ + -79.45793151855469, + 43.6545837335548 + ], + [ + -79.46462631225589, + 43.6545837335548 + ], + [ + -79.46462631225589, + 43.64750394449096 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "position": "bottom" + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -79.46205139160156, + 43.635329724674484 + ], + [ + -79.45569992065428, + 43.635329724674484 + ], + [ + -79.45569992065428, + 43.642535173141056 + ], + [ + -79.46205139160156, + 43.642535173141056 + ], + [ + -79.46205139160156, + 43.635329724674484 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "position": "top" + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -79.46788787841795, + 43.65557732137429 + ], + [ + -79.45700806884764, + 43.65557732137429 + ], + [ + -79.45700806884764, + 43.66290452383666 + ], + [ + -79.46788787841795, + 43.66290452383666 + ], + [ + -79.46788787841795, + 43.65557732137429 + ] + ] + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "zones", + "type": "fill-extrusion", + "source": "zones", + "paint": { + "fill-extrusion-color": "#ccc", + "fill-extrusion-height": 1000 + } + } + ] +} diff --git a/metrics/integration/query-tests/fill-extrusion/sort/expected.json b/metrics/integration/query-tests/fill-extrusion/sort/expected.json new file mode 100644 index 00000000000..81de095678f --- /dev/null +++ b/metrics/integration/query-tests/fill-extrusion/sort/expected.json @@ -0,0 +1,107 @@ +[ + { + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -79.46205139160156, + 43.63532972467448 + ], + [ + -79.46205139160156, + 43.642535173141056 + ], + [ + -79.4556999206543, + 43.642535173141056 + ], + [ + -79.4556999206543, + 43.63532972467448 + ], + [ + -79.46205139160156, + 43.63532972467448 + ] + ] + ] + }, + "type": "Feature", + "properties": { + "position": "bottom" + }, + "source": "zones", + "state": {} + }, + { + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -79.46462631225586, + 43.64750394449095 + ], + [ + -79.46462631225586, + 43.65458373355483 + ], + [ + -79.45793151855469, + 43.65458373355483 + ], + [ + -79.45793151855469, + 43.64750394449095 + ], + [ + -79.46462631225586, + 43.64750394449095 + ] + ] + ] + }, + "type": "Feature", + "properties": { + "position": "middle" + }, + "source": "zones", + "state": {} + }, + { + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -79.46788787841797, + 43.655577321374295 + ], + [ + -79.46788787841797, + 43.66290452383666 + ], + [ + -79.45700883865356, + 43.66290452383666 + ], + [ + -79.45700883865356, + 43.655577321374295 + ], + [ + -79.46788787841797, + 43.655577321374295 + ] + ] + ] + }, + "type": "Feature", + "properties": { + "position": "top" + }, + "source": "zones", + "state": {} + } +] \ No newline at end of file diff --git a/metrics/integration/query-tests/fill-extrusion/sort/style.json b/metrics/integration/query-tests/fill-extrusion/sort/style.json new file mode 100644 index 00000000000..1de5f29d098 --- /dev/null +++ b/metrics/integration/query-tests/fill-extrusion/sort/style.json @@ -0,0 +1,141 @@ +{ + "version": 8, + "metadata": { + "test": { + "debug": true, + "width": 200, + "height": 400, + "queryGeometry": [ + 156, + 131 + ] + } + }, + "pitch": 60, + "center": [ + -79.46462631225589, + 43.64750394449096 + ], + "zoom": 13, + "sources": { + "zones": { + "type": "geojson", + "maxzoom": 13, + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "position": "middle" + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -79.46462631225589, + 43.64750394449096 + ], + [ + -79.45793151855469, + 43.64750394449096 + ], + [ + -79.45793151855469, + 43.6545837335548 + ], + [ + -79.46462631225589, + 43.6545837335548 + ], + [ + -79.46462631225589, + 43.64750394449096 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "position": "bottom" + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -79.46205139160156, + 43.635329724674484 + ], + [ + -79.45569992065428, + 43.635329724674484 + ], + [ + -79.45569992065428, + 43.642535173141056 + ], + [ + -79.46205139160156, + 43.642535173141056 + ], + [ + -79.46205139160156, + 43.635329724674484 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "position": "top" + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -79.46788787841795, + 43.65557732137429 + ], + [ + -79.45700806884764, + 43.65557732137429 + ], + [ + -79.45700806884764, + 43.66290452383666 + ], + [ + -79.46788787841795, + 43.66290452383666 + ], + [ + -79.46788787841795, + 43.65557732137429 + ] + ] + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "zones", + "type": "fill-extrusion", + "source": "zones", + "paint": { + "fill-extrusion-color": "#ccc", + "fill-extrusion-height": 1000 + } + } + ] +} diff --git a/metrics/integration/query-tests/fill-extrusion/top-in/expected.json b/metrics/integration/query-tests/fill-extrusion/top-in/expected.json new file mode 100644 index 00000000000..30655dcba5b --- /dev/null +++ b/metrics/integration/query-tests/fill-extrusion/top-in/expected.json @@ -0,0 +1,35 @@ +[ + { + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -79.46205139160156, + 43.63532972467448 + ], + [ + -79.46205139160156, + 43.642535173141056 + ], + [ + -79.4556999206543, + 43.642535173141056 + ], + [ + -79.4556999206543, + 43.63532972467448 + ], + [ + -79.46205139160156, + 43.63532972467448 + ] + ] + ] + }, + "type": "Feature", + "properties": {}, + "source": "zones", + "state": {} + } +] \ No newline at end of file diff --git a/metrics/integration/query-tests/fill-extrusion/top-in/style.json b/metrics/integration/query-tests/fill-extrusion/top-in/style.json new file mode 100644 index 00000000000..f7be19471e1 --- /dev/null +++ b/metrics/integration/query-tests/fill-extrusion/top-in/style.json @@ -0,0 +1,74 @@ +{ + "version": 8, + "metadata": { + "test": { + "debug": true, + "width": 200, + "height": 400, + "queryGeometry": [ + 156, + 89 + ] + } + }, + "pitch": 60, + "center": [ + -79.46462631225589, + 43.64750394449096 + ], + "zoom": 13, + "sources": { + "zones": { + "type": "geojson", + "maxzoom": 13, + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -79.46205139160156, + 43.635329724674484 + ], + [ + -79.45569992065428, + 43.635329724674484 + ], + [ + -79.45569992065428, + 43.642535173141056 + ], + [ + -79.46205139160156, + 43.642535173141056 + ], + [ + -79.46205139160156, + 43.635329724674484 + ] + ] + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "zones", + "type": "fill-extrusion", + "source": "zones", + "paint": { + "fill-extrusion-color": "#ccc", + "fill-extrusion-height": 1000 + } + } + ] +} diff --git a/metrics/integration/query-tests/fill-extrusion/top-out/expected.json b/metrics/integration/query-tests/fill-extrusion/top-out/expected.json new file mode 100644 index 00000000000..0637a088a01 --- /dev/null +++ b/metrics/integration/query-tests/fill-extrusion/top-out/expected.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/metrics/integration/query-tests/fill-extrusion/top-out/style.json b/metrics/integration/query-tests/fill-extrusion/top-out/style.json new file mode 100644 index 00000000000..524174b04d5 --- /dev/null +++ b/metrics/integration/query-tests/fill-extrusion/top-out/style.json @@ -0,0 +1,74 @@ +{ + "version": 8, + "metadata": { + "test": { + "debug": true, + "width": 200, + "height": 400, + "queryGeometry": [ + 156, + 87 + ] + } + }, + "pitch": 60, + "center": [ + -79.46462631225589, + 43.64750394449096 + ], + "zoom": 13, + "sources": { + "zones": { + "type": "geojson", + "maxzoom": 13, + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -79.46205139160156, + 43.635329724674484 + ], + [ + -79.45569992065428, + 43.635329724674484 + ], + [ + -79.45569992065428, + 43.642535173141056 + ], + [ + -79.46205139160156, + 43.642535173141056 + ], + [ + -79.46205139160156, + 43.635329724674484 + ] + ] + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "zones", + "type": "fill-extrusion", + "source": "zones", + "paint": { + "fill-extrusion-color": "#ccc", + "fill-extrusion-height": 1000 + } + } + ] +} diff --git a/metrics/integration/query-tests/fill-features-in/default/expected.json b/metrics/integration/query-tests/fill-features-in/default/expected.json new file mode 100644 index 00000000000..190b9af15eb --- /dev/null +++ b/metrics/integration/query-tests/fill-features-in/default/expected.json @@ -0,0 +1,841 @@ +[ + { + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -75.1904296875, + 40.5910138834559 + ], + [ + -75.1959228515625, + 40.57849862511043 + ], + [ + -75.18218994140625, + 40.568067454307254 + ], + [ + -75.1629638671875, + 40.56598102500834 + ], + [ + -75.1409912109375, + 40.57641252104443 + ], + [ + -75.1025390625, + 40.568067454307254 + ], + [ + -75.069580078125, + 40.543026009955014 + ], + [ + -75.0640869140625, + 40.4824705245895 + ], + [ + -75.07232666015625, + 40.45739708775446 + ], + [ + -75.06134033203125, + 40.41976938144623 + ], + [ + -75.0311279296875, + 40.40513069752788 + ], + [ + -74.9981689453125, + 40.41140480914069 + ], + [ + -74.96795654296875, + 40.39885600103787 + ], + [ + -74.94049072265625, + 40.33817045213394 + ], + [ + -74.9102783203125, + 40.317231732315236 + ], + [ + -74.89654541015625, + 40.31513750307457 + ], + [ + -74.8663330078125, + 40.29209669470103 + ], + [ + -74.8443603515625, + 40.25228042623786 + ], + [ + -74.77294921875, + 40.21663547539123 + ], + [ + -74.7564697265625, + 40.18726672309202 + ], + [ + -74.7235107421875, + 40.16208338164617 + ], + [ + -74.72625732421875, + 40.14738878354049 + ], + [ + -74.74273681640625, + 40.1368906953459 + ], + [ + -74.761962890625, + 40.13479088304851 + ], + [ + -74.78668212890625, + 40.12219064672337 + ], + [ + -74.8223876953125, + 40.128491056854074 + ], + [ + -74.8388671875, + 40.10328591293438 + ], + [ + -74.86358642578125, + 40.08437592451517 + ], + [ + -74.90753173828125, + 40.071766346626106 + ], + [ + -74.9322509765625, + 40.071766346626106 + ], + [ + -74.9761962890625, + 40.04864272291729 + ], + [ + -74.9871826171875, + 40.059154433790695 + ], + [ + -74.97344970703125, + 40.078071427450084 + ], + [ + -74.9652099609375, + 40.078071427450084 + ], + [ + -74.95697021484375, + 40.096983167279575 + ], + [ + -74.96246337890625, + 40.099084147368444 + ], + [ + -74.9652099609375, + 40.120090380253316 + ], + [ + -74.98443603515625, + 40.12219064672337 + ], + [ + -75.48431396484375, + 40.41976938144623 + ], + [ + -75.41015625, + 40.48873742102282 + ], + [ + -75.267333984375, + 40.57849862511043 + ], + [ + -75.19866943359375, + 40.60978237983301 + ], + [ + -75.1904296875, + 40.5910138834559 + ] + ] + ] + }, + "type": "Feature", + "properties": { + "id": "42017", + "name": "Bucks County", + "pop_density": 3662.8124921176313 + }, + "id": 24, + "source": "us-counties", + "sourceLayer": "counties", + "state": {} + }, + { + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -75.01739501953125, + 40.13899044275823 + ], + [ + -75.0970458984375, + 40.069664523297774 + ], + [ + -75.08880615234375, + 40.06546068206555 + ], + [ + -75.11077880859375, + 40.04654018618777 + ], + [ + -75.17669677734375, + 40.08647729380883 + ], + [ + -75.1904296875, + 40.07386810509482 + ], + [ + -75.22613525390625, + 40.09488212232117 + ], + [ + -75.26458740234375, + 40.0549499439995 + ], + [ + -75.2069091796875, + 40.012890779526145 + ], + [ + -75.2783203125, + 39.97712009843963 + ], + [ + -75.31402587890625, + 40.02130468739708 + ], + [ + -75.322265625, + 40.01709786313759 + ], + [ + -75.36895751953125, + 40.07386810509482 + ], + [ + -75.3936767578125, + 40.061256581404734 + ], + [ + -75.421142578125, + 40.099084147368444 + ], + [ + -75.44036865234375, + 40.09067983779909 + ], + [ + -75.443115234375, + 40.09488212232117 + ], + [ + -75.45684814453125, + 40.08857859823706 + ], + [ + -75.45684814453125, + 40.09488212232117 + ], + [ + -75.465087890625, + 40.099084147368444 + ], + [ + -75.46234130859375, + 40.10328591293438 + ], + [ + -75.47332763671875, + 40.11378919157522 + ], + [ + -75.46234130859375, + 40.12639098502456 + ], + [ + -75.47332763671875, + 40.1305910638018 + ], + [ + -75.49530029296875, + 40.12639098502456 + ], + [ + -75.51177978515625, + 40.14109012528468 + ], + [ + -75.5035400390625, + 40.15578608609647 + ], + [ + -75.5145263671875, + 40.15998434802336 + ], + [ + -75.52276611328125, + 40.14738878354049 + ], + [ + -75.52825927734375, + 40.14948820651523 + ], + [ + -75.531005859375, + 40.17047886718112 + ], + [ + -75.5419921875, + 40.176774799905445 + ], + [ + -75.5584716796875, + 40.208245701525016 + ], + [ + -75.56671142578125, + 40.21034324236243 + ], + [ + -75.56396484375, + 40.197757023665446 + ], + [ + -75.574951171875, + 40.19565909336464 + ], + [ + -75.59967041015625, + 40.23760536584024 + ], + [ + -75.60791015625, + 40.23760536584024 + ], + [ + -75.60516357421875, + 40.22712123211298 + ], + [ + -75.6134033203125, + 40.22502421060497 + ], + [ + -75.65185546875, + 40.243895066997766 + ], + [ + -75.67108154296875, + 40.245991504199026 + ], + [ + -75.6903076171875, + 40.23760536584024 + ], + [ + -75.69854736328125, + 40.243895066997766 + ], + [ + -75.531005859375, + 40.449037195237594 + ], + [ + -75.01739501953125, + 40.13899044275823 + ] + ] + ] + }, + "type": "Feature", + "properties": { + "id": "42091", + "name": "Montgomery County", + "pop_density": 5992.125506526473 + }, + "id": 18, + "source": "us-counties", + "sourceLayer": "counties", + "state": {} + }, + { + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -75.1190185546875, + 40.9550113304862 + ], + [ + -75.0970458984375, + 40.9259649395143 + ], + [ + -75.08056640625, + 40.91558813293605 + ], + [ + -75.07781982421875, + 40.89482963261176 + ], + [ + -75.0531005859375, + 40.87198775669742 + ], + [ + -75.06683349609375, + 40.84913799774759 + ], + [ + -75.0970458984375, + 40.84913799774759 + ], + [ + -75.0970458984375, + 40.840827040200054 + ], + [ + -75.0860595703125, + 40.83043687764922 + ], + [ + -75.1025390625, + 40.80965166748854 + ], + [ + -75.1025390625, + 40.80133575979201 + ], + [ + -75.135498046875, + 40.77430186363722 + ], + [ + -75.1739501953125, + 40.778461640903544 + ], + [ + -75.179443359375, + 40.76390128094587 + ], + [ + -75.19866943359375, + 40.75349907043139 + ], + [ + -75.18218994140625, + 40.73268976628569 + ], + [ + -75.20416259765625, + 40.69313415330808 + ], + [ + -75.19866943359375, + 40.682720875945506 + ], + [ + -75.18218994140625, + 40.68063802521456 + ], + [ + -75.179443359375, + 40.67647212850005 + ], + [ + -75.201416015625, + 40.64938745451835 + ], + [ + -75.19317626953125, + 40.6410514961004 + ], + [ + -75.19317626953125, + 40.62020704520566 + ], + [ + -75.20416259765625, + 40.61812224225511 + ], + [ + -75.19866943359375, + 40.60978237983301 + ], + [ + -75.25909423828125, + 40.582670638095294 + ], + [ + -75.333251953125, + 40.53885152535466 + ], + [ + -75.4046630859375, + 40.582670638095294 + ], + [ + -75.3936767578125, + 40.597270634420255 + ], + [ + -75.39093017578125, + 40.61603737424184 + ], + [ + -75.38543701171875, + 40.61812224225511 + ], + [ + -75.38818359375, + 40.634798844041626 + ], + [ + -75.399169921875, + 40.63896734381723 + ], + [ + -75.43212890625, + 40.67438908251788 + ], + [ + -75.4815673828125, + 40.6577223717581 + ], + [ + -75.487060546875, + 40.6723059714534 + ], + [ + -75.50079345703125, + 40.68063802521456 + ], + [ + -75.52276611328125, + 40.71395582628605 + ], + [ + -75.52825927734375, + 40.736852147956085 + ], + [ + -75.5419921875, + 40.73893324113601 + ], + [ + -75.54473876953125, + 40.726445705514465 + ], + [ + -75.56121826171875, + 40.72228267283148 + ], + [ + -75.574951171875, + 40.7347709896724 + ], + [ + -75.59417724609375, + 40.736852147956085 + ], + [ + -75.61065673828125, + 40.78885994449482 + ], + [ + -75.5419921875, + 40.807572788255186 + ], + [ + -75.443115234375, + 40.820045086716505 + ], + [ + -75.38543701171875, + 40.832515040432725 + ], + [ + -75.28656005859375, + 40.867833841384936 + ], + [ + -75.267333984375, + 40.884447939035624 + ], + [ + -75.234375, + 40.90105786688403 + ], + [ + -75.24261474609375, + 40.911436954156414 + ], + [ + -75.223388671875, + 40.91973905106218 + ], + [ + -75.22064208984375, + 40.92804010533237 + ], + [ + -75.179443359375, + 40.94048973170135 + ], + [ + -75.179443359375, + 40.94671366508001 + ], + [ + -75.1300048828125, + 40.95915977213488 + ], + [ + -75.12176513671875, + 40.96952973563833 + ], + [ + -75.1190185546875, + 40.9550113304862 + ] + ] + ] + }, + "type": "Feature", + "properties": { + "id": "42095", + "name": "Northampton County", + "pop_density": 2856.497509082138 + }, + "id": 16, + "source": "us-counties", + "sourceLayer": "counties", + "state": {} + }, + { + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -75.59417724609375, + 40.736852147956085 + ], + [ + -75.574951171875, + 40.7347709896724 + ], + [ + -75.5584716796875, + 40.72228267283148 + ], + [ + -75.54473876953125, + 40.726445705514465 + ], + [ + -75.5419921875, + 40.73893324113601 + ], + [ + -75.52825927734375, + 40.736852147956085 + ], + [ + -75.52276611328125, + 40.71395582628605 + ], + [ + -75.50079345703125, + 40.68063802521456 + ], + [ + -75.487060546875, + 40.6723059714534 + ], + [ + -75.4815673828125, + 40.6577223717581 + ], + [ + -75.43212890625, + 40.67438908251788 + ], + [ + -75.399169921875, + 40.63896734381723 + ], + [ + -75.38818359375, + 40.634798844041626 + ], + [ + -75.38543701171875, + 40.61812224225511 + ], + [ + -75.39093017578125, + 40.61603737424184 + ], + [ + -75.3936767578125, + 40.597270634420255 + ], + [ + -75.4046630859375, + 40.582670638095294 + ], + [ + -75.33599853515625, + 40.53885152535466 + ], + [ + -75.41015625, + 40.48873742102282 + ], + [ + -75.48431396484375, + 40.41976938144623 + ], + [ + -75.8935546875, + 40.678555109399184 + ], + [ + -75.8551025390625, + 40.695216613517175 + ], + [ + -75.84686279296875, + 40.69313415330808 + ], + [ + -75.80841064453125, + 40.70771000786732 + ], + [ + -75.78094482421875, + 40.726445705514465 + ], + [ + -75.7452392578125, + 40.74101426921152 + ], + [ + -75.728759765625, + 40.75557964275589 + ], + [ + -75.70404052734375, + 40.76390128094587 + ], + [ + -75.69580078125, + 40.77222187732903 + ], + [ + -75.61065673828125, + 40.78885994449482 + ], + [ + -75.59417724609375, + 40.736852147956085 + ] + ] + ] + }, + "type": "Feature", + "properties": { + "id": "42077", + "name": "Lehigh County", + "pop_density": 3641.4496469459136 + }, + "id": 15, + "source": "us-counties", + "sourceLayer": "counties", + "state": {} + }, + { + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -75.531005859375, + 40.449037195237594 + ], + [ + -75.69854736328125, + 40.243895066997766 + ], + [ + -75.87432861328125, + 40.13899044275823 + ], + [ + -75.992431640625, + 40.21453812929633 + ], + [ + -75.992431640625, + 40.6410514961004 + ], + [ + -75.8935546875, + 40.678555109399184 + ], + [ + -75.531005859375, + 40.449037195237594 + ] + ] + ] + }, + "type": "Feature", + "properties": { + "id": "42011", + "name": "Berks County", + "pop_density": 1729.3147920831748 + }, + "id": 9, + "source": "us-counties", + "sourceLayer": "counties", + "state": {} + } +] \ No newline at end of file diff --git a/metrics/integration/query-tests/fill-features-in/default/style.json b/metrics/integration/query-tests/fill-features-in/default/style.json new file mode 100644 index 00000000000..ae11851631a --- /dev/null +++ b/metrics/integration/query-tests/fill-features-in/default/style.json @@ -0,0 +1,46 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 500, + "height": 500, + "queryGeometry": [ + [ + 50, + 70 + ], + [ + 112, + 145 + ] + ] + } + }, + "center": [ + -74.522, + 39.92 + ], + "zoom": 7, + "sources": { + "us-counties": { + "type": "vector", + "maxzoom": 7, + "minzoom": 7, + "tiles": [ + "local://tiles/counties-{z}-{x}-{y}.mvt" + ] + } + }, + "layers": [ + { + "id": "counties", + "type": "fill", + "source": "us-counties", + "source-layer": "counties", + "paint": { + "fill-outline-color": "white" + }, + "interactive": true + } + ] +} \ No newline at end of file diff --git a/metrics/integration/query-tests/fill-features-in/rotated/expected.json b/metrics/integration/query-tests/fill-features-in/rotated/expected.json new file mode 100644 index 00000000000..6483a92cde3 --- /dev/null +++ b/metrics/integration/query-tests/fill-features-in/rotated/expected.json @@ -0,0 +1,743 @@ +[ + { + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -74.3060302734375, + 40.60144147645394 + ], + [ + -74.29229736328125, + 40.5930995321649 + ], + [ + -74.2620849609375, + 40.59935608796519 + ], + [ + -74.25933837890625, + 40.603526799885884 + ], + [ + -74.23736572265625, + 40.603526799885884 + ], + [ + -74.23187255859375, + 40.59935608796519 + ], + [ + -74.21539306640625, + 40.605612058260164 + ], + [ + -74.20440673828125, + 40.5930995321649 + ], + [ + -74.22088623046875, + 40.55763465737647 + ], + [ + -74.23187255859375, + 40.55972134684839 + ], + [ + -74.24835205078125, + 40.549287249082056 + ], + [ + -74.24835205078125, + 40.522150985623796 + ], + [ + -74.256591796875, + 40.51588721022961 + ], + [ + -74.25933837890625, + 40.49918094806631 + ], + [ + -74.25384521484375, + 40.48873742102282 + ], + [ + -74.2291259765625, + 40.47829226856018 + ], + [ + -74.2236328125, + 40.45321727150386 + ], + [ + -74.2291259765625, + 40.44485685896177 + ], + [ + -74.23736572265625, + 40.44485685896177 + ], + [ + -74.24835205078125, + 40.4323142901375 + ], + [ + -74.24835205078125, + 40.40722213305287 + ], + [ + -74.39666748046875, + 40.29000168607601 + ], + [ + -74.3939208984375, + 40.27952566881291 + ], + [ + -74.46258544921875, + 40.25228042623786 + ], + [ + -74.48455810546875, + 40.254376603726485 + ], + [ + -74.48455810546875, + 40.2753348073247 + ], + [ + -74.50927734375, + 40.28162100214797 + ], + [ + -74.5147705078125, + 40.28790661250741 + ], + [ + -74.52301025390625, + 40.28790661250741 + ], + [ + -74.52301025390625, + 40.29209669470103 + ], + [ + -74.53125, + 40.296286517117125 + ], + [ + -74.542236328125, + 40.29000168607601 + ], + [ + -74.54498291015625, + 40.294191638381704 + ], + [ + -74.5587158203125, + 40.29209669470103 + ], + [ + -74.58343505859375, + 40.304665382591764 + ], + [ + -74.586181640625, + 40.31513750307457 + ], + [ + -74.62188720703125, + 40.32560799973206 + ], + [ + -74.630126953125, + 40.342357416583354 + ], + [ + -74.62188720703125, + 40.375843776960124 + ], + [ + -74.6026611328125, + 40.38212061782238 + ], + [ + -74.58892822265625, + 40.394672545122944 + ], + [ + -74.586181640625, + 40.41976938144623 + ], + [ + -74.5367431640625, + 40.438585867043315 + ], + [ + -74.4598388671875, + 40.497092372695676 + ], + [ + -74.46807861328125, + 40.509622849596695 + ], + [ + -74.48455810546875, + 40.513799155044126 + ], + [ + -74.49554443359375, + 40.530501775743204 + ], + [ + -74.5147705078125, + 40.543026009955014 + ], + [ + -74.520263671875, + 40.55554790286314 + ], + [ + -74.52850341796875, + 40.55972134684839 + ], + [ + -74.52850341796875, + 40.57015381856107 + ], + [ + -74.51751708984375, + 40.582670638095294 + ], + [ + -74.4708251953125, + 40.59935608796519 + ], + [ + -74.4598388671875, + 40.5951851158199 + ], + [ + -74.3060302734375, + 40.60978237983301 + ], + [ + -74.3060302734375, + 40.60144147645394 + ] + ] + ] + }, + "type": "Feature", + "properties": { + "id": "34023", + "name": "Middlesex County", + "pop_density": 9125.349561913852 + }, + "id": 46, + "source": "us-counties", + "sourceLayer": "counties", + "state": {} + }, + { + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -74.7235107421875, + 40.375843776960124 + ], + [ + -74.65484619140625, + 40.392580719691324 + ], + [ + -74.6246337890625, + 40.386304853509046 + ], + [ + -74.619140625, + 40.377936122224156 + ], + [ + -74.62738037109375, + 40.36747374615592 + ], + [ + -74.630126953125, + 40.342357416583354 + ], + [ + -74.6246337890625, + 40.32560799973206 + ], + [ + -74.586181640625, + 40.31513750307457 + ], + [ + -74.58343505859375, + 40.304665382591764 + ], + [ + -74.5587158203125, + 40.29209669470103 + ], + [ + -74.54498291015625, + 40.294191638381704 + ], + [ + -74.542236328125, + 40.29000168607601 + ], + [ + -74.53125, + 40.296286517117125 + ], + [ + -74.52301025390625, + 40.28790661250741 + ], + [ + -74.5147705078125, + 40.28790661250741 + ], + [ + -74.50927734375, + 40.28162100214797 + ], + [ + -74.48455810546875, + 40.2753348073247 + ], + [ + -74.48455810546875, + 40.254376603726485 + ], + [ + -74.49005126953125, + 40.25228042623786 + ], + [ + -74.4818115234375, + 40.243895066997766 + ], + [ + -74.54498291015625, + 40.21663547539123 + ], + [ + -74.564208984375, + 40.19146303804064 + ], + [ + -74.59442138671875, + 40.180971763887186 + ], + [ + -74.59991455078125, + 40.18726672309202 + ], + [ + -74.61639404296875, + 40.18307014852533 + ], + [ + -74.58892822265625, + 40.13899044275823 + ], + [ + -74.6026611328125, + 40.1368906953459 + ], + [ + -74.6246337890625, + 40.14318974292439 + ], + [ + -74.6246337890625, + 40.14948820651523 + ], + [ + -74.6356201171875, + 40.14948820651523 + ], + [ + -74.6630859375, + 40.16628125420655 + ], + [ + -74.6795654296875, + 40.16628125420655 + ], + [ + -74.67681884765625, + 40.17467622056341 + ], + [ + -74.70428466796875, + 40.18516846826054 + ], + [ + -74.71527099609375, + 40.176774799905445 + ], + [ + -74.70977783203125, + 40.172577576321686 + ], + [ + -74.7125244140625, + 40.168380093142446 + ], + [ + -74.70428466796875, + 40.17047886718112 + ], + [ + -74.70703125, + 40.16208338164617 + ], + [ + -74.72625732421875, + 40.14738878354049 + ], + [ + -74.7235107421875, + 40.16208338164617 + ], + [ + -74.73724365234375, + 40.17887331434699 + ], + [ + -74.7564697265625, + 40.18726672309202 + ], + [ + -74.77294921875, + 40.21663547539123 + ], + [ + -74.8443603515625, + 40.25228042623786 + ], + [ + -74.8663330078125, + 40.29209669470103 + ], + [ + -74.8828125, + 40.30675993658963 + ], + [ + -74.9102783203125, + 40.317231732315236 + ], + [ + -74.9432373046875, + 40.342357416583354 + ], + [ + -74.85809326171875, + 40.34863737603172 + ], + [ + -74.871826171875, + 40.377936122224156 + ], + [ + -74.80316162109375, + 40.386304853509046 + ], + [ + -74.80865478515625, + 40.4176783358555 + ], + [ + -74.74822998046875, + 40.426042128264925 + ], + [ + -74.7235107421875, + 40.375843776960124 + ] + ] + ] + }, + "type": "Feature", + "properties": { + "id": "34021", + "name": "Mercer County", + "pop_density": 5838.068064207171 + }, + "id": 26, + "source": "us-counties", + "sourceLayer": "counties", + "state": {} + }, + { + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -74.55047607421875, + 40.7347709896724 + ], + [ + -74.53125, + 40.72852712420598 + ], + [ + -74.53399658203125, + 40.72228267283148 + ], + [ + -74.5257568359375, + 40.71603763556806 + ], + [ + -74.52850341796875, + 40.709792012434946 + ], + [ + -74.5147705078125, + 40.701463603604594 + ], + [ + -74.5147705078125, + 40.695216613517175 + ], + [ + -74.520263671875, + 40.695216613517175 + ], + [ + -74.51751708984375, + 40.69105162801023 + ], + [ + -74.5257568359375, + 40.69105162801023 + ], + [ + -74.52850341796875, + 40.6723059714534 + ], + [ + -74.5367431640625, + 40.668139554080426 + ], + [ + -74.5257568359375, + 40.66188943992171 + ], + [ + -74.5257568359375, + 40.651471281440564 + ], + [ + -74.5147705078125, + 40.651471281440564 + ], + [ + -74.50653076171875, + 40.659805938378526 + ], + [ + -74.46258544921875, + 40.67438908251788 + ], + [ + -74.454345703125, + 40.655638740061164 + ], + [ + -74.432373046875, + 40.666056247773355 + ], + [ + -74.42138671875, + 40.659805938378526 + ], + [ + -74.40765380859375, + 40.668139554080426 + ], + [ + -74.40216064453125, + 40.666056247773355 + ], + [ + -74.410400390625, + 40.64313558331281 + ], + [ + -74.4158935546875, + 40.6410514961004 + ], + [ + -74.41864013671875, + 40.62854560636586 + ], + [ + -74.4598388671875, + 40.60144147645394 + ], + [ + -74.51751708984375, + 40.582670638095294 + ], + [ + -74.52850341796875, + 40.57015381856107 + ], + [ + -74.52850341796875, + 40.55972134684839 + ], + [ + -74.520263671875, + 40.55554790286314 + ], + [ + -74.5147705078125, + 40.543026009955014 + ], + [ + -74.49554443359375, + 40.530501775743204 + ], + [ + -74.48455810546875, + 40.513799155044126 + ], + [ + -74.46807861328125, + 40.509622849596695 + ], + [ + -74.4598388671875, + 40.497092372695676 + ], + [ + -74.5367431640625, + 40.438585867043315 + ], + [ + -74.586181640625, + 40.41976938144623 + ], + [ + -74.58892822265625, + 40.394672545122944 + ], + [ + -74.6026611328125, + 40.38212061782238 + ], + [ + -74.62188720703125, + 40.375843776960124 + ], + [ + -74.6246337890625, + 40.386304853509046 + ], + [ + -74.65484619140625, + 40.392580719691324 + ], + [ + -74.7235107421875, + 40.375843776960124 + ], + [ + -74.8004150390625, + 40.51588721022961 + ], + [ + -74.77569580078125, + 40.50544628405211 + ], + [ + -74.74273681640625, + 40.55554790286314 + ], + [ + -74.71527099609375, + 40.58475654701272 + ], + [ + -74.72625732421875, + 40.58892816969373 + ], + [ + -74.70428466796875, + 40.62229178309272 + ], + [ + -74.71527099609375, + 40.63271449655062 + ], + [ + -74.72625732421875, + 40.63271449655062 + ], + [ + -74.72076416015625, + 40.655638740061164 + ], + [ + -74.73175048828125, + 40.666056247773355 + ], + [ + -74.7235107421875, + 40.67022279530735 + ], + [ + -74.718017578125, + 40.684803661591275 + ], + [ + -74.72625732421875, + 40.68896903762433 + ], + [ + -74.718017578125, + 40.701463603604594 + ], + [ + -74.72625732421875, + 40.720201058841496 + ], + [ + -74.55596923828125, + 40.75974059207391 + ], + [ + -74.55047607421875, + 40.7347709896724 + ] + ] + ] + }, + "type": "Feature", + "properties": { + "id": "34035", + "name": "Somerset County", + "pop_density": 3852.3524267234866 + }, + "id": 23, + "source": "us-counties", + "sourceLayer": "counties", + "state": {} + } +] \ No newline at end of file diff --git a/metrics/integration/query-tests/fill-features-in/rotated/style.json b/metrics/integration/query-tests/fill-features-in/rotated/style.json new file mode 100644 index 00000000000..c4c0f8f539f --- /dev/null +++ b/metrics/integration/query-tests/fill-features-in/rotated/style.json @@ -0,0 +1,47 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 500, + "height": 500, + "queryGeometry": [ + [ + 30, + 120 + ], + [ + 142, + 145 + ] + ] + } + }, + "center": [ + -74.522, + 39.92 + ], + "bearing": 45, + "zoom": 8, + "sources": { + "us-counties": { + "type": "vector", + "maxzoom": 7, + "minzoom": 7, + "tiles": [ + "local://tiles/counties-{z}-{x}-{y}.mvt" + ] + } + }, + "layers": [ + { + "id": "counties", + "type": "fill", + "source": "us-counties", + "source-layer": "counties", + "paint": { + "fill-outline-color": "white" + }, + "interactive": true + } + ] +} \ No newline at end of file diff --git a/metrics/integration/query-tests/fill-features-in/tilted/expected.json b/metrics/integration/query-tests/fill-features-in/tilted/expected.json new file mode 100644 index 00000000000..6b3e32ce6cb --- /dev/null +++ b/metrics/integration/query-tests/fill-features-in/tilted/expected.json @@ -0,0 +1,667 @@ +[ + { + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -73.8885498046875, + 40.49082625646807 + ], + [ + -73.89129638671875, + 40.310948849734984 + ], + [ + -73.8995361328125, + 40.2753348073247 + ], + [ + -73.9654541015625, + 40.120090380253316 + ], + [ + -73.9654541015625, + 40.099084147368444 + ], + [ + -74.0478515625, + 40.10538669840983 + ], + [ + -74.07257080078125, + 40.09067983779909 + ], + [ + -74.09454345703125, + 40.109588074741396 + ], + [ + -74.0972900390625, + 40.1305910638018 + ], + [ + -74.1082763671875, + 40.13899044275823 + ], + [ + -74.1522216796875, + 40.099084147368444 + ], + [ + -74.16046142578125, + 40.107487419012415 + ], + [ + -74.20440673828125, + 40.11378919157522 + ], + [ + -74.23187255859375, + 40.109588074741396 + ], + [ + -74.24560546875, + 40.117990048904744 + ], + [ + -74.24285888671875, + 40.1305910638018 + ], + [ + -74.25384521484375, + 40.14738878354049 + ], + [ + -74.2620849609375, + 40.14948820651523 + ], + [ + -74.25933837890625, + 40.16208338164617 + ], + [ + -74.26483154296875, + 40.168380093142446 + ], + [ + -74.40765380859375, + 40.172577576321686 + ], + [ + -74.52850341796875, + 40.09067983779909 + ], + [ + -74.55322265625, + 40.08017299133499 + ], + [ + -74.61639404296875, + 40.18307014852533 + ], + [ + -74.59991455078125, + 40.18726672309202 + ], + [ + -74.59442138671875, + 40.180971763887186 + ], + [ + -74.56695556640625, + 40.18936491301898 + ], + [ + -74.54498291015625, + 40.21873275657035 + ], + [ + -74.4818115234375, + 40.243895066997766 + ], + [ + -74.49005126953125, + 40.254376603726485 + ], + [ + -74.46258544921875, + 40.25228042623786 + ], + [ + -74.3939208984375, + 40.27952566881291 + ], + [ + -74.39666748046875, + 40.29000168607601 + ], + [ + -74.24835205078125, + 40.40722213305287 + ], + [ + -74.24835205078125, + 40.4323142901375 + ], + [ + -74.23736572265625, + 40.44485685896177 + ], + [ + -74.2291259765625, + 40.44485685896177 + ], + [ + -74.2236328125, + 40.45321727150386 + ], + [ + -74.2291259765625, + 40.47829226856018 + ], + [ + -73.95172119140625, + 40.52632651074401 + ], + [ + -73.8885498046875, + 40.49082625646807 + ] + ] + ] + }, + "type": "Feature", + "properties": { + "id": "34025", + "name": "Monmouth County", + "pop_density": 3454.220015794825 + }, + "id": 47, + "source": "us-counties", + "sourceLayer": "counties", + "state": {} + }, + { + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -74.3060302734375, + 40.60144147645394 + ], + [ + -74.29229736328125, + 40.5930995321649 + ], + [ + -74.2620849609375, + 40.59935608796519 + ], + [ + -74.25933837890625, + 40.603526799885884 + ], + [ + -74.23736572265625, + 40.603526799885884 + ], + [ + -74.23187255859375, + 40.59935608796519 + ], + [ + -74.21539306640625, + 40.605612058260164 + ], + [ + -74.20440673828125, + 40.5930995321649 + ], + [ + -74.22088623046875, + 40.55763465737647 + ], + [ + -74.23187255859375, + 40.55972134684839 + ], + [ + -74.24835205078125, + 40.549287249082056 + ], + [ + -74.24835205078125, + 40.522150985623796 + ], + [ + -74.256591796875, + 40.51588721022961 + ], + [ + -74.25933837890625, + 40.49918094806631 + ], + [ + -74.25384521484375, + 40.48873742102282 + ], + [ + -74.2291259765625, + 40.47829226856018 + ], + [ + -74.2236328125, + 40.45321727150386 + ], + [ + -74.2291259765625, + 40.44485685896177 + ], + [ + -74.23736572265625, + 40.44485685896177 + ], + [ + -74.24835205078125, + 40.4323142901375 + ], + [ + -74.24835205078125, + 40.40722213305287 + ], + [ + -74.39666748046875, + 40.29000168607601 + ], + [ + -74.3939208984375, + 40.27952566881291 + ], + [ + -74.46258544921875, + 40.25228042623786 + ], + [ + -74.48455810546875, + 40.254376603726485 + ], + [ + -74.48455810546875, + 40.2753348073247 + ], + [ + -74.50927734375, + 40.28162100214797 + ], + [ + -74.5147705078125, + 40.28790661250741 + ], + [ + -74.52301025390625, + 40.28790661250741 + ], + [ + -74.52301025390625, + 40.29209669470103 + ], + [ + -74.53125, + 40.296286517117125 + ], + [ + -74.542236328125, + 40.29000168607601 + ], + [ + -74.54498291015625, + 40.294191638381704 + ], + [ + -74.5587158203125, + 40.29209669470103 + ], + [ + -74.58343505859375, + 40.304665382591764 + ], + [ + -74.586181640625, + 40.31513750307457 + ], + [ + -74.62188720703125, + 40.32560799973206 + ], + [ + -74.630126953125, + 40.342357416583354 + ], + [ + -74.62188720703125, + 40.375843776960124 + ], + [ + -74.6026611328125, + 40.38212061782238 + ], + [ + -74.58892822265625, + 40.394672545122944 + ], + [ + -74.586181640625, + 40.41976938144623 + ], + [ + -74.5367431640625, + 40.438585867043315 + ], + [ + -74.4598388671875, + 40.497092372695676 + ], + [ + -74.46807861328125, + 40.509622849596695 + ], + [ + -74.48455810546875, + 40.513799155044126 + ], + [ + -74.49554443359375, + 40.530501775743204 + ], + [ + -74.5147705078125, + 40.543026009955014 + ], + [ + -74.520263671875, + 40.55554790286314 + ], + [ + -74.52850341796875, + 40.55972134684839 + ], + [ + -74.52850341796875, + 40.57015381856107 + ], + [ + -74.51751708984375, + 40.582670638095294 + ], + [ + -74.4708251953125, + 40.59935608796519 + ], + [ + -74.4598388671875, + 40.5951851158199 + ], + [ + -74.3060302734375, + 40.60978237983301 + ], + [ + -74.3060302734375, + 40.60144147645394 + ] + ] + ] + }, + "type": "Feature", + "properties": { + "id": "34023", + "name": "Middlesex County", + "pop_density": 9125.349561913852 + }, + "id": 46, + "source": "us-counties", + "sourceLayer": "counties", + "state": {} + }, + { + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -74.7235107421875, + 40.375843776960124 + ], + [ + -74.65484619140625, + 40.392580719691324 + ], + [ + -74.6246337890625, + 40.386304853509046 + ], + [ + -74.619140625, + 40.377936122224156 + ], + [ + -74.62738037109375, + 40.36747374615592 + ], + [ + -74.630126953125, + 40.342357416583354 + ], + [ + -74.6246337890625, + 40.32560799973206 + ], + [ + -74.586181640625, + 40.31513750307457 + ], + [ + -74.58343505859375, + 40.304665382591764 + ], + [ + -74.5587158203125, + 40.29209669470103 + ], + [ + -74.54498291015625, + 40.294191638381704 + ], + [ + -74.542236328125, + 40.29000168607601 + ], + [ + -74.53125, + 40.296286517117125 + ], + [ + -74.52301025390625, + 40.28790661250741 + ], + [ + -74.5147705078125, + 40.28790661250741 + ], + [ + -74.50927734375, + 40.28162100214797 + ], + [ + -74.48455810546875, + 40.2753348073247 + ], + [ + -74.48455810546875, + 40.254376603726485 + ], + [ + -74.49005126953125, + 40.25228042623786 + ], + [ + -74.4818115234375, + 40.243895066997766 + ], + [ + -74.54498291015625, + 40.21663547539123 + ], + [ + -74.564208984375, + 40.19146303804064 + ], + [ + -74.59442138671875, + 40.180971763887186 + ], + [ + -74.59991455078125, + 40.18726672309202 + ], + [ + -74.61639404296875, + 40.18307014852533 + ], + [ + -74.58892822265625, + 40.13899044275823 + ], + [ + -74.6026611328125, + 40.1368906953459 + ], + [ + -74.6246337890625, + 40.14318974292439 + ], + [ + -74.6246337890625, + 40.14948820651523 + ], + [ + -74.6356201171875, + 40.14948820651523 + ], + [ + -74.6630859375, + 40.16628125420655 + ], + [ + -74.6795654296875, + 40.16628125420655 + ], + [ + -74.67681884765625, + 40.17467622056341 + ], + [ + -74.70428466796875, + 40.18516846826054 + ], + [ + -74.71527099609375, + 40.176774799905445 + ], + [ + -74.70977783203125, + 40.172577576321686 + ], + [ + -74.7125244140625, + 40.168380093142446 + ], + [ + -74.70428466796875, + 40.17047886718112 + ], + [ + -74.70703125, + 40.16208338164617 + ], + [ + -74.72625732421875, + 40.14738878354049 + ], + [ + -74.7235107421875, + 40.16208338164617 + ], + [ + -74.73724365234375, + 40.17887331434699 + ], + [ + -74.7564697265625, + 40.18726672309202 + ], + [ + -74.77294921875, + 40.21663547539123 + ], + [ + -74.8443603515625, + 40.25228042623786 + ], + [ + -74.8663330078125, + 40.29209669470103 + ], + [ + -74.8828125, + 40.30675993658963 + ], + [ + -74.9102783203125, + 40.317231732315236 + ], + [ + -74.9432373046875, + 40.342357416583354 + ], + [ + -74.85809326171875, + 40.34863737603172 + ], + [ + -74.871826171875, + 40.377936122224156 + ], + [ + -74.80316162109375, + 40.386304853509046 + ], + [ + -74.80865478515625, + 40.4176783358555 + ], + [ + -74.74822998046875, + 40.426042128264925 + ], + [ + -74.7235107421875, + 40.375843776960124 + ] + ] + ] + }, + "type": "Feature", + "properties": { + "id": "34021", + "name": "Mercer County", + "pop_density": 5838.068064207171 + }, + "id": 26, + "source": "us-counties", + "sourceLayer": "counties", + "state": {} + } +] \ No newline at end of file diff --git a/metrics/integration/query-tests/fill-features-in/tilted/style.json b/metrics/integration/query-tests/fill-features-in/tilted/style.json new file mode 100644 index 00000000000..9f9a937b2a8 --- /dev/null +++ b/metrics/integration/query-tests/fill-features-in/tilted/style.json @@ -0,0 +1,47 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 500, + "height": 500, + "queryGeometry": [ + [ + 260, + 90 + ], + [ + 280, + 110 + ] + ] + } + }, + "center": [ + -74.522, + 39.92 + ], + "zoom": 9, + "pitch": 50, + "sources": { + "us-counties": { + "type": "vector", + "maxzoom": 7, + "minzoom": 7, + "tiles": [ + "local://tiles/counties-{z}-{x}-{y}.mvt" + ] + } + }, + "layers": [ + { + "id": "counties", + "type": "fill", + "source": "us-counties", + "source-layer": "counties", + "paint": { + "fill-outline-color": "white" + }, + "interactive": true + } + ] +} \ No newline at end of file diff --git a/metrics/integration/query-tests/fill-translate-anchor/map/expected.json b/metrics/integration/query-tests/fill-translate-anchor/map/expected.json new file mode 100644 index 00000000000..d374d6befed --- /dev/null +++ b/metrics/integration/query-tests/fill-translate-anchor/map/expected.json @@ -0,0 +1,193 @@ +[ + { + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -75.1904296875, + 40.5910138834559 + ], + [ + -75.1959228515625, + 40.57849862511043 + ], + [ + -75.18218994140625, + 40.568067454307254 + ], + [ + -75.1629638671875, + 40.56598102500834 + ], + [ + -75.1409912109375, + 40.57641252104443 + ], + [ + -75.1025390625, + 40.568067454307254 + ], + [ + -75.069580078125, + 40.543026009955014 + ], + [ + -75.0640869140625, + 40.4824705245895 + ], + [ + -75.07232666015625, + 40.45739708775446 + ], + [ + -75.06134033203125, + 40.41976938144623 + ], + [ + -75.0311279296875, + 40.40513069752788 + ], + [ + -74.9981689453125, + 40.41140480914069 + ], + [ + -74.96795654296875, + 40.39885600103787 + ], + [ + -74.94049072265625, + 40.33817045213394 + ], + [ + -74.9102783203125, + 40.317231732315236 + ], + [ + -74.89654541015625, + 40.31513750307457 + ], + [ + -74.8663330078125, + 40.29209669470103 + ], + [ + -74.8443603515625, + 40.25228042623786 + ], + [ + -74.77294921875, + 40.21663547539123 + ], + [ + -74.7564697265625, + 40.18726672309202 + ], + [ + -74.7235107421875, + 40.16208338164617 + ], + [ + -74.72625732421875, + 40.14738878354049 + ], + [ + -74.74273681640625, + 40.1368906953459 + ], + [ + -74.761962890625, + 40.13479088304851 + ], + [ + -74.78668212890625, + 40.12219064672337 + ], + [ + -74.8223876953125, + 40.128491056854074 + ], + [ + -74.8388671875, + 40.10328591293438 + ], + [ + -74.86358642578125, + 40.08437592451517 + ], + [ + -74.90753173828125, + 40.071766346626106 + ], + [ + -74.9322509765625, + 40.071766346626106 + ], + [ + -74.9761962890625, + 40.04864272291729 + ], + [ + -74.9871826171875, + 40.059154433790695 + ], + [ + -74.97344970703125, + 40.078071427450084 + ], + [ + -74.9652099609375, + 40.078071427450084 + ], + [ + -74.95697021484375, + 40.096983167279575 + ], + [ + -74.96246337890625, + 40.099084147368444 + ], + [ + -74.9652099609375, + 40.120090380253316 + ], + [ + -74.98443603515625, + 40.12219064672337 + ], + [ + -75.48431396484375, + 40.41976938144623 + ], + [ + -75.41015625, + 40.48873742102282 + ], + [ + -75.267333984375, + 40.57849862511043 + ], + [ + -75.19866943359375, + 40.60978237983301 + ], + [ + -75.1904296875, + 40.5910138834559 + ] + ] + ] + }, + "type": "Feature", + "properties": { + "id": "42017", + "name": "Bucks County", + "pop_density": 3662.8124921176313 + }, + "id": 24, + "source": "us-counties", + "sourceLayer": "counties", + "state": {} + } +] \ No newline at end of file diff --git a/metrics/integration/query-tests/fill-translate-anchor/map/style.json b/metrics/integration/query-tests/fill-translate-anchor/map/style.json new file mode 100644 index 00000000000..f69535271b0 --- /dev/null +++ b/metrics/integration/query-tests/fill-translate-anchor/map/style.json @@ -0,0 +1,46 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 500, + "height": 500, + "queryGeometry": [ + 136, + 231 + ] + } + }, + "center": [ + -74.522, + 39.92 + ], + "bearing": 45, + "zoom": 8, + "sources": { + "us-counties": { + "type": "vector", + "maxzoom": 7, + "minzoom": 7, + "tiles": [ + "local://tiles/counties-{z}-{x}-{y}.mvt" + ] + } + }, + "layers": [ + { + "id": "counties", + "type": "fill", + "source": "us-counties", + "source-layer": "counties", + "paint": { + "fill-translate": [ + 100, + 100 + ], + "fill-translate-anchor": "map", + "fill-outline-color": "white" + }, + "interactive": true + } + ] +} \ No newline at end of file diff --git a/metrics/integration/query-tests/fill-translate-anchor/viewport/expected.json b/metrics/integration/query-tests/fill-translate-anchor/viewport/expected.json new file mode 100644 index 00000000000..adc00db9aaf --- /dev/null +++ b/metrics/integration/query-tests/fill-translate-anchor/viewport/expected.json @@ -0,0 +1,261 @@ +[ + { + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -74.55047607421875, + 40.7347709896724 + ], + [ + -74.53125, + 40.72852712420598 + ], + [ + -74.53399658203125, + 40.72228267283148 + ], + [ + -74.5257568359375, + 40.71603763556806 + ], + [ + -74.52850341796875, + 40.709792012434946 + ], + [ + -74.5147705078125, + 40.701463603604594 + ], + [ + -74.5147705078125, + 40.695216613517175 + ], + [ + -74.520263671875, + 40.695216613517175 + ], + [ + -74.51751708984375, + 40.69105162801023 + ], + [ + -74.5257568359375, + 40.69105162801023 + ], + [ + -74.52850341796875, + 40.6723059714534 + ], + [ + -74.5367431640625, + 40.668139554080426 + ], + [ + -74.5257568359375, + 40.66188943992171 + ], + [ + -74.5257568359375, + 40.651471281440564 + ], + [ + -74.5147705078125, + 40.651471281440564 + ], + [ + -74.50653076171875, + 40.659805938378526 + ], + [ + -74.46258544921875, + 40.67438908251788 + ], + [ + -74.454345703125, + 40.655638740061164 + ], + [ + -74.432373046875, + 40.666056247773355 + ], + [ + -74.42138671875, + 40.659805938378526 + ], + [ + -74.40765380859375, + 40.668139554080426 + ], + [ + -74.40216064453125, + 40.666056247773355 + ], + [ + -74.410400390625, + 40.64313558331281 + ], + [ + -74.4158935546875, + 40.6410514961004 + ], + [ + -74.41864013671875, + 40.62854560636586 + ], + [ + -74.4598388671875, + 40.60144147645394 + ], + [ + -74.51751708984375, + 40.582670638095294 + ], + [ + -74.52850341796875, + 40.57015381856107 + ], + [ + -74.52850341796875, + 40.55972134684839 + ], + [ + -74.520263671875, + 40.55554790286314 + ], + [ + -74.5147705078125, + 40.543026009955014 + ], + [ + -74.49554443359375, + 40.530501775743204 + ], + [ + -74.48455810546875, + 40.513799155044126 + ], + [ + -74.46807861328125, + 40.509622849596695 + ], + [ + -74.4598388671875, + 40.497092372695676 + ], + [ + -74.5367431640625, + 40.438585867043315 + ], + [ + -74.586181640625, + 40.41976938144623 + ], + [ + -74.58892822265625, + 40.394672545122944 + ], + [ + -74.6026611328125, + 40.38212061782238 + ], + [ + -74.62188720703125, + 40.375843776960124 + ], + [ + -74.6246337890625, + 40.386304853509046 + ], + [ + -74.65484619140625, + 40.392580719691324 + ], + [ + -74.7235107421875, + 40.375843776960124 + ], + [ + -74.8004150390625, + 40.51588721022961 + ], + [ + -74.77569580078125, + 40.50544628405211 + ], + [ + -74.74273681640625, + 40.55554790286314 + ], + [ + -74.71527099609375, + 40.58475654701272 + ], + [ + -74.72625732421875, + 40.58892816969373 + ], + [ + -74.70428466796875, + 40.62229178309272 + ], + [ + -74.71527099609375, + 40.63271449655062 + ], + [ + -74.72625732421875, + 40.63271449655062 + ], + [ + -74.72076416015625, + 40.655638740061164 + ], + [ + -74.73175048828125, + 40.666056247773355 + ], + [ + -74.7235107421875, + 40.67022279530735 + ], + [ + -74.718017578125, + 40.684803661591275 + ], + [ + -74.72625732421875, + 40.68896903762433 + ], + [ + -74.718017578125, + 40.701463603604594 + ], + [ + -74.72625732421875, + 40.720201058841496 + ], + [ + -74.55596923828125, + 40.75974059207391 + ], + [ + -74.55047607421875, + 40.7347709896724 + ] + ] + ] + }, + "type": "Feature", + "properties": { + "id": "34035", + "name": "Somerset County", + "pop_density": 3852.3524267234866 + }, + "id": 23, + "source": "us-counties", + "sourceLayer": "counties", + "state": {} + } +] \ No newline at end of file diff --git a/metrics/integration/query-tests/fill-translate-anchor/viewport/style.json b/metrics/integration/query-tests/fill-translate-anchor/viewport/style.json new file mode 100644 index 00000000000..587ab47db39 --- /dev/null +++ b/metrics/integration/query-tests/fill-translate-anchor/viewport/style.json @@ -0,0 +1,46 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 500, + "height": 500, + "queryGeometry": [ + 136, + 231 + ] + } + }, + "center": [ + -74.522, + 39.92 + ], + "bearing": 45, + "zoom": 8, + "sources": { + "us-counties": { + "type": "vector", + "maxzoom": 7, + "minzoom": 7, + "tiles": [ + "local://tiles/counties-{z}-{x}-{y}.mvt" + ] + } + }, + "layers": [ + { + "id": "counties", + "type": "fill", + "source": "us-counties", + "source-layer": "counties", + "paint": { + "fill-translate": [ + 100, + 100 + ], + "fill-translate-anchor": "viewport", + "fill-outline-color": "white" + }, + "interactive": true + } + ] +} \ No newline at end of file diff --git a/metrics/integration/query-tests/fill-translate/literal/expected.json b/metrics/integration/query-tests/fill-translate/literal/expected.json new file mode 100644 index 00000000000..79f087735ef --- /dev/null +++ b/metrics/integration/query-tests/fill-translate/literal/expected.json @@ -0,0 +1,205 @@ +[ + { + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -75.01739501953125, + 40.13899044275823 + ], + [ + -75.0970458984375, + 40.069664523297774 + ], + [ + -75.08880615234375, + 40.06546068206555 + ], + [ + -75.11077880859375, + 40.04654018618777 + ], + [ + -75.17669677734375, + 40.08647729380883 + ], + [ + -75.1904296875, + 40.07386810509482 + ], + [ + -75.22613525390625, + 40.09488212232117 + ], + [ + -75.26458740234375, + 40.0549499439995 + ], + [ + -75.2069091796875, + 40.012890779526145 + ], + [ + -75.2783203125, + 39.97712009843963 + ], + [ + -75.31402587890625, + 40.02130468739708 + ], + [ + -75.322265625, + 40.01709786313759 + ], + [ + -75.36895751953125, + 40.07386810509482 + ], + [ + -75.3936767578125, + 40.061256581404734 + ], + [ + -75.421142578125, + 40.099084147368444 + ], + [ + -75.44036865234375, + 40.09067983779909 + ], + [ + -75.443115234375, + 40.09488212232117 + ], + [ + -75.45684814453125, + 40.08857859823706 + ], + [ + -75.45684814453125, + 40.09488212232117 + ], + [ + -75.465087890625, + 40.099084147368444 + ], + [ + -75.46234130859375, + 40.10328591293438 + ], + [ + -75.47332763671875, + 40.11378919157522 + ], + [ + -75.46234130859375, + 40.12639098502456 + ], + [ + -75.47332763671875, + 40.1305910638018 + ], + [ + -75.49530029296875, + 40.12639098502456 + ], + [ + -75.51177978515625, + 40.14109012528468 + ], + [ + -75.5035400390625, + 40.15578608609647 + ], + [ + -75.5145263671875, + 40.15998434802336 + ], + [ + -75.52276611328125, + 40.14738878354049 + ], + [ + -75.52825927734375, + 40.14948820651523 + ], + [ + -75.531005859375, + 40.17047886718112 + ], + [ + -75.5419921875, + 40.176774799905445 + ], + [ + -75.5584716796875, + 40.208245701525016 + ], + [ + -75.56671142578125, + 40.21034324236243 + ], + [ + -75.56396484375, + 40.197757023665446 + ], + [ + -75.574951171875, + 40.19565909336464 + ], + [ + -75.59967041015625, + 40.23760536584024 + ], + [ + -75.60791015625, + 40.23760536584024 + ], + [ + -75.60516357421875, + 40.22712123211298 + ], + [ + -75.6134033203125, + 40.22502421060497 + ], + [ + -75.65185546875, + 40.243895066997766 + ], + [ + -75.67108154296875, + 40.245991504199026 + ], + [ + -75.6903076171875, + 40.23760536584024 + ], + [ + -75.69854736328125, + 40.243895066997766 + ], + [ + -75.531005859375, + 40.449037195237594 + ], + [ + -75.01739501953125, + 40.13899044275823 + ] + ] + ] + }, + "type": "Feature", + "properties": { + "id": "42091", + "name": "Montgomery County", + "pop_density": 5992.125506526473 + }, + "id": 18, + "source": "us-counties", + "sourceLayer": "counties", + "state": {} + } +] \ No newline at end of file diff --git a/metrics/integration/query-tests/fill-translate/literal/style.json b/metrics/integration/query-tests/fill-translate/literal/style.json new file mode 100644 index 00000000000..b773d406932 --- /dev/null +++ b/metrics/integration/query-tests/fill-translate/literal/style.json @@ -0,0 +1,44 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 500, + "height": 500, + "queryGeometry": [ + 136, + 231 + ] + } + }, + "center": [ + -74.522, + 39.92 + ], + "zoom": 8, + "sources": { + "us-counties": { + "type": "vector", + "maxzoom": 7, + "minzoom": 7, + "tiles": [ + "local://tiles/counties-{z}-{x}-{y}.mvt" + ] + } + }, + "layers": [ + { + "id": "counties", + "type": "fill", + "source": "us-counties", + "source-layer": "counties", + "paint": { + "fill-translate": [ + 100, + 100 + ], + "fill-outline-color": "white" + }, + "interactive": true + } + ] +} \ No newline at end of file diff --git a/metrics/integration/query-tests/fill-translate/multiple-layers/expected.json b/metrics/integration/query-tests/fill-translate/multiple-layers/expected.json new file mode 100644 index 00000000000..a9d7bf3b86a --- /dev/null +++ b/metrics/integration/query-tests/fill-translate/multiple-layers/expected.json @@ -0,0 +1,36 @@ +[ + { + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + 0, + 0 + ], + [ + 0, + 10.012129557908153 + ], + [ + 10.01953125, + 10.012129557908153 + ], + [ + 10.01953125, + 0 + ], + [ + 0, + 0 + ] + ] + ] + }, + "type": "Feature", + "properties": {}, + "id": 1, + "source": "mapbox", + "state": {} + } +] diff --git a/metrics/integration/query-tests/fill-translate/multiple-layers/style.json b/metrics/integration/query-tests/fill-translate/multiple-layers/style.json new file mode 100644 index 00000000000..e444a0c3de3 --- /dev/null +++ b/metrics/integration/query-tests/fill-translate/multiple-layers/style.json @@ -0,0 +1,55 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 50, + "height": 50, + "queryGeometry": [ + 20, 30 + ] + } + }, + "sources": { + "mapbox": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "id": 1, + "type": "Feature", + "geometry": { + "type": "Polygon", + "coordinates": [[ + [0, 0], + [0, 10], + [10, 10], + [10, 0], + [0, 0] + ]] + } + } + ] + } + } + }, + "layers": [ + { + "id": "original-fill", + "type": "fill", + "source": "mapbox", + "paint": { + "fill-color": "red" + } + }, + { + "id": "offset-fill", + "type": "fill", + "source": "mapbox", + "paint": { + "fill-color": "white", + "fill-translate": [-15, 15] + } + } + ] +} diff --git a/metrics/integration/query-tests/fill/default/expected.json b/metrics/integration/query-tests/fill/default/expected.json new file mode 100644 index 00000000000..71bdfd35d69 --- /dev/null +++ b/metrics/integration/query-tests/fill/default/expected.json @@ -0,0 +1,165 @@ +[ + { + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -74.9652099609375, + 40.117990048904744 + ], + [ + -74.96795654296875, + 40.109588074741396 + ], + [ + -74.95697021484375, + 40.096983167279575 + ], + [ + -74.959716796875, + 40.08437592451517 + ], + [ + -74.9871826171875, + 40.05705222132201 + ], + [ + -74.9761962890625, + 40.04864272291729 + ], + [ + -75.00091552734375, + 40.029717557833266 + ], + [ + -75.047607421875, + 40.01078714046551 + ], + [ + -75.07781982421875, + 39.979224774767346 + ], + [ + -75.1080322265625, + 39.97291055131899 + ], + [ + -75.13275146484375, + 39.95817509460008 + ], + [ + -75.13824462890625, + 39.93501296038255 + ], + [ + -75.1300048828125, + 39.90973623453718 + ], + [ + -75.13275146484375, + 39.8992015115692 + ], + [ + -75.146484375, + 39.88655770592848 + ], + [ + -75.1904296875, + 39.882342585755765 + ], + [ + -75.21240234375, + 39.86758762451021 + ], + [ + -75.2178955078125, + 39.87812720644828 + ], + [ + -75.24261474609375, + 39.873911568012915 + ], + [ + -75.26458740234375, + 39.87812720644828 + ], + [ + -75.267333984375, + 39.88866516883712 + ], + [ + -75.23712158203125, + 39.93922484079195 + ], + [ + -75.25360107421875, + 39.94975340768178 + ], + [ + -75.24810791015625, + 39.96449067924024 + ], + [ + -75.267333984375, + 39.966595744487506 + ], + [ + -75.28106689453125, + 39.97501535728992 + ], + [ + -75.2069091796875, + 40.012890779526145 + ], + [ + -75.26458740234375, + 40.0549499439995 + ], + [ + -75.22613525390625, + 40.09488212232117 + ], + [ + -75.1904296875, + 40.07386810509482 + ], + [ + -75.17669677734375, + 40.08647729380883 + ], + [ + -75.11077880859375, + 40.04654018618777 + ], + [ + -75.08880615234375, + 40.06546068206555 + ], + [ + -75.0970458984375, + 40.069664523297774 + ], + [ + -75.01739501953125, + 40.13899044275823 + ], + [ + -74.9652099609375, + 40.117990048904744 + ] + ] + ] + }, + "type": "Feature", + "properties": { + "id": "42101", + "name": "Philadelphia County", + "pop_density": 39142.52658375366 + }, + "id": 25, + "source": "us-counties", + "sourceLayer": "counties", + "state": {} + } +] \ No newline at end of file diff --git a/metrics/integration/query-tests/fill/default/style.json b/metrics/integration/query-tests/fill/default/style.json new file mode 100644 index 00000000000..2b7411099af --- /dev/null +++ b/metrics/integration/query-tests/fill/default/style.json @@ -0,0 +1,40 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 500, + "height": 500, + "queryGeometry": [ + 136, + 231 + ] + } + }, + "center": [ + -74.522, + 39.92 + ], + "zoom": 7, + "sources": { + "us-counties": { + "type": "vector", + "maxzoom": 7, + "minzoom": 7, + "tiles": [ + "local://tiles/counties-{z}-{x}-{y}.mvt" + ] + } + }, + "layers": [ + { + "id": "counties", + "type": "fill", + "source": "us-counties", + "source-layer": "counties", + "paint": { + "fill-outline-color": "white" + }, + "interactive": true + } + ] +} \ No newline at end of file diff --git a/metrics/integration/query-tests/fill/fill-pattern/expected.json b/metrics/integration/query-tests/fill/fill-pattern/expected.json new file mode 100644 index 00000000000..ff50d6760c2 --- /dev/null +++ b/metrics/integration/query-tests/fill/fill-pattern/expected.json @@ -0,0 +1,165 @@ +[ + { + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -74.9652099609375, + 40.117990048904744 + ], + [ + -74.96795654296875, + 40.109588074741396 + ], + [ + -74.95697021484375, + 40.096983167279575 + ], + [ + -74.959716796875, + 40.08437592451517 + ], + [ + -74.9871826171875, + 40.05705222132201 + ], + [ + -74.9761962890625, + 40.04864272291729 + ], + [ + -75.00091552734375, + 40.029717557833266 + ], + [ + -75.047607421875, + 40.01078714046551 + ], + [ + -75.07781982421875, + 39.979224774767346 + ], + [ + -75.1080322265625, + 39.97291055131899 + ], + [ + -75.13275146484375, + 39.95817509460008 + ], + [ + -75.13824462890625, + 39.93501296038252 + ], + [ + -75.1300048828125, + 39.90973623453718 + ], + [ + -75.13275146484375, + 39.8992015115692 + ], + [ + -75.146484375, + 39.88655770592845 + ], + [ + -75.1904296875, + 39.88234258575574 + ], + [ + -75.21240234375, + 39.86758762451021 + ], + [ + -75.2178955078125, + 39.87812720644828 + ], + [ + -75.24261474609375, + 39.873911568012915 + ], + [ + -75.26458740234375, + 39.87812720644828 + ], + [ + -75.267333984375, + 39.88866516883712 + ], + [ + -75.23712158203125, + 39.93922484079195 + ], + [ + -75.25360107421875, + 39.94975340768178 + ], + [ + -75.24810791015625, + 39.96449067924027 + ], + [ + -75.267333984375, + 39.966595744487506 + ], + [ + -75.28106689453125, + 39.97501535728992 + ], + [ + -75.2069091796875, + 40.012890779526145 + ], + [ + -75.26458740234375, + 40.054949943999475 + ], + [ + -75.22613525390625, + 40.09488212232117 + ], + [ + -75.1904296875, + 40.07386810509482 + ], + [ + -75.17669677734375, + 40.08647729380883 + ], + [ + -75.11077880859375, + 40.04654018618777 + ], + [ + -75.08880615234375, + 40.06546068206555 + ], + [ + -75.0970458984375, + 40.069664523297774 + ], + [ + -75.01739501953125, + 40.13899044275823 + ], + [ + -74.9652099609375, + 40.117990048904744 + ] + ] + ] + }, + "type": "Feature", + "properties": { + "id": "42101", + "name": "Philadelphia County", + "pop_density": 39142.52658375366 + }, + "id": 25, + "source": "us-counties", + "sourceLayer": "counties", + "state": {} + } +] \ No newline at end of file diff --git a/metrics/integration/query-tests/fill/fill-pattern/style.json b/metrics/integration/query-tests/fill/fill-pattern/style.json new file mode 100644 index 00000000000..330e0204e1f --- /dev/null +++ b/metrics/integration/query-tests/fill/fill-pattern/style.json @@ -0,0 +1,41 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 500, + "height": 500, + "queryGeometry": [ + 136, + 231 + ] + } + }, + "center": [ + -74.522, + 39.92 + ], + "sprite": "local://sprites/emerald", + "zoom": 7, + "sources": { + "us-counties": { + "type": "vector", + "maxzoom": 7, + "minzoom": 7, + "tiles": [ + "local://tiles/counties-{z}-{x}-{y}.mvt" + ] + } + }, + "layers": [ + { + "id": "counties", + "type": "fill", + "source": "us-counties", + "source-layer": "counties", + "paint": { + "fill-pattern": "cemetery_icon" + }, + "interactive": true + } + ] +} diff --git a/metrics/integration/query-tests/fill/overscaled/expected.json b/metrics/integration/query-tests/fill/overscaled/expected.json new file mode 100644 index 00000000000..cb737473618 --- /dev/null +++ b/metrics/integration/query-tests/fill/overscaled/expected.json @@ -0,0 +1,321 @@ +[ + { + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -74.52850341796875, + 39.56970506644248 + ], + [ + -74.54498291015625, + 39.58029027440864 + ], + [ + -74.542236328125, + 39.586640623314594 + ], + [ + -74.55322265625, + 39.59933957529532 + ], + [ + -74.57794189453125, + 39.59933957529532 + ], + [ + -74.58892822265625, + 39.612036199336956 + ], + [ + -74.6246337890625, + 39.62684598486689 + ], + [ + -74.63287353515625, + 39.62049932196811 + ], + [ + -74.6356201171875, + 39.62896140981414 + ], + [ + -74.6575927734375, + 39.62896140981414 + ], + [ + -74.66033935546875, + 39.66914219401812 + ], + [ + -74.6685791015625, + 39.68393975392732 + ], + [ + -74.77294921875, + 39.751545363937595 + ], + [ + -74.80865478515625, + 39.785323314592574 + ], + [ + -74.8388671875, + 39.79165483525341 + ], + [ + -74.8773193359375, + 39.78321267821704 + ], + [ + -74.89654541015625, + 39.785323314592574 + ], + [ + -74.90478515625, + 39.79165483525341 + ], + [ + -74.9322509765625, + 39.88866516883712 + ], + [ + -74.95147705078125, + 39.8992015115692 + ], + [ + -74.9652099609375, + 39.92026933763398 + ], + [ + -74.98443603515625, + 39.92869465373238 + ], + [ + -74.9761962890625, + 39.9413306837869 + ], + [ + -75.01739501953125, + 39.947647823922495 + ], + [ + -75.0146484375, + 39.95817509460008 + ], + [ + -75.0201416015625, + 39.96870074491696 + ], + [ + -75.01190185546875, + 39.981329386272165 + ], + [ + -75.0201416015625, + 39.98974718404571 + ], + [ + -75.03387451171875, + 39.99185147142347 + ], + [ + -75.03662109375, + 39.9981639445858 + ], + [ + -75.06134033203125, + 39.99185147142347 + ], + [ + -75.047607421875, + 40.01078714046551 + ], + [ + -75.0146484375, + 40.02130468739708 + ], + [ + -74.96795654296875, + 40.05284760182397 + ], + [ + -74.92950439453125, + 40.071766346626106 + ], + [ + -74.90753173828125, + 40.071766346626106 + ], + [ + -74.86358642578125, + 40.08437592451517 + ], + [ + -74.8553466796875, + 40.09488212232117 + ], + [ + -74.8388671875, + 40.10118506258701 + ], + [ + -74.82513427734375, + 40.128491056854074 + ], + [ + -74.78668212890625, + 40.12219064672337 + ], + [ + -74.761962890625, + 40.13479088304851 + ], + [ + -74.74273681640625, + 40.1368906953459 + ], + [ + -74.72076416015625, + 40.14948820651523 + ], + [ + -74.70428466796875, + 40.17047886718112 + ], + [ + -74.7125244140625, + 40.168380093142446 + ], + [ + -74.7125244140625, + 40.180971763887186 + ], + [ + -74.70428466796875, + 40.18516846826054 + ], + [ + -74.67681884765625, + 40.17467622056341 + ], + [ + -74.6795654296875, + 40.16628125420655 + ], + [ + -74.6630859375, + 40.16628125420655 + ], + [ + -74.6356201171875, + 40.14948820651523 + ], + [ + -74.6246337890625, + 40.14948820651523 + ], + [ + -74.6246337890625, + 40.14318974292439 + ], + [ + -74.6026611328125, + 40.1368906953459 + ], + [ + -74.58892822265625, + 40.13899044275823 + ], + [ + -74.39117431640625, + 39.77476948529548 + ], + [ + -74.39117431640625, + 39.59722324495564 + ], + [ + -74.40216064453125, + 39.57393934359189 + ], + [ + -74.42138671875, + 39.56970506644248 + ], + [ + -74.41864013671875, + 39.55911824217185 + ], + [ + -74.44061279296875, + 39.55488305992401 + ], + [ + -74.4378662109375, + 39.54217596171196 + ], + [ + -74.44610595703125, + 39.546411919686705 + ], + [ + -74.443359375, + 39.557000683371285 + ], + [ + -74.454345703125, + 39.55911824217185 + ], + [ + -74.45709228515625, + 39.54852980171148 + ], + [ + -74.46533203125, + 39.557000683371285 + ], + [ + -74.476318359375, + 39.552765371831015 + ], + [ + -74.48455810546875, + 39.55911824217185 + ], + [ + -74.49554443359375, + 39.557000683371285 + ], + [ + -74.5037841796875, + 39.56970506644248 + ], + [ + -74.51202392578125, + 39.56970506644248 + ], + [ + -74.51751708984375, + 39.57393934359189 + ], + [ + -74.52850341796875, + 39.56970506644248 + ] + ] + ] + }, + "type": "Feature", + "properties": { + "id": "34005", + "name": "Burlington County", + "pop_density": 2007.2920458152796 + }, + "id": 33, + "source": "us-counties", + "sourceLayer": "counties", + "state": {} + } +] \ No newline at end of file diff --git a/metrics/integration/query-tests/fill/overscaled/style.json b/metrics/integration/query-tests/fill/overscaled/style.json new file mode 100644 index 00000000000..b7baf51069a --- /dev/null +++ b/metrics/integration/query-tests/fill/overscaled/style.json @@ -0,0 +1,40 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 500, + "height": 500, + "queryGeometry": [ + 136, + 231 + ] + } + }, + "center": [ + -74.522, + 39.92 + ], + "zoom": 8, + "sources": { + "us-counties": { + "type": "vector", + "maxzoom": 7, + "minzoom": 7, + "tiles": [ + "local://tiles/counties-{z}-{x}-{y}.mvt" + ] + } + }, + "layers": [ + { + "id": "counties", + "type": "fill", + "source": "us-counties", + "source-layer": "counties", + "paint": { + "fill-outline-color": "white" + }, + "interactive": true + } + ] +} \ No newline at end of file diff --git a/metrics/integration/query-tests/geometry/linestring/expected.json b/metrics/integration/query-tests/geometry/linestring/expected.json new file mode 100644 index 00000000000..efe6e550d10 --- /dev/null +++ b/metrics/integration/query-tests/geometry/linestring/expected.json @@ -0,0 +1,21 @@ +[ + { + "geometry": { + "type": "LineString", + "coordinates": [ + [ + 0, + 0 + ], + [ + 45, + 44.99588261816547 + ] + ] + }, + "type": "Feature", + "properties": {}, + "source": "geojson", + "state": {} + } +] \ No newline at end of file diff --git a/metrics/integration/query-tests/geometry/linestring/style.json b/metrics/integration/query-tests/geometry/linestring/style.json new file mode 100644 index 00000000000..9d4baa8a97f --- /dev/null +++ b/metrics/integration/query-tests/geometry/linestring/style.json @@ -0,0 +1,49 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 512, + "height": 512, + "debug": true, + "queryGeometry": [ + [ + 0, + 0 + ], + [ + 512, + 512 + ] + ] + } + }, + "center": [ + 0, + 0 + ], + "zoom": 0, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "LineString", + "coordinates": [ + [ + 0, + 0 + ], [ + 45, + 45 + ] + ] + } + } + }, + "layers": [ + { + "id": "circles", + "type": "line", + "source": "geojson" + } + ] +} \ No newline at end of file diff --git a/metrics/integration/query-tests/geometry/multilinestring/expected.json b/metrics/integration/query-tests/geometry/multilinestring/expected.json new file mode 100644 index 00000000000..589e09a4c3f --- /dev/null +++ b/metrics/integration/query-tests/geometry/multilinestring/expected.json @@ -0,0 +1,33 @@ +[ + { + "geometry": { + "type": "MultiLineString", + "coordinates": [ + [ + [ + 0, + 0 + ], + [ + 45, + 44.99588261816547 + ] + ], + [ + [ + -5.009765625, + -5.003394345022144 + ], + [ + -45, + -44.99588261816546 + ] + ] + ] + }, + "type": "Feature", + "properties": {}, + "source": "geojson", + "state": {} + } +] \ No newline at end of file diff --git a/metrics/integration/query-tests/geometry/multilinestring/style.json b/metrics/integration/query-tests/geometry/multilinestring/style.json new file mode 100644 index 00000000000..e88f7a112e3 --- /dev/null +++ b/metrics/integration/query-tests/geometry/multilinestring/style.json @@ -0,0 +1,62 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 512, + "height": 512, + "debug": true, + "queryGeometry": [ + [ + 0, + 0 + ], + [ + 512, + 512 + ] + ] + } + }, + "center": [ + 0, + 0 + ], + "zoom": 0, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "MultiLineString", + "coordinates": [ + [ + [ + 0, + 0 + ], + [ + 45, + 45 + ] + ], + [ + [ + -5, + -5 + ], + [ + -45, + -45 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "circles", + "type": "line", + "source": "geojson" + } + ] +} \ No newline at end of file diff --git a/metrics/integration/query-tests/geometry/multipoint/expected.json b/metrics/integration/query-tests/geometry/multipoint/expected.json new file mode 100644 index 00000000000..65c1e48dc7a --- /dev/null +++ b/metrics/integration/query-tests/geometry/multipoint/expected.json @@ -0,0 +1,21 @@ +[ + { + "geometry": { + "type": "MultiPoint", + "coordinates": [ + [ + 0, + 0 + ], + [ + 10.01953125, + 10.012129557908153 + ] + ] + }, + "type": "Feature", + "properties": {}, + "source": "geojson", + "state": {} + } +] \ No newline at end of file diff --git a/metrics/integration/query-tests/geometry/multipoint/style.json b/metrics/integration/query-tests/geometry/multipoint/style.json new file mode 100644 index 00000000000..c89bce6d7fd --- /dev/null +++ b/metrics/integration/query-tests/geometry/multipoint/style.json @@ -0,0 +1,50 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 512, + "height": 512, + "debug": true, + "queryGeometry": [ + [ + 0, + 0 + ], + [ + 512, + 512 + ] + ] + } + }, + "center": [ + 0, + 0 + ], + "zoom": 0, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "MultiPoint", + "coordinates": [ + [ + 0, + 0 + ], + [ + 10, + 10 + ] + ] + } + } + }, + "layers": [ + { + "id": "circles", + "type": "circle", + "source": "geojson" + } + ] +} \ No newline at end of file diff --git a/metrics/integration/query-tests/geometry/multipolygon/expected.json b/metrics/integration/query-tests/geometry/multipolygon/expected.json new file mode 100644 index 00000000000..5e9ba38e6f6 --- /dev/null +++ b/metrics/integration/query-tests/geometry/multipolygon/expected.json @@ -0,0 +1,61 @@ +[ + { + "geometry": { + "type": "MultiPolygon", + "coordinates": [ + [ + [ + [ + -30.0146484375, + 29.993002284551082 + ], + [ + 30.0146484375, + 29.993002284551082 + ], + [ + 30.0146484375, + -29.993002284551068 + ], + [ + -30.0146484375, + -29.993002284551068 + ], + [ + -30.0146484375, + 29.993002284551082 + ] + ] + ], + [ + [ + [ + -14.9853515625, + 14.987239525774243 + ], + [ + 14.9853515625, + 14.987239525774243 + ], + [ + 14.9853515625, + -14.987239525774243 + ], + [ + -14.9853515625, + -14.987239525774243 + ], + [ + -14.9853515625, + 14.987239525774243 + ] + ] + ] + ] + }, + "type": "Feature", + "properties": {}, + "source": "geojson", + "state": {} + } +] \ No newline at end of file diff --git a/metrics/integration/query-tests/geometry/multipolygon/style.json b/metrics/integration/query-tests/geometry/multipolygon/style.json new file mode 100644 index 00000000000..f01cb99aeb0 --- /dev/null +++ b/metrics/integration/query-tests/geometry/multipolygon/style.json @@ -0,0 +1,90 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 512, + "height": 512, + "debug": true, + "queryGeometry": [ + [ + 0, + 0 + ], + [ + 512, + 512 + ] + ] + } + }, + "center": [ + 0, + 0 + ], + "zoom": 0, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "MultiPolygon", + "coordinates": [ + [ + [ + [ + -30, + 30 + ], + [ + 30, + 30 + ], + [ + 30, + -30 + ], + [ + -30, + -30 + ], + [ + -30, + 30 + ] + ] + ], + [ + [ + [ + -15, + 15 + ], + [ + 15, + 15 + ], + [ + 15, + -15 + ], + [ + -15, + -15 + ], + [ + -15, + 15 + ] + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "circles", + "type": "fill", + "source": "geojson" + } + ] +} \ No newline at end of file diff --git a/metrics/integration/query-tests/geometry/point/expected.json b/metrics/integration/query-tests/geometry/point/expected.json new file mode 100644 index 00000000000..5387f9c0317 --- /dev/null +++ b/metrics/integration/query-tests/geometry/point/expected.json @@ -0,0 +1,15 @@ +[ + { + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + }, + "type": "Feature", + "properties": {}, + "source": "geojson", + "state": {} + } +] \ No newline at end of file diff --git a/metrics/integration/query-tests/geometry/point/style.json b/metrics/integration/query-tests/geometry/point/style.json new file mode 100644 index 00000000000..d6daba69808 --- /dev/null +++ b/metrics/integration/query-tests/geometry/point/style.json @@ -0,0 +1,44 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 512, + "height": 512, + "debug": true, + "queryGeometry": [ + [ + 0, + 0 + ], + [ + 512, + 512 + ] + ] + } + }, + "center": [ + 0, + 0 + ], + "zoom": 0, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "layers": [ + { + "id": "circles", + "type": "circle", + "source": "geojson" + } + ] +} \ No newline at end of file diff --git a/metrics/integration/query-tests/geometry/polygon/expected.json b/metrics/integration/query-tests/geometry/polygon/expected.json new file mode 100644 index 00000000000..3f6f6af9493 --- /dev/null +++ b/metrics/integration/query-tests/geometry/polygon/expected.json @@ -0,0 +1,57 @@ +[ + { + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -30.0146484375, + 29.993002284551082 + ], + [ + 30.0146484375, + 29.993002284551082 + ], + [ + 30.0146484375, + -29.993002284551068 + ], + [ + -30.0146484375, + -29.993002284551068 + ], + [ + -30.0146484375, + 29.993002284551082 + ] + ], + [ + [ + -14.9853515625, + 14.987239525774243 + ], + [ + -14.9853515625, + -14.987239525774243 + ], + [ + 14.9853515625, + -14.987239525774243 + ], + [ + 14.9853515625, + 14.987239525774243 + ], + [ + -14.9853515625, + 14.987239525774243 + ] + ] + ] + }, + "type": "Feature", + "properties": {}, + "source": "geojson", + "state": {} + } +] \ No newline at end of file diff --git a/metrics/integration/query-tests/geometry/polygon/style.json b/metrics/integration/query-tests/geometry/polygon/style.json new file mode 100644 index 00000000000..85e88ee5481 --- /dev/null +++ b/metrics/integration/query-tests/geometry/polygon/style.json @@ -0,0 +1,86 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 512, + "height": 512, + "debug": true, + "queryGeometry": [ + [ + 0, + 0 + ], + [ + 512, + 512 + ] + ] + } + }, + "center": [ + 0, + 0 + ], + "zoom": 0, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -30, + 30 + ], + [ + 30, + 30 + ], + [ + 30, + -30 + ], + [ + -30, + -30 + ], + [ + -30, + 30 + ] + ], + [ + [ + -15, + 15 + ], + [ + 15, + 15 + ], + [ + 15, + -15 + ], + [ + -15, + -15 + ], + [ + -15, + 15 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "circles", + "type": "fill", + "source": "geojson" + } + ] +} \ No newline at end of file diff --git a/metrics/integration/query-tests/invisible-features/visibility-none/expected.json b/metrics/integration/query-tests/invisible-features/visibility-none/expected.json new file mode 100644 index 00000000000..0637a088a01 --- /dev/null +++ b/metrics/integration/query-tests/invisible-features/visibility-none/expected.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/metrics/integration/query-tests/invisible-features/visibility-none/style.json b/metrics/integration/query-tests/invisible-features/visibility-none/style.json new file mode 100644 index 00000000000..5247a4843a1 --- /dev/null +++ b/metrics/integration/query-tests/invisible-features/visibility-none/style.json @@ -0,0 +1,48 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 100, + "height": 100, + "queryGeometry": [ + 50, + 50 + ] + } + }, + "center": [ + 0, 0 + ], + "zoom": 5, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [-1.0, -1.0], + [1.0, -1.0], + [1.0, 1.0], + [-1.0, 1.0], + [-1.0, -1.0] + ] + ] + } + } + } + }, + "layers": [ + { + "id": "invisible", + "type": "fill", + "source": "geojson", + "layout": { + "visibility": "none" + } + } + ] +} diff --git a/metrics/integration/query-tests/invisible-features/zero-opacity/expected.json b/metrics/integration/query-tests/invisible-features/zero-opacity/expected.json new file mode 100644 index 00000000000..5c19c19f907 --- /dev/null +++ b/metrics/integration/query-tests/invisible-features/zero-opacity/expected.json @@ -0,0 +1,35 @@ +[ + { + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -0.999755859375, + -0.99970513084196 + ], + [ + -0.999755859375, + 0.9997051308419742 + ], + [ + 0.999755859375, + 0.9997051308419742 + ], + [ + 0.999755859375, + -0.99970513084196 + ], + [ + -0.999755859375, + -0.99970513084196 + ] + ] + ] + }, + "type": "Feature", + "properties": {}, + "source": "geojson", + "state": {} + } +] \ No newline at end of file diff --git a/metrics/integration/query-tests/invisible-features/zero-opacity/style.json b/metrics/integration/query-tests/invisible-features/zero-opacity/style.json new file mode 100644 index 00000000000..82318aa1d76 --- /dev/null +++ b/metrics/integration/query-tests/invisible-features/zero-opacity/style.json @@ -0,0 +1,48 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 100, + "height": 100, + "queryGeometry": [ + 50, + 50 + ] + } + }, + "center": [ + 0, 0 + ], + "zoom": 5, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [-1.0, -1.0], + [1.0, -1.0], + [1.0, 1.0], + [-1.0, 1.0], + [-1.0, -1.0] + ] + ] + } + } + } + }, + "layers": [ + { + "id": "invisible", + "type": "fill", + "source": "geojson", + "paint": { + "fill-opacity": 0 + } + } + ] +} 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 new file mode 100644 index 00000000000..41d8c6908f8 --- /dev/null +++ b/metrics/integration/query-tests/line-gap-width/feature-state/expected.json @@ -0,0 +1,13 @@ +[ + { + "type": "Feature", + "id": 1, + "geometry": { + "type": "LineString", + "coordinates": [ [0, 0], [5.009765625,14.987239525774243] ] + }, + "properties": {}, + "source": "mapbox", + "state": { "big": true } + } +] \ No newline at end of file diff --git a/metrics/integration/query-tests/line-gap-width/feature-state/style.json b/metrics/integration/query-tests/line-gap-width/feature-state/style.json new file mode 100644 index 00000000000..97ed56097bb --- /dev/null +++ b/metrics/integration/query-tests/line-gap-width/feature-state/style.json @@ -0,0 +1,61 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "wait" + ], + [ + "setFeatureState", + { "source": "mapbox", "id": 1}, + { "big": true } + ], + [ + "wait" + ] + ], + "queryGeometry": [ + 32, + 16 + ] + } + }, + "sources": { + "mapbox": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "id": 1, + "type": "Feature", + "geometry": { + "type": "LineString", + "coordinates": [ + [ 0, 0], + [ 5, 15] + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "line", + "type": "line", + "source": "mapbox", + "paint": { + "line-gap-width": ["case", + ["boolean", ["feature-state", "big"], false], + ["number", 20], + ["number", 1] + ] + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/query-tests/line-gap-width/inside-fractional/expected.json b/metrics/integration/query-tests/line-gap-width/inside-fractional/expected.json new file mode 100644 index 00000000000..857968f2f03 --- /dev/null +++ b/metrics/integration/query-tests/line-gap-width/inside-fractional/expected.json @@ -0,0 +1,161 @@ +[ + { + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -74.26483154296875, + 40.168380093142446 + ], + [ + -74.25933837890625, + 40.16208338164617 + ], + [ + -74.2620849609375, + 40.14948820651523 + ], + [ + -74.25384521484375, + 40.14738878354049 + ], + [ + -74.24285888671875, + 40.1305910638018 + ], + [ + -74.24560546875, + 40.117990048904744 + ], + [ + -74.23187255859375, + 40.109588074741396 + ], + [ + -74.20440673828125, + 40.11378919157522 + ], + [ + -74.16046142578125, + 40.107487419012415 + ], + [ + -74.1522216796875, + 40.099084147368444 + ], + [ + -74.1082763671875, + 40.13899044275823 + ], + [ + -74.09454345703125, + 40.109588074741396 + ], + [ + -74.07257080078125, + 40.09067983779909 + ], + [ + -74.0478515625, + 40.10538669840983 + ], + [ + -73.9654541015625, + 40.099084147368444 + ], + [ + -74.00115966796875, + 39.97712009843963 + ], + [ + -74.03411865234375, + 39.77054750039528 + ], + [ + -74.04510498046875, + 39.73676229957945 + ], + [ + -74.0972900390625, + 39.650112101863726 + ], + [ + -74.234619140625, + 39.47648555419738 + ], + [ + -74.29779052734375, + 39.47648555419738 + ], + [ + -74.31427001953125, + 39.50192146626986 + ], + [ + -74.3280029296875, + 39.508278990341125 + ], + [ + -74.3829345703125, + 39.499802162332884 + ], + [ + -74.4049072265625, + 39.54005788576376 + ], + [ + -74.41864013671875, + 39.55064761909321 + ], + [ + -74.4158935546875, + 39.563353165829284 + ], + [ + -74.42138671875, + 39.56970506644248 + ], + [ + -74.40216064453125, + 39.57393934359189 + ], + [ + -74.39117431640625, + 39.59722324495564 + ], + [ + -74.39117431640625, + 39.77476948529548 + ], + [ + -74.55322265625, + 40.08017299133499 + ], + [ + -74.52850341796875, + 40.09067983779909 + ], + [ + -74.40765380859375, + 40.172577576321686 + ], + [ + -74.26483154296875, + 40.168380093142446 + ] + ] + ] + }, + "type": "Feature", + "properties": { + "id": "34029", + "name": "Ocean County", + "pop_density": 2310.250993696356 + }, + "id": 49, + "source": "us-counties", + "sourceLayer": "counties", + "state": {} + } +] \ No newline at end of file diff --git a/metrics/integration/query-tests/line-gap-width/inside-fractional/style.json b/metrics/integration/query-tests/line-gap-width/inside-fractional/style.json new file mode 100644 index 00000000000..b985748c420 --- /dev/null +++ b/metrics/integration/query-tests/line-gap-width/inside-fractional/style.json @@ -0,0 +1,41 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 500, + "height": 500, + "queryGeometry": [ + 408, + 250 + ] + } + }, + "center": [ + -74.522, + 39.92 + ], + "zoom": 7.8, + "sources": { + "us-counties": { + "type": "vector", + "maxzoom": 7, + "minzoom": 7, + "tiles": [ + "local://tiles/counties-{z}-{x}-{y}.mvt" + ] + } + }, + "layers": [ + { + "id": "counties", + "type": "line", + "source": "us-counties", + "source-layer": "counties", + "paint": { + "line-width": 2, + "line-gap-width": 6 + }, + "interactive": true + } + ] +} \ No newline at end of file diff --git a/metrics/integration/query-tests/line-gap-width/inside/expected.json b/metrics/integration/query-tests/line-gap-width/inside/expected.json new file mode 100644 index 00000000000..857968f2f03 --- /dev/null +++ b/metrics/integration/query-tests/line-gap-width/inside/expected.json @@ -0,0 +1,161 @@ +[ + { + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -74.26483154296875, + 40.168380093142446 + ], + [ + -74.25933837890625, + 40.16208338164617 + ], + [ + -74.2620849609375, + 40.14948820651523 + ], + [ + -74.25384521484375, + 40.14738878354049 + ], + [ + -74.24285888671875, + 40.1305910638018 + ], + [ + -74.24560546875, + 40.117990048904744 + ], + [ + -74.23187255859375, + 40.109588074741396 + ], + [ + -74.20440673828125, + 40.11378919157522 + ], + [ + -74.16046142578125, + 40.107487419012415 + ], + [ + -74.1522216796875, + 40.099084147368444 + ], + [ + -74.1082763671875, + 40.13899044275823 + ], + [ + -74.09454345703125, + 40.109588074741396 + ], + [ + -74.07257080078125, + 40.09067983779909 + ], + [ + -74.0478515625, + 40.10538669840983 + ], + [ + -73.9654541015625, + 40.099084147368444 + ], + [ + -74.00115966796875, + 39.97712009843963 + ], + [ + -74.03411865234375, + 39.77054750039528 + ], + [ + -74.04510498046875, + 39.73676229957945 + ], + [ + -74.0972900390625, + 39.650112101863726 + ], + [ + -74.234619140625, + 39.47648555419738 + ], + [ + -74.29779052734375, + 39.47648555419738 + ], + [ + -74.31427001953125, + 39.50192146626986 + ], + [ + -74.3280029296875, + 39.508278990341125 + ], + [ + -74.3829345703125, + 39.499802162332884 + ], + [ + -74.4049072265625, + 39.54005788576376 + ], + [ + -74.41864013671875, + 39.55064761909321 + ], + [ + -74.4158935546875, + 39.563353165829284 + ], + [ + -74.42138671875, + 39.56970506644248 + ], + [ + -74.40216064453125, + 39.57393934359189 + ], + [ + -74.39117431640625, + 39.59722324495564 + ], + [ + -74.39117431640625, + 39.77476948529548 + ], + [ + -74.55322265625, + 40.08017299133499 + ], + [ + -74.52850341796875, + 40.09067983779909 + ], + [ + -74.40765380859375, + 40.172577576321686 + ], + [ + -74.26483154296875, + 40.168380093142446 + ] + ] + ] + }, + "type": "Feature", + "properties": { + "id": "34029", + "name": "Ocean County", + "pop_density": 2310.250993696356 + }, + "id": 49, + "source": "us-counties", + "sourceLayer": "counties", + "state": {} + } +] \ No newline at end of file diff --git a/metrics/integration/query-tests/line-gap-width/inside/style.json b/metrics/integration/query-tests/line-gap-width/inside/style.json new file mode 100644 index 00000000000..bbf63def909 --- /dev/null +++ b/metrics/integration/query-tests/line-gap-width/inside/style.json @@ -0,0 +1,41 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 500, + "height": 500, + "queryGeometry": [ + 339, + 250 + ] + } + }, + "center": [ + -74.522, + 39.92 + ], + "zoom": 7, + "sources": { + "us-counties": { + "type": "vector", + "maxzoom": 7, + "minzoom": 7, + "tiles": [ + "local://tiles/counties-{z}-{x}-{y}.mvt" + ] + } + }, + "layers": [ + { + "id": "counties", + "type": "line", + "source": "us-counties", + "source-layer": "counties", + "paint": { + "line-width": 2, + "line-gap-width": 6 + }, + "interactive": true + } + ] +} \ No newline at end of file diff --git a/metrics/integration/query-tests/line-gap-width/outside-fractional/expected.json b/metrics/integration/query-tests/line-gap-width/outside-fractional/expected.json new file mode 100644 index 00000000000..0637a088a01 --- /dev/null +++ b/metrics/integration/query-tests/line-gap-width/outside-fractional/expected.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/metrics/integration/query-tests/line-gap-width/outside-fractional/style.json b/metrics/integration/query-tests/line-gap-width/outside-fractional/style.json new file mode 100644 index 00000000000..74363ede2fe --- /dev/null +++ b/metrics/integration/query-tests/line-gap-width/outside-fractional/style.json @@ -0,0 +1,41 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 500, + "height": 500, + "queryGeometry": [ + 405, + 250 + ] + } + }, + "center": [ + -74.522, + 39.92 + ], + "zoom": 7.8, + "sources": { + "us-counties": { + "type": "vector", + "maxzoom": 7, + "minzoom": 7, + "tiles": [ + "local://tiles/counties-{z}-{x}-{y}.mvt" + ] + } + }, + "layers": [ + { + "id": "counties", + "type": "line", + "source": "us-counties", + "source-layer": "counties", + "paint": { + "line-width": 2, + "line-gap-width": 6 + }, + "interactive": true + } + ] +} \ No newline at end of file diff --git a/metrics/integration/query-tests/line-gap-width/outside/expected.json b/metrics/integration/query-tests/line-gap-width/outside/expected.json new file mode 100644 index 00000000000..0637a088a01 --- /dev/null +++ b/metrics/integration/query-tests/line-gap-width/outside/expected.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/metrics/integration/query-tests/line-gap-width/outside/style.json b/metrics/integration/query-tests/line-gap-width/outside/style.json new file mode 100644 index 00000000000..b0f6501d9c7 --- /dev/null +++ b/metrics/integration/query-tests/line-gap-width/outside/style.json @@ -0,0 +1,41 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 500, + "height": 500, + "queryGeometry": [ + 336, + 250 + ] + } + }, + "center": [ + -74.522, + 39.92 + ], + "zoom": 7, + "sources": { + "us-counties": { + "type": "vector", + "maxzoom": 7, + "minzoom": 7, + "tiles": [ + "local://tiles/counties-{z}-{x}-{y}.mvt" + ] + } + }, + "layers": [ + { + "id": "counties", + "type": "line", + "source": "us-counties", + "source-layer": "counties", + "paint": { + "line-width": 2, + "line-gap-width": 6 + }, + "interactive": true + } + ] +} \ No newline at end of file diff --git a/metrics/integration/query-tests/line-gap-width/property-function/expected.json b/metrics/integration/query-tests/line-gap-width/property-function/expected.json new file mode 100644 index 00000000000..a9ebbd926df --- /dev/null +++ b/metrics/integration/query-tests/line-gap-width/property-function/expected.json @@ -0,0 +1,23 @@ +[ + { + "geometry": { + "type": "LineString", + "coordinates": [ + [ + 10.01953125, + 10.012129557908153 + ], + [ + 10.01953125, + -10.012129557908125 + ] + ] + }, + "type": "Feature", + "properties": { + "gap": 20 + }, + "source": "geojson", + "state": {} + } +] \ No newline at end of file diff --git a/metrics/integration/query-tests/line-gap-width/property-function/style.json b/metrics/integration/query-tests/line-gap-width/property-function/style.json new file mode 100644 index 00000000000..d26a57df6c1 --- /dev/null +++ b/metrics/integration/query-tests/line-gap-width/property-function/style.json @@ -0,0 +1,56 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "queryGeometry": [ + 32, + 32 + ] + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { "gap": 20 }, + "geometry": { + "type": "LineString", + "coordinates": [ + [10, 10], + [10, -10] + ] + } + }, { + "type": "Feature", + "properties": { "gap": 1 }, + "geometry": { + "type": "LineString", + "coordinates": [ + [-10, 10], + [-10, -10] + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "geojson", + "type": "line", + "source": "geojson", + "paint": { + "line-gap-width": { "property": "gap", "type": "identity" }, + "line-width": 5 + }, + "interactive": 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 new file mode 100644 index 00000000000..41d8c6908f8 --- /dev/null +++ b/metrics/integration/query-tests/line-offset/feature-state/expected.json @@ -0,0 +1,13 @@ +[ + { + "type": "Feature", + "id": 1, + "geometry": { + "type": "LineString", + "coordinates": [ [0, 0], [5.009765625,14.987239525774243] ] + }, + "properties": {}, + "source": "mapbox", + "state": { "big": true } + } +] \ No newline at end of file diff --git a/metrics/integration/query-tests/line-offset/feature-state/style.json b/metrics/integration/query-tests/line-offset/feature-state/style.json new file mode 100644 index 00000000000..e4d38be60c5 --- /dev/null +++ b/metrics/integration/query-tests/line-offset/feature-state/style.json @@ -0,0 +1,62 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "wait" + ], + [ + "setFeatureState", + { "source": "mapbox", "id": 1}, + { "big": true } + ], + [ + "wait" + ] + ], + "queryGeometry": [ + 32, + 16 + ] + } + }, + "sources": { + "mapbox": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "id": 1, + "type": "Feature", + "geometry": { + "type": "LineString", + "coordinates": [ + [ 0, 0], + [ 5, 15] + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "line", + "type": "line", + "source": "mapbox", + "paint": { + "line-width": 10, + "line-offset": ["case", + ["boolean", ["feature-state", "big"], false], + ["number", -5], + ["number", 0] + ] + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/query-tests/line-offset/inside-fractional/expected.json b/metrics/integration/query-tests/line-offset/inside-fractional/expected.json new file mode 100644 index 00000000000..857968f2f03 --- /dev/null +++ b/metrics/integration/query-tests/line-offset/inside-fractional/expected.json @@ -0,0 +1,161 @@ +[ + { + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -74.26483154296875, + 40.168380093142446 + ], + [ + -74.25933837890625, + 40.16208338164617 + ], + [ + -74.2620849609375, + 40.14948820651523 + ], + [ + -74.25384521484375, + 40.14738878354049 + ], + [ + -74.24285888671875, + 40.1305910638018 + ], + [ + -74.24560546875, + 40.117990048904744 + ], + [ + -74.23187255859375, + 40.109588074741396 + ], + [ + -74.20440673828125, + 40.11378919157522 + ], + [ + -74.16046142578125, + 40.107487419012415 + ], + [ + -74.1522216796875, + 40.099084147368444 + ], + [ + -74.1082763671875, + 40.13899044275823 + ], + [ + -74.09454345703125, + 40.109588074741396 + ], + [ + -74.07257080078125, + 40.09067983779909 + ], + [ + -74.0478515625, + 40.10538669840983 + ], + [ + -73.9654541015625, + 40.099084147368444 + ], + [ + -74.00115966796875, + 39.97712009843963 + ], + [ + -74.03411865234375, + 39.77054750039528 + ], + [ + -74.04510498046875, + 39.73676229957945 + ], + [ + -74.0972900390625, + 39.650112101863726 + ], + [ + -74.234619140625, + 39.47648555419738 + ], + [ + -74.29779052734375, + 39.47648555419738 + ], + [ + -74.31427001953125, + 39.50192146626986 + ], + [ + -74.3280029296875, + 39.508278990341125 + ], + [ + -74.3829345703125, + 39.499802162332884 + ], + [ + -74.4049072265625, + 39.54005788576376 + ], + [ + -74.41864013671875, + 39.55064761909321 + ], + [ + -74.4158935546875, + 39.563353165829284 + ], + [ + -74.42138671875, + 39.56970506644248 + ], + [ + -74.40216064453125, + 39.57393934359189 + ], + [ + -74.39117431640625, + 39.59722324495564 + ], + [ + -74.39117431640625, + 39.77476948529548 + ], + [ + -74.55322265625, + 40.08017299133499 + ], + [ + -74.52850341796875, + 40.09067983779909 + ], + [ + -74.40765380859375, + 40.172577576321686 + ], + [ + -74.26483154296875, + 40.168380093142446 + ] + ] + ] + }, + "type": "Feature", + "properties": { + "id": "34029", + "name": "Ocean County", + "pop_density": 2310.250993696356 + }, + "id": 49, + "source": "us-counties", + "sourceLayer": "counties", + "state": {} + } +] \ No newline at end of file diff --git a/metrics/integration/query-tests/line-offset/inside-fractional/style.json b/metrics/integration/query-tests/line-offset/inside-fractional/style.json new file mode 100644 index 00000000000..0e993f19591 --- /dev/null +++ b/metrics/integration/query-tests/line-offset/inside-fractional/style.json @@ -0,0 +1,41 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 500, + "height": 500, + "queryGeometry": [ + 398, + 250 + ] + } + }, + "center": [ + -74.522, + 39.92 + ], + "zoom": 7.8, + "sources": { + "us-counties": { + "type": "vector", + "maxzoom": 7, + "minzoom": 7, + "tiles": [ + "local://tiles/counties-{z}-{x}-{y}.mvt" + ] + } + }, + "layers": [ + { + "id": "counties", + "type": "line", + "source": "us-counties", + "source-layer": "counties", + "paint": { + "line-offset": 10, + "line-width": 10 + }, + "interactive": true + } + ] +} \ No newline at end of file diff --git a/metrics/integration/query-tests/line-offset/inside/expected.json b/metrics/integration/query-tests/line-offset/inside/expected.json new file mode 100644 index 00000000000..857968f2f03 --- /dev/null +++ b/metrics/integration/query-tests/line-offset/inside/expected.json @@ -0,0 +1,161 @@ +[ + { + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -74.26483154296875, + 40.168380093142446 + ], + [ + -74.25933837890625, + 40.16208338164617 + ], + [ + -74.2620849609375, + 40.14948820651523 + ], + [ + -74.25384521484375, + 40.14738878354049 + ], + [ + -74.24285888671875, + 40.1305910638018 + ], + [ + -74.24560546875, + 40.117990048904744 + ], + [ + -74.23187255859375, + 40.109588074741396 + ], + [ + -74.20440673828125, + 40.11378919157522 + ], + [ + -74.16046142578125, + 40.107487419012415 + ], + [ + -74.1522216796875, + 40.099084147368444 + ], + [ + -74.1082763671875, + 40.13899044275823 + ], + [ + -74.09454345703125, + 40.109588074741396 + ], + [ + -74.07257080078125, + 40.09067983779909 + ], + [ + -74.0478515625, + 40.10538669840983 + ], + [ + -73.9654541015625, + 40.099084147368444 + ], + [ + -74.00115966796875, + 39.97712009843963 + ], + [ + -74.03411865234375, + 39.77054750039528 + ], + [ + -74.04510498046875, + 39.73676229957945 + ], + [ + -74.0972900390625, + 39.650112101863726 + ], + [ + -74.234619140625, + 39.47648555419738 + ], + [ + -74.29779052734375, + 39.47648555419738 + ], + [ + -74.31427001953125, + 39.50192146626986 + ], + [ + -74.3280029296875, + 39.508278990341125 + ], + [ + -74.3829345703125, + 39.499802162332884 + ], + [ + -74.4049072265625, + 39.54005788576376 + ], + [ + -74.41864013671875, + 39.55064761909321 + ], + [ + -74.4158935546875, + 39.563353165829284 + ], + [ + -74.42138671875, + 39.56970506644248 + ], + [ + -74.40216064453125, + 39.57393934359189 + ], + [ + -74.39117431640625, + 39.59722324495564 + ], + [ + -74.39117431640625, + 39.77476948529548 + ], + [ + -74.55322265625, + 40.08017299133499 + ], + [ + -74.52850341796875, + 40.09067983779909 + ], + [ + -74.40765380859375, + 40.172577576321686 + ], + [ + -74.26483154296875, + 40.168380093142446 + ] + ] + ] + }, + "type": "Feature", + "properties": { + "id": "34029", + "name": "Ocean County", + "pop_density": 2310.250993696356 + }, + "id": 49, + "source": "us-counties", + "sourceLayer": "counties", + "state": {} + } +] \ No newline at end of file diff --git a/metrics/integration/query-tests/line-offset/inside/style.json b/metrics/integration/query-tests/line-offset/inside/style.json new file mode 100644 index 00000000000..e14e14bfc7a --- /dev/null +++ b/metrics/integration/query-tests/line-offset/inside/style.json @@ -0,0 +1,41 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 500, + "height": 500, + "queryGeometry": [ + 329, + 250 + ] + } + }, + "center": [ + -74.522, + 39.92 + ], + "zoom": 7, + "sources": { + "us-counties": { + "type": "vector", + "maxzoom": 7, + "minzoom": 7, + "tiles": [ + "local://tiles/counties-{z}-{x}-{y}.mvt" + ] + } + }, + "layers": [ + { + "id": "counties", + "type": "line", + "source": "us-counties", + "source-layer": "counties", + "paint": { + "line-offset": 10, + "line-width": 10 + }, + "interactive": true + } + ] +} \ No newline at end of file diff --git a/metrics/integration/query-tests/line-offset/outside-fractional/expected.json b/metrics/integration/query-tests/line-offset/outside-fractional/expected.json new file mode 100644 index 00000000000..0637a088a01 --- /dev/null +++ b/metrics/integration/query-tests/line-offset/outside-fractional/expected.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/metrics/integration/query-tests/line-offset/outside-fractional/style.json b/metrics/integration/query-tests/line-offset/outside-fractional/style.json new file mode 100644 index 00000000000..f8c5b8581b9 --- /dev/null +++ b/metrics/integration/query-tests/line-offset/outside-fractional/style.json @@ -0,0 +1,41 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 500, + "height": 500, + "queryGeometry": [ + 475, + 250 + ] + } + }, + "center": [ + -74.522, + 39.92 + ], + "zoom": 7.8, + "sources": { + "us-counties": { + "type": "vector", + "maxzoom": 7, + "minzoom": 7, + "tiles": [ + "local://tiles/counties-{z}-{x}-{y}.mvt" + ] + } + }, + "layers": [ + { + "id": "counties", + "type": "line", + "source": "us-counties", + "source-layer": "counties", + "paint": { + "line-offset": 10, + "line-width": 10 + }, + "interactive": true + } + ] +} \ No newline at end of file diff --git a/metrics/integration/query-tests/line-offset/outside/expected.json b/metrics/integration/query-tests/line-offset/outside/expected.json new file mode 100644 index 00000000000..0637a088a01 --- /dev/null +++ b/metrics/integration/query-tests/line-offset/outside/expected.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/metrics/integration/query-tests/line-offset/outside/style.json b/metrics/integration/query-tests/line-offset/outside/style.json new file mode 100644 index 00000000000..abc86be1c70 --- /dev/null +++ b/metrics/integration/query-tests/line-offset/outside/style.json @@ -0,0 +1,41 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 500, + "height": 500, + "queryGeometry": [ + 326, + 250 + ] + } + }, + "center": [ + -74.522, + 39.92 + ], + "zoom": 7, + "sources": { + "us-counties": { + "type": "vector", + "maxzoom": 7, + "minzoom": 7, + "tiles": [ + "local://tiles/counties-{z}-{x}-{y}.mvt" + ] + } + }, + "layers": [ + { + "id": "counties", + "type": "line", + "source": "us-counties", + "source-layer": "counties", + "paint": { + "line-offset": 10, + "line-width": 10 + }, + "interactive": true + } + ] +} \ No newline at end of file diff --git a/metrics/integration/query-tests/line-offset/pattern-feature-state/expected.json b/metrics/integration/query-tests/line-offset/pattern-feature-state/expected.json new file mode 100644 index 00000000000..877b7dd0d84 --- /dev/null +++ b/metrics/integration/query-tests/line-offset/pattern-feature-state/expected.json @@ -0,0 +1,24 @@ +[ + { + "geometry": { + "type": "LineString", + "coordinates": [ + [ + 0, + 0 + ], + [ + 5.009765625, + 14.987239525774243 + ] + ] + }, + "type": "Feature", + "properties": {}, + "id": 1, + "source": "mapbox", + "state": { + "big": true + } + } +] \ No newline at end of file diff --git a/metrics/integration/query-tests/line-offset/pattern-feature-state/style.json b/metrics/integration/query-tests/line-offset/pattern-feature-state/style.json new file mode 100644 index 00000000000..b904ab877c6 --- /dev/null +++ b/metrics/integration/query-tests/line-offset/pattern-feature-state/style.json @@ -0,0 +1,64 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "wait" + ], + [ + "setFeatureState", + { "source": "mapbox", "id": 1}, + { "big": true } + ], + [ + "wait" + ] + ], + "queryGeometry": [ + 32, + 16 + ] + } + }, + "sprite": "local://sprites/emerald", + "sources": { + "mapbox": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "id": 1, + "type": "Feature", + "geometry": { + "type": "LineString", + "coordinates": [ + [ 0, 0], + [ 5, 15] + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "line", + "type": "line", + "source": "mapbox", + "paint": { + "line-width": 12, + "line-pattern": "cemetery_icon", + "line-offset": ["case", + ["boolean", ["feature-state", "big"], false], + ["number", -5], + ["number", 0] + ] + } + } + ] +} diff --git a/metrics/integration/query-tests/line-offset/property-function/expected.json b/metrics/integration/query-tests/line-offset/property-function/expected.json new file mode 100644 index 00000000000..74725ac2a72 --- /dev/null +++ b/metrics/integration/query-tests/line-offset/property-function/expected.json @@ -0,0 +1,37 @@ +[ + { + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + 10.01953125, + 10.012129557908153 + ], + [ + 10.01953125, + -10.012129557908125 + ], + [ + -10.01953125, + -10.012129557908125 + ], + [ + -10.01953125, + 10.012129557908153 + ], + [ + 10.01953125, + 10.012129557908153 + ] + ] + ] + }, + "type": "Feature", + "properties": { + "offset": 0 + }, + "source": "geojson", + "state": {} + } +] \ No newline at end of file diff --git a/metrics/integration/query-tests/line-offset/property-function/style.json b/metrics/integration/query-tests/line-offset/property-function/style.json new file mode 100644 index 00000000000..b1cdd045262 --- /dev/null +++ b/metrics/integration/query-tests/line-offset/property-function/style.json @@ -0,0 +1,66 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "queryGeometry": [ + 17, + 32 + ] + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { "offset": 0 }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [10, 10], + [10, -10], + [-10, -10], + [-10, 10], + [10,10] + ] + ] + } + }, { + "type": "Feature", + "properties": { "offset": 10 }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [10, 10], + [10, -10], + [-10, -10], + [-10, 10], + [10, 10] + ] + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "geojson", + "type": "line", + "source": "geojson", + "paint": { + "line-offset": { "property": "offset", "type": "identity" }, + "line-width": 3 + }, + "interactive": true + } + ] +} diff --git a/metrics/integration/query-tests/line-translate-anchor/map/expected.json b/metrics/integration/query-tests/line-translate-anchor/map/expected.json new file mode 100644 index 00000000000..857968f2f03 --- /dev/null +++ b/metrics/integration/query-tests/line-translate-anchor/map/expected.json @@ -0,0 +1,161 @@ +[ + { + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -74.26483154296875, + 40.168380093142446 + ], + [ + -74.25933837890625, + 40.16208338164617 + ], + [ + -74.2620849609375, + 40.14948820651523 + ], + [ + -74.25384521484375, + 40.14738878354049 + ], + [ + -74.24285888671875, + 40.1305910638018 + ], + [ + -74.24560546875, + 40.117990048904744 + ], + [ + -74.23187255859375, + 40.109588074741396 + ], + [ + -74.20440673828125, + 40.11378919157522 + ], + [ + -74.16046142578125, + 40.107487419012415 + ], + [ + -74.1522216796875, + 40.099084147368444 + ], + [ + -74.1082763671875, + 40.13899044275823 + ], + [ + -74.09454345703125, + 40.109588074741396 + ], + [ + -74.07257080078125, + 40.09067983779909 + ], + [ + -74.0478515625, + 40.10538669840983 + ], + [ + -73.9654541015625, + 40.099084147368444 + ], + [ + -74.00115966796875, + 39.97712009843963 + ], + [ + -74.03411865234375, + 39.77054750039528 + ], + [ + -74.04510498046875, + 39.73676229957945 + ], + [ + -74.0972900390625, + 39.650112101863726 + ], + [ + -74.234619140625, + 39.47648555419738 + ], + [ + -74.29779052734375, + 39.47648555419738 + ], + [ + -74.31427001953125, + 39.50192146626986 + ], + [ + -74.3280029296875, + 39.508278990341125 + ], + [ + -74.3829345703125, + 39.499802162332884 + ], + [ + -74.4049072265625, + 39.54005788576376 + ], + [ + -74.41864013671875, + 39.55064761909321 + ], + [ + -74.4158935546875, + 39.563353165829284 + ], + [ + -74.42138671875, + 39.56970506644248 + ], + [ + -74.40216064453125, + 39.57393934359189 + ], + [ + -74.39117431640625, + 39.59722324495564 + ], + [ + -74.39117431640625, + 39.77476948529548 + ], + [ + -74.55322265625, + 40.08017299133499 + ], + [ + -74.52850341796875, + 40.09067983779909 + ], + [ + -74.40765380859375, + 40.172577576321686 + ], + [ + -74.26483154296875, + 40.168380093142446 + ] + ] + ] + }, + "type": "Feature", + "properties": { + "id": "34029", + "name": "Ocean County", + "pop_density": 2310.250993696356 + }, + "id": 49, + "source": "us-counties", + "sourceLayer": "counties", + "state": {} + } +] \ No newline at end of file diff --git a/metrics/integration/query-tests/line-translate-anchor/map/style.json b/metrics/integration/query-tests/line-translate-anchor/map/style.json new file mode 100644 index 00000000000..cc377f80093 --- /dev/null +++ b/metrics/integration/query-tests/line-translate-anchor/map/style.json @@ -0,0 +1,46 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 500, + "height": 500, + "queryGeometry": [ + 427, + 110 + ] + } + }, + "center": [ + -74.522, + 39.92 + ], + "bearing": 45, + "zoom": 8, + "sources": { + "us-counties": { + "type": "vector", + "maxzoom": 7, + "minzoom": 7, + "tiles": [ + "local://tiles/counties-{z}-{x}-{y}.mvt" + ] + } + }, + "layers": [ + { + "id": "counties", + "type": "line", + "source": "us-counties", + "source-layer": "counties", + "paint": { + "line-translate": [ + 40, + 20 + ], + "line-translate-anchor": "map", + "line-width": 3 + }, + "interactive": true + } + ] +} \ No newline at end of file diff --git a/metrics/integration/query-tests/line-translate-anchor/viewport/expected.json b/metrics/integration/query-tests/line-translate-anchor/viewport/expected.json new file mode 100644 index 00000000000..857968f2f03 --- /dev/null +++ b/metrics/integration/query-tests/line-translate-anchor/viewport/expected.json @@ -0,0 +1,161 @@ +[ + { + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -74.26483154296875, + 40.168380093142446 + ], + [ + -74.25933837890625, + 40.16208338164617 + ], + [ + -74.2620849609375, + 40.14948820651523 + ], + [ + -74.25384521484375, + 40.14738878354049 + ], + [ + -74.24285888671875, + 40.1305910638018 + ], + [ + -74.24560546875, + 40.117990048904744 + ], + [ + -74.23187255859375, + 40.109588074741396 + ], + [ + -74.20440673828125, + 40.11378919157522 + ], + [ + -74.16046142578125, + 40.107487419012415 + ], + [ + -74.1522216796875, + 40.099084147368444 + ], + [ + -74.1082763671875, + 40.13899044275823 + ], + [ + -74.09454345703125, + 40.109588074741396 + ], + [ + -74.07257080078125, + 40.09067983779909 + ], + [ + -74.0478515625, + 40.10538669840983 + ], + [ + -73.9654541015625, + 40.099084147368444 + ], + [ + -74.00115966796875, + 39.97712009843963 + ], + [ + -74.03411865234375, + 39.77054750039528 + ], + [ + -74.04510498046875, + 39.73676229957945 + ], + [ + -74.0972900390625, + 39.650112101863726 + ], + [ + -74.234619140625, + 39.47648555419738 + ], + [ + -74.29779052734375, + 39.47648555419738 + ], + [ + -74.31427001953125, + 39.50192146626986 + ], + [ + -74.3280029296875, + 39.508278990341125 + ], + [ + -74.3829345703125, + 39.499802162332884 + ], + [ + -74.4049072265625, + 39.54005788576376 + ], + [ + -74.41864013671875, + 39.55064761909321 + ], + [ + -74.4158935546875, + 39.563353165829284 + ], + [ + -74.42138671875, + 39.56970506644248 + ], + [ + -74.40216064453125, + 39.57393934359189 + ], + [ + -74.39117431640625, + 39.59722324495564 + ], + [ + -74.39117431640625, + 39.77476948529548 + ], + [ + -74.55322265625, + 40.08017299133499 + ], + [ + -74.52850341796875, + 40.09067983779909 + ], + [ + -74.40765380859375, + 40.172577576321686 + ], + [ + -74.26483154296875, + 40.168380093142446 + ] + ] + ] + }, + "type": "Feature", + "properties": { + "id": "34029", + "name": "Ocean County", + "pop_density": 2310.250993696356 + }, + "id": 49, + "source": "us-counties", + "sourceLayer": "counties", + "state": {} + } +] \ No newline at end of file diff --git a/metrics/integration/query-tests/line-translate-anchor/viewport/style.json b/metrics/integration/query-tests/line-translate-anchor/viewport/style.json new file mode 100644 index 00000000000..ec01cb100fe --- /dev/null +++ b/metrics/integration/query-tests/line-translate-anchor/viewport/style.json @@ -0,0 +1,46 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 500, + "height": 500, + "queryGeometry": [ + 437, + 160 + ] + } + }, + "center": [ + -74.522, + 39.92 + ], + "bearing": 45, + "zoom": 8, + "sources": { + "us-counties": { + "type": "vector", + "maxzoom": 7, + "minzoom": 7, + "tiles": [ + "local://tiles/counties-{z}-{x}-{y}.mvt" + ] + } + }, + "layers": [ + { + "id": "counties", + "type": "line", + "source": "us-counties", + "source-layer": "counties", + "paint": { + "line-translate": [ + 40, + 20 + ], + "line-translate-anchor": "viewport", + "line-width": 3 + }, + "interactive": true + } + ] +} \ No newline at end of file diff --git a/metrics/integration/query-tests/line-translate/inside/expected.json b/metrics/integration/query-tests/line-translate/inside/expected.json new file mode 100644 index 00000000000..857968f2f03 --- /dev/null +++ b/metrics/integration/query-tests/line-translate/inside/expected.json @@ -0,0 +1,161 @@ +[ + { + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -74.26483154296875, + 40.168380093142446 + ], + [ + -74.25933837890625, + 40.16208338164617 + ], + [ + -74.2620849609375, + 40.14948820651523 + ], + [ + -74.25384521484375, + 40.14738878354049 + ], + [ + -74.24285888671875, + 40.1305910638018 + ], + [ + -74.24560546875, + 40.117990048904744 + ], + [ + -74.23187255859375, + 40.109588074741396 + ], + [ + -74.20440673828125, + 40.11378919157522 + ], + [ + -74.16046142578125, + 40.107487419012415 + ], + [ + -74.1522216796875, + 40.099084147368444 + ], + [ + -74.1082763671875, + 40.13899044275823 + ], + [ + -74.09454345703125, + 40.109588074741396 + ], + [ + -74.07257080078125, + 40.09067983779909 + ], + [ + -74.0478515625, + 40.10538669840983 + ], + [ + -73.9654541015625, + 40.099084147368444 + ], + [ + -74.00115966796875, + 39.97712009843963 + ], + [ + -74.03411865234375, + 39.77054750039528 + ], + [ + -74.04510498046875, + 39.73676229957945 + ], + [ + -74.0972900390625, + 39.650112101863726 + ], + [ + -74.234619140625, + 39.47648555419738 + ], + [ + -74.29779052734375, + 39.47648555419738 + ], + [ + -74.31427001953125, + 39.50192146626986 + ], + [ + -74.3280029296875, + 39.508278990341125 + ], + [ + -74.3829345703125, + 39.499802162332884 + ], + [ + -74.4049072265625, + 39.54005788576376 + ], + [ + -74.41864013671875, + 39.55064761909321 + ], + [ + -74.4158935546875, + 39.563353165829284 + ], + [ + -74.42138671875, + 39.56970506644248 + ], + [ + -74.40216064453125, + 39.57393934359189 + ], + [ + -74.39117431640625, + 39.59722324495564 + ], + [ + -74.39117431640625, + 39.77476948529548 + ], + [ + -74.55322265625, + 40.08017299133499 + ], + [ + -74.52850341796875, + 40.09067983779909 + ], + [ + -74.40765380859375, + 40.172577576321686 + ], + [ + -74.26483154296875, + 40.168380093142446 + ] + ] + ] + }, + "type": "Feature", + "properties": { + "id": "34029", + "name": "Ocean County", + "pop_density": 2310.250993696356 + }, + "id": 49, + "source": "us-counties", + "sourceLayer": "counties", + "state": {} + } +] \ No newline at end of file diff --git a/metrics/integration/query-tests/line-translate/inside/style.json b/metrics/integration/query-tests/line-translate/inside/style.json new file mode 100644 index 00000000000..dbf2ffe4ea1 --- /dev/null +++ b/metrics/integration/query-tests/line-translate/inside/style.json @@ -0,0 +1,44 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 500, + "height": 500, + "queryGeometry": [ + 379, + 270 + ] + } + }, + "center": [ + -74.522, + 39.92 + ], + "zoom": 7, + "sources": { + "us-counties": { + "type": "vector", + "maxzoom": 7, + "minzoom": 7, + "tiles": [ + "local://tiles/counties-{z}-{x}-{y}.mvt" + ] + } + }, + "layers": [ + { + "id": "counties", + "type": "line", + "source": "us-counties", + "source-layer": "counties", + "paint": { + "line-translate": [ + 40, + 20 + ], + "line-width": 10 + }, + "interactive": true + } + ] +} \ No newline at end of file diff --git a/metrics/integration/query-tests/line-translate/outside/expected.json b/metrics/integration/query-tests/line-translate/outside/expected.json new file mode 100644 index 00000000000..0637a088a01 --- /dev/null +++ b/metrics/integration/query-tests/line-translate/outside/expected.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/metrics/integration/query-tests/line-translate/outside/style.json b/metrics/integration/query-tests/line-translate/outside/style.json new file mode 100644 index 00000000000..215f21b55ac --- /dev/null +++ b/metrics/integration/query-tests/line-translate/outside/style.json @@ -0,0 +1,44 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 500, + "height": 500, + "queryGeometry": [ + 376, + 270 + ] + } + }, + "center": [ + -74.522, + 39.92 + ], + "zoom": 7, + "sources": { + "us-counties": { + "type": "vector", + "maxzoom": 7, + "minzoom": 7, + "tiles": [ + "local://tiles/counties-{z}-{x}-{y}.mvt" + ] + } + }, + "layers": [ + { + "id": "counties", + "type": "line", + "source": "us-counties", + "source-layer": "counties", + "paint": { + "line-translate": [ + 40, + 20 + ], + "line-width": 10 + }, + "interactive": true + } + ] +} \ No newline at end of file diff --git a/metrics/integration/query-tests/line-width-features-in/inside/expected.json b/metrics/integration/query-tests/line-width-features-in/inside/expected.json new file mode 100644 index 00000000000..857968f2f03 --- /dev/null +++ b/metrics/integration/query-tests/line-width-features-in/inside/expected.json @@ -0,0 +1,161 @@ +[ + { + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -74.26483154296875, + 40.168380093142446 + ], + [ + -74.25933837890625, + 40.16208338164617 + ], + [ + -74.2620849609375, + 40.14948820651523 + ], + [ + -74.25384521484375, + 40.14738878354049 + ], + [ + -74.24285888671875, + 40.1305910638018 + ], + [ + -74.24560546875, + 40.117990048904744 + ], + [ + -74.23187255859375, + 40.109588074741396 + ], + [ + -74.20440673828125, + 40.11378919157522 + ], + [ + -74.16046142578125, + 40.107487419012415 + ], + [ + -74.1522216796875, + 40.099084147368444 + ], + [ + -74.1082763671875, + 40.13899044275823 + ], + [ + -74.09454345703125, + 40.109588074741396 + ], + [ + -74.07257080078125, + 40.09067983779909 + ], + [ + -74.0478515625, + 40.10538669840983 + ], + [ + -73.9654541015625, + 40.099084147368444 + ], + [ + -74.00115966796875, + 39.97712009843963 + ], + [ + -74.03411865234375, + 39.77054750039528 + ], + [ + -74.04510498046875, + 39.73676229957945 + ], + [ + -74.0972900390625, + 39.650112101863726 + ], + [ + -74.234619140625, + 39.47648555419738 + ], + [ + -74.29779052734375, + 39.47648555419738 + ], + [ + -74.31427001953125, + 39.50192146626986 + ], + [ + -74.3280029296875, + 39.508278990341125 + ], + [ + -74.3829345703125, + 39.499802162332884 + ], + [ + -74.4049072265625, + 39.54005788576376 + ], + [ + -74.41864013671875, + 39.55064761909321 + ], + [ + -74.4158935546875, + 39.563353165829284 + ], + [ + -74.42138671875, + 39.56970506644248 + ], + [ + -74.40216064453125, + 39.57393934359189 + ], + [ + -74.39117431640625, + 39.59722324495564 + ], + [ + -74.39117431640625, + 39.77476948529548 + ], + [ + -74.55322265625, + 40.08017299133499 + ], + [ + -74.52850341796875, + 40.09067983779909 + ], + [ + -74.40765380859375, + 40.172577576321686 + ], + [ + -74.26483154296875, + 40.168380093142446 + ] + ] + ] + }, + "type": "Feature", + "properties": { + "id": "34029", + "name": "Ocean County", + "pop_density": 2310.250993696356 + }, + "id": 49, + "source": "us-counties", + "sourceLayer": "counties", + "state": {} + } +] \ No newline at end of file diff --git a/metrics/integration/query-tests/line-width-features-in/inside/style.json b/metrics/integration/query-tests/line-width-features-in/inside/style.json new file mode 100644 index 00000000000..c7149498cd8 --- /dev/null +++ b/metrics/integration/query-tests/line-width-features-in/inside/style.json @@ -0,0 +1,46 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 500, + "height": 500, + "queryGeometry": [ + [ + 301, + 230 + ], + [ + 339, + 250 + ] + ] + } + }, + "center": [ + -74.522, + 39.92 + ], + "zoom": 7, + "sources": { + "us-counties": { + "type": "vector", + "maxzoom": 7, + "minzoom": 7, + "tiles": [ + "local://tiles/counties-{z}-{x}-{y}.mvt" + ] + } + }, + "layers": [ + { + "id": "counties", + "type": "line", + "source": "us-counties", + "source-layer": "counties", + "paint": { + "line-width": 10 + }, + "interactive": true + } + ] +} \ No newline at end of file diff --git a/metrics/integration/query-tests/line-width-features-in/outside/expected.json b/metrics/integration/query-tests/line-width-features-in/outside/expected.json new file mode 100644 index 00000000000..0637a088a01 --- /dev/null +++ b/metrics/integration/query-tests/line-width-features-in/outside/expected.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/metrics/integration/query-tests/line-width-features-in/outside/style.json b/metrics/integration/query-tests/line-width-features-in/outside/style.json new file mode 100644 index 00000000000..107593b4b81 --- /dev/null +++ b/metrics/integration/query-tests/line-width-features-in/outside/style.json @@ -0,0 +1,46 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 500, + "height": 500, + "queryGeometry": [ + [ + 300, + 230 + ], + [ + 336, + 250 + ] + ] + } + }, + "center": [ + -74.522, + 39.92 + ], + "zoom": 7, + "sources": { + "us-counties": { + "type": "vector", + "maxzoom": 7, + "minzoom": 7, + "tiles": [ + "local://tiles/counties-{z}-{x}-{y}.mvt" + ] + } + }, + "layers": [ + { + "id": "counties", + "type": "line", + "source": "us-counties", + "source-layer": "counties", + "paint": { + "line-width": 10 + }, + "interactive": true + } + ] +} \ No newline at end of file diff --git a/metrics/integration/query-tests/line-width-features-in/tilt-inside/expected.json b/metrics/integration/query-tests/line-width-features-in/tilt-inside/expected.json new file mode 100644 index 00000000000..b3e7dab548c --- /dev/null +++ b/metrics/integration/query-tests/line-width-features-in/tilt-inside/expected.json @@ -0,0 +1,480 @@ +[ + { + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -74.26483154296875, + 40.168380093142446 + ], + [ + -74.25933837890625, + 40.16208338164617 + ], + [ + -74.2620849609375, + 40.14948820651523 + ], + [ + -74.25384521484375, + 40.14738878354049 + ], + [ + -74.24285888671875, + 40.1305910638018 + ], + [ + -74.24560546875, + 40.117990048904744 + ], + [ + -74.23187255859375, + 40.109588074741396 + ], + [ + -74.20440673828125, + 40.11378919157522 + ], + [ + -74.16046142578125, + 40.107487419012415 + ], + [ + -74.1522216796875, + 40.099084147368444 + ], + [ + -74.1082763671875, + 40.13899044275823 + ], + [ + -74.09454345703125, + 40.109588074741396 + ], + [ + -74.07257080078125, + 40.09067983779909 + ], + [ + -74.0478515625, + 40.10538669840983 + ], + [ + -73.9654541015625, + 40.099084147368444 + ], + [ + -74.00115966796875, + 39.97712009843963 + ], + [ + -74.03411865234375, + 39.77054750039528 + ], + [ + -74.04510498046875, + 39.73676229957945 + ], + [ + -74.0972900390625, + 39.650112101863726 + ], + [ + -74.234619140625, + 39.47648555419738 + ], + [ + -74.29779052734375, + 39.47648555419738 + ], + [ + -74.31427001953125, + 39.50192146626986 + ], + [ + -74.3280029296875, + 39.508278990341125 + ], + [ + -74.3829345703125, + 39.499802162332884 + ], + [ + -74.4049072265625, + 39.54005788576376 + ], + [ + -74.41864013671875, + 39.55064761909321 + ], + [ + -74.4158935546875, + 39.563353165829284 + ], + [ + -74.42138671875, + 39.56970506644248 + ], + [ + -74.40216064453125, + 39.57393934359189 + ], + [ + -74.39117431640625, + 39.59722324495564 + ], + [ + -74.39117431640625, + 39.77476948529548 + ], + [ + -74.55322265625, + 40.08017299133499 + ], + [ + -74.52850341796875, + 40.09067983779909 + ], + [ + -74.40765380859375, + 40.172577576321686 + ], + [ + -74.26483154296875, + 40.168380093142446 + ] + ] + ] + }, + "type": "Feature", + "properties": { + "id": "34029", + "name": "Ocean County", + "pop_density": 2310.250993696356 + }, + "id": 49, + "source": "us-counties", + "sourceLayer": "counties", + "state": {} + }, + { + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -74.52850341796875, + 39.56970506644248 + ], + [ + -74.54498291015625, + 39.58029027440864 + ], + [ + -74.542236328125, + 39.586640623314594 + ], + [ + -74.55322265625, + 39.59933957529532 + ], + [ + -74.57794189453125, + 39.59933957529532 + ], + [ + -74.58892822265625, + 39.612036199336956 + ], + [ + -74.6246337890625, + 39.62684598486689 + ], + [ + -74.63287353515625, + 39.62049932196811 + ], + [ + -74.6356201171875, + 39.62896140981414 + ], + [ + -74.6575927734375, + 39.62896140981414 + ], + [ + -74.66033935546875, + 39.66914219401812 + ], + [ + -74.6685791015625, + 39.68393975392732 + ], + [ + -74.77294921875, + 39.751545363937595 + ], + [ + -74.80865478515625, + 39.785323314592574 + ], + [ + -74.8388671875, + 39.79165483525341 + ], + [ + -74.8773193359375, + 39.78321267821704 + ], + [ + -74.89654541015625, + 39.785323314592574 + ], + [ + -74.90478515625, + 39.79165483525341 + ], + [ + -74.9322509765625, + 39.88866516883712 + ], + [ + -74.95147705078125, + 39.8992015115692 + ], + [ + -74.9652099609375, + 39.92026933763398 + ], + [ + -74.98443603515625, + 39.92869465373238 + ], + [ + -74.9761962890625, + 39.9413306837869 + ], + [ + -75.01739501953125, + 39.947647823922495 + ], + [ + -75.0146484375, + 39.95817509460008 + ], + [ + -75.0201416015625, + 39.96870074491696 + ], + [ + -75.01190185546875, + 39.981329386272165 + ], + [ + -75.0201416015625, + 39.98974718404571 + ], + [ + -75.03387451171875, + 39.99185147142347 + ], + [ + -75.03662109375, + 39.9981639445858 + ], + [ + -75.06134033203125, + 39.99185147142347 + ], + [ + -75.047607421875, + 40.01078714046551 + ], + [ + -75.0146484375, + 40.02130468739708 + ], + [ + -74.96795654296875, + 40.05284760182397 + ], + [ + -74.92950439453125, + 40.071766346626106 + ], + [ + -74.90753173828125, + 40.071766346626106 + ], + [ + -74.86358642578125, + 40.08437592451517 + ], + [ + -74.8553466796875, + 40.09488212232117 + ], + [ + -74.8388671875, + 40.10118506258701 + ], + [ + -74.82513427734375, + 40.128491056854074 + ], + [ + -74.78668212890625, + 40.12219064672337 + ], + [ + -74.761962890625, + 40.13479088304851 + ], + [ + -74.74273681640625, + 40.1368906953459 + ], + [ + -74.72076416015625, + 40.14948820651523 + ], + [ + -74.70428466796875, + 40.17047886718112 + ], + [ + -74.7125244140625, + 40.168380093142446 + ], + [ + -74.7125244140625, + 40.180971763887186 + ], + [ + -74.70428466796875, + 40.18516846826054 + ], + [ + -74.67681884765625, + 40.17467622056341 + ], + [ + -74.6795654296875, + 40.16628125420655 + ], + [ + -74.6630859375, + 40.16628125420655 + ], + [ + -74.6356201171875, + 40.14948820651523 + ], + [ + -74.6246337890625, + 40.14948820651523 + ], + [ + -74.6246337890625, + 40.14318974292439 + ], + [ + -74.6026611328125, + 40.1368906953459 + ], + [ + -74.58892822265625, + 40.13899044275823 + ], + [ + -74.39117431640625, + 39.77476948529548 + ], + [ + -74.39117431640625, + 39.59722324495564 + ], + [ + -74.40216064453125, + 39.57393934359189 + ], + [ + -74.42138671875, + 39.56970506644248 + ], + [ + -74.41864013671875, + 39.55911824217185 + ], + [ + -74.44061279296875, + 39.55488305992401 + ], + [ + -74.4378662109375, + 39.54217596171196 + ], + [ + -74.44610595703125, + 39.546411919686705 + ], + [ + -74.443359375, + 39.557000683371285 + ], + [ + -74.454345703125, + 39.55911824217185 + ], + [ + -74.45709228515625, + 39.54852980171148 + ], + [ + -74.46533203125, + 39.557000683371285 + ], + [ + -74.476318359375, + 39.552765371831015 + ], + [ + -74.48455810546875, + 39.55911824217185 + ], + [ + -74.49554443359375, + 39.557000683371285 + ], + [ + -74.5037841796875, + 39.56970506644248 + ], + [ + -74.51202392578125, + 39.56970506644248 + ], + [ + -74.51751708984375, + 39.57393934359189 + ], + [ + -74.52850341796875, + 39.56970506644248 + ] + ] + ] + }, + "type": "Feature", + "properties": { + "id": "34005", + "name": "Burlington County", + "pop_density": 2007.2920458152796 + }, + "id": 33, + "source": "us-counties", + "sourceLayer": "counties", + "state": {} + } +] \ No newline at end of file diff --git a/metrics/integration/query-tests/line-width-features-in/tilt-inside/style.json b/metrics/integration/query-tests/line-width-features-in/tilt-inside/style.json new file mode 100644 index 00000000000..34c6e6d0551 --- /dev/null +++ b/metrics/integration/query-tests/line-width-features-in/tilt-inside/style.json @@ -0,0 +1,47 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 500, + "height": 500, + "queryGeometry": [ + [ + 388, + 470 + ], + [ + 438, + 490 + ] + ] + } + }, + "center": [ + -74.522, + 39.92 + ], + "pitch": 50, + "zoom": 9, + "sources": { + "us-counties": { + "type": "vector", + "maxzoom": 7, + "minzoom": 7, + "tiles": [ + "local://tiles/counties-{z}-{x}-{y}.mvt" + ] + } + }, + "layers": [ + { + "id": "counties", + "type": "line", + "source": "us-counties", + "source-layer": "counties", + "paint": { + "line-width": 10 + }, + "interactive": true + } + ] +} \ No newline at end of file diff --git a/metrics/integration/query-tests/line-width-features-in/tilt-outside/expected.json b/metrics/integration/query-tests/line-width-features-in/tilt-outside/expected.json new file mode 100644 index 00000000000..0637a088a01 --- /dev/null +++ b/metrics/integration/query-tests/line-width-features-in/tilt-outside/expected.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/metrics/integration/query-tests/line-width-features-in/tilt-outside/style.json b/metrics/integration/query-tests/line-width-features-in/tilt-outside/style.json new file mode 100644 index 00000000000..94bef6d8629 --- /dev/null +++ b/metrics/integration/query-tests/line-width-features-in/tilt-outside/style.json @@ -0,0 +1,47 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 500, + "height": 500, + "queryGeometry": [ + [ + 390, + 470 + ], + [ + 438, + 490 + ] + ] + } + }, + "center": [ + -74.522, + 39.92 + ], + "pitch": 50, + "zoom": 9, + "sources": { + "us-counties": { + "type": "vector", + "maxzoom": 7, + "minzoom": 7, + "tiles": [ + "local://tiles/counties-{z}-{x}-{y}.mvt" + ] + } + }, + "layers": [ + { + "id": "counties", + "type": "line", + "source": "us-counties", + "source-layer": "counties", + "paint": { + "line-width": 10 + }, + "interactive": true + } + ] +} \ No newline at end of file diff --git a/metrics/integration/query-tests/line-width/feature-state/expected.json b/metrics/integration/query-tests/line-width/feature-state/expected.json new file mode 100644 index 00000000000..41d8c6908f8 --- /dev/null +++ b/metrics/integration/query-tests/line-width/feature-state/expected.json @@ -0,0 +1,13 @@ +[ + { + "type": "Feature", + "id": 1, + "geometry": { + "type": "LineString", + "coordinates": [ [0, 0], [5.009765625,14.987239525774243] ] + }, + "properties": {}, + "source": "mapbox", + "state": { "big": true } + } +] \ No newline at end of file diff --git a/metrics/integration/query-tests/line-width/feature-state/style.json b/metrics/integration/query-tests/line-width/feature-state/style.json new file mode 100644 index 00000000000..b30710cb0e7 --- /dev/null +++ b/metrics/integration/query-tests/line-width/feature-state/style.json @@ -0,0 +1,61 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "wait" + ], + [ + "setFeatureState", + { "source": "mapbox", "id": 1}, + { "big": true } + ], + [ + "wait" + ] + ], + "queryGeometry": [ + 32, + 16 + ] + } + }, + "sources": { + "mapbox": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "id": 1, + "type": "Feature", + "geometry": { + "type": "LineString", + "coordinates": [ + [ 0, 0], + [ 5, 15] + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "line", + "type": "line", + "source": "mapbox", + "paint": { + "line-width": ["case", + ["boolean", ["feature-state", "big"], false], + ["number", 20], + ["number", 1] + ] + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/query-tests/line-width/inside-fractional/expected.json b/metrics/integration/query-tests/line-width/inside-fractional/expected.json new file mode 100644 index 00000000000..857968f2f03 --- /dev/null +++ b/metrics/integration/query-tests/line-width/inside-fractional/expected.json @@ -0,0 +1,161 @@ +[ + { + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -74.26483154296875, + 40.168380093142446 + ], + [ + -74.25933837890625, + 40.16208338164617 + ], + [ + -74.2620849609375, + 40.14948820651523 + ], + [ + -74.25384521484375, + 40.14738878354049 + ], + [ + -74.24285888671875, + 40.1305910638018 + ], + [ + -74.24560546875, + 40.117990048904744 + ], + [ + -74.23187255859375, + 40.109588074741396 + ], + [ + -74.20440673828125, + 40.11378919157522 + ], + [ + -74.16046142578125, + 40.107487419012415 + ], + [ + -74.1522216796875, + 40.099084147368444 + ], + [ + -74.1082763671875, + 40.13899044275823 + ], + [ + -74.09454345703125, + 40.109588074741396 + ], + [ + -74.07257080078125, + 40.09067983779909 + ], + [ + -74.0478515625, + 40.10538669840983 + ], + [ + -73.9654541015625, + 40.099084147368444 + ], + [ + -74.00115966796875, + 39.97712009843963 + ], + [ + -74.03411865234375, + 39.77054750039528 + ], + [ + -74.04510498046875, + 39.73676229957945 + ], + [ + -74.0972900390625, + 39.650112101863726 + ], + [ + -74.234619140625, + 39.47648555419738 + ], + [ + -74.29779052734375, + 39.47648555419738 + ], + [ + -74.31427001953125, + 39.50192146626986 + ], + [ + -74.3280029296875, + 39.508278990341125 + ], + [ + -74.3829345703125, + 39.499802162332884 + ], + [ + -74.4049072265625, + 39.54005788576376 + ], + [ + -74.41864013671875, + 39.55064761909321 + ], + [ + -74.4158935546875, + 39.563353165829284 + ], + [ + -74.42138671875, + 39.56970506644248 + ], + [ + -74.40216064453125, + 39.57393934359189 + ], + [ + -74.39117431640625, + 39.59722324495564 + ], + [ + -74.39117431640625, + 39.77476948529548 + ], + [ + -74.55322265625, + 40.08017299133499 + ], + [ + -74.52850341796875, + 40.09067983779909 + ], + [ + -74.40765380859375, + 40.172577576321686 + ], + [ + -74.26483154296875, + 40.168380093142446 + ] + ] + ] + }, + "type": "Feature", + "properties": { + "id": "34029", + "name": "Ocean County", + "pop_density": 2310.250993696356 + }, + "id": 49, + "source": "us-counties", + "sourceLayer": "counties", + "state": {} + } +] \ No newline at end of file diff --git a/metrics/integration/query-tests/line-width/inside-fractional/style.json b/metrics/integration/query-tests/line-width/inside-fractional/style.json new file mode 100644 index 00000000000..424dbd94360 --- /dev/null +++ b/metrics/integration/query-tests/line-width/inside-fractional/style.json @@ -0,0 +1,40 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 500, + "height": 500, + "queryGeometry": [ + 408, + 250 + ] + } + }, + "center": [ + -74.522, + 39.92 + ], + "zoom": 7.8, + "sources": { + "us-counties": { + "type": "vector", + "maxzoom": 7, + "minzoom": 7, + "tiles": [ + "local://tiles/counties-{z}-{x}-{y}.mvt" + ] + } + }, + "layers": [ + { + "id": "counties", + "type": "line", + "source": "us-counties", + "source-layer": "counties", + "paint": { + "line-width": 10 + }, + "interactive": true + } + ] +} \ No newline at end of file diff --git a/metrics/integration/query-tests/line-width/inside/expected.json b/metrics/integration/query-tests/line-width/inside/expected.json new file mode 100644 index 00000000000..857968f2f03 --- /dev/null +++ b/metrics/integration/query-tests/line-width/inside/expected.json @@ -0,0 +1,161 @@ +[ + { + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -74.26483154296875, + 40.168380093142446 + ], + [ + -74.25933837890625, + 40.16208338164617 + ], + [ + -74.2620849609375, + 40.14948820651523 + ], + [ + -74.25384521484375, + 40.14738878354049 + ], + [ + -74.24285888671875, + 40.1305910638018 + ], + [ + -74.24560546875, + 40.117990048904744 + ], + [ + -74.23187255859375, + 40.109588074741396 + ], + [ + -74.20440673828125, + 40.11378919157522 + ], + [ + -74.16046142578125, + 40.107487419012415 + ], + [ + -74.1522216796875, + 40.099084147368444 + ], + [ + -74.1082763671875, + 40.13899044275823 + ], + [ + -74.09454345703125, + 40.109588074741396 + ], + [ + -74.07257080078125, + 40.09067983779909 + ], + [ + -74.0478515625, + 40.10538669840983 + ], + [ + -73.9654541015625, + 40.099084147368444 + ], + [ + -74.00115966796875, + 39.97712009843963 + ], + [ + -74.03411865234375, + 39.77054750039528 + ], + [ + -74.04510498046875, + 39.73676229957945 + ], + [ + -74.0972900390625, + 39.650112101863726 + ], + [ + -74.234619140625, + 39.47648555419738 + ], + [ + -74.29779052734375, + 39.47648555419738 + ], + [ + -74.31427001953125, + 39.50192146626986 + ], + [ + -74.3280029296875, + 39.508278990341125 + ], + [ + -74.3829345703125, + 39.499802162332884 + ], + [ + -74.4049072265625, + 39.54005788576376 + ], + [ + -74.41864013671875, + 39.55064761909321 + ], + [ + -74.4158935546875, + 39.563353165829284 + ], + [ + -74.42138671875, + 39.56970506644248 + ], + [ + -74.40216064453125, + 39.57393934359189 + ], + [ + -74.39117431640625, + 39.59722324495564 + ], + [ + -74.39117431640625, + 39.77476948529548 + ], + [ + -74.55322265625, + 40.08017299133499 + ], + [ + -74.52850341796875, + 40.09067983779909 + ], + [ + -74.40765380859375, + 40.172577576321686 + ], + [ + -74.26483154296875, + 40.168380093142446 + ] + ] + ] + }, + "type": "Feature", + "properties": { + "id": "34029", + "name": "Ocean County", + "pop_density": 2310.250993696356 + }, + "id": 49, + "source": "us-counties", + "sourceLayer": "counties", + "state": {} + } +] \ No newline at end of file diff --git a/metrics/integration/query-tests/line-width/inside/style.json b/metrics/integration/query-tests/line-width/inside/style.json new file mode 100644 index 00000000000..3396902b770 --- /dev/null +++ b/metrics/integration/query-tests/line-width/inside/style.json @@ -0,0 +1,40 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 500, + "height": 500, + "queryGeometry": [ + 339, + 250 + ] + } + }, + "center": [ + -74.522, + 39.92 + ], + "zoom": 7, + "sources": { + "us-counties": { + "type": "vector", + "maxzoom": 7, + "minzoom": 7, + "tiles": [ + "local://tiles/counties-{z}-{x}-{y}.mvt" + ] + } + }, + "layers": [ + { + "id": "counties", + "type": "line", + "source": "us-counties", + "source-layer": "counties", + "paint": { + "line-width": 10 + }, + "interactive": true + } + ] +} \ No newline at end of file diff --git a/metrics/integration/query-tests/line-width/multiple-layers/expected.json b/metrics/integration/query-tests/line-width/multiple-layers/expected.json new file mode 100644 index 00000000000..4ce10c7d33d --- /dev/null +++ b/metrics/integration/query-tests/line-width/multiple-layers/expected.json @@ -0,0 +1,22 @@ +[ + { + "geometry": { + "type": "LineString", + "coordinates": [ + [ + 0, + 0 + ], + [ + 50.009765625, + 0 + ] + ] + }, + "type": "Feature", + "properties": {}, + "id": 1, + "source": "mapbox", + "state": {} + } +] diff --git a/metrics/integration/query-tests/line-width/multiple-layers/style.json b/metrics/integration/query-tests/line-width/multiple-layers/style.json new file mode 100644 index 00000000000..7a94a9b9cfc --- /dev/null +++ b/metrics/integration/query-tests/line-width/multiple-layers/style.json @@ -0,0 +1,54 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "queryGeometry": [ + 45, + 16 + ] + } + }, + "sources": { + "mapbox": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "id": 1, + "type": "Feature", + "geometry": { + "type": "LineString", + "coordinates": [ + [ 0, 0], + [ 50, 0] + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "line", + "type": "line", + "source": "mapbox", + "paint": { + "line-width": 5 + } + }, + { + "id": "line2", + "type": "line", + "source": "mapbox", + "paint": { + "line-color": "white", + "line-width": 50, + "line-opacity": 0.3 + } + } + ] +} diff --git a/metrics/integration/query-tests/line-width/outside-fractional/expected.json b/metrics/integration/query-tests/line-width/outside-fractional/expected.json new file mode 100644 index 00000000000..0637a088a01 --- /dev/null +++ b/metrics/integration/query-tests/line-width/outside-fractional/expected.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/metrics/integration/query-tests/line-width/outside-fractional/style.json b/metrics/integration/query-tests/line-width/outside-fractional/style.json new file mode 100644 index 00000000000..66bb07494fc --- /dev/null +++ b/metrics/integration/query-tests/line-width/outside-fractional/style.json @@ -0,0 +1,40 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 500, + "height": 500, + "queryGeometry": [ + 405, + 250 + ] + } + }, + "center": [ + -74.522, + 39.92 + ], + "zoom": 7.8, + "sources": { + "us-counties": { + "type": "vector", + "maxzoom": 7, + "minzoom": 7, + "tiles": [ + "local://tiles/counties-{z}-{x}-{y}.mvt" + ] + } + }, + "layers": [ + { + "id": "counties", + "type": "line", + "source": "us-counties", + "source-layer": "counties", + "paint": { + "line-width": 10 + }, + "interactive": true + } + ] +} \ No newline at end of file diff --git a/metrics/integration/query-tests/line-width/outside/expected.json b/metrics/integration/query-tests/line-width/outside/expected.json new file mode 100644 index 00000000000..0637a088a01 --- /dev/null +++ b/metrics/integration/query-tests/line-width/outside/expected.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/metrics/integration/query-tests/line-width/outside/style.json b/metrics/integration/query-tests/line-width/outside/style.json new file mode 100644 index 00000000000..c0ccf733538 --- /dev/null +++ b/metrics/integration/query-tests/line-width/outside/style.json @@ -0,0 +1,40 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 500, + "height": 500, + "queryGeometry": [ + 336, + 250 + ] + } + }, + "center": [ + -74.522, + 39.92 + ], + "zoom": 7, + "sources": { + "us-counties": { + "type": "vector", + "maxzoom": 7, + "minzoom": 7, + "tiles": [ + "local://tiles/counties-{z}-{x}-{y}.mvt" + ] + } + }, + "layers": [ + { + "id": "counties", + "type": "line", + "source": "us-counties", + "source-layer": "counties", + "paint": { + "line-width": 10 + }, + "interactive": true + } + ] +} \ No newline at end of file diff --git a/metrics/integration/query-tests/options/filter-false/expected.json b/metrics/integration/query-tests/options/filter-false/expected.json new file mode 100644 index 00000000000..0637a088a01 --- /dev/null +++ b/metrics/integration/query-tests/options/filter-false/expected.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/metrics/integration/query-tests/options/filter-false/style.json b/metrics/integration/query-tests/options/filter-false/style.json new file mode 100644 index 00000000000..f024a065457 --- /dev/null +++ b/metrics/integration/query-tests/options/filter-false/style.json @@ -0,0 +1,41 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "queryGeometry": [ + 32, + 32 + ], + "queryOptions": { + "filter": ["==", "key", "nope"] + } + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + }, + "properties": { + "key": "value" + } + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson" + } + ] +} diff --git a/metrics/integration/query-tests/options/filter-true/expected.json b/metrics/integration/query-tests/options/filter-true/expected.json new file mode 100644 index 00000000000..4e8e4d91f7d --- /dev/null +++ b/metrics/integration/query-tests/options/filter-true/expected.json @@ -0,0 +1,17 @@ +[ + { + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + }, + "type": "Feature", + "properties": { + "key": "value" + }, + "source": "geojson", + "state": {} + } +] \ No newline at end of file diff --git a/metrics/integration/query-tests/options/filter-true/style.json b/metrics/integration/query-tests/options/filter-true/style.json new file mode 100644 index 00000000000..d44ca56b295 --- /dev/null +++ b/metrics/integration/query-tests/options/filter-true/style.json @@ -0,0 +1,41 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "queryGeometry": [ + 32, + 32 + ], + "queryOptions": { + "filter": ["==", "key", "value"] + } + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + }, + "properties": { + "key": "value" + } + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson" + } + ] +} diff --git a/metrics/integration/query-tests/options/layers-multiple/expected.json b/metrics/integration/query-tests/options/layers-multiple/expected.json new file mode 100644 index 00000000000..76193dbe851 --- /dev/null +++ b/metrics/integration/query-tests/options/layers-multiple/expected.json @@ -0,0 +1,32 @@ +[ + { + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + }, + "type": "Feature", + "properties": { + "key": "value" + }, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + }, + "type": "Feature", + "properties": { + "key": "value" + }, + "source": "geojson", + "state": {} + } +] \ No newline at end of file diff --git a/metrics/integration/query-tests/options/layers-multiple/style.json b/metrics/integration/query-tests/options/layers-multiple/style.json new file mode 100644 index 00000000000..db5307e7c34 --- /dev/null +++ b/metrics/integration/query-tests/options/layers-multiple/style.json @@ -0,0 +1,46 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "queryGeometry": [ + 32, + 32 + ], + "queryOptions": { + "layers": ["a", "b"] + } + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + }, + "properties": { + "key": "value" + } + } + } + }, + "layers": [ + { + "id": "a", + "type": "circle", + "source": "geojson" + }, + { + "id": "b", + "type": "circle", + "source": "geojson" + } + ] +} diff --git a/metrics/integration/query-tests/options/layers-one/expected.json b/metrics/integration/query-tests/options/layers-one/expected.json new file mode 100644 index 00000000000..4e8e4d91f7d --- /dev/null +++ b/metrics/integration/query-tests/options/layers-one/expected.json @@ -0,0 +1,17 @@ +[ + { + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + }, + "type": "Feature", + "properties": { + "key": "value" + }, + "source": "geojson", + "state": {} + } +] \ No newline at end of file diff --git a/metrics/integration/query-tests/options/layers-one/style.json b/metrics/integration/query-tests/options/layers-one/style.json new file mode 100644 index 00000000000..29047e661bb --- /dev/null +++ b/metrics/integration/query-tests/options/layers-one/style.json @@ -0,0 +1,46 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "queryGeometry": [ + 32, + 32 + ], + "queryOptions": { + "layers": ["a"] + } + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + }, + "properties": { + "key": "value" + } + } + } + }, + "layers": [ + { + "id": "a", + "type": "circle", + "source": "geojson" + }, + { + "id": "b", + "type": "circle", + "source": "geojson" + } + ] +} diff --git a/metrics/integration/query-tests/regressions/mapbox-gl-js#3534/expected.json b/metrics/integration/query-tests/regressions/mapbox-gl-js#3534/expected.json new file mode 100644 index 00000000000..cb737473618 --- /dev/null +++ b/metrics/integration/query-tests/regressions/mapbox-gl-js#3534/expected.json @@ -0,0 +1,321 @@ +[ + { + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -74.52850341796875, + 39.56970506644248 + ], + [ + -74.54498291015625, + 39.58029027440864 + ], + [ + -74.542236328125, + 39.586640623314594 + ], + [ + -74.55322265625, + 39.59933957529532 + ], + [ + -74.57794189453125, + 39.59933957529532 + ], + [ + -74.58892822265625, + 39.612036199336956 + ], + [ + -74.6246337890625, + 39.62684598486689 + ], + [ + -74.63287353515625, + 39.62049932196811 + ], + [ + -74.6356201171875, + 39.62896140981414 + ], + [ + -74.6575927734375, + 39.62896140981414 + ], + [ + -74.66033935546875, + 39.66914219401812 + ], + [ + -74.6685791015625, + 39.68393975392732 + ], + [ + -74.77294921875, + 39.751545363937595 + ], + [ + -74.80865478515625, + 39.785323314592574 + ], + [ + -74.8388671875, + 39.79165483525341 + ], + [ + -74.8773193359375, + 39.78321267821704 + ], + [ + -74.89654541015625, + 39.785323314592574 + ], + [ + -74.90478515625, + 39.79165483525341 + ], + [ + -74.9322509765625, + 39.88866516883712 + ], + [ + -74.95147705078125, + 39.8992015115692 + ], + [ + -74.9652099609375, + 39.92026933763398 + ], + [ + -74.98443603515625, + 39.92869465373238 + ], + [ + -74.9761962890625, + 39.9413306837869 + ], + [ + -75.01739501953125, + 39.947647823922495 + ], + [ + -75.0146484375, + 39.95817509460008 + ], + [ + -75.0201416015625, + 39.96870074491696 + ], + [ + -75.01190185546875, + 39.981329386272165 + ], + [ + -75.0201416015625, + 39.98974718404571 + ], + [ + -75.03387451171875, + 39.99185147142347 + ], + [ + -75.03662109375, + 39.9981639445858 + ], + [ + -75.06134033203125, + 39.99185147142347 + ], + [ + -75.047607421875, + 40.01078714046551 + ], + [ + -75.0146484375, + 40.02130468739708 + ], + [ + -74.96795654296875, + 40.05284760182397 + ], + [ + -74.92950439453125, + 40.071766346626106 + ], + [ + -74.90753173828125, + 40.071766346626106 + ], + [ + -74.86358642578125, + 40.08437592451517 + ], + [ + -74.8553466796875, + 40.09488212232117 + ], + [ + -74.8388671875, + 40.10118506258701 + ], + [ + -74.82513427734375, + 40.128491056854074 + ], + [ + -74.78668212890625, + 40.12219064672337 + ], + [ + -74.761962890625, + 40.13479088304851 + ], + [ + -74.74273681640625, + 40.1368906953459 + ], + [ + -74.72076416015625, + 40.14948820651523 + ], + [ + -74.70428466796875, + 40.17047886718112 + ], + [ + -74.7125244140625, + 40.168380093142446 + ], + [ + -74.7125244140625, + 40.180971763887186 + ], + [ + -74.70428466796875, + 40.18516846826054 + ], + [ + -74.67681884765625, + 40.17467622056341 + ], + [ + -74.6795654296875, + 40.16628125420655 + ], + [ + -74.6630859375, + 40.16628125420655 + ], + [ + -74.6356201171875, + 40.14948820651523 + ], + [ + -74.6246337890625, + 40.14948820651523 + ], + [ + -74.6246337890625, + 40.14318974292439 + ], + [ + -74.6026611328125, + 40.1368906953459 + ], + [ + -74.58892822265625, + 40.13899044275823 + ], + [ + -74.39117431640625, + 39.77476948529548 + ], + [ + -74.39117431640625, + 39.59722324495564 + ], + [ + -74.40216064453125, + 39.57393934359189 + ], + [ + -74.42138671875, + 39.56970506644248 + ], + [ + -74.41864013671875, + 39.55911824217185 + ], + [ + -74.44061279296875, + 39.55488305992401 + ], + [ + -74.4378662109375, + 39.54217596171196 + ], + [ + -74.44610595703125, + 39.546411919686705 + ], + [ + -74.443359375, + 39.557000683371285 + ], + [ + -74.454345703125, + 39.55911824217185 + ], + [ + -74.45709228515625, + 39.54852980171148 + ], + [ + -74.46533203125, + 39.557000683371285 + ], + [ + -74.476318359375, + 39.552765371831015 + ], + [ + -74.48455810546875, + 39.55911824217185 + ], + [ + -74.49554443359375, + 39.557000683371285 + ], + [ + -74.5037841796875, + 39.56970506644248 + ], + [ + -74.51202392578125, + 39.56970506644248 + ], + [ + -74.51751708984375, + 39.57393934359189 + ], + [ + -74.52850341796875, + 39.56970506644248 + ] + ] + ] + }, + "type": "Feature", + "properties": { + "id": "34005", + "name": "Burlington County", + "pop_density": 2007.2920458152796 + }, + "id": 33, + "source": "us-counties", + "sourceLayer": "counties", + "state": {} + } +] \ No newline at end of file diff --git a/metrics/integration/query-tests/regressions/mapbox-gl-js#3534/style.json b/metrics/integration/query-tests/regressions/mapbox-gl-js#3534/style.json new file mode 100644 index 00000000000..a48e146804f --- /dev/null +++ b/metrics/integration/query-tests/regressions/mapbox-gl-js#3534/style.json @@ -0,0 +1,62 @@ +{ + "version": 8, + "metadata": { + "test": { + "collisionDebug": true, + "width": 500, + "height": 500, + "queryGeometry": [ + 266, + 271 + ], + "queryOptions": { + "layers": [ + "counties-symbol" + ] + } + } + }, + "center": [ + -74.522, + 39.92 + ], + "zoom": 7, + "sources": { + "us-counties": { + "type": "vector", + "maxzoom": 7, + "minzoom": 7, + "tiles": [ + "local://tiles/counties-{z}-{x}-{y}.mvt" + ] + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "counties-fill", + "type": "fill", + "source": "us-counties", + "source-layer": "counties" + }, + { + "id": "counties-symbol", + "type": "symbol", + "source": "us-counties", + "source-layer": "counties", + "layout": { + "text-field": "{name}", + "text-size": 11, + "symbol-spacing": 60, + "text-max-angle": 1000, + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "symbol-placement": "line" + }, + "interactive": true + } + ] +} \ No newline at end of file diff --git a/metrics/integration/query-tests/regressions/mapbox-gl-js#4417/expected.json b/metrics/integration/query-tests/regressions/mapbox-gl-js#4417/expected.json new file mode 100644 index 00000000000..78cdaddf9e1 --- /dev/null +++ b/metrics/integration/query-tests/regressions/mapbox-gl-js#4417/expected.json @@ -0,0 +1,17 @@ +[ + { + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + }, + "type": "Feature", + "properties": { + "radius": 20 + }, + "source": "mapbox", + "state": {} + } +] \ No newline at end of file diff --git a/metrics/integration/query-tests/regressions/mapbox-gl-js#4417/style.json b/metrics/integration/query-tests/regressions/mapbox-gl-js#4417/style.json new file mode 100644 index 00000000000..186523338b6 --- /dev/null +++ b/metrics/integration/query-tests/regressions/mapbox-gl-js#4417/style.json @@ -0,0 +1,77 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "queryGeometry": [ + 32, + 16 + ] + } + }, + "sources": { + "dummy": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + }, + "mapbox": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "radius": 20 + }, + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + "radius": 5 + }, + "geometry": { + "type": "Point", + "coordinates": [ + 5, + 15 + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "mapbox", + "paint": { + "circle-radius": { + "type": "identity", + "property": "radius" + } + } + }, + { + "id": "dummy", + "type": "circle", + "source": "dummy" + } + ] +} \ No newline at end of file diff --git a/metrics/integration/query-tests/regressions/mapbox-gl-js#4494/expected.json b/metrics/integration/query-tests/regressions/mapbox-gl-js#4494/expected.json new file mode 100644 index 00000000000..99696c8ebfa --- /dev/null +++ b/metrics/integration/query-tests/regressions/mapbox-gl-js#4494/expected.json @@ -0,0 +1,16 @@ +[ + { + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + }, + "type": "Feature", + "properties": {}, + "source": "geojson", + "state": {}, + "id": "foo" + } +] diff --git a/metrics/integration/query-tests/regressions/mapbox-gl-js#4494/style.json b/metrics/integration/query-tests/regressions/mapbox-gl-js#4494/style.json new file mode 100644 index 00000000000..c470cb2b1dc --- /dev/null +++ b/metrics/integration/query-tests/regressions/mapbox-gl-js#4494/style.json @@ -0,0 +1,39 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "queryGeometry": [ + 32, + 32 + ], + "debug": true + } + }, + "zoom": 0, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Feature", + "id": "foo", + "properties": {}, + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson" + } + ] +} \ No newline at end of file diff --git a/metrics/integration/query-tests/regressions/mapbox-gl-js#5172/expected.json b/metrics/integration/query-tests/regressions/mapbox-gl-js#5172/expected.json new file mode 100644 index 00000000000..cacc3f5ec37 --- /dev/null +++ b/metrics/integration/query-tests/regressions/mapbox-gl-js#5172/expected.json @@ -0,0 +1,15 @@ +[ + { + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + }, + "type": "Feature", + "properties": {}, + "source": "source", + "state": {} + } +] \ No newline at end of file diff --git a/metrics/integration/query-tests/regressions/mapbox-gl-js#5172/style.json b/metrics/integration/query-tests/regressions/mapbox-gl-js#5172/style.json new file mode 100644 index 00000000000..065210cba80 --- /dev/null +++ b/metrics/integration/query-tests/regressions/mapbox-gl-js#5172/style.json @@ -0,0 +1,70 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 128, + "height": 128, + "queryGeometry": [ + 64, + 64 + ], + "queryOptions": { + "layers": ["iconlayer"] + } + } + }, + "zoom": 0, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "sprite": "local://sprites/sprite", + "sources": { + "source": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [{ + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [0, 0] + } + + }] + } + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "iconlayer", + "type": "symbol", + "source": "source", + "layout": { + "icon-image": "building-12", + "icon-allow-overlap": true + } + }, + { + "id": "textlayer", + "type": "symbol", + "source": "source", + "layout": { + "text-field": "ABC", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-size": 24, + "text-offset": [0, 0] + }, + "paint": { + "text-color": "green" + } + } + ] +} diff --git a/metrics/integration/query-tests/regressions/mapbox-gl-js#5473/expected.json b/metrics/integration/query-tests/regressions/mapbox-gl-js#5473/expected.json new file mode 100644 index 00000000000..0637a088a01 --- /dev/null +++ b/metrics/integration/query-tests/regressions/mapbox-gl-js#5473/expected.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/metrics/integration/query-tests/regressions/mapbox-gl-js#5473/style.json b/metrics/integration/query-tests/regressions/mapbox-gl-js#5473/style.json new file mode 100644 index 00000000000..399af386a30 --- /dev/null +++ b/metrics/integration/query-tests/regressions/mapbox-gl-js#5473/style.json @@ -0,0 +1,57 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 128, + "height": 128, + "queryGeometry": [ + 64, + 64 + ] + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "sources": { + "source": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "identifier": "firstSource" + }, + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "heatmap", + "source": "source", + "type": "heatmap", + "paint": { + "heatmap-radius": 50, + "heatmap-weight": 10, + "heatmap-intensity": 0.9, + "heatmap-color": "red" + } + } + ] +} diff --git a/metrics/integration/query-tests/regressions/mapbox-gl-js#5554/expected.json b/metrics/integration/query-tests/regressions/mapbox-gl-js#5554/expected.json new file mode 100644 index 00000000000..781351916e1 --- /dev/null +++ b/metrics/integration/query-tests/regressions/mapbox-gl-js#5554/expected.json @@ -0,0 +1,17 @@ +[ + { + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 5.003394345022144 + ] + }, + "type": "Feature", + "properties": { + "identifier": "secondSource" + }, + "source": "secondSource", + "state": {} + } +] \ No newline at end of file diff --git a/metrics/integration/query-tests/regressions/mapbox-gl-js#5554/style.json b/metrics/integration/query-tests/regressions/mapbox-gl-js#5554/style.json new file mode 100644 index 00000000000..38159f4bc35 --- /dev/null +++ b/metrics/integration/query-tests/regressions/mapbox-gl-js#5554/style.json @@ -0,0 +1,95 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 128, + "height": 128, + "queryGeometry": [ + 64, + 64 + ] + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "sources": { + "firstSource": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "identifier": "firstSource" + }, + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + ] + } + }, + "secondSource": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "identifier": "secondSource" + }, + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 5 + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "firstLabel", + "source": "firstSource", + "type": "symbol", + "layout": { + "text-field": "First Source", + "text-size": 11, + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "symbol-placement": "point" + } + }, + { + "id": "secondLabel", + "source": "secondSource", + "type": "symbol", + "layout": { + "text-field": "Second Source", + "text-size": 11, + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "symbol-placement": "point" + } + } + ] +} diff --git a/metrics/integration/query-tests/regressions/mapbox-gl-js#6075/expected.json b/metrics/integration/query-tests/regressions/mapbox-gl-js#6075/expected.json new file mode 100644 index 00000000000..cacc3f5ec37 --- /dev/null +++ b/metrics/integration/query-tests/regressions/mapbox-gl-js#6075/expected.json @@ -0,0 +1,15 @@ +[ + { + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + }, + "type": "Feature", + "properties": {}, + "source": "source", + "state": {} + } +] \ No newline at end of file diff --git a/metrics/integration/query-tests/regressions/mapbox-gl-js#6075/style.json b/metrics/integration/query-tests/regressions/mapbox-gl-js#6075/style.json new file mode 100644 index 00000000000..6dbcc82d428 --- /dev/null +++ b/metrics/integration/query-tests/regressions/mapbox-gl-js#6075/style.json @@ -0,0 +1,51 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 128, + "height": 128, + "queryGeometry": [ + 79, + 64 + ], + "queryOptions": { + } + } + }, + "zoom": 0, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "sprite": "local://sprites/sprite", + "sources": { + "source": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [{ + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [0, 0] + } + }] + } + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "iconlayer", + "type": "symbol", + "source": "source", + "layout": { + "icon-image": "building-12", + "icon-offset": [15, 0] + } + } + ] +} diff --git a/metrics/integration/query-tests/regressions/mapbox-gl-js#6555/expected.json b/metrics/integration/query-tests/regressions/mapbox-gl-js#6555/expected.json new file mode 100644 index 00000000000..3d0162abc59 --- /dev/null +++ b/metrics/integration/query-tests/regressions/mapbox-gl-js#6555/expected.json @@ -0,0 +1,15 @@ +[ + { + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + }, + "type": "Feature", + "properties": {}, + "source": "source", + "state": {} + } +] diff --git a/metrics/integration/query-tests/regressions/mapbox-gl-js#6555/style.json b/metrics/integration/query-tests/regressions/mapbox-gl-js#6555/style.json new file mode 100644 index 00000000000..b1e790b7b10 --- /dev/null +++ b/metrics/integration/query-tests/regressions/mapbox-gl-js#6555/style.json @@ -0,0 +1,59 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 128, + "height": 128, + "operations": [ + [ + "querySourceFeatures", + [ + "source" + ] + ] + ], + "queryGeometry": [ + 79, + 64 + ], + "queryOptions": { + } + } + }, + "zoom": 0, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "sprite": "local://sprites/sprite", + "sources": { + "source": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [{ + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [0, 0] + } + }] + } + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "iconlayer", + "type": "symbol", + "source": "source", + "layout": { + "icon-image": "building-12", + "icon-offset": [15, 0] + } + } + ] +} diff --git a/metrics/integration/query-tests/regressions/mapbox-gl-js#7883/expected.json b/metrics/integration/query-tests/regressions/mapbox-gl-js#7883/expected.json new file mode 100644 index 00000000000..15920911781 --- /dev/null +++ b/metrics/integration/query-tests/regressions/mapbox-gl-js#7883/expected.json @@ -0,0 +1,142 @@ +[ + { + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -30.0146484375, + 0 + ], + [ + -30.0146484375, + 50.00773901463688 + ], + [ + 30.0146484375, + 50.00773901463688 + ], + [ + 30.0146484375, + 0 + ], + [ + -30.0146484375, + 0 + ] + ] + ] + }, + "type": "Feature", + "properties": { + "layer": "upper" + }, + "source": "fill-upper", + "state": {} + }, + { + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -10.01953125, + -20.01464544534136 + ], + [ + -10.01953125, + 40.01078714046551 + ], + [ + 39.990234375, + 40.01078714046551 + ], + [ + 39.990234375, + -20.01464544534136 + ], + [ + -10.01953125, + -20.01464544534136 + ] + ] + ] + }, + "type": "Feature", + "properties": { + "layer": "extrusion_closer" + }, + "source": "extrusion_closer", + "state": {} + }, + { + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -39.990234375, + -40.01078714046552 + ], + [ + -39.990234375, + 40.01078714046551 + ], + [ + 10.01953125, + 40.01078714046551 + ], + [ + 10.01953125, + -40.01078714046552 + ], + [ + -39.990234375, + -40.01078714046552 + ] + ] + ] + }, + "type": "Feature", + "properties": { + "layer": "extrusion_further" + }, + "source": "extrusion", + "state": {} + }, + { + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -50.009765625, + -50.00773901463686 + ], + [ + -50.009765625, + 50.00773901463688 + ], + [ + 50.009765625, + 50.00773901463688 + ], + [ + 50.009765625, + -50.00773901463686 + ], + [ + -50.009765625, + -50.00773901463686 + ] + ] + ] + }, + "type": "Feature", + "properties": { + "layer": "fill-lower" + }, + "source": "fill-lower", + "state": {} + } +] \ No newline at end of file diff --git a/metrics/integration/query-tests/regressions/mapbox-gl-js#7883/style.json b/metrics/integration/query-tests/regressions/mapbox-gl-js#7883/style.json new file mode 100644 index 00000000000..d9f6901e79c --- /dev/null +++ b/metrics/integration/query-tests/regressions/mapbox-gl-js#7883/style.json @@ -0,0 +1,202 @@ +{ + "version": 8, + "metadata": { + "test": { + "debug": true, + "width": 200, + "height": 200, + "queryGeometry": [ + 100, + 40 + ] + } + }, + "pitch": 25, + "center": [ + 0, + 0 + ], + "zoom": 0, + "sources": { + "fill-lower": { + "type": "geojson", + "data": { + "type": "Feature", + "properties": { + "layer": "fill-lower" + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -50, + -50 + ], + [ + -50, + 50 + ], + [ + 50, + 50 + ], + [ + 50, + -50 + ], + [ + -50, + -50 + ] + ] + ] + } + } + }, + "extrusion_closer": { + "type": "geojson", + "data": { + "type": "Feature", + "properties": { + "layer": "extrusion_closer" + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -10, + -20 + ], + [ + -10, + 40 + ], + [ + 40, + 40 + ], + [ + 40, + -20 + ], + [ + -10, + -20 + ] + ] + ] + } + } + }, + "extrusion": { + "type": "geojson", + "data": { + "type": "Feature", + "properties": { + "layer": "extrusion_further" + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -40, + -40 + ], + [ + -40, + 40 + ], + [ + 10, + 40 + ], + [ + 10, + -40 + ], + [ + -40, + -40 + ] + ] + ] + } + } + }, + "fill-upper": { + "type": "geojson", + "data": { + "type": "Feature", + "properties": { + "layer": "upper" + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -30, + -0 + ], + [ + -30, + 50 + ], + [ + 30, + 50 + ], + [ + 30, + -0 + ], + [ + -30, + -0 + ] + ] + ] + } + } + } + }, + "layers": [ + { + "id": "fill-lower", + "type": "fill", + "source": "fill-lower", + "paint": { + "fill-color": "#0f0" + } + }, + { + "id": "extrusion_closer", + "type": "fill-extrusion", + "source": "extrusion_closer", + "paint": { + "fill-extrusion-color": "#ecc", + "fill-extrusion-height": 12000000 + } + }, + { + "id": "fill-upper", + "type": "fill", + "source": "fill-upper", + "paint": { + "fill-color": "#00f" + } + }, + { + "id": "extrusion", + "type": "fill-extrusion", + "source": "extrusion", + "paint": { + "fill-extrusion-color": "#ccc", + "fill-extrusion-height": 10000000 + } + } + ] +} diff --git a/metrics/integration/query-tests/regressions/mapbox-gl-js#8999/expected.json b/metrics/integration/query-tests/regressions/mapbox-gl-js#8999/expected.json new file mode 100644 index 00000000000..dfff758fd3a --- /dev/null +++ b/metrics/integration/query-tests/regressions/mapbox-gl-js#8999/expected.json @@ -0,0 +1,33 @@ +[ + { + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -19.9951171875, + -40.01078714046552 + ], + [ + -19.9951171875, + 40.01078714046551 + ], + [ + 39.990234375, + 40.01078714046551 + ], + [ + -19.9951171875, + -40.01078714046552 + ] + ] + ] + }, + "type": "Feature", + "properties": { + "layer": "extrusion_three_points" + }, + "source": "extrusion_three_points", + "state": {} + } +] \ No newline at end of file diff --git a/metrics/integration/query-tests/regressions/mapbox-gl-js#8999/style.json b/metrics/integration/query-tests/regressions/mapbox-gl-js#8999/style.json new file mode 100644 index 00000000000..79ad18acab5 --- /dev/null +++ b/metrics/integration/query-tests/regressions/mapbox-gl-js#8999/style.json @@ -0,0 +1,65 @@ +{ + "version": 8, + "metadata": { + "test": { + "debug": true, + "width": 200, + "height": 200, + "queryGeometry": [ + 100, + 40 + ] + } + }, + "pitch": 0, + "center": [ + 0, + 0 + ], + "zoom": 0, + "sources": { + "extrusion_three_points": { + "type": "geojson", + "data": { + "type": "Feature", + "properties": { + "layer": "extrusion_three_points" + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -20, + -40 + ], + [ + -20, + 40 + ], + [ + 40, + 40 + ], + [ + -20, + -40 + ] + ] + ] + } + } + } + }, + "layers": [ + { + "id": "extrusion_three_points", + "type": "fill-extrusion", + "source": "extrusion_three_points", + "paint": { + "fill-extrusion-color": "#ecc", + "fill-extrusion-height": 0 + } + } + ] +} diff --git a/metrics/integration/query-tests/remove-feature-state/default/expected.json b/metrics/integration/query-tests/remove-feature-state/default/expected.json new file mode 100644 index 00000000000..51de80fe451 --- /dev/null +++ b/metrics/integration/query-tests/remove-feature-state/default/expected.json @@ -0,0 +1,92 @@ +[ + { + "geometry": { + "type": "LineString", + "coordinates": [ + [ + 13.406662344932556, + 52.49845542419487 + ], + [ + 13.406715989112854, + 52.49853706825692 + ], + [ + 13.407037854194641, + 52.499007335102704 + ], + [ + 13.40782642364502, + 52.50002296369735 + ], + [ + 13.409215807914734, + 52.50175045812034 + ] + ] + }, + "type": "Feature", + "properties": { + "class": "main", + "oneway": 0, + "osm_id": 4612696, + "type": "secondary" + }, + "id": 4612696, + "source": "mapbox", + "sourceLayer": "road", + "state": {} + }, + { + "geometry": { + "type": "LineString", + "coordinates": [ + [ + 13.404956459999084, + 52.50075446300568 + ], + [ + 13.405857682228088, + 52.500525870779285 + ], + [ + 13.40782642364502, + 52.50002296369735 + ], + [ + 13.41029942035675, + 52.49939268890719 + ], + [ + 13.410347700119019, + 52.49937962612168 + ], + [ + 13.410476446151733, + 52.49934370344147 + ], + [ + 13.410674929618835, + 52.499291452217875 + ], + [ + 13.4122896194458, + 52.498840782836766 + ] + ] + }, + "type": "Feature", + "properties": { + "class": "street", + "oneway": 0, + "osm_id": 4612752, + "type": "residential" + }, + "id": 4612752, + "source": "mapbox", + "sourceLayer": "road", + "state": { + "stateA": false + } + } +] \ No newline at end of file diff --git a/metrics/integration/query-tests/remove-feature-state/default/style.json b/metrics/integration/query-tests/remove-feature-state/default/style.json new file mode 100644 index 00000000000..2e0da0bd8eb --- /dev/null +++ b/metrics/integration/query-tests/remove-feature-state/default/style.json @@ -0,0 +1,112 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256, + "operations": [ + [ + "setFeatureState", + { + "source": "mapbox", + "sourceLayer": "road", + "id": 4612696 + }, + { + "stateA": 1, + "stateB": true + } + ], + [ + "setFeatureState", + { + "source": "mapbox", + "sourceLayer": "road", + "id": 4612752 + }, + { + "stateA": 1, + "stateB": false + } + ], + [ + "removeFeatureState", + { + "source": "mapbox", + "sourceLayer": "road" + } + ], + [ + "setFeatureState", + { + "source": "mapbox", + "sourceLayer": "road", + "id": 4612696 + }, + { + "stateA": true, + "stateB": true + } + ], + [ + "setFeatureState", + { + "source": "mapbox", + "sourceLayer": "road", + "id": 4612752 + }, + { + "stateA": false, + "stateB": false + } + ], + [ + "removeFeatureState", + { + "source": "mapbox", + "sourceLayer": "road", + "id": 4612696 + } + ], + [ + "removeFeatureState", + { + "source": "mapbox", + "sourceLayer": "road", + "id": 4612752 + }, + "stateB" + ] + ], + "queryGeometry": [ + 10, + 100 + ] + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "layers": [ + { + "id": "road", + "type": "circle", + "source": "mapbox", + "source-layer": "road", + "paint": { + "circle-radius": 10 + }, + "interactive": true + } + ] +} \ No newline at end of file diff --git a/metrics/integration/query-tests/result_item.html.tmpl b/metrics/integration/query-tests/result_item.html.tmpl new file mode 100644 index 00000000000..cd3a5d80867 --- /dev/null +++ b/metrics/integration/query-tests/result_item.html.tmpl @@ -0,0 +1,10 @@ +
+

<%- r.status %> <%- r.id %>

+ <% if (r.status !== 'errored') { %> + + <% } %> + <% if (r.error) { %>

Error: <%- r.error.message %>

<% } %> + <% if (r.difference) { %> +
<%- r.difference.trim() %>
+ <% } %> +
diff --git a/metrics/integration/query-tests/symbol-features-in/fractional-outside/expected.json b/metrics/integration/query-tests/symbol-features-in/fractional-outside/expected.json new file mode 100644 index 00000000000..0637a088a01 --- /dev/null +++ b/metrics/integration/query-tests/symbol-features-in/fractional-outside/expected.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/metrics/integration/query-tests/symbol-features-in/fractional-outside/style.json b/metrics/integration/query-tests/symbol-features-in/fractional-outside/style.json new file mode 100644 index 00000000000..c468138abdf --- /dev/null +++ b/metrics/integration/query-tests/symbol-features-in/fractional-outside/style.json @@ -0,0 +1,57 @@ +{ + "version": 8, + "metadata": { + "test": { + "collisionDebug": true, + "width": 500, + "height": 500, + "queryGeometry": [ + [ + 260, + 260 + ], + [ + 279, + 283 + ] + ] + } + }, + "center": [ + -74.522, + 39.92 + ], + "zoom": 7.85, + "sources": { + "us-counties": { + "type": "vector", + "maxzoom": 7, + "minzoom": 7, + "tiles": [ + "local://tiles/counties-{z}-{x}-{y}.mvt" + ] + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "counties", + "type": "symbol", + "source": "us-counties", + "source-layer": "counties", + "layout": { + "text-field": "{name}", + "text-size": 11, + "symbol-spacing": 60, + "text-max-angle": 1000, + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "symbol-placement": "line" + }, + "interactive": true + } + ] +} \ No newline at end of file diff --git a/metrics/integration/query-tests/symbol-features-in/hidden/expected.json b/metrics/integration/query-tests/symbol-features-in/hidden/expected.json new file mode 100644 index 00000000000..0637a088a01 --- /dev/null +++ b/metrics/integration/query-tests/symbol-features-in/hidden/expected.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/metrics/integration/query-tests/symbol-features-in/hidden/style.json b/metrics/integration/query-tests/symbol-features-in/hidden/style.json new file mode 100644 index 00000000000..082e7538f49 --- /dev/null +++ b/metrics/integration/query-tests/symbol-features-in/hidden/style.json @@ -0,0 +1,57 @@ +{ + "version": 8, + "metadata": { + "test": { + "collisionDebug": true, + "width": 500, + "height": 500, + "queryGeometry": [ + [ + 220, + 210 + ], + [ + 280, + 241 + ] + ] + } + }, + "center": [ + -74.522, + 39.92 + ], + "zoom": 7, + "sources": { + "us-counties": { + "type": "vector", + "maxzoom": 7, + "minzoom": 7, + "tiles": [ + "local://tiles/counties-{z}-{x}-{y}.mvt" + ] + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "counties", + "type": "symbol", + "source": "us-counties", + "source-layer": "counties", + "layout": { + "text-field": "{name}", + "text-size": 11, + "symbol-spacing": 60, + "text-max-angle": 1000, + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "symbol-placement": "line" + }, + "interactive": true + } + ] +} \ No newline at end of file diff --git a/metrics/integration/query-tests/symbol-features-in/inside/expected.json b/metrics/integration/query-tests/symbol-features-in/inside/expected.json new file mode 100644 index 00000000000..cb737473618 --- /dev/null +++ b/metrics/integration/query-tests/symbol-features-in/inside/expected.json @@ -0,0 +1,321 @@ +[ + { + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -74.52850341796875, + 39.56970506644248 + ], + [ + -74.54498291015625, + 39.58029027440864 + ], + [ + -74.542236328125, + 39.586640623314594 + ], + [ + -74.55322265625, + 39.59933957529532 + ], + [ + -74.57794189453125, + 39.59933957529532 + ], + [ + -74.58892822265625, + 39.612036199336956 + ], + [ + -74.6246337890625, + 39.62684598486689 + ], + [ + -74.63287353515625, + 39.62049932196811 + ], + [ + -74.6356201171875, + 39.62896140981414 + ], + [ + -74.6575927734375, + 39.62896140981414 + ], + [ + -74.66033935546875, + 39.66914219401812 + ], + [ + -74.6685791015625, + 39.68393975392732 + ], + [ + -74.77294921875, + 39.751545363937595 + ], + [ + -74.80865478515625, + 39.785323314592574 + ], + [ + -74.8388671875, + 39.79165483525341 + ], + [ + -74.8773193359375, + 39.78321267821704 + ], + [ + -74.89654541015625, + 39.785323314592574 + ], + [ + -74.90478515625, + 39.79165483525341 + ], + [ + -74.9322509765625, + 39.88866516883712 + ], + [ + -74.95147705078125, + 39.8992015115692 + ], + [ + -74.9652099609375, + 39.92026933763398 + ], + [ + -74.98443603515625, + 39.92869465373238 + ], + [ + -74.9761962890625, + 39.9413306837869 + ], + [ + -75.01739501953125, + 39.947647823922495 + ], + [ + -75.0146484375, + 39.95817509460008 + ], + [ + -75.0201416015625, + 39.96870074491696 + ], + [ + -75.01190185546875, + 39.981329386272165 + ], + [ + -75.0201416015625, + 39.98974718404571 + ], + [ + -75.03387451171875, + 39.99185147142347 + ], + [ + -75.03662109375, + 39.9981639445858 + ], + [ + -75.06134033203125, + 39.99185147142347 + ], + [ + -75.047607421875, + 40.01078714046551 + ], + [ + -75.0146484375, + 40.02130468739708 + ], + [ + -74.96795654296875, + 40.05284760182397 + ], + [ + -74.92950439453125, + 40.071766346626106 + ], + [ + -74.90753173828125, + 40.071766346626106 + ], + [ + -74.86358642578125, + 40.08437592451517 + ], + [ + -74.8553466796875, + 40.09488212232117 + ], + [ + -74.8388671875, + 40.10118506258701 + ], + [ + -74.82513427734375, + 40.128491056854074 + ], + [ + -74.78668212890625, + 40.12219064672337 + ], + [ + -74.761962890625, + 40.13479088304851 + ], + [ + -74.74273681640625, + 40.1368906953459 + ], + [ + -74.72076416015625, + 40.14948820651523 + ], + [ + -74.70428466796875, + 40.17047886718112 + ], + [ + -74.7125244140625, + 40.168380093142446 + ], + [ + -74.7125244140625, + 40.180971763887186 + ], + [ + -74.70428466796875, + 40.18516846826054 + ], + [ + -74.67681884765625, + 40.17467622056341 + ], + [ + -74.6795654296875, + 40.16628125420655 + ], + [ + -74.6630859375, + 40.16628125420655 + ], + [ + -74.6356201171875, + 40.14948820651523 + ], + [ + -74.6246337890625, + 40.14948820651523 + ], + [ + -74.6246337890625, + 40.14318974292439 + ], + [ + -74.6026611328125, + 40.1368906953459 + ], + [ + -74.58892822265625, + 40.13899044275823 + ], + [ + -74.39117431640625, + 39.77476948529548 + ], + [ + -74.39117431640625, + 39.59722324495564 + ], + [ + -74.40216064453125, + 39.57393934359189 + ], + [ + -74.42138671875, + 39.56970506644248 + ], + [ + -74.41864013671875, + 39.55911824217185 + ], + [ + -74.44061279296875, + 39.55488305992401 + ], + [ + -74.4378662109375, + 39.54217596171196 + ], + [ + -74.44610595703125, + 39.546411919686705 + ], + [ + -74.443359375, + 39.557000683371285 + ], + [ + -74.454345703125, + 39.55911824217185 + ], + [ + -74.45709228515625, + 39.54852980171148 + ], + [ + -74.46533203125, + 39.557000683371285 + ], + [ + -74.476318359375, + 39.552765371831015 + ], + [ + -74.48455810546875, + 39.55911824217185 + ], + [ + -74.49554443359375, + 39.557000683371285 + ], + [ + -74.5037841796875, + 39.56970506644248 + ], + [ + -74.51202392578125, + 39.56970506644248 + ], + [ + -74.51751708984375, + 39.57393934359189 + ], + [ + -74.52850341796875, + 39.56970506644248 + ] + ] + ] + }, + "type": "Feature", + "properties": { + "id": "34005", + "name": "Burlington County", + "pop_density": 2007.2920458152796 + }, + "id": 33, + "source": "us-counties", + "sourceLayer": "counties", + "state": {} + } +] \ No newline at end of file diff --git a/metrics/integration/query-tests/symbol-features-in/inside/style.json b/metrics/integration/query-tests/symbol-features-in/inside/style.json new file mode 100644 index 00000000000..32949c14489 --- /dev/null +++ b/metrics/integration/query-tests/symbol-features-in/inside/style.json @@ -0,0 +1,57 @@ +{ + "version": 8, + "metadata": { + "test": { + "collisionDebug": true, + "width": 500, + "height": 500, + "queryGeometry": [ + [ + 230, + 250 + ], + [ + 300, + 300 + ] + ] + } + }, + "center": [ + -74.522, + 39.92 + ], + "zoom": 7, + "sources": { + "us-counties": { + "type": "vector", + "maxzoom": 7, + "minzoom": 7, + "tiles": [ + "local://tiles/counties-{z}-{x}-{y}.mvt" + ] + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "counties", + "type": "symbol", + "source": "us-counties", + "source-layer": "counties", + "layout": { + "text-field": "{name}", + "text-size": 11, + "symbol-spacing": 60, + "text-max-angle": 1000, + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "symbol-placement": "line" + }, + "interactive": true + } + ] +} \ No newline at end of file diff --git a/metrics/integration/query-tests/symbol-features-in/outside/expected.json b/metrics/integration/query-tests/symbol-features-in/outside/expected.json new file mode 100644 index 00000000000..0637a088a01 --- /dev/null +++ b/metrics/integration/query-tests/symbol-features-in/outside/expected.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/metrics/integration/query-tests/symbol-features-in/outside/style.json b/metrics/integration/query-tests/symbol-features-in/outside/style.json new file mode 100644 index 00000000000..6f6cf26798b --- /dev/null +++ b/metrics/integration/query-tests/symbol-features-in/outside/style.json @@ -0,0 +1,57 @@ +{ + "version": 8, + "metadata": { + "test": { + "collisionDebug": true, + "width": 500, + "height": 500, + "queryGeometry": [ + [ + 290, + 260 + ], + [ + 310, + 280 + ] + ] + } + }, + "center": [ + -74.522, + 39.92 + ], + "zoom": 7, + "sources": { + "us-counties": { + "type": "vector", + "maxzoom": 7, + "minzoom": 7, + "tiles": [ + "local://tiles/counties-{z}-{x}-{y}.mvt" + ] + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "counties", + "type": "symbol", + "source": "us-counties", + "source-layer": "counties", + "layout": { + "text-field": "{name}", + "text-size": 11, + "symbol-spacing": 60, + "text-max-angle": 1000, + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "symbol-placement": "line" + }, + "interactive": true + } + ] +} \ No newline at end of file diff --git a/metrics/integration/query-tests/symbol-features-in/pitched-screen/expected.json b/metrics/integration/query-tests/symbol-features-in/pitched-screen/expected.json new file mode 100644 index 00000000000..510c8e0424f --- /dev/null +++ b/metrics/integration/query-tests/symbol-features-in/pitched-screen/expected.json @@ -0,0 +1,86 @@ +[ + { + "geometry": { + "type": "Point", + "coordinates": [ + 4.000053405761719, + 4.999974190748432 + ] + }, + "type": "Feature", + "properties": {}, + "id": 108, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 4.999980926513672, + 4.999974190748432 + ] + }, + "type": "Feature", + "properties": {}, + "id": 119, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 4.000053405761719, + 4.000061604283047 + ] + }, + "type": "Feature", + "properties": {}, + "id": 107, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 4.000053405761719, + 2.999955856573024 + ] + }, + "type": "Feature", + "properties": {}, + "id": 106, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 2.9999542236328125, + 4.000061604283047 + ] + }, + "type": "Feature", + "properties": {}, + "id": 96, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 4.999980926513672, + 4.000061604283047 + ] + }, + "type": "Feature", + "properties": {}, + "id": 118, + "source": "geojson", + "state": {} + } +] \ No newline at end of file diff --git a/metrics/integration/query-tests/symbol-features-in/pitched-screen/style.json b/metrics/integration/query-tests/symbol-features-in/pitched-screen/style.json new file mode 100644 index 00000000000..7d4b0eea690 --- /dev/null +++ b/metrics/integration/query-tests/symbol-features-in/pitched-screen/style.json @@ -0,0 +1,54 @@ +{ + "version": 8, + "metadata": { + "test": { + "collisionDebug": true, + "debug": true, + "width": 1000, + "height": 1000, + "queryGeometry": [ + [ + 100, + 85 + ], + [ + 850, + 400 + ] + ] + } + }, + "center": [ + 3, + 3 + ], + "zoom": 8.75, + "pitch": 60, + "bearing": 45, + "sources": { + "geojson": { + "type": "geojson", + "data": "local://data/121points.geojson" + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "symbol-placement": "point", + "icon-image": "bicycle-12", + "text-field": "A lot of test text so that the collision box is big", + "text-max-width": 10, + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + }, + "interactive": true + } + ] +} \ No newline at end of file diff --git a/metrics/integration/query-tests/symbol-features-in/tilted-inside/expected.json b/metrics/integration/query-tests/symbol-features-in/tilted-inside/expected.json new file mode 100644 index 00000000000..cb737473618 --- /dev/null +++ b/metrics/integration/query-tests/symbol-features-in/tilted-inside/expected.json @@ -0,0 +1,321 @@ +[ + { + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -74.52850341796875, + 39.56970506644248 + ], + [ + -74.54498291015625, + 39.58029027440864 + ], + [ + -74.542236328125, + 39.586640623314594 + ], + [ + -74.55322265625, + 39.59933957529532 + ], + [ + -74.57794189453125, + 39.59933957529532 + ], + [ + -74.58892822265625, + 39.612036199336956 + ], + [ + -74.6246337890625, + 39.62684598486689 + ], + [ + -74.63287353515625, + 39.62049932196811 + ], + [ + -74.6356201171875, + 39.62896140981414 + ], + [ + -74.6575927734375, + 39.62896140981414 + ], + [ + -74.66033935546875, + 39.66914219401812 + ], + [ + -74.6685791015625, + 39.68393975392732 + ], + [ + -74.77294921875, + 39.751545363937595 + ], + [ + -74.80865478515625, + 39.785323314592574 + ], + [ + -74.8388671875, + 39.79165483525341 + ], + [ + -74.8773193359375, + 39.78321267821704 + ], + [ + -74.89654541015625, + 39.785323314592574 + ], + [ + -74.90478515625, + 39.79165483525341 + ], + [ + -74.9322509765625, + 39.88866516883712 + ], + [ + -74.95147705078125, + 39.8992015115692 + ], + [ + -74.9652099609375, + 39.92026933763398 + ], + [ + -74.98443603515625, + 39.92869465373238 + ], + [ + -74.9761962890625, + 39.9413306837869 + ], + [ + -75.01739501953125, + 39.947647823922495 + ], + [ + -75.0146484375, + 39.95817509460008 + ], + [ + -75.0201416015625, + 39.96870074491696 + ], + [ + -75.01190185546875, + 39.981329386272165 + ], + [ + -75.0201416015625, + 39.98974718404571 + ], + [ + -75.03387451171875, + 39.99185147142347 + ], + [ + -75.03662109375, + 39.9981639445858 + ], + [ + -75.06134033203125, + 39.99185147142347 + ], + [ + -75.047607421875, + 40.01078714046551 + ], + [ + -75.0146484375, + 40.02130468739708 + ], + [ + -74.96795654296875, + 40.05284760182397 + ], + [ + -74.92950439453125, + 40.071766346626106 + ], + [ + -74.90753173828125, + 40.071766346626106 + ], + [ + -74.86358642578125, + 40.08437592451517 + ], + [ + -74.8553466796875, + 40.09488212232117 + ], + [ + -74.8388671875, + 40.10118506258701 + ], + [ + -74.82513427734375, + 40.128491056854074 + ], + [ + -74.78668212890625, + 40.12219064672337 + ], + [ + -74.761962890625, + 40.13479088304851 + ], + [ + -74.74273681640625, + 40.1368906953459 + ], + [ + -74.72076416015625, + 40.14948820651523 + ], + [ + -74.70428466796875, + 40.17047886718112 + ], + [ + -74.7125244140625, + 40.168380093142446 + ], + [ + -74.7125244140625, + 40.180971763887186 + ], + [ + -74.70428466796875, + 40.18516846826054 + ], + [ + -74.67681884765625, + 40.17467622056341 + ], + [ + -74.6795654296875, + 40.16628125420655 + ], + [ + -74.6630859375, + 40.16628125420655 + ], + [ + -74.6356201171875, + 40.14948820651523 + ], + [ + -74.6246337890625, + 40.14948820651523 + ], + [ + -74.6246337890625, + 40.14318974292439 + ], + [ + -74.6026611328125, + 40.1368906953459 + ], + [ + -74.58892822265625, + 40.13899044275823 + ], + [ + -74.39117431640625, + 39.77476948529548 + ], + [ + -74.39117431640625, + 39.59722324495564 + ], + [ + -74.40216064453125, + 39.57393934359189 + ], + [ + -74.42138671875, + 39.56970506644248 + ], + [ + -74.41864013671875, + 39.55911824217185 + ], + [ + -74.44061279296875, + 39.55488305992401 + ], + [ + -74.4378662109375, + 39.54217596171196 + ], + [ + -74.44610595703125, + 39.546411919686705 + ], + [ + -74.443359375, + 39.557000683371285 + ], + [ + -74.454345703125, + 39.55911824217185 + ], + [ + -74.45709228515625, + 39.54852980171148 + ], + [ + -74.46533203125, + 39.557000683371285 + ], + [ + -74.476318359375, + 39.552765371831015 + ], + [ + -74.48455810546875, + 39.55911824217185 + ], + [ + -74.49554443359375, + 39.557000683371285 + ], + [ + -74.5037841796875, + 39.56970506644248 + ], + [ + -74.51202392578125, + 39.56970506644248 + ], + [ + -74.51751708984375, + 39.57393934359189 + ], + [ + -74.52850341796875, + 39.56970506644248 + ] + ] + ] + }, + "type": "Feature", + "properties": { + "id": "34005", + "name": "Burlington County", + "pop_density": 2007.2920458152796 + }, + "id": 33, + "source": "us-counties", + "sourceLayer": "counties", + "state": {} + } +] \ No newline at end of file diff --git a/metrics/integration/query-tests/symbol-features-in/tilted-inside/style.json b/metrics/integration/query-tests/symbol-features-in/tilted-inside/style.json new file mode 100644 index 00000000000..bd1dd7b68da --- /dev/null +++ b/metrics/integration/query-tests/symbol-features-in/tilted-inside/style.json @@ -0,0 +1,58 @@ +{ + "version": 8, + "metadata": { + "test": { + "collisionDebug": true, + "width": 500, + "height": 500, + "queryGeometry": [ + [ + 230, + 250 + ], + [ + 310, + 300 + ] + ] + } + }, + "center": [ + -74.522, + 39.92 + ], + "zoom": 9, + "pitch": 40, + "sources": { + "us-counties": { + "type": "vector", + "maxzoom": 7, + "minzoom": 7, + "tiles": [ + "local://tiles/counties-{z}-{x}-{y}.mvt" + ] + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "counties", + "type": "symbol", + "source": "us-counties", + "source-layer": "counties", + "layout": { + "text-field": "{name}", + "text-size": 11, + "symbol-spacing": 60, + "text-max-angle": 1000, + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "symbol-placement": "line" + }, + "interactive": true + } + ] +} \ No newline at end of file diff --git a/metrics/integration/query-tests/symbol-features-in/tilted-outside/expected.json b/metrics/integration/query-tests/symbol-features-in/tilted-outside/expected.json new file mode 100644 index 00000000000..0637a088a01 --- /dev/null +++ b/metrics/integration/query-tests/symbol-features-in/tilted-outside/expected.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/metrics/integration/query-tests/symbol-features-in/tilted-outside/style.json b/metrics/integration/query-tests/symbol-features-in/tilted-outside/style.json new file mode 100644 index 00000000000..ad8f0abd2e6 --- /dev/null +++ b/metrics/integration/query-tests/symbol-features-in/tilted-outside/style.json @@ -0,0 +1,58 @@ +{ + "version": 8, + "metadata": { + "test": { + "collisionDebug": true, + "width": 500, + "height": 500, + "queryGeometry": [ + [ + 230, + 250 + ], + [ + 300, + 300 + ] + ] + } + }, + "center": [ + -74.522, + 39.92 + ], + "zoom": 9, + "pitch": 40, + "sources": { + "us-counties": { + "type": "vector", + "maxzoom": 7, + "minzoom": 7, + "tiles": [ + "local://tiles/counties-{z}-{x}-{y}.mvt" + ] + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "counties", + "type": "symbol", + "source": "us-counties", + "source-layer": "counties", + "layout": { + "text-field": "{name}", + "text-size": 11, + "symbol-spacing": 60, + "text-max-angle": 1000, + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "symbol-placement": "line" + }, + "interactive": true + } + ] +} \ No newline at end of file diff --git a/metrics/integration/query-tests/symbol-ignore-placement/inside/expected.json b/metrics/integration/query-tests/symbol-ignore-placement/inside/expected.json new file mode 100644 index 00000000000..e90a5f78e71 --- /dev/null +++ b/metrics/integration/query-tests/symbol-ignore-placement/inside/expected.json @@ -0,0 +1,344 @@ +[ + { + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -74.26483154296875, + 40.168380093142446 + ], + [ + -74.25933837890625, + 40.16208338164617 + ], + [ + -74.2620849609375, + 40.14948820651523 + ], + [ + -74.25384521484375, + 40.14738878354049 + ], + [ + -74.24285888671875, + 40.1305910638018 + ], + [ + -74.24560546875, + 40.117990048904744 + ], + [ + -74.23187255859375, + 40.109588074741396 + ], + [ + -74.20440673828125, + 40.11378919157522 + ], + [ + -74.16046142578125, + 40.107487419012415 + ], + [ + -74.1522216796875, + 40.099084147368444 + ], + [ + -74.1082763671875, + 40.13899044275823 + ], + [ + -74.09454345703125, + 40.109588074741396 + ], + [ + -74.07257080078125, + 40.09067983779909 + ], + [ + -74.0478515625, + 40.10538669840983 + ], + [ + -73.9654541015625, + 40.099084147368444 + ], + [ + -74.00115966796875, + 39.97712009843963 + ], + [ + -74.03411865234375, + 39.77054750039528 + ], + [ + -74.04510498046875, + 39.73676229957945 + ], + [ + -74.0972900390625, + 39.650112101863726 + ], + [ + -74.234619140625, + 39.47648555419738 + ], + [ + -74.29779052734375, + 39.47648555419738 + ], + [ + -74.31427001953125, + 39.50192146626986 + ], + [ + -74.3280029296875, + 39.508278990341125 + ], + [ + -74.3829345703125, + 39.499802162332884 + ], + [ + -74.4049072265625, + 39.54005788576376 + ], + [ + -74.41864013671875, + 39.55064761909321 + ], + [ + -74.4158935546875, + 39.563353165829284 + ], + [ + -74.42138671875, + 39.56970506644248 + ], + [ + -74.40216064453125, + 39.57393934359189 + ], + [ + -74.39117431640625, + 39.59722324495564 + ], + [ + -74.39117431640625, + 39.77476948529548 + ], + [ + -74.55322265625, + 40.08017299133499 + ], + [ + -74.52850341796875, + 40.09067983779909 + ], + [ + -74.40765380859375, + 40.172577576321686 + ], + [ + -74.26483154296875, + 40.168380093142446 + ] + ] + ] + }, + "type": "Feature", + "properties": { + "id": "34029", + "name": "Ocean County", + "pop_density": 2310.250993696356 + }, + "id": 49, + "source": "us-counties", + "sourceLayer": "counties", + "state": {} + }, + { + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -73.8885498046875, + 40.49082625646807 + ], + [ + -73.89129638671875, + 40.310948849734984 + ], + [ + -73.8995361328125, + 40.2753348073247 + ], + [ + -73.9654541015625, + 40.120090380253316 + ], + [ + -73.9654541015625, + 40.099084147368444 + ], + [ + -74.0478515625, + 40.10538669840983 + ], + [ + -74.07257080078125, + 40.09067983779909 + ], + [ + -74.09454345703125, + 40.109588074741396 + ], + [ + -74.0972900390625, + 40.1305910638018 + ], + [ + -74.1082763671875, + 40.13899044275823 + ], + [ + -74.1522216796875, + 40.099084147368444 + ], + [ + -74.16046142578125, + 40.107487419012415 + ], + [ + -74.20440673828125, + 40.11378919157522 + ], + [ + -74.23187255859375, + 40.109588074741396 + ], + [ + -74.24560546875, + 40.117990048904744 + ], + [ + -74.24285888671875, + 40.1305910638018 + ], + [ + -74.25384521484375, + 40.14738878354049 + ], + [ + -74.2620849609375, + 40.14948820651523 + ], + [ + -74.25933837890625, + 40.16208338164617 + ], + [ + -74.26483154296875, + 40.168380093142446 + ], + [ + -74.40765380859375, + 40.172577576321686 + ], + [ + -74.52850341796875, + 40.09067983779909 + ], + [ + -74.55322265625, + 40.08017299133499 + ], + [ + -74.61639404296875, + 40.18307014852533 + ], + [ + -74.59991455078125, + 40.18726672309202 + ], + [ + -74.59442138671875, + 40.180971763887186 + ], + [ + -74.56695556640625, + 40.18936491301898 + ], + [ + -74.54498291015625, + 40.21873275657035 + ], + [ + -74.4818115234375, + 40.243895066997766 + ], + [ + -74.49005126953125, + 40.254376603726485 + ], + [ + -74.46258544921875, + 40.25228042623786 + ], + [ + -74.3939208984375, + 40.27952566881291 + ], + [ + -74.39666748046875, + 40.29000168607601 + ], + [ + -74.24835205078125, + 40.40722213305287 + ], + [ + -74.24835205078125, + 40.4323142901375 + ], + [ + -74.23736572265625, + 40.44485685896177 + ], + [ + -74.2291259765625, + 40.44485685896177 + ], + [ + -74.2236328125, + 40.45321727150386 + ], + [ + -74.2291259765625, + 40.47829226856018 + ], + [ + -73.95172119140625, + 40.52632651074401 + ], + [ + -73.8885498046875, + 40.49082625646807 + ] + ] + ] + }, + "type": "Feature", + "properties": { + "id": "34025", + "name": "Monmouth County", + "pop_density": 3454.220015794825 + }, + "id": 47, + "source": "us-counties", + "sourceLayer": "counties", + "state": {} + } +] \ No newline at end of file diff --git a/metrics/integration/query-tests/symbol-ignore-placement/inside/style.json b/metrics/integration/query-tests/symbol-ignore-placement/inside/style.json new file mode 100644 index 00000000000..00a45865abd --- /dev/null +++ b/metrics/integration/query-tests/symbol-ignore-placement/inside/style.json @@ -0,0 +1,52 @@ +{ + "version": 8, + "metadata": { + "test": { + "collisionDebug": true, + "width": 500, + "height": 500, + "queryGeometry": [ + 345, + 205 + ] + } + }, + "center": [ + -74.522, + 39.92 + ], + "zoom": 7, + "sources": { + "us-counties": { + "type": "vector", + "maxzoom": 7, + "minzoom": 7, + "tiles": [ + "local://tiles/counties-{z}-{x}-{y}.mvt" + ] + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "counties", + "type": "symbol", + "source": "us-counties", + "source-layer": "counties", + "layout": { + "text-field": "{name}", + "text-size": 11, + "symbol-spacing": 60, + "text-max-angle": 1000, + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-ignore-placement": true, + "symbol-placement": "line" + }, + "interactive": true + } + ] +} \ No newline at end of file diff --git a/metrics/integration/query-tests/symbol/filtered-rotated-after-insert/expected.json b/metrics/integration/query-tests/symbol/filtered-rotated-after-insert/expected.json new file mode 100644 index 00000000000..31146faa09f --- /dev/null +++ b/metrics/integration/query-tests/symbol/filtered-rotated-after-insert/expected.json @@ -0,0 +1,828 @@ +[ + { + "geometry": { + "type": "Point", + "coordinates": [ + -4.998779296875, + 0.9997051308419742 + ] + }, + "type": "Feature", + "properties": {}, + "id": 6, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -3.9990234375, + 0.9997051308419742 + ] + }, + "type": "Feature", + "properties": {}, + "id": 16, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -4.998779296875, + 2.9978987411030573 + ] + }, + "type": "Feature", + "properties": {}, + "id": 8, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -3.9990234375, + 2.9978987411030573 + ] + }, + "type": "Feature", + "properties": {}, + "id": 18, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -2.999267578125, + 1.9991059831233287 + ] + }, + "type": "Feature", + "properties": {}, + "id": 28, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -1.99951171875, + 0.9997051308419742 + ] + }, + "type": "Feature", + "properties": {}, + "id": 38, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -4.998779296875, + 4.997922089609858 + ] + }, + "type": "Feature", + "properties": {}, + "id": 10, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -3.9990234375, + 4.997922089609858 + ] + }, + "type": "Feature", + "properties": {}, + "id": 20, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -2.999267578125, + 4.001260305845264 + ] + }, + "type": "Feature", + "properties": {}, + "id": 30, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -1.99951171875, + 2.9978987411030573 + ] + }, + "type": "Feature", + "properties": {}, + "id": 40, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -0.999755859375, + 1.9991059831233287 + ] + }, + "type": "Feature", + "properties": {}, + "id": 50, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -1.99951171875, + 4.997922089609858 + ] + }, + "type": "Feature", + "properties": {}, + "id": 42, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -0.999755859375, + 4.001260305845264 + ] + }, + "type": "Feature", + "properties": {}, + "id": 52, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 0.9997051308419742 + ] + }, + "type": "Feature", + "properties": {}, + "id": 60, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 2.9978987411030573 + ] + }, + "type": "Feature", + "properties": {}, + "id": 62, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 0.999755859375, + 1.9991059831233287 + ] + }, + "type": "Feature", + "properties": {}, + "id": 72, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 1.99951171875, + 0.9997051308419742 + ] + }, + "type": "Feature", + "properties": {}, + "id": 82, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 1.99951171875, + 2.9978987411030573 + ] + }, + "type": "Feature", + "properties": {}, + "id": 84, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 2.999267578125, + 1.9991059831233287 + ] + }, + "type": "Feature", + "properties": {}, + "id": 94, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 3.9990234375, + 0.9997051308419742 + ] + }, + "type": "Feature", + "properties": {}, + "id": 104, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 4.997922089609858 + ] + }, + "type": "Feature", + "properties": {}, + "id": 64, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 0.999755859375, + 4.001260305845264 + ] + }, + "type": "Feature", + "properties": {}, + "id": 74, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 3.9990234375, + 2.9978987411030573 + ] + }, + "type": "Feature", + "properties": {}, + "id": 106, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 4.998779296875, + 1.9991059831233287 + ] + }, + "type": "Feature", + "properties": {}, + "id": 116, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 1.99951171875, + 4.997922089609858 + ] + }, + "type": "Feature", + "properties": {}, + "id": 86, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 2.999267578125, + 4.001260305845264 + ] + }, + "type": "Feature", + "properties": {}, + "id": 96, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 3.9990234375, + 4.997922089609858 + ] + }, + "type": "Feature", + "properties": {}, + "id": 108, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 4.998779296875, + 4.001260305845264 + ] + }, + "type": "Feature", + "properties": {}, + "id": 118, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -4.998779296875, + -2.9978987411030573 + ] + }, + "type": "Feature", + "properties": {}, + "id": 2, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -2.999267578125, + -4.00126030584525 + ] + }, + "type": "Feature", + "properties": {}, + "id": 22, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -1.99951171875, + -4.997922089609844 + ] + }, + "type": "Feature", + "properties": {}, + "id": 32, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -3.9990234375, + -2.9978987411030573 + ] + }, + "type": "Feature", + "properties": {}, + "id": 12, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -4.998779296875, + -0.99970513084196 + ] + }, + "type": "Feature", + "properties": {}, + "id": 4, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -0.999755859375, + -4.00126030584525 + ] + }, + "type": "Feature", + "properties": {}, + "id": 44, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -3.9990234375, + -0.99970513084196 + ] + }, + "type": "Feature", + "properties": {}, + "id": 14, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -2.999267578125, + -1.9991059831233144 + ] + }, + "type": "Feature", + "properties": {}, + "id": 24, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -1.99951171875, + -2.9978987411030573 + ] + }, + "type": "Feature", + "properties": {}, + "id": 34, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -2.999267578125, + 0 + ] + }, + "type": "Feature", + "properties": {}, + "id": 26, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -1.99951171875, + -0.99970513084196 + ] + }, + "type": "Feature", + "properties": {}, + "id": 36, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -0.999755859375, + -1.9991059831233144 + ] + }, + "type": "Feature", + "properties": {}, + "id": 46, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -0.999755859375, + 0 + ] + }, + "type": "Feature", + "properties": {}, + "id": 48, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 0, + -4.997922089609844 + ] + }, + "type": "Feature", + "properties": {}, + "id": 54, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 0.999755859375, + -4.00126030584525 + ] + }, + "type": "Feature", + "properties": {}, + "id": 66, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 1.99951171875, + -4.997922089609844 + ] + }, + "type": "Feature", + "properties": {}, + "id": 76, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 0, + -2.9978987411030573 + ] + }, + "type": "Feature", + "properties": {}, + "id": 56, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 0, + -0.99970513084196 + ] + }, + "type": "Feature", + "properties": {}, + "id": 58, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 0.999755859375, + -1.9991059831233144 + ] + }, + "type": "Feature", + "properties": {}, + "id": 68, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 1.99951171875, + -2.9978987411030573 + ] + }, + "type": "Feature", + "properties": {}, + "id": 78, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 2.999267578125, + -4.00126030584525 + ] + }, + "type": "Feature", + "properties": {}, + "id": 88, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 3.9990234375, + -4.997922089609844 + ] + }, + "type": "Feature", + "properties": {}, + "id": 98, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 4.998779296875, + -4.00126030584525 + ] + }, + "type": "Feature", + "properties": {}, + "id": 110, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 0.999755859375, + 0 + ] + }, + "type": "Feature", + "properties": {}, + "id": 70, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 1.99951171875, + -0.99970513084196 + ] + }, + "type": "Feature", + "properties": {}, + "id": 80, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 2.999267578125, + -1.9991059831233144 + ] + }, + "type": "Feature", + "properties": {}, + "id": 90, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 3.9990234375, + -2.9978987411030573 + ] + }, + "type": "Feature", + "properties": {}, + "id": 100, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 2.999267578125, + 0 + ] + }, + "type": "Feature", + "properties": {}, + "id": 92, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 3.9990234375, + -0.99970513084196 + ] + }, + "type": "Feature", + "properties": {}, + "id": 102, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 4.998779296875, + -1.9991059831233144 + ] + }, + "type": "Feature", + "properties": {}, + "id": 112, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 4.998779296875, + 0 + ] + }, + "type": "Feature", + "properties": {}, + "id": 114, + "source": "geojson", + "state": {} + } +] \ No newline at end of file diff --git a/metrics/integration/query-tests/symbol/filtered-rotated-after-insert/style.json b/metrics/integration/query-tests/symbol/filtered-rotated-after-insert/style.json new file mode 100644 index 00000000000..da4f73c00c1 --- /dev/null +++ b/metrics/integration/query-tests/symbol/filtered-rotated-after-insert/style.json @@ -0,0 +1,58 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 256, + "height": 256, + "operations": [ + [ + "setBearing", + 45 + ], + [ + "wait" + ] + ], + "queryGeometry": [ + [ + 0, + 0 + ], + [ + 256, + 256 + ] + ] + } + }, + "center": [ + 0, + 0 + ], + "zoom": 3, + "sources": { + "geojson": { + "type": "geojson", + "data": "local://data/121points.geojson" + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "filter": ["==", ["%", ["id"], 2], 0], + "layout": { + "text-field": ".", + "text-size": 6, + "text-allow-overlap": true, + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + } + } + ] +} diff --git a/metrics/integration/query-tests/symbol/filtered/expected.json b/metrics/integration/query-tests/symbol/filtered/expected.json new file mode 100644 index 00000000000..cb737473618 --- /dev/null +++ b/metrics/integration/query-tests/symbol/filtered/expected.json @@ -0,0 +1,321 @@ +[ + { + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -74.52850341796875, + 39.56970506644248 + ], + [ + -74.54498291015625, + 39.58029027440864 + ], + [ + -74.542236328125, + 39.586640623314594 + ], + [ + -74.55322265625, + 39.59933957529532 + ], + [ + -74.57794189453125, + 39.59933957529532 + ], + [ + -74.58892822265625, + 39.612036199336956 + ], + [ + -74.6246337890625, + 39.62684598486689 + ], + [ + -74.63287353515625, + 39.62049932196811 + ], + [ + -74.6356201171875, + 39.62896140981414 + ], + [ + -74.6575927734375, + 39.62896140981414 + ], + [ + -74.66033935546875, + 39.66914219401812 + ], + [ + -74.6685791015625, + 39.68393975392732 + ], + [ + -74.77294921875, + 39.751545363937595 + ], + [ + -74.80865478515625, + 39.785323314592574 + ], + [ + -74.8388671875, + 39.79165483525341 + ], + [ + -74.8773193359375, + 39.78321267821704 + ], + [ + -74.89654541015625, + 39.785323314592574 + ], + [ + -74.90478515625, + 39.79165483525341 + ], + [ + -74.9322509765625, + 39.88866516883712 + ], + [ + -74.95147705078125, + 39.8992015115692 + ], + [ + -74.9652099609375, + 39.92026933763398 + ], + [ + -74.98443603515625, + 39.92869465373238 + ], + [ + -74.9761962890625, + 39.9413306837869 + ], + [ + -75.01739501953125, + 39.947647823922495 + ], + [ + -75.0146484375, + 39.95817509460008 + ], + [ + -75.0201416015625, + 39.96870074491696 + ], + [ + -75.01190185546875, + 39.981329386272165 + ], + [ + -75.0201416015625, + 39.98974718404571 + ], + [ + -75.03387451171875, + 39.99185147142347 + ], + [ + -75.03662109375, + 39.9981639445858 + ], + [ + -75.06134033203125, + 39.99185147142347 + ], + [ + -75.047607421875, + 40.01078714046551 + ], + [ + -75.0146484375, + 40.02130468739708 + ], + [ + -74.96795654296875, + 40.05284760182397 + ], + [ + -74.92950439453125, + 40.071766346626106 + ], + [ + -74.90753173828125, + 40.071766346626106 + ], + [ + -74.86358642578125, + 40.08437592451517 + ], + [ + -74.8553466796875, + 40.09488212232117 + ], + [ + -74.8388671875, + 40.10118506258701 + ], + [ + -74.82513427734375, + 40.128491056854074 + ], + [ + -74.78668212890625, + 40.12219064672337 + ], + [ + -74.761962890625, + 40.13479088304851 + ], + [ + -74.74273681640625, + 40.1368906953459 + ], + [ + -74.72076416015625, + 40.14948820651523 + ], + [ + -74.70428466796875, + 40.17047886718112 + ], + [ + -74.7125244140625, + 40.168380093142446 + ], + [ + -74.7125244140625, + 40.180971763887186 + ], + [ + -74.70428466796875, + 40.18516846826054 + ], + [ + -74.67681884765625, + 40.17467622056341 + ], + [ + -74.6795654296875, + 40.16628125420655 + ], + [ + -74.6630859375, + 40.16628125420655 + ], + [ + -74.6356201171875, + 40.14948820651523 + ], + [ + -74.6246337890625, + 40.14948820651523 + ], + [ + -74.6246337890625, + 40.14318974292439 + ], + [ + -74.6026611328125, + 40.1368906953459 + ], + [ + -74.58892822265625, + 40.13899044275823 + ], + [ + -74.39117431640625, + 39.77476948529548 + ], + [ + -74.39117431640625, + 39.59722324495564 + ], + [ + -74.40216064453125, + 39.57393934359189 + ], + [ + -74.42138671875, + 39.56970506644248 + ], + [ + -74.41864013671875, + 39.55911824217185 + ], + [ + -74.44061279296875, + 39.55488305992401 + ], + [ + -74.4378662109375, + 39.54217596171196 + ], + [ + -74.44610595703125, + 39.546411919686705 + ], + [ + -74.443359375, + 39.557000683371285 + ], + [ + -74.454345703125, + 39.55911824217185 + ], + [ + -74.45709228515625, + 39.54852980171148 + ], + [ + -74.46533203125, + 39.557000683371285 + ], + [ + -74.476318359375, + 39.552765371831015 + ], + [ + -74.48455810546875, + 39.55911824217185 + ], + [ + -74.49554443359375, + 39.557000683371285 + ], + [ + -74.5037841796875, + 39.56970506644248 + ], + [ + -74.51202392578125, + 39.56970506644248 + ], + [ + -74.51751708984375, + 39.57393934359189 + ], + [ + -74.52850341796875, + 39.56970506644248 + ] + ] + ] + }, + "type": "Feature", + "properties": { + "id": "34005", + "name": "Burlington County", + "pop_density": 2007.2920458152796 + }, + "id": 33, + "source": "us-counties", + "sourceLayer": "counties", + "state": {} + } +] \ No newline at end of file diff --git a/metrics/integration/query-tests/symbol/filtered/style.json b/metrics/integration/query-tests/symbol/filtered/style.json new file mode 100644 index 00000000000..80ce49be919 --- /dev/null +++ b/metrics/integration/query-tests/symbol/filtered/style.json @@ -0,0 +1,53 @@ +{ + "version": 8, + "metadata": { + "test": { + "collisionDebug": true, + "width": 500, + "height": 500, + "queryGeometry": [ + 370, + 305 + ] + } + }, + "center": [ + -74.522, + 39.92 + ], + "zoom": 8, + "bearing": 45, + "sources": { + "us-counties": { + "type": "vector", + "maxzoom": 7, + "minzoom": 7, + "tiles": [ + "local://tiles/counties-{z}-{x}-{y}.mvt" + ] + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "counties", + "type": "symbol", + "source": "us-counties", + "source-layer": "counties", + "filter": ["==", "name", "Burlington County"], + "layout": { + "text-field": "{name}", + "text-size": 11, + "symbol-spacing": 60, + "text-max-angle": 1000, + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "symbol-placement": "line" + }, + "interactive": true + } + ] +} diff --git a/metrics/integration/query-tests/symbol/fractional-outside/expected.json b/metrics/integration/query-tests/symbol/fractional-outside/expected.json new file mode 100644 index 00000000000..0637a088a01 --- /dev/null +++ b/metrics/integration/query-tests/symbol/fractional-outside/expected.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/metrics/integration/query-tests/symbol/fractional-outside/style.json b/metrics/integration/query-tests/symbol/fractional-outside/style.json new file mode 100644 index 00000000000..1f1b1b80f50 --- /dev/null +++ b/metrics/integration/query-tests/symbol/fractional-outside/style.json @@ -0,0 +1,51 @@ +{ + "version": 8, + "metadata": { + "test": { + "collisionDebug": true, + "width": 500, + "height": 500, + "queryGeometry": [ + 279, + 283 + ] + } + }, + "center": [ + -74.522, + 39.92 + ], + "zoom": 7.85, + "sources": { + "us-counties": { + "type": "vector", + "maxzoom": 7, + "minzoom": 7, + "tiles": [ + "local://tiles/counties-{z}-{x}-{y}.mvt" + ] + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "counties", + "type": "symbol", + "source": "us-counties", + "source-layer": "counties", + "layout": { + "text-field": "{name}", + "text-size": 11, + "symbol-spacing": 60, + "text-max-angle": 1000, + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "symbol-placement": "line" + }, + "interactive": true + } + ] +} \ No newline at end of file diff --git a/metrics/integration/query-tests/symbol/hidden/expected.json b/metrics/integration/query-tests/symbol/hidden/expected.json new file mode 100644 index 00000000000..0637a088a01 --- /dev/null +++ b/metrics/integration/query-tests/symbol/hidden/expected.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/metrics/integration/query-tests/symbol/hidden/style.json b/metrics/integration/query-tests/symbol/hidden/style.json new file mode 100644 index 00000000000..534d21a1bc4 --- /dev/null +++ b/metrics/integration/query-tests/symbol/hidden/style.json @@ -0,0 +1,51 @@ +{ + "version": 8, + "metadata": { + "test": { + "collisionDebug": true, + "width": 500, + "height": 500, + "queryGeometry": [ + 180, + 400 + ] + } + }, + "center": [ + -74.522, + 39.92 + ], + "zoom": 7, + "sources": { + "us-counties": { + "type": "vector", + "maxzoom": 7, + "minzoom": 7, + "tiles": [ + "local://tiles/counties-{z}-{x}-{y}.mvt" + ] + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "counties", + "type": "symbol", + "source": "us-counties", + "source-layer": "counties", + "layout": { + "text-field": "{name}", + "text-size": 11, + "symbol-spacing": 60, + "text-max-angle": 1000, + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "symbol-placement": "line" + }, + "interactive": true + } + ] +} \ No newline at end of file diff --git a/metrics/integration/query-tests/symbol/inside/expected.json b/metrics/integration/query-tests/symbol/inside/expected.json new file mode 100644 index 00000000000..cb737473618 --- /dev/null +++ b/metrics/integration/query-tests/symbol/inside/expected.json @@ -0,0 +1,321 @@ +[ + { + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -74.52850341796875, + 39.56970506644248 + ], + [ + -74.54498291015625, + 39.58029027440864 + ], + [ + -74.542236328125, + 39.586640623314594 + ], + [ + -74.55322265625, + 39.59933957529532 + ], + [ + -74.57794189453125, + 39.59933957529532 + ], + [ + -74.58892822265625, + 39.612036199336956 + ], + [ + -74.6246337890625, + 39.62684598486689 + ], + [ + -74.63287353515625, + 39.62049932196811 + ], + [ + -74.6356201171875, + 39.62896140981414 + ], + [ + -74.6575927734375, + 39.62896140981414 + ], + [ + -74.66033935546875, + 39.66914219401812 + ], + [ + -74.6685791015625, + 39.68393975392732 + ], + [ + -74.77294921875, + 39.751545363937595 + ], + [ + -74.80865478515625, + 39.785323314592574 + ], + [ + -74.8388671875, + 39.79165483525341 + ], + [ + -74.8773193359375, + 39.78321267821704 + ], + [ + -74.89654541015625, + 39.785323314592574 + ], + [ + -74.90478515625, + 39.79165483525341 + ], + [ + -74.9322509765625, + 39.88866516883712 + ], + [ + -74.95147705078125, + 39.8992015115692 + ], + [ + -74.9652099609375, + 39.92026933763398 + ], + [ + -74.98443603515625, + 39.92869465373238 + ], + [ + -74.9761962890625, + 39.9413306837869 + ], + [ + -75.01739501953125, + 39.947647823922495 + ], + [ + -75.0146484375, + 39.95817509460008 + ], + [ + -75.0201416015625, + 39.96870074491696 + ], + [ + -75.01190185546875, + 39.981329386272165 + ], + [ + -75.0201416015625, + 39.98974718404571 + ], + [ + -75.03387451171875, + 39.99185147142347 + ], + [ + -75.03662109375, + 39.9981639445858 + ], + [ + -75.06134033203125, + 39.99185147142347 + ], + [ + -75.047607421875, + 40.01078714046551 + ], + [ + -75.0146484375, + 40.02130468739708 + ], + [ + -74.96795654296875, + 40.05284760182397 + ], + [ + -74.92950439453125, + 40.071766346626106 + ], + [ + -74.90753173828125, + 40.071766346626106 + ], + [ + -74.86358642578125, + 40.08437592451517 + ], + [ + -74.8553466796875, + 40.09488212232117 + ], + [ + -74.8388671875, + 40.10118506258701 + ], + [ + -74.82513427734375, + 40.128491056854074 + ], + [ + -74.78668212890625, + 40.12219064672337 + ], + [ + -74.761962890625, + 40.13479088304851 + ], + [ + -74.74273681640625, + 40.1368906953459 + ], + [ + -74.72076416015625, + 40.14948820651523 + ], + [ + -74.70428466796875, + 40.17047886718112 + ], + [ + -74.7125244140625, + 40.168380093142446 + ], + [ + -74.7125244140625, + 40.180971763887186 + ], + [ + -74.70428466796875, + 40.18516846826054 + ], + [ + -74.67681884765625, + 40.17467622056341 + ], + [ + -74.6795654296875, + 40.16628125420655 + ], + [ + -74.6630859375, + 40.16628125420655 + ], + [ + -74.6356201171875, + 40.14948820651523 + ], + [ + -74.6246337890625, + 40.14948820651523 + ], + [ + -74.6246337890625, + 40.14318974292439 + ], + [ + -74.6026611328125, + 40.1368906953459 + ], + [ + -74.58892822265625, + 40.13899044275823 + ], + [ + -74.39117431640625, + 39.77476948529548 + ], + [ + -74.39117431640625, + 39.59722324495564 + ], + [ + -74.40216064453125, + 39.57393934359189 + ], + [ + -74.42138671875, + 39.56970506644248 + ], + [ + -74.41864013671875, + 39.55911824217185 + ], + [ + -74.44061279296875, + 39.55488305992401 + ], + [ + -74.4378662109375, + 39.54217596171196 + ], + [ + -74.44610595703125, + 39.546411919686705 + ], + [ + -74.443359375, + 39.557000683371285 + ], + [ + -74.454345703125, + 39.55911824217185 + ], + [ + -74.45709228515625, + 39.54852980171148 + ], + [ + -74.46533203125, + 39.557000683371285 + ], + [ + -74.476318359375, + 39.552765371831015 + ], + [ + -74.48455810546875, + 39.55911824217185 + ], + [ + -74.49554443359375, + 39.557000683371285 + ], + [ + -74.5037841796875, + 39.56970506644248 + ], + [ + -74.51202392578125, + 39.56970506644248 + ], + [ + -74.51751708984375, + 39.57393934359189 + ], + [ + -74.52850341796875, + 39.56970506644248 + ] + ] + ] + }, + "type": "Feature", + "properties": { + "id": "34005", + "name": "Burlington County", + "pop_density": 2007.2920458152796 + }, + "id": 33, + "source": "us-counties", + "sourceLayer": "counties", + "state": {} + } +] \ No newline at end of file diff --git a/metrics/integration/query-tests/symbol/inside/style.json b/metrics/integration/query-tests/symbol/inside/style.json new file mode 100644 index 00000000000..b7fd69dbca0 --- /dev/null +++ b/metrics/integration/query-tests/symbol/inside/style.json @@ -0,0 +1,51 @@ +{ + "version": 8, + "metadata": { + "test": { + "collisionDebug": true, + "width": 500, + "height": 500, + "queryGeometry": [ + 266, + 271 + ] + } + }, + "center": [ + -74.522, + 39.92 + ], + "zoom": 7, + "sources": { + "us-counties": { + "type": "vector", + "maxzoom": 7, + "minzoom": 7, + "tiles": [ + "local://tiles/counties-{z}-{x}-{y}.mvt" + ] + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "counties", + "type": "symbol", + "source": "us-counties", + "source-layer": "counties", + "layout": { + "text-field": "{name}", + "text-size": 11, + "symbol-spacing": 60, + "text-max-angle": 1000, + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "symbol-placement": "line" + }, + "interactive": true + } + ] +} \ No newline at end of file diff --git a/metrics/integration/query-tests/symbol/outside/expected.json b/metrics/integration/query-tests/symbol/outside/expected.json new file mode 100644 index 00000000000..0637a088a01 --- /dev/null +++ b/metrics/integration/query-tests/symbol/outside/expected.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/metrics/integration/query-tests/symbol/outside/style.json b/metrics/integration/query-tests/symbol/outside/style.json new file mode 100644 index 00000000000..51c39169177 --- /dev/null +++ b/metrics/integration/query-tests/symbol/outside/style.json @@ -0,0 +1,51 @@ +{ + "version": 8, + "metadata": { + "test": { + "collisionDebug": true, + "width": 500, + "height": 500, + "queryGeometry": [ + 296, + 271 + ] + } + }, + "center": [ + -74.522, + 39.92 + ], + "zoom": 7, + "sources": { + "us-counties": { + "type": "vector", + "maxzoom": 7, + "minzoom": 7, + "tiles": [ + "local://tiles/counties-{z}-{x}-{y}.mvt" + ] + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "counties", + "type": "symbol", + "source": "us-counties", + "source-layer": "counties", + "layout": { + "text-field": "{name}", + "text-size": 11, + "symbol-spacing": 60, + "text-max-angle": 1000, + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "symbol-placement": "line" + }, + "interactive": true + } + ] +} \ No newline at end of file diff --git a/metrics/integration/query-tests/symbol/panned-after-insert/expected.json b/metrics/integration/query-tests/symbol/panned-after-insert/expected.json new file mode 100644 index 00000000000..2d15e0485b0 --- /dev/null +++ b/metrics/integration/query-tests/symbol/panned-after-insert/expected.json @@ -0,0 +1,1696 @@ +[ + { + "geometry": { + "type": "Point", + "coordinates": [ + -0.999755859375, + 4.997922089609858 + ] + }, + "type": "Feature", + "properties": {}, + "id": 53, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -0.999755859375, + 4.001260305845264 + ] + }, + "type": "Feature", + "properties": {}, + "id": 52, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -0.999755859375, + 2.9978987411030573 + ] + }, + "type": "Feature", + "properties": {}, + "id": 51, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -0.999755859375, + 1.9991059831233287 + ] + }, + "type": "Feature", + "properties": {}, + "id": 50, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -0.999755859375, + 0.9997051308419742 + ] + }, + "type": "Feature", + "properties": {}, + "id": 49, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -1.99951171875, + 4.997922089609858 + ] + }, + "type": "Feature", + "properties": {}, + "id": 42, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -1.99951171875, + 4.001260305845264 + ] + }, + "type": "Feature", + "properties": {}, + "id": 41, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -1.99951171875, + 2.9978987411030573 + ] + }, + "type": "Feature", + "properties": {}, + "id": 40, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -1.99951171875, + 1.9991059831233287 + ] + }, + "type": "Feature", + "properties": {}, + "id": 39, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -1.99951171875, + 0.9997051308419742 + ] + }, + "type": "Feature", + "properties": {}, + "id": 38, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -2.999267578125, + 4.997922089609858 + ] + }, + "type": "Feature", + "properties": {}, + "id": 31, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -2.999267578125, + 4.001260305845264 + ] + }, + "type": "Feature", + "properties": {}, + "id": 30, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -2.999267578125, + 2.9978987411030573 + ] + }, + "type": "Feature", + "properties": {}, + "id": 29, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -2.999267578125, + 1.9991059831233287 + ] + }, + "type": "Feature", + "properties": {}, + "id": 28, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -2.999267578125, + 0.9997051308419742 + ] + }, + "type": "Feature", + "properties": {}, + "id": 27, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -3.9990234375, + 4.997922089609858 + ] + }, + "type": "Feature", + "properties": {}, + "id": 20, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -3.9990234375, + 4.001260305845264 + ] + }, + "type": "Feature", + "properties": {}, + "id": 19, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -3.9990234375, + 2.9978987411030573 + ] + }, + "type": "Feature", + "properties": {}, + "id": 18, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -3.9990234375, + 1.9991059831233287 + ] + }, + "type": "Feature", + "properties": {}, + "id": 17, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -3.9990234375, + 0.9997051308419742 + ] + }, + "type": "Feature", + "properties": {}, + "id": 16, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -4.998779296875, + 4.997922089609858 + ] + }, + "type": "Feature", + "properties": {}, + "id": 10, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -4.998779296875, + 4.001260305845264 + ] + }, + "type": "Feature", + "properties": {}, + "id": 9, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -4.998779296875, + 2.9978987411030573 + ] + }, + "type": "Feature", + "properties": {}, + "id": 8, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -4.998779296875, + 1.9991059831233287 + ] + }, + "type": "Feature", + "properties": {}, + "id": 7, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -4.998779296875, + 0.9997051308419742 + ] + }, + "type": "Feature", + "properties": {}, + "id": 6, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 4.998779296875, + 4.997922089609858 + ] + }, + "type": "Feature", + "properties": {}, + "id": 119, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 4.998779296875, + 4.001260305845264 + ] + }, + "type": "Feature", + "properties": {}, + "id": 118, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 4.998779296875, + 2.9978987411030573 + ] + }, + "type": "Feature", + "properties": {}, + "id": 117, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 4.998779296875, + 1.9991059831233287 + ] + }, + "type": "Feature", + "properties": {}, + "id": 116, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 4.998779296875, + 0.9997051308419742 + ] + }, + "type": "Feature", + "properties": {}, + "id": 115, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 3.9990234375, + 4.997922089609858 + ] + }, + "type": "Feature", + "properties": {}, + "id": 108, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 3.9990234375, + 4.001260305845264 + ] + }, + "type": "Feature", + "properties": {}, + "id": 107, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 3.9990234375, + 2.9978987411030573 + ] + }, + "type": "Feature", + "properties": {}, + "id": 106, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 3.9990234375, + 1.9991059831233287 + ] + }, + "type": "Feature", + "properties": {}, + "id": 105, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 3.9990234375, + 0.9997051308419742 + ] + }, + "type": "Feature", + "properties": {}, + "id": 104, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 2.999267578125, + 4.997922089609858 + ] + }, + "type": "Feature", + "properties": {}, + "id": 97, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 2.999267578125, + 4.001260305845264 + ] + }, + "type": "Feature", + "properties": {}, + "id": 96, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 2.999267578125, + 2.9978987411030573 + ] + }, + "type": "Feature", + "properties": {}, + "id": 95, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 2.999267578125, + 1.9991059831233287 + ] + }, + "type": "Feature", + "properties": {}, + "id": 94, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 2.999267578125, + 0.9997051308419742 + ] + }, + "type": "Feature", + "properties": {}, + "id": 93, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 1.99951171875, + 4.997922089609858 + ] + }, + "type": "Feature", + "properties": {}, + "id": 86, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 1.99951171875, + 4.001260305845264 + ] + }, + "type": "Feature", + "properties": {}, + "id": 85, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 1.99951171875, + 2.9978987411030573 + ] + }, + "type": "Feature", + "properties": {}, + "id": 84, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 1.99951171875, + 1.9991059831233287 + ] + }, + "type": "Feature", + "properties": {}, + "id": 83, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 1.99951171875, + 0.9997051308419742 + ] + }, + "type": "Feature", + "properties": {}, + "id": 82, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 0.999755859375, + 4.997922089609858 + ] + }, + "type": "Feature", + "properties": {}, + "id": 75, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 0.999755859375, + 4.001260305845264 + ] + }, + "type": "Feature", + "properties": {}, + "id": 74, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 0.999755859375, + 2.9978987411030573 + ] + }, + "type": "Feature", + "properties": {}, + "id": 73, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 0.999755859375, + 1.9991059831233287 + ] + }, + "type": "Feature", + "properties": {}, + "id": 72, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 0.999755859375, + 0.9997051308419742 + ] + }, + "type": "Feature", + "properties": {}, + "id": 71, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 4.997922089609858 + ] + }, + "type": "Feature", + "properties": {}, + "id": 64, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 4.001260305845264 + ] + }, + "type": "Feature", + "properties": {}, + "id": 63, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 2.9978987411030573 + ] + }, + "type": "Feature", + "properties": {}, + "id": 62, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 1.9991059831233287 + ] + }, + "type": "Feature", + "properties": {}, + "id": 61, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 0.9997051308419742 + ] + }, + "type": "Feature", + "properties": {}, + "id": 60, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -0.999755859375, + 0 + ] + }, + "type": "Feature", + "properties": {}, + "id": 48, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -0.999755859375, + -0.99970513084196 + ] + }, + "type": "Feature", + "properties": {}, + "id": 47, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -0.999755859375, + -1.9991059831233144 + ] + }, + "type": "Feature", + "properties": {}, + "id": 46, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -0.999755859375, + -2.9978987411030573 + ] + }, + "type": "Feature", + "properties": {}, + "id": 45, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -0.999755859375, + -4.00126030584525 + ] + }, + "type": "Feature", + "properties": {}, + "id": 44, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -0.999755859375, + -4.997922089609844 + ] + }, + "type": "Feature", + "properties": {}, + "id": 43, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -1.99951171875, + 0 + ] + }, + "type": "Feature", + "properties": {}, + "id": 37, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -1.99951171875, + -0.99970513084196 + ] + }, + "type": "Feature", + "properties": {}, + "id": 36, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -1.99951171875, + -1.9991059831233144 + ] + }, + "type": "Feature", + "properties": {}, + "id": 35, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -1.99951171875, + -2.9978987411030573 + ] + }, + "type": "Feature", + "properties": {}, + "id": 34, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -1.99951171875, + -4.00126030584525 + ] + }, + "type": "Feature", + "properties": {}, + "id": 33, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -1.99951171875, + -4.997922089609844 + ] + }, + "type": "Feature", + "properties": {}, + "id": 32, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -2.999267578125, + 0 + ] + }, + "type": "Feature", + "properties": {}, + "id": 26, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -2.999267578125, + -0.99970513084196 + ] + }, + "type": "Feature", + "properties": {}, + "id": 25, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -2.999267578125, + -1.9991059831233144 + ] + }, + "type": "Feature", + "properties": {}, + "id": 24, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -2.999267578125, + -2.9978987411030573 + ] + }, + "type": "Feature", + "properties": {}, + "id": 23, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -2.999267578125, + -4.00126030584525 + ] + }, + "type": "Feature", + "properties": {}, + "id": 22, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -2.999267578125, + -4.997922089609844 + ] + }, + "type": "Feature", + "properties": {}, + "id": 21, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -3.9990234375, + 0 + ] + }, + "type": "Feature", + "properties": {}, + "id": 15, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -3.9990234375, + -0.99970513084196 + ] + }, + "type": "Feature", + "properties": {}, + "id": 14, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -3.9990234375, + -1.9991059831233144 + ] + }, + "type": "Feature", + "properties": {}, + "id": 13, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -3.9990234375, + -2.9978987411030573 + ] + }, + "type": "Feature", + "properties": {}, + "id": 12, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -3.9990234375, + -4.00126030584525 + ] + }, + "type": "Feature", + "properties": {}, + "id": 119, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -3.9990234375, + -4.997922089609844 + ] + }, + "type": "Feature", + "properties": {}, + "id": 11, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -4.998779296875, + 0 + ] + }, + "type": "Feature", + "properties": {}, + "id": 5, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -4.998779296875, + -0.99970513084196 + ] + }, + "type": "Feature", + "properties": {}, + "id": 4, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -4.998779296875, + -1.9991059831233144 + ] + }, + "type": "Feature", + "properties": {}, + "id": 3, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -4.998779296875, + -2.9978987411030573 + ] + }, + "type": "Feature", + "properties": {}, + "id": 2, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -4.998779296875, + -4.00126030584525 + ] + }, + "type": "Feature", + "properties": {}, + "id": 1, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -4.998779296875, + -4.997922089609844 + ] + }, + "type": "Feature", + "properties": {}, + "id": 121, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 4.998779296875, + 0 + ] + }, + "type": "Feature", + "properties": {}, + "id": 114, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 4.998779296875, + -0.99970513084196 + ] + }, + "type": "Feature", + "properties": {}, + "id": 113, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 4.998779296875, + -1.9991059831233144 + ] + }, + "type": "Feature", + "properties": {}, + "id": 112, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 4.998779296875, + -2.9978987411030573 + ] + }, + "type": "Feature", + "properties": {}, + "id": 111, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 4.998779296875, + -4.00126030584525 + ] + }, + "type": "Feature", + "properties": {}, + "id": 110, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 4.998779296875, + -4.997922089609844 + ] + }, + "type": "Feature", + "properties": {}, + "id": 109, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 3.9990234375, + 0 + ] + }, + "type": "Feature", + "properties": {}, + "id": 103, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 3.9990234375, + -0.99970513084196 + ] + }, + "type": "Feature", + "properties": {}, + "id": 102, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 3.9990234375, + -1.9991059831233144 + ] + }, + "type": "Feature", + "properties": {}, + "id": 101, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 3.9990234375, + -2.9978987411030573 + ] + }, + "type": "Feature", + "properties": {}, + "id": 100, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 3.9990234375, + -4.00126030584525 + ] + }, + "type": "Feature", + "properties": {}, + "id": 99, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 3.9990234375, + -4.997922089609844 + ] + }, + "type": "Feature", + "properties": {}, + "id": 98, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 2.999267578125, + 0 + ] + }, + "type": "Feature", + "properties": {}, + "id": 92, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 2.999267578125, + -0.99970513084196 + ] + }, + "type": "Feature", + "properties": {}, + "id": 91, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 2.999267578125, + -1.9991059831233144 + ] + }, + "type": "Feature", + "properties": {}, + "id": 90, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 2.999267578125, + -2.9978987411030573 + ] + }, + "type": "Feature", + "properties": {}, + "id": 89, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 2.999267578125, + -4.00126030584525 + ] + }, + "type": "Feature", + "properties": {}, + "id": 88, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 2.999267578125, + -4.997922089609844 + ] + }, + "type": "Feature", + "properties": {}, + "id": 87, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 1.99951171875, + 0 + ] + }, + "type": "Feature", + "properties": {}, + "id": 81, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 1.99951171875, + -0.99970513084196 + ] + }, + "type": "Feature", + "properties": {}, + "id": 80, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 1.99951171875, + -1.9991059831233144 + ] + }, + "type": "Feature", + "properties": {}, + "id": 79, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 1.99951171875, + -2.9978987411030573 + ] + }, + "type": "Feature", + "properties": {}, + "id": 78, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 1.99951171875, + -4.00126030584525 + ] + }, + "type": "Feature", + "properties": {}, + "id": 77, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 1.99951171875, + -4.997922089609844 + ] + }, + "type": "Feature", + "properties": {}, + "id": 76, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 0.999755859375, + 0 + ] + }, + "type": "Feature", + "properties": {}, + "id": 70, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 0.999755859375, + -0.99970513084196 + ] + }, + "type": "Feature", + "properties": {}, + "id": 69, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 0.999755859375, + -1.9991059831233144 + ] + }, + "type": "Feature", + "properties": {}, + "id": 68, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 0.999755859375, + -2.9978987411030573 + ] + }, + "type": "Feature", + "properties": {}, + "id": 67, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 0.999755859375, + -4.00126030584525 + ] + }, + "type": "Feature", + "properties": {}, + "id": 66, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 0.999755859375, + -4.997922089609844 + ] + }, + "type": "Feature", + "properties": {}, + "id": 65, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + }, + "type": "Feature", + "properties": {}, + "id": 59, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 0, + -0.99970513084196 + ] + }, + "type": "Feature", + "properties": {}, + "id": 58, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 0, + -1.9991059831233144 + ] + }, + "type": "Feature", + "properties": {}, + "id": 57, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 0, + -2.9978987411030573 + ] + }, + "type": "Feature", + "properties": {}, + "id": 56, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 0, + -4.00126030584525 + ] + }, + "type": "Feature", + "properties": {}, + "id": 55, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 0, + -4.997922089609844 + ] + }, + "type": "Feature", + "properties": {}, + "id": 54, + "source": "geojson", + "state": {} + } +] \ No newline at end of file diff --git a/metrics/integration/query-tests/symbol/panned-after-insert/style.json b/metrics/integration/query-tests/symbol/panned-after-insert/style.json new file mode 100644 index 00000000000..3f571683b08 --- /dev/null +++ b/metrics/integration/query-tests/symbol/panned-after-insert/style.json @@ -0,0 +1,56 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 256, + "height": 256, + "operations": [ + [ + "setCenter", + [ + 1, + 1 + ] + ] + ], + "queryGeometry": [ + [ + 0, + 0 + ], + [ + 256, + 256 + ] + ] + } + }, + "center": [ + 0, + 0 + ], + "zoom": 3, + "sources": { + "geojson": { + "type": "geojson", + "data": "local://data/121points.geojson" + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "text-field": ".", + "text-size": 6, + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/query-tests/symbol/rotated-after-insert/expected.json b/metrics/integration/query-tests/symbol/rotated-after-insert/expected.json new file mode 100644 index 00000000000..2d15e0485b0 --- /dev/null +++ b/metrics/integration/query-tests/symbol/rotated-after-insert/expected.json @@ -0,0 +1,1696 @@ +[ + { + "geometry": { + "type": "Point", + "coordinates": [ + -0.999755859375, + 4.997922089609858 + ] + }, + "type": "Feature", + "properties": {}, + "id": 53, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -0.999755859375, + 4.001260305845264 + ] + }, + "type": "Feature", + "properties": {}, + "id": 52, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -0.999755859375, + 2.9978987411030573 + ] + }, + "type": "Feature", + "properties": {}, + "id": 51, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -0.999755859375, + 1.9991059831233287 + ] + }, + "type": "Feature", + "properties": {}, + "id": 50, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -0.999755859375, + 0.9997051308419742 + ] + }, + "type": "Feature", + "properties": {}, + "id": 49, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -1.99951171875, + 4.997922089609858 + ] + }, + "type": "Feature", + "properties": {}, + "id": 42, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -1.99951171875, + 4.001260305845264 + ] + }, + "type": "Feature", + "properties": {}, + "id": 41, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -1.99951171875, + 2.9978987411030573 + ] + }, + "type": "Feature", + "properties": {}, + "id": 40, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -1.99951171875, + 1.9991059831233287 + ] + }, + "type": "Feature", + "properties": {}, + "id": 39, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -1.99951171875, + 0.9997051308419742 + ] + }, + "type": "Feature", + "properties": {}, + "id": 38, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -2.999267578125, + 4.997922089609858 + ] + }, + "type": "Feature", + "properties": {}, + "id": 31, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -2.999267578125, + 4.001260305845264 + ] + }, + "type": "Feature", + "properties": {}, + "id": 30, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -2.999267578125, + 2.9978987411030573 + ] + }, + "type": "Feature", + "properties": {}, + "id": 29, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -2.999267578125, + 1.9991059831233287 + ] + }, + "type": "Feature", + "properties": {}, + "id": 28, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -2.999267578125, + 0.9997051308419742 + ] + }, + "type": "Feature", + "properties": {}, + "id": 27, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -3.9990234375, + 4.997922089609858 + ] + }, + "type": "Feature", + "properties": {}, + "id": 20, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -3.9990234375, + 4.001260305845264 + ] + }, + "type": "Feature", + "properties": {}, + "id": 19, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -3.9990234375, + 2.9978987411030573 + ] + }, + "type": "Feature", + "properties": {}, + "id": 18, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -3.9990234375, + 1.9991059831233287 + ] + }, + "type": "Feature", + "properties": {}, + "id": 17, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -3.9990234375, + 0.9997051308419742 + ] + }, + "type": "Feature", + "properties": {}, + "id": 16, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -4.998779296875, + 4.997922089609858 + ] + }, + "type": "Feature", + "properties": {}, + "id": 10, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -4.998779296875, + 4.001260305845264 + ] + }, + "type": "Feature", + "properties": {}, + "id": 9, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -4.998779296875, + 2.9978987411030573 + ] + }, + "type": "Feature", + "properties": {}, + "id": 8, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -4.998779296875, + 1.9991059831233287 + ] + }, + "type": "Feature", + "properties": {}, + "id": 7, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -4.998779296875, + 0.9997051308419742 + ] + }, + "type": "Feature", + "properties": {}, + "id": 6, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 4.998779296875, + 4.997922089609858 + ] + }, + "type": "Feature", + "properties": {}, + "id": 119, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 4.998779296875, + 4.001260305845264 + ] + }, + "type": "Feature", + "properties": {}, + "id": 118, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 4.998779296875, + 2.9978987411030573 + ] + }, + "type": "Feature", + "properties": {}, + "id": 117, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 4.998779296875, + 1.9991059831233287 + ] + }, + "type": "Feature", + "properties": {}, + "id": 116, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 4.998779296875, + 0.9997051308419742 + ] + }, + "type": "Feature", + "properties": {}, + "id": 115, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 3.9990234375, + 4.997922089609858 + ] + }, + "type": "Feature", + "properties": {}, + "id": 108, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 3.9990234375, + 4.001260305845264 + ] + }, + "type": "Feature", + "properties": {}, + "id": 107, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 3.9990234375, + 2.9978987411030573 + ] + }, + "type": "Feature", + "properties": {}, + "id": 106, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 3.9990234375, + 1.9991059831233287 + ] + }, + "type": "Feature", + "properties": {}, + "id": 105, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 3.9990234375, + 0.9997051308419742 + ] + }, + "type": "Feature", + "properties": {}, + "id": 104, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 2.999267578125, + 4.997922089609858 + ] + }, + "type": "Feature", + "properties": {}, + "id": 97, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 2.999267578125, + 4.001260305845264 + ] + }, + "type": "Feature", + "properties": {}, + "id": 96, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 2.999267578125, + 2.9978987411030573 + ] + }, + "type": "Feature", + "properties": {}, + "id": 95, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 2.999267578125, + 1.9991059831233287 + ] + }, + "type": "Feature", + "properties": {}, + "id": 94, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 2.999267578125, + 0.9997051308419742 + ] + }, + "type": "Feature", + "properties": {}, + "id": 93, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 1.99951171875, + 4.997922089609858 + ] + }, + "type": "Feature", + "properties": {}, + "id": 86, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 1.99951171875, + 4.001260305845264 + ] + }, + "type": "Feature", + "properties": {}, + "id": 85, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 1.99951171875, + 2.9978987411030573 + ] + }, + "type": "Feature", + "properties": {}, + "id": 84, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 1.99951171875, + 1.9991059831233287 + ] + }, + "type": "Feature", + "properties": {}, + "id": 83, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 1.99951171875, + 0.9997051308419742 + ] + }, + "type": "Feature", + "properties": {}, + "id": 82, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 0.999755859375, + 4.997922089609858 + ] + }, + "type": "Feature", + "properties": {}, + "id": 75, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 0.999755859375, + 4.001260305845264 + ] + }, + "type": "Feature", + "properties": {}, + "id": 74, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 0.999755859375, + 2.9978987411030573 + ] + }, + "type": "Feature", + "properties": {}, + "id": 73, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 0.999755859375, + 1.9991059831233287 + ] + }, + "type": "Feature", + "properties": {}, + "id": 72, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 0.999755859375, + 0.9997051308419742 + ] + }, + "type": "Feature", + "properties": {}, + "id": 71, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 4.997922089609858 + ] + }, + "type": "Feature", + "properties": {}, + "id": 64, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 4.001260305845264 + ] + }, + "type": "Feature", + "properties": {}, + "id": 63, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 2.9978987411030573 + ] + }, + "type": "Feature", + "properties": {}, + "id": 62, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 1.9991059831233287 + ] + }, + "type": "Feature", + "properties": {}, + "id": 61, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 0.9997051308419742 + ] + }, + "type": "Feature", + "properties": {}, + "id": 60, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -0.999755859375, + 0 + ] + }, + "type": "Feature", + "properties": {}, + "id": 48, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -0.999755859375, + -0.99970513084196 + ] + }, + "type": "Feature", + "properties": {}, + "id": 47, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -0.999755859375, + -1.9991059831233144 + ] + }, + "type": "Feature", + "properties": {}, + "id": 46, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -0.999755859375, + -2.9978987411030573 + ] + }, + "type": "Feature", + "properties": {}, + "id": 45, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -0.999755859375, + -4.00126030584525 + ] + }, + "type": "Feature", + "properties": {}, + "id": 44, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -0.999755859375, + -4.997922089609844 + ] + }, + "type": "Feature", + "properties": {}, + "id": 43, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -1.99951171875, + 0 + ] + }, + "type": "Feature", + "properties": {}, + "id": 37, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -1.99951171875, + -0.99970513084196 + ] + }, + "type": "Feature", + "properties": {}, + "id": 36, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -1.99951171875, + -1.9991059831233144 + ] + }, + "type": "Feature", + "properties": {}, + "id": 35, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -1.99951171875, + -2.9978987411030573 + ] + }, + "type": "Feature", + "properties": {}, + "id": 34, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -1.99951171875, + -4.00126030584525 + ] + }, + "type": "Feature", + "properties": {}, + "id": 33, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -1.99951171875, + -4.997922089609844 + ] + }, + "type": "Feature", + "properties": {}, + "id": 32, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -2.999267578125, + 0 + ] + }, + "type": "Feature", + "properties": {}, + "id": 26, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -2.999267578125, + -0.99970513084196 + ] + }, + "type": "Feature", + "properties": {}, + "id": 25, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -2.999267578125, + -1.9991059831233144 + ] + }, + "type": "Feature", + "properties": {}, + "id": 24, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -2.999267578125, + -2.9978987411030573 + ] + }, + "type": "Feature", + "properties": {}, + "id": 23, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -2.999267578125, + -4.00126030584525 + ] + }, + "type": "Feature", + "properties": {}, + "id": 22, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -2.999267578125, + -4.997922089609844 + ] + }, + "type": "Feature", + "properties": {}, + "id": 21, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -3.9990234375, + 0 + ] + }, + "type": "Feature", + "properties": {}, + "id": 15, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -3.9990234375, + -0.99970513084196 + ] + }, + "type": "Feature", + "properties": {}, + "id": 14, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -3.9990234375, + -1.9991059831233144 + ] + }, + "type": "Feature", + "properties": {}, + "id": 13, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -3.9990234375, + -2.9978987411030573 + ] + }, + "type": "Feature", + "properties": {}, + "id": 12, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -3.9990234375, + -4.00126030584525 + ] + }, + "type": "Feature", + "properties": {}, + "id": 119, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -3.9990234375, + -4.997922089609844 + ] + }, + "type": "Feature", + "properties": {}, + "id": 11, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -4.998779296875, + 0 + ] + }, + "type": "Feature", + "properties": {}, + "id": 5, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -4.998779296875, + -0.99970513084196 + ] + }, + "type": "Feature", + "properties": {}, + "id": 4, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -4.998779296875, + -1.9991059831233144 + ] + }, + "type": "Feature", + "properties": {}, + "id": 3, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -4.998779296875, + -2.9978987411030573 + ] + }, + "type": "Feature", + "properties": {}, + "id": 2, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -4.998779296875, + -4.00126030584525 + ] + }, + "type": "Feature", + "properties": {}, + "id": 1, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -4.998779296875, + -4.997922089609844 + ] + }, + "type": "Feature", + "properties": {}, + "id": 121, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 4.998779296875, + 0 + ] + }, + "type": "Feature", + "properties": {}, + "id": 114, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 4.998779296875, + -0.99970513084196 + ] + }, + "type": "Feature", + "properties": {}, + "id": 113, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 4.998779296875, + -1.9991059831233144 + ] + }, + "type": "Feature", + "properties": {}, + "id": 112, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 4.998779296875, + -2.9978987411030573 + ] + }, + "type": "Feature", + "properties": {}, + "id": 111, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 4.998779296875, + -4.00126030584525 + ] + }, + "type": "Feature", + "properties": {}, + "id": 110, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 4.998779296875, + -4.997922089609844 + ] + }, + "type": "Feature", + "properties": {}, + "id": 109, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 3.9990234375, + 0 + ] + }, + "type": "Feature", + "properties": {}, + "id": 103, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 3.9990234375, + -0.99970513084196 + ] + }, + "type": "Feature", + "properties": {}, + "id": 102, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 3.9990234375, + -1.9991059831233144 + ] + }, + "type": "Feature", + "properties": {}, + "id": 101, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 3.9990234375, + -2.9978987411030573 + ] + }, + "type": "Feature", + "properties": {}, + "id": 100, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 3.9990234375, + -4.00126030584525 + ] + }, + "type": "Feature", + "properties": {}, + "id": 99, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 3.9990234375, + -4.997922089609844 + ] + }, + "type": "Feature", + "properties": {}, + "id": 98, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 2.999267578125, + 0 + ] + }, + "type": "Feature", + "properties": {}, + "id": 92, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 2.999267578125, + -0.99970513084196 + ] + }, + "type": "Feature", + "properties": {}, + "id": 91, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 2.999267578125, + -1.9991059831233144 + ] + }, + "type": "Feature", + "properties": {}, + "id": 90, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 2.999267578125, + -2.9978987411030573 + ] + }, + "type": "Feature", + "properties": {}, + "id": 89, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 2.999267578125, + -4.00126030584525 + ] + }, + "type": "Feature", + "properties": {}, + "id": 88, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 2.999267578125, + -4.997922089609844 + ] + }, + "type": "Feature", + "properties": {}, + "id": 87, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 1.99951171875, + 0 + ] + }, + "type": "Feature", + "properties": {}, + "id": 81, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 1.99951171875, + -0.99970513084196 + ] + }, + "type": "Feature", + "properties": {}, + "id": 80, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 1.99951171875, + -1.9991059831233144 + ] + }, + "type": "Feature", + "properties": {}, + "id": 79, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 1.99951171875, + -2.9978987411030573 + ] + }, + "type": "Feature", + "properties": {}, + "id": 78, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 1.99951171875, + -4.00126030584525 + ] + }, + "type": "Feature", + "properties": {}, + "id": 77, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 1.99951171875, + -4.997922089609844 + ] + }, + "type": "Feature", + "properties": {}, + "id": 76, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 0.999755859375, + 0 + ] + }, + "type": "Feature", + "properties": {}, + "id": 70, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 0.999755859375, + -0.99970513084196 + ] + }, + "type": "Feature", + "properties": {}, + "id": 69, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 0.999755859375, + -1.9991059831233144 + ] + }, + "type": "Feature", + "properties": {}, + "id": 68, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 0.999755859375, + -2.9978987411030573 + ] + }, + "type": "Feature", + "properties": {}, + "id": 67, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 0.999755859375, + -4.00126030584525 + ] + }, + "type": "Feature", + "properties": {}, + "id": 66, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 0.999755859375, + -4.997922089609844 + ] + }, + "type": "Feature", + "properties": {}, + "id": 65, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + }, + "type": "Feature", + "properties": {}, + "id": 59, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 0, + -0.99970513084196 + ] + }, + "type": "Feature", + "properties": {}, + "id": 58, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 0, + -1.9991059831233144 + ] + }, + "type": "Feature", + "properties": {}, + "id": 57, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 0, + -2.9978987411030573 + ] + }, + "type": "Feature", + "properties": {}, + "id": 56, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 0, + -4.00126030584525 + ] + }, + "type": "Feature", + "properties": {}, + "id": 55, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 0, + -4.997922089609844 + ] + }, + "type": "Feature", + "properties": {}, + "id": 54, + "source": "geojson", + "state": {} + } +] \ No newline at end of file diff --git a/metrics/integration/query-tests/symbol/rotated-after-insert/style.json b/metrics/integration/query-tests/symbol/rotated-after-insert/style.json new file mode 100644 index 00000000000..a73a9d91c6a --- /dev/null +++ b/metrics/integration/query-tests/symbol/rotated-after-insert/style.json @@ -0,0 +1,53 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 256, + "height": 256, + "operations": [ + [ + "setBearing", + 45 + ] + ], + "queryGeometry": [ + [ + 0, + 0 + ], + [ + 256, + 256 + ] + ] + } + }, + "center": [ + 0, + 0 + ], + "zoom": 3, + "sources": { + "geojson": { + "type": "geojson", + "data": "local://data/121points.geojson" + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "text-field": ".", + "text-size": 6, + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/query-tests/symbol/rotated-inside/expected.json b/metrics/integration/query-tests/symbol/rotated-inside/expected.json new file mode 100644 index 00000000000..857968f2f03 --- /dev/null +++ b/metrics/integration/query-tests/symbol/rotated-inside/expected.json @@ -0,0 +1,161 @@ +[ + { + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -74.26483154296875, + 40.168380093142446 + ], + [ + -74.25933837890625, + 40.16208338164617 + ], + [ + -74.2620849609375, + 40.14948820651523 + ], + [ + -74.25384521484375, + 40.14738878354049 + ], + [ + -74.24285888671875, + 40.1305910638018 + ], + [ + -74.24560546875, + 40.117990048904744 + ], + [ + -74.23187255859375, + 40.109588074741396 + ], + [ + -74.20440673828125, + 40.11378919157522 + ], + [ + -74.16046142578125, + 40.107487419012415 + ], + [ + -74.1522216796875, + 40.099084147368444 + ], + [ + -74.1082763671875, + 40.13899044275823 + ], + [ + -74.09454345703125, + 40.109588074741396 + ], + [ + -74.07257080078125, + 40.09067983779909 + ], + [ + -74.0478515625, + 40.10538669840983 + ], + [ + -73.9654541015625, + 40.099084147368444 + ], + [ + -74.00115966796875, + 39.97712009843963 + ], + [ + -74.03411865234375, + 39.77054750039528 + ], + [ + -74.04510498046875, + 39.73676229957945 + ], + [ + -74.0972900390625, + 39.650112101863726 + ], + [ + -74.234619140625, + 39.47648555419738 + ], + [ + -74.29779052734375, + 39.47648555419738 + ], + [ + -74.31427001953125, + 39.50192146626986 + ], + [ + -74.3280029296875, + 39.508278990341125 + ], + [ + -74.3829345703125, + 39.499802162332884 + ], + [ + -74.4049072265625, + 39.54005788576376 + ], + [ + -74.41864013671875, + 39.55064761909321 + ], + [ + -74.4158935546875, + 39.563353165829284 + ], + [ + -74.42138671875, + 39.56970506644248 + ], + [ + -74.40216064453125, + 39.57393934359189 + ], + [ + -74.39117431640625, + 39.59722324495564 + ], + [ + -74.39117431640625, + 39.77476948529548 + ], + [ + -74.55322265625, + 40.08017299133499 + ], + [ + -74.52850341796875, + 40.09067983779909 + ], + [ + -74.40765380859375, + 40.172577576321686 + ], + [ + -74.26483154296875, + 40.168380093142446 + ] + ] + ] + }, + "type": "Feature", + "properties": { + "id": "34029", + "name": "Ocean County", + "pop_density": 2310.250993696356 + }, + "id": 49, + "source": "us-counties", + "sourceLayer": "counties", + "state": {} + } +] \ No newline at end of file diff --git a/metrics/integration/query-tests/symbol/rotated-inside/style.json b/metrics/integration/query-tests/symbol/rotated-inside/style.json new file mode 100644 index 00000000000..420555c5a63 --- /dev/null +++ b/metrics/integration/query-tests/symbol/rotated-inside/style.json @@ -0,0 +1,52 @@ +{ + "version": 8, + "metadata": { + "test": { + "collisionDebug": true, + "width": 500, + "height": 500, + "queryGeometry": [ + 370, + 305 + ] + } + }, + "center": [ + -74.522, + 39.92 + ], + "zoom": 8, + "bearing": 45, + "sources": { + "us-counties": { + "type": "vector", + "maxzoom": 7, + "minzoom": 7, + "tiles": [ + "local://tiles/counties-{z}-{x}-{y}.mvt" + ] + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "counties", + "type": "symbol", + "source": "us-counties", + "source-layer": "counties", + "layout": { + "text-field": "{name}", + "text-size": 11, + "symbol-spacing": 60, + "text-max-angle": 1000, + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "symbol-placement": "line" + }, + "interactive": true + } + ] +} diff --git a/metrics/integration/query-tests/symbol/rotated-outside/expected.json b/metrics/integration/query-tests/symbol/rotated-outside/expected.json new file mode 100644 index 00000000000..0637a088a01 --- /dev/null +++ b/metrics/integration/query-tests/symbol/rotated-outside/expected.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/metrics/integration/query-tests/symbol/rotated-outside/style.json b/metrics/integration/query-tests/symbol/rotated-outside/style.json new file mode 100644 index 00000000000..41359851cc3 --- /dev/null +++ b/metrics/integration/query-tests/symbol/rotated-outside/style.json @@ -0,0 +1,52 @@ +{ + "version": 8, + "metadata": { + "test": { + "collisionDebug": true, + "width": 500, + "height": 500, + "queryGeometry": [ + 366, + 321 + ] + } + }, + "center": [ + -74.522, + 39.92 + ], + "zoom": 8, + "bearing": 45, + "sources": { + "us-counties": { + "type": "vector", + "maxzoom": 7, + "minzoom": 7, + "tiles": [ + "local://tiles/counties-{z}-{x}-{y}.mvt" + ] + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "counties", + "type": "symbol", + "source": "us-counties", + "source-layer": "counties", + "layout": { + "text-field": "{name}", + "text-size": 11, + "symbol-spacing": 60, + "text-max-angle": 1000, + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "symbol-placement": "line" + }, + "interactive": true + } + ] +} \ No newline at end of file diff --git a/metrics/integration/query-tests/symbol/rotated-sort/expected.json b/metrics/integration/query-tests/symbol/rotated-sort/expected.json new file mode 100644 index 00000000000..9db38b0e7e3 --- /dev/null +++ b/metrics/integration/query-tests/symbol/rotated-sort/expected.json @@ -0,0 +1,1696 @@ +[ + { + "geometry": { + "type": "Point", + "coordinates": [ + -4.998779296875, + 0.9997051308419742 + ] + }, + "type": "Feature", + "properties": {}, + "id": 6, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -4.998779296875, + 1.9991059831233287 + ] + }, + "type": "Feature", + "properties": {}, + "id": 7, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -3.9990234375, + 0.9997051308419742 + ] + }, + "type": "Feature", + "properties": {}, + "id": 16, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -4.998779296875, + 2.9978987411030573 + ] + }, + "type": "Feature", + "properties": {}, + "id": 8, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -3.9990234375, + 1.9991059831233287 + ] + }, + "type": "Feature", + "properties": {}, + "id": 17, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -2.999267578125, + 0.9997051308419742 + ] + }, + "type": "Feature", + "properties": {}, + "id": 27, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -3.9990234375, + 2.9978987411030573 + ] + }, + "type": "Feature", + "properties": {}, + "id": 18, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -2.999267578125, + 1.9991059831233287 + ] + }, + "type": "Feature", + "properties": {}, + "id": 28, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -1.99951171875, + 0.9997051308419742 + ] + }, + "type": "Feature", + "properties": {}, + "id": 38, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -4.998779296875, + 4.001260305845264 + ] + }, + "type": "Feature", + "properties": {}, + "id": 9, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -2.999267578125, + 2.9978987411030573 + ] + }, + "type": "Feature", + "properties": {}, + "id": 29, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -1.99951171875, + 1.9991059831233287 + ] + }, + "type": "Feature", + "properties": {}, + "id": 39, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -0.999755859375, + 0.9997051308419742 + ] + }, + "type": "Feature", + "properties": {}, + "id": 49, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -4.998779296875, + 4.997922089609858 + ] + }, + "type": "Feature", + "properties": {}, + "id": 10, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -3.9990234375, + 4.001260305845264 + ] + }, + "type": "Feature", + "properties": {}, + "id": 19, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -3.9990234375, + 4.997922089609858 + ] + }, + "type": "Feature", + "properties": {}, + "id": 20, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -2.999267578125, + 4.001260305845264 + ] + }, + "type": "Feature", + "properties": {}, + "id": 30, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -1.99951171875, + 2.9978987411030573 + ] + }, + "type": "Feature", + "properties": {}, + "id": 40, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -0.999755859375, + 1.9991059831233287 + ] + }, + "type": "Feature", + "properties": {}, + "id": 50, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -0.999755859375, + 2.9978987411030573 + ] + }, + "type": "Feature", + "properties": {}, + "id": 51, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -2.999267578125, + 4.997922089609858 + ] + }, + "type": "Feature", + "properties": {}, + "id": 31, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -1.99951171875, + 4.001260305845264 + ] + }, + "type": "Feature", + "properties": {}, + "id": 41, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -1.99951171875, + 4.997922089609858 + ] + }, + "type": "Feature", + "properties": {}, + "id": 42, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -0.999755859375, + 4.001260305845264 + ] + }, + "type": "Feature", + "properties": {}, + "id": 52, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -0.999755859375, + 4.997922089609858 + ] + }, + "type": "Feature", + "properties": {}, + "id": 53, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 0.9997051308419742 + ] + }, + "type": "Feature", + "properties": {}, + "id": 60, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 1.9991059831233287 + ] + }, + "type": "Feature", + "properties": {}, + "id": 61, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 0.999755859375, + 0.9997051308419742 + ] + }, + "type": "Feature", + "properties": {}, + "id": 71, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 2.9978987411030573 + ] + }, + "type": "Feature", + "properties": {}, + "id": 62, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 0.999755859375, + 1.9991059831233287 + ] + }, + "type": "Feature", + "properties": {}, + "id": 72, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 1.99951171875, + 0.9997051308419742 + ] + }, + "type": "Feature", + "properties": {}, + "id": 82, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 0.999755859375, + 2.9978987411030573 + ] + }, + "type": "Feature", + "properties": {}, + "id": 73, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 1.99951171875, + 1.9991059831233287 + ] + }, + "type": "Feature", + "properties": {}, + "id": 83, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 2.999267578125, + 0.9997051308419742 + ] + }, + "type": "Feature", + "properties": {}, + "id": 93, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 4.001260305845264 + ] + }, + "type": "Feature", + "properties": {}, + "id": 63, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 1.99951171875, + 2.9978987411030573 + ] + }, + "type": "Feature", + "properties": {}, + "id": 84, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 2.999267578125, + 1.9991059831233287 + ] + }, + "type": "Feature", + "properties": {}, + "id": 94, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 3.9990234375, + 0.9997051308419742 + ] + }, + "type": "Feature", + "properties": {}, + "id": 104, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 4.997922089609858 + ] + }, + "type": "Feature", + "properties": {}, + "id": 64, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 0.999755859375, + 4.001260305845264 + ] + }, + "type": "Feature", + "properties": {}, + "id": 74, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 0.999755859375, + 4.997922089609858 + ] + }, + "type": "Feature", + "properties": {}, + "id": 75, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 1.99951171875, + 4.001260305845264 + ] + }, + "type": "Feature", + "properties": {}, + "id": 85, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 2.999267578125, + 2.9978987411030573 + ] + }, + "type": "Feature", + "properties": {}, + "id": 95, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 3.9990234375, + 1.9991059831233287 + ] + }, + "type": "Feature", + "properties": {}, + "id": 105, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 4.998779296875, + 0.9997051308419742 + ] + }, + "type": "Feature", + "properties": {}, + "id": 115, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 3.9990234375, + 2.9978987411030573 + ] + }, + "type": "Feature", + "properties": {}, + "id": 106, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 4.998779296875, + 1.9991059831233287 + ] + }, + "type": "Feature", + "properties": {}, + "id": 116, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 1.99951171875, + 4.997922089609858 + ] + }, + "type": "Feature", + "properties": {}, + "id": 86, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 2.999267578125, + 4.001260305845264 + ] + }, + "type": "Feature", + "properties": {}, + "id": 96, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 4.998779296875, + 2.9978987411030573 + ] + }, + "type": "Feature", + "properties": {}, + "id": 117, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 2.999267578125, + 4.997922089609858 + ] + }, + "type": "Feature", + "properties": {}, + "id": 97, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 3.9990234375, + 4.001260305845264 + ] + }, + "type": "Feature", + "properties": {}, + "id": 107, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 3.9990234375, + 4.997922089609858 + ] + }, + "type": "Feature", + "properties": {}, + "id": 108, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 4.998779296875, + 4.001260305845264 + ] + }, + "type": "Feature", + "properties": {}, + "id": 118, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 4.998779296875, + 4.997922089609858 + ] + }, + "type": "Feature", + "properties": {}, + "id": 119, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -4.998779296875, + -4.997922089609844 + ] + }, + "type": "Feature", + "properties": {}, + "id": 121, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -4.998779296875, + -4.00126030584525 + ] + }, + "type": "Feature", + "properties": {}, + "id": 1, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -3.9990234375, + -4.997922089609844 + ] + }, + "type": "Feature", + "properties": {}, + "id": 11, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -3.9990234375, + -4.00126030584525 + ] + }, + "type": "Feature", + "properties": {}, + "id": 119, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -2.999267578125, + -4.997922089609844 + ] + }, + "type": "Feature", + "properties": {}, + "id": 21, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -4.998779296875, + -2.9978987411030573 + ] + }, + "type": "Feature", + "properties": {}, + "id": 2, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -2.999267578125, + -4.00126030584525 + ] + }, + "type": "Feature", + "properties": {}, + "id": 22, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -1.99951171875, + -4.997922089609844 + ] + }, + "type": "Feature", + "properties": {}, + "id": 32, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -4.998779296875, + -1.9991059831233144 + ] + }, + "type": "Feature", + "properties": {}, + "id": 3, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -3.9990234375, + -2.9978987411030573 + ] + }, + "type": "Feature", + "properties": {}, + "id": 12, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -4.998779296875, + -0.99970513084196 + ] + }, + "type": "Feature", + "properties": {}, + "id": 4, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -3.9990234375, + -1.9991059831233144 + ] + }, + "type": "Feature", + "properties": {}, + "id": 13, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -2.999267578125, + -2.9978987411030573 + ] + }, + "type": "Feature", + "properties": {}, + "id": 23, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -1.99951171875, + -4.00126030584525 + ] + }, + "type": "Feature", + "properties": {}, + "id": 33, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -0.999755859375, + -4.997922089609844 + ] + }, + "type": "Feature", + "properties": {}, + "id": 43, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -0.999755859375, + -4.00126030584525 + ] + }, + "type": "Feature", + "properties": {}, + "id": 44, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -4.998779296875, + 0 + ] + }, + "type": "Feature", + "properties": {}, + "id": 5, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -3.9990234375, + -0.99970513084196 + ] + }, + "type": "Feature", + "properties": {}, + "id": 14, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -2.999267578125, + -1.9991059831233144 + ] + }, + "type": "Feature", + "properties": {}, + "id": 24, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -1.99951171875, + -2.9978987411030573 + ] + }, + "type": "Feature", + "properties": {}, + "id": 34, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -3.9990234375, + 0 + ] + }, + "type": "Feature", + "properties": {}, + "id": 15, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -2.999267578125, + -0.99970513084196 + ] + }, + "type": "Feature", + "properties": {}, + "id": 25, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -1.99951171875, + -1.9991059831233144 + ] + }, + "type": "Feature", + "properties": {}, + "id": 35, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -0.999755859375, + -2.9978987411030573 + ] + }, + "type": "Feature", + "properties": {}, + "id": 45, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -2.999267578125, + 0 + ] + }, + "type": "Feature", + "properties": {}, + "id": 26, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -1.99951171875, + -0.99970513084196 + ] + }, + "type": "Feature", + "properties": {}, + "id": 36, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -0.999755859375, + -1.9991059831233144 + ] + }, + "type": "Feature", + "properties": {}, + "id": 46, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -1.99951171875, + 0 + ] + }, + "type": "Feature", + "properties": {}, + "id": 37, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -0.999755859375, + -0.99970513084196 + ] + }, + "type": "Feature", + "properties": {}, + "id": 47, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + -0.999755859375, + 0 + ] + }, + "type": "Feature", + "properties": {}, + "id": 48, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 0, + -4.997922089609844 + ] + }, + "type": "Feature", + "properties": {}, + "id": 54, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 0, + -4.00126030584525 + ] + }, + "type": "Feature", + "properties": {}, + "id": 55, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 0.999755859375, + -4.997922089609844 + ] + }, + "type": "Feature", + "properties": {}, + "id": 65, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 0.999755859375, + -4.00126030584525 + ] + }, + "type": "Feature", + "properties": {}, + "id": 66, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 1.99951171875, + -4.997922089609844 + ] + }, + "type": "Feature", + "properties": {}, + "id": 76, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 0, + -2.9978987411030573 + ] + }, + "type": "Feature", + "properties": {}, + "id": 56, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 1.99951171875, + -4.00126030584525 + ] + }, + "type": "Feature", + "properties": {}, + "id": 77, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 2.999267578125, + -4.997922089609844 + ] + }, + "type": "Feature", + "properties": {}, + "id": 87, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 0, + -1.9991059831233144 + ] + }, + "type": "Feature", + "properties": {}, + "id": 57, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 0.999755859375, + -2.9978987411030573 + ] + }, + "type": "Feature", + "properties": {}, + "id": 67, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 0, + -0.99970513084196 + ] + }, + "type": "Feature", + "properties": {}, + "id": 58, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 0.999755859375, + -1.9991059831233144 + ] + }, + "type": "Feature", + "properties": {}, + "id": 68, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 1.99951171875, + -2.9978987411030573 + ] + }, + "type": "Feature", + "properties": {}, + "id": 78, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 2.999267578125, + -4.00126030584525 + ] + }, + "type": "Feature", + "properties": {}, + "id": 88, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 3.9990234375, + -4.997922089609844 + ] + }, + "type": "Feature", + "properties": {}, + "id": 98, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 3.9990234375, + -4.00126030584525 + ] + }, + "type": "Feature", + "properties": {}, + "id": 99, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 4.998779296875, + -4.997922089609844 + ] + }, + "type": "Feature", + "properties": {}, + "id": 109, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + }, + "type": "Feature", + "properties": {}, + "id": 59, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 0.999755859375, + -0.99970513084196 + ] + }, + "type": "Feature", + "properties": {}, + "id": 69, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 1.99951171875, + -1.9991059831233144 + ] + }, + "type": "Feature", + "properties": {}, + "id": 79, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 2.999267578125, + -2.9978987411030573 + ] + }, + "type": "Feature", + "properties": {}, + "id": 89, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 4.998779296875, + -4.00126030584525 + ] + }, + "type": "Feature", + "properties": {}, + "id": 110, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 0.999755859375, + 0 + ] + }, + "type": "Feature", + "properties": {}, + "id": 70, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 1.99951171875, + -0.99970513084196 + ] + }, + "type": "Feature", + "properties": {}, + "id": 80, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 2.999267578125, + -1.9991059831233144 + ] + }, + "type": "Feature", + "properties": {}, + "id": 90, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 3.9990234375, + -2.9978987411030573 + ] + }, + "type": "Feature", + "properties": {}, + "id": 100, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 1.99951171875, + 0 + ] + }, + "type": "Feature", + "properties": {}, + "id": 81, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 2.999267578125, + -0.99970513084196 + ] + }, + "type": "Feature", + "properties": {}, + "id": 91, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 3.9990234375, + -1.9991059831233144 + ] + }, + "type": "Feature", + "properties": {}, + "id": 101, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 4.998779296875, + -2.9978987411030573 + ] + }, + "type": "Feature", + "properties": {}, + "id": 111, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 2.999267578125, + 0 + ] + }, + "type": "Feature", + "properties": {}, + "id": 92, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 3.9990234375, + -0.99970513084196 + ] + }, + "type": "Feature", + "properties": {}, + "id": 102, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 4.998779296875, + -1.9991059831233144 + ] + }, + "type": "Feature", + "properties": {}, + "id": 112, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 3.9990234375, + 0 + ] + }, + "type": "Feature", + "properties": {}, + "id": 103, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 4.998779296875, + -0.99970513084196 + ] + }, + "type": "Feature", + "properties": {}, + "id": 113, + "source": "geojson", + "state": {} + }, + { + "geometry": { + "type": "Point", + "coordinates": [ + 4.998779296875, + 0 + ] + }, + "type": "Feature", + "properties": {}, + "id": 114, + "source": "geojson", + "state": {} + } +] \ No newline at end of file diff --git a/metrics/integration/query-tests/symbol/rotated-sort/style.json b/metrics/integration/query-tests/symbol/rotated-sort/style.json new file mode 100644 index 00000000000..f1fbc5bb750 --- /dev/null +++ b/metrics/integration/query-tests/symbol/rotated-sort/style.json @@ -0,0 +1,50 @@ +{ + "version": 8, + "metadata": { + "test": { + "description": "Because text-allow-overlap is true, the query results will be reordered based on rotated rendering order (compare to rotated-after-insert, in which the results match the order in the original data)", + "width": 256, + "height": 256, + "queryGeometry": [ + [ + 0, + 0 + ], + [ + 256, + 256 + ] + ] + } + }, + "center": [ + 0, + 0 + ], + "zoom": 3, + "bearing": 45, + "sources": { + "geojson": { + "type": "geojson", + "data": "local://data/121points.geojson" + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "text-field": ".", + "text-size": 6, + "text-allow-overlap": true, + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + } + } + ] +} diff --git a/metrics/integration/query-tests/symbol/tile-boundary/expected.json b/metrics/integration/query-tests/symbol/tile-boundary/expected.json new file mode 100644 index 00000000000..b3953be868f --- /dev/null +++ b/metrics/integration/query-tests/symbol/tile-boundary/expected.json @@ -0,0 +1,15 @@ +[ + { + "geometry": { + "type": "Point", + "coordinates": [ + 2.999267578125, + 2.9978987411030573 + ] + }, + "type": "Feature", + "properties": {}, + "source": "point", + "state": {} + } +] \ No newline at end of file diff --git a/metrics/integration/query-tests/symbol/tile-boundary/style.json b/metrics/integration/query-tests/symbol/tile-boundary/style.json new file mode 100644 index 00000000000..fd4a5241e22 --- /dev/null +++ b/metrics/integration/query-tests/symbol/tile-boundary/style.json @@ -0,0 +1,61 @@ +{ + "version": 8, + "metadata": { + "test": { + "debug": true, + "height": 128, + "width": 256, + "queryGeometry": [ + [ + 0, + 0 + ], + [ + 100, + 128 + ] + ] + } + }, + "center": [ + 0, + 0 + ], + "zoom": 3, + "sources": { + "point": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Point", + "coordinates": [ + 3, + 3 + ] + } + } + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "text", + "type": "symbol", + "source": "point", + "layout": { + "text-field": "This Label Bleeds Over Tile Boundaries", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + } + } + ] +} diff --git a/metrics/integration/query-tests/world-wrapping/box/expected.json b/metrics/integration/query-tests/world-wrapping/box/expected.json new file mode 100644 index 00000000000..29b73af738a --- /dev/null +++ b/metrics/integration/query-tests/world-wrapping/box/expected.json @@ -0,0 +1,104 @@ +[ + { + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -69.2578125, + -33.87041555094182 + ], + [ + -69.609375, + -33.57801474614399 + ], + [ + -69.43359375, + -33.137551192346145 + ], + [ + -69.2578125, + -33.87041555094182 + ] + ] + ] + }, + "type": "Feature", + "properties": { + "class": "shadow", + "level": 56 + }, + "id": 958, + "source": "mapbox", + "sourceLayer": "hillshade", + "state": {} + }, + { + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -65.390625, + -27.059125784374054 + ], + [ + -65.91796875, + -27.527758206861883 + ], + [ + -65.56640625, + -26.74561038219901 + ], + [ + -65.390625, + -27.059125784374054 + ] + ] + ] + }, + "type": "Feature", + "properties": { + "class": "shadow", + "level": 56 + }, + "id": 957, + "source": "mapbox", + "sourceLayer": "hillshade", + "state": {} + }, + { + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -64.6875, + -23.563987128451217 + ], + [ + -65.0390625, + -23.72501173595178 + ], + [ + -64.86328125, + -23.07973176244988 + ], + [ + -64.6875, + -23.563987128451217 + ] + ] + ] + }, + "type": "Feature", + "properties": { + "class": "shadow", + "level": 56 + }, + "id": 956, + "source": "mapbox", + "sourceLayer": "hillshade", + "state": {} + } +] \ No newline at end of file diff --git a/metrics/integration/query-tests/world-wrapping/box/style.json b/metrics/integration/query-tests/world-wrapping/box/style.json new file mode 100644 index 00000000000..d5822eefe1d --- /dev/null +++ b/metrics/integration/query-tests/world-wrapping/box/style.json @@ -0,0 +1,50 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 2000, + "height": 500, + "pixelRatio": 0.25, + "queryGeometry": [ + [ + 500, + 280 + ], + [ + 1700, + 400 + ] + ] + } + }, + "center": [ + 0, + 0 + ], + "zoom": 0, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "layers": [ + { + "id": "countries", + "type": "circle", + "source": "mapbox", + "source-layer": "hillshade", + "filter": [ + "==", + "level", + 56 + ], + "paint": { + "circle-radius": 5 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/query-tests/world-wrapping/point/expected.json b/metrics/integration/query-tests/world-wrapping/point/expected.json new file mode 100644 index 00000000000..4d0b7c0d5d4 --- /dev/null +++ b/metrics/integration/query-tests/world-wrapping/point/expected.json @@ -0,0 +1,36 @@ +[ + { + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + 121.640625, + 23.64452419857369 + ], + [ + 121.46484375, + 24.287026865376433 + ], + [ + 121.81640625, + 24.287026865376433 + ], + [ + 121.640625, + 23.64452419857369 + ] + ] + ] + }, + "type": "Feature", + "properties": { + "class": "shadow", + "level": 56 + }, + "id": 967, + "source": "mapbox", + "sourceLayer": "hillshade", + "state": {} + } +] \ No newline at end of file diff --git a/metrics/integration/query-tests/world-wrapping/point/style.json b/metrics/integration/query-tests/world-wrapping/point/style.json new file mode 100644 index 00000000000..ed0037a6210 --- /dev/null +++ b/metrics/integration/query-tests/world-wrapping/point/style.json @@ -0,0 +1,45 @@ +{ + "version": 8, + "metadata": { + "test": { + "debug": true, + "width": 1000, + "height": 250, + "pixelRatio": 0.5, + "queryGeometry": [ + 160, + 90 + ] + } + }, + "center": [ + 0, + 0 + ], + "zoom": 0, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "layers": [ + { + "id": "countries", + "type": "circle", + "source": "mapbox", + "source-layer": "hillshade", + "filter": [ + "==", + "level", + 56 + ], + "paint": { + "circle-radius": 15 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/background-color/colorSpace-hcl/expected.png b/metrics/integration/render-tests/background-color/colorSpace-hcl/expected.png new file mode 100644 index 00000000000..3ef07516e2a Binary files /dev/null and b/metrics/integration/render-tests/background-color/colorSpace-hcl/expected.png differ diff --git a/metrics/integration/render-tests/background-color/colorSpace-hcl/style.json b/metrics/integration/render-tests/background-color/colorSpace-hcl/style.json new file mode 100644 index 00000000000..00facfba21b --- /dev/null +++ b/metrics/integration/render-tests/background-color/colorSpace-hcl/style.json @@ -0,0 +1,32 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "zoom": 5, + "sources": {}, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": { + "stops": [ + [ + 0, + "rgb(118,0,118)" + ], + [ + 10, + "rgb(255,155,0)" + ] + ], + "colorSpace": "hcl" + } + } + } + ] +} diff --git a/metrics/integration/render-tests/background-color/colorSpace-lab/expected.png b/metrics/integration/render-tests/background-color/colorSpace-lab/expected.png new file mode 100644 index 00000000000..323d32a43a0 Binary files /dev/null and b/metrics/integration/render-tests/background-color/colorSpace-lab/expected.png differ diff --git a/metrics/integration/render-tests/background-color/colorSpace-lab/style.json b/metrics/integration/render-tests/background-color/colorSpace-lab/style.json new file mode 100644 index 00000000000..edd2111d47a --- /dev/null +++ b/metrics/integration/render-tests/background-color/colorSpace-lab/style.json @@ -0,0 +1,32 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "zoom": 5, + "sources": {}, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": { + "stops": [ + [ + 0, + "rgb(118,0,118)" + ], + [ + 10, + "rgb(255,155,0)" + ] + ], + "colorSpace": "lab" + } + } + } + ] +} diff --git a/metrics/integration/render-tests/background-color/default/expected.png b/metrics/integration/render-tests/background-color/default/expected.png new file mode 100644 index 00000000000..d58554e96e6 Binary files /dev/null and b/metrics/integration/render-tests/background-color/default/expected.png differ diff --git a/metrics/integration/render-tests/background-color/default/style.json b/metrics/integration/render-tests/background-color/default/style.json new file mode 100644 index 00000000000..deafaa3c81f --- /dev/null +++ b/metrics/integration/render-tests/background-color/default/style.json @@ -0,0 +1,16 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": {}, + "layers": [ + { + "id": "background", + "type": "background" + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/background-color/function/expected.png b/metrics/integration/render-tests/background-color/function/expected.png new file mode 100644 index 00000000000..cc46431ca9e Binary files /dev/null and b/metrics/integration/render-tests/background-color/function/expected.png differ diff --git a/metrics/integration/render-tests/background-color/function/style.json b/metrics/integration/render-tests/background-color/function/style.json new file mode 100644 index 00000000000..5c76b5152f7 --- /dev/null +++ b/metrics/integration/render-tests/background-color/function/style.json @@ -0,0 +1,30 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": {}, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": { + "stops": [ + [ + 0, + "blue" + ], + [ + 10, + "white" + ] + ] + } + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/background-color/literal/expected.png b/metrics/integration/render-tests/background-color/literal/expected.png new file mode 100644 index 00000000000..3a2d7006298 Binary files /dev/null and b/metrics/integration/render-tests/background-color/literal/expected.png differ diff --git a/metrics/integration/render-tests/background-color/literal/style.json b/metrics/integration/render-tests/background-color/literal/style.json new file mode 100644 index 00000000000..c00cd11f7a3 --- /dev/null +++ b/metrics/integration/render-tests/background-color/literal/style.json @@ -0,0 +1,19 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": {}, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "red" + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/background-color/transition/expected.png b/metrics/integration/render-tests/background-color/transition/expected.png new file mode 100644 index 00000000000..8f46694be9a Binary files /dev/null and b/metrics/integration/render-tests/background-color/transition/expected.png differ diff --git a/metrics/integration/render-tests/background-color/transition/style.json b/metrics/integration/render-tests/background-color/transition/style.json new file mode 100644 index 00000000000..f385ec384c9 --- /dev/null +++ b/metrics/integration/render-tests/background-color/transition/style.json @@ -0,0 +1,38 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setPaintProperty", + "background", + "background-color", + "white" + ], + [ + "wait", + 0 + ], + [ + "wait", + 500 + ] + ] + } + }, + "sources": {}, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color-transition": { + "duration": 1000 + }, + "background-color": "red" + } + } + ] +} diff --git a/metrics/integration/render-tests/background-opacity/color/expected.png b/metrics/integration/render-tests/background-opacity/color/expected.png new file mode 100644 index 00000000000..d2ea482d2de Binary files /dev/null and b/metrics/integration/render-tests/background-opacity/color/expected.png differ diff --git a/metrics/integration/render-tests/background-opacity/color/style.json b/metrics/integration/render-tests/background-opacity/color/style.json new file mode 100644 index 00000000000..bc8bff1c88b --- /dev/null +++ b/metrics/integration/render-tests/background-opacity/color/style.json @@ -0,0 +1,21 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": {}, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-opacity": 0.5, + "background-color": "red" + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/background-opacity/image/expected.png b/metrics/integration/render-tests/background-opacity/image/expected.png new file mode 100644 index 00000000000..47c8aeb83a5 Binary files /dev/null and b/metrics/integration/render-tests/background-opacity/image/expected.png differ diff --git a/metrics/integration/render-tests/background-opacity/image/style.json b/metrics/integration/render-tests/background-opacity/image/style.json new file mode 100644 index 00000000000..99163fc1cc2 --- /dev/null +++ b/metrics/integration/render-tests/background-opacity/image/style.json @@ -0,0 +1,21 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": {}, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-opacity": 0.5, + "background-pattern": "wetland-17" + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/background-opacity/overlay/expected.png b/metrics/integration/render-tests/background-opacity/overlay/expected.png new file mode 100644 index 00000000000..669bfe0740e Binary files /dev/null and b/metrics/integration/render-tests/background-opacity/overlay/expected.png differ diff --git a/metrics/integration/render-tests/background-opacity/overlay/style.json b/metrics/integration/render-tests/background-opacity/overlay/style.json new file mode 100644 index 00000000000..f6795900e7c --- /dev/null +++ b/metrics/integration/render-tests/background-opacity/overlay/style.json @@ -0,0 +1,41 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 0, + "sources": { + "satellite": { + "type": "raster", + "tiles": [ + "local://tiles/{z}-{x}-{y}.satellite.png" + ], + "maxzoom": 17, + "tileSize": 256 + } + }, + "layers": [ + { + "id": "raster-none", + "type": "raster", + "source": "satellite", + "paint": { + "raster-fade-duration": 0 + } + }, + { + "id": "background_overlay", + "type": "background", + "paint": { + "background-opacity": 0.5, + "background-color": "green" + } + } + ] +} diff --git a/metrics/integration/render-tests/background-pattern/@2x/expected.png b/metrics/integration/render-tests/background-pattern/@2x/expected.png new file mode 100644 index 00000000000..d1825d1170a Binary files /dev/null and b/metrics/integration/render-tests/background-pattern/@2x/expected.png differ diff --git a/metrics/integration/render-tests/background-pattern/@2x/style.json b/metrics/integration/render-tests/background-pattern/@2x/style.json new file mode 100644 index 00000000000..ef25cf6fc0b --- /dev/null +++ b/metrics/integration/render-tests/background-pattern/@2x/style.json @@ -0,0 +1,21 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "pixelRatio": 2 + } + }, + "sources": {}, + "sprite": "local://sprites/emerald", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-pattern": "school_striped" + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/background-pattern/literal/expected.png b/metrics/integration/render-tests/background-pattern/literal/expected.png new file mode 100644 index 00000000000..ecffac1ec43 Binary files /dev/null and b/metrics/integration/render-tests/background-pattern/literal/expected.png differ diff --git a/metrics/integration/render-tests/background-pattern/literal/style.json b/metrics/integration/render-tests/background-pattern/literal/style.json new file mode 100644 index 00000000000..960e7dd8eb3 --- /dev/null +++ b/metrics/integration/render-tests/background-pattern/literal/style.json @@ -0,0 +1,20 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": {}, + "sprite": "local://sprites/emerald", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-pattern": "school_striped" + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/background-pattern/missing/expected.png b/metrics/integration/render-tests/background-pattern/missing/expected.png new file mode 100644 index 00000000000..724d17cd7d3 Binary files /dev/null and b/metrics/integration/render-tests/background-pattern/missing/expected.png differ diff --git a/metrics/integration/render-tests/background-pattern/missing/style.json b/metrics/integration/render-tests/background-pattern/missing/style.json new file mode 100644 index 00000000000..a7e1d5a82ec --- /dev/null +++ b/metrics/integration/render-tests/background-pattern/missing/style.json @@ -0,0 +1,20 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": {}, + "sprite": "local://sprites/emerald", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-pattern": "missing" + } + } + ] +} diff --git a/metrics/integration/render-tests/background-pattern/pitch/expected.png b/metrics/integration/render-tests/background-pattern/pitch/expected.png new file mode 100644 index 00000000000..d4380b78737 Binary files /dev/null and b/metrics/integration/render-tests/background-pattern/pitch/expected.png differ diff --git a/metrics/integration/render-tests/background-pattern/pitch/style.json b/metrics/integration/render-tests/background-pattern/pitch/style.json new file mode 100644 index 00000000000..199eca6e424 --- /dev/null +++ b/metrics/integration/render-tests/background-pattern/pitch/style.json @@ -0,0 +1,22 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "zoom": 2, + "pitch": 40, + "sources": {}, + "sprite": "local://sprites/emerald", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-pattern": "cemetery_icon" + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/background-pattern/rotated/expected.png b/metrics/integration/render-tests/background-pattern/rotated/expected.png new file mode 100644 index 00000000000..af83ca12516 Binary files /dev/null and b/metrics/integration/render-tests/background-pattern/rotated/expected.png differ diff --git a/metrics/integration/render-tests/background-pattern/rotated/style.json b/metrics/integration/render-tests/background-pattern/rotated/style.json new file mode 100644 index 00000000000..b6798928182 --- /dev/null +++ b/metrics/integration/render-tests/background-pattern/rotated/style.json @@ -0,0 +1,21 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "bearing": 45, + "sources": {}, + "sprite": "local://sprites/emerald", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-pattern": "cemetery_icon" + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/background-pattern/zoomed/expected.png b/metrics/integration/render-tests/background-pattern/zoomed/expected.png new file mode 100644 index 00000000000..6ca2124569c Binary files /dev/null and b/metrics/integration/render-tests/background-pattern/zoomed/expected.png differ diff --git a/metrics/integration/render-tests/background-pattern/zoomed/style.json b/metrics/integration/render-tests/background-pattern/zoomed/style.json new file mode 100644 index 00000000000..569ebfa32ff --- /dev/null +++ b/metrics/integration/render-tests/background-pattern/zoomed/style.json @@ -0,0 +1,21 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "zoom": 0.5, + "sources": {}, + "sprite": "local://sprites/emerald", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-pattern": "cemetery_icon" + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/background-visibility/none/expected.png b/metrics/integration/render-tests/background-visibility/none/expected.png new file mode 100644 index 00000000000..724d17cd7d3 Binary files /dev/null and b/metrics/integration/render-tests/background-visibility/none/expected.png differ diff --git a/metrics/integration/render-tests/background-visibility/none/style.json b/metrics/integration/render-tests/background-visibility/none/style.json new file mode 100644 index 00000000000..ad5a8bc716b --- /dev/null +++ b/metrics/integration/render-tests/background-visibility/none/style.json @@ -0,0 +1,19 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": {}, + "layers": [ + { + "id": "background", + "type": "background", + "layout": { + "visibility": "none" + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/background-visibility/visible/expected.png b/metrics/integration/render-tests/background-visibility/visible/expected.png new file mode 100644 index 00000000000..d58554e96e6 Binary files /dev/null and b/metrics/integration/render-tests/background-visibility/visible/expected.png differ diff --git a/metrics/integration/render-tests/background-visibility/visible/style.json b/metrics/integration/render-tests/background-visibility/visible/style.json new file mode 100644 index 00000000000..cd1dd089094 --- /dev/null +++ b/metrics/integration/render-tests/background-visibility/visible/style.json @@ -0,0 +1,19 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": {}, + "layers": [ + { + "id": "background", + "type": "background", + "layout": { + "visibility": "visible" + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/basic-v9/z0-narrow-y/expected.png b/metrics/integration/render-tests/basic-v9/z0-narrow-y/expected.png new file mode 100644 index 00000000000..c3547a5fc0e Binary files /dev/null and b/metrics/integration/render-tests/basic-v9/z0-narrow-y/expected.png differ diff --git a/metrics/integration/render-tests/basic-v9/z0-narrow-y/style.json b/metrics/integration/render-tests/basic-v9/z0-narrow-y/style.json new file mode 100644 index 00000000000..0c8310ab970 --- /dev/null +++ b/metrics/integration/render-tests/basic-v9/z0-narrow-y/style.json @@ -0,0 +1,15 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 600, + "height": 480, + "operations": [ + ["setStyle", "local://mapbox-gl-styles/styles/basic-v9.json"], + ["wait"] + ] + } + }, + "sources": {}, + "layers": [] +} diff --git a/metrics/integration/render-tests/basic-v9/z0-wide-x/expected.png b/metrics/integration/render-tests/basic-v9/z0-wide-x/expected.png new file mode 100644 index 00000000000..35971a74ffe Binary files /dev/null and b/metrics/integration/render-tests/basic-v9/z0-wide-x/expected.png differ diff --git a/metrics/integration/render-tests/basic-v9/z0-wide-x/style.json b/metrics/integration/render-tests/basic-v9/z0-wide-x/style.json new file mode 100644 index 00000000000..abe2537f0f2 --- /dev/null +++ b/metrics/integration/render-tests/basic-v9/z0-wide-x/style.json @@ -0,0 +1,15 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 600, + "height": 512, + "operations": [ + ["setStyle", "local://mapbox-gl-styles/styles/basic-v9.json"], + ["wait"] + ] + } + }, + "sources": {}, + "layers": [] +} diff --git a/metrics/integration/render-tests/basic-v9/z0/expected.png b/metrics/integration/render-tests/basic-v9/z0/expected.png new file mode 100644 index 00000000000..9723dee6d7b Binary files /dev/null and b/metrics/integration/render-tests/basic-v9/z0/expected.png differ diff --git a/metrics/integration/render-tests/basic-v9/z0/style.json b/metrics/integration/render-tests/basic-v9/z0/style.json new file mode 100644 index 00000000000..34e181e6cf7 --- /dev/null +++ b/metrics/integration/render-tests/basic-v9/z0/style.json @@ -0,0 +1,15 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 512, + "height": 512, + "operations": [ + ["setStyle", "local://mapbox-gl-styles/styles/basic-v9.json"], + ["wait"] + ] + } + }, + "sources": {}, + "layers": [] +} diff --git a/metrics/integration/render-tests/bright-v9/z0/expected.png b/metrics/integration/render-tests/bright-v9/z0/expected.png new file mode 100644 index 00000000000..1b28d3a7424 Binary files /dev/null and b/metrics/integration/render-tests/bright-v9/z0/expected.png differ diff --git a/metrics/integration/render-tests/bright-v9/z0/style.json b/metrics/integration/render-tests/bright-v9/z0/style.json new file mode 100644 index 00000000000..0e3f97ff387 --- /dev/null +++ b/metrics/integration/render-tests/bright-v9/z0/style.json @@ -0,0 +1,16 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 512, + "height": 512, + "allowed": 0.00075, + "operations": [ + ["setStyle", "local://mapbox-gl-styles/styles/bright-v9.json"], + ["wait"] + ] + } + }, + "sources": {}, + "layers": [] +} diff --git a/metrics/integration/render-tests/canvas/default/expected.png b/metrics/integration/render-tests/canvas/default/expected.png new file mode 100644 index 00000000000..7ba33271e5e Binary files /dev/null and b/metrics/integration/render-tests/canvas/default/expected.png differ diff --git a/metrics/integration/render-tests/canvas/default/style.json b/metrics/integration/render-tests/canvas/default/style.json new file mode 100644 index 00000000000..f92389be308 --- /dev/null +++ b/metrics/integration/render-tests/canvas/default/style.json @@ -0,0 +1,52 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 512, + "height": 512, + "addFakeCanvas": { + "id": "fake-canvas", + "image": "./image/0.png" + } + } + }, + "center": [ + -122.514426, + 37.562984 + ], + "zoom": 17, + "sources": { + "canvas": { + "type": "canvas", + "coordinates": [ + [ + -122.51596391201019, + 37.56238816766053 + ], + [ + -122.51467645168304, + 37.56410183312965 + ], + [ + -122.51309394836426, + 37.563391708549425 + ], + [ + -122.51423120498657, + 37.56161849366671 + ] + ], + "canvas": "fake-canvas" + } + }, + "layers": [ + { + "id": "canvas", + "type": "raster", + "source": "canvas", + "paint": { + "raster-fade-duration": 0 + } + } + ] +} diff --git a/metrics/integration/render-tests/canvas/update/expected.png b/metrics/integration/render-tests/canvas/update/expected.png new file mode 100644 index 00000000000..f042d98788b Binary files /dev/null and b/metrics/integration/render-tests/canvas/update/expected.png differ diff --git a/metrics/integration/render-tests/canvas/update/style.json b/metrics/integration/render-tests/canvas/update/style.json new file mode 100644 index 00000000000..680adeaff81 --- /dev/null +++ b/metrics/integration/render-tests/canvas/update/style.json @@ -0,0 +1,57 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "addFakeCanvas": { + "id": "fake-canvas", + "image": "./image/0.png" + }, + "operations": [ + ["wait"], + ["updateFakeCanvas", "canvas", "./image/1.png", "./image/0.png"] + ] + } + }, + "center": [ + -122.514426, + 37.562984 + ], + "zoom": 14, + "sources": { + "canvas": { + "type": "canvas", + "animate": false, + "coordinates": [ + [ + -122.51596391201019, + 37.56238816766053 + ], + [ + -122.51467645168304, + 37.56410183312965 + ], + [ + -122.51309394836426, + 37.563391708549425 + ], + [ + -122.51423120498657, + 37.56161849366671 + ] + ], + "canvas": "fake-canvas" + } + }, + "layers": [ + { + "id": "canvas", + "type": "raster", + "source": "canvas", + "paint": { + "raster-fade-duration": 0 + } + } + ] +} diff --git a/metrics/integration/render-tests/circle-blur/blending/expected.png b/metrics/integration/render-tests/circle-blur/blending/expected.png new file mode 100644 index 00000000000..b27eac77247 Binary files /dev/null and b/metrics/integration/render-tests/circle-blur/blending/expected.png differ diff --git a/metrics/integration/render-tests/circle-blur/blending/style.json b/metrics/integration/render-tests/circle-blur/blending/style.json new file mode 100644 index 00000000000..0d5f9ff4a57 --- /dev/null +++ b/metrics/integration/render-tests/circle-blur/blending/style.json @@ -0,0 +1,65 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "color": "red", + "blur": 1 + }, + "geometry": { + "type": "Point", + "coordinates": [ + -5, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + "color": "blue", + "blur": 1.5 + }, + "geometry": { + "type": "Point", + "coordinates": [ + 5, + 0 + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson", + "paint": { + "circle-radius": 20, + "circle-color": [ + "get", + "color" + ], + "circle-blur": [ + "get", + "blur" + ] + } + } + ] +} diff --git a/metrics/integration/render-tests/circle-blur/default/expected.png b/metrics/integration/render-tests/circle-blur/default/expected.png new file mode 100644 index 00000000000..3abac7f9279 Binary files /dev/null and b/metrics/integration/render-tests/circle-blur/default/expected.png differ diff --git a/metrics/integration/render-tests/circle-blur/default/style.json b/metrics/integration/render-tests/circle-blur/default/style.json new file mode 100644 index 00000000000..e5407053ad6 --- /dev/null +++ b/metrics/integration/render-tests/circle-blur/default/style.json @@ -0,0 +1,53 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson", + "paint": { + "circle-radius": 10 + } + } + ] +} diff --git a/metrics/integration/render-tests/circle-blur/function/expected.png b/metrics/integration/render-tests/circle-blur/function/expected.png new file mode 100644 index 00000000000..3abac7f9279 Binary files /dev/null and b/metrics/integration/render-tests/circle-blur/function/expected.png differ diff --git a/metrics/integration/render-tests/circle-blur/function/style.json b/metrics/integration/render-tests/circle-blur/function/style.json new file mode 100644 index 00000000000..ff859f839bb --- /dev/null +++ b/metrics/integration/render-tests/circle-blur/function/style.json @@ -0,0 +1,65 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson", + "paint": { + "circle-radius": 10, + "circle-blur": { + "stops": [ + [ + 0, + 0.1 + ], + [ + 1, + 0.4 + ] + ] + } + } + } + ] +} diff --git a/metrics/integration/render-tests/circle-blur/literal-stroke/expected.png b/metrics/integration/render-tests/circle-blur/literal-stroke/expected.png new file mode 100644 index 00000000000..5d66fbd700e Binary files /dev/null and b/metrics/integration/render-tests/circle-blur/literal-stroke/expected.png differ diff --git a/metrics/integration/render-tests/circle-blur/literal-stroke/style.json b/metrics/integration/render-tests/circle-blur/literal-stroke/style.json new file mode 100644 index 00000000000..02462289547 --- /dev/null +++ b/metrics/integration/render-tests/circle-blur/literal-stroke/style.json @@ -0,0 +1,56 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson", + "paint": { + "circle-color": "#fff", + "circle-stroke-width": 5, + "circle-stroke-color": "blue", + "circle-blur": 0.5 + } + } + ] +} diff --git a/metrics/integration/render-tests/circle-blur/literal/expected.png b/metrics/integration/render-tests/circle-blur/literal/expected.png new file mode 100644 index 00000000000..7b61e95ca2f Binary files /dev/null and b/metrics/integration/render-tests/circle-blur/literal/expected.png differ diff --git a/metrics/integration/render-tests/circle-blur/literal/style.json b/metrics/integration/render-tests/circle-blur/literal/style.json new file mode 100644 index 00000000000..3c240eb4459 --- /dev/null +++ b/metrics/integration/render-tests/circle-blur/literal/style.json @@ -0,0 +1,54 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson", + "paint": { + "circle-radius": 10, + "circle-blur": 0.5 + } + } + ] +} diff --git a/metrics/integration/render-tests/circle-blur/property-function/expected.png b/metrics/integration/render-tests/circle-blur/property-function/expected.png new file mode 100644 index 00000000000..3aa8320e110 Binary files /dev/null and b/metrics/integration/render-tests/circle-blur/property-function/expected.png differ diff --git a/metrics/integration/render-tests/circle-blur/property-function/style.json b/metrics/integration/render-tests/circle-blur/property-function/style.json new file mode 100644 index 00000000000..a6826430504 --- /dev/null +++ b/metrics/integration/render-tests/circle-blur/property-function/style.json @@ -0,0 +1,59 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "blur": 0.1 + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + "blur": 0.9 + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson", + "paint": { + "circle-radius": 10, + "circle-blur": { + "type": "identity", + "property": "blur" + } + } + } + ] +} diff --git a/metrics/integration/render-tests/circle-blur/zoom-and-property-function/expected.png b/metrics/integration/render-tests/circle-blur/zoom-and-property-function/expected.png new file mode 100644 index 00000000000..fcac2c6ccc8 Binary files /dev/null and b/metrics/integration/render-tests/circle-blur/zoom-and-property-function/expected.png differ diff --git a/metrics/integration/render-tests/circle-blur/zoom-and-property-function/style.json b/metrics/integration/render-tests/circle-blur/zoom-and-property-function/style.json new file mode 100644 index 00000000000..29c339a4d4a --- /dev/null +++ b/metrics/integration/render-tests/circle-blur/zoom-and-property-function/style.json @@ -0,0 +1,88 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "blur": 0 + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + "blur": 1 + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson", + "paint": { + "circle-radius": 10, + "circle-blur": { + "property": "blur", + "stops": [ + [ + { + "zoom": 0, + "value": 0 + }, + 0 + ], + [ + { + "zoom": 0, + "value": 1 + }, + 0.2 + ], + [ + { + "zoom": 1, + "value": 0 + }, + 0.4 + ], + [ + { + "zoom": 1, + "value": 1 + }, + 0.6 + ] + ] + } + } + } + ] +} diff --git a/metrics/integration/render-tests/circle-color/default/expected.png b/metrics/integration/render-tests/circle-color/default/expected.png new file mode 100644 index 00000000000..3abac7f9279 Binary files /dev/null and b/metrics/integration/render-tests/circle-color/default/expected.png differ diff --git a/metrics/integration/render-tests/circle-color/default/style.json b/metrics/integration/render-tests/circle-color/default/style.json new file mode 100644 index 00000000000..e5407053ad6 --- /dev/null +++ b/metrics/integration/render-tests/circle-color/default/style.json @@ -0,0 +1,53 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson", + "paint": { + "circle-radius": 10 + } + } + ] +} diff --git a/metrics/integration/render-tests/circle-color/function/expected.png b/metrics/integration/render-tests/circle-color/function/expected.png new file mode 100644 index 00000000000..c01cb17ffa0 Binary files /dev/null and b/metrics/integration/render-tests/circle-color/function/expected.png differ diff --git a/metrics/integration/render-tests/circle-color/function/style.json b/metrics/integration/render-tests/circle-color/function/style.json new file mode 100644 index 00000000000..b8c61ef95f8 --- /dev/null +++ b/metrics/integration/render-tests/circle-color/function/style.json @@ -0,0 +1,65 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson", + "paint": { + "circle-radius": 10, + "circle-color": { + "stops": [ + [ + 0, + "green" + ], + [ + 1, + "blue" + ] + ] + } + } + } + ] +} diff --git a/metrics/integration/render-tests/circle-color/literal/expected.png b/metrics/integration/render-tests/circle-color/literal/expected.png new file mode 100644 index 00000000000..32a10663f9c Binary files /dev/null and b/metrics/integration/render-tests/circle-color/literal/expected.png differ diff --git a/metrics/integration/render-tests/circle-color/literal/style.json b/metrics/integration/render-tests/circle-color/literal/style.json new file mode 100644 index 00000000000..7f6293f9fa8 --- /dev/null +++ b/metrics/integration/render-tests/circle-color/literal/style.json @@ -0,0 +1,54 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson", + "paint": { + "circle-radius": 10, + "circle-color": "blue" + } + } + ] +} diff --git a/metrics/integration/render-tests/circle-color/property-function/expected.png b/metrics/integration/render-tests/circle-color/property-function/expected.png new file mode 100644 index 00000000000..41422e2f139 Binary files /dev/null and b/metrics/integration/render-tests/circle-color/property-function/expected.png differ diff --git a/metrics/integration/render-tests/circle-color/property-function/style.json b/metrics/integration/render-tests/circle-color/property-function/style.json new file mode 100644 index 00000000000..2c0abc2ef17 --- /dev/null +++ b/metrics/integration/render-tests/circle-color/property-function/style.json @@ -0,0 +1,59 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "color": "red" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + "color": "green" + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson", + "paint": { + "circle-radius": 10, + "circle-color": { + "type": "identity", + "property": "color" + } + } + } + ] +} diff --git a/metrics/integration/render-tests/circle-color/zoom-and-property-function/expected.png b/metrics/integration/render-tests/circle-color/zoom-and-property-function/expected.png new file mode 100644 index 00000000000..7bc2a718b21 Binary files /dev/null and b/metrics/integration/render-tests/circle-color/zoom-and-property-function/expected.png differ diff --git a/metrics/integration/render-tests/circle-color/zoom-and-property-function/style.json b/metrics/integration/render-tests/circle-color/zoom-and-property-function/style.json new file mode 100644 index 00000000000..c3bf8a68226 --- /dev/null +++ b/metrics/integration/render-tests/circle-color/zoom-and-property-function/style.json @@ -0,0 +1,88 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "color": 0 + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + "color": 10 + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson", + "paint": { + "circle-radius": 10, + "circle-color": { + "property": "color", + "stops": [ + [ + { + "zoom": 0, + "value": 0 + }, + "red" + ], + [ + { + "zoom": 0, + "value": 10 + }, + "yellow" + ], + [ + { + "zoom": 1, + "value": 0 + }, + "blue" + ], + [ + { + "zoom": 1, + "value": 10 + }, + "green" + ] + ] + } + } + } + ] +} diff --git a/metrics/integration/render-tests/circle-geometry/linestring/expected.png b/metrics/integration/render-tests/circle-geometry/linestring/expected.png new file mode 100644 index 00000000000..95d84f0c87c Binary files /dev/null and b/metrics/integration/render-tests/circle-geometry/linestring/expected.png differ diff --git a/metrics/integration/render-tests/circle-geometry/linestring/style.json b/metrics/integration/render-tests/circle-geometry/linestring/style.json new file mode 100644 index 00000000000..e825c98b10f --- /dev/null +++ b/metrics/integration/render-tests/circle-geometry/linestring/style.json @@ -0,0 +1,52 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 256, + "height": 128 + } + }, + "center": [0, 0], + "zoom": 0, + "sources": { + "geometry": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + 0, + -25 + ], + [ + 0, + 25 + ] + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "geometry", + "type": "circle", + "source": "geometry" + } + ] +} diff --git a/metrics/integration/render-tests/circle-geometry/multilinestring/expected.png b/metrics/integration/render-tests/circle-geometry/multilinestring/expected.png new file mode 100644 index 00000000000..256c2b1d605 Binary files /dev/null and b/metrics/integration/render-tests/circle-geometry/multilinestring/expected.png differ diff --git a/metrics/integration/render-tests/circle-geometry/multilinestring/style.json b/metrics/integration/render-tests/circle-geometry/multilinestring/style.json new file mode 100644 index 00000000000..06b2af535af --- /dev/null +++ b/metrics/integration/render-tests/circle-geometry/multilinestring/style.json @@ -0,0 +1,64 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 256, + "height": 128 + } + }, + "center": [0, 0], + "zoom": 0, + "sources": { + "geometry": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "MultiLineString", + "coordinates": [ + [ + [ + 25, + -25 + ], + [ + 25, + 25 + ] + ], + [ + [ + -25, + -25 + ], + [ + -25, + 25 + ] + ] + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "geometry", + "type": "circle", + "source": "geometry" + } + ] +} diff --git a/metrics/integration/render-tests/circle-geometry/multipoint/expected.png b/metrics/integration/render-tests/circle-geometry/multipoint/expected.png new file mode 100644 index 00000000000..2e3663ea1a5 Binary files /dev/null and b/metrics/integration/render-tests/circle-geometry/multipoint/expected.png differ diff --git a/metrics/integration/render-tests/circle-geometry/multipoint/style.json b/metrics/integration/render-tests/circle-geometry/multipoint/style.json new file mode 100644 index 00000000000..3ec0923e4da --- /dev/null +++ b/metrics/integration/render-tests/circle-geometry/multipoint/style.json @@ -0,0 +1,41 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 256, + "height": 128 + } + }, + "center": [0, 0], + "zoom": 0, + "sources": { + "geometry": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [{ + "type": "Feature", + "properties": {}, + "geometry": { + "type": "MultiPoint", + "coordinates": [ [50.0, 0.0], [-50.0, 0.0] ] + } + }] + } + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "geometry", + "type": "circle", + "source": "geometry" + } + ] +} diff --git a/metrics/integration/render-tests/circle-geometry/multipolygon/expected.png b/metrics/integration/render-tests/circle-geometry/multipolygon/expected.png new file mode 100644 index 00000000000..c18b6f2d06b Binary files /dev/null and b/metrics/integration/render-tests/circle-geometry/multipolygon/expected.png differ diff --git a/metrics/integration/render-tests/circle-geometry/multipolygon/style.json b/metrics/integration/render-tests/circle-geometry/multipolygon/style.json new file mode 100644 index 00000000000..ee1c6900c17 --- /dev/null +++ b/metrics/integration/render-tests/circle-geometry/multipolygon/style.json @@ -0,0 +1,92 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 256, + "height": 128 + } + }, + "center": [0, 0], + "zoom": 0, + "sources": { + "geometry": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "MultiPolygon", + "coordinates": [ + [ + [ + [ + -25, + -25 + ], + [ + -25, + 25 + ], + [ + -75, + 25 + ], + [ + -75, + -25 + ], + [ + -25, + -25 + ] + ] + ], + [ + [ + [ + 25, + -25 + ], + [ + 25, + 25 + ], + [ + 75, + 25 + ], + [ + 75, + -25 + ], + [ + 25, + -25 + ] + ] + ] + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "geometry", + "type": "circle", + "source": "geometry" + } + ] +} diff --git a/metrics/integration/render-tests/circle-geometry/point/expected.png b/metrics/integration/render-tests/circle-geometry/point/expected.png new file mode 100644 index 00000000000..44fcd58bc80 Binary files /dev/null and b/metrics/integration/render-tests/circle-geometry/point/expected.png differ diff --git a/metrics/integration/render-tests/circle-geometry/point/style.json b/metrics/integration/render-tests/circle-geometry/point/style.json new file mode 100644 index 00000000000..f9ef0e009fc --- /dev/null +++ b/metrics/integration/render-tests/circle-geometry/point/style.json @@ -0,0 +1,41 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 256, + "height": 128 + } + }, + "center": [0, 0], + "zoom": 0, + "sources": { + "geometry": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [{ + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Point", + "coordinates": [0, 0] + } + }] + } + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "geometry", + "type": "circle", + "source": "geometry" + } + ] +} diff --git a/metrics/integration/render-tests/circle-geometry/polygon/expected.png b/metrics/integration/render-tests/circle-geometry/polygon/expected.png new file mode 100644 index 00000000000..39111ef9abe Binary files /dev/null and b/metrics/integration/render-tests/circle-geometry/polygon/expected.png differ diff --git a/metrics/integration/render-tests/circle-geometry/polygon/style.json b/metrics/integration/render-tests/circle-geometry/polygon/style.json new file mode 100644 index 00000000000..5794e646ef4 --- /dev/null +++ b/metrics/integration/render-tests/circle-geometry/polygon/style.json @@ -0,0 +1,66 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 256, + "height": 128 + } + }, + "center": [0, 0], + "zoom": 0, + "sources": { + "geometry": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -25, + -25 + ], + [ + -25, + 25 + ], + [ + 25, + 25 + ], + [ + 25, + -25 + ], + [ + -25, + -25 + ] + ] + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "geometry", + "type": "circle", + "source": "geometry" + } + ] +} diff --git a/metrics/integration/render-tests/circle-opacity/blending/expected.png b/metrics/integration/render-tests/circle-opacity/blending/expected.png new file mode 100644 index 00000000000..6c16bbe37b2 Binary files /dev/null and b/metrics/integration/render-tests/circle-opacity/blending/expected.png differ diff --git a/metrics/integration/render-tests/circle-opacity/blending/style.json b/metrics/integration/render-tests/circle-opacity/blending/style.json new file mode 100644 index 00000000000..4a49f3e89d3 --- /dev/null +++ b/metrics/integration/render-tests/circle-opacity/blending/style.json @@ -0,0 +1,59 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "opacity": 0.3 + }, + "geometry": { + "type": "Point", + "coordinates": [ + -2, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + "opacity": 0.6 + }, + "geometry": { + "type": "Point", + "coordinates": [ + 2, + 0 + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson", + "paint": { + "circle-radius": 10, + "circle-opacity": [ + "get", + "opacity" + ] + } + } + ] +} diff --git a/metrics/integration/render-tests/circle-opacity/default/expected.png b/metrics/integration/render-tests/circle-opacity/default/expected.png new file mode 100644 index 00000000000..3abac7f9279 Binary files /dev/null and b/metrics/integration/render-tests/circle-opacity/default/expected.png differ diff --git a/metrics/integration/render-tests/circle-opacity/default/style.json b/metrics/integration/render-tests/circle-opacity/default/style.json new file mode 100644 index 00000000000..e5407053ad6 --- /dev/null +++ b/metrics/integration/render-tests/circle-opacity/default/style.json @@ -0,0 +1,53 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson", + "paint": { + "circle-radius": 10 + } + } + ] +} diff --git a/metrics/integration/render-tests/circle-opacity/function/expected.png b/metrics/integration/render-tests/circle-opacity/function/expected.png new file mode 100644 index 00000000000..a70cf979217 Binary files /dev/null and b/metrics/integration/render-tests/circle-opacity/function/expected.png differ diff --git a/metrics/integration/render-tests/circle-opacity/function/style.json b/metrics/integration/render-tests/circle-opacity/function/style.json new file mode 100644 index 00000000000..14ed4712750 --- /dev/null +++ b/metrics/integration/render-tests/circle-opacity/function/style.json @@ -0,0 +1,65 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson", + "paint": { + "circle-radius": 10, + "circle-opacity": { + "stops": [ + [ + 0, + 0.3 + ], + [ + 1, + 0.5 + ] + ] + } + } + } + ] +} diff --git a/metrics/integration/render-tests/circle-opacity/literal/expected.png b/metrics/integration/render-tests/circle-opacity/literal/expected.png new file mode 100644 index 00000000000..a70cf979217 Binary files /dev/null and b/metrics/integration/render-tests/circle-opacity/literal/expected.png differ diff --git a/metrics/integration/render-tests/circle-opacity/literal/style.json b/metrics/integration/render-tests/circle-opacity/literal/style.json new file mode 100644 index 00000000000..4dd5dca33bd --- /dev/null +++ b/metrics/integration/render-tests/circle-opacity/literal/style.json @@ -0,0 +1,54 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson", + "paint": { + "circle-radius": 10, + "circle-opacity": 0.3 + } + } + ] +} diff --git a/metrics/integration/render-tests/circle-opacity/property-function/expected.png b/metrics/integration/render-tests/circle-opacity/property-function/expected.png new file mode 100644 index 00000000000..5f631c26af2 Binary files /dev/null and b/metrics/integration/render-tests/circle-opacity/property-function/expected.png differ diff --git a/metrics/integration/render-tests/circle-opacity/property-function/style.json b/metrics/integration/render-tests/circle-opacity/property-function/style.json new file mode 100644 index 00000000000..e2fe0acfdfb --- /dev/null +++ b/metrics/integration/render-tests/circle-opacity/property-function/style.json @@ -0,0 +1,59 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "opacity": 0.3 + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + "opacity": 0.6 + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson", + "paint": { + "circle-radius": 10, + "circle-opacity": { + "type": "identity", + "property": "opacity" + } + } + } + ] +} diff --git a/metrics/integration/render-tests/circle-opacity/zoom-and-property-function/expected.png b/metrics/integration/render-tests/circle-opacity/zoom-and-property-function/expected.png new file mode 100644 index 00000000000..865b929db75 Binary files /dev/null and b/metrics/integration/render-tests/circle-opacity/zoom-and-property-function/expected.png differ diff --git a/metrics/integration/render-tests/circle-opacity/zoom-and-property-function/style.json b/metrics/integration/render-tests/circle-opacity/zoom-and-property-function/style.json new file mode 100644 index 00000000000..dad0c76a346 --- /dev/null +++ b/metrics/integration/render-tests/circle-opacity/zoom-and-property-function/style.json @@ -0,0 +1,88 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "property": 0 + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + "property": 10 + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson", + "paint": { + "circle-radius": 10, + "circle-opacity": { + "property": "property", + "stops": [ + [ + { + "zoom": 0, + "value": 0 + }, + 0.2 + ], + [ + { + "zoom": 0, + "value": 10 + }, + 0.4 + ], + [ + { + "zoom": 1, + "value": 0 + }, + 0.6 + ], + [ + { + "zoom": 1, + "value": 10 + }, + 0.8 + ] + ] + } + } + } + ] +} diff --git a/metrics/integration/render-tests/circle-pitch-alignment/map-scale-map/expected.png b/metrics/integration/render-tests/circle-pitch-alignment/map-scale-map/expected.png new file mode 100644 index 00000000000..30619b2af93 Binary files /dev/null and b/metrics/integration/render-tests/circle-pitch-alignment/map-scale-map/expected.png differ diff --git a/metrics/integration/render-tests/circle-pitch-alignment/map-scale-map/style.json b/metrics/integration/render-tests/circle-pitch-alignment/map-scale-map/style.json new file mode 100644 index 00000000000..995166fe855 --- /dev/null +++ b/metrics/integration/render-tests/circle-pitch-alignment/map-scale-map/style.json @@ -0,0 +1,50 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 128, + "height": 256 + } + }, + "center": [ + 0, + 0 + ], + "zoom": 0, + "pitch": 60, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "MultiPoint", + "coordinates": [ + [ + 0, + 0 + ], + [ + 0, + 60 + ], + [ + 0, + -60 + ] + ] + } + } + }, + "layers": [ + { + "id": "circles", + "type": "circle", + "source": "geojson", + "paint": { + "circle-radius": 40, + "circle-color": "blue", + "circle-pitch-scale": "map", + "circle-pitch-alignment": "map" + } + } + ] +} diff --git a/metrics/integration/render-tests/circle-pitch-alignment/map-scale-viewport/expected.png b/metrics/integration/render-tests/circle-pitch-alignment/map-scale-viewport/expected.png new file mode 100644 index 00000000000..3b1a27152d8 Binary files /dev/null and b/metrics/integration/render-tests/circle-pitch-alignment/map-scale-viewport/expected.png differ diff --git a/metrics/integration/render-tests/circle-pitch-alignment/map-scale-viewport/style.json b/metrics/integration/render-tests/circle-pitch-alignment/map-scale-viewport/style.json new file mode 100644 index 00000000000..5e197273e33 --- /dev/null +++ b/metrics/integration/render-tests/circle-pitch-alignment/map-scale-viewport/style.json @@ -0,0 +1,50 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 128, + "height": 256 + } + }, + "center": [ + 0, + 0 + ], + "zoom": 0, + "pitch": 60, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "MultiPoint", + "coordinates": [ + [ + 0, + 0 + ], + [ + 0, + 60 + ], + [ + 0, + -60 + ] + ] + } + } + }, + "layers": [ + { + "id": "circles", + "type": "circle", + "source": "geojson", + "paint": { + "circle-radius": 40, + "circle-color": "blue", + "circle-pitch-scale": "viewport", + "circle-pitch-alignment": "map" + } + } + ] +} diff --git a/metrics/integration/render-tests/circle-pitch-alignment/viewport-scale-map/expected.png b/metrics/integration/render-tests/circle-pitch-alignment/viewport-scale-map/expected.png new file mode 100644 index 00000000000..dd380e76669 Binary files /dev/null and b/metrics/integration/render-tests/circle-pitch-alignment/viewport-scale-map/expected.png differ diff --git a/metrics/integration/render-tests/circle-pitch-alignment/viewport-scale-map/style.json b/metrics/integration/render-tests/circle-pitch-alignment/viewport-scale-map/style.json new file mode 100644 index 00000000000..085c0b57255 --- /dev/null +++ b/metrics/integration/render-tests/circle-pitch-alignment/viewport-scale-map/style.json @@ -0,0 +1,50 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 128, + "height": 256 + } + }, + "center": [ + 0, + 0 + ], + "zoom": 0, + "pitch": 60, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "MultiPoint", + "coordinates": [ + [ + 0, + 0 + ], + [ + 0, + 60 + ], + [ + 0, + -60 + ] + ] + } + } + }, + "layers": [ + { + "id": "circles", + "type": "circle", + "source": "geojson", + "paint": { + "circle-radius": 40, + "circle-color": "blue", + "circle-pitch-scale": "map", + "circle-pitch-alignment": "viewport" + } + } + ] +} diff --git a/metrics/integration/render-tests/circle-pitch-alignment/viewport-scale-viewport/expected.png b/metrics/integration/render-tests/circle-pitch-alignment/viewport-scale-viewport/expected.png new file mode 100644 index 00000000000..f64dd843225 Binary files /dev/null and b/metrics/integration/render-tests/circle-pitch-alignment/viewport-scale-viewport/expected.png differ diff --git a/metrics/integration/render-tests/circle-pitch-alignment/viewport-scale-viewport/style.json b/metrics/integration/render-tests/circle-pitch-alignment/viewport-scale-viewport/style.json new file mode 100644 index 00000000000..1d5070e336f --- /dev/null +++ b/metrics/integration/render-tests/circle-pitch-alignment/viewport-scale-viewport/style.json @@ -0,0 +1,50 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 128, + "height": 512 + } + }, + "center": [ + 0, + 0 + ], + "zoom": 0, + "pitch": 60, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "MultiPoint", + "coordinates": [ + [ + 0, + 0 + ], + [ + 0, + 60 + ], + [ + 0, + -60 + ] + ] + } + } + }, + "layers": [ + { + "id": "circles", + "type": "circle", + "source": "geojson", + "paint": { + "circle-radius": 40, + "circle-color": "blue", + "circle-pitch-scale": "viewport", + "circle-pitch-alignment": "viewport" + } + } + ] +} diff --git a/metrics/integration/render-tests/circle-pitch-scale/default/expected.png b/metrics/integration/render-tests/circle-pitch-scale/default/expected.png new file mode 100644 index 00000000000..dd380e76669 Binary files /dev/null and b/metrics/integration/render-tests/circle-pitch-scale/default/expected.png differ diff --git a/metrics/integration/render-tests/circle-pitch-scale/default/style.json b/metrics/integration/render-tests/circle-pitch-scale/default/style.json new file mode 100644 index 00000000000..685496b98b1 --- /dev/null +++ b/metrics/integration/render-tests/circle-pitch-scale/default/style.json @@ -0,0 +1,48 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 128, + "height": 256 + } + }, + "center": [ + 0, + 0 + ], + "zoom": 0, + "pitch": 60, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "MultiPoint", + "coordinates": [ + [ + 0, + 0 + ], + [ + 0, + 60 + ], + [ + 0, + -60 + ] + ] + } + } + }, + "layers": [ + { + "id": "circles", + "type": "circle", + "source": "geojson", + "paint": { + "circle-radius": 40, + "circle-color": "blue" + } + } + ] +} diff --git a/metrics/integration/render-tests/circle-pitch-scale/map/expected.png b/metrics/integration/render-tests/circle-pitch-scale/map/expected.png new file mode 100644 index 00000000000..dd380e76669 Binary files /dev/null and b/metrics/integration/render-tests/circle-pitch-scale/map/expected.png differ diff --git a/metrics/integration/render-tests/circle-pitch-scale/map/style.json b/metrics/integration/render-tests/circle-pitch-scale/map/style.json new file mode 100644 index 00000000000..e237555511d --- /dev/null +++ b/metrics/integration/render-tests/circle-pitch-scale/map/style.json @@ -0,0 +1,49 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 128, + "height": 256 + } + }, + "center": [ + 0, + 0 + ], + "zoom": 0, + "pitch": 60, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "MultiPoint", + "coordinates": [ + [ + 0, + 0 + ], + [ + 0, + 60 + ], + [ + 0, + -60 + ] + ] + } + } + }, + "layers": [ + { + "id": "circles", + "type": "circle", + "source": "geojson", + "paint": { + "circle-radius": 40, + "circle-color": "blue", + "circle-pitch-scale": "map" + } + } + ] +} diff --git a/metrics/integration/render-tests/circle-pitch-scale/viewport/expected.png b/metrics/integration/render-tests/circle-pitch-scale/viewport/expected.png new file mode 100644 index 00000000000..f64dd843225 Binary files /dev/null and b/metrics/integration/render-tests/circle-pitch-scale/viewport/expected.png differ diff --git a/metrics/integration/render-tests/circle-pitch-scale/viewport/style.json b/metrics/integration/render-tests/circle-pitch-scale/viewport/style.json new file mode 100644 index 00000000000..f27f1ea8fc9 --- /dev/null +++ b/metrics/integration/render-tests/circle-pitch-scale/viewport/style.json @@ -0,0 +1,49 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 128, + "height": 512 + } + }, + "center": [ + 0, + 0 + ], + "zoom": 0, + "pitch": 60, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "MultiPoint", + "coordinates": [ + [ + 0, + 0 + ], + [ + 0, + 60 + ], + [ + 0, + -60 + ] + ] + } + } + }, + "layers": [ + { + "id": "circles", + "type": "circle", + "source": "geojson", + "paint": { + "circle-radius": 40, + "circle-color": "blue", + "circle-pitch-scale": "viewport" + } + } + ] +} diff --git a/metrics/integration/render-tests/circle-radius/antimeridian/expected.png b/metrics/integration/render-tests/circle-radius/antimeridian/expected.png new file mode 100644 index 00000000000..81c71995d24 Binary files /dev/null and b/metrics/integration/render-tests/circle-radius/antimeridian/expected.png differ diff --git a/metrics/integration/render-tests/circle-radius/antimeridian/style.json b/metrics/integration/render-tests/circle-radius/antimeridian/style.json new file mode 100644 index 00000000000..2098164ba1b --- /dev/null +++ b/metrics/integration/render-tests/circle-radius/antimeridian/style.json @@ -0,0 +1,36 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 514, + "height": 514 + } + }, + "center": [ + 0, + 0 + ], + "zoom": 0, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 179, + 0 + ] + } + } + }, + "layers": [ + { + "id": "circles", + "type": "circle", + "source": "geojson", + "paint": { + "circle-radius": 20 + } + } + ] +} diff --git a/metrics/integration/render-tests/circle-radius/default/expected.png b/metrics/integration/render-tests/circle-radius/default/expected.png new file mode 100644 index 00000000000..62c8dbcada2 Binary files /dev/null and b/metrics/integration/render-tests/circle-radius/default/expected.png differ diff --git a/metrics/integration/render-tests/circle-radius/default/style.json b/metrics/integration/render-tests/circle-radius/default/style.json new file mode 100644 index 00000000000..4f6176ed7a4 --- /dev/null +++ b/metrics/integration/render-tests/circle-radius/default/style.json @@ -0,0 +1,51 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson", + "paint": {} + } + ] +} diff --git a/metrics/integration/render-tests/circle-radius/function/expected.png b/metrics/integration/render-tests/circle-radius/function/expected.png new file mode 100644 index 00000000000..3abac7f9279 Binary files /dev/null and b/metrics/integration/render-tests/circle-radius/function/expected.png differ diff --git a/metrics/integration/render-tests/circle-radius/function/style.json b/metrics/integration/render-tests/circle-radius/function/style.json new file mode 100644 index 00000000000..743b82a1810 --- /dev/null +++ b/metrics/integration/render-tests/circle-radius/function/style.json @@ -0,0 +1,64 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson", + "paint": { + "circle-radius": { + "stops": [ + [ + 0, + 10 + ], + [ + 1, + 15 + ] + ] + } + } + } + ] +} diff --git a/metrics/integration/render-tests/circle-radius/literal/expected.png b/metrics/integration/render-tests/circle-radius/literal/expected.png new file mode 100644 index 00000000000..42dd701b60a Binary files /dev/null and b/metrics/integration/render-tests/circle-radius/literal/expected.png differ diff --git a/metrics/integration/render-tests/circle-radius/literal/style.json b/metrics/integration/render-tests/circle-radius/literal/style.json new file mode 100644 index 00000000000..a71aba4db2a --- /dev/null +++ b/metrics/integration/render-tests/circle-radius/literal/style.json @@ -0,0 +1,53 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson", + "paint": { + "circle-radius": 8 + } + } + ] +} diff --git a/metrics/integration/render-tests/circle-radius/property-function/expected.png b/metrics/integration/render-tests/circle-radius/property-function/expected.png new file mode 100644 index 00000000000..1531f87862f Binary files /dev/null and b/metrics/integration/render-tests/circle-radius/property-function/expected.png differ diff --git a/metrics/integration/render-tests/circle-radius/property-function/style.json b/metrics/integration/render-tests/circle-radius/property-function/style.json new file mode 100644 index 00000000000..2c3c810c7b7 --- /dev/null +++ b/metrics/integration/render-tests/circle-radius/property-function/style.json @@ -0,0 +1,58 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "width": 4 + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + "width": 7 + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson", + "paint": { + "circle-radius": { + "type": "identity", + "property": "width" + } + } + } + ] +} diff --git a/metrics/integration/render-tests/circle-radius/zoom-and-property-function/expected.png b/metrics/integration/render-tests/circle-radius/zoom-and-property-function/expected.png new file mode 100644 index 00000000000..75fa17e7de8 Binary files /dev/null and b/metrics/integration/render-tests/circle-radius/zoom-and-property-function/expected.png differ diff --git a/metrics/integration/render-tests/circle-radius/zoom-and-property-function/style.json b/metrics/integration/render-tests/circle-radius/zoom-and-property-function/style.json new file mode 100644 index 00000000000..e75f6279e2c --- /dev/null +++ b/metrics/integration/render-tests/circle-radius/zoom-and-property-function/style.json @@ -0,0 +1,87 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "width": 5 + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + "width": 10 + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson", + "paint": { + "circle-radius": { + "property": "width", + "stops": [ + [ + { + "zoom": 0, + "value": 0 + }, + 2 + ], + [ + { + "zoom": 0, + "value": 50 + }, + 8 + ], + [ + { + "zoom": 1, + "value": 0 + }, + 6 + ], + [ + { + "zoom": 1, + "value": 50 + }, + 24 + ] + ] + } + } + } + ] +} diff --git a/metrics/integration/render-tests/circle-sort-key/literal/expected.png b/metrics/integration/render-tests/circle-sort-key/literal/expected.png new file mode 100644 index 00000000000..f9be1c32b0c Binary files /dev/null and b/metrics/integration/render-tests/circle-sort-key/literal/expected.png differ diff --git a/metrics/integration/render-tests/circle-sort-key/literal/style.json b/metrics/integration/render-tests/circle-sort-key/literal/style.json new file mode 100644 index 00000000000..f34f0664012 --- /dev/null +++ b/metrics/integration/render-tests/circle-sort-key/literal/style.json @@ -0,0 +1,81 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 64, + "width": 64, + "debug": true + } + }, + "center": [0.5, 30], + "zoom": 1, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "sort-key": 1, + "color": "red", + "radius": 16 + }, + "geometry": { + "type": "Point", + "coordinates": [ + 2, + 34 + ] + } + }, + { + "type": "Feature", + "properties": { + "sort-key": 0, + "color": "blue", + "radius": 16 + }, + "geometry": { + "type": "Point", + "coordinates": [ + 2, + 26 + ] + } + }, + { + "type": "Feature", + "properties": { + "sort-key": 2, + "color": "green", + "radius": 16 + }, + "geometry": { + "type": "Point", + "coordinates": [ + -2, + 30 + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson", + "paint": { + "circle-radius": ["get", "radius"], + "circle-color": ["get", "color"] + }, + "layout": { + "circle-sort-key": ["get", "sort-key"] + } + } + ] +} diff --git a/metrics/integration/render-tests/circle-stroke-color/default/expected.png b/metrics/integration/render-tests/circle-stroke-color/default/expected.png new file mode 100644 index 00000000000..6f047282d14 Binary files /dev/null and b/metrics/integration/render-tests/circle-stroke-color/default/expected.png differ diff --git a/metrics/integration/render-tests/circle-stroke-color/default/style.json b/metrics/integration/render-tests/circle-stroke-color/default/style.json new file mode 100644 index 00000000000..cba3f52fad5 --- /dev/null +++ b/metrics/integration/render-tests/circle-stroke-color/default/style.json @@ -0,0 +1,54 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson", + "paint": { + "circle-color": "#fff", + "circle-stroke-width": 2 + } + } + ] +} diff --git a/metrics/integration/render-tests/circle-stroke-color/function/expected.png b/metrics/integration/render-tests/circle-stroke-color/function/expected.png new file mode 100644 index 00000000000..e1774c79561 Binary files /dev/null and b/metrics/integration/render-tests/circle-stroke-color/function/expected.png differ diff --git a/metrics/integration/render-tests/circle-stroke-color/function/style.json b/metrics/integration/render-tests/circle-stroke-color/function/style.json new file mode 100644 index 00000000000..fa6a0fa82c2 --- /dev/null +++ b/metrics/integration/render-tests/circle-stroke-color/function/style.json @@ -0,0 +1,66 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson", + "paint": { + "circle-color": "#fff", + "circle-stroke-width": 2, + "circle-stroke-color": { + "stops": [ + [ + 0, + "green" + ], + [ + 1, + "blue" + ] + ] + } + } + } + ] +} diff --git a/metrics/integration/render-tests/circle-stroke-color/literal/expected.png b/metrics/integration/render-tests/circle-stroke-color/literal/expected.png new file mode 100644 index 00000000000..c934521cdc9 Binary files /dev/null and b/metrics/integration/render-tests/circle-stroke-color/literal/expected.png differ diff --git a/metrics/integration/render-tests/circle-stroke-color/literal/style.json b/metrics/integration/render-tests/circle-stroke-color/literal/style.json new file mode 100644 index 00000000000..6686d884d08 --- /dev/null +++ b/metrics/integration/render-tests/circle-stroke-color/literal/style.json @@ -0,0 +1,55 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson", + "paint": { + "circle-color": "#fff", + "circle-stroke-width": 2, + "circle-stroke-color": "blue" + } + } + ] +} diff --git a/metrics/integration/render-tests/circle-stroke-color/property-function/expected.png b/metrics/integration/render-tests/circle-stroke-color/property-function/expected.png new file mode 100644 index 00000000000..0e2c2f4bc3c Binary files /dev/null and b/metrics/integration/render-tests/circle-stroke-color/property-function/expected.png differ diff --git a/metrics/integration/render-tests/circle-stroke-color/property-function/style.json b/metrics/integration/render-tests/circle-stroke-color/property-function/style.json new file mode 100644 index 00000000000..ae3a7dd83da --- /dev/null +++ b/metrics/integration/render-tests/circle-stroke-color/property-function/style.json @@ -0,0 +1,60 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "color": "red" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + "color": "green" + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson", + "paint": { + "circle-color": "#fff", + "circle-stroke-width": 2, + "circle-stroke-color": { + "type": "identity", + "property": "color" + } + } + } + ] +} diff --git a/metrics/integration/render-tests/circle-stroke-color/zoom-and-property-function/expected.png b/metrics/integration/render-tests/circle-stroke-color/zoom-and-property-function/expected.png new file mode 100644 index 00000000000..df6778d3b1a Binary files /dev/null and b/metrics/integration/render-tests/circle-stroke-color/zoom-and-property-function/expected.png differ diff --git a/metrics/integration/render-tests/circle-stroke-color/zoom-and-property-function/style.json b/metrics/integration/render-tests/circle-stroke-color/zoom-and-property-function/style.json new file mode 100644 index 00000000000..9baf459e73e --- /dev/null +++ b/metrics/integration/render-tests/circle-stroke-color/zoom-and-property-function/style.json @@ -0,0 +1,89 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "color": 0 + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + "color": 10 + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson", + "paint": { + "circle-color": "#fff", + "circle-stroke-width": 2, + "circle-stroke-color": { + "property": "color", + "stops": [ + [ + { + "zoom": 0, + "value": 0 + }, + "red" + ], + [ + { + "zoom": 0, + "value": 10 + }, + "yellow" + ], + [ + { + "zoom": 1, + "value": 0 + }, + "blue" + ], + [ + { + "zoom": 1, + "value": 10 + }, + "green" + ] + ] + } + } + } + ] +} diff --git a/metrics/integration/render-tests/circle-stroke-opacity/default/expected.png b/metrics/integration/render-tests/circle-stroke-opacity/default/expected.png new file mode 100644 index 00000000000..9ccde6d2885 Binary files /dev/null and b/metrics/integration/render-tests/circle-stroke-opacity/default/expected.png differ diff --git a/metrics/integration/render-tests/circle-stroke-opacity/default/style.json b/metrics/integration/render-tests/circle-stroke-opacity/default/style.json new file mode 100644 index 00000000000..de18581c1a7 --- /dev/null +++ b/metrics/integration/render-tests/circle-stroke-opacity/default/style.json @@ -0,0 +1,54 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson", + "paint": { + "circle-color": "#fff", + "circle-stroke-width": 5 + } + } + ] +} diff --git a/metrics/integration/render-tests/circle-stroke-opacity/function/expected.png b/metrics/integration/render-tests/circle-stroke-opacity/function/expected.png new file mode 100644 index 00000000000..c35e90b9eff Binary files /dev/null and b/metrics/integration/render-tests/circle-stroke-opacity/function/expected.png differ diff --git a/metrics/integration/render-tests/circle-stroke-opacity/function/style.json b/metrics/integration/render-tests/circle-stroke-opacity/function/style.json new file mode 100644 index 00000000000..eaff03059ea --- /dev/null +++ b/metrics/integration/render-tests/circle-stroke-opacity/function/style.json @@ -0,0 +1,66 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson", + "paint": { + "circle-color": "#fff", + "circle-stroke-width": 5, + "circle-stroke-opacity": { + "stops": [ + [ + 0, + 0.5 + ], + [ + 1, + 1 + ] + ] + } + } + } + ] +} diff --git a/metrics/integration/render-tests/circle-stroke-opacity/literal/expected.png b/metrics/integration/render-tests/circle-stroke-opacity/literal/expected.png new file mode 100644 index 00000000000..c35e90b9eff Binary files /dev/null and b/metrics/integration/render-tests/circle-stroke-opacity/literal/expected.png differ diff --git a/metrics/integration/render-tests/circle-stroke-opacity/literal/style.json b/metrics/integration/render-tests/circle-stroke-opacity/literal/style.json new file mode 100644 index 00000000000..83cd9fc55aa --- /dev/null +++ b/metrics/integration/render-tests/circle-stroke-opacity/literal/style.json @@ -0,0 +1,55 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson", + "paint": { + "circle-color": "#fff", + "circle-stroke-width": 5, + "circle-stroke-opacity": 0.5 + } + } + ] +} diff --git a/metrics/integration/render-tests/circle-stroke-opacity/property-function/expected.png b/metrics/integration/render-tests/circle-stroke-opacity/property-function/expected.png new file mode 100644 index 00000000000..3c4d57ceeb1 Binary files /dev/null and b/metrics/integration/render-tests/circle-stroke-opacity/property-function/expected.png differ diff --git a/metrics/integration/render-tests/circle-stroke-opacity/property-function/style.json b/metrics/integration/render-tests/circle-stroke-opacity/property-function/style.json new file mode 100644 index 00000000000..0defdac015b --- /dev/null +++ b/metrics/integration/render-tests/circle-stroke-opacity/property-function/style.json @@ -0,0 +1,60 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "opacity": 0.5 + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + "opacity": 0.8 + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson", + "paint": { + "circle-color": "#fff", + "circle-stroke-width": 5, + "circle-stroke-opacity": { + "type": "identity", + "property": "opacity" + } + } + } + ] +} diff --git a/metrics/integration/render-tests/circle-stroke-opacity/stroke-only/expected.png b/metrics/integration/render-tests/circle-stroke-opacity/stroke-only/expected.png new file mode 100644 index 00000000000..d1d4942d423 Binary files /dev/null and b/metrics/integration/render-tests/circle-stroke-opacity/stroke-only/expected.png differ diff --git a/metrics/integration/render-tests/circle-stroke-opacity/stroke-only/style.json b/metrics/integration/render-tests/circle-stroke-opacity/stroke-only/style.json new file mode 100644 index 00000000000..b2ebd3d1e78 --- /dev/null +++ b/metrics/integration/render-tests/circle-stroke-opacity/stroke-only/style.json @@ -0,0 +1,54 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson", + "paint": { + "circle-opacity": 0, + "circle-stroke-width": 5 + } + } + ] +} diff --git a/metrics/integration/render-tests/circle-stroke-opacity/zoom-and-property-function/expected.png b/metrics/integration/render-tests/circle-stroke-opacity/zoom-and-property-function/expected.png new file mode 100644 index 00000000000..59a1f3b23d5 Binary files /dev/null and b/metrics/integration/render-tests/circle-stroke-opacity/zoom-and-property-function/expected.png differ diff --git a/metrics/integration/render-tests/circle-stroke-opacity/zoom-and-property-function/style.json b/metrics/integration/render-tests/circle-stroke-opacity/zoom-and-property-function/style.json new file mode 100644 index 00000000000..56880b3ba00 --- /dev/null +++ b/metrics/integration/render-tests/circle-stroke-opacity/zoom-and-property-function/style.json @@ -0,0 +1,89 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "opacity": 0 + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + "opacity": 1 + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson", + "paint": { + "circle-color": "#fff", + "circle-stroke-width": 5, + "circle-stroke-opacity": { + "property": "opacity", + "stops": [ + [ + { + "zoom": 0, + "value": 0 + }, + 0.5 + ], + [ + { + "zoom": 0, + "value": 1 + }, + 0.7 + ], + [ + { + "zoom": 1, + "value": 0 + }, + 0.9 + ], + [ + { + "zoom": 1, + "value": 1 + }, + 1 + ] + ] + } + } + } + ] +} diff --git a/metrics/integration/render-tests/circle-stroke-width/default/expected.png b/metrics/integration/render-tests/circle-stroke-width/default/expected.png new file mode 100644 index 00000000000..3e6fe907dbf Binary files /dev/null and b/metrics/integration/render-tests/circle-stroke-width/default/expected.png differ diff --git a/metrics/integration/render-tests/circle-stroke-width/default/style.json b/metrics/integration/render-tests/circle-stroke-width/default/style.json new file mode 100644 index 00000000000..47ea53f5ca9 --- /dev/null +++ b/metrics/integration/render-tests/circle-stroke-width/default/style.json @@ -0,0 +1,53 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson", + "paint": { + "circle-color": "#fff" + } + } + ] +} diff --git a/metrics/integration/render-tests/circle-stroke-width/function/expected.png b/metrics/integration/render-tests/circle-stroke-width/function/expected.png new file mode 100644 index 00000000000..9ccde6d2885 Binary files /dev/null and b/metrics/integration/render-tests/circle-stroke-width/function/expected.png differ diff --git a/metrics/integration/render-tests/circle-stroke-width/function/style.json b/metrics/integration/render-tests/circle-stroke-width/function/style.json new file mode 100644 index 00000000000..66eae4e4f9e --- /dev/null +++ b/metrics/integration/render-tests/circle-stroke-width/function/style.json @@ -0,0 +1,65 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson", + "paint": { + "circle-color": "#fff", + "circle-stroke-width": { + "stops": [ + [ + 0, + 5 + ], + [ + 1, + 10 + ] + ] + } + } + } + ] +} diff --git a/metrics/integration/render-tests/circle-stroke-width/literal/expected.png b/metrics/integration/render-tests/circle-stroke-width/literal/expected.png new file mode 100644 index 00000000000..9ccde6d2885 Binary files /dev/null and b/metrics/integration/render-tests/circle-stroke-width/literal/expected.png differ diff --git a/metrics/integration/render-tests/circle-stroke-width/literal/style.json b/metrics/integration/render-tests/circle-stroke-width/literal/style.json new file mode 100644 index 00000000000..de18581c1a7 --- /dev/null +++ b/metrics/integration/render-tests/circle-stroke-width/literal/style.json @@ -0,0 +1,54 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson", + "paint": { + "circle-color": "#fff", + "circle-stroke-width": 5 + } + } + ] +} diff --git a/metrics/integration/render-tests/circle-stroke-width/property-function/expected.png b/metrics/integration/render-tests/circle-stroke-width/property-function/expected.png new file mode 100644 index 00000000000..33a85211d4a Binary files /dev/null and b/metrics/integration/render-tests/circle-stroke-width/property-function/expected.png differ diff --git a/metrics/integration/render-tests/circle-stroke-width/property-function/style.json b/metrics/integration/render-tests/circle-stroke-width/property-function/style.json new file mode 100644 index 00000000000..4d8fdcb543a --- /dev/null +++ b/metrics/integration/render-tests/circle-stroke-width/property-function/style.json @@ -0,0 +1,59 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "width": 4 + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + "width": 7 + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson", + "paint": { + "circle-color": "#fff", + "circle-stroke-width": { + "type": "identity", + "property": "width" + } + } + } + ] +} diff --git a/metrics/integration/render-tests/circle-stroke-width/zoom-and-property-function/expected.png b/metrics/integration/render-tests/circle-stroke-width/zoom-and-property-function/expected.png new file mode 100644 index 00000000000..8f9a448f553 Binary files /dev/null and b/metrics/integration/render-tests/circle-stroke-width/zoom-and-property-function/expected.png differ diff --git a/metrics/integration/render-tests/circle-stroke-width/zoom-and-property-function/style.json b/metrics/integration/render-tests/circle-stroke-width/zoom-and-property-function/style.json new file mode 100644 index 00000000000..da855462b0a --- /dev/null +++ b/metrics/integration/render-tests/circle-stroke-width/zoom-and-property-function/style.json @@ -0,0 +1,88 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "width": 5 + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + "width": 10 + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson", + "paint": { + "circle-color": "#fff", + "circle-stroke-width": { + "property": "width", + "stops": [ + [ + { + "zoom": 0, + "value": 0 + }, + 2 + ], + [ + { + "zoom": 0, + "value": 50 + }, + 8 + ], + [ + { + "zoom": 1, + "value": 0 + }, + 6 + ], + [ + { + "zoom": 1, + "value": 50 + }, + 24 + ] + ] + } + } + } + ] +} diff --git a/metrics/integration/render-tests/circle-translate-anchor/map/expected.png b/metrics/integration/render-tests/circle-translate-anchor/map/expected.png new file mode 100644 index 00000000000..2fef39cf334 Binary files /dev/null and b/metrics/integration/render-tests/circle-translate-anchor/map/expected.png differ diff --git a/metrics/integration/render-tests/circle-translate-anchor/map/style.json b/metrics/integration/render-tests/circle-translate-anchor/map/style.json new file mode 100644 index 00000000000..f5d0c1af1b1 --- /dev/null +++ b/metrics/integration/render-tests/circle-translate-anchor/map/style.json @@ -0,0 +1,58 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "bearing": 90, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson", + "paint": { + "circle-translate": [ + 20, + 0 + ], + "circle-translate-anchor": "map" + } + } + ] +} diff --git a/metrics/integration/render-tests/circle-translate-anchor/viewport/expected.png b/metrics/integration/render-tests/circle-translate-anchor/viewport/expected.png new file mode 100644 index 00000000000..7621b5e29f1 Binary files /dev/null and b/metrics/integration/render-tests/circle-translate-anchor/viewport/expected.png differ diff --git a/metrics/integration/render-tests/circle-translate-anchor/viewport/style.json b/metrics/integration/render-tests/circle-translate-anchor/viewport/style.json new file mode 100644 index 00000000000..09330f61d34 --- /dev/null +++ b/metrics/integration/render-tests/circle-translate-anchor/viewport/style.json @@ -0,0 +1,58 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "bearing": 90, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson", + "paint": { + "circle-translate": [ + 20, + 0 + ], + "circle-translate-anchor": "viewport" + } + } + ] +} diff --git a/metrics/integration/render-tests/circle-translate/default/expected.png b/metrics/integration/render-tests/circle-translate/default/expected.png new file mode 100644 index 00000000000..3abac7f9279 Binary files /dev/null and b/metrics/integration/render-tests/circle-translate/default/expected.png differ diff --git a/metrics/integration/render-tests/circle-translate/default/style.json b/metrics/integration/render-tests/circle-translate/default/style.json new file mode 100644 index 00000000000..e5407053ad6 --- /dev/null +++ b/metrics/integration/render-tests/circle-translate/default/style.json @@ -0,0 +1,53 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson", + "paint": { + "circle-radius": 10 + } + } + ] +} diff --git a/metrics/integration/render-tests/circle-translate/function/expected.png b/metrics/integration/render-tests/circle-translate/function/expected.png new file mode 100644 index 00000000000..a49dbf15bdd Binary files /dev/null and b/metrics/integration/render-tests/circle-translate/function/expected.png differ diff --git a/metrics/integration/render-tests/circle-translate/function/style.json b/metrics/integration/render-tests/circle-translate/function/style.json new file mode 100644 index 00000000000..9b24ac09a91 --- /dev/null +++ b/metrics/integration/render-tests/circle-translate/function/style.json @@ -0,0 +1,71 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson", + "paint": { + "circle-radius": 10, + "circle-translate": { + "stops": [ + [ + 0, + [ + 10, + 5 + ] + ], + [ + 1, + [ + 15, + 20 + ] + ] + ] + } + } + } + ] +} diff --git a/metrics/integration/render-tests/circle-translate/literal/expected.png b/metrics/integration/render-tests/circle-translate/literal/expected.png new file mode 100644 index 00000000000..4b2fefa36e2 Binary files /dev/null and b/metrics/integration/render-tests/circle-translate/literal/expected.png differ diff --git a/metrics/integration/render-tests/circle-translate/literal/style.json b/metrics/integration/render-tests/circle-translate/literal/style.json new file mode 100644 index 00000000000..a4fb742a2a3 --- /dev/null +++ b/metrics/integration/render-tests/circle-translate/literal/style.json @@ -0,0 +1,57 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson", + "paint": { + "circle-radius": 10, + "circle-translate": [ + 5, + 5 + ] + } + } + ] +} diff --git a/metrics/integration/render-tests/collator/default/expected.png b/metrics/integration/render-tests/collator/default/expected.png new file mode 100644 index 00000000000..8fa9a3cd820 Binary files /dev/null and b/metrics/integration/render-tests/collator/default/expected.png differ diff --git a/metrics/integration/render-tests/collator/default/style.json b/metrics/integration/render-tests/collator/default/style.json new file mode 100644 index 00000000000..254409fd0d1 --- /dev/null +++ b/metrics/integration/render-tests/collator/default/style.json @@ -0,0 +1,223 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256, + "width": 256, + "description": "We use a render test for the collator expression because it has an Android-specific implementation and we don't have an Android expression test suite. For other platforms, see the collator expression tests." + } + }, + "sources": { + "mapbox": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "a": "a", + "b": "Â", + "operator": "==", + "case-sensitive": false, + "diacritic-sensitive": false + }, + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + "a": "a", + "b": "Â", + "operator": "!=", + "case-sensitive": false, + "diacritic-sensitive": false + }, + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 40 + ] + } + }, + { + "type": "Feature", + "properties": { + "a": "a", + "b": "Â", + "operator": "<=", + "case-sensitive": true, + "diacritic-sensitive": false + }, + "geometry": { + "type": "Point", + "coordinates": [ + 0, + -40 + ] + } + }, + { + "type": "Feature", + "properties": { + "a": "a", + "b": "ä", + "operator": "<", + "case-sensitive": true, + "diacritic-sensitive": false + }, + "geometry": { + "type": "Point", + "coordinates": [ + -60, + 40 + ] + } + }, + { + "type": "Feature", + "properties": { + "a": "a", + "b": "ä", + "operator": ">", + "case-sensitive": true, + "diacritic-sensitive": true + }, + "geometry": { + "type": "Point", + "coordinates": [ + -60, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + "a": "a", + "b": "ä", + "operator": ">=", + "case-sensitive": true, + "diacritic-sensitive": true + }, + "geometry": { + "type": "Point", + "coordinates": [ + -60, + -40 + ] + } + }, + { + "type": "Feature", + "properties": { + "a": "a", + "b": "ä", + "operator": "<", + "case-sensitive": true, + "diacritic-sensitive": true + }, + "geometry": { + "type": "Point", + "coordinates": [ + 60, + 40 + ] + } + }, + { + "type": "Feature", + "properties": { + "a": "a", + "b": "ä", + "operator": "<", + "case-sensitive": false, + "diacritic-sensitive": true + }, + "geometry": { + "type": "Point", + "coordinates": [ + 60, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + "a": "a", + "b": "A", + "operator": "<=", + "case-sensitive": true, + "diacritic-sensitive": true + }, + "geometry": { + "type": "Point", + "coordinates": [ + 60, + -40 + ] + } + } + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "literal", + "type": "symbol", + "source": "mapbox", + "layout": { + "text-field": ["let", + "a", ["to-string", ["get", "a"]], + "b", ["to-string", ["get", "b"]], + "op", ["get", "operator"], + "collation", ["collator", { + "case-sensitive": ["get", "case-sensitive"], + "diacritic-sensitive": ["get", "diacritic-sensitive"], + "locale": "en" } + ], + ["concat", + ["var", "a"], " ", + ["var", "op"], " ", + ["var", "b"], "\n", + "Case: ", ["to-string", ["get", "case-sensitive"]], "\n", + "Diacritics: ", ["to-string", ["get", "diacritic-sensitive"]], "\n", + ["to-string", ["match", + ["var", "op"], + "==", ["==", ["var", "a"], ["var", "b"], ["var", "collation"]], + "!=", ["!=", ["var", "a"], ["var", "b"], ["var", "collation"]], + "<", ["<", ["var", "a"], ["var", "b"], ["var", "collation"]], + "<=", ["<=", ["var", "a"], ["var", "b"], ["var", "collation"]], + ">", [">", ["var", "a"], ["var", "b"], ["var", "collation"]], + ">=", [">=", ["var", "a"], ["var", "b"], ["var", "collation"]], + false + ]] + ] + ], + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-size": 10, + "text-max-width": 7 + } + } + ] +} diff --git a/metrics/integration/render-tests/collator/resolved-locale/expected.png b/metrics/integration/render-tests/collator/resolved-locale/expected.png new file mode 100644 index 00000000000..565cc177ae9 Binary files /dev/null and b/metrics/integration/render-tests/collator/resolved-locale/expected.png differ diff --git a/metrics/integration/render-tests/collator/resolved-locale/style.json b/metrics/integration/render-tests/collator/resolved-locale/style.json new file mode 100644 index 00000000000..2902f528909 --- /dev/null +++ b/metrics/integration/render-tests/collator/resolved-locale/style.json @@ -0,0 +1,63 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 64, + "width": 128, + "description": "We use a render test for the collator expression because it has an Android-specific implementation and we don't have an Android expression test suite. For other platforms, see the collator expression tests." + } + }, + "sources": { + "mapbox": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "literal", + "type": "symbol", + "source": "mapbox", + "layout": { + "text-field": ["concat", + "en == ", + [ + "resolved-locale", + [ + "collator", + {"case-sensitive": true, "diacritic-sensitive": true, "locale": "en"} + ] + ] + ], + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-size": 10, + "text-max-width": 7 + } + } + ] +} diff --git a/metrics/integration/render-tests/combinations/background-opaque--background-opaque/expected.png b/metrics/integration/render-tests/combinations/background-opaque--background-opaque/expected.png new file mode 100644 index 00000000000..cc46431ca9e Binary files /dev/null and b/metrics/integration/render-tests/combinations/background-opaque--background-opaque/expected.png differ diff --git a/metrics/integration/render-tests/combinations/background-opaque--background-opaque/style.json b/metrics/integration/render-tests/combinations/background-opaque--background-opaque/style.json new file mode 100644 index 00000000000..c022b749042 --- /dev/null +++ b/metrics/integration/render-tests/combinations/background-opaque--background-opaque/style.json @@ -0,0 +1,31 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": {}, + "layers": [ + { + "id": "background-opaque", + "type": "background", + "paint": { + "background-color": "red" + } + }, + { + "id": "background-opaque-2", + "type": "background", + "paint": { + "background-color": "blue" + } + } + ] +} diff --git a/metrics/integration/render-tests/combinations/background-opaque--background-translucent/expected.png b/metrics/integration/render-tests/combinations/background-opaque--background-translucent/expected.png new file mode 100644 index 00000000000..998bb1e2c25 Binary files /dev/null and b/metrics/integration/render-tests/combinations/background-opaque--background-translucent/expected.png differ diff --git a/metrics/integration/render-tests/combinations/background-opaque--background-translucent/style.json b/metrics/integration/render-tests/combinations/background-opaque--background-translucent/style.json new file mode 100644 index 00000000000..ca8e23bb09d --- /dev/null +++ b/metrics/integration/render-tests/combinations/background-opaque--background-translucent/style.json @@ -0,0 +1,32 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": {}, + "layers": [ + { + "id": "background-opaque", + "type": "background", + "paint": { + "background-color": "red" + } + }, + { + "id": "background-translucent", + "type": "background", + "paint": { + "background-opacity": 0.5, + "background-color": "blue" + } + } + ] +} diff --git a/metrics/integration/render-tests/combinations/background-opaque--circle-translucent/expected.png b/metrics/integration/render-tests/combinations/background-opaque--circle-translucent/expected.png new file mode 100644 index 00000000000..edde41e8b4f Binary files /dev/null and b/metrics/integration/render-tests/combinations/background-opaque--circle-translucent/expected.png differ diff --git a/metrics/integration/render-tests/combinations/background-opaque--circle-translucent/style.json b/metrics/integration/render-tests/combinations/background-opaque--circle-translucent/style.json new file mode 100644 index 00000000000..856fbf5ece4 --- /dev/null +++ b/metrics/integration/render-tests/combinations/background-opaque--circle-translucent/style.json @@ -0,0 +1,63 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "background-opaque", + "type": "background", + "paint": { + "background-color": "red" + } + }, + { + "id": "circle-translucent", + "type": "circle", + "source": "geojson", + "paint": { + "circle-color": "blue" + } + } + ] +} diff --git a/metrics/integration/render-tests/combinations/background-opaque--fill-extrusion-translucent/expected.png b/metrics/integration/render-tests/combinations/background-opaque--fill-extrusion-translucent/expected.png new file mode 100644 index 00000000000..98125b322e5 Binary files /dev/null and b/metrics/integration/render-tests/combinations/background-opaque--fill-extrusion-translucent/expected.png differ diff --git a/metrics/integration/render-tests/combinations/background-opaque--fill-extrusion-translucent/style.json b/metrics/integration/render-tests/combinations/background-opaque--fill-extrusion-translucent/style.json new file mode 100644 index 00000000000..0aabb5242c7 --- /dev/null +++ b/metrics/integration/render-tests/combinations/background-opaque--fill-extrusion-translucent/style.json @@ -0,0 +1,63 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "background-opaque", + "type": "background", + "paint": { + "background-color": "red" + } + }, + { + "id": "fill-extrusion-translucent", + "type": "fill-extrusion", + "source": "geojson", + "paint": { + "fill-extrusion-color": "blue" + } + } + ] +} diff --git a/metrics/integration/render-tests/combinations/background-opaque--fill-opaque/expected.png b/metrics/integration/render-tests/combinations/background-opaque--fill-opaque/expected.png new file mode 100644 index 00000000000..8ebce94c4dc Binary files /dev/null and b/metrics/integration/render-tests/combinations/background-opaque--fill-opaque/expected.png differ diff --git a/metrics/integration/render-tests/combinations/background-opaque--fill-opaque/style.json b/metrics/integration/render-tests/combinations/background-opaque--fill-opaque/style.json new file mode 100644 index 00000000000..bdc472df1b6 --- /dev/null +++ b/metrics/integration/render-tests/combinations/background-opaque--fill-opaque/style.json @@ -0,0 +1,63 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "background-opaque", + "type": "background", + "paint": { + "background-color": "red" + } + }, + { + "id": "fill-opaque", + "type": "fill", + "source": "geojson", + "paint": { + "fill-color": "blue" + } + } + ] +} diff --git a/metrics/integration/render-tests/combinations/background-opaque--fill-translucent/expected.png b/metrics/integration/render-tests/combinations/background-opaque--fill-translucent/expected.png new file mode 100644 index 00000000000..9f0c973e2ae Binary files /dev/null and b/metrics/integration/render-tests/combinations/background-opaque--fill-translucent/expected.png differ diff --git a/metrics/integration/render-tests/combinations/background-opaque--fill-translucent/style.json b/metrics/integration/render-tests/combinations/background-opaque--fill-translucent/style.json new file mode 100644 index 00000000000..6209466fb6a --- /dev/null +++ b/metrics/integration/render-tests/combinations/background-opaque--fill-translucent/style.json @@ -0,0 +1,64 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "background-opaque", + "type": "background", + "paint": { + "background-color": "red" + } + }, + { + "id": "fill-translucent", + "type": "fill", + "source": "geojson", + "paint": { + "fill-opacity": 0.5, + "fill-color": "blue" + } + } + ] +} diff --git a/metrics/integration/render-tests/combinations/background-opaque--heatmap-translucent/expected.png b/metrics/integration/render-tests/combinations/background-opaque--heatmap-translucent/expected.png new file mode 100644 index 00000000000..50c8c13e866 Binary files /dev/null and b/metrics/integration/render-tests/combinations/background-opaque--heatmap-translucent/expected.png differ diff --git a/metrics/integration/render-tests/combinations/background-opaque--heatmap-translucent/style.json b/metrics/integration/render-tests/combinations/background-opaque--heatmap-translucent/style.json new file mode 100644 index 00000000000..e7759460340 --- /dev/null +++ b/metrics/integration/render-tests/combinations/background-opaque--heatmap-translucent/style.json @@ -0,0 +1,63 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "background-opaque", + "type": "background", + "paint": { + "background-color": "red" + } + }, + { + "id": "heatmap-translucent", + "type": "heatmap", + "source": "geojson", + "paint": { + "heatmap-opacity": 0.7 + } + } + ] +} diff --git a/metrics/integration/render-tests/combinations/background-opaque--hillshade-translucent/expected.png b/metrics/integration/render-tests/combinations/background-opaque--hillshade-translucent/expected.png new file mode 100644 index 00000000000..b878bf30382 Binary files /dev/null and b/metrics/integration/render-tests/combinations/background-opaque--hillshade-translucent/expected.png differ diff --git a/metrics/integration/render-tests/combinations/background-opaque--hillshade-translucent/style.json b/metrics/integration/render-tests/combinations/background-opaque--hillshade-translucent/style.json new file mode 100644 index 00000000000..99a701e5e48 --- /dev/null +++ b/metrics/integration/render-tests/combinations/background-opaque--hillshade-translucent/style.json @@ -0,0 +1,41 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "hillshade": { + "type": "raster-dem", + "tiles": [ + "local://tiles/{z}-{x}-{y}.terrain.png" + ], + "maxzoom": 15, + "tileSize": 256 + } + }, + "layers": [ + { + "id": "background-opaque", + "type": "background", + "paint": { + "background-color": "red" + } + }, + { + "id": "hillshade-translucent", + "type": "hillshade", + "source": "hillshade", + "paint": { + "hillshade-exaggeration": 1 + } + } + ] +} diff --git a/metrics/integration/render-tests/combinations/background-opaque--line-translucent/expected.png b/metrics/integration/render-tests/combinations/background-opaque--line-translucent/expected.png new file mode 100644 index 00000000000..ba163614929 Binary files /dev/null and b/metrics/integration/render-tests/combinations/background-opaque--line-translucent/expected.png differ diff --git a/metrics/integration/render-tests/combinations/background-opaque--line-translucent/style.json b/metrics/integration/render-tests/combinations/background-opaque--line-translucent/style.json new file mode 100644 index 00000000000..159afbf58e3 --- /dev/null +++ b/metrics/integration/render-tests/combinations/background-opaque--line-translucent/style.json @@ -0,0 +1,63 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "background-opaque", + "type": "background", + "paint": { + "background-color": "red" + } + }, + { + "id": "line-translucent", + "type": "line", + "source": "geojson", + "paint": { + "line-color": "blue" + } + } + ] +} diff --git a/metrics/integration/render-tests/combinations/background-opaque--raster-translucent/expected.png b/metrics/integration/render-tests/combinations/background-opaque--raster-translucent/expected.png new file mode 100644 index 00000000000..dcef5836775 Binary files /dev/null and b/metrics/integration/render-tests/combinations/background-opaque--raster-translucent/expected.png differ diff --git a/metrics/integration/render-tests/combinations/background-opaque--raster-translucent/style.json b/metrics/integration/render-tests/combinations/background-opaque--raster-translucent/style.json new file mode 100644 index 00000000000..49de93841dd --- /dev/null +++ b/metrics/integration/render-tests/combinations/background-opaque--raster-translucent/style.json @@ -0,0 +1,42 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "satellite": { + "type": "raster", + "tiles": [ + "local://tiles/{z}-{x}-{y}.satellite.png" + ], + "maxzoom": 17, + "tileSize": 256 + } + }, + "layers": [ + { + "id": "background-opaque", + "type": "background", + "paint": { + "background-color": "red" + } + }, + { + "id": "raster-translucent", + "type": "raster", + "source": "satellite", + "paint": { + "raster-fade-duration": 0, + "raster-opacity": 0.9 + } + } + ] +} diff --git a/metrics/integration/render-tests/combinations/background-opaque--symbol-translucent/expected.png b/metrics/integration/render-tests/combinations/background-opaque--symbol-translucent/expected.png new file mode 100644 index 00000000000..52ec94932b2 Binary files /dev/null and b/metrics/integration/render-tests/combinations/background-opaque--symbol-translucent/expected.png differ diff --git a/metrics/integration/render-tests/combinations/background-opaque--symbol-translucent/style.json b/metrics/integration/render-tests/combinations/background-opaque--symbol-translucent/style.json new file mode 100644 index 00000000000..d00429948ca --- /dev/null +++ b/metrics/integration/render-tests/combinations/background-opaque--symbol-translucent/style.json @@ -0,0 +1,68 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "background-opaque", + "type": "background", + "paint": { + "background-color": "red" + } + }, + { + "id": "symbol-translucent", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "dot.sdf", + "symbol-placement": "line" + }, + "paint": { + "icon-color": "blue" + } + } + ], + "sprite": "local://sprites/sprite" +} diff --git a/metrics/integration/render-tests/combinations/background-translucent--background-opaque/expected.png b/metrics/integration/render-tests/combinations/background-translucent--background-opaque/expected.png new file mode 100644 index 00000000000..cc46431ca9e Binary files /dev/null and b/metrics/integration/render-tests/combinations/background-translucent--background-opaque/expected.png differ diff --git a/metrics/integration/render-tests/combinations/background-translucent--background-opaque/style.json b/metrics/integration/render-tests/combinations/background-translucent--background-opaque/style.json new file mode 100644 index 00000000000..3218b1cab81 --- /dev/null +++ b/metrics/integration/render-tests/combinations/background-translucent--background-opaque/style.json @@ -0,0 +1,32 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": {}, + "layers": [ + { + "id": "background-translucent", + "type": "background", + "paint": { + "background-opacity": 0.5, + "background-color": "red" + } + }, + { + "id": "background-opaque", + "type": "background", + "paint": { + "background-color": "blue" + } + } + ] +} diff --git a/metrics/integration/render-tests/combinations/background-translucent--background-translucent/expected.png b/metrics/integration/render-tests/combinations/background-translucent--background-translucent/expected.png new file mode 100644 index 00000000000..e1753411773 Binary files /dev/null and b/metrics/integration/render-tests/combinations/background-translucent--background-translucent/expected.png differ diff --git a/metrics/integration/render-tests/combinations/background-translucent--background-translucent/style.json b/metrics/integration/render-tests/combinations/background-translucent--background-translucent/style.json new file mode 100644 index 00000000000..78fad7b6263 --- /dev/null +++ b/metrics/integration/render-tests/combinations/background-translucent--background-translucent/style.json @@ -0,0 +1,33 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": {}, + "layers": [ + { + "id": "background-translucent", + "type": "background", + "paint": { + "background-opacity": 0.5, + "background-color": "red" + } + }, + { + "id": "background-translucent-2", + "type": "background", + "paint": { + "background-opacity": 0.5, + "background-color": "blue" + } + } + ] +} diff --git a/metrics/integration/render-tests/combinations/background-translucent--circle-translucent/expected.png b/metrics/integration/render-tests/combinations/background-translucent--circle-translucent/expected.png new file mode 100644 index 00000000000..de92554f48f Binary files /dev/null and b/metrics/integration/render-tests/combinations/background-translucent--circle-translucent/expected.png differ diff --git a/metrics/integration/render-tests/combinations/background-translucent--circle-translucent/style.json b/metrics/integration/render-tests/combinations/background-translucent--circle-translucent/style.json new file mode 100644 index 00000000000..f75f532ec67 --- /dev/null +++ b/metrics/integration/render-tests/combinations/background-translucent--circle-translucent/style.json @@ -0,0 +1,64 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "background-translucent", + "type": "background", + "paint": { + "background-opacity": 0.5, + "background-color": "red" + } + }, + { + "id": "circle-translucent", + "type": "circle", + "source": "geojson", + "paint": { + "circle-color": "blue" + } + } + ] +} diff --git a/metrics/integration/render-tests/combinations/background-translucent--fill-extrusion-translucent/expected.png b/metrics/integration/render-tests/combinations/background-translucent--fill-extrusion-translucent/expected.png new file mode 100644 index 00000000000..0f754d0e348 Binary files /dev/null and b/metrics/integration/render-tests/combinations/background-translucent--fill-extrusion-translucent/expected.png differ diff --git a/metrics/integration/render-tests/combinations/background-translucent--fill-extrusion-translucent/style.json b/metrics/integration/render-tests/combinations/background-translucent--fill-extrusion-translucent/style.json new file mode 100644 index 00000000000..a0889029cbb --- /dev/null +++ b/metrics/integration/render-tests/combinations/background-translucent--fill-extrusion-translucent/style.json @@ -0,0 +1,64 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "background-translucent", + "type": "background", + "paint": { + "background-opacity": 0.5, + "background-color": "red" + } + }, + { + "id": "fill-extrusion-translucent", + "type": "fill-extrusion", + "source": "geojson", + "paint": { + "fill-extrusion-color": "blue" + } + } + ] +} diff --git a/metrics/integration/render-tests/combinations/background-translucent--fill-opaque/expected.png b/metrics/integration/render-tests/combinations/background-translucent--fill-opaque/expected.png new file mode 100644 index 00000000000..85d46b5c787 Binary files /dev/null and b/metrics/integration/render-tests/combinations/background-translucent--fill-opaque/expected.png differ diff --git a/metrics/integration/render-tests/combinations/background-translucent--fill-opaque/style.json b/metrics/integration/render-tests/combinations/background-translucent--fill-opaque/style.json new file mode 100644 index 00000000000..1ecd43d6d8c --- /dev/null +++ b/metrics/integration/render-tests/combinations/background-translucent--fill-opaque/style.json @@ -0,0 +1,64 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "background-translucent", + "type": "background", + "paint": { + "background-opacity": 0.5, + "background-color": "red" + } + }, + { + "id": "fill-opaque", + "type": "fill", + "source": "geojson", + "paint": { + "fill-color": "blue" + } + } + ] +} diff --git a/metrics/integration/render-tests/combinations/background-translucent--fill-translucent/expected.png b/metrics/integration/render-tests/combinations/background-translucent--fill-translucent/expected.png new file mode 100644 index 00000000000..e0f3c996de0 Binary files /dev/null and b/metrics/integration/render-tests/combinations/background-translucent--fill-translucent/expected.png differ diff --git a/metrics/integration/render-tests/combinations/background-translucent--fill-translucent/style.json b/metrics/integration/render-tests/combinations/background-translucent--fill-translucent/style.json new file mode 100644 index 00000000000..f977831eb2c --- /dev/null +++ b/metrics/integration/render-tests/combinations/background-translucent--fill-translucent/style.json @@ -0,0 +1,65 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "background-translucent", + "type": "background", + "paint": { + "background-opacity": 0.5, + "background-color": "red" + } + }, + { + "id": "fill-translucent", + "type": "fill", + "source": "geojson", + "paint": { + "fill-opacity": 0.5, + "fill-color": "blue" + } + } + ] +} diff --git a/metrics/integration/render-tests/combinations/background-translucent--heatmap-translucent/expected.png b/metrics/integration/render-tests/combinations/background-translucent--heatmap-translucent/expected.png new file mode 100644 index 00000000000..1cb17a58231 Binary files /dev/null and b/metrics/integration/render-tests/combinations/background-translucent--heatmap-translucent/expected.png differ diff --git a/metrics/integration/render-tests/combinations/background-translucent--heatmap-translucent/style.json b/metrics/integration/render-tests/combinations/background-translucent--heatmap-translucent/style.json new file mode 100644 index 00000000000..80b0decad23 --- /dev/null +++ b/metrics/integration/render-tests/combinations/background-translucent--heatmap-translucent/style.json @@ -0,0 +1,64 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "background-translucent", + "type": "background", + "paint": { + "background-opacity": 0.5, + "background-color": "red" + } + }, + { + "id": "heatmap-translucent", + "type": "heatmap", + "source": "geojson", + "paint": { + "heatmap-opacity": 0.7 + } + } + ] +} diff --git a/metrics/integration/render-tests/combinations/background-translucent--hillshade-translucent/expected.png b/metrics/integration/render-tests/combinations/background-translucent--hillshade-translucent/expected.png new file mode 100644 index 00000000000..01196cf362d Binary files /dev/null and b/metrics/integration/render-tests/combinations/background-translucent--hillshade-translucent/expected.png differ diff --git a/metrics/integration/render-tests/combinations/background-translucent--hillshade-translucent/style.json b/metrics/integration/render-tests/combinations/background-translucent--hillshade-translucent/style.json new file mode 100644 index 00000000000..07058e29711 --- /dev/null +++ b/metrics/integration/render-tests/combinations/background-translucent--hillshade-translucent/style.json @@ -0,0 +1,42 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "hillshade": { + "type": "raster-dem", + "tiles": [ + "local://tiles/{z}-{x}-{y}.terrain.png" + ], + "maxzoom": 15, + "tileSize": 256 + } + }, + "layers": [ + { + "id": "background-translucent", + "type": "background", + "paint": { + "background-opacity": 0.5, + "background-color": "red" + } + }, + { + "id": "hillshade-translucent", + "type": "hillshade", + "source": "hillshade", + "paint": { + "hillshade-exaggeration": 1 + } + } + ] +} diff --git a/metrics/integration/render-tests/combinations/background-translucent--line-translucent/expected.png b/metrics/integration/render-tests/combinations/background-translucent--line-translucent/expected.png new file mode 100644 index 00000000000..18045eff3d1 Binary files /dev/null and b/metrics/integration/render-tests/combinations/background-translucent--line-translucent/expected.png differ diff --git a/metrics/integration/render-tests/combinations/background-translucent--line-translucent/style.json b/metrics/integration/render-tests/combinations/background-translucent--line-translucent/style.json new file mode 100644 index 00000000000..849692f9d6d --- /dev/null +++ b/metrics/integration/render-tests/combinations/background-translucent--line-translucent/style.json @@ -0,0 +1,64 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "background-translucent", + "type": "background", + "paint": { + "background-opacity": 0.5, + "background-color": "red" + } + }, + { + "id": "line-translucent", + "type": "line", + "source": "geojson", + "paint": { + "line-color": "blue" + } + } + ] +} diff --git a/metrics/integration/render-tests/combinations/background-translucent--raster-translucent/expected.png b/metrics/integration/render-tests/combinations/background-translucent--raster-translucent/expected.png new file mode 100644 index 00000000000..ab2db0a176f Binary files /dev/null and b/metrics/integration/render-tests/combinations/background-translucent--raster-translucent/expected.png differ diff --git a/metrics/integration/render-tests/combinations/background-translucent--raster-translucent/style.json b/metrics/integration/render-tests/combinations/background-translucent--raster-translucent/style.json new file mode 100644 index 00000000000..52b0969a935 --- /dev/null +++ b/metrics/integration/render-tests/combinations/background-translucent--raster-translucent/style.json @@ -0,0 +1,43 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "satellite": { + "type": "raster", + "tiles": [ + "local://tiles/{z}-{x}-{y}.satellite.png" + ], + "maxzoom": 17, + "tileSize": 256 + } + }, + "layers": [ + { + "id": "background-translucent", + "type": "background", + "paint": { + "background-opacity": 0.5, + "background-color": "red" + } + }, + { + "id": "raster-translucent", + "type": "raster", + "source": "satellite", + "paint": { + "raster-fade-duration": 0, + "raster-opacity": 0.9 + } + } + ] +} diff --git a/metrics/integration/render-tests/combinations/background-translucent--symbol-translucent/expected.png b/metrics/integration/render-tests/combinations/background-translucent--symbol-translucent/expected.png new file mode 100644 index 00000000000..2d35ac0680b Binary files /dev/null and b/metrics/integration/render-tests/combinations/background-translucent--symbol-translucent/expected.png differ diff --git a/metrics/integration/render-tests/combinations/background-translucent--symbol-translucent/style.json b/metrics/integration/render-tests/combinations/background-translucent--symbol-translucent/style.json new file mode 100644 index 00000000000..981e394938b --- /dev/null +++ b/metrics/integration/render-tests/combinations/background-translucent--symbol-translucent/style.json @@ -0,0 +1,69 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "background-translucent", + "type": "background", + "paint": { + "background-opacity": 0.5, + "background-color": "red" + } + }, + { + "id": "symbol-translucent", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "dot.sdf", + "symbol-placement": "line" + }, + "paint": { + "icon-color": "blue" + } + } + ], + "sprite": "local://sprites/sprite" +} diff --git a/metrics/integration/render-tests/combinations/circle-translucent--background-opaque/expected.png b/metrics/integration/render-tests/combinations/circle-translucent--background-opaque/expected.png new file mode 100644 index 00000000000..cc46431ca9e Binary files /dev/null and b/metrics/integration/render-tests/combinations/circle-translucent--background-opaque/expected.png differ diff --git a/metrics/integration/render-tests/combinations/circle-translucent--background-opaque/style.json b/metrics/integration/render-tests/combinations/circle-translucent--background-opaque/style.json new file mode 100644 index 00000000000..640eaa27797 --- /dev/null +++ b/metrics/integration/render-tests/combinations/circle-translucent--background-opaque/style.json @@ -0,0 +1,63 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "circle-translucent", + "type": "circle", + "source": "geojson", + "paint": { + "circle-color": "red" + } + }, + { + "id": "background-opaque", + "type": "background", + "paint": { + "background-color": "blue" + } + } + ] +} diff --git a/metrics/integration/render-tests/combinations/circle-translucent--background-translucent/expected.png b/metrics/integration/render-tests/combinations/circle-translucent--background-translucent/expected.png new file mode 100644 index 00000000000..2ec477559a1 Binary files /dev/null and b/metrics/integration/render-tests/combinations/circle-translucent--background-translucent/expected.png differ diff --git a/metrics/integration/render-tests/combinations/circle-translucent--background-translucent/style.json b/metrics/integration/render-tests/combinations/circle-translucent--background-translucent/style.json new file mode 100644 index 00000000000..eb1e0b0dc01 --- /dev/null +++ b/metrics/integration/render-tests/combinations/circle-translucent--background-translucent/style.json @@ -0,0 +1,64 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "circle-translucent", + "type": "circle", + "source": "geojson", + "paint": { + "circle-color": "red" + } + }, + { + "id": "background-translucent", + "type": "background", + "paint": { + "background-opacity": 0.5, + "background-color": "blue" + } + } + ] +} diff --git a/metrics/integration/render-tests/combinations/circle-translucent--circle-translucent/expected.png b/metrics/integration/render-tests/combinations/circle-translucent--circle-translucent/expected.png new file mode 100644 index 00000000000..0b46b6d374b Binary files /dev/null and b/metrics/integration/render-tests/combinations/circle-translucent--circle-translucent/expected.png differ diff --git a/metrics/integration/render-tests/combinations/circle-translucent--circle-translucent/style.json b/metrics/integration/render-tests/combinations/circle-translucent--circle-translucent/style.json new file mode 100644 index 00000000000..8242ce2e572 --- /dev/null +++ b/metrics/integration/render-tests/combinations/circle-translucent--circle-translucent/style.json @@ -0,0 +1,64 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "circle-translucent", + "type": "circle", + "source": "geojson", + "paint": { + "circle-color": "red" + } + }, + { + "id": "circle-translucent-2", + "type": "circle", + "source": "geojson", + "paint": { + "circle-color": "blue" + } + } + ] +} diff --git a/metrics/integration/render-tests/combinations/circle-translucent--fill-extrusion-translucent/expected.png b/metrics/integration/render-tests/combinations/circle-translucent--fill-extrusion-translucent/expected.png new file mode 100644 index 00000000000..10ea97df3c6 Binary files /dev/null and b/metrics/integration/render-tests/combinations/circle-translucent--fill-extrusion-translucent/expected.png differ diff --git a/metrics/integration/render-tests/combinations/circle-translucent--fill-extrusion-translucent/style.json b/metrics/integration/render-tests/combinations/circle-translucent--fill-extrusion-translucent/style.json new file mode 100644 index 00000000000..4aeaafe27f1 --- /dev/null +++ b/metrics/integration/render-tests/combinations/circle-translucent--fill-extrusion-translucent/style.json @@ -0,0 +1,64 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "circle-translucent", + "type": "circle", + "source": "geojson", + "paint": { + "circle-color": "red" + } + }, + { + "id": "fill-extrusion-translucent", + "type": "fill-extrusion", + "source": "geojson", + "paint": { + "fill-extrusion-color": "blue" + } + } + ] +} diff --git a/metrics/integration/render-tests/combinations/circle-translucent--fill-opaque/expected.png b/metrics/integration/render-tests/combinations/circle-translucent--fill-opaque/expected.png new file mode 100644 index 00000000000..098fcf45bc3 Binary files /dev/null and b/metrics/integration/render-tests/combinations/circle-translucent--fill-opaque/expected.png differ diff --git a/metrics/integration/render-tests/combinations/circle-translucent--fill-opaque/style.json b/metrics/integration/render-tests/combinations/circle-translucent--fill-opaque/style.json new file mode 100644 index 00000000000..9652cee9b1b --- /dev/null +++ b/metrics/integration/render-tests/combinations/circle-translucent--fill-opaque/style.json @@ -0,0 +1,64 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "circle-translucent", + "type": "circle", + "source": "geojson", + "paint": { + "circle-color": "red" + } + }, + { + "id": "fill-opaque", + "type": "fill", + "source": "geojson", + "paint": { + "fill-color": "blue" + } + } + ] +} diff --git a/metrics/integration/render-tests/combinations/circle-translucent--fill-translucent/expected.png b/metrics/integration/render-tests/combinations/circle-translucent--fill-translucent/expected.png new file mode 100644 index 00000000000..d1d855766a1 Binary files /dev/null and b/metrics/integration/render-tests/combinations/circle-translucent--fill-translucent/expected.png differ diff --git a/metrics/integration/render-tests/combinations/circle-translucent--fill-translucent/style.json b/metrics/integration/render-tests/combinations/circle-translucent--fill-translucent/style.json new file mode 100644 index 00000000000..860f5e25fe2 --- /dev/null +++ b/metrics/integration/render-tests/combinations/circle-translucent--fill-translucent/style.json @@ -0,0 +1,65 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "circle-translucent", + "type": "circle", + "source": "geojson", + "paint": { + "circle-color": "red" + } + }, + { + "id": "fill-translucent", + "type": "fill", + "source": "geojson", + "paint": { + "fill-opacity": 0.5, + "fill-color": "blue" + } + } + ] +} diff --git a/metrics/integration/render-tests/combinations/circle-translucent--heatmap-translucent/expected.png b/metrics/integration/render-tests/combinations/circle-translucent--heatmap-translucent/expected.png new file mode 100644 index 00000000000..c369ebfe704 Binary files /dev/null and b/metrics/integration/render-tests/combinations/circle-translucent--heatmap-translucent/expected.png differ diff --git a/metrics/integration/render-tests/combinations/circle-translucent--heatmap-translucent/style.json b/metrics/integration/render-tests/combinations/circle-translucent--heatmap-translucent/style.json new file mode 100644 index 00000000000..cb507926fe8 --- /dev/null +++ b/metrics/integration/render-tests/combinations/circle-translucent--heatmap-translucent/style.json @@ -0,0 +1,64 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "circle-translucent", + "type": "circle", + "source": "geojson", + "paint": { + "circle-color": "red" + } + }, + { + "id": "heatmap-translucent", + "type": "heatmap", + "source": "geojson", + "paint": { + "heatmap-opacity": 0.7 + } + } + ] +} diff --git a/metrics/integration/render-tests/combinations/circle-translucent--hillshade-translucent/expected.png b/metrics/integration/render-tests/combinations/circle-translucent--hillshade-translucent/expected.png new file mode 100644 index 00000000000..03de68ff92a Binary files /dev/null and b/metrics/integration/render-tests/combinations/circle-translucent--hillshade-translucent/expected.png differ diff --git a/metrics/integration/render-tests/combinations/circle-translucent--hillshade-translucent/style.json b/metrics/integration/render-tests/combinations/circle-translucent--hillshade-translucent/style.json new file mode 100644 index 00000000000..95eef0a30aa --- /dev/null +++ b/metrics/integration/render-tests/combinations/circle-translucent--hillshade-translucent/style.json @@ -0,0 +1,72 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + }, + "hillshade": { + "type": "raster-dem", + "tiles": [ + "local://tiles/{z}-{x}-{y}.terrain.png" + ], + "maxzoom": 15, + "tileSize": 256 + } + }, + "layers": [ + { + "id": "circle-translucent", + "type": "circle", + "source": "geojson", + "paint": { + "circle-color": "red" + } + }, + { + "id": "hillshade-translucent", + "type": "hillshade", + "source": "hillshade", + "paint": { + "hillshade-exaggeration": 1 + } + } + ] +} diff --git a/metrics/integration/render-tests/combinations/circle-translucent--line-translucent/expected.png b/metrics/integration/render-tests/combinations/circle-translucent--line-translucent/expected.png new file mode 100644 index 00000000000..214390efee2 Binary files /dev/null and b/metrics/integration/render-tests/combinations/circle-translucent--line-translucent/expected.png differ diff --git a/metrics/integration/render-tests/combinations/circle-translucent--line-translucent/style.json b/metrics/integration/render-tests/combinations/circle-translucent--line-translucent/style.json new file mode 100644 index 00000000000..a09ddcf671c --- /dev/null +++ b/metrics/integration/render-tests/combinations/circle-translucent--line-translucent/style.json @@ -0,0 +1,64 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "circle-translucent", + "type": "circle", + "source": "geojson", + "paint": { + "circle-color": "red" + } + }, + { + "id": "line-translucent", + "type": "line", + "source": "geojson", + "paint": { + "line-color": "blue" + } + } + ] +} diff --git a/metrics/integration/render-tests/combinations/circle-translucent--raster-translucent/expected.png b/metrics/integration/render-tests/combinations/circle-translucent--raster-translucent/expected.png new file mode 100644 index 00000000000..728dfb208c6 Binary files /dev/null and b/metrics/integration/render-tests/combinations/circle-translucent--raster-translucent/expected.png differ diff --git a/metrics/integration/render-tests/combinations/circle-translucent--raster-translucent/style.json b/metrics/integration/render-tests/combinations/circle-translucent--raster-translucent/style.json new file mode 100644 index 00000000000..9c40e44a263 --- /dev/null +++ b/metrics/integration/render-tests/combinations/circle-translucent--raster-translucent/style.json @@ -0,0 +1,73 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + }, + "satellite": { + "type": "raster", + "tiles": [ + "local://tiles/{z}-{x}-{y}.satellite.png" + ], + "maxzoom": 17, + "tileSize": 256 + } + }, + "layers": [ + { + "id": "circle-translucent", + "type": "circle", + "source": "geojson", + "paint": { + "circle-color": "red" + } + }, + { + "id": "raster-translucent", + "type": "raster", + "source": "satellite", + "paint": { + "raster-fade-duration": 0, + "raster-opacity": 0.9 + } + } + ] +} diff --git a/metrics/integration/render-tests/combinations/circle-translucent--symbol-translucent/expected.png b/metrics/integration/render-tests/combinations/circle-translucent--symbol-translucent/expected.png new file mode 100644 index 00000000000..143af413266 Binary files /dev/null and b/metrics/integration/render-tests/combinations/circle-translucent--symbol-translucent/expected.png differ diff --git a/metrics/integration/render-tests/combinations/circle-translucent--symbol-translucent/style.json b/metrics/integration/render-tests/combinations/circle-translucent--symbol-translucent/style.json new file mode 100644 index 00000000000..d4841f0df73 --- /dev/null +++ b/metrics/integration/render-tests/combinations/circle-translucent--symbol-translucent/style.json @@ -0,0 +1,69 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "circle-translucent", + "type": "circle", + "source": "geojson", + "paint": { + "circle-color": "red" + } + }, + { + "id": "symbol-translucent", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "dot.sdf", + "symbol-placement": "line" + }, + "paint": { + "icon-color": "blue" + } + } + ], + "sprite": "local://sprites/sprite" +} diff --git a/metrics/integration/render-tests/combinations/fill-extrusion--fill-opaque/expected.png b/metrics/integration/render-tests/combinations/fill-extrusion--fill-opaque/expected.png new file mode 100644 index 00000000000..32dc67dd0fd Binary files /dev/null and b/metrics/integration/render-tests/combinations/fill-extrusion--fill-opaque/expected.png differ diff --git a/metrics/integration/render-tests/combinations/fill-extrusion--fill-opaque/style.json b/metrics/integration/render-tests/combinations/fill-extrusion--fill-opaque/style.json new file mode 100644 index 00000000000..ef63e9c3da0 --- /dev/null +++ b/metrics/integration/render-tests/combinations/fill-extrusion--fill-opaque/style.json @@ -0,0 +1,64 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "fill-extrusion-translucent", + "type": "fill-extrusion", + "source": "geojson", + "paint": { + "fill-extrusion-color": "red" + } + }, + { + "id": "fill-opaque", + "type": "fill", + "source": "geojson", + "paint": { + "fill-color": "blue" + } + } + ] +} diff --git a/metrics/integration/render-tests/combinations/fill-extrusion--fill-translucent/expected.png b/metrics/integration/render-tests/combinations/fill-extrusion--fill-translucent/expected.png new file mode 100644 index 00000000000..b37e2ada066 Binary files /dev/null and b/metrics/integration/render-tests/combinations/fill-extrusion--fill-translucent/expected.png differ diff --git a/metrics/integration/render-tests/combinations/fill-extrusion--fill-translucent/style.json b/metrics/integration/render-tests/combinations/fill-extrusion--fill-translucent/style.json new file mode 100644 index 00000000000..ba22d1e0b8d --- /dev/null +++ b/metrics/integration/render-tests/combinations/fill-extrusion--fill-translucent/style.json @@ -0,0 +1,65 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "fill-extrusion-translucent", + "type": "fill-extrusion", + "source": "geojson", + "paint": { + "fill-extrusion-color": "red" + } + }, + { + "id": "fill-translucent", + "type": "fill", + "source": "geojson", + "paint": { + "fill-opacity": 0.5, + "fill-color": "blue" + } + } + ] +} diff --git a/metrics/integration/render-tests/combinations/fill-extrusion-translucent--background-opaque/expected.png b/metrics/integration/render-tests/combinations/fill-extrusion-translucent--background-opaque/expected.png new file mode 100644 index 00000000000..e4138c4b67a Binary files /dev/null and b/metrics/integration/render-tests/combinations/fill-extrusion-translucent--background-opaque/expected.png differ diff --git a/metrics/integration/render-tests/combinations/fill-extrusion-translucent--background-opaque/style.json b/metrics/integration/render-tests/combinations/fill-extrusion-translucent--background-opaque/style.json new file mode 100644 index 00000000000..8881ee46964 --- /dev/null +++ b/metrics/integration/render-tests/combinations/fill-extrusion-translucent--background-opaque/style.json @@ -0,0 +1,63 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "fill-extrusion-translucent", + "type": "fill-extrusion", + "source": "geojson", + "paint": { + "fill-extrusion-color": "red" + } + }, + { + "id": "background-opaque", + "type": "background", + "paint": { + "background-color": "blue" + } + } + ] +} diff --git a/metrics/integration/render-tests/combinations/fill-extrusion-translucent--background-translucent/expected.png b/metrics/integration/render-tests/combinations/fill-extrusion-translucent--background-translucent/expected.png new file mode 100644 index 00000000000..fac8e824573 Binary files /dev/null and b/metrics/integration/render-tests/combinations/fill-extrusion-translucent--background-translucent/expected.png differ diff --git a/metrics/integration/render-tests/combinations/fill-extrusion-translucent--background-translucent/style.json b/metrics/integration/render-tests/combinations/fill-extrusion-translucent--background-translucent/style.json new file mode 100644 index 00000000000..1e6ea8f909b --- /dev/null +++ b/metrics/integration/render-tests/combinations/fill-extrusion-translucent--background-translucent/style.json @@ -0,0 +1,64 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "fill-extrusion-translucent", + "type": "fill-extrusion", + "source": "geojson", + "paint": { + "fill-extrusion-color": "red" + } + }, + { + "id": "background-translucent", + "type": "background", + "paint": { + "background-opacity": 0.5, + "background-color": "blue" + } + } + ] +} diff --git a/metrics/integration/render-tests/combinations/fill-extrusion-translucent--circle-translucent/expected.png b/metrics/integration/render-tests/combinations/fill-extrusion-translucent--circle-translucent/expected.png new file mode 100644 index 00000000000..90e6192cd22 Binary files /dev/null and b/metrics/integration/render-tests/combinations/fill-extrusion-translucent--circle-translucent/expected.png differ diff --git a/metrics/integration/render-tests/combinations/fill-extrusion-translucent--circle-translucent/style.json b/metrics/integration/render-tests/combinations/fill-extrusion-translucent--circle-translucent/style.json new file mode 100644 index 00000000000..96f7f27f5f2 --- /dev/null +++ b/metrics/integration/render-tests/combinations/fill-extrusion-translucent--circle-translucent/style.json @@ -0,0 +1,64 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "fill-extrusion-translucent", + "type": "fill-extrusion", + "source": "geojson", + "paint": { + "fill-extrusion-color": "red" + } + }, + { + "id": "circle-translucent", + "type": "circle", + "source": "geojson", + "paint": { + "circle-color": "blue" + } + } + ] +} diff --git a/metrics/integration/render-tests/combinations/fill-extrusion-translucent--fill-extrusion-translucent/expected.png b/metrics/integration/render-tests/combinations/fill-extrusion-translucent--fill-extrusion-translucent/expected.png new file mode 100644 index 00000000000..48a7ab99e2c Binary files /dev/null and b/metrics/integration/render-tests/combinations/fill-extrusion-translucent--fill-extrusion-translucent/expected.png differ diff --git a/metrics/integration/render-tests/combinations/fill-extrusion-translucent--fill-extrusion-translucent/style.json b/metrics/integration/render-tests/combinations/fill-extrusion-translucent--fill-extrusion-translucent/style.json new file mode 100644 index 00000000000..ced0337a032 --- /dev/null +++ b/metrics/integration/render-tests/combinations/fill-extrusion-translucent--fill-extrusion-translucent/style.json @@ -0,0 +1,64 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "fill-extrusion-translucent", + "type": "fill-extrusion", + "source": "geojson", + "paint": { + "fill-extrusion-color": "red" + } + }, + { + "id": "fill-extrusion-translucent-2", + "type": "fill-extrusion", + "source": "geojson", + "paint": { + "fill-extrusion-color": "blue" + } + } + ] +} diff --git a/metrics/integration/render-tests/combinations/fill-extrusion-translucent--fill-opaque/expected.png b/metrics/integration/render-tests/combinations/fill-extrusion-translucent--fill-opaque/expected.png new file mode 100644 index 00000000000..32dc67dd0fd Binary files /dev/null and b/metrics/integration/render-tests/combinations/fill-extrusion-translucent--fill-opaque/expected.png differ diff --git a/metrics/integration/render-tests/combinations/fill-extrusion-translucent--fill-opaque/style.json b/metrics/integration/render-tests/combinations/fill-extrusion-translucent--fill-opaque/style.json new file mode 100644 index 00000000000..776b6c86944 --- /dev/null +++ b/metrics/integration/render-tests/combinations/fill-extrusion-translucent--fill-opaque/style.json @@ -0,0 +1,65 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "fill-extrusion-translucent", + "type": "fill-extrusion", + "source": "geojson", + "paint": { + "fill-extrusion-opacity": 0.5, + "fill-extrusion-color": "red" + } + }, + { + "id": "fill-opaque", + "type": "fill", + "source": "geojson", + "paint": { + "fill-color": "blue" + } + } + ] +} diff --git a/metrics/integration/render-tests/combinations/fill-extrusion-translucent--fill-translucent/expected.png b/metrics/integration/render-tests/combinations/fill-extrusion-translucent--fill-translucent/expected.png new file mode 100644 index 00000000000..84c0263e05c Binary files /dev/null and b/metrics/integration/render-tests/combinations/fill-extrusion-translucent--fill-translucent/expected.png differ diff --git a/metrics/integration/render-tests/combinations/fill-extrusion-translucent--fill-translucent/style.json b/metrics/integration/render-tests/combinations/fill-extrusion-translucent--fill-translucent/style.json new file mode 100644 index 00000000000..04fe1149d95 --- /dev/null +++ b/metrics/integration/render-tests/combinations/fill-extrusion-translucent--fill-translucent/style.json @@ -0,0 +1,66 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "fill-extrusion-translucent", + "type": "fill-extrusion", + "source": "geojson", + "paint": { + "fill-extrusion-opacity": 0.5, + "fill-extrusion-color": "red" + } + }, + { + "id": "fill-translucent", + "type": "fill", + "source": "geojson", + "paint": { + "fill-opacity": 0.5, + "fill-color": "blue" + } + } + ] +} diff --git a/metrics/integration/render-tests/combinations/fill-extrusion-translucent--heatmap-translucent/expected.png b/metrics/integration/render-tests/combinations/fill-extrusion-translucent--heatmap-translucent/expected.png new file mode 100644 index 00000000000..199d4c36bb8 Binary files /dev/null and b/metrics/integration/render-tests/combinations/fill-extrusion-translucent--heatmap-translucent/expected.png differ diff --git a/metrics/integration/render-tests/combinations/fill-extrusion-translucent--heatmap-translucent/style.json b/metrics/integration/render-tests/combinations/fill-extrusion-translucent--heatmap-translucent/style.json new file mode 100644 index 00000000000..9f51e34a761 --- /dev/null +++ b/metrics/integration/render-tests/combinations/fill-extrusion-translucent--heatmap-translucent/style.json @@ -0,0 +1,64 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "fill-extrusion-translucent", + "type": "fill-extrusion", + "source": "geojson", + "paint": { + "fill-extrusion-color": "red" + } + }, + { + "id": "heatmap-translucent", + "type": "heatmap", + "source": "geojson", + "paint": { + "heatmap-opacity": 0.7 + } + } + ] +} diff --git a/metrics/integration/render-tests/combinations/fill-extrusion-translucent--hillshade-translucent/expected.png b/metrics/integration/render-tests/combinations/fill-extrusion-translucent--hillshade-translucent/expected.png new file mode 100644 index 00000000000..5a1156e613e Binary files /dev/null and b/metrics/integration/render-tests/combinations/fill-extrusion-translucent--hillshade-translucent/expected.png differ diff --git a/metrics/integration/render-tests/combinations/fill-extrusion-translucent--hillshade-translucent/style.json b/metrics/integration/render-tests/combinations/fill-extrusion-translucent--hillshade-translucent/style.json new file mode 100644 index 00000000000..0a5349ae9d6 --- /dev/null +++ b/metrics/integration/render-tests/combinations/fill-extrusion-translucent--hillshade-translucent/style.json @@ -0,0 +1,72 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + }, + "hillshade": { + "type": "raster-dem", + "tiles": [ + "local://tiles/{z}-{x}-{y}.terrain.png" + ], + "maxzoom": 15, + "tileSize": 256 + } + }, + "layers": [ + { + "id": "fill-extrusion-translucent", + "type": "fill-extrusion", + "source": "geojson", + "paint": { + "fill-extrusion-color": "red" + } + }, + { + "id": "hillshade-translucent", + "type": "hillshade", + "source": "hillshade", + "paint": { + "hillshade-exaggeration": 1 + } + } + ] +} diff --git a/metrics/integration/render-tests/combinations/fill-extrusion-translucent--line-translucent/expected.png b/metrics/integration/render-tests/combinations/fill-extrusion-translucent--line-translucent/expected.png new file mode 100644 index 00000000000..b36eb42d74d Binary files /dev/null and b/metrics/integration/render-tests/combinations/fill-extrusion-translucent--line-translucent/expected.png differ diff --git a/metrics/integration/render-tests/combinations/fill-extrusion-translucent--line-translucent/style.json b/metrics/integration/render-tests/combinations/fill-extrusion-translucent--line-translucent/style.json new file mode 100644 index 00000000000..ceafee88b6c --- /dev/null +++ b/metrics/integration/render-tests/combinations/fill-extrusion-translucent--line-translucent/style.json @@ -0,0 +1,64 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "fill-extrusion-translucent", + "type": "fill-extrusion", + "source": "geojson", + "paint": { + "fill-extrusion-color": "red" + } + }, + { + "id": "line-translucent", + "type": "line", + "source": "geojson", + "paint": { + "line-color": "blue" + } + } + ] +} diff --git a/metrics/integration/render-tests/combinations/fill-extrusion-translucent--raster-translucent/expected.png b/metrics/integration/render-tests/combinations/fill-extrusion-translucent--raster-translucent/expected.png new file mode 100644 index 00000000000..9b3c294e35b Binary files /dev/null and b/metrics/integration/render-tests/combinations/fill-extrusion-translucent--raster-translucent/expected.png differ diff --git a/metrics/integration/render-tests/combinations/fill-extrusion-translucent--raster-translucent/style.json b/metrics/integration/render-tests/combinations/fill-extrusion-translucent--raster-translucent/style.json new file mode 100644 index 00000000000..ca0039d21a1 --- /dev/null +++ b/metrics/integration/render-tests/combinations/fill-extrusion-translucent--raster-translucent/style.json @@ -0,0 +1,73 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + }, + "satellite": { + "type": "raster", + "tiles": [ + "local://tiles/{z}-{x}-{y}.satellite.png" + ], + "maxzoom": 17, + "tileSize": 256 + } + }, + "layers": [ + { + "id": "fill-extrusion-translucent", + "type": "fill-extrusion", + "source": "geojson", + "paint": { + "fill-extrusion-color": "red" + } + }, + { + "id": "raster-translucent", + "type": "raster", + "source": "satellite", + "paint": { + "raster-fade-duration": 0, + "raster-opacity": 0.9 + } + } + ] +} diff --git a/metrics/integration/render-tests/combinations/fill-extrusion-translucent--symbol-translucent/expected.png b/metrics/integration/render-tests/combinations/fill-extrusion-translucent--symbol-translucent/expected.png new file mode 100644 index 00000000000..2014383c4a6 Binary files /dev/null and b/metrics/integration/render-tests/combinations/fill-extrusion-translucent--symbol-translucent/expected.png differ diff --git a/metrics/integration/render-tests/combinations/fill-extrusion-translucent--symbol-translucent/style.json b/metrics/integration/render-tests/combinations/fill-extrusion-translucent--symbol-translucent/style.json new file mode 100644 index 00000000000..856ed86ed40 --- /dev/null +++ b/metrics/integration/render-tests/combinations/fill-extrusion-translucent--symbol-translucent/style.json @@ -0,0 +1,69 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "fill-extrusion-translucent", + "type": "fill-extrusion", + "source": "geojson", + "paint": { + "fill-extrusion-color": "red" + } + }, + { + "id": "symbol-translucent", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "dot.sdf", + "symbol-placement": "line" + }, + "paint": { + "icon-color": "blue" + } + } + ], + "sprite": "local://sprites/sprite" +} diff --git a/metrics/integration/render-tests/combinations/fill-opaque--background-opaque/expected.png b/metrics/integration/render-tests/combinations/fill-opaque--background-opaque/expected.png new file mode 100644 index 00000000000..cc46431ca9e Binary files /dev/null and b/metrics/integration/render-tests/combinations/fill-opaque--background-opaque/expected.png differ diff --git a/metrics/integration/render-tests/combinations/fill-opaque--background-opaque/style.json b/metrics/integration/render-tests/combinations/fill-opaque--background-opaque/style.json new file mode 100644 index 00000000000..3211233a482 --- /dev/null +++ b/metrics/integration/render-tests/combinations/fill-opaque--background-opaque/style.json @@ -0,0 +1,63 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "fill-opaque", + "type": "fill", + "source": "geojson", + "paint": { + "fill-color": "red" + } + }, + { + "id": "background-opaque", + "type": "background", + "paint": { + "background-color": "blue" + } + } + ] +} diff --git a/metrics/integration/render-tests/combinations/fill-opaque--background-translucent/expected.png b/metrics/integration/render-tests/combinations/fill-opaque--background-translucent/expected.png new file mode 100644 index 00000000000..72bc1826b0f Binary files /dev/null and b/metrics/integration/render-tests/combinations/fill-opaque--background-translucent/expected.png differ diff --git a/metrics/integration/render-tests/combinations/fill-opaque--background-translucent/style.json b/metrics/integration/render-tests/combinations/fill-opaque--background-translucent/style.json new file mode 100644 index 00000000000..4aba9f603fb --- /dev/null +++ b/metrics/integration/render-tests/combinations/fill-opaque--background-translucent/style.json @@ -0,0 +1,64 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "fill-opaque", + "type": "fill", + "source": "geojson", + "paint": { + "fill-color": "red" + } + }, + { + "id": "background-translucent", + "type": "background", + "paint": { + "background-opacity": 0.5, + "background-color": "blue" + } + } + ] +} diff --git a/metrics/integration/render-tests/combinations/fill-opaque--circle-translucent/expected.png b/metrics/integration/render-tests/combinations/fill-opaque--circle-translucent/expected.png new file mode 100644 index 00000000000..07032a2f424 Binary files /dev/null and b/metrics/integration/render-tests/combinations/fill-opaque--circle-translucent/expected.png differ diff --git a/metrics/integration/render-tests/combinations/fill-opaque--circle-translucent/style.json b/metrics/integration/render-tests/combinations/fill-opaque--circle-translucent/style.json new file mode 100644 index 00000000000..1f909f9b0b6 --- /dev/null +++ b/metrics/integration/render-tests/combinations/fill-opaque--circle-translucent/style.json @@ -0,0 +1,64 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "fill-opaque", + "type": "fill", + "source": "geojson", + "paint": { + "fill-color": "red" + } + }, + { + "id": "circle-translucent", + "type": "circle", + "source": "geojson", + "paint": { + "circle-color": "blue" + } + } + ] +} diff --git a/metrics/integration/render-tests/combinations/fill-opaque--fill-extrusion-translucent/expected.png b/metrics/integration/render-tests/combinations/fill-opaque--fill-extrusion-translucent/expected.png new file mode 100644 index 00000000000..8fc4bbc536f Binary files /dev/null and b/metrics/integration/render-tests/combinations/fill-opaque--fill-extrusion-translucent/expected.png differ diff --git a/metrics/integration/render-tests/combinations/fill-opaque--fill-extrusion-translucent/style.json b/metrics/integration/render-tests/combinations/fill-opaque--fill-extrusion-translucent/style.json new file mode 100644 index 00000000000..c71fa6b581a --- /dev/null +++ b/metrics/integration/render-tests/combinations/fill-opaque--fill-extrusion-translucent/style.json @@ -0,0 +1,64 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "fill-opaque", + "type": "fill", + "source": "geojson", + "paint": { + "fill-color": "red" + } + }, + { + "id": "fill-extrusion-translucent", + "type": "fill-extrusion", + "source": "geojson", + "paint": { + "fill-extrusion-color": "blue" + } + } + ] +} diff --git a/metrics/integration/render-tests/combinations/fill-opaque--fill-opaque/expected.png b/metrics/integration/render-tests/combinations/fill-opaque--fill-opaque/expected.png new file mode 100644 index 00000000000..55993c53c6e Binary files /dev/null and b/metrics/integration/render-tests/combinations/fill-opaque--fill-opaque/expected.png differ diff --git a/metrics/integration/render-tests/combinations/fill-opaque--fill-opaque/style.json b/metrics/integration/render-tests/combinations/fill-opaque--fill-opaque/style.json new file mode 100644 index 00000000000..ef9d5b98638 --- /dev/null +++ b/metrics/integration/render-tests/combinations/fill-opaque--fill-opaque/style.json @@ -0,0 +1,64 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "fill-opaque", + "type": "fill", + "source": "geojson", + "paint": { + "fill-color": "red" + } + }, + { + "id": "fill-opaque-2", + "type": "fill", + "source": "geojson", + "paint": { + "fill-color": "blue" + } + } + ] +} diff --git a/metrics/integration/render-tests/combinations/fill-opaque--fill-translucent/expected.png b/metrics/integration/render-tests/combinations/fill-opaque--fill-translucent/expected.png new file mode 100644 index 00000000000..e7b501c749e Binary files /dev/null and b/metrics/integration/render-tests/combinations/fill-opaque--fill-translucent/expected.png differ diff --git a/metrics/integration/render-tests/combinations/fill-opaque--fill-translucent/style.json b/metrics/integration/render-tests/combinations/fill-opaque--fill-translucent/style.json new file mode 100644 index 00000000000..1208ddd30e7 --- /dev/null +++ b/metrics/integration/render-tests/combinations/fill-opaque--fill-translucent/style.json @@ -0,0 +1,65 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "fill-opaque", + "type": "fill", + "source": "geojson", + "paint": { + "fill-color": "red" + } + }, + { + "id": "fill-translucent", + "type": "fill", + "source": "geojson", + "paint": { + "fill-opacity": 0.5, + "fill-color": "blue" + } + } + ] +} diff --git a/metrics/integration/render-tests/combinations/fill-opaque--heatmap-translucent/expected.png b/metrics/integration/render-tests/combinations/fill-opaque--heatmap-translucent/expected.png new file mode 100644 index 00000000000..bd6babc43ef Binary files /dev/null and b/metrics/integration/render-tests/combinations/fill-opaque--heatmap-translucent/expected.png differ diff --git a/metrics/integration/render-tests/combinations/fill-opaque--heatmap-translucent/style.json b/metrics/integration/render-tests/combinations/fill-opaque--heatmap-translucent/style.json new file mode 100644 index 00000000000..248bec2977a --- /dev/null +++ b/metrics/integration/render-tests/combinations/fill-opaque--heatmap-translucent/style.json @@ -0,0 +1,64 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "fill-opaque", + "type": "fill", + "source": "geojson", + "paint": { + "fill-color": "red" + } + }, + { + "id": "heatmap-translucent", + "type": "heatmap", + "source": "geojson", + "paint": { + "heatmap-opacity": 0.7 + } + } + ] +} diff --git a/metrics/integration/render-tests/combinations/fill-opaque--hillshade-translucent/expected.png b/metrics/integration/render-tests/combinations/fill-opaque--hillshade-translucent/expected.png new file mode 100644 index 00000000000..3436dbf8815 Binary files /dev/null and b/metrics/integration/render-tests/combinations/fill-opaque--hillshade-translucent/expected.png differ diff --git a/metrics/integration/render-tests/combinations/fill-opaque--hillshade-translucent/style.json b/metrics/integration/render-tests/combinations/fill-opaque--hillshade-translucent/style.json new file mode 100644 index 00000000000..4636606b968 --- /dev/null +++ b/metrics/integration/render-tests/combinations/fill-opaque--hillshade-translucent/style.json @@ -0,0 +1,72 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + }, + "hillshade": { + "type": "raster-dem", + "tiles": [ + "local://tiles/{z}-{x}-{y}.terrain.png" + ], + "maxzoom": 15, + "tileSize": 256 + } + }, + "layers": [ + { + "id": "fill-opaque", + "type": "fill", + "source": "geojson", + "paint": { + "fill-color": "red" + } + }, + { + "id": "hillshade-translucent", + "type": "hillshade", + "source": "hillshade", + "paint": { + "hillshade-exaggeration": 1 + } + } + ] +} diff --git a/metrics/integration/render-tests/combinations/fill-opaque--line-translucent/expected.png b/metrics/integration/render-tests/combinations/fill-opaque--line-translucent/expected.png new file mode 100644 index 00000000000..bd32eca520c Binary files /dev/null and b/metrics/integration/render-tests/combinations/fill-opaque--line-translucent/expected.png differ diff --git a/metrics/integration/render-tests/combinations/fill-opaque--line-translucent/style.json b/metrics/integration/render-tests/combinations/fill-opaque--line-translucent/style.json new file mode 100644 index 00000000000..85df58cba88 --- /dev/null +++ b/metrics/integration/render-tests/combinations/fill-opaque--line-translucent/style.json @@ -0,0 +1,64 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "fill-opaque", + "type": "fill", + "source": "geojson", + "paint": { + "fill-color": "red" + } + }, + { + "id": "line-translucent", + "type": "line", + "source": "geojson", + "paint": { + "line-color": "blue" + } + } + ] +} diff --git a/metrics/integration/render-tests/combinations/fill-opaque--raster-translucent/expected.png b/metrics/integration/render-tests/combinations/fill-opaque--raster-translucent/expected.png new file mode 100644 index 00000000000..1aa7208bb26 Binary files /dev/null and b/metrics/integration/render-tests/combinations/fill-opaque--raster-translucent/expected.png differ diff --git a/metrics/integration/render-tests/combinations/fill-opaque--raster-translucent/style.json b/metrics/integration/render-tests/combinations/fill-opaque--raster-translucent/style.json new file mode 100644 index 00000000000..9015d251994 --- /dev/null +++ b/metrics/integration/render-tests/combinations/fill-opaque--raster-translucent/style.json @@ -0,0 +1,73 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + }, + "satellite": { + "type": "raster", + "tiles": [ + "local://tiles/{z}-{x}-{y}.satellite.png" + ], + "maxzoom": 17, + "tileSize": 256 + } + }, + "layers": [ + { + "id": "fill-opaque", + "type": "fill", + "source": "geojson", + "paint": { + "fill-color": "red" + } + }, + { + "id": "raster-translucent", + "type": "raster", + "source": "satellite", + "paint": { + "raster-fade-duration": 0, + "raster-opacity": 0.9 + } + } + ] +} diff --git a/metrics/integration/render-tests/combinations/fill-opaque--symbol-translucent/expected.png b/metrics/integration/render-tests/combinations/fill-opaque--symbol-translucent/expected.png new file mode 100644 index 00000000000..d177cb01e06 Binary files /dev/null and b/metrics/integration/render-tests/combinations/fill-opaque--symbol-translucent/expected.png differ diff --git a/metrics/integration/render-tests/combinations/fill-opaque--symbol-translucent/style.json b/metrics/integration/render-tests/combinations/fill-opaque--symbol-translucent/style.json new file mode 100644 index 00000000000..5378de14a1f --- /dev/null +++ b/metrics/integration/render-tests/combinations/fill-opaque--symbol-translucent/style.json @@ -0,0 +1,69 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "fill-opaque", + "type": "fill", + "source": "geojson", + "paint": { + "fill-color": "red" + } + }, + { + "id": "symbol-translucent", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "dot.sdf", + "symbol-placement": "line" + }, + "paint": { + "icon-color": "blue" + } + } + ], + "sprite": "local://sprites/sprite" +} diff --git a/metrics/integration/render-tests/combinations/fill-translucent--background-opaque/expected.png b/metrics/integration/render-tests/combinations/fill-translucent--background-opaque/expected.png new file mode 100644 index 00000000000..cc46431ca9e Binary files /dev/null and b/metrics/integration/render-tests/combinations/fill-translucent--background-opaque/expected.png differ diff --git a/metrics/integration/render-tests/combinations/fill-translucent--background-opaque/style.json b/metrics/integration/render-tests/combinations/fill-translucent--background-opaque/style.json new file mode 100644 index 00000000000..cd9413bfb21 --- /dev/null +++ b/metrics/integration/render-tests/combinations/fill-translucent--background-opaque/style.json @@ -0,0 +1,64 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "fill-translucent", + "type": "fill", + "source": "geojson", + "paint": { + "fill-opacity": 0.5, + "fill-color": "red" + } + }, + { + "id": "background-opaque", + "type": "background", + "paint": { + "background-color": "blue" + } + } + ] +} diff --git a/metrics/integration/render-tests/combinations/fill-translucent--background-translucent/expected.png b/metrics/integration/render-tests/combinations/fill-translucent--background-translucent/expected.png new file mode 100644 index 00000000000..52f2312c2a0 Binary files /dev/null and b/metrics/integration/render-tests/combinations/fill-translucent--background-translucent/expected.png differ diff --git a/metrics/integration/render-tests/combinations/fill-translucent--background-translucent/style.json b/metrics/integration/render-tests/combinations/fill-translucent--background-translucent/style.json new file mode 100644 index 00000000000..df903bf5bd0 --- /dev/null +++ b/metrics/integration/render-tests/combinations/fill-translucent--background-translucent/style.json @@ -0,0 +1,65 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "fill-translucent", + "type": "fill", + "source": "geojson", + "paint": { + "fill-opacity": 0.5, + "fill-color": "red" + } + }, + { + "id": "background-translucent", + "type": "background", + "paint": { + "background-opacity": 0.5, + "background-color": "blue" + } + } + ] +} diff --git a/metrics/integration/render-tests/combinations/fill-translucent--circle-translucent/expected.png b/metrics/integration/render-tests/combinations/fill-translucent--circle-translucent/expected.png new file mode 100644 index 00000000000..aa25dab6e96 Binary files /dev/null and b/metrics/integration/render-tests/combinations/fill-translucent--circle-translucent/expected.png differ diff --git a/metrics/integration/render-tests/combinations/fill-translucent--circle-translucent/style.json b/metrics/integration/render-tests/combinations/fill-translucent--circle-translucent/style.json new file mode 100644 index 00000000000..9608ec608af --- /dev/null +++ b/metrics/integration/render-tests/combinations/fill-translucent--circle-translucent/style.json @@ -0,0 +1,65 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "fill-translucent", + "type": "fill", + "source": "geojson", + "paint": { + "fill-opacity": 0.5, + "fill-color": "red" + } + }, + { + "id": "circle-translucent", + "type": "circle", + "source": "geojson", + "paint": { + "circle-color": "blue" + } + } + ] +} diff --git a/metrics/integration/render-tests/combinations/fill-translucent--fill-extrusion-translucent/expected.png b/metrics/integration/render-tests/combinations/fill-translucent--fill-extrusion-translucent/expected.png new file mode 100644 index 00000000000..4fa6f1ca78d Binary files /dev/null and b/metrics/integration/render-tests/combinations/fill-translucent--fill-extrusion-translucent/expected.png differ diff --git a/metrics/integration/render-tests/combinations/fill-translucent--fill-extrusion-translucent/style.json b/metrics/integration/render-tests/combinations/fill-translucent--fill-extrusion-translucent/style.json new file mode 100644 index 00000000000..4b4d8b25285 --- /dev/null +++ b/metrics/integration/render-tests/combinations/fill-translucent--fill-extrusion-translucent/style.json @@ -0,0 +1,65 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "fill-translucent", + "type": "fill", + "source": "geojson", + "paint": { + "fill-opacity": 0.5, + "fill-color": "red" + } + }, + { + "id": "fill-extrusion-translucent", + "type": "fill-extrusion", + "source": "geojson", + "paint": { + "fill-extrusion-color": "blue" + } + } + ] +} diff --git a/metrics/integration/render-tests/combinations/fill-translucent--fill-opaque/expected.png b/metrics/integration/render-tests/combinations/fill-translucent--fill-opaque/expected.png new file mode 100644 index 00000000000..2848ca97938 Binary files /dev/null and b/metrics/integration/render-tests/combinations/fill-translucent--fill-opaque/expected.png differ diff --git a/metrics/integration/render-tests/combinations/fill-translucent--fill-opaque/style.json b/metrics/integration/render-tests/combinations/fill-translucent--fill-opaque/style.json new file mode 100644 index 00000000000..bc5c7b16002 --- /dev/null +++ b/metrics/integration/render-tests/combinations/fill-translucent--fill-opaque/style.json @@ -0,0 +1,65 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "fill-translucent", + "type": "fill", + "source": "geojson", + "paint": { + "fill-opacity": 0.5, + "fill-color": "red" + } + }, + { + "id": "fill-opaque", + "type": "fill", + "source": "geojson", + "paint": { + "fill-color": "blue" + } + } + ] +} diff --git a/metrics/integration/render-tests/combinations/fill-translucent--fill-translucent/expected.png b/metrics/integration/render-tests/combinations/fill-translucent--fill-translucent/expected.png new file mode 100644 index 00000000000..2473cf05472 Binary files /dev/null and b/metrics/integration/render-tests/combinations/fill-translucent--fill-translucent/expected.png differ diff --git a/metrics/integration/render-tests/combinations/fill-translucent--fill-translucent/style.json b/metrics/integration/render-tests/combinations/fill-translucent--fill-translucent/style.json new file mode 100644 index 00000000000..86ecacaa8e4 --- /dev/null +++ b/metrics/integration/render-tests/combinations/fill-translucent--fill-translucent/style.json @@ -0,0 +1,66 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "fill-translucent", + "type": "fill", + "source": "geojson", + "paint": { + "fill-opacity": 0.5, + "fill-color": "red" + } + }, + { + "id": "fill-translucent-2", + "type": "fill", + "source": "geojson", + "paint": { + "fill-opacity": 0.5, + "fill-color": "blue" + } + } + ] +} diff --git a/metrics/integration/render-tests/combinations/fill-translucent--heatmap-translucent/expected.png b/metrics/integration/render-tests/combinations/fill-translucent--heatmap-translucent/expected.png new file mode 100644 index 00000000000..9b5a9f37b43 Binary files /dev/null and b/metrics/integration/render-tests/combinations/fill-translucent--heatmap-translucent/expected.png differ diff --git a/metrics/integration/render-tests/combinations/fill-translucent--heatmap-translucent/style.json b/metrics/integration/render-tests/combinations/fill-translucent--heatmap-translucent/style.json new file mode 100644 index 00000000000..38382a2b225 --- /dev/null +++ b/metrics/integration/render-tests/combinations/fill-translucent--heatmap-translucent/style.json @@ -0,0 +1,65 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "fill-translucent", + "type": "fill", + "source": "geojson", + "paint": { + "fill-opacity": 0.5, + "fill-color": "red" + } + }, + { + "id": "heatmap-translucent", + "type": "heatmap", + "source": "geojson", + "paint": { + "heatmap-opacity": 0.7 + } + } + ] +} diff --git a/metrics/integration/render-tests/combinations/fill-translucent--hillshade-translucent/expected.png b/metrics/integration/render-tests/combinations/fill-translucent--hillshade-translucent/expected.png new file mode 100644 index 00000000000..972fd89aa43 Binary files /dev/null and b/metrics/integration/render-tests/combinations/fill-translucent--hillshade-translucent/expected.png differ diff --git a/metrics/integration/render-tests/combinations/fill-translucent--hillshade-translucent/style.json b/metrics/integration/render-tests/combinations/fill-translucent--hillshade-translucent/style.json new file mode 100644 index 00000000000..d3d62603b6e --- /dev/null +++ b/metrics/integration/render-tests/combinations/fill-translucent--hillshade-translucent/style.json @@ -0,0 +1,73 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + }, + "hillshade": { + "type": "raster-dem", + "tiles": [ + "local://tiles/{z}-{x}-{y}.terrain.png" + ], + "maxzoom": 15, + "tileSize": 256 + } + }, + "layers": [ + { + "id": "fill-translucent", + "type": "fill", + "source": "geojson", + "paint": { + "fill-opacity": 0.5, + "fill-color": "red" + } + }, + { + "id": "hillshade-translucent", + "type": "hillshade", + "source": "hillshade", + "paint": { + "hillshade-exaggeration": 1 + } + } + ] +} diff --git a/metrics/integration/render-tests/combinations/fill-translucent--line-translucent/expected.png b/metrics/integration/render-tests/combinations/fill-translucent--line-translucent/expected.png new file mode 100644 index 00000000000..2dffea0877b Binary files /dev/null and b/metrics/integration/render-tests/combinations/fill-translucent--line-translucent/expected.png differ diff --git a/metrics/integration/render-tests/combinations/fill-translucent--line-translucent/style.json b/metrics/integration/render-tests/combinations/fill-translucent--line-translucent/style.json new file mode 100644 index 00000000000..d21bd96f07f --- /dev/null +++ b/metrics/integration/render-tests/combinations/fill-translucent--line-translucent/style.json @@ -0,0 +1,65 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "fill-translucent", + "type": "fill", + "source": "geojson", + "paint": { + "fill-opacity": 0.5, + "fill-color": "red" + } + }, + { + "id": "line-translucent", + "type": "line", + "source": "geojson", + "paint": { + "line-color": "blue" + } + } + ] +} diff --git a/metrics/integration/render-tests/combinations/fill-translucent--raster-translucent/expected.png b/metrics/integration/render-tests/combinations/fill-translucent--raster-translucent/expected.png new file mode 100644 index 00000000000..8f7677a41ac Binary files /dev/null and b/metrics/integration/render-tests/combinations/fill-translucent--raster-translucent/expected.png differ diff --git a/metrics/integration/render-tests/combinations/fill-translucent--raster-translucent/style.json b/metrics/integration/render-tests/combinations/fill-translucent--raster-translucent/style.json new file mode 100644 index 00000000000..0fdf44f1f75 --- /dev/null +++ b/metrics/integration/render-tests/combinations/fill-translucent--raster-translucent/style.json @@ -0,0 +1,74 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + }, + "satellite": { + "type": "raster", + "tiles": [ + "local://tiles/{z}-{x}-{y}.satellite.png" + ], + "maxzoom": 17, + "tileSize": 256 + } + }, + "layers": [ + { + "id": "fill-translucent", + "type": "fill", + "source": "geojson", + "paint": { + "fill-opacity": 0.5, + "fill-color": "red" + } + }, + { + "id": "raster-translucent", + "type": "raster", + "source": "satellite", + "paint": { + "raster-fade-duration": 0, + "raster-opacity": 0.9 + } + } + ] +} diff --git a/metrics/integration/render-tests/combinations/fill-translucent--symbol-translucent/expected.png b/metrics/integration/render-tests/combinations/fill-translucent--symbol-translucent/expected.png new file mode 100644 index 00000000000..6ea149d0a00 Binary files /dev/null and b/metrics/integration/render-tests/combinations/fill-translucent--symbol-translucent/expected.png differ diff --git a/metrics/integration/render-tests/combinations/fill-translucent--symbol-translucent/style.json b/metrics/integration/render-tests/combinations/fill-translucent--symbol-translucent/style.json new file mode 100644 index 00000000000..02ce2ca3747 --- /dev/null +++ b/metrics/integration/render-tests/combinations/fill-translucent--symbol-translucent/style.json @@ -0,0 +1,70 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "fill-translucent", + "type": "fill", + "source": "geojson", + "paint": { + "fill-opacity": 0.5, + "fill-color": "red" + } + }, + { + "id": "symbol-translucent", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "dot.sdf", + "symbol-placement": "line" + }, + "paint": { + "icon-color": "blue" + } + } + ], + "sprite": "local://sprites/sprite" +} diff --git a/metrics/integration/render-tests/combinations/heatmap-translucent--background-opaque/expected.png b/metrics/integration/render-tests/combinations/heatmap-translucent--background-opaque/expected.png new file mode 100644 index 00000000000..93ff6561c8d Binary files /dev/null and b/metrics/integration/render-tests/combinations/heatmap-translucent--background-opaque/expected.png differ diff --git a/metrics/integration/render-tests/combinations/heatmap-translucent--background-opaque/style.json b/metrics/integration/render-tests/combinations/heatmap-translucent--background-opaque/style.json new file mode 100644 index 00000000000..508ae2f3661 --- /dev/null +++ b/metrics/integration/render-tests/combinations/heatmap-translucent--background-opaque/style.json @@ -0,0 +1,63 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "heatmap-translucent", + "type": "heatmap", + "source": "geojson", + "paint": { + "heatmap-opacity": 0.7 + } + }, + { + "id": "background-opaque", + "type": "background", + "paint": { + "background-color": "blue" + } + } + ] +} diff --git a/metrics/integration/render-tests/combinations/heatmap-translucent--background-translucent/expected.png b/metrics/integration/render-tests/combinations/heatmap-translucent--background-translucent/expected.png new file mode 100644 index 00000000000..799621c75c2 Binary files /dev/null and b/metrics/integration/render-tests/combinations/heatmap-translucent--background-translucent/expected.png differ diff --git a/metrics/integration/render-tests/combinations/heatmap-translucent--background-translucent/style.json b/metrics/integration/render-tests/combinations/heatmap-translucent--background-translucent/style.json new file mode 100644 index 00000000000..aef2a688489 --- /dev/null +++ b/metrics/integration/render-tests/combinations/heatmap-translucent--background-translucent/style.json @@ -0,0 +1,64 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "heatmap-translucent", + "type": "heatmap", + "source": "geojson", + "paint": { + "heatmap-opacity": 0.7 + } + }, + { + "id": "background-translucent", + "type": "background", + "paint": { + "background-opacity": 0.5, + "background-color": "blue" + } + } + ] +} diff --git a/metrics/integration/render-tests/combinations/heatmap-translucent--circle-translucent/expected.png b/metrics/integration/render-tests/combinations/heatmap-translucent--circle-translucent/expected.png new file mode 100644 index 00000000000..07817e81349 Binary files /dev/null and b/metrics/integration/render-tests/combinations/heatmap-translucent--circle-translucent/expected.png differ diff --git a/metrics/integration/render-tests/combinations/heatmap-translucent--circle-translucent/style.json b/metrics/integration/render-tests/combinations/heatmap-translucent--circle-translucent/style.json new file mode 100644 index 00000000000..5908b345b5b --- /dev/null +++ b/metrics/integration/render-tests/combinations/heatmap-translucent--circle-translucent/style.json @@ -0,0 +1,64 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "heatmap-translucent", + "type": "heatmap", + "source": "geojson", + "paint": { + "heatmap-opacity": 0.7 + } + }, + { + "id": "circle-translucent", + "type": "circle", + "source": "geojson", + "paint": { + "circle-color": "blue" + } + } + ] +} diff --git a/metrics/integration/render-tests/combinations/heatmap-translucent--fill-extrusion-translucent/expected.png b/metrics/integration/render-tests/combinations/heatmap-translucent--fill-extrusion-translucent/expected.png new file mode 100644 index 00000000000..77d6cd6aa28 Binary files /dev/null and b/metrics/integration/render-tests/combinations/heatmap-translucent--fill-extrusion-translucent/expected.png differ diff --git a/metrics/integration/render-tests/combinations/heatmap-translucent--fill-extrusion-translucent/style.json b/metrics/integration/render-tests/combinations/heatmap-translucent--fill-extrusion-translucent/style.json new file mode 100644 index 00000000000..9de3098e541 --- /dev/null +++ b/metrics/integration/render-tests/combinations/heatmap-translucent--fill-extrusion-translucent/style.json @@ -0,0 +1,64 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "heatmap-translucent", + "type": "heatmap", + "source": "geojson", + "paint": { + "heatmap-opacity": 0.7 + } + }, + { + "id": "fill-extrusion-translucent", + "type": "fill-extrusion", + "source": "geojson", + "paint": { + "fill-extrusion-color": "blue" + } + } + ] +} diff --git a/metrics/integration/render-tests/combinations/heatmap-translucent--fill-opaque/expected.png b/metrics/integration/render-tests/combinations/heatmap-translucent--fill-opaque/expected.png new file mode 100644 index 00000000000..56ba77a3dad Binary files /dev/null and b/metrics/integration/render-tests/combinations/heatmap-translucent--fill-opaque/expected.png differ diff --git a/metrics/integration/render-tests/combinations/heatmap-translucent--fill-opaque/style.json b/metrics/integration/render-tests/combinations/heatmap-translucent--fill-opaque/style.json new file mode 100644 index 00000000000..073955047f8 --- /dev/null +++ b/metrics/integration/render-tests/combinations/heatmap-translucent--fill-opaque/style.json @@ -0,0 +1,64 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "heatmap-translucent", + "type": "heatmap", + "source": "geojson", + "paint": { + "heatmap-opacity": 0.7 + } + }, + { + "id": "fill-opaque", + "type": "fill", + "source": "geojson", + "paint": { + "fill-color": "blue" + } + } + ] +} diff --git a/metrics/integration/render-tests/combinations/heatmap-translucent--fill-translucent/expected.png b/metrics/integration/render-tests/combinations/heatmap-translucent--fill-translucent/expected.png new file mode 100644 index 00000000000..cdbab406bed Binary files /dev/null and b/metrics/integration/render-tests/combinations/heatmap-translucent--fill-translucent/expected.png differ diff --git a/metrics/integration/render-tests/combinations/heatmap-translucent--fill-translucent/style.json b/metrics/integration/render-tests/combinations/heatmap-translucent--fill-translucent/style.json new file mode 100644 index 00000000000..0863f0426be --- /dev/null +++ b/metrics/integration/render-tests/combinations/heatmap-translucent--fill-translucent/style.json @@ -0,0 +1,65 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "heatmap-translucent", + "type": "heatmap", + "source": "geojson", + "paint": { + "heatmap-opacity": 0.7 + } + }, + { + "id": "fill-translucent", + "type": "fill", + "source": "geojson", + "paint": { + "fill-opacity": 0.5, + "fill-color": "blue" + } + } + ] +} diff --git a/metrics/integration/render-tests/combinations/heatmap-translucent--heatmap-translucent/expected.png b/metrics/integration/render-tests/combinations/heatmap-translucent--heatmap-translucent/expected.png new file mode 100644 index 00000000000..3da0032ebaa Binary files /dev/null and b/metrics/integration/render-tests/combinations/heatmap-translucent--heatmap-translucent/expected.png differ diff --git a/metrics/integration/render-tests/combinations/heatmap-translucent--heatmap-translucent/style.json b/metrics/integration/render-tests/combinations/heatmap-translucent--heatmap-translucent/style.json new file mode 100644 index 00000000000..eba75a41691 --- /dev/null +++ b/metrics/integration/render-tests/combinations/heatmap-translucent--heatmap-translucent/style.json @@ -0,0 +1,64 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "heatmap-translucent", + "type": "heatmap", + "source": "geojson", + "paint": { + "heatmap-opacity": 0.7 + } + }, + { + "id": "heatmap-translucent-2", + "type": "heatmap", + "source": "geojson", + "paint": { + "heatmap-opacity": 0.7 + } + } + ] +} diff --git a/metrics/integration/render-tests/combinations/heatmap-translucent--hillshade-translucent/expected.png b/metrics/integration/render-tests/combinations/heatmap-translucent--hillshade-translucent/expected.png new file mode 100644 index 00000000000..676c218d03e Binary files /dev/null and b/metrics/integration/render-tests/combinations/heatmap-translucent--hillshade-translucent/expected.png differ diff --git a/metrics/integration/render-tests/combinations/heatmap-translucent--hillshade-translucent/style.json b/metrics/integration/render-tests/combinations/heatmap-translucent--hillshade-translucent/style.json new file mode 100644 index 00000000000..f0c10ee5964 --- /dev/null +++ b/metrics/integration/render-tests/combinations/heatmap-translucent--hillshade-translucent/style.json @@ -0,0 +1,72 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + }, + "hillshade": { + "type": "raster-dem", + "tiles": [ + "local://tiles/{z}-{x}-{y}.terrain.png" + ], + "maxzoom": 15, + "tileSize": 256 + } + }, + "layers": [ + { + "id": "heatmap-translucent", + "type": "heatmap", + "source": "geojson", + "paint": { + "heatmap-opacity": 0.7 + } + }, + { + "id": "hillshade-translucent", + "type": "hillshade", + "source": "hillshade", + "paint": { + "hillshade-exaggeration": 1 + } + } + ] +} diff --git a/metrics/integration/render-tests/combinations/heatmap-translucent--line-translucent/expected.png b/metrics/integration/render-tests/combinations/heatmap-translucent--line-translucent/expected.png new file mode 100644 index 00000000000..df9e290727c Binary files /dev/null and b/metrics/integration/render-tests/combinations/heatmap-translucent--line-translucent/expected.png differ diff --git a/metrics/integration/render-tests/combinations/heatmap-translucent--line-translucent/style.json b/metrics/integration/render-tests/combinations/heatmap-translucent--line-translucent/style.json new file mode 100644 index 00000000000..75ab014d95a --- /dev/null +++ b/metrics/integration/render-tests/combinations/heatmap-translucent--line-translucent/style.json @@ -0,0 +1,64 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "heatmap-translucent", + "type": "heatmap", + "source": "geojson", + "paint": { + "heatmap-opacity": 0.7 + } + }, + { + "id": "line-translucent", + "type": "line", + "source": "geojson", + "paint": { + "line-color": "blue" + } + } + ] +} diff --git a/metrics/integration/render-tests/combinations/heatmap-translucent--raster-translucent/expected.png b/metrics/integration/render-tests/combinations/heatmap-translucent--raster-translucent/expected.png new file mode 100644 index 00000000000..61c06c74445 Binary files /dev/null and b/metrics/integration/render-tests/combinations/heatmap-translucent--raster-translucent/expected.png differ diff --git a/metrics/integration/render-tests/combinations/heatmap-translucent--raster-translucent/style.json b/metrics/integration/render-tests/combinations/heatmap-translucent--raster-translucent/style.json new file mode 100644 index 00000000000..ea34ec52424 --- /dev/null +++ b/metrics/integration/render-tests/combinations/heatmap-translucent--raster-translucent/style.json @@ -0,0 +1,73 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + }, + "satellite": { + "type": "raster", + "tiles": [ + "local://tiles/{z}-{x}-{y}.satellite.png" + ], + "maxzoom": 17, + "tileSize": 256 + } + }, + "layers": [ + { + "id": "heatmap-translucent", + "type": "heatmap", + "source": "geojson", + "paint": { + "heatmap-opacity": 0.7 + } + }, + { + "id": "raster-translucent", + "type": "raster", + "source": "satellite", + "paint": { + "raster-fade-duration": 0, + "raster-opacity": 0.9 + } + } + ] +} diff --git a/metrics/integration/render-tests/combinations/heatmap-translucent--symbol-translucent/expected.png b/metrics/integration/render-tests/combinations/heatmap-translucent--symbol-translucent/expected.png new file mode 100644 index 00000000000..037eb3365cd Binary files /dev/null and b/metrics/integration/render-tests/combinations/heatmap-translucent--symbol-translucent/expected.png differ diff --git a/metrics/integration/render-tests/combinations/heatmap-translucent--symbol-translucent/style.json b/metrics/integration/render-tests/combinations/heatmap-translucent--symbol-translucent/style.json new file mode 100644 index 00000000000..85dfc3ca7ee --- /dev/null +++ b/metrics/integration/render-tests/combinations/heatmap-translucent--symbol-translucent/style.json @@ -0,0 +1,69 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "heatmap-translucent", + "type": "heatmap", + "source": "geojson", + "paint": { + "heatmap-opacity": 0.7 + } + }, + { + "id": "symbol-translucent", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "dot.sdf", + "symbol-placement": "line" + }, + "paint": { + "icon-color": "blue" + } + } + ], + "sprite": "local://sprites/sprite" +} diff --git a/metrics/integration/render-tests/combinations/hillshade-translucent--background-opaque/expected.png b/metrics/integration/render-tests/combinations/hillshade-translucent--background-opaque/expected.png new file mode 100644 index 00000000000..cc46431ca9e Binary files /dev/null and b/metrics/integration/render-tests/combinations/hillshade-translucent--background-opaque/expected.png differ diff --git a/metrics/integration/render-tests/combinations/hillshade-translucent--background-opaque/style.json b/metrics/integration/render-tests/combinations/hillshade-translucent--background-opaque/style.json new file mode 100644 index 00000000000..42dbb8d18b4 --- /dev/null +++ b/metrics/integration/render-tests/combinations/hillshade-translucent--background-opaque/style.json @@ -0,0 +1,41 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "hillshade": { + "type": "raster-dem", + "tiles": [ + "local://tiles/{z}-{x}-{y}.terrain.png" + ], + "maxzoom": 15, + "tileSize": 256 + } + }, + "layers": [ + { + "id": "hillshade-translucent", + "type": "hillshade", + "source": "hillshade", + "paint": { + "hillshade-exaggeration": 1 + } + }, + { + "id": "background-opaque", + "type": "background", + "paint": { + "background-color": "blue" + } + } + ] +} diff --git a/metrics/integration/render-tests/combinations/hillshade-translucent--background-translucent/expected.png b/metrics/integration/render-tests/combinations/hillshade-translucent--background-translucent/expected.png new file mode 100644 index 00000000000..528dd2068bb Binary files /dev/null and b/metrics/integration/render-tests/combinations/hillshade-translucent--background-translucent/expected.png differ diff --git a/metrics/integration/render-tests/combinations/hillshade-translucent--background-translucent/style.json b/metrics/integration/render-tests/combinations/hillshade-translucent--background-translucent/style.json new file mode 100644 index 00000000000..9d8f53fce4b --- /dev/null +++ b/metrics/integration/render-tests/combinations/hillshade-translucent--background-translucent/style.json @@ -0,0 +1,42 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "hillshade": { + "type": "raster-dem", + "tiles": [ + "local://tiles/{z}-{x}-{y}.terrain.png" + ], + "maxzoom": 15, + "tileSize": 256 + } + }, + "layers": [ + { + "id": "hillshade-translucent", + "type": "hillshade", + "source": "hillshade", + "paint": { + "hillshade-exaggeration": 1 + } + }, + { + "id": "background-translucent", + "type": "background", + "paint": { + "background-opacity": 0.5, + "background-color": "blue" + } + } + ] +} diff --git a/metrics/integration/render-tests/combinations/hillshade-translucent--circle-translucent/expected.png b/metrics/integration/render-tests/combinations/hillshade-translucent--circle-translucent/expected.png new file mode 100644 index 00000000000..c81841e9850 Binary files /dev/null and b/metrics/integration/render-tests/combinations/hillshade-translucent--circle-translucent/expected.png differ diff --git a/metrics/integration/render-tests/combinations/hillshade-translucent--circle-translucent/style.json b/metrics/integration/render-tests/combinations/hillshade-translucent--circle-translucent/style.json new file mode 100644 index 00000000000..20c0febc18c --- /dev/null +++ b/metrics/integration/render-tests/combinations/hillshade-translucent--circle-translucent/style.json @@ -0,0 +1,72 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "hillshade": { + "type": "raster-dem", + "tiles": [ + "local://tiles/{z}-{x}-{y}.terrain.png" + ], + "maxzoom": 15, + "tileSize": 256 + }, + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "hillshade-translucent", + "type": "hillshade", + "source": "hillshade", + "paint": { + "hillshade-exaggeration": 1 + } + }, + { + "id": "circle-translucent", + "type": "circle", + "source": "geojson", + "paint": { + "circle-color": "blue" + } + } + ] +} diff --git a/metrics/integration/render-tests/combinations/hillshade-translucent--fill-extrusion-translucent/expected.png b/metrics/integration/render-tests/combinations/hillshade-translucent--fill-extrusion-translucent/expected.png new file mode 100644 index 00000000000..09e61093406 Binary files /dev/null and b/metrics/integration/render-tests/combinations/hillshade-translucent--fill-extrusion-translucent/expected.png differ diff --git a/metrics/integration/render-tests/combinations/hillshade-translucent--fill-extrusion-translucent/style.json b/metrics/integration/render-tests/combinations/hillshade-translucent--fill-extrusion-translucent/style.json new file mode 100644 index 00000000000..e27a82b7742 --- /dev/null +++ b/metrics/integration/render-tests/combinations/hillshade-translucent--fill-extrusion-translucent/style.json @@ -0,0 +1,72 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "hillshade": { + "type": "raster-dem", + "tiles": [ + "local://tiles/{z}-{x}-{y}.terrain.png" + ], + "maxzoom": 15, + "tileSize": 256 + }, + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "hillshade-translucent", + "type": "hillshade", + "source": "hillshade", + "paint": { + "hillshade-exaggeration": 1 + } + }, + { + "id": "fill-extrusion-translucent", + "type": "fill-extrusion", + "source": "geojson", + "paint": { + "fill-extrusion-color": "blue" + } + } + ] +} diff --git a/metrics/integration/render-tests/combinations/hillshade-translucent--fill-opaque/expected.png b/metrics/integration/render-tests/combinations/hillshade-translucent--fill-opaque/expected.png new file mode 100644 index 00000000000..987ac0bdda6 Binary files /dev/null and b/metrics/integration/render-tests/combinations/hillshade-translucent--fill-opaque/expected.png differ diff --git a/metrics/integration/render-tests/combinations/hillshade-translucent--fill-opaque/style.json b/metrics/integration/render-tests/combinations/hillshade-translucent--fill-opaque/style.json new file mode 100644 index 00000000000..d741e845901 --- /dev/null +++ b/metrics/integration/render-tests/combinations/hillshade-translucent--fill-opaque/style.json @@ -0,0 +1,72 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "hillshade": { + "type": "raster-dem", + "tiles": [ + "local://tiles/{z}-{x}-{y}.terrain.png" + ], + "maxzoom": 15, + "tileSize": 256 + }, + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "hillshade-translucent", + "type": "hillshade", + "source": "hillshade", + "paint": { + "hillshade-exaggeration": 1 + } + }, + { + "id": "fill-opaque", + "type": "fill", + "source": "geojson", + "paint": { + "fill-color": "blue" + } + } + ] +} diff --git a/metrics/integration/render-tests/combinations/hillshade-translucent--fill-translucent/expected.png b/metrics/integration/render-tests/combinations/hillshade-translucent--fill-translucent/expected.png new file mode 100644 index 00000000000..74227e9f123 Binary files /dev/null and b/metrics/integration/render-tests/combinations/hillshade-translucent--fill-translucent/expected.png differ diff --git a/metrics/integration/render-tests/combinations/hillshade-translucent--fill-translucent/style.json b/metrics/integration/render-tests/combinations/hillshade-translucent--fill-translucent/style.json new file mode 100644 index 00000000000..dda0015709b --- /dev/null +++ b/metrics/integration/render-tests/combinations/hillshade-translucent--fill-translucent/style.json @@ -0,0 +1,73 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "hillshade": { + "type": "raster-dem", + "tiles": [ + "local://tiles/{z}-{x}-{y}.terrain.png" + ], + "maxzoom": 15, + "tileSize": 256 + }, + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "hillshade-translucent", + "type": "hillshade", + "source": "hillshade", + "paint": { + "hillshade-exaggeration": 1 + } + }, + { + "id": "fill-translucent", + "type": "fill", + "source": "geojson", + "paint": { + "fill-opacity": 0.5, + "fill-color": "blue" + } + } + ] +} diff --git a/metrics/integration/render-tests/combinations/hillshade-translucent--heatmap-translucent/expected.png b/metrics/integration/render-tests/combinations/hillshade-translucent--heatmap-translucent/expected.png new file mode 100644 index 00000000000..ee4f8125322 Binary files /dev/null and b/metrics/integration/render-tests/combinations/hillshade-translucent--heatmap-translucent/expected.png differ diff --git a/metrics/integration/render-tests/combinations/hillshade-translucent--heatmap-translucent/style.json b/metrics/integration/render-tests/combinations/hillshade-translucent--heatmap-translucent/style.json new file mode 100644 index 00000000000..e9db1b3a3af --- /dev/null +++ b/metrics/integration/render-tests/combinations/hillshade-translucent--heatmap-translucent/style.json @@ -0,0 +1,72 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "hillshade": { + "type": "raster-dem", + "tiles": [ + "local://tiles/{z}-{x}-{y}.terrain.png" + ], + "maxzoom": 15, + "tileSize": 256 + }, + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "hillshade-translucent", + "type": "hillshade", + "source": "hillshade", + "paint": { + "hillshade-exaggeration": 1 + } + }, + { + "id": "heatmap-translucent", + "type": "heatmap", + "source": "geojson", + "paint": { + "heatmap-opacity": 0.7 + } + } + ] +} diff --git a/metrics/integration/render-tests/combinations/hillshade-translucent--hillshade-translucent/expected.png b/metrics/integration/render-tests/combinations/hillshade-translucent--hillshade-translucent/expected.png new file mode 100644 index 00000000000..8efe4d204bb Binary files /dev/null and b/metrics/integration/render-tests/combinations/hillshade-translucent--hillshade-translucent/expected.png differ diff --git a/metrics/integration/render-tests/combinations/hillshade-translucent--hillshade-translucent/style.json b/metrics/integration/render-tests/combinations/hillshade-translucent--hillshade-translucent/style.json new file mode 100644 index 00000000000..a957ac96ceb --- /dev/null +++ b/metrics/integration/render-tests/combinations/hillshade-translucent--hillshade-translucent/style.json @@ -0,0 +1,43 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "allowed": 0.002 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "hillshade": { + "type": "raster-dem", + "tiles": [ + "local://tiles/{z}-{x}-{y}.terrain.png" + ], + "maxzoom": 15, + "tileSize": 256 + } + }, + "layers": [ + { + "id": "hillshade-translucent", + "type": "hillshade", + "source": "hillshade", + "paint": { + "hillshade-exaggeration": 1 + } + }, + { + "id": "hillshade-translucent-2", + "type": "hillshade", + "source": "hillshade", + "paint": { + "hillshade-exaggeration": 1 + } + } + ] +} diff --git a/metrics/integration/render-tests/combinations/hillshade-translucent--line-translucent/expected.png b/metrics/integration/render-tests/combinations/hillshade-translucent--line-translucent/expected.png new file mode 100644 index 00000000000..4f3c441853d Binary files /dev/null and b/metrics/integration/render-tests/combinations/hillshade-translucent--line-translucent/expected.png differ diff --git a/metrics/integration/render-tests/combinations/hillshade-translucent--line-translucent/style.json b/metrics/integration/render-tests/combinations/hillshade-translucent--line-translucent/style.json new file mode 100644 index 00000000000..364163781ce --- /dev/null +++ b/metrics/integration/render-tests/combinations/hillshade-translucent--line-translucent/style.json @@ -0,0 +1,72 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "hillshade": { + "type": "raster-dem", + "tiles": [ + "local://tiles/{z}-{x}-{y}.terrain.png" + ], + "maxzoom": 15, + "tileSize": 256 + }, + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "hillshade-translucent", + "type": "hillshade", + "source": "hillshade", + "paint": { + "hillshade-exaggeration": 1 + } + }, + { + "id": "line-translucent", + "type": "line", + "source": "geojson", + "paint": { + "line-color": "blue" + } + } + ] +} diff --git a/metrics/integration/render-tests/combinations/hillshade-translucent--raster-translucent/expected.png b/metrics/integration/render-tests/combinations/hillshade-translucent--raster-translucent/expected.png new file mode 100644 index 00000000000..463cda6915b Binary files /dev/null and b/metrics/integration/render-tests/combinations/hillshade-translucent--raster-translucent/expected.png differ diff --git a/metrics/integration/render-tests/combinations/hillshade-translucent--raster-translucent/style.json b/metrics/integration/render-tests/combinations/hillshade-translucent--raster-translucent/style.json new file mode 100644 index 00000000000..5990a37e4ce --- /dev/null +++ b/metrics/integration/render-tests/combinations/hillshade-translucent--raster-translucent/style.json @@ -0,0 +1,51 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "hillshade": { + "type": "raster-dem", + "tiles": [ + "local://tiles/{z}-{x}-{y}.terrain.png" + ], + "maxzoom": 15, + "tileSize": 256 + }, + "satellite": { + "type": "raster", + "tiles": [ + "local://tiles/{z}-{x}-{y}.satellite.png" + ], + "maxzoom": 17, + "tileSize": 256 + } + }, + "layers": [ + { + "id": "hillshade-translucent", + "type": "hillshade", + "source": "hillshade", + "paint": { + "hillshade-exaggeration": 1 + } + }, + { + "id": "raster-translucent", + "type": "raster", + "source": "satellite", + "paint": { + "raster-fade-duration": 0, + "raster-opacity": 0.9 + } + } + ] +} diff --git a/metrics/integration/render-tests/combinations/hillshade-translucent--symbol-translucent/expected.png b/metrics/integration/render-tests/combinations/hillshade-translucent--symbol-translucent/expected.png new file mode 100644 index 00000000000..ea87f5c73c3 Binary files /dev/null and b/metrics/integration/render-tests/combinations/hillshade-translucent--symbol-translucent/expected.png differ diff --git a/metrics/integration/render-tests/combinations/hillshade-translucent--symbol-translucent/style.json b/metrics/integration/render-tests/combinations/hillshade-translucent--symbol-translucent/style.json new file mode 100644 index 00000000000..315fa5b46a9 --- /dev/null +++ b/metrics/integration/render-tests/combinations/hillshade-translucent--symbol-translucent/style.json @@ -0,0 +1,77 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "hillshade": { + "type": "raster-dem", + "tiles": [ + "local://tiles/{z}-{x}-{y}.terrain.png" + ], + "maxzoom": 15, + "tileSize": 256 + }, + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "hillshade-translucent", + "type": "hillshade", + "source": "hillshade", + "paint": { + "hillshade-exaggeration": 1 + } + }, + { + "id": "symbol-translucent", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "dot.sdf", + "symbol-placement": "line" + }, + "paint": { + "icon-color": "blue" + } + } + ], + "sprite": "local://sprites/sprite" +} diff --git a/metrics/integration/render-tests/combinations/line-translucent--background-opaque/expected.png b/metrics/integration/render-tests/combinations/line-translucent--background-opaque/expected.png new file mode 100644 index 00000000000..cc46431ca9e Binary files /dev/null and b/metrics/integration/render-tests/combinations/line-translucent--background-opaque/expected.png differ diff --git a/metrics/integration/render-tests/combinations/line-translucent--background-opaque/style.json b/metrics/integration/render-tests/combinations/line-translucent--background-opaque/style.json new file mode 100644 index 00000000000..6635b5922e4 --- /dev/null +++ b/metrics/integration/render-tests/combinations/line-translucent--background-opaque/style.json @@ -0,0 +1,63 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "line-translucent", + "type": "line", + "source": "geojson", + "paint": { + "line-color": "red" + } + }, + { + "id": "background-opaque", + "type": "background", + "paint": { + "background-color": "blue" + } + } + ] +} diff --git a/metrics/integration/render-tests/combinations/line-translucent--background-translucent/expected.png b/metrics/integration/render-tests/combinations/line-translucent--background-translucent/expected.png new file mode 100644 index 00000000000..159f405b249 Binary files /dev/null and b/metrics/integration/render-tests/combinations/line-translucent--background-translucent/expected.png differ diff --git a/metrics/integration/render-tests/combinations/line-translucent--background-translucent/style.json b/metrics/integration/render-tests/combinations/line-translucent--background-translucent/style.json new file mode 100644 index 00000000000..7aab216dc46 --- /dev/null +++ b/metrics/integration/render-tests/combinations/line-translucent--background-translucent/style.json @@ -0,0 +1,64 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "line-translucent", + "type": "line", + "source": "geojson", + "paint": { + "line-color": "red" + } + }, + { + "id": "background-translucent", + "type": "background", + "paint": { + "background-opacity": 0.5, + "background-color": "blue" + } + } + ] +} diff --git a/metrics/integration/render-tests/combinations/line-translucent--circle-translucent/expected.png b/metrics/integration/render-tests/combinations/line-translucent--circle-translucent/expected.png new file mode 100644 index 00000000000..45690a99494 Binary files /dev/null and b/metrics/integration/render-tests/combinations/line-translucent--circle-translucent/expected.png differ diff --git a/metrics/integration/render-tests/combinations/line-translucent--circle-translucent/style.json b/metrics/integration/render-tests/combinations/line-translucent--circle-translucent/style.json new file mode 100644 index 00000000000..2b7d7498fc2 --- /dev/null +++ b/metrics/integration/render-tests/combinations/line-translucent--circle-translucent/style.json @@ -0,0 +1,64 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "line-translucent", + "type": "line", + "source": "geojson", + "paint": { + "line-color": "red" + } + }, + { + "id": "circle-translucent", + "type": "circle", + "source": "geojson", + "paint": { + "circle-color": "blue" + } + } + ] +} diff --git a/metrics/integration/render-tests/combinations/line-translucent--fill-extrusion-translucent/expected.png b/metrics/integration/render-tests/combinations/line-translucent--fill-extrusion-translucent/expected.png new file mode 100644 index 00000000000..8edc901a563 Binary files /dev/null and b/metrics/integration/render-tests/combinations/line-translucent--fill-extrusion-translucent/expected.png differ diff --git a/metrics/integration/render-tests/combinations/line-translucent--fill-extrusion-translucent/style.json b/metrics/integration/render-tests/combinations/line-translucent--fill-extrusion-translucent/style.json new file mode 100644 index 00000000000..8a788b7c025 --- /dev/null +++ b/metrics/integration/render-tests/combinations/line-translucent--fill-extrusion-translucent/style.json @@ -0,0 +1,64 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "line-translucent", + "type": "line", + "source": "geojson", + "paint": { + "line-color": "red" + } + }, + { + "id": "fill-extrusion-translucent", + "type": "fill-extrusion", + "source": "geojson", + "paint": { + "fill-extrusion-color": "blue" + } + } + ] +} diff --git a/metrics/integration/render-tests/combinations/line-translucent--fill-opaque/expected.png b/metrics/integration/render-tests/combinations/line-translucent--fill-opaque/expected.png new file mode 100644 index 00000000000..0ee6715be13 Binary files /dev/null and b/metrics/integration/render-tests/combinations/line-translucent--fill-opaque/expected.png differ diff --git a/metrics/integration/render-tests/combinations/line-translucent--fill-opaque/style.json b/metrics/integration/render-tests/combinations/line-translucent--fill-opaque/style.json new file mode 100644 index 00000000000..b484802923d --- /dev/null +++ b/metrics/integration/render-tests/combinations/line-translucent--fill-opaque/style.json @@ -0,0 +1,64 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "line-translucent", + "type": "line", + "source": "geojson", + "paint": { + "line-color": "red" + } + }, + { + "id": "fill-opaque", + "type": "fill", + "source": "geojson", + "paint": { + "fill-color": "blue" + } + } + ] +} diff --git a/metrics/integration/render-tests/combinations/line-translucent--fill-translucent/expected.png b/metrics/integration/render-tests/combinations/line-translucent--fill-translucent/expected.png new file mode 100644 index 00000000000..bd8a13839a4 Binary files /dev/null and b/metrics/integration/render-tests/combinations/line-translucent--fill-translucent/expected.png differ diff --git a/metrics/integration/render-tests/combinations/line-translucent--fill-translucent/style.json b/metrics/integration/render-tests/combinations/line-translucent--fill-translucent/style.json new file mode 100644 index 00000000000..b8d8235e9b7 --- /dev/null +++ b/metrics/integration/render-tests/combinations/line-translucent--fill-translucent/style.json @@ -0,0 +1,65 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "line-translucent", + "type": "line", + "source": "geojson", + "paint": { + "line-color": "red" + } + }, + { + "id": "fill-translucent", + "type": "fill", + "source": "geojson", + "paint": { + "fill-opacity": 0.5, + "fill-color": "blue" + } + } + ] +} diff --git a/metrics/integration/render-tests/combinations/line-translucent--heatmap-translucent/expected.png b/metrics/integration/render-tests/combinations/line-translucent--heatmap-translucent/expected.png new file mode 100644 index 00000000000..fc7c5c78a63 Binary files /dev/null and b/metrics/integration/render-tests/combinations/line-translucent--heatmap-translucent/expected.png differ diff --git a/metrics/integration/render-tests/combinations/line-translucent--heatmap-translucent/style.json b/metrics/integration/render-tests/combinations/line-translucent--heatmap-translucent/style.json new file mode 100644 index 00000000000..5d147747fc1 --- /dev/null +++ b/metrics/integration/render-tests/combinations/line-translucent--heatmap-translucent/style.json @@ -0,0 +1,64 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "line-translucent", + "type": "line", + "source": "geojson", + "paint": { + "line-color": "red" + } + }, + { + "id": "heatmap-translucent", + "type": "heatmap", + "source": "geojson", + "paint": { + "heatmap-opacity": 0.7 + } + } + ] +} diff --git a/metrics/integration/render-tests/combinations/line-translucent--hillshade-translucent/expected.png b/metrics/integration/render-tests/combinations/line-translucent--hillshade-translucent/expected.png new file mode 100644 index 00000000000..0e14ef00435 Binary files /dev/null and b/metrics/integration/render-tests/combinations/line-translucent--hillshade-translucent/expected.png differ diff --git a/metrics/integration/render-tests/combinations/line-translucent--hillshade-translucent/style.json b/metrics/integration/render-tests/combinations/line-translucent--hillshade-translucent/style.json new file mode 100644 index 00000000000..471d8df07b2 --- /dev/null +++ b/metrics/integration/render-tests/combinations/line-translucent--hillshade-translucent/style.json @@ -0,0 +1,72 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + }, + "hillshade": { + "type": "raster-dem", + "tiles": [ + "local://tiles/{z}-{x}-{y}.terrain.png" + ], + "maxzoom": 15, + "tileSize": 256 + } + }, + "layers": [ + { + "id": "line-translucent", + "type": "line", + "source": "geojson", + "paint": { + "line-color": "red" + } + }, + { + "id": "hillshade-translucent", + "type": "hillshade", + "source": "hillshade", + "paint": { + "hillshade-exaggeration": 1 + } + } + ] +} diff --git a/metrics/integration/render-tests/combinations/line-translucent--line-translucent/expected.png b/metrics/integration/render-tests/combinations/line-translucent--line-translucent/expected.png new file mode 100644 index 00000000000..a5b0ac4d204 Binary files /dev/null and b/metrics/integration/render-tests/combinations/line-translucent--line-translucent/expected.png differ diff --git a/metrics/integration/render-tests/combinations/line-translucent--line-translucent/style.json b/metrics/integration/render-tests/combinations/line-translucent--line-translucent/style.json new file mode 100644 index 00000000000..a04da9e4558 --- /dev/null +++ b/metrics/integration/render-tests/combinations/line-translucent--line-translucent/style.json @@ -0,0 +1,64 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "line-translucent", + "type": "line", + "source": "geojson", + "paint": { + "line-color": "red" + } + }, + { + "id": "line-translucent-2", + "type": "line", + "source": "geojson", + "paint": { + "line-color": "blue" + } + } + ] +} diff --git a/metrics/integration/render-tests/combinations/line-translucent--raster-translucent/expected.png b/metrics/integration/render-tests/combinations/line-translucent--raster-translucent/expected.png new file mode 100644 index 00000000000..abb916cc215 Binary files /dev/null and b/metrics/integration/render-tests/combinations/line-translucent--raster-translucent/expected.png differ diff --git a/metrics/integration/render-tests/combinations/line-translucent--raster-translucent/style.json b/metrics/integration/render-tests/combinations/line-translucent--raster-translucent/style.json new file mode 100644 index 00000000000..70c7d1216f4 --- /dev/null +++ b/metrics/integration/render-tests/combinations/line-translucent--raster-translucent/style.json @@ -0,0 +1,73 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + }, + "satellite": { + "type": "raster", + "tiles": [ + "local://tiles/{z}-{x}-{y}.satellite.png" + ], + "maxzoom": 17, + "tileSize": 256 + } + }, + "layers": [ + { + "id": "line-translucent", + "type": "line", + "source": "geojson", + "paint": { + "line-color": "red" + } + }, + { + "id": "raster-translucent", + "type": "raster", + "source": "satellite", + "paint": { + "raster-fade-duration": 0, + "raster-opacity": 0.9 + } + } + ] +} diff --git a/metrics/integration/render-tests/combinations/line-translucent--symbol-translucent/expected.png b/metrics/integration/render-tests/combinations/line-translucent--symbol-translucent/expected.png new file mode 100644 index 00000000000..c1eb1d2ce29 Binary files /dev/null and b/metrics/integration/render-tests/combinations/line-translucent--symbol-translucent/expected.png differ diff --git a/metrics/integration/render-tests/combinations/line-translucent--symbol-translucent/style.json b/metrics/integration/render-tests/combinations/line-translucent--symbol-translucent/style.json new file mode 100644 index 00000000000..6e81886bdc7 --- /dev/null +++ b/metrics/integration/render-tests/combinations/line-translucent--symbol-translucent/style.json @@ -0,0 +1,69 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "line-translucent", + "type": "line", + "source": "geojson", + "paint": { + "line-color": "red" + } + }, + { + "id": "symbol-translucent", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "dot.sdf", + "symbol-placement": "line" + }, + "paint": { + "icon-color": "blue" + } + } + ], + "sprite": "local://sprites/sprite" +} diff --git a/metrics/integration/render-tests/combinations/raster-translucent--background-opaque/expected.png b/metrics/integration/render-tests/combinations/raster-translucent--background-opaque/expected.png new file mode 100644 index 00000000000..cc46431ca9e Binary files /dev/null and b/metrics/integration/render-tests/combinations/raster-translucent--background-opaque/expected.png differ diff --git a/metrics/integration/render-tests/combinations/raster-translucent--background-opaque/style.json b/metrics/integration/render-tests/combinations/raster-translucent--background-opaque/style.json new file mode 100644 index 00000000000..c634056740f --- /dev/null +++ b/metrics/integration/render-tests/combinations/raster-translucent--background-opaque/style.json @@ -0,0 +1,42 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "satellite": { + "type": "raster", + "tiles": [ + "local://tiles/{z}-{x}-{y}.satellite.png" + ], + "maxzoom": 17, + "tileSize": 256 + } + }, + "layers": [ + { + "id": "raster-translucent", + "type": "raster", + "source": "satellite", + "paint": { + "raster-fade-duration": 0, + "raster-opacity": 0.9 + } + }, + { + "id": "background-opaque", + "type": "background", + "paint": { + "background-color": "blue" + } + } + ] +} diff --git a/metrics/integration/render-tests/combinations/raster-translucent--background-translucent/expected.png b/metrics/integration/render-tests/combinations/raster-translucent--background-translucent/expected.png new file mode 100644 index 00000000000..614be5885f7 Binary files /dev/null and b/metrics/integration/render-tests/combinations/raster-translucent--background-translucent/expected.png differ diff --git a/metrics/integration/render-tests/combinations/raster-translucent--background-translucent/style.json b/metrics/integration/render-tests/combinations/raster-translucent--background-translucent/style.json new file mode 100644 index 00000000000..e7f7a557110 --- /dev/null +++ b/metrics/integration/render-tests/combinations/raster-translucent--background-translucent/style.json @@ -0,0 +1,43 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "satellite": { + "type": "raster", + "tiles": [ + "local://tiles/{z}-{x}-{y}.satellite.png" + ], + "maxzoom": 17, + "tileSize": 256 + } + }, + "layers": [ + { + "id": "raster-translucent", + "type": "raster", + "source": "satellite", + "paint": { + "raster-fade-duration": 0, + "raster-opacity": 0.9 + } + }, + { + "id": "background-translucent", + "type": "background", + "paint": { + "background-opacity": 0.5, + "background-color": "blue" + } + } + ] +} diff --git a/metrics/integration/render-tests/combinations/raster-translucent--circle-translucent/expected.png b/metrics/integration/render-tests/combinations/raster-translucent--circle-translucent/expected.png new file mode 100644 index 00000000000..6351f400539 Binary files /dev/null and b/metrics/integration/render-tests/combinations/raster-translucent--circle-translucent/expected.png differ diff --git a/metrics/integration/render-tests/combinations/raster-translucent--circle-translucent/style.json b/metrics/integration/render-tests/combinations/raster-translucent--circle-translucent/style.json new file mode 100644 index 00000000000..462dbd59708 --- /dev/null +++ b/metrics/integration/render-tests/combinations/raster-translucent--circle-translucent/style.json @@ -0,0 +1,73 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "satellite": { + "type": "raster", + "tiles": [ + "local://tiles/{z}-{x}-{y}.satellite.png" + ], + "maxzoom": 17, + "tileSize": 256 + }, + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "raster-translucent", + "type": "raster", + "source": "satellite", + "paint": { + "raster-fade-duration": 0, + "raster-opacity": 0.9 + } + }, + { + "id": "circle-translucent", + "type": "circle", + "source": "geojson", + "paint": { + "circle-color": "blue" + } + } + ] +} diff --git a/metrics/integration/render-tests/combinations/raster-translucent--fill-extrusion-translucent/expected.png b/metrics/integration/render-tests/combinations/raster-translucent--fill-extrusion-translucent/expected.png new file mode 100644 index 00000000000..a340344290c Binary files /dev/null and b/metrics/integration/render-tests/combinations/raster-translucent--fill-extrusion-translucent/expected.png differ diff --git a/metrics/integration/render-tests/combinations/raster-translucent--fill-extrusion-translucent/style.json b/metrics/integration/render-tests/combinations/raster-translucent--fill-extrusion-translucent/style.json new file mode 100644 index 00000000000..2bf616e3916 --- /dev/null +++ b/metrics/integration/render-tests/combinations/raster-translucent--fill-extrusion-translucent/style.json @@ -0,0 +1,73 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "satellite": { + "type": "raster", + "tiles": [ + "local://tiles/{z}-{x}-{y}.satellite.png" + ], + "maxzoom": 17, + "tileSize": 256 + }, + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "raster-translucent", + "type": "raster", + "source": "satellite", + "paint": { + "raster-fade-duration": 0, + "raster-opacity": 0.9 + } + }, + { + "id": "fill-extrusion-translucent", + "type": "fill-extrusion", + "source": "geojson", + "paint": { + "fill-extrusion-color": "blue" + } + } + ] +} diff --git a/metrics/integration/render-tests/combinations/raster-translucent--fill-opaque/expected.png b/metrics/integration/render-tests/combinations/raster-translucent--fill-opaque/expected.png new file mode 100644 index 00000000000..4f47352545f Binary files /dev/null and b/metrics/integration/render-tests/combinations/raster-translucent--fill-opaque/expected.png differ diff --git a/metrics/integration/render-tests/combinations/raster-translucent--fill-opaque/style.json b/metrics/integration/render-tests/combinations/raster-translucent--fill-opaque/style.json new file mode 100644 index 00000000000..c7be1370f87 --- /dev/null +++ b/metrics/integration/render-tests/combinations/raster-translucent--fill-opaque/style.json @@ -0,0 +1,73 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "satellite": { + "type": "raster", + "tiles": [ + "local://tiles/{z}-{x}-{y}.satellite.png" + ], + "maxzoom": 17, + "tileSize": 256 + }, + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "raster-translucent", + "type": "raster", + "source": "satellite", + "paint": { + "raster-fade-duration": 0, + "raster-opacity": 0.9 + } + }, + { + "id": "fill-opaque", + "type": "fill", + "source": "geojson", + "paint": { + "fill-color": "blue" + } + } + ] +} diff --git a/metrics/integration/render-tests/combinations/raster-translucent--fill-translucent/expected.png b/metrics/integration/render-tests/combinations/raster-translucent--fill-translucent/expected.png new file mode 100644 index 00000000000..a03c85b1aa2 Binary files /dev/null and b/metrics/integration/render-tests/combinations/raster-translucent--fill-translucent/expected.png differ diff --git a/metrics/integration/render-tests/combinations/raster-translucent--fill-translucent/style.json b/metrics/integration/render-tests/combinations/raster-translucent--fill-translucent/style.json new file mode 100644 index 00000000000..55bb422f3e6 --- /dev/null +++ b/metrics/integration/render-tests/combinations/raster-translucent--fill-translucent/style.json @@ -0,0 +1,74 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "satellite": { + "type": "raster", + "tiles": [ + "local://tiles/{z}-{x}-{y}.satellite.png" + ], + "maxzoom": 17, + "tileSize": 256 + }, + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "raster-translucent", + "type": "raster", + "source": "satellite", + "paint": { + "raster-fade-duration": 0, + "raster-opacity": 0.9 + } + }, + { + "id": "fill-translucent", + "type": "fill", + "source": "geojson", + "paint": { + "fill-opacity": 0.5, + "fill-color": "blue" + } + } + ] +} diff --git a/metrics/integration/render-tests/combinations/raster-translucent--heatmap-translucent/expected.png b/metrics/integration/render-tests/combinations/raster-translucent--heatmap-translucent/expected.png new file mode 100644 index 00000000000..a7072743deb Binary files /dev/null and b/metrics/integration/render-tests/combinations/raster-translucent--heatmap-translucent/expected.png differ diff --git a/metrics/integration/render-tests/combinations/raster-translucent--heatmap-translucent/style.json b/metrics/integration/render-tests/combinations/raster-translucent--heatmap-translucent/style.json new file mode 100644 index 00000000000..8ffec151b4f --- /dev/null +++ b/metrics/integration/render-tests/combinations/raster-translucent--heatmap-translucent/style.json @@ -0,0 +1,73 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "satellite": { + "type": "raster", + "tiles": [ + "local://tiles/{z}-{x}-{y}.satellite.png" + ], + "maxzoom": 17, + "tileSize": 256 + }, + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "raster-translucent", + "type": "raster", + "source": "satellite", + "paint": { + "raster-fade-duration": 0, + "raster-opacity": 0.9 + } + }, + { + "id": "heatmap-translucent", + "type": "heatmap", + "source": "geojson", + "paint": { + "heatmap-opacity": 0.7 + } + } + ] +} diff --git a/metrics/integration/render-tests/combinations/raster-translucent--hillshade-translucent/expected.png b/metrics/integration/render-tests/combinations/raster-translucent--hillshade-translucent/expected.png new file mode 100644 index 00000000000..66d333aee32 Binary files /dev/null and b/metrics/integration/render-tests/combinations/raster-translucent--hillshade-translucent/expected.png differ diff --git a/metrics/integration/render-tests/combinations/raster-translucent--hillshade-translucent/style.json b/metrics/integration/render-tests/combinations/raster-translucent--hillshade-translucent/style.json new file mode 100644 index 00000000000..87b83ab59e7 --- /dev/null +++ b/metrics/integration/render-tests/combinations/raster-translucent--hillshade-translucent/style.json @@ -0,0 +1,51 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "satellite": { + "type": "raster", + "tiles": [ + "local://tiles/{z}-{x}-{y}.satellite.png" + ], + "maxzoom": 17, + "tileSize": 256 + }, + "hillshade": { + "type": "raster-dem", + "tiles": [ + "local://tiles/{z}-{x}-{y}.terrain.png" + ], + "maxzoom": 15, + "tileSize": 256 + } + }, + "layers": [ + { + "id": "raster-translucent", + "type": "raster", + "source": "satellite", + "paint": { + "raster-fade-duration": 0, + "raster-opacity": 0.9 + } + }, + { + "id": "hillshade-translucent", + "type": "hillshade", + "source": "hillshade", + "paint": { + "hillshade-exaggeration": 1 + } + } + ] +} diff --git a/metrics/integration/render-tests/combinations/raster-translucent--line-translucent/expected.png b/metrics/integration/render-tests/combinations/raster-translucent--line-translucent/expected.png new file mode 100644 index 00000000000..75ca8767f47 Binary files /dev/null and b/metrics/integration/render-tests/combinations/raster-translucent--line-translucent/expected.png differ diff --git a/metrics/integration/render-tests/combinations/raster-translucent--line-translucent/style.json b/metrics/integration/render-tests/combinations/raster-translucent--line-translucent/style.json new file mode 100644 index 00000000000..e07c91c6b6c --- /dev/null +++ b/metrics/integration/render-tests/combinations/raster-translucent--line-translucent/style.json @@ -0,0 +1,73 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "satellite": { + "type": "raster", + "tiles": [ + "local://tiles/{z}-{x}-{y}.satellite.png" + ], + "maxzoom": 17, + "tileSize": 256 + }, + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "raster-translucent", + "type": "raster", + "source": "satellite", + "paint": { + "raster-fade-duration": 0, + "raster-opacity": 0.9 + } + }, + { + "id": "line-translucent", + "type": "line", + "source": "geojson", + "paint": { + "line-color": "blue" + } + } + ] +} diff --git a/metrics/integration/render-tests/combinations/raster-translucent--raster-translucent/expected.png b/metrics/integration/render-tests/combinations/raster-translucent--raster-translucent/expected.png new file mode 100644 index 00000000000..5bc66d98c5f Binary files /dev/null and b/metrics/integration/render-tests/combinations/raster-translucent--raster-translucent/expected.png differ diff --git a/metrics/integration/render-tests/combinations/raster-translucent--raster-translucent/style.json b/metrics/integration/render-tests/combinations/raster-translucent--raster-translucent/style.json new file mode 100644 index 00000000000..e1fa1530e9a --- /dev/null +++ b/metrics/integration/render-tests/combinations/raster-translucent--raster-translucent/style.json @@ -0,0 +1,44 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "satellite": { + "type": "raster", + "tiles": [ + "local://tiles/{z}-{x}-{y}.satellite.png" + ], + "maxzoom": 17, + "tileSize": 256 + } + }, + "layers": [ + { + "id": "raster-translucent", + "type": "raster", + "source": "satellite", + "paint": { + "raster-fade-duration": 0, + "raster-opacity": 0.9 + } + }, + { + "id": "raster-translucent-2", + "type": "raster", + "source": "satellite", + "paint": { + "raster-fade-duration": 0, + "raster-opacity": 0.9 + } + } + ] +} diff --git a/metrics/integration/render-tests/combinations/raster-translucent--symbol-translucent/expected.png b/metrics/integration/render-tests/combinations/raster-translucent--symbol-translucent/expected.png new file mode 100644 index 00000000000..e03ffbdcd77 Binary files /dev/null and b/metrics/integration/render-tests/combinations/raster-translucent--symbol-translucent/expected.png differ diff --git a/metrics/integration/render-tests/combinations/raster-translucent--symbol-translucent/style.json b/metrics/integration/render-tests/combinations/raster-translucent--symbol-translucent/style.json new file mode 100644 index 00000000000..2f9309dbe9a --- /dev/null +++ b/metrics/integration/render-tests/combinations/raster-translucent--symbol-translucent/style.json @@ -0,0 +1,78 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "satellite": { + "type": "raster", + "tiles": [ + "local://tiles/{z}-{x}-{y}.satellite.png" + ], + "maxzoom": 17, + "tileSize": 256 + }, + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "raster-translucent", + "type": "raster", + "source": "satellite", + "paint": { + "raster-fade-duration": 0, + "raster-opacity": 0.9 + } + }, + { + "id": "symbol-translucent", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "dot.sdf", + "symbol-placement": "line" + }, + "paint": { + "icon-color": "blue" + } + } + ], + "sprite": "local://sprites/sprite" +} diff --git a/metrics/integration/render-tests/combinations/symbol-translucent--background-opaque/expected.png b/metrics/integration/render-tests/combinations/symbol-translucent--background-opaque/expected.png new file mode 100644 index 00000000000..cc46431ca9e Binary files /dev/null and b/metrics/integration/render-tests/combinations/symbol-translucent--background-opaque/expected.png differ diff --git a/metrics/integration/render-tests/combinations/symbol-translucent--background-opaque/style.json b/metrics/integration/render-tests/combinations/symbol-translucent--background-opaque/style.json new file mode 100644 index 00000000000..c1d2f947ead --- /dev/null +++ b/metrics/integration/render-tests/combinations/symbol-translucent--background-opaque/style.json @@ -0,0 +1,68 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "symbol-translucent", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "dot.sdf", + "symbol-placement": "line" + }, + "paint": { + "icon-color": "red" + } + }, + { + "id": "background-opaque", + "type": "background", + "paint": { + "background-color": "blue" + } + } + ], + "sprite": "local://sprites/sprite" +} diff --git a/metrics/integration/render-tests/combinations/symbol-translucent--background-translucent/expected.png b/metrics/integration/render-tests/combinations/symbol-translucent--background-translucent/expected.png new file mode 100644 index 00000000000..3738a241488 Binary files /dev/null and b/metrics/integration/render-tests/combinations/symbol-translucent--background-translucent/expected.png differ diff --git a/metrics/integration/render-tests/combinations/symbol-translucent--background-translucent/style.json b/metrics/integration/render-tests/combinations/symbol-translucent--background-translucent/style.json new file mode 100644 index 00000000000..cee7e29765c --- /dev/null +++ b/metrics/integration/render-tests/combinations/symbol-translucent--background-translucent/style.json @@ -0,0 +1,69 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "symbol-translucent", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "dot.sdf", + "symbol-placement": "line" + }, + "paint": { + "icon-color": "red" + } + }, + { + "id": "background-translucent", + "type": "background", + "paint": { + "background-opacity": 0.5, + "background-color": "blue" + } + } + ], + "sprite": "local://sprites/sprite" +} diff --git a/metrics/integration/render-tests/combinations/symbol-translucent--circle-translucent/expected.png b/metrics/integration/render-tests/combinations/symbol-translucent--circle-translucent/expected.png new file mode 100644 index 00000000000..19abad0bac3 Binary files /dev/null and b/metrics/integration/render-tests/combinations/symbol-translucent--circle-translucent/expected.png differ diff --git a/metrics/integration/render-tests/combinations/symbol-translucent--circle-translucent/style.json b/metrics/integration/render-tests/combinations/symbol-translucent--circle-translucent/style.json new file mode 100644 index 00000000000..e9ae41ef3eb --- /dev/null +++ b/metrics/integration/render-tests/combinations/symbol-translucent--circle-translucent/style.json @@ -0,0 +1,69 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "symbol-translucent", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "dot.sdf", + "symbol-placement": "line" + }, + "paint": { + "icon-color": "red" + } + }, + { + "id": "circle-translucent", + "type": "circle", + "source": "geojson", + "paint": { + "circle-color": "blue" + } + } + ], + "sprite": "local://sprites/sprite" +} diff --git a/metrics/integration/render-tests/combinations/symbol-translucent--fill-extrusion-translucent/expected.png b/metrics/integration/render-tests/combinations/symbol-translucent--fill-extrusion-translucent/expected.png new file mode 100644 index 00000000000..71b0f97053b Binary files /dev/null and b/metrics/integration/render-tests/combinations/symbol-translucent--fill-extrusion-translucent/expected.png differ diff --git a/metrics/integration/render-tests/combinations/symbol-translucent--fill-extrusion-translucent/style.json b/metrics/integration/render-tests/combinations/symbol-translucent--fill-extrusion-translucent/style.json new file mode 100644 index 00000000000..3d9efc9a02e --- /dev/null +++ b/metrics/integration/render-tests/combinations/symbol-translucent--fill-extrusion-translucent/style.json @@ -0,0 +1,69 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "symbol-translucent", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "dot.sdf", + "symbol-placement": "line" + }, + "paint": { + "icon-color": "red" + } + }, + { + "id": "fill-extrusion-translucent", + "type": "fill-extrusion", + "source": "geojson", + "paint": { + "fill-extrusion-color": "blue" + } + } + ], + "sprite": "local://sprites/sprite" +} diff --git a/metrics/integration/render-tests/combinations/symbol-translucent--fill-opaque/expected.png b/metrics/integration/render-tests/combinations/symbol-translucent--fill-opaque/expected.png new file mode 100644 index 00000000000..a5255d8651d Binary files /dev/null and b/metrics/integration/render-tests/combinations/symbol-translucent--fill-opaque/expected.png differ diff --git a/metrics/integration/render-tests/combinations/symbol-translucent--fill-opaque/style.json b/metrics/integration/render-tests/combinations/symbol-translucent--fill-opaque/style.json new file mode 100644 index 00000000000..2afa03c279f --- /dev/null +++ b/metrics/integration/render-tests/combinations/symbol-translucent--fill-opaque/style.json @@ -0,0 +1,69 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "symbol-translucent", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "dot.sdf", + "symbol-placement": "line" + }, + "paint": { + "icon-color": "red" + } + }, + { + "id": "fill-opaque", + "type": "fill", + "source": "geojson", + "paint": { + "fill-color": "blue" + } + } + ], + "sprite": "local://sprites/sprite" +} diff --git a/metrics/integration/render-tests/combinations/symbol-translucent--fill-translucent/expected.png b/metrics/integration/render-tests/combinations/symbol-translucent--fill-translucent/expected.png new file mode 100644 index 00000000000..05eb802180c Binary files /dev/null and b/metrics/integration/render-tests/combinations/symbol-translucent--fill-translucent/expected.png differ diff --git a/metrics/integration/render-tests/combinations/symbol-translucent--fill-translucent/style.json b/metrics/integration/render-tests/combinations/symbol-translucent--fill-translucent/style.json new file mode 100644 index 00000000000..bf849db2667 --- /dev/null +++ b/metrics/integration/render-tests/combinations/symbol-translucent--fill-translucent/style.json @@ -0,0 +1,70 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "symbol-translucent", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "dot.sdf", + "symbol-placement": "line" + }, + "paint": { + "icon-color": "red" + } + }, + { + "id": "fill-translucent", + "type": "fill", + "source": "geojson", + "paint": { + "fill-opacity": 0.5, + "fill-color": "blue" + } + } + ], + "sprite": "local://sprites/sprite" +} diff --git a/metrics/integration/render-tests/combinations/symbol-translucent--heatmap-translucent/expected.png b/metrics/integration/render-tests/combinations/symbol-translucent--heatmap-translucent/expected.png new file mode 100644 index 00000000000..c4fca936593 Binary files /dev/null and b/metrics/integration/render-tests/combinations/symbol-translucent--heatmap-translucent/expected.png differ diff --git a/metrics/integration/render-tests/combinations/symbol-translucent--heatmap-translucent/style.json b/metrics/integration/render-tests/combinations/symbol-translucent--heatmap-translucent/style.json new file mode 100644 index 00000000000..8708a171251 --- /dev/null +++ b/metrics/integration/render-tests/combinations/symbol-translucent--heatmap-translucent/style.json @@ -0,0 +1,69 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "symbol-translucent", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "dot.sdf", + "symbol-placement": "line" + }, + "paint": { + "icon-color": "red" + } + }, + { + "id": "heatmap-translucent", + "type": "heatmap", + "source": "geojson", + "paint": { + "heatmap-opacity": 0.7 + } + } + ], + "sprite": "local://sprites/sprite" +} diff --git a/metrics/integration/render-tests/combinations/symbol-translucent--hillshade-translucent/expected.png b/metrics/integration/render-tests/combinations/symbol-translucent--hillshade-translucent/expected.png new file mode 100644 index 00000000000..a3efac3dc2b Binary files /dev/null and b/metrics/integration/render-tests/combinations/symbol-translucent--hillshade-translucent/expected.png differ diff --git a/metrics/integration/render-tests/combinations/symbol-translucent--hillshade-translucent/style.json b/metrics/integration/render-tests/combinations/symbol-translucent--hillshade-translucent/style.json new file mode 100644 index 00000000000..d6874f923f3 --- /dev/null +++ b/metrics/integration/render-tests/combinations/symbol-translucent--hillshade-translucent/style.json @@ -0,0 +1,77 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + }, + "hillshade": { + "type": "raster-dem", + "tiles": [ + "local://tiles/{z}-{x}-{y}.terrain.png" + ], + "maxzoom": 15, + "tileSize": 256 + } + }, + "layers": [ + { + "id": "symbol-translucent", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "dot.sdf", + "symbol-placement": "line" + }, + "paint": { + "icon-color": "red" + } + }, + { + "id": "hillshade-translucent", + "type": "hillshade", + "source": "hillshade", + "paint": { + "hillshade-exaggeration": 1 + } + } + ], + "sprite": "local://sprites/sprite" +} diff --git a/metrics/integration/render-tests/combinations/symbol-translucent--line-translucent/expected.png b/metrics/integration/render-tests/combinations/symbol-translucent--line-translucent/expected.png new file mode 100644 index 00000000000..ab396ec1f07 Binary files /dev/null and b/metrics/integration/render-tests/combinations/symbol-translucent--line-translucent/expected.png differ diff --git a/metrics/integration/render-tests/combinations/symbol-translucent--line-translucent/style.json b/metrics/integration/render-tests/combinations/symbol-translucent--line-translucent/style.json new file mode 100644 index 00000000000..345fa3a458f --- /dev/null +++ b/metrics/integration/render-tests/combinations/symbol-translucent--line-translucent/style.json @@ -0,0 +1,69 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "symbol-translucent", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "dot.sdf", + "symbol-placement": "line" + }, + "paint": { + "icon-color": "red" + } + }, + { + "id": "line-translucent", + "type": "line", + "source": "geojson", + "paint": { + "line-color": "blue" + } + } + ], + "sprite": "local://sprites/sprite" +} diff --git a/metrics/integration/render-tests/combinations/symbol-translucent--raster-translucent/expected.png b/metrics/integration/render-tests/combinations/symbol-translucent--raster-translucent/expected.png new file mode 100644 index 00000000000..b5998d44410 Binary files /dev/null and b/metrics/integration/render-tests/combinations/symbol-translucent--raster-translucent/expected.png differ diff --git a/metrics/integration/render-tests/combinations/symbol-translucent--raster-translucent/style.json b/metrics/integration/render-tests/combinations/symbol-translucent--raster-translucent/style.json new file mode 100644 index 00000000000..1c3708467f8 --- /dev/null +++ b/metrics/integration/render-tests/combinations/symbol-translucent--raster-translucent/style.json @@ -0,0 +1,78 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + }, + "satellite": { + "type": "raster", + "tiles": [ + "local://tiles/{z}-{x}-{y}.satellite.png" + ], + "maxzoom": 17, + "tileSize": 256 + } + }, + "layers": [ + { + "id": "symbol-translucent", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "dot.sdf", + "symbol-placement": "line" + }, + "paint": { + "icon-color": "red" + } + }, + { + "id": "raster-translucent", + "type": "raster", + "source": "satellite", + "paint": { + "raster-fade-duration": 0, + "raster-opacity": 0.9 + } + } + ], + "sprite": "local://sprites/sprite" +} diff --git a/metrics/integration/render-tests/combinations/symbol-translucent--symbol-translucent/expected.png b/metrics/integration/render-tests/combinations/symbol-translucent--symbol-translucent/expected.png new file mode 100644 index 00000000000..a329041c544 Binary files /dev/null and b/metrics/integration/render-tests/combinations/symbol-translucent--symbol-translucent/expected.png differ diff --git a/metrics/integration/render-tests/combinations/symbol-translucent--symbol-translucent/style.json b/metrics/integration/render-tests/combinations/symbol-translucent--symbol-translucent/style.json new file mode 100644 index 00000000000..a64accb7c62 --- /dev/null +++ b/metrics/integration/render-tests/combinations/symbol-translucent--symbol-translucent/style.json @@ -0,0 +1,74 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -113.26903, + 35.9654 + ], + "zoom": 11, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -113.27384948730469, + 35.962 + ], + [ + -113.26421051269531, + 35.962 + ], + [ + -113.26421051269531, + 35.97 + ], + [ + -113.27384948730469, + 35.97 + ], + [ + -113.27384948730469, + 35.962 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "symbol-translucent", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "dot.sdf", + "icon-allow-overlap": true, + "symbol-placement": "line" + }, + "paint": { + "icon-color": "red" + } + }, + { + "id": "symbol-translucent-2", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "dot.sdf", + "icon-allow-overlap": true + }, + "paint": { + "icon-color": "blue" + } + } + ], + "sprite": "local://sprites/sprite" +} diff --git a/metrics/integration/render-tests/custom-layer-js/depth/expected.png b/metrics/integration/render-tests/custom-layer-js/depth/expected.png new file mode 100644 index 00000000000..7a3ed65b8a2 Binary files /dev/null and b/metrics/integration/render-tests/custom-layer-js/depth/expected.png differ diff --git a/metrics/integration/render-tests/custom-layer-js/depth/style.json b/metrics/integration/render-tests/custom-layer-js/depth/style.json new file mode 100644 index 00000000000..17bde5a735e --- /dev/null +++ b/metrics/integration/render-tests/custom-layer-js/depth/style.json @@ -0,0 +1,66 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "addCustomLayer", + "null-island", + "fill" + ] + ] + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -20, + -10 + ], + [ + -20, + 10 + ], + [ + 0, + 10 + ], + [ + 0, + -10 + ], + [ + -20, + -10 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "rgba(0,255,0, 1)" + } + }, + { + "id": "fill", + "type": "fill", + "source": "geojson", + "paint": { + "fill-antialias": false, + "fill-color": "rgba(235, 235,235, 1)" + } + } + ] +} diff --git a/metrics/integration/render-tests/custom-layer-js/null-island/expected.png b/metrics/integration/render-tests/custom-layer-js/null-island/expected.png new file mode 100644 index 00000000000..8546863a53e Binary files /dev/null and b/metrics/integration/render-tests/custom-layer-js/null-island/expected.png differ diff --git a/metrics/integration/render-tests/custom-layer-js/null-island/style.json b/metrics/integration/render-tests/custom-layer-js/null-island/style.json new file mode 100644 index 00000000000..8db54849219 --- /dev/null +++ b/metrics/integration/render-tests/custom-layer-js/null-island/style.json @@ -0,0 +1,18 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "addCustomLayer", + "null-island" + ] + ] + } + }, + "sources": {}, + "layers": [ + ] +} diff --git a/metrics/integration/render-tests/custom-layer-js/tent-3d/expected.png b/metrics/integration/render-tests/custom-layer-js/tent-3d/expected.png new file mode 100644 index 00000000000..cae223d5c02 Binary files /dev/null and b/metrics/integration/render-tests/custom-layer-js/tent-3d/expected.png differ diff --git a/metrics/integration/render-tests/custom-layer-js/tent-3d/style.json b/metrics/integration/render-tests/custom-layer-js/tent-3d/style.json new file mode 100644 index 00000000000..835d307134b --- /dev/null +++ b/metrics/integration/render-tests/custom-layer-js/tent-3d/style.json @@ -0,0 +1,137 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256, + "operations": [ + [ + "addCustomLayer", + "tent-3d" + ] + ] + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "property": 30 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -1, + -1 + ], + [ + -1, + 1 + ], + [ + 1, + 1 + ], + [ + 1, + -1 + ], + [ + -1, + -1 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "property": 20 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -2, + -2 + ], + [ + -2, + 2 + ], + [ + 2, + 2 + ], + [ + 2, + -2 + ], + [ + -2, + -2 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "property": 10 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -3, + -3 + ], + [ + -3, + 3 + ], + [ + 3, + 3 + ], + [ + 3, + -3 + ], + [ + -3, + -3 + ] + ] + ] + } + } + ] + } + } + }, + "pitch": 60, + "zoom": 4, + "bearing": -35, + "layers": [ + { + "id": "extrusion", + "type": "fill-extrusion", + "source": "geojson", + "paint": { + "fill-extrusion-height": 200000, + "fill-extrusion-color": "blue" + } + } + ] +} diff --git a/metrics/integration/render-tests/debug/collision-icon-text-line-translate/expected.png b/metrics/integration/render-tests/debug/collision-icon-text-line-translate/expected.png new file mode 100644 index 00000000000..87cb7b39db2 Binary files /dev/null and b/metrics/integration/render-tests/debug/collision-icon-text-line-translate/expected.png differ diff --git a/metrics/integration/render-tests/debug/collision-icon-text-line-translate/style.json b/metrics/integration/render-tests/debug/collision-icon-text-line-translate/style.json new file mode 100644 index 00000000000..15ba4c6086b --- /dev/null +++ b/metrics/integration/render-tests/debug/collision-icon-text-line-translate/style.json @@ -0,0 +1,81 @@ +{ + "version": 8, + "metadata": { + "test": { + "collisionDebug": true, + "height": 1000, + "width" : 1000 + } + }, + "center": [ + 0, + 0 + ], + "zoom": 12, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "LineString", + "coordinates": [ + [ + 0, + 0 + ], + [ + 0.5, + 0.5 + ] + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "translate", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "fav-airport-18", + "text-field": "abc", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "symbol-placement": "line", + "symbol-spacing": 50 + }, + "paint": { + "icon-opacity": 1, + "text-color": "hsl(0, 82%, 48%)", + "icon-translate": [ + "interpolate", + ["exponential", 2.0], + ["zoom"], + 9, + ["literal", [0, 0]], + 14, + ["literal", [-130, -130]] + ], + "text-translate": [ + "interpolate", + ["exponential", 1.2], + ["zoom"], + 9, + ["literal", [0, 0]], + 13, + ["literal", [0, -130]] + ] + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/debug/collision-icon-text-point-translate/expected.png b/metrics/integration/render-tests/debug/collision-icon-text-point-translate/expected.png new file mode 100644 index 00000000000..bb2a67c4964 Binary files /dev/null and b/metrics/integration/render-tests/debug/collision-icon-text-point-translate/expected.png differ diff --git a/metrics/integration/render-tests/debug/collision-icon-text-point-translate/style.json b/metrics/integration/render-tests/debug/collision-icon-text-point-translate/style.json new file mode 100644 index 00000000000..3103b50a10c --- /dev/null +++ b/metrics/integration/render-tests/debug/collision-icon-text-point-translate/style.json @@ -0,0 +1,75 @@ +{ + "version": 8, + "metadata": { + "test": { + "collisionDebug": true, + "height": 256, + "width" : 256 + } + }, + "center": [ + 0, + 0 + ], + "zoom": 12, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "translate", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "fav-airport-18", + "text-field": "abc", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "symbol-placement": "point", + "symbol-spacing": 20 + }, + "paint": { + "icon-opacity": 1, + "text-color": "hsl(0, 82%, 48%)", + "icon-translate": [ + "interpolate", + ["exponential", 2.0], + ["zoom"], + 9, + ["literal", [0, 0]], + 14, + ["literal", [-130, -130]] + ], + "text-translate": [ + "interpolate", + ["exponential", 1.2], + ["zoom"], + 9, + ["literal", [0, 0]], + 13, + ["literal", [0, -130]] + ] + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/debug/collision-lines-overscaled/expected.png b/metrics/integration/render-tests/debug/collision-lines-overscaled/expected.png new file mode 100644 index 00000000000..4c68f473ba3 Binary files /dev/null and b/metrics/integration/render-tests/debug/collision-lines-overscaled/expected.png differ diff --git a/metrics/integration/render-tests/debug/collision-lines-overscaled/style.json b/metrics/integration/render-tests/debug/collision-lines-overscaled/style.json new file mode 100644 index 00000000000..d482505a6b3 --- /dev/null +++ b/metrics/integration/render-tests/debug/collision-lines-overscaled/style.json @@ -0,0 +1,61 @@ +{ + "version": 8, + "metadata": { + "test": { + "collisionDebug": true, + "width": 512, + "height": 128 + } + }, + "center": [ + 0, + 0 + ], + "zoom": 4, + "sources": { + "geojson": { + "type": "geojson", + "maxzoom": 1, + "data": { + "type": "Feature", + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -10, + 0 + ], + [ + 10, + 0 + ] + ] + } + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "line", + "type": "symbol", + "source": "geojson", + "layout": { + "text-field": "Cover me in Circles", + "symbol-spacing": 15, + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "symbol-placement": "line" + } + } + ] +} diff --git a/metrics/integration/render-tests/debug/collision-lines-pitched/expected.png b/metrics/integration/render-tests/debug/collision-lines-pitched/expected.png new file mode 100644 index 00000000000..bb2254df577 Binary files /dev/null and b/metrics/integration/render-tests/debug/collision-lines-pitched/expected.png differ diff --git a/metrics/integration/render-tests/debug/collision-lines-pitched/style.json b/metrics/integration/render-tests/debug/collision-lines-pitched/style.json new file mode 100644 index 00000000000..639f2f0a236 --- /dev/null +++ b/metrics/integration/render-tests/debug/collision-lines-pitched/style.json @@ -0,0 +1,55 @@ +{ + "version": 8, + "metadata": { + "test": { + "collisionDebug": true, + "width": 500, + "height": 500 + } + }, + "center": [ + -74.522, + 39.92 + ], + "pitch": 30, + "zoom": 7.5, + "sources": { + "us-counties": { + "type": "vector", + "maxzoom": 7, + "minzoom": 7, + "tiles": [ + "local://tiles/counties-{z}-{x}-{y}.mvt" + ] + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "counties", + "type": "symbol", + "source": "us-counties", + "source-layer": "counties", + "layout": { + "text-field": "{name}", + "text-size": 11, + "symbol-spacing": 60, + "text-max-angle": 1000, + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "symbol-placement": "line" + }, + "interactive": true + } + ] +} diff --git a/metrics/integration/render-tests/debug/collision-lines/expected.png b/metrics/integration/render-tests/debug/collision-lines/expected.png new file mode 100644 index 00000000000..a2476e20f8c Binary files /dev/null and b/metrics/integration/render-tests/debug/collision-lines/expected.png differ diff --git a/metrics/integration/render-tests/debug/collision-lines/style.json b/metrics/integration/render-tests/debug/collision-lines/style.json new file mode 100644 index 00000000000..65fd31be232 --- /dev/null +++ b/metrics/integration/render-tests/debug/collision-lines/style.json @@ -0,0 +1,54 @@ +{ + "version": 8, + "metadata": { + "test": { + "collisionDebug": true, + "width": 500, + "height": 500 + } + }, + "center": [ + -74.522, + 39.92 + ], + "zoom": 7, + "sources": { + "us-counties": { + "type": "vector", + "maxzoom": 7, + "minzoom": 7, + "tiles": [ + "local://tiles/counties-{z}-{x}-{y}.mvt" + ] + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "counties", + "type": "symbol", + "source": "us-counties", + "source-layer": "counties", + "layout": { + "text-field": "{name}", + "text-size": 11, + "symbol-spacing": 60, + "text-max-angle": 1000, + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "symbol-placement": "line" + }, + "interactive": true + } + ] +} diff --git a/metrics/integration/render-tests/debug/collision-overscaled/expected.png b/metrics/integration/render-tests/debug/collision-overscaled/expected.png new file mode 100644 index 00000000000..bf4ff9e9246 Binary files /dev/null and b/metrics/integration/render-tests/debug/collision-overscaled/expected.png differ diff --git a/metrics/integration/render-tests/debug/collision-overscaled/style.json b/metrics/integration/render-tests/debug/collision-overscaled/style.json new file mode 100644 index 00000000000..94c0f8566f8 --- /dev/null +++ b/metrics/integration/render-tests/debug/collision-overscaled/style.json @@ -0,0 +1,53 @@ +{ + "version": 8, + "metadata": { + "test": { + "collisionDebug": true, + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 17, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "line", + "type": "symbol", + "source": "mapbox", + "source-layer": "road_label", + "layout": { + "icon-image": "triangle-stroked-12", + "text-field": "test test", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "symbol-placement": "point", + "symbol-spacing": 20 + }, + "paint": { + "icon-opacity": 1 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/debug/collision-pitched-wrapped/expected.png b/metrics/integration/render-tests/debug/collision-pitched-wrapped/expected.png new file mode 100644 index 00000000000..d23243aa8ae Binary files /dev/null and b/metrics/integration/render-tests/debug/collision-pitched-wrapped/expected.png differ diff --git a/metrics/integration/render-tests/debug/collision-pitched-wrapped/style.json b/metrics/integration/render-tests/debug/collision-pitched-wrapped/style.json new file mode 100644 index 00000000000..eb29afbe093 --- /dev/null +++ b/metrics/integration/render-tests/debug/collision-pitched-wrapped/style.json @@ -0,0 +1,48 @@ +{ + "version": 8, + "metadata": { + "test": { + "collisionDebug": true, + "width": 500, + "height": 500, + "allowed": 0.005 + } + }, + "center": [ + 0, + 0 + ], + "zoom": 1, + "pitch": 60, + "bearing": 90, + "sources": { + "geojson": { + "type": "geojson", + "data": "local://data/places.geojson" + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "symbol-placement": "point", + "text-field": "test test test", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + } + } + ] +} diff --git a/metrics/integration/render-tests/debug/collision-pitched/expected.png b/metrics/integration/render-tests/debug/collision-pitched/expected.png new file mode 100644 index 00000000000..d1eb3bf6a38 Binary files /dev/null and b/metrics/integration/render-tests/debug/collision-pitched/expected.png differ diff --git a/metrics/integration/render-tests/debug/collision-pitched/style.json b/metrics/integration/render-tests/debug/collision-pitched/style.json new file mode 100644 index 00000000000..36b3e532f5e --- /dev/null +++ b/metrics/integration/render-tests/debug/collision-pitched/style.json @@ -0,0 +1,48 @@ +{ + "version": 8, + "metadata": { + "test": { + "collisionDebug": true, + "width": 500, + "height": 500, + "allowed": 0.005 + } + }, + "center": [ + 0, + 0 + ], + "zoom": 3, + "pitch": 60, + "bearing": 90, + "sources": { + "geojson": { + "type": "geojson", + "data": "local://data/places.geojson" + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "symbol-placement": "point", + "text-field": "test test test", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + } + } + ] +} diff --git a/metrics/integration/render-tests/debug/collision/expected.png b/metrics/integration/render-tests/debug/collision/expected.png new file mode 100644 index 00000000000..6dc313d9531 Binary files /dev/null and b/metrics/integration/render-tests/debug/collision/expected.png differ diff --git a/metrics/integration/render-tests/debug/collision/style.json b/metrics/integration/render-tests/debug/collision/style.json new file mode 100644 index 00000000000..867fbc6483b --- /dev/null +++ b/metrics/integration/render-tests/debug/collision/style.json @@ -0,0 +1,53 @@ +{ + "version": 8, + "metadata": { + "test": { + "collisionDebug": true, + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "line", + "type": "symbol", + "source": "mapbox", + "source-layer": "road_label", + "layout": { + "icon-image": "triangle-stroked-12", + "text-field": "test test", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "symbol-placement": "point", + "symbol-spacing": 20 + }, + "paint": { + "icon-opacity": 1 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/debug/overdraw/expected.png b/metrics/integration/render-tests/debug/overdraw/expected.png new file mode 100644 index 00000000000..fcb8d244296 Binary files /dev/null and b/metrics/integration/render-tests/debug/overdraw/expected.png differ diff --git a/metrics/integration/render-tests/debug/overdraw/style.json b/metrics/integration/render-tests/debug/overdraw/style.json new file mode 100644 index 00000000000..0fdba9345d8 --- /dev/null +++ b/metrics/integration/render-tests/debug/overdraw/style.json @@ -0,0 +1,39 @@ +{ + "version": 8, + "metadata": { + "test": { + "showOverdrawInspector": true + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "road", + "type": "line", + "source": "mapbox", + "source-layer": "road" + } + ] +} diff --git a/metrics/integration/render-tests/debug/padding/ease-to-btm-distort/expected.png b/metrics/integration/render-tests/debug/padding/ease-to-btm-distort/expected.png new file mode 100644 index 00000000000..f7ddba62f96 Binary files /dev/null and b/metrics/integration/render-tests/debug/padding/ease-to-btm-distort/expected.png differ diff --git a/metrics/integration/render-tests/debug/padding/ease-to-btm-distort/style.json b/metrics/integration/render-tests/debug/padding/ease-to-btm-distort/style.json new file mode 100644 index 00000000000..df80784d22b --- /dev/null +++ b/metrics/integration/render-tests/debug/padding/ease-to-btm-distort/style.json @@ -0,0 +1,112 @@ +{ + "version": 8, + "metadata": { + "test": { + "showPadding": true, + "height": 256, + "operations": [ + [ + "easeTo", + { + "padding": { + "top": 10, + "left": 50, + "bottom": 100, + "right": 10 + } + } + ], + [ + "wait", + 500 + ] + ] + } + }, + "center": [ 0, 0 ], + "zoom": 8, + "pitch": 60, + "sources": { + "northward-road": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "geometry": { + "type": "LineString", + "coordinates": [ + [ 0, -25], + [ 0, 25] + ] + } + },{ + "type": "Feature", + "geometry": { + "type": "LineString", + "coordinates": [ + [ -0.2, -25], + [ -0.2, 25] + ] + } + },{ + "type": "Feature", + "geometry": { + "type": "LineString", + "coordinates": [ + [ 0.2, -25], + [ 0.2, 25] + ] + } + },{ + "type": "Feature", + "geometry": { + "type": "LineString", + "coordinates": [ + [ -25, 0.2], + [ 25, 0.2] + ] + } + },{ + "type": "Feature", + "geometry": { + "type": "LineString", + "coordinates": [ + [ -25, -0.2], + [ 25, -0.2] + ] + } + },{ + "type": "Feature", + "geometry": { + "type": "LineString", + "coordinates": [ + [ -25, 0], + [ 25, 0] + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "line", + "type": "line", + "source": "northward-road", + "layout": {}, + "paint": { + "line-width": 10 + } + } + ] +} diff --git a/metrics/integration/render-tests/debug/padding/ease-to-left-distort/expected.png b/metrics/integration/render-tests/debug/padding/ease-to-left-distort/expected.png new file mode 100644 index 00000000000..2103cffb96c Binary files /dev/null and b/metrics/integration/render-tests/debug/padding/ease-to-left-distort/expected.png differ diff --git a/metrics/integration/render-tests/debug/padding/ease-to-left-distort/style.json b/metrics/integration/render-tests/debug/padding/ease-to-left-distort/style.json new file mode 100644 index 00000000000..9f9d70ad524 --- /dev/null +++ b/metrics/integration/render-tests/debug/padding/ease-to-left-distort/style.json @@ -0,0 +1,112 @@ +{ + "version": 8, + "metadata": { + "test": { + "showPadding": true, + "height": 256, + "operations": [ + [ + "easeTo", + { + "padding": { + "top": 20, + "left": 250, + "bottom": 10, + "right": 15 + } + } + ], + [ + "wait", + 500 + ] + ] + } + }, + "center": [ 0, 0 ], + "zoom": 8, + "pitch": 60, + "sources": { + "northward-road": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "geometry": { + "type": "LineString", + "coordinates": [ + [ 0, -25], + [ 0, 25] + ] + } + },{ + "type": "Feature", + "geometry": { + "type": "LineString", + "coordinates": [ + [ -0.2, -25], + [ -0.2, 25] + ] + } + },{ + "type": "Feature", + "geometry": { + "type": "LineString", + "coordinates": [ + [ 0.2, -25], + [ 0.2, 25] + ] + } + },{ + "type": "Feature", + "geometry": { + "type": "LineString", + "coordinates": [ + [ -25, 0.2], + [ 25, 0.2] + ] + } + },{ + "type": "Feature", + "geometry": { + "type": "LineString", + "coordinates": [ + [ -25, -0.2], + [ 25, -0.2] + ] + } + },{ + "type": "Feature", + "geometry": { + "type": "LineString", + "coordinates": [ + [ -25, 0], + [ 25, 0] + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "line", + "type": "line", + "source": "northward-road", + "layout": {}, + "paint": { + "line-width": 10 + } + } + ] +} diff --git a/metrics/integration/render-tests/debug/padding/ease-to-no-distort/expected.png b/metrics/integration/render-tests/debug/padding/ease-to-no-distort/expected.png new file mode 100644 index 00000000000..e709e1c98ed Binary files /dev/null and b/metrics/integration/render-tests/debug/padding/ease-to-no-distort/expected.png differ diff --git a/metrics/integration/render-tests/debug/padding/ease-to-no-distort/style.json b/metrics/integration/render-tests/debug/padding/ease-to-no-distort/style.json new file mode 100644 index 00000000000..46ec2f25030 --- /dev/null +++ b/metrics/integration/render-tests/debug/padding/ease-to-no-distort/style.json @@ -0,0 +1,127 @@ +{ + "version": 8, + "metadata": { + "test": { + "showPadding": true, + "height": 256, + "operations": [ + [ + "easeTo", + { + "padding": { + "top": 20, + "left": 50, + "bottom": 10, + "right": 250 + } + } + ], + [ + "wait", + 500 + ], + [ + "easeTo", + { + "padding": { + "top": 10, + "left": 10, + "bottom": 10, + "right": 10 + } + } + ], + [ + "wait", + 500 + ] + ] + } + }, + "center": [ 0, 0 ], + "zoom": 8, + "pitch": 60, + "sources": { + "northward-road": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "geometry": { + "type": "LineString", + "coordinates": [ + [ 0, -25], + [ 0, 25] + ] + } + },{ + "type": "Feature", + "geometry": { + "type": "LineString", + "coordinates": [ + [ -0.2, -25], + [ -0.2, 25] + ] + } + },{ + "type": "Feature", + "geometry": { + "type": "LineString", + "coordinates": [ + [ 0.2, -25], + [ 0.2, 25] + ] + } + },{ + "type": "Feature", + "geometry": { + "type": "LineString", + "coordinates": [ + [ -25, 0.2], + [ 25, 0.2] + ] + } + },{ + "type": "Feature", + "geometry": { + "type": "LineString", + "coordinates": [ + [ -25, -0.2], + [ 25, -0.2] + ] + } + },{ + "type": "Feature", + "geometry": { + "type": "LineString", + "coordinates": [ + [ -25, 0], + [ 25, 0] + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "line", + "type": "line", + "source": "northward-road", + "layout": {}, + "paint": { + "line-width": 10 + } + } + ] +} diff --git a/metrics/integration/render-tests/debug/padding/ease-to-right-distort/expected.png b/metrics/integration/render-tests/debug/padding/ease-to-right-distort/expected.png new file mode 100644 index 00000000000..ddf26422755 Binary files /dev/null and b/metrics/integration/render-tests/debug/padding/ease-to-right-distort/expected.png differ diff --git a/metrics/integration/render-tests/debug/padding/ease-to-right-distort/style.json b/metrics/integration/render-tests/debug/padding/ease-to-right-distort/style.json new file mode 100644 index 00000000000..ccc36c279f8 --- /dev/null +++ b/metrics/integration/render-tests/debug/padding/ease-to-right-distort/style.json @@ -0,0 +1,112 @@ +{ + "version": 8, + "metadata": { + "test": { + "showPadding": true, + "height": 256, + "operations": [ + [ + "easeTo", + { + "padding": { + "top": 20, + "left": 50, + "bottom": 10, + "right": 250 + } + } + ], + [ + "wait", + 500 + ] + ] + } + }, + "center": [ 0, 0 ], + "zoom": 8, + "pitch": 60, + "sources": { + "northward-road": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "geometry": { + "type": "LineString", + "coordinates": [ + [ 0, -25], + [ 0, 25] + ] + } + },{ + "type": "Feature", + "geometry": { + "type": "LineString", + "coordinates": [ + [ -0.2, -25], + [ -0.2, 25] + ] + } + },{ + "type": "Feature", + "geometry": { + "type": "LineString", + "coordinates": [ + [ 0.2, -25], + [ 0.2, 25] + ] + } + },{ + "type": "Feature", + "geometry": { + "type": "LineString", + "coordinates": [ + [ -25, 0.2], + [ 25, 0.2] + ] + } + },{ + "type": "Feature", + "geometry": { + "type": "LineString", + "coordinates": [ + [ -25, -0.2], + [ 25, -0.2] + ] + } + },{ + "type": "Feature", + "geometry": { + "type": "LineString", + "coordinates": [ + [ -25, 0], + [ 25, 0] + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "line", + "type": "line", + "source": "northward-road", + "layout": {}, + "paint": { + "line-width": 10 + } + } + ] +} diff --git a/metrics/integration/render-tests/debug/padding/ease-to-top-distort/expected.png b/metrics/integration/render-tests/debug/padding/ease-to-top-distort/expected.png new file mode 100644 index 00000000000..57adfa9d76a Binary files /dev/null and b/metrics/integration/render-tests/debug/padding/ease-to-top-distort/expected.png differ diff --git a/metrics/integration/render-tests/debug/padding/ease-to-top-distort/style.json b/metrics/integration/render-tests/debug/padding/ease-to-top-distort/style.json new file mode 100644 index 00000000000..183d7da9c15 --- /dev/null +++ b/metrics/integration/render-tests/debug/padding/ease-to-top-distort/style.json @@ -0,0 +1,112 @@ +{ + "version": 8, + "metadata": { + "test": { + "showPadding": true, + "height": 256, + "operations": [ + [ + "easeTo", + { + "padding": { + "top": 100, + "left": 50, + "bottom": 10, + "right": 250 + } + } + ], + [ + "wait", + 500 + ] + ] + } + }, + "center": [ 0, 0 ], + "zoom": 8, + "pitch": 60, + "sources": { + "northward-road": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "geometry": { + "type": "LineString", + "coordinates": [ + [ 0, -25], + [ 0, 25] + ] + } + },{ + "type": "Feature", + "geometry": { + "type": "LineString", + "coordinates": [ + [ -0.2, -25], + [ -0.2, 25] + ] + } + },{ + "type": "Feature", + "geometry": { + "type": "LineString", + "coordinates": [ + [ 0.2, -25], + [ 0.2, 25] + ] + } + },{ + "type": "Feature", + "geometry": { + "type": "LineString", + "coordinates": [ + [ -25, 0.2], + [ 25, 0.2] + ] + } + },{ + "type": "Feature", + "geometry": { + "type": "LineString", + "coordinates": [ + [ -25, -0.2], + [ 25, -0.2] + ] + } + },{ + "type": "Feature", + "geometry": { + "type": "LineString", + "coordinates": [ + [ -25, 0], + [ 25, 0] + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "line", + "type": "line", + "source": "northward-road", + "layout": {}, + "paint": { + "line-width": 10 + } + } + ] +} diff --git a/metrics/integration/render-tests/debug/padding/set-padding/expected.png b/metrics/integration/render-tests/debug/padding/set-padding/expected.png new file mode 100644 index 00000000000..c1d5e83e1eb Binary files /dev/null and b/metrics/integration/render-tests/debug/padding/set-padding/expected.png differ diff --git a/metrics/integration/render-tests/debug/padding/set-padding/style.json b/metrics/integration/render-tests/debug/padding/set-padding/style.json new file mode 100644 index 00000000000..c54c836ed35 --- /dev/null +++ b/metrics/integration/render-tests/debug/padding/set-padding/style.json @@ -0,0 +1,82 @@ +{ + "version": 8, + "metadata": { + "test": { + "showPadding": true, + "height": 256, + "operations": [ + [ + "setPadding", + { + "top": 20, + "left": 125, + "bottom": 10, + "right": 15 + } + ], + [ + "wait" + ] + ] + } + }, + "center": [ 0, 0 ], + "zoom": 8, + "pitch": 60, + "sources": { + "northward-road": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "geometry": { + "type": "LineString", + "coordinates": [ + [ 0, -25], + [ 0, 25] + ] + } + },{ + "type": "Feature", + "geometry": { + "type": "LineString", + "coordinates": [ + [ -0.2, -25], + [ -0.2, 25] + ] + } + },{ + "type": "Feature", + "geometry": { + "type": "LineString", + "coordinates": [ + [ 0.2, -25], + [ 0.2, 25] + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "line", + "type": "line", + "source": "northward-road", + "layout": {}, + "paint": { + "line-width": 10 + } + } + ] +} diff --git a/metrics/integration/render-tests/debug/raster/expected.png b/metrics/integration/render-tests/debug/raster/expected.png new file mode 100644 index 00000000000..04f45dc70c9 Binary files /dev/null and b/metrics/integration/render-tests/debug/raster/expected.png differ diff --git a/metrics/integration/render-tests/debug/raster/style.json b/metrics/integration/render-tests/debug/raster/style.json new file mode 100644 index 00000000000..9cc0d03cf9f --- /dev/null +++ b/metrics/integration/render-tests/debug/raster/style.json @@ -0,0 +1,47 @@ +{ + "version": 8, + "metadata": { + "test": { + "debug": true, + "height": 256, + "allowed": 0.0062 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 16, + "sources": { + "satellite": { + "type": "raster", + "tiles": [ + "local://tiles/{z}-{x}-{y}.satellite.png" + ], + "maxzoom": 17, + "tileSize": 256 + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "raster", + "type": "raster", + "source": "satellite", + "layout": { + }, + "paint": { + "raster-opacity": 1, + "raster-fade-duration": 0 + } + } + ] +} diff --git a/metrics/integration/render-tests/debug/tile-overscaled/expected.png b/metrics/integration/render-tests/debug/tile-overscaled/expected.png new file mode 100644 index 00000000000..8ea8baa3839 Binary files /dev/null and b/metrics/integration/render-tests/debug/tile-overscaled/expected.png differ diff --git a/metrics/integration/render-tests/debug/tile-overscaled/style.json b/metrics/integration/render-tests/debug/tile-overscaled/style.json new file mode 100644 index 00000000000..3d7fce91ec6 --- /dev/null +++ b/metrics/integration/render-tests/debug/tile-overscaled/style.json @@ -0,0 +1,53 @@ +{ + "version": 8, + "metadata": { + "test": { + "debug": true, + "height": 256, + "allowed": 0.0039 + } + }, + "center": [ + 13.42498, + 52.49608 + ], + "zoom": 17, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "line", + "type": "symbol", + "source": "mapbox", + "source-layer": "road_label", + "layout": { + "text-field": "test", + "text-allow-overlap": true, + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "symbol-placement": "point" + }, + "paint": { + "icon-opacity": 1 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/debug/tile/expected.png b/metrics/integration/render-tests/debug/tile/expected.png new file mode 100644 index 00000000000..12c0ba92834 Binary files /dev/null and b/metrics/integration/render-tests/debug/tile/expected.png differ diff --git a/metrics/integration/render-tests/debug/tile/style.json b/metrics/integration/render-tests/debug/tile/style.json new file mode 100644 index 00000000000..fc6888bc79a --- /dev/null +++ b/metrics/integration/render-tests/debug/tile/style.json @@ -0,0 +1,69 @@ +{ + "version": 8, + "metadata": { + "test": { + "debug": true, + "height": 256, + "allowed": 0.0022 + } + }, + "center": [ + 13.425481, + 52.496057 + ], + "zoom": 14, + "sources": { + "satellite": { + "type": "raster", + "tiles": [ + "local://tiles/{z}-{x}-{y}.satellite.png" + ], + "maxzoom": 1, + "tileSize": 256 + }, + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "raster", + "type": "raster", + "source": "satellite", + "paint": { + "raster-fade-duration": 0 + } + }, + { + "id": "line", + "type": "symbol", + "source": "mapbox", + "source-layer": "road_label", + "layout": { + "text-field": "test", + "text-allow-overlap": true, + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "symbol-placement": "point" + }, + "paint": { + "icon-opacity": 1 + } + } + ] +} diff --git a/metrics/integration/render-tests/empty/empty/expected.png b/metrics/integration/render-tests/empty/empty/expected.png new file mode 100644 index 00000000000..724d17cd7d3 Binary files /dev/null and b/metrics/integration/render-tests/empty/empty/expected.png differ diff --git a/metrics/integration/render-tests/empty/empty/style.json b/metrics/integration/render-tests/empty/empty/style.json new file mode 100644 index 00000000000..6a58d312136 --- /dev/null +++ b/metrics/integration/render-tests/empty/empty/style.json @@ -0,0 +1,16 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + 0, + 0 + ], + "zoom": 0, + "sources": {}, + "layers": [] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/extent/1024-circle/expected.png b/metrics/integration/render-tests/extent/1024-circle/expected.png new file mode 100644 index 00000000000..9a450cf1ceb Binary files /dev/null and b/metrics/integration/render-tests/extent/1024-circle/expected.png differ diff --git a/metrics/integration/render-tests/extent/1024-circle/style.json b/metrics/integration/render-tests/extent/1024-circle/style.json new file mode 100644 index 00000000000..e114922d42e --- /dev/null +++ b/metrics/integration/render-tests/extent/1024-circle/style.json @@ -0,0 +1,39 @@ +{ + "version": 8, + "metadata": { + "test": {} + }, + "center": [ + 0, + 0 + ], + "zoom": 0, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/extent1024-14-8802-5374.mvt" + ] + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "mapbox", + "type": "circle", + "source": "mapbox", + "source-layer": "poi_label", + "paint": { + "circle-color": "black", + "circle-radius": 5 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/extent/1024-fill/expected.png b/metrics/integration/render-tests/extent/1024-fill/expected.png new file mode 100644 index 00000000000..235099f563a Binary files /dev/null and b/metrics/integration/render-tests/extent/1024-fill/expected.png differ diff --git a/metrics/integration/render-tests/extent/1024-fill/style.json b/metrics/integration/render-tests/extent/1024-fill/style.json new file mode 100644 index 00000000000..95878250728 --- /dev/null +++ b/metrics/integration/render-tests/extent/1024-fill/style.json @@ -0,0 +1,41 @@ +{ + "version": 8, + "metadata": { + "test": { + "allowed": 0.0008 + } + }, + "center": [ + 0, + 0 + ], + "zoom": 0, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/extent1024-14-8802-5374.mvt" + ] + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "mapbox", + "type": "fill", + "source": "mapbox", + "source-layer": "water", + "paint": { + "fill-color": "black", + "fill-antialias": true + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/extent/1024-line/expected.png b/metrics/integration/render-tests/extent/1024-line/expected.png new file mode 100644 index 00000000000..97aa7d28d70 Binary files /dev/null and b/metrics/integration/render-tests/extent/1024-line/expected.png differ diff --git a/metrics/integration/render-tests/extent/1024-line/style.json b/metrics/integration/render-tests/extent/1024-line/style.json new file mode 100644 index 00000000000..e0d617140fd --- /dev/null +++ b/metrics/integration/render-tests/extent/1024-line/style.json @@ -0,0 +1,41 @@ +{ + "version": 8, + "metadata": { + "test": { + "allowed": 0.0005 + } + }, + "center": [ + 0, + 0 + ], + "zoom": 0, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/extent1024-14-8802-5374.mvt" + ] + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "mapbox", + "type": "line", + "source": "mapbox", + "source-layer": "road", + "paint": { + "line-color": "black", + "line-width": 1 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/extent/1024-symbol/expected.png b/metrics/integration/render-tests/extent/1024-symbol/expected.png new file mode 100644 index 00000000000..851526dda65 Binary files /dev/null and b/metrics/integration/render-tests/extent/1024-symbol/expected.png differ diff --git a/metrics/integration/render-tests/extent/1024-symbol/style.json b/metrics/integration/render-tests/extent/1024-symbol/style.json new file mode 100644 index 00000000000..956ec14d7fa --- /dev/null +++ b/metrics/integration/render-tests/extent/1024-symbol/style.json @@ -0,0 +1,49 @@ +{ + "version": 8, + "metadata": { + "test": { + "allowed": 0.003 + } + }, + "center": [ + 0, + 0 + ], + "sprite": "local://sprites/sprite", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "zoom": 0, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/extent1024-14-8802-5374.mvt" + ] + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "mapbox", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "layout": { + "icon-image": "dog-park-12", + "text-field": "mapbox", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-allow-overlap": true, + "text-ignore-placement": true + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/feature-state/composite-expression/expected.png b/metrics/integration/render-tests/feature-state/composite-expression/expected.png new file mode 100644 index 00000000000..44cb3becbdc Binary files /dev/null and b/metrics/integration/render-tests/feature-state/composite-expression/expected.png differ diff --git a/metrics/integration/render-tests/feature-state/composite-expression/style.json b/metrics/integration/render-tests/feature-state/composite-expression/style.json new file mode 100644 index 00000000000..0c9c7f8d4d8 --- /dev/null +++ b/metrics/integration/render-tests/feature-state/composite-expression/style.json @@ -0,0 +1,67 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setFeatureState", + { + "source": "geojson", + "id": "1" + }, + { + "color": "red" + } + ], + [ + "wait" + ] + ] + } + }, + "zoom": 2, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Feature", + "id": "1", + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson", + "paint": { + "circle-radius": 5, + "circle-color": [ + "step", + [ + "zoom" + ], + "black", + 1, + [ + "coalesce", + [ + "feature-state", + "color" + ], + "black" + ] + ] + } + } + ] +} diff --git a/metrics/integration/render-tests/feature-state/data-expression/expected.png b/metrics/integration/render-tests/feature-state/data-expression/expected.png new file mode 100644 index 00000000000..44cb3becbdc Binary files /dev/null and b/metrics/integration/render-tests/feature-state/data-expression/expected.png differ diff --git a/metrics/integration/render-tests/feature-state/data-expression/style.json b/metrics/integration/render-tests/feature-state/data-expression/style.json new file mode 100644 index 00000000000..6c045c000ec --- /dev/null +++ b/metrics/integration/render-tests/feature-state/data-expression/style.json @@ -0,0 +1,59 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setFeatureState", + { + "source": "geojson", + "id": "1" + }, + { + "color": "red" + } + ], + [ + "wait" + ] + ] + } + }, + "zoom": 2, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Feature", + "id": "1", + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson", + "paint": { + "circle-radius": 5, + "circle-color": [ + "coalesce", + [ + "feature-state", + "color" + ], + "black" + ] + } + } + ] +} diff --git a/metrics/integration/render-tests/feature-state/promote-id-circle/expected.png b/metrics/integration/render-tests/feature-state/promote-id-circle/expected.png new file mode 100644 index 00000000000..1587818fee0 Binary files /dev/null and b/metrics/integration/render-tests/feature-state/promote-id-circle/expected.png differ diff --git a/metrics/integration/render-tests/feature-state/promote-id-circle/style.json b/metrics/integration/render-tests/feature-state/promote-id-circle/style.json new file mode 100644 index 00000000000..109309279d7 --- /dev/null +++ b/metrics/integration/render-tests/feature-state/promote-id-circle/style.json @@ -0,0 +1,99 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 32, + "operations": [ + [ + "setFeatureState", + { + "source": "geojson", + "id": "9007199254740992" + }, + { + "color": "red" + } + ], + [ + "setFeatureState", + { + "source": "geojson", + "id": "1.2" + }, + { + "color": "blue" + } + ], + [ + "wait" + ] + ] + } + }, + "zoom": 2, + "sources": { + "geojson": { + "type": "geojson", + "promoteId": "foo", + "data": { + "type": "FeatureCollection", + "features": [{ + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + }, + "properties": { + "foo": "9007199254740992" + } + }, { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ + 3, + 0 + ] + }, + "properties": { + "foo": "9007199254740993" + } + }, { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ + -3, + 0 + ] + }, + "properties": { + "foo": "1.2" + } + }] + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson", + "paint": { + "circle-radius": 5, + "circle-color": [ + "coalesce", + [ + "feature-state", + "color" + ], + "black" + ] + } + } + ] +} diff --git a/metrics/integration/render-tests/feature-state/promote-id-fill-extrusion/expected.png b/metrics/integration/render-tests/feature-state/promote-id-fill-extrusion/expected.png new file mode 100644 index 00000000000..e702d4b422f Binary files /dev/null and b/metrics/integration/render-tests/feature-state/promote-id-fill-extrusion/expected.png differ diff --git a/metrics/integration/render-tests/feature-state/promote-id-fill-extrusion/style.json b/metrics/integration/render-tests/feature-state/promote-id-fill-extrusion/style.json new file mode 100644 index 00000000000..a4a31d62dfa --- /dev/null +++ b/metrics/integration/render-tests/feature-state/promote-id-fill-extrusion/style.json @@ -0,0 +1,161 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 128, + "width": 512, + "operations": [ + [ + "setFeatureState", + { + "source": "geojson", + "id": "9007199254740992" + }, + { + "color": "red" + } + ], + [ + "setFeatureState", + { + "source": "geojson", + "id": "1.2" + }, + { + "color": "blue" + } + ], + [ + "wait" + ] + ] + } + }, + "sources": { + "geojson": { + "type": "geojson", + "promoteId": "foo", + "data": { + "type": "FeatureCollection", + "features": [{ + "type": "Feature", + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -0.0005, + -0.0001 + ], + [ + -0.0005, + 0.0001 + ], + [ + -0.0003, + 0.0001 + ], + [ + -0.0003, + -0.0001 + ], + [ + -0.0005, + -0.0001 + ] + ] + ] + }, + "properties": { + "foo": "9007199254740992" + } + }, { + "type": "Feature", + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -0.0001, + -0.0001 + ], + [ + -0.0001, + 0.0001 + ], + [ + 0.0001, + 0.0001 + ], + [ + 0.0001, + -0.0001 + ], + [ + -0.0001, + -0.0001 + ] + ] + ] + }, + "properties": { + "foo": "9007199254740993" + } + }, { + "type": "Feature", + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + 0.0003, + -0.0001 + ], + [ + 0.0003, + 0.0001 + ], + [ + 0.0005, + 0.0001 + ], + [ + 0.0005, + -0.0001 + ], + [ + 0.0003, + -0.0001 + ] + ] + ] + }, + "properties": { + "foo": "1.2" + } + }] + } + } + }, + "pitch": 60, + "zoom": 18, + "layers": [ + { + "id": "fill-extrusion", + "type": "fill-extrusion", + "source": "geojson", + "paint": { + "fill-extrusion-height": 10, + "fill-extrusion-base": 0, + "fill-extrusion-color": [ + "coalesce", + [ + "feature-state", + "color" + ], + "black" + ] + } + } + ] +} diff --git a/metrics/integration/render-tests/feature-state/promote-id-fill/expected.png b/metrics/integration/render-tests/feature-state/promote-id-fill/expected.png new file mode 100644 index 00000000000..aa7e7f3f27b Binary files /dev/null and b/metrics/integration/render-tests/feature-state/promote-id-fill/expected.png differ diff --git a/metrics/integration/render-tests/feature-state/promote-id-fill/style.json b/metrics/integration/render-tests/feature-state/promote-id-fill/style.json new file mode 100644 index 00000000000..31514683e4d --- /dev/null +++ b/metrics/integration/render-tests/feature-state/promote-id-fill/style.json @@ -0,0 +1,114 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 32, + "operations": [ + [ + "setFeatureState", + { + "source": "geojson", + "id": "9007199254740992" + }, + { + "color": "red" + } + ], + [ + "setFeatureState", + { + "source": "geojson", + "id": "1.2" + }, + { + "color": "blue" + } + ], + [ + "wait" + ] + ] + } + }, + "zoom": 2, + "sources": { + "geojson": { + "type": "geojson", + "promoteId": "foo", + "data": { + "type": "FeatureCollection", + "features": [{ + "type": "Feature", + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ -5, -1 ], + [ -5, 1 ], + [ -3, 1 ], + [ -3, -1 ], + [ -5, -1 ] + ] + ] + }, + "properties": { + "foo": "9007199254740992" + } + }, { + "type": "Feature", + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ -1, -1 ], + [ -1, 1 ], + [ 1, 1 ], + [ 1, -1 ], + [ -0.5, -1 ] + ] + ] + }, + "properties": { + "foo": "9007199254740993" + } + }, { + "type": "Feature", + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ 3, -1 ], + [ 3, 1 ], + [ 5, 1 ], + [ 5, -1 ], + [ 3, -1 ] + ] + ] + }, + "properties": { + "foo": "1.2" + } + }] + } + } + }, + "layers": [ + { + "id": "fill", + "type": "fill", + "source": "geojson", + "paint": { + "fill-antialias": false, + "fill-color": [ + "coalesce", + [ + "feature-state", + "color" + ], + "black" + ] + } + } + ] +} diff --git a/metrics/integration/render-tests/feature-state/promote-id-line/expected.png b/metrics/integration/render-tests/feature-state/promote-id-line/expected.png new file mode 100644 index 00000000000..55bfc9fa640 Binary files /dev/null and b/metrics/integration/render-tests/feature-state/promote-id-line/expected.png differ diff --git a/metrics/integration/render-tests/feature-state/promote-id-line/style.json b/metrics/integration/render-tests/feature-state/promote-id-line/style.json new file mode 100644 index 00000000000..b2ec7836cde --- /dev/null +++ b/metrics/integration/render-tests/feature-state/promote-id-line/style.json @@ -0,0 +1,116 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 32, + "operations": [ + [ + "setFeatureState", + { + "source": "geojson", + "id": "9007199254740992" + }, + { + "color": "red" + } + ], + [ + "setFeatureState", + { + "source": "geojson", + "id": "1.2" + }, + { + "color": "blue" + } + ], + [ + "wait" + ] + ] + } + }, + "sources": { + "geojson": { + "type": "geojson", + "promoteId": "foo", + "data": { + "type": "FeatureCollection", + "features": [{ + "type": "Feature", + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -10, + -10 + ], + [ + -10, + 10 + ] + ] + }, + "properties": { + "foo": "9007199254740992" + } + }, { + "type": "Feature", + "geometry": { + "type": "LineString", + "coordinates": [ + [ + 0, + -10 + ], + [ + 0, + 10 + ] + ] + }, + "properties": { + "foo": "9007199254740993" + } + }, { + "type": "Feature", + "geometry": { + "type": "LineString", + "coordinates": [ + [ + 10, + -10 + ], + [ + 10, + 10 + ] + ] + }, + "properties": { + "foo": "1.2" + } + }] + } + } + }, + "layers": [ + { + "id": "line", + "type": "line", + "source": "geojson", + "paint": { + "line-width": 5, + "line-color": [ + "coalesce", + [ + "feature-state", + "color" + ], + "black" + ] + } + } + ] +} diff --git a/metrics/integration/render-tests/feature-state/promote-id-symbol/expected.png b/metrics/integration/render-tests/feature-state/promote-id-symbol/expected.png new file mode 100644 index 00000000000..3c3d132c91a Binary files /dev/null and b/metrics/integration/render-tests/feature-state/promote-id-symbol/expected.png differ diff --git a/metrics/integration/render-tests/feature-state/promote-id-symbol/style.json b/metrics/integration/render-tests/feature-state/promote-id-symbol/style.json new file mode 100644 index 00000000000..374dc13e84e --- /dev/null +++ b/metrics/integration/render-tests/feature-state/promote-id-symbol/style.json @@ -0,0 +1,103 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 32, + "operations": [ + [ + "setFeatureState", + { + "source": "geojson", + "id": "9007199254740992" + }, + { + "color": "red" + } + ], + [ + "setFeatureState", + { + "source": "geojson", + "id": "1.2" + }, + { + "color": "blue" + } + ], + [ + "wait" + ] + ] + } + }, + "zoom": 2, + "sprite": "local://sprites/sprite", + "sources": { + "geojson": { + "type": "geojson", + "promoteId": "foo", + "data": { + "type": "FeatureCollection", + "features": [{ + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + }, + "properties": { + "foo": "9007199254740992" + } + }, { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ + 3, + 0 + ] + }, + "properties": { + "foo": "9007199254740993" + } + }, { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ + -3, + 0 + ] + }, + "properties": { + "foo": "1.2" + } + }] + } + } + }, + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "dot.sdf", + "icon-allow-overlap": true + }, + "paint": { + "icon-color": [ + "coalesce", + [ + "feature-state", + "color" + ], + "black" + ] + } + } + ] +} diff --git a/metrics/integration/render-tests/feature-state/vector-source/expected.png b/metrics/integration/render-tests/feature-state/vector-source/expected.png new file mode 100644 index 00000000000..d91b8b95aac Binary files /dev/null and b/metrics/integration/render-tests/feature-state/vector-source/expected.png differ diff --git a/metrics/integration/render-tests/feature-state/vector-source/style.json b/metrics/integration/render-tests/feature-state/vector-source/style.json new file mode 100644 index 00000000000..59efa088541 --- /dev/null +++ b/metrics/integration/render-tests/feature-state/vector-source/style.json @@ -0,0 +1,64 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256, + "operations": [ + [ + "setFeatureState", + { + "source": "mapbox", + "sourceLayer": "poi_label", + "id": "1000059876748" + }, + { + "color": "red" + } + ], + [ + "wait" + ] + ] + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "poi_label", + "type": "circle", + "source": "mapbox", + "source-layer": "poi_label", + "paint": { + "circle-radius": 5, + "circle-color": [ + "coalesce", + [ + "feature-state", + "color" + ], + "black" + ] + } + } + ] +} diff --git a/metrics/integration/render-tests/fill-antialias/false/expected.png b/metrics/integration/render-tests/fill-antialias/false/expected.png new file mode 100644 index 00000000000..ba8caeead69 Binary files /dev/null and b/metrics/integration/render-tests/fill-antialias/false/expected.png differ diff --git a/metrics/integration/render-tests/fill-antialias/false/style.json b/metrics/integration/render-tests/fill-antialias/false/style.json new file mode 100644 index 00000000000..fc9adb4e27c --- /dev/null +++ b/metrics/integration/render-tests/fill-antialias/false/style.json @@ -0,0 +1,51 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -10, + -10 + ], + [ + -10, + 10 + ], + [ + 10, + 10 + ], + [ + 10, + -10 + ], + [ + -10, + -10 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "fill", + "type": "fill", + "source": "geojson", + "paint": { + "fill-antialias": false + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/fill-color/default/expected.png b/metrics/integration/render-tests/fill-color/default/expected.png new file mode 100644 index 00000000000..ba8caeead69 Binary files /dev/null and b/metrics/integration/render-tests/fill-color/default/expected.png differ diff --git a/metrics/integration/render-tests/fill-color/default/style.json b/metrics/integration/render-tests/fill-color/default/style.json new file mode 100644 index 00000000000..fc9adb4e27c --- /dev/null +++ b/metrics/integration/render-tests/fill-color/default/style.json @@ -0,0 +1,51 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -10, + -10 + ], + [ + -10, + 10 + ], + [ + 10, + 10 + ], + [ + 10, + -10 + ], + [ + -10, + -10 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "fill", + "type": "fill", + "source": "geojson", + "paint": { + "fill-antialias": false + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/fill-color/function/expected.png b/metrics/integration/render-tests/fill-color/function/expected.png new file mode 100644 index 00000000000..366e9f2e5df Binary files /dev/null and b/metrics/integration/render-tests/fill-color/function/expected.png differ diff --git a/metrics/integration/render-tests/fill-color/function/style.json b/metrics/integration/render-tests/fill-color/function/style.json new file mode 100644 index 00000000000..9119cde4f00 --- /dev/null +++ b/metrics/integration/render-tests/fill-color/function/style.json @@ -0,0 +1,63 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -10, + -10 + ], + [ + -10, + 10 + ], + [ + 10, + 10 + ], + [ + 10, + -10 + ], + [ + -10, + -10 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "fill", + "type": "fill", + "source": "geojson", + "paint": { + "fill-antialias": false, + "fill-color": { + "stops": [ + [ + 0, + "green" + ], + [ + 1, + "blue" + ] + ] + } + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/fill-color/literal/expected.png b/metrics/integration/render-tests/fill-color/literal/expected.png new file mode 100644 index 00000000000..2b486b95236 Binary files /dev/null and b/metrics/integration/render-tests/fill-color/literal/expected.png differ diff --git a/metrics/integration/render-tests/fill-color/literal/style.json b/metrics/integration/render-tests/fill-color/literal/style.json new file mode 100644 index 00000000000..3b324d84d95 --- /dev/null +++ b/metrics/integration/render-tests/fill-color/literal/style.json @@ -0,0 +1,52 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -10, + -10 + ], + [ + -10, + 10 + ], + [ + 10, + 10 + ], + [ + 10, + -10 + ], + [ + -10, + -10 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "fill", + "type": "fill", + "source": "geojson", + "paint": { + "fill-antialias": false, + "fill-color": "blue" + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/fill-color/multiply/expected.png b/metrics/integration/render-tests/fill-color/multiply/expected.png new file mode 100644 index 00000000000..79198bc6241 Binary files /dev/null and b/metrics/integration/render-tests/fill-color/multiply/expected.png differ diff --git a/metrics/integration/render-tests/fill-color/multiply/style.json b/metrics/integration/render-tests/fill-color/multiply/style.json new file mode 100644 index 00000000000..37868e0dd9a --- /dev/null +++ b/metrics/integration/render-tests/fill-color/multiply/style.json @@ -0,0 +1,53 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -10, + -10 + ], + [ + -10, + 10 + ], + [ + 10, + 10 + ], + [ + 10, + -10 + ], + [ + -10, + -10 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "fill", + "type": "fill", + "source": "geojson", + "paint": { + "fill-antialias": false, + "fill-color": "rgba(255,0,0,0.5)", + "fill-opacity": 0.5 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/fill-color/opacity/expected.png b/metrics/integration/render-tests/fill-color/opacity/expected.png new file mode 100644 index 00000000000..44fdefa3c70 Binary files /dev/null and b/metrics/integration/render-tests/fill-color/opacity/expected.png differ diff --git a/metrics/integration/render-tests/fill-color/opacity/style.json b/metrics/integration/render-tests/fill-color/opacity/style.json new file mode 100644 index 00000000000..a589d21f3d8 --- /dev/null +++ b/metrics/integration/render-tests/fill-color/opacity/style.json @@ -0,0 +1,53 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -10, + -10 + ], + [ + -10, + 10 + ], + [ + 10, + 10 + ], + [ + 10, + -10 + ], + [ + -10, + -10 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "fill", + "type": "fill", + "source": "geojson", + "paint": { + "fill-antialias": false, + "fill-color": "rgba(255,0,0,1)", + "fill-opacity": 0.5 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/fill-color/property-function/expected.png b/metrics/integration/render-tests/fill-color/property-function/expected.png new file mode 100644 index 00000000000..08423a342bc Binary files /dev/null and b/metrics/integration/render-tests/fill-color/property-function/expected.png differ diff --git a/metrics/integration/render-tests/fill-color/property-function/style.json b/metrics/integration/render-tests/fill-color/property-function/style.json new file mode 100644 index 00000000000..3c79ee185bc --- /dev/null +++ b/metrics/integration/render-tests/fill-color/property-function/style.json @@ -0,0 +1,145 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "property": 0 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -12, + -12 + ], + [ + -12, + 12 + ], + [ + -4, + 12 + ], + [ + -4, + -12 + ], + [ + -12, + -12 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "property": 1 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -4, + -12 + ], + [ + -4, + 12 + ], + [ + 4, + 12 + ], + [ + 4, + -12 + ], + [ + -4, + -12 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "property": 2 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + 4, + -12 + ], + [ + 4, + 12 + ], + [ + 12, + 12 + ], + [ + 12, + -12 + ], + [ + 4, + -12 + ] + ] + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "fill", + "type": "fill", + "source": "geojson", + "paint": { + "fill-antialias": false, + "fill-color": { + "property": "property", + "stops": [ + [ + 0, + "rgba(255,0,0,1)" + ], + [ + 1, + "rgba(0,255,0,1)" + ], + [ + 2, + "rgba(0,0,255,1)" + ] + ] + } + } + } + ] +} diff --git a/metrics/integration/render-tests/fill-color/zoom-and-property-function/expected.png b/metrics/integration/render-tests/fill-color/zoom-and-property-function/expected.png new file mode 100644 index 00000000000..1d57f9dfe55 Binary files /dev/null and b/metrics/integration/render-tests/fill-color/zoom-and-property-function/expected.png differ diff --git a/metrics/integration/render-tests/fill-color/zoom-and-property-function/style.json b/metrics/integration/render-tests/fill-color/zoom-and-property-function/style.json new file mode 100644 index 00000000000..477fda6a04e --- /dev/null +++ b/metrics/integration/render-tests/fill-color/zoom-and-property-function/style.json @@ -0,0 +1,176 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "zoom": 0.1, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "property": 0 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -12, + -12 + ], + [ + -12, + 12 + ], + [ + -4, + 12 + ], + [ + -4, + -12 + ], + [ + -12, + -12 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "property": 1 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -4, + -12 + ], + [ + -4, + 12 + ], + [ + 4, + 12 + ], + [ + 4, + -12 + ], + [ + -4, + -12 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "property": 2 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + 4, + -12 + ], + [ + 4, + 12 + ], + [ + 12, + 12 + ], + [ + 12, + -12 + ], + [ + 4, + -12 + ] + ] + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "fill", + "type": "fill", + "source": "geojson", + "paint": { + "fill-antialias": false, + "fill-color": { + "property": "property", + "stops": [ + [ + { + "zoom": 0, + "value": 0 + }, + "rgba(255,0,0,1)" + ], + [ + { + "zoom": 0, + "value": 1 + }, + "rgba(0,255,0,1)" + ], + [ + { + "zoom": 0, + "value": 2 + }, + "rgba(0,0,255,1)" + ], + [ + { + "zoom": 1, + "value": 0 + }, + "rgba(255,0,0,0)" + ], + [ + { + "zoom": 1, + "value": 1 + }, + "rgba(0,255,0,0)" + ], + [ + { + "zoom": 1, + "value": 2 + }, + "rgba(0,0,255,0)" + ] + ] + } + } + } + ] +} diff --git a/metrics/integration/render-tests/fill-extrusion-base/default/expected.png b/metrics/integration/render-tests/fill-extrusion-base/default/expected.png new file mode 100644 index 00000000000..1056fa16dfd Binary files /dev/null and b/metrics/integration/render-tests/fill-extrusion-base/default/expected.png differ diff --git a/metrics/integration/render-tests/fill-extrusion-base/default/style.json b/metrics/integration/render-tests/fill-extrusion-base/default/style.json new file mode 100644 index 00000000000..f5fc8537183 --- /dev/null +++ b/metrics/integration/render-tests/fill-extrusion-base/default/style.json @@ -0,0 +1,159 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 512 + } + }, + "sources": { + "rect": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Polygon", + "coordinates": [[ + [ -0.0004, -0.0004 ], + [ -0.0004, 0.0000 ], + [ 0.0004, 0.0004 ], + [ 0.0004, -0.0000 ], + [ -0.0004, -0.0004 ] + ]] + } + } + ] + } + }, + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "property": 30 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -0.0003, + -0.0003 + ], + [ + -0.0003, + 0.0003 + ], + [ + 0.0003, + 0.0003 + ], + [ + 0.0003, + -0.0003 + ], + [ + -0.0003, + -0.0003 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "property": 20 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -0.0002, + 0 + ], + [ + 0, + 0.0002 + ], + [ + 0.0002, + 0 + ], + [ + 0, + -0.0002 + ], + [ + -0.0002, + 0 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "property": 10 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -0.0001, + -0.0001 + ], + [ + -0.0001, + 0.0001 + ], + [ + 0.0001, + 0.0001 + ], + [ + 0.0001, + -0.0001 + ], + [ + -0.0001, + -0.0001 + ] + ] + ] + } + } + ] + } + } + }, + "pitch": 60, + "zoom": 18, + "layers": [ + { + "id": "rect", + "type": "fill", + "source": "rect", + "paint": { + "fill-color": "rgba(0,255,255,1)" + } + }, + { + "id": "extrusion", + "type": "fill-extrusion", + "source": "geojson", + "paint": { + "fill-extrusion-height": 30 + } + } + ] +} diff --git a/metrics/integration/render-tests/fill-extrusion-base/function/expected.png b/metrics/integration/render-tests/fill-extrusion-base/function/expected.png new file mode 100644 index 00000000000..56d1d5dc36a Binary files /dev/null and b/metrics/integration/render-tests/fill-extrusion-base/function/expected.png differ diff --git a/metrics/integration/render-tests/fill-extrusion-base/function/style.json b/metrics/integration/render-tests/fill-extrusion-base/function/style.json new file mode 100644 index 00000000000..de9fb01a88c --- /dev/null +++ b/metrics/integration/render-tests/fill-extrusion-base/function/style.json @@ -0,0 +1,163 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 512 + } + }, + "sources": { + "rect": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Polygon", + "coordinates": [[ + [ -0.0004, -0.0004 ], + [ -0.0004, 0.0000 ], + [ 0.0004, 0.0004 ], + [ 0.0004, -0.0000 ], + [ -0.0004, -0.0004 ] + ]] + } + } + ] + } + }, + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "property": 30 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -0.0003, + -0.0003 + ], + [ + -0.0003, + 0.0003 + ], + [ + 0.0003, + 0.0003 + ], + [ + 0.0003, + -0.0003 + ], + [ + -0.0003, + -0.0003 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "property": 20 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -0.0002, + 0 + ], + [ + 0, + 0.0002 + ], + [ + 0.0002, + 0 + ], + [ + 0, + -0.0002 + ], + [ + -0.0002, + 0 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "property": 10 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -0.0001, + -0.0001 + ], + [ + -0.0001, + 0.0001 + ], + [ + 0.0001, + 0.0001 + ], + [ + 0.0001, + -0.0001 + ], + [ + -0.0001, + -0.0001 + ] + ] + ] + } + } + ] + } + } + }, + "pitch": 60, + "zoom": 18, + "layers": [ + { + "id": "rect", + "type": "fill", + "source": "rect", + "paint": { + "fill-color": "rgba(0,255,255,1)" + } + }, + { + "id": "extrusion", + "type": "fill-extrusion", + "source": "geojson", + "paint": { + "fill-extrusion-height": 40, + "fill-extrusion-base": { + "stops": [[17,0],[19,30]], + "type": "exponential" + } + } + } + ] +} diff --git a/metrics/integration/render-tests/fill-extrusion-base/literal/expected.png b/metrics/integration/render-tests/fill-extrusion-base/literal/expected.png new file mode 100644 index 00000000000..ab85a67e64c Binary files /dev/null and b/metrics/integration/render-tests/fill-extrusion-base/literal/expected.png differ diff --git a/metrics/integration/render-tests/fill-extrusion-base/literal/style.json b/metrics/integration/render-tests/fill-extrusion-base/literal/style.json new file mode 100644 index 00000000000..57198a6f7e3 --- /dev/null +++ b/metrics/integration/render-tests/fill-extrusion-base/literal/style.json @@ -0,0 +1,160 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 512 + } + }, + "sources": { + "rect": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Polygon", + "coordinates": [[ + [ -0.0004, -0.0004 ], + [ -0.0004, 0.0000 ], + [ 0.0004, 0.0004 ], + [ 0.0004, -0.0000 ], + [ -0.0004, -0.0004 ] + ]] + } + } + ] + } + }, + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "property": 30 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -0.0003, + -0.0003 + ], + [ + -0.0003, + 0.0003 + ], + [ + 0.0003, + 0.0003 + ], + [ + 0.0003, + -0.0003 + ], + [ + -0.0003, + -0.0003 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "property": 20 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -0.0002, + 0 + ], + [ + 0, + 0.0002 + ], + [ + 0.0002, + 0 + ], + [ + 0, + -0.0002 + ], + [ + -0.0002, + 0 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "property": 10 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -0.0001, + -0.0001 + ], + [ + -0.0001, + 0.0001 + ], + [ + 0.0001, + 0.0001 + ], + [ + 0.0001, + -0.0001 + ], + [ + -0.0001, + -0.0001 + ] + ] + ] + } + } + ] + } + } + }, + "pitch": 60, + "zoom": 18, + "layers": [ + { + "id": "rect", + "type": "fill", + "source": "rect", + "paint": { + "fill-color": "rgba(0,255,255,1)" + } + }, + { + "id": "extrusion", + "type": "fill-extrusion", + "source": "geojson", + "paint": { + "fill-extrusion-height": 40, + "fill-extrusion-base": 10 + } + } + ] +} diff --git a/metrics/integration/render-tests/fill-extrusion-base/negative/expected.png b/metrics/integration/render-tests/fill-extrusion-base/negative/expected.png new file mode 100644 index 00000000000..74772873ccc Binary files /dev/null and b/metrics/integration/render-tests/fill-extrusion-base/negative/expected.png differ diff --git a/metrics/integration/render-tests/fill-extrusion-base/negative/style.json b/metrics/integration/render-tests/fill-extrusion-base/negative/style.json new file mode 100644 index 00000000000..eb17f2e7c72 --- /dev/null +++ b/metrics/integration/render-tests/fill-extrusion-base/negative/style.json @@ -0,0 +1,163 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 512 + } + }, + "sources": { + "rect": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Polygon", + "coordinates": [[ + [ -0.0004, -0.0004 ], + [ -0.0004, 0.0000 ], + [ 0.0004, 0.0004 ], + [ 0.0004, -0.0000 ], + [ -0.0004, -0.0004 ] + ]] + } + } + ] + } + }, + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "property": -30 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -0.0003, + -0.0003 + ], + [ + -0.0003, + 0.0003 + ], + [ + 0.0003, + 0.0003 + ], + [ + 0.0003, + -0.0003 + ], + [ + -0.0003, + -0.0003 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "property": 20 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -0.0002, + 0 + ], + [ + 0, + 0.0002 + ], + [ + 0.0002, + 0 + ], + [ + 0, + -0.0002 + ], + [ + -0.0002, + 0 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "property": -10 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -0.0001, + -0.0001 + ], + [ + -0.0001, + 0.0001 + ], + [ + 0.0001, + 0.0001 + ], + [ + 0.0001, + -0.0001 + ], + [ + -0.0001, + -0.0001 + ] + ] + ] + } + } + ] + } + } + }, + "pitch": 60, + "zoom": 18, + "layers": [ + { + "id": "rect", + "type": "fill", + "source": "rect", + "paint": { + "fill-color": "rgba(0,255,255,1)" + } + }, + { + "id": "extrusion", + "type": "fill-extrusion", + "source": "geojson", + "paint": { + "fill-extrusion-height": 40, + "fill-extrusion-base": { + "type": "identity", + "property": "property" + } + } + } + ] +} diff --git a/metrics/integration/render-tests/fill-extrusion-base/property-function/expected.png b/metrics/integration/render-tests/fill-extrusion-base/property-function/expected.png new file mode 100644 index 00000000000..8c0a222d01d Binary files /dev/null and b/metrics/integration/render-tests/fill-extrusion-base/property-function/expected.png differ diff --git a/metrics/integration/render-tests/fill-extrusion-base/property-function/style.json b/metrics/integration/render-tests/fill-extrusion-base/property-function/style.json new file mode 100644 index 00000000000..ac6127fe813 --- /dev/null +++ b/metrics/integration/render-tests/fill-extrusion-base/property-function/style.json @@ -0,0 +1,164 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 512 + } + }, + "sources": { + "rect": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Polygon", + "coordinates": [[ + [ -0.0004, -0.0004 ], + [ -0.0004, 0.0000 ], + [ 0.0004, 0.0004 ], + [ 0.0004, -0.0000 ], + [ -0.0004, -0.0004 ] + ]] + } + } + ] + } + }, + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "property": 30 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -0.0003, + -0.0003 + ], + [ + -0.0003, + 0.0003 + ], + [ + 0.0003, + 0.0003 + ], + [ + 0.0003, + -0.0003 + ], + [ + -0.0003, + -0.0003 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "property": 20 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -0.0002, + 0 + ], + [ + 0, + 0.0002 + ], + [ + 0.0002, + 0 + ], + [ + 0, + -0.0002 + ], + [ + -0.0002, + 0 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "property": 10 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -0.0001, + -0.0001 + ], + [ + -0.0001, + 0.0001 + ], + [ + 0.0001, + 0.0001 + ], + [ + 0.0001, + -0.0001 + ], + [ + -0.0001, + -0.0001 + ] + ] + ] + } + } + ] + } + } + }, + "pitch": 60, + "zoom": 18, + "layers": [ + { + "id": "rect", + "type": "fill", + "source": "rect", + "paint": { + "fill-color": "rgba(0,255,255,1)" + } + }, + { + "id": "extrusion", + "type": "fill-extrusion", + "source": "geojson", + "paint": { + "fill-extrusion-height": 40, + "fill-extrusion-base": { + "stops": [[0,0],[100,100]], + "type": "exponential", + "property": "property" + } + } + } + ] +} diff --git a/metrics/integration/render-tests/fill-extrusion-base/zoom-and-property-function/expected.png b/metrics/integration/render-tests/fill-extrusion-base/zoom-and-property-function/expected.png new file mode 100644 index 00000000000..e215a543852 Binary files /dev/null and b/metrics/integration/render-tests/fill-extrusion-base/zoom-and-property-function/expected.png differ diff --git a/metrics/integration/render-tests/fill-extrusion-base/zoom-and-property-function/style.json b/metrics/integration/render-tests/fill-extrusion-base/zoom-and-property-function/style.json new file mode 100644 index 00000000000..37096a52325 --- /dev/null +++ b/metrics/integration/render-tests/fill-extrusion-base/zoom-and-property-function/style.json @@ -0,0 +1,181 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 512 + } + }, + "sources": { + "rect": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Polygon", + "coordinates": [[ + [ -0.0004, -0.0004 ], + [ -0.0004, 0.0000 ], + [ 0.0004, 0.0004 ], + [ 0.0004, -0.0000 ], + [ -0.0004, -0.0004 ] + ]] + } + } + ] + } + }, + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "property": 30 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -0.0003, + -0.0003 + ], + [ + -0.0003, + 0.0003 + ], + [ + 0.0003, + 0.0003 + ], + [ + 0.0003, + -0.0003 + ], + [ + -0.0003, + -0.0003 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "property": 20 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -0.0002, + 0 + ], + [ + 0, + 0.0002 + ], + [ + 0.0002, + 0 + ], + [ + 0, + -0.0002 + ], + [ + -0.0002, + 0 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "property": 10 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -0.0001, + -0.0001 + ], + [ + -0.0001, + 0.0001 + ], + [ + 0.0001, + 0.0001 + ], + [ + 0.0001, + -0.0001 + ], + [ + -0.0001, + -0.0001 + ] + ] + ] + } + } + ] + } + } + }, + "pitch": 60, + "zoom": 18, + "layers": [ + { + "id": "rect", + "type": "fill", + "source": "rect", + "paint": { + "fill-color": "rgba(0,255,255,1)" + } + }, + { + "id": "extrusion", + "type": "fill-extrusion", + "source": "geojson", + "paint": { + "fill-extrusion-height": 100, + "fill-extrusion-base": { + "stops": [ + [{ + "zoom": 17, + "value": 0 + }, 0], + [{ + "zoom": 17, + "value": 0 + }, 0], + [{ + "zoom": 18.5, + "value": 0 + }, 0], + [{ + "zoom": 18.5, + "value": 100 + }, 200] + ], + "type": "exponential", + "property": "property" + } + } + } + ] +} diff --git a/metrics/integration/render-tests/fill-extrusion-color/default/expected.png b/metrics/integration/render-tests/fill-extrusion-color/default/expected.png new file mode 100644 index 00000000000..4cfadacbce0 Binary files /dev/null and b/metrics/integration/render-tests/fill-extrusion-color/default/expected.png differ diff --git a/metrics/integration/render-tests/fill-extrusion-color/default/style.json b/metrics/integration/render-tests/fill-extrusion-color/default/style.json new file mode 100644 index 00000000000..c4270e8ffdb --- /dev/null +++ b/metrics/integration/render-tests/fill-extrusion-color/default/style.json @@ -0,0 +1,129 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "property": 30 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -0.0001, + -0.0001 + ], + [ + -0.0001, + 0.0001 + ], + [ + 0.0001, + 0.0001 + ], + [ + 0.0001, + -0.0001 + ], + [ + -0.0001, + -0.0001 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "property": 20 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -0.0002, + -0.0002 + ], + [ + -0.0002, + 0.0002 + ], + [ + 0.0002, + 0.0002 + ], + [ + 0.0002, + -0.0002 + ], + [ + -0.0002, + -0.0002 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "property": 10 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -0.0003, + -0.0003 + ], + [ + -0.0003, + 0.0003 + ], + [ + 0.0003, + 0.0003 + ], + [ + 0.0003, + -0.0003 + ], + [ + -0.0003, + -0.0003 + ] + ] + ] + } + } + ] + } + } + }, + "pitch": 60, + "zoom": 18, + "layers": [ + { + "id": "extrusion", + "type": "fill-extrusion", + "source": "geojson", + "paint": { + "fill-extrusion-height": 10 + } + } + ] +} diff --git a/metrics/integration/render-tests/fill-extrusion-color/function/expected.png b/metrics/integration/render-tests/fill-extrusion-color/function/expected.png new file mode 100644 index 00000000000..891fef5a723 Binary files /dev/null and b/metrics/integration/render-tests/fill-extrusion-color/function/expected.png differ diff --git a/metrics/integration/render-tests/fill-extrusion-color/function/style.json b/metrics/integration/render-tests/fill-extrusion-color/function/style.json new file mode 100644 index 00000000000..95367da5823 --- /dev/null +++ b/metrics/integration/render-tests/fill-extrusion-color/function/style.json @@ -0,0 +1,135 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "property": 30 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -0.0001, + -0.0001 + ], + [ + -0.0001, + 0.0001 + ], + [ + 0.0001, + 0.0001 + ], + [ + 0.0001, + -0.0001 + ], + [ + -0.0001, + -0.0001 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "property": 20 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -0.0002, + -0.0002 + ], + [ + -0.0002, + 0.0002 + ], + [ + 0.0002, + 0.0002 + ], + [ + 0.0002, + -0.0002 + ], + [ + -0.0002, + -0.0002 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "property": 10 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -0.0003, + -0.0003 + ], + [ + -0.0003, + 0.0003 + ], + [ + 0.0003, + 0.0003 + ], + [ + 0.0003, + -0.0003 + ], + [ + -0.0003, + -0.0003 + ] + ] + ] + } + } + ] + } + } + }, + "pitch": 60, + "zoom": 18, + "layers": [ + { + "id": "extrusion", + "type": "fill-extrusion", + "source": "geojson", + "paint": { + "fill-extrusion-height": 10, + "fill-extrusion-color": { + "stops": [ + [17, "blue"], + [19, "red"] + ] + } + } + } + ] +} diff --git a/metrics/integration/render-tests/fill-extrusion-color/literal/expected.png b/metrics/integration/render-tests/fill-extrusion-color/literal/expected.png new file mode 100644 index 00000000000..9f85ba77cd5 Binary files /dev/null and b/metrics/integration/render-tests/fill-extrusion-color/literal/expected.png differ diff --git a/metrics/integration/render-tests/fill-extrusion-color/literal/style.json b/metrics/integration/render-tests/fill-extrusion-color/literal/style.json new file mode 100644 index 00000000000..ce3c07f094c --- /dev/null +++ b/metrics/integration/render-tests/fill-extrusion-color/literal/style.json @@ -0,0 +1,130 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "property": 30 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -0.0001, + -0.0001 + ], + [ + -0.0001, + 0.0001 + ], + [ + 0.0001, + 0.0001 + ], + [ + 0.0001, + -0.0001 + ], + [ + -0.0001, + -0.0001 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "property": 20 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -0.0002, + -0.0002 + ], + [ + -0.0002, + 0.0002 + ], + [ + 0.0002, + 0.0002 + ], + [ + 0.0002, + -0.0002 + ], + [ + -0.0002, + -0.0002 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "property": 10 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -0.0003, + -0.0003 + ], + [ + -0.0003, + 0.0003 + ], + [ + 0.0003, + 0.0003 + ], + [ + 0.0003, + -0.0003 + ], + [ + -0.0003, + -0.0003 + ] + ] + ] + } + } + ] + } + } + }, + "pitch": 60, + "zoom": 18, + "layers": [ + { + "id": "extrusion", + "type": "fill-extrusion", + "source": "geojson", + "paint": { + "fill-extrusion-height": 10, + "fill-extrusion-color": "blue" + } + } + ] +} diff --git a/metrics/integration/render-tests/fill-extrusion-color/no-alpha-no-multiply/expected.png b/metrics/integration/render-tests/fill-extrusion-color/no-alpha-no-multiply/expected.png new file mode 100644 index 00000000000..e1662d5d1ac Binary files /dev/null and b/metrics/integration/render-tests/fill-extrusion-color/no-alpha-no-multiply/expected.png differ diff --git a/metrics/integration/render-tests/fill-extrusion-color/no-alpha-no-multiply/style.json b/metrics/integration/render-tests/fill-extrusion-color/no-alpha-no-multiply/style.json new file mode 100644 index 00000000000..2b9b287a3b2 --- /dev/null +++ b/metrics/integration/render-tests/fill-extrusion-color/no-alpha-no-multiply/style.json @@ -0,0 +1,130 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "property": 10 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -0.0003, + -0.0003 + ], + [ + -0.0003, + 0.0003 + ], + [ + 0.0003, + 0.0003 + ], + [ + 0.0003, + -0.0003 + ], + [ + -0.0003, + -0.0003 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "property": 20 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -0.0002, + -0.0002 + ], + [ + -0.0002, + 0.0002 + ], + [ + 0.0002, + 0.0002 + ], + [ + 0.0002, + -0.0002 + ], + [ + -0.0002, + -0.0002 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "property": 30 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -0.0001, + -0.0001 + ], + [ + -0.0001, + 0.0001 + ], + [ + 0.0001, + 0.0001 + ], + [ + 0.0001, + -0.0001 + ], + [ + -0.0001, + -0.0001 + ] + ] + ] + } + } + ] + } + } + }, + "pitch": 60, + "zoom": 18, + "layers": [ + { + "id": "extrusion", + "type": "fill-extrusion", + "source": "geojson", + "paint": { + "fill-extrusion-height": 10, + "fill-extrusion-color": "rgba(100,100,100,0.2)" + } + } + ] +} diff --git a/metrics/integration/render-tests/fill-extrusion-color/property-function/expected.png b/metrics/integration/render-tests/fill-extrusion-color/property-function/expected.png new file mode 100644 index 00000000000..9976c294b5f Binary files /dev/null and b/metrics/integration/render-tests/fill-extrusion-color/property-function/expected.png differ diff --git a/metrics/integration/render-tests/fill-extrusion-color/property-function/style.json b/metrics/integration/render-tests/fill-extrusion-color/property-function/style.json new file mode 100644 index 00000000000..a7093eca11e --- /dev/null +++ b/metrics/integration/render-tests/fill-extrusion-color/property-function/style.json @@ -0,0 +1,95 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "property": 10 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ [ -0.0003, -0.00047 ], + [ -0.0003, -0.00017 ], + [ 0, -0.00017 ], + [ 0, -0.00047 ], + [ -0.0003, -0.00047 ] ] + ] + } + }, + { + "type": "Feature", + "properties": { + "property": 20 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ [ -0.00015, -0.00015 ], + [ -0.00015, 0.00015 ], + [ 0.00015, 0.00015 ], + [ 0.00015, -0.00015 ], + [ -0.00015, -0.00015 ] ] + ] + } + }, + { + "type": "Feature", + "properties": { + "property": 30 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ [ 0, 0.00017 ], + [ 0, 0.00047 ], + [ 0.0003, 0.00047 ], + [ 0.0003, 0.00017 ], + [ 0, 0.00017 ] ] + ] + } + } + ] + } + } + }, + "pitch": 60, + "zoom": 18, + "layers": [ + { + "id": "extrusion", + "type": "fill-extrusion", + "source": "geojson", + "paint": { + "fill-extrusion-height": 10, + "fill-extrusion-color": { + "property": "property", + "stops": [ + [ + 10, + "rgba(255,0,0,1)" + ], + [ + 20, + "rgba(0,255,0,1)" + ], + [ + 30, + "rgba(0,0,255,1)" + ] + ] + } + } + } + ] +} diff --git a/metrics/integration/render-tests/fill-extrusion-color/zoom-and-property-function/expected.png b/metrics/integration/render-tests/fill-extrusion-color/zoom-and-property-function/expected.png new file mode 100644 index 00000000000..d8eb8153c63 Binary files /dev/null and b/metrics/integration/render-tests/fill-extrusion-color/zoom-and-property-function/expected.png differ diff --git a/metrics/integration/render-tests/fill-extrusion-color/zoom-and-property-function/style.json b/metrics/integration/render-tests/fill-extrusion-color/zoom-and-property-function/style.json new file mode 100644 index 00000000000..d279fd75910 --- /dev/null +++ b/metrics/integration/render-tests/fill-extrusion-color/zoom-and-property-function/style.json @@ -0,0 +1,99 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "property": 10 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ [ -0.0003, -0.00047 ], + [ -0.0003, -0.00017 ], + [ 0, -0.00017 ], + [ 0, -0.00047 ], + [ -0.0003, -0.00047 ] ] + ] + } + }, + { + "type": "Feature", + "properties": { + "property": 20 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ [ -0.00015, -0.00015 ], + [ -0.00015, 0.00015 ], + [ 0.00015, 0.00015 ], + [ 0.00015, -0.00015 ], + [ -0.00015, -0.00015 ] ] + ] + } + }, + { + "type": "Feature", + "properties": { + "property": 30 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ [ 0, 0.00017 ], + [ 0, 0.00047 ], + [ 0.0003, 0.00047 ], + [ 0.0003, 0.00017 ], + [ 0, 0.00017 ] ] + ] + } + } + ] + } + } + }, + "pitch": 60, + "zoom": 18, + "layers": [ + { + "id": "extrusion", + "type": "fill-extrusion", + "source": "geojson", + "paint": { + "fill-extrusion-height": 10, + "fill-extrusion-color": { + "property": "property", + "stops": [ + [{ + "zoom": 17, + "value": 10 + }, "rgba(255,255,0,1)"], + [{ + "zoom": 17, + "value": 30 + }, "rgba(0,0,255,1)"], + [{ + "zoom": 19, + "value": 10 + }, "rgba(0,255,255,1)"], + [{ + "zoom": 19, + "value": 30 + }, "rgba(255,0,0,1)"] + ] + } + } + } + ] +} diff --git a/metrics/integration/render-tests/fill-extrusion-geometry/linestring/expected.png b/metrics/integration/render-tests/fill-extrusion-geometry/linestring/expected.png new file mode 100644 index 00000000000..c779eb413f3 Binary files /dev/null and b/metrics/integration/render-tests/fill-extrusion-geometry/linestring/expected.png differ diff --git a/metrics/integration/render-tests/fill-extrusion-geometry/linestring/style.json b/metrics/integration/render-tests/fill-extrusion-geometry/linestring/style.json new file mode 100644 index 00000000000..b90ae6f2704 --- /dev/null +++ b/metrics/integration/render-tests/fill-extrusion-geometry/linestring/style.json @@ -0,0 +1,91 @@ +{ + "version": 8, + "metadata": { + "test": { + "width" : 32, + "height": 128 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "geometry": { + "type": "MultiLineString", + "coordinates": [ + [ + [ + -0.0003, + -0.0003 + ], + [ + -0.0003, + 0.0003 + ], + [ + 0.000, + 0.0003 + ], + [ + 0.000, + -0.0003 + ], + [ + -0.0003, + -0.0003 + ] + ] + ] + } + }, + { + "type": "Feature", + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -0.000, + -0.0003 + ], + [ + -0.000, + 0.0003 + ], + [ + 0.0003, + 0.0003 + ], + [ + 0.0003, + -0.0003 + ], + [ + -0.0003, + -0.0003 + ] + ] + ] + } + } + ] + } + } + }, + "pitch": 0, + "zoom": 15, + "layers": [ + { + "id": "extrusion", + "type": "fill-extrusion", + "source": "geojson", + "paint": { + "fill-extrusion-height": 0 + } + } + ] +} diff --git a/metrics/integration/render-tests/fill-extrusion-height/default/expected.png b/metrics/integration/render-tests/fill-extrusion-height/default/expected.png new file mode 100644 index 00000000000..088d733c4ca Binary files /dev/null and b/metrics/integration/render-tests/fill-extrusion-height/default/expected.png differ diff --git a/metrics/integration/render-tests/fill-extrusion-height/default/style.json b/metrics/integration/render-tests/fill-extrusion-height/default/style.json new file mode 100644 index 00000000000..ac84befdca6 --- /dev/null +++ b/metrics/integration/render-tests/fill-extrusion-height/default/style.json @@ -0,0 +1,127 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "property": 10 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -0.0003, + -0.0003 + ], + [ + -0.0003, + 0.0003 + ], + [ + 0.0003, + 0.0003 + ], + [ + 0.0003, + -0.0003 + ], + [ + -0.0003, + -0.0003 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "property": 20 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -0.0002, + 0 + ], + [ + 0, + 0.0002 + ], + [ + 0.0002, + 0 + ], + [ + 0, + -0.0002 + ], + [ + -0.0002, + 0 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "property": 30 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -0.0001, + -0.0001 + ], + [ + -0.0001, + 0.0001 + ], + [ + 0.0001, + 0.0001 + ], + [ + 0.0001, + -0.0001 + ], + [ + -0.0001, + -0.0001 + ] + ] + ] + } + } + ] + } + } + }, + "pitch": 60, + "zoom": 18, + "layers": [ + { + "id": "extrusion", + "type": "fill-extrusion", + "source": "geojson", + "paint": {} + } + ] +} diff --git a/metrics/integration/render-tests/fill-extrusion-height/function/expected.png b/metrics/integration/render-tests/fill-extrusion-height/function/expected.png new file mode 100644 index 00000000000..b3c96daea62 Binary files /dev/null and b/metrics/integration/render-tests/fill-extrusion-height/function/expected.png differ diff --git a/metrics/integration/render-tests/fill-extrusion-height/function/style.json b/metrics/integration/render-tests/fill-extrusion-height/function/style.json new file mode 100644 index 00000000000..42c5c67dea8 --- /dev/null +++ b/metrics/integration/render-tests/fill-extrusion-height/function/style.json @@ -0,0 +1,135 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "property": 10 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -0.0003, + -0.0003 + ], + [ + -0.0003, + 0.0003 + ], + [ + 0.0003, + 0.0003 + ], + [ + 0.0003, + -0.0003 + ], + [ + -0.0003, + -0.0003 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "property": 20 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -0.0002, + 0 + ], + [ + 0, + 0.0002 + ], + [ + 0.0002, + 0 + ], + [ + 0, + -0.0002 + ], + [ + -0.0002, + 0 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "property": 30 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -0.0001, + -0.0001 + ], + [ + -0.0001, + 0.0001 + ], + [ + 0.0001, + 0.0001 + ], + [ + 0.0001, + -0.0001 + ], + [ + -0.0001, + -0.0001 + ] + ] + ] + } + } + ] + } + } + }, + "pitch": 60, + "zoom": 18, + "layers": [ + { + "id": "extrusion", + "type": "fill-extrusion", + "source": "geojson", + "paint": { + "fill-extrusion-height": { + "stops": [ + [17, 10], + [19, 100] + ], + "type": "exponential" + } + } + } + ] +} diff --git a/metrics/integration/render-tests/fill-extrusion-height/negative/expected.png b/metrics/integration/render-tests/fill-extrusion-height/negative/expected.png new file mode 100644 index 00000000000..c69b771d801 Binary files /dev/null and b/metrics/integration/render-tests/fill-extrusion-height/negative/expected.png differ diff --git a/metrics/integration/render-tests/fill-extrusion-height/negative/style.json b/metrics/integration/render-tests/fill-extrusion-height/negative/style.json new file mode 100644 index 00000000000..32739c35beb --- /dev/null +++ b/metrics/integration/render-tests/fill-extrusion-height/negative/style.json @@ -0,0 +1,132 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "property": -10 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -0.0003, + -0.0003 + ], + [ + -0.0003, + 0.0003 + ], + [ + 0.0003, + 0.0003 + ], + [ + 0.0003, + -0.0003 + ], + [ + -0.0003, + -0.0003 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "property": 20 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -0.0002, + 0 + ], + [ + 0, + 0.0002 + ], + [ + 0.0002, + 0 + ], + [ + 0, + -0.0002 + ], + [ + -0.0002, + 0 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "property": -30 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -0.0001, + -0.0001 + ], + [ + -0.0001, + 0.0001 + ], + [ + 0.0001, + 0.0001 + ], + [ + 0.0001, + -0.0001 + ], + [ + -0.0001, + -0.0001 + ] + ] + ] + } + } + ] + } + } + }, + "pitch": 60, + "zoom": 18, + "layers": [ + { + "id": "extrusion", + "type": "fill-extrusion", + "source": "geojson", + "paint": { + "fill-extrusion-height": { + "type": "identity", + "property": "property" + } + } + } + ] +} diff --git a/metrics/integration/render-tests/fill-extrusion-height/property-function/expected.png b/metrics/integration/render-tests/fill-extrusion-height/property-function/expected.png new file mode 100644 index 00000000000..678dabe26e9 Binary files /dev/null and b/metrics/integration/render-tests/fill-extrusion-height/property-function/expected.png differ diff --git a/metrics/integration/render-tests/fill-extrusion-height/property-function/style.json b/metrics/integration/render-tests/fill-extrusion-height/property-function/style.json new file mode 100644 index 00000000000..ac194913524 --- /dev/null +++ b/metrics/integration/render-tests/fill-extrusion-height/property-function/style.json @@ -0,0 +1,136 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "property": 10 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -0.0003, + -0.0003 + ], + [ + -0.0003, + 0.0003 + ], + [ + 0.0003, + 0.0003 + ], + [ + 0.0003, + -0.0003 + ], + [ + -0.0003, + -0.0003 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "property": 20 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -0.0002, + 0 + ], + [ + 0, + 0.0002 + ], + [ + 0.0002, + 0 + ], + [ + 0, + -0.0002 + ], + [ + -0.0002, + 0 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "property": 30 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -0.0001, + -0.0001 + ], + [ + -0.0001, + 0.0001 + ], + [ + 0.0001, + 0.0001 + ], + [ + 0.0001, + -0.0001 + ], + [ + -0.0001, + -0.0001 + ] + ] + ] + } + } + ] + } + } + }, + "pitch": 60, + "zoom": 18, + "layers": [ + { + "id": "extrusion", + "type": "fill-extrusion", + "source": "geojson", + "paint": { + "fill-extrusion-height": { + "stops": [ + [0, 0], + [100, 100] + ], + "property": "property", + "type": "exponential" + } + } + } + ] +} diff --git a/metrics/integration/render-tests/fill-extrusion-height/zoom-and-property-function/expected.png b/metrics/integration/render-tests/fill-extrusion-height/zoom-and-property-function/expected.png new file mode 100644 index 00000000000..4fca0e1d322 Binary files /dev/null and b/metrics/integration/render-tests/fill-extrusion-height/zoom-and-property-function/expected.png differ diff --git a/metrics/integration/render-tests/fill-extrusion-height/zoom-and-property-function/style.json b/metrics/integration/render-tests/fill-extrusion-height/zoom-and-property-function/style.json new file mode 100644 index 00000000000..0f14325258a --- /dev/null +++ b/metrics/integration/render-tests/fill-extrusion-height/zoom-and-property-function/style.json @@ -0,0 +1,150 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "property": 10 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -0.0003, + -0.0003 + ], + [ + -0.0003, + 0.0003 + ], + [ + 0.0003, + 0.0003 + ], + [ + 0.0003, + -0.0003 + ], + [ + -0.0003, + -0.0003 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "property": 20 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -0.0002, + 0 + ], + [ + 0, + 0.0002 + ], + [ + 0.0002, + 0 + ], + [ + 0, + -0.0002 + ], + [ + -0.0002, + 0 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "property": 30 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -0.0001, + -0.0001 + ], + [ + -0.0001, + 0.0001 + ], + [ + 0.0001, + 0.0001 + ], + [ + 0.0001, + -0.0001 + ], + [ + -0.0001, + -0.0001 + ] + ] + ] + } + } + ] + } + } + }, + "pitch": 60, + "zoom": 18, + "layers": [ + { + "id": "extrusion", + "type": "fill-extrusion", + "source": "geojson", + "paint": { + "fill-extrusion-height": { + "stops": [ + [{ + "zoom": 17.99, + "value": 0 + }, 0], + [{ + "zoom": 17.99, + "value": 100 + }, 0], + [{ + "zoom": 18.1, + "value": 0 + }, 0], + [{ + "zoom": 18.1, + "value": 100 + }, 300] + ], + "property": "property", + "type": "exponential" + } + } + } + ] +} diff --git a/metrics/integration/render-tests/fill-extrusion-multiple/interleaved-layers/expected.png b/metrics/integration/render-tests/fill-extrusion-multiple/interleaved-layers/expected.png new file mode 100644 index 00000000000..80dd071d88f Binary files /dev/null and b/metrics/integration/render-tests/fill-extrusion-multiple/interleaved-layers/expected.png differ diff --git a/metrics/integration/render-tests/fill-extrusion-multiple/interleaved-layers/style.json b/metrics/integration/render-tests/fill-extrusion-multiple/interleaved-layers/style.json new file mode 100644 index 00000000000..4836f540a08 --- /dev/null +++ b/metrics/integration/render-tests/fill-extrusion-multiple/interleaved-layers/style.json @@ -0,0 +1,200 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256, + "allowed": 0.0005 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "which": "a", + "property": 10 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -0.0003, + -0.0003 + ], + [ + -0.0003, + 0.0003 + ], + [ + 0.0003, + 0.0003 + ], + [ + 0.0003, + -0.0003 + ], + [ + -0.0003, + -0.0003 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "which": "b", + "property": 20 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -0.0002, + 0 + ], + [ + 0, + 0.0002 + ], + [ + 0.0002, + 0 + ], + [ + 0, + -0.0002 + ], + [ + -0.0002, + 0 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "which": "c", + "property": 30 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -0.00008, + -0.00008 + ], + [ + -0.00008, + 0.00008 + ], + [ + 0.00008, + 0.00008 + ], + [ + 0.00008, + -0.00008 + ], + [ + -0.00008, + -0.00008 + ] + ] + ] + } + } + ] + } + } + }, + "pitch": 60, + "zoom": 18, + "layers": [ + { + "id": "circle-translucent-a", + "type": "circle", + "source": "geojson", + "filter": ["==", "which", "a"], + "paint": { + "circle-color": "pink" + } + }, + { + "id": "circle-translucent-b-hidden", + "type": "circle", + "source": "geojson", + "filter": ["==", "which", "b"], + "paint": { + "circle-color": "white" + } + }, + { + "id": "a", + "type": "fill-extrusion", + "source": "geojson", + "filter": ["==", "which", "a"], + "paint": { + "fill-extrusion-color": "red", + "fill-extrusion-height": 10 + } + }, + { + "id": "circle-translucent-b-hidden-black", + "type": "circle", + "source": "geojson", + "filter": ["==", "which", "b"], + "paint": { + "circle-color": "black" + } + }, + { + "id": "circle-translucent-b", + "type": "circle", + "source": "geojson", + "filter": ["==", "which", "b"], + "paint": { + "circle-color": "cyan" + } + }, + { + "id": "b", + "type": "fill-extrusion", + "source": "geojson", + "filter": ["==", "which", "b"], + "paint": { + "fill-extrusion-color": "blue", + "fill-extrusion-height": 20 + } + }, + { + "id": "circle-translucent", + "type": "circle", + "source": "geojson", + "filter": ["==", "which", "c"], + "paint": { + "circle-color": "green" + } + }, + { + "id": "c", + "type": "fill-extrusion", + "source": "geojson", + "filter": ["==", "which", "c"], + "paint": { + "fill-extrusion-color": "yellow", + "fill-extrusion-height": 30 + } + } + ] +} diff --git a/metrics/integration/render-tests/fill-extrusion-multiple/multiple/expected.png b/metrics/integration/render-tests/fill-extrusion-multiple/multiple/expected.png new file mode 100644 index 00000000000..462388936d2 Binary files /dev/null and b/metrics/integration/render-tests/fill-extrusion-multiple/multiple/expected.png differ diff --git a/metrics/integration/render-tests/fill-extrusion-multiple/multiple/style.json b/metrics/integration/render-tests/fill-extrusion-multiple/multiple/style.json new file mode 100644 index 00000000000..57878885513 --- /dev/null +++ b/metrics/integration/render-tests/fill-extrusion-multiple/multiple/style.json @@ -0,0 +1,155 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256, + "allowed": 0.0005 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "which": "a", + "property": 10 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -0.0003, + -0.0003 + ], + [ + -0.0003, + 0.0003 + ], + [ + 0.0003, + 0.0003 + ], + [ + 0.0003, + -0.0003 + ], + [ + -0.0003, + -0.0003 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "which": "b", + "property": 20 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -0.0002, + 0 + ], + [ + 0, + 0.0002 + ], + [ + 0.0002, + 0 + ], + [ + 0, + -0.0002 + ], + [ + -0.0002, + 0 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "which": "c", + "property": 30 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -0.00008, + -0.00008 + ], + [ + -0.00008, + 0.00008 + ], + [ + 0.00008, + 0.00008 + ], + [ + 0.00008, + -0.00008 + ], + [ + -0.00008, + -0.00008 + ] + ] + ] + } + } + ] + } + } + }, + "pitch": 60, + "zoom": 18, + "layers": [ + { + "id": "a", + "type": "fill-extrusion", + "source": "geojson", + "filter": ["==", "which", "a"], + "paint": { + "fill-extrusion-color": "red", + "fill-extrusion-height": 10 + } + }, + { + "id": "b", + "type": "fill-extrusion", + "source": "geojson", + "filter": ["==", "which", "b"], + "paint": { + "fill-extrusion-color": "blue", + "fill-extrusion-height": 20 + } + }, + { + "id": "c", + "type": "fill-extrusion", + "source": "geojson", + "filter": ["==", "which", "c"], + "paint": { + "fill-extrusion-color": "yellow", + "fill-extrusion-height": 30 + } + } + ] +} diff --git a/metrics/integration/render-tests/fill-extrusion-opacity/default/expected.png b/metrics/integration/render-tests/fill-extrusion-opacity/default/expected.png new file mode 100644 index 00000000000..f3e842403e1 Binary files /dev/null and b/metrics/integration/render-tests/fill-extrusion-opacity/default/expected.png differ diff --git a/metrics/integration/render-tests/fill-extrusion-opacity/default/style.json b/metrics/integration/render-tests/fill-extrusion-opacity/default/style.json new file mode 100644 index 00000000000..805dfadc462 --- /dev/null +++ b/metrics/integration/render-tests/fill-extrusion-opacity/default/style.json @@ -0,0 +1,109 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "sources": { + "rect": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Polygon", + "coordinates": [[ + [ -0.0004, -0.0004 ], + [ -0.0004, 0.0000 ], + [ 0.0004, 0.0004 ], + [ 0.0004, -0.0000 ], + [ -0.0004, -0.0004 ] + ]] + } + } + ] + } + }, + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "property": 10 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ [ -0.0003, -0.00047 ], + [ -0.0003, -0.00017 ], + [ 0, -0.00017 ], + [ 0, -0.00047 ], + [ -0.0003, -0.00047 ] ] + ] + } + }, + { + "type": "Feature", + "properties": { + "property": 20 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ [ -0.00015, -0.00015 ], + [ -0.00015, 0.00015 ], + [ 0.00015, 0.00015 ], + [ 0.00015, -0.00015 ], + [ -0.00015, -0.00015 ] ] + ] + } + }, + { + "type": "Feature", + "properties": { + "property": 30 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ [ 0, 0.00017 ], + [ 0, 0.00047 ], + [ 0.0003, 0.00047 ], + [ 0.0003, 0.00017 ], + [ 0, 0.00017 ] ] + ] + } + } + ] + } + } + }, + "pitch": 60, + "bearing": -20, + "zoom": 19, + "layers": [ + { + "id": "rect", + "type": "fill", + "source": "rect", + "paint": { + "fill-color": "rgba(0,255,255,1)" + } + }, + { + "id": "extrusion", + "type": "fill-extrusion", + "source": "geojson", + "paint": { + "fill-extrusion-height": 10 + } + } + ] +} diff --git a/metrics/integration/render-tests/fill-extrusion-opacity/function/expected.png b/metrics/integration/render-tests/fill-extrusion-opacity/function/expected.png new file mode 100644 index 00000000000..92d92fc0a4f Binary files /dev/null and b/metrics/integration/render-tests/fill-extrusion-opacity/function/expected.png differ diff --git a/metrics/integration/render-tests/fill-extrusion-opacity/function/style.json b/metrics/integration/render-tests/fill-extrusion-opacity/function/style.json new file mode 100644 index 00000000000..e215f0d115a --- /dev/null +++ b/metrics/integration/render-tests/fill-extrusion-opacity/function/style.json @@ -0,0 +1,113 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "sources": { + "rect": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Polygon", + "coordinates": [[ + [ -0.0004, -0.0004 ], + [ -0.0004, 0.0000 ], + [ 0.0004, 0.0004 ], + [ 0.0004, -0.0000 ], + [ -0.0004, -0.0004 ] + ]] + } + } + ] + } + }, + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "property": 10 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ [ -0.0003, -0.00047 ], + [ -0.0003, -0.00017 ], + [ 0, -0.00017 ], + [ 0, -0.00047 ], + [ -0.0003, -0.00047 ] ] + ] + } + }, + { + "type": "Feature", + "properties": { + "property": 20 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ [ -0.00015, -0.00015 ], + [ -0.00015, 0.00015 ], + [ 0.00015, 0.00015 ], + [ 0.00015, -0.00015 ], + [ -0.00015, -0.00015 ] ] + ] + } + }, + { + "type": "Feature", + "properties": { + "property": 30 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ [ 0, 0.00017 ], + [ 0, 0.00047 ], + [ 0.0003, 0.00047 ], + [ 0.0003, 0.00017 ], + [ 0, 0.00017 ] ] + ] + } + } + ] + } + } + }, + "pitch": 60, + "bearing": -20, + "zoom": 19, + "layers": [ + { + "id": "rect", + "type": "fill", + "source": "rect", + "paint": { + "fill-color": "rgba(0,255,255,1)" + } + }, + { + "id": "extrusion", + "type": "fill-extrusion", + "source": "geojson", + "paint": { + "fill-extrusion-height": 10, + "fill-extrusion-opacity": { + "stops": [[18.9, 0.1],[19.1, 1]], + "type": "exponential" + } + } + } + ] +} diff --git a/metrics/integration/render-tests/fill-extrusion-opacity/literal/expected.png b/metrics/integration/render-tests/fill-extrusion-opacity/literal/expected.png new file mode 100644 index 00000000000..4f37e45d541 Binary files /dev/null and b/metrics/integration/render-tests/fill-extrusion-opacity/literal/expected.png differ diff --git a/metrics/integration/render-tests/fill-extrusion-opacity/literal/style.json b/metrics/integration/render-tests/fill-extrusion-opacity/literal/style.json new file mode 100644 index 00000000000..6b30980aba7 --- /dev/null +++ b/metrics/integration/render-tests/fill-extrusion-opacity/literal/style.json @@ -0,0 +1,110 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "sources": { + "rect": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Polygon", + "coordinates": [[ + [ -0.0004, -0.0004 ], + [ -0.0004, 0.0000 ], + [ 0.0004, 0.0004 ], + [ 0.0004, -0.0000 ], + [ -0.0004, -0.0004 ] + ]] + } + } + ] + } + }, + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "property": 10 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ [ -0.0003, -0.00047 ], + [ -0.0003, -0.00017 ], + [ 0, -0.00017 ], + [ 0, -0.00047 ], + [ -0.0003, -0.00047 ] ] + ] + } + }, + { + "type": "Feature", + "properties": { + "property": 20 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ [ -0.00015, -0.00015 ], + [ -0.00015, 0.00015 ], + [ 0.00015, 0.00015 ], + [ 0.00015, -0.00015 ], + [ -0.00015, -0.00015 ] ] + ] + } + }, + { + "type": "Feature", + "properties": { + "property": 30 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ [ 0, 0.00017 ], + [ 0, 0.00047 ], + [ 0.0003, 0.00047 ], + [ 0.0003, 0.00017 ], + [ 0, 0.00017 ] ] + ] + } + } + ] + } + } + }, + "pitch": 60, + "bearing": -20, + "zoom": 19, + "layers": [ + { + "id": "rect", + "type": "fill", + "source": "rect", + "paint": { + "fill-color": "rgba(0,255,255,1)" + } + }, + { + "id": "extrusion", + "type": "fill-extrusion", + "source": "geojson", + "paint": { + "fill-extrusion-height": 10, + "fill-extrusion-opacity": 0.75 + } + } + ] +} diff --git a/metrics/integration/render-tests/fill-extrusion-pattern/@2x/expected.png b/metrics/integration/render-tests/fill-extrusion-pattern/@2x/expected.png new file mode 100644 index 00000000000..2994ade87fc Binary files /dev/null and b/metrics/integration/render-tests/fill-extrusion-pattern/@2x/expected.png differ diff --git a/metrics/integration/render-tests/fill-extrusion-pattern/@2x/style.json b/metrics/integration/render-tests/fill-extrusion-pattern/@2x/style.json new file mode 100644 index 00000000000..91ff69322a3 --- /dev/null +++ b/metrics/integration/render-tests/fill-extrusion-pattern/@2x/style.json @@ -0,0 +1,100 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256, + "pixelRatio": 2 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "buffer": 0, + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "property": 20 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -0.0004, + 0 + ], + [ + -0.0002, + 0.0002 + ], + [ + 0, + 0 + ], + [ + -0.0002, + -0.0002 + ], + [ + -0.0004, + 0 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "property": 20 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + 0, + -0.0002 + ], + [ + 0, + 0.0002 + ], + [ + 0.0003, + 0.0002 + ], + [ + 0.0003, + -0.0002 + ], + [ + 0, + -0.0002 + ] + ] + ] + } + } + ] + } + } + }, + "sprite": "local://sprites/emerald", + "pitch": 60, + "zoom": 18, + "layers": [ + { + "id": "extrusion", + "type": "fill-extrusion", + "source": "geojson", + "paint": { + "fill-extrusion-pattern": "generic_icon", + "fill-extrusion-height": 10 + } + } + ] +} diff --git a/metrics/integration/render-tests/fill-extrusion-pattern/feature-expression/expected.png b/metrics/integration/render-tests/fill-extrusion-pattern/feature-expression/expected.png new file mode 100644 index 00000000000..e8051b28c0e Binary files /dev/null and b/metrics/integration/render-tests/fill-extrusion-pattern/feature-expression/expected.png differ diff --git a/metrics/integration/render-tests/fill-extrusion-pattern/feature-expression/style.json b/metrics/integration/render-tests/fill-extrusion-pattern/feature-expression/style.json new file mode 100644 index 00000000000..8e408e81f55 --- /dev/null +++ b/metrics/integration/render-tests/fill-extrusion-pattern/feature-expression/style.json @@ -0,0 +1,99 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "buffer": 0, + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "property": "generic_icon" + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -0.0004, + 0 + ], + [ + -0.0002, + 0.0002 + ], + [ + 0, + 0 + ], + [ + -0.0002, + -0.0002 + ], + [ + -0.0004, + 0 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "property": "generic_metro" + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + 0, + -0.0002 + ], + [ + 0, + 0.0002 + ], + [ + 0.0003, + 0.0002 + ], + [ + 0.0003, + -0.0002 + ], + [ + 0, + -0.0002 + ] + ] + ] + } + } + ] + } + } + }, + "sprite": "local://sprites/emerald", + "pitch": 60, + "zoom": 18, + "layers": [ + { + "id": "extrusion", + "type": "fill-extrusion", + "source": "geojson", + "paint": { + "fill-extrusion-pattern": ["get", "property"], + "fill-extrusion-height": 10 + } + } + ] +} diff --git a/metrics/integration/render-tests/fill-extrusion-pattern/function-2/expected.png b/metrics/integration/render-tests/fill-extrusion-pattern/function-2/expected.png new file mode 100644 index 00000000000..cd86e8dccfe Binary files /dev/null and b/metrics/integration/render-tests/fill-extrusion-pattern/function-2/expected.png differ diff --git a/metrics/integration/render-tests/fill-extrusion-pattern/function-2/style.json b/metrics/integration/render-tests/fill-extrusion-pattern/function-2/style.json new file mode 100644 index 00000000000..114a7b05b26 --- /dev/null +++ b/metrics/integration/render-tests/fill-extrusion-pattern/function-2/style.json @@ -0,0 +1,112 @@ +{ + "version": 8, + "metadata": { + "test": { + "allowed": 0.0005, + "height": 256 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "buffer": 0, + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "property": 20 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -0.0004, + 0 + ], + [ + -0.0002, + 0.0002 + ], + [ + 0, + 0 + ], + [ + -0.0002, + -0.0002 + ], + [ + -0.0004, + 0 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "property": 20 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + 0, + -0.0002 + ], + [ + 0, + 0.0002 + ], + [ + 0.0003, + 0.0002 + ], + [ + 0.0003, + -0.0002 + ], + [ + 0, + -0.0002 + ] + ] + ] + } + } + ] + } + } + }, + "sprite": "local://sprites/emerald", + "pitch": 60, + "zoom": 19, + "layers": [ + { + "id": "extrusion", + "type": "fill-extrusion", + "source": "geojson", + "paint": { + "fill-extrusion-pattern": { + "stops": [ + [ + 18, + "generic_icon" + ], + [ + 19, + "generic_metro" + ] + ], + "type": "interval" + }, + "fill-extrusion-height": 10 + } + } + ] +} diff --git a/metrics/integration/render-tests/fill-extrusion-pattern/function/expected.png b/metrics/integration/render-tests/fill-extrusion-pattern/function/expected.png new file mode 100644 index 00000000000..4d75055649a Binary files /dev/null and b/metrics/integration/render-tests/fill-extrusion-pattern/function/expected.png differ diff --git a/metrics/integration/render-tests/fill-extrusion-pattern/function/style.json b/metrics/integration/render-tests/fill-extrusion-pattern/function/style.json new file mode 100644 index 00000000000..8ff57ee9568 --- /dev/null +++ b/metrics/integration/render-tests/fill-extrusion-pattern/function/style.json @@ -0,0 +1,111 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "buffer": 0, + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "property": 20 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -0.0004, + 0 + ], + [ + -0.0002, + 0.0002 + ], + [ + 0, + 0 + ], + [ + -0.0002, + -0.0002 + ], + [ + -0.0004, + 0 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "property": 20 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + 0, + -0.0002 + ], + [ + 0, + 0.0002 + ], + [ + 0.0003, + 0.0002 + ], + [ + 0.0003, + -0.0002 + ], + [ + 0, + -0.0002 + ] + ] + ] + } + } + ] + } + } + }, + "sprite": "local://sprites/emerald", + "pitch": 60, + "zoom": 18, + "layers": [ + { + "id": "extrusion", + "type": "fill-extrusion", + "source": "geojson", + "paint": { + "fill-extrusion-pattern": { + "stops": [ + [ + 18, + "generic_icon" + ], + [ + 19, + "generic_metro" + ] + ], + "type": "interval" + }, + "fill-extrusion-height": 10 + } + } + ] +} diff --git a/metrics/integration/render-tests/fill-extrusion-pattern/literal/expected.png b/metrics/integration/render-tests/fill-extrusion-pattern/literal/expected.png new file mode 100644 index 00000000000..4d75055649a Binary files /dev/null and b/metrics/integration/render-tests/fill-extrusion-pattern/literal/expected.png differ diff --git a/metrics/integration/render-tests/fill-extrusion-pattern/literal/style.json b/metrics/integration/render-tests/fill-extrusion-pattern/literal/style.json new file mode 100644 index 00000000000..39209caf993 --- /dev/null +++ b/metrics/integration/render-tests/fill-extrusion-pattern/literal/style.json @@ -0,0 +1,99 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "buffer": 0, + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "property": 20 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -0.0004, + 0 + ], + [ + -0.0002, + 0.0002 + ], + [ + 0, + 0 + ], + [ + -0.0002, + -0.0002 + ], + [ + -0.0004, + 0 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "property": 20 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + 0, + -0.0002 + ], + [ + 0, + 0.0002 + ], + [ + 0.0003, + 0.0002 + ], + [ + 0.0003, + -0.0002 + ], + [ + 0, + -0.0002 + ] + ] + ] + } + } + ] + } + } + }, + "sprite": "local://sprites/emerald", + "pitch": 60, + "zoom": 18, + "layers": [ + { + "id": "extrusion", + "type": "fill-extrusion", + "source": "geojson", + "paint": { + "fill-extrusion-pattern": "generic_icon", + "fill-extrusion-height": 10 + } + } + ] +} diff --git a/metrics/integration/render-tests/fill-extrusion-pattern/missing/expected.png b/metrics/integration/render-tests/fill-extrusion-pattern/missing/expected.png new file mode 100644 index 00000000000..2c804bd2eb1 Binary files /dev/null and b/metrics/integration/render-tests/fill-extrusion-pattern/missing/expected.png differ diff --git a/metrics/integration/render-tests/fill-extrusion-pattern/missing/style.json b/metrics/integration/render-tests/fill-extrusion-pattern/missing/style.json new file mode 100644 index 00000000000..8895e09262a --- /dev/null +++ b/metrics/integration/render-tests/fill-extrusion-pattern/missing/style.json @@ -0,0 +1,98 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "property": 20 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -0.0004, + 0 + ], + [ + -0.0002, + 0.0002 + ], + [ + 0, + 0 + ], + [ + -0.0002, + -0.0002 + ], + [ + -0.0004, + 0 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "property": 20 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + 0, + -0.0002 + ], + [ + 0, + 0.0002 + ], + [ + 0.0003, + 0.0002 + ], + [ + 0.0003, + -0.0002 + ], + [ + 0, + -0.0002 + ] + ] + ] + } + } + ] + } + } + }, + "sprite": "local://sprites/emerald", + "pitch": 60, + "zoom": 18, + "layers": [ + { + "id": "extrusion", + "type": "fill-extrusion", + "source": "geojson", + "paint": { + "fill-extrusion-pattern": "missing", + "fill-extrusion-height": 10 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/fill-extrusion-pattern/opacity/expected.png b/metrics/integration/render-tests/fill-extrusion-pattern/opacity/expected.png new file mode 100644 index 00000000000..7b38bfdfbb6 Binary files /dev/null and b/metrics/integration/render-tests/fill-extrusion-pattern/opacity/expected.png differ diff --git a/metrics/integration/render-tests/fill-extrusion-pattern/opacity/style.json b/metrics/integration/render-tests/fill-extrusion-pattern/opacity/style.json new file mode 100644 index 00000000000..f0435da36db --- /dev/null +++ b/metrics/integration/render-tests/fill-extrusion-pattern/opacity/style.json @@ -0,0 +1,100 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "buffer": 0, + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "property": 20 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -0.0004, + 0 + ], + [ + -0.0002, + 0.0002 + ], + [ + 0, + 0 + ], + [ + -0.0002, + -0.0002 + ], + [ + -0.0004, + 0 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "property": 20 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + 0, + -0.0002 + ], + [ + 0, + 0.0002 + ], + [ + 0.0003, + 0.0002 + ], + [ + 0.0003, + -0.0002 + ], + [ + 0, + -0.0002 + ] + ] + ] + } + } + ] + } + } + }, + "sprite": "local://sprites/emerald", + "pitch": 60, + "zoom": 18, + "layers": [ + { + "id": "extrusion", + "type": "fill-extrusion", + "source": "geojson", + "paint": { + "fill-extrusion-pattern": "generic_icon", + "fill-extrusion-opacity": 0.5, + "fill-extrusion-height": 10 + } + } + ] +} diff --git a/metrics/integration/render-tests/fill-extrusion-pattern/tile-buffer/expected.png b/metrics/integration/render-tests/fill-extrusion-pattern/tile-buffer/expected.png new file mode 100644 index 00000000000..8b08b54ea97 Binary files /dev/null and b/metrics/integration/render-tests/fill-extrusion-pattern/tile-buffer/expected.png differ diff --git a/metrics/integration/render-tests/fill-extrusion-pattern/tile-buffer/style.json b/metrics/integration/render-tests/fill-extrusion-pattern/tile-buffer/style.json new file mode 100644 index 00000000000..dd60969401c --- /dev/null +++ b/metrics/integration/render-tests/fill-extrusion-pattern/tile-buffer/style.json @@ -0,0 +1,98 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "property": 20 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -0.0004, + 0 + ], + [ + -0.0002, + 0.0002 + ], + [ + 0, + 0 + ], + [ + -0.0002, + -0.0002 + ], + [ + -0.0004, + 0 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "property": 20 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + 0, + -0.0002 + ], + [ + 0, + 0.0002 + ], + [ + 0.0003, + 0.0002 + ], + [ + 0.0003, + -0.0002 + ], + [ + 0, + -0.0002 + ] + ] + ] + } + } + ] + } + } + }, + "sprite": "local://sprites/emerald", + "pitch": 60, + "zoom": 18, + "layers": [ + { + "id": "extrusion", + "type": "fill-extrusion", + "source": "geojson", + "paint": { + "fill-extrusion-pattern": "generic_icon", + "fill-extrusion-height": 10 + } + } + ] +} diff --git a/metrics/integration/render-tests/fill-extrusion-translate-anchor/map/expected.png b/metrics/integration/render-tests/fill-extrusion-translate-anchor/map/expected.png new file mode 100644 index 00000000000..265a4f87290 Binary files /dev/null and b/metrics/integration/render-tests/fill-extrusion-translate-anchor/map/expected.png differ diff --git a/metrics/integration/render-tests/fill-extrusion-translate-anchor/map/style.json b/metrics/integration/render-tests/fill-extrusion-translate-anchor/map/style.json new file mode 100644 index 00000000000..cc1081eaa40 --- /dev/null +++ b/metrics/integration/render-tests/fill-extrusion-translate-anchor/map/style.json @@ -0,0 +1,57 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "property": 10 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ [ -0.0003, -0.0004 ], + [ -0.0003, -0.0001 ], + [ 0, -0.0001 ], + [ 0, -0.0004 ], + [ -0.0003, -0.0004 ] ] + ] + } + } + ] + } + } + }, + "pitch": 60, + "bearing": 90, + "zoom": 18, + "layers": [ + { + "id": "fill", + "type": "fill", + "source": "geojson", + "paint": { + "fill-color": "rgba(0,255,255,1)" + } + }, + { + "id": "extrusion", + "type": "fill-extrusion", + "source": "geojson", + "paint": { + "fill-extrusion-height": 10, + "fill-extrusion-translate": [-30, -30], + "fill-extrusion-translate-anchor": "map" + } + } + ] +} diff --git a/metrics/integration/render-tests/fill-extrusion-translate-anchor/viewport/expected.png b/metrics/integration/render-tests/fill-extrusion-translate-anchor/viewport/expected.png new file mode 100644 index 00000000000..49249fa5a6b Binary files /dev/null and b/metrics/integration/render-tests/fill-extrusion-translate-anchor/viewport/expected.png differ diff --git a/metrics/integration/render-tests/fill-extrusion-translate-anchor/viewport/style.json b/metrics/integration/render-tests/fill-extrusion-translate-anchor/viewport/style.json new file mode 100644 index 00000000000..f5dd17dfb09 --- /dev/null +++ b/metrics/integration/render-tests/fill-extrusion-translate-anchor/viewport/style.json @@ -0,0 +1,57 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "property": 10 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ [ -0.0003, -0.0004 ], + [ -0.0003, -0.0001 ], + [ 0, -0.0001 ], + [ 0, -0.0004 ], + [ -0.0003, -0.0004 ] ] + ] + } + } + ] + } + } + }, + "pitch": 60, + "bearing": 90, + "zoom": 18, + "layers": [ + { + "id": "fill", + "type": "fill", + "source": "geojson", + "paint": { + "fill-color": "rgba(0,255,255,1)" + } + }, + { + "id": "extrusion", + "type": "fill-extrusion", + "source": "geojson", + "paint": { + "fill-extrusion-height": 10, + "fill-extrusion-translate": [-30, -30], + "fill-extrusion-translate-anchor": "viewport" + } + } + ] +} diff --git a/metrics/integration/render-tests/fill-extrusion-translate/default/expected.png b/metrics/integration/render-tests/fill-extrusion-translate/default/expected.png new file mode 100644 index 00000000000..32c7fcc0b2a Binary files /dev/null and b/metrics/integration/render-tests/fill-extrusion-translate/default/expected.png differ diff --git a/metrics/integration/render-tests/fill-extrusion-translate/default/style.json b/metrics/integration/render-tests/fill-extrusion-translate/default/style.json new file mode 100644 index 00000000000..14b3df2bce2 --- /dev/null +++ b/metrics/integration/render-tests/fill-extrusion-translate/default/style.json @@ -0,0 +1,86 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "property": 10 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ [ -0.0003, -0.00047 ], + [ -0.0003, -0.00017 ], + [ 0, -0.00017 ], + [ 0, -0.00047 ], + [ -0.0003, -0.00047 ] ] + ] + } + }, + { + "type": "Feature", + "properties": { + "property": 20 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ [ -0.00015, -0.00015 ], + [ -0.00015, 0.00015 ], + [ 0.00015, 0.00015 ], + [ 0.00015, -0.00015 ], + [ -0.00015, -0.00015 ] ] + ] + } + }, + { + "type": "Feature", + "properties": { + "property": 30 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ [ 0, 0.00017 ], + [ 0, 0.00047 ], + [ 0.0003, 0.00047 ], + [ 0.0003, 0.00017 ], + [ 0, 0.00017 ] ] + ] + } + } + ] + } + } + }, + "pitch": 60, + "zoom": 19, + "layers": [ + { + "id": "fill", + "type": "fill", + "source": "geojson", + "paint": { + "fill-color": "rgba(0,255,255,1)" + } + }, + { + "id": "extrusion", + "type": "fill-extrusion", + "source": "geojson", + "paint": { + "fill-extrusion-height": 10 + } + } + ] +} diff --git a/metrics/integration/render-tests/fill-extrusion-translate/function/expected.png b/metrics/integration/render-tests/fill-extrusion-translate/function/expected.png new file mode 100644 index 00000000000..ee88bc9e07e Binary files /dev/null and b/metrics/integration/render-tests/fill-extrusion-translate/function/expected.png differ diff --git a/metrics/integration/render-tests/fill-extrusion-translate/function/style.json b/metrics/integration/render-tests/fill-extrusion-translate/function/style.json new file mode 100644 index 00000000000..c58ae1a2790 --- /dev/null +++ b/metrics/integration/render-tests/fill-extrusion-translate/function/style.json @@ -0,0 +1,91 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "property": 10 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ [ -0.0003, -0.00047 ], + [ -0.0003, -0.00017 ], + [ 0, -0.00017 ], + [ 0, -0.00047 ], + [ -0.0003, -0.00047 ] ] + ] + } + }, + { + "type": "Feature", + "properties": { + "property": 20 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ [ -0.00015, -0.00015 ], + [ -0.00015, 0.00015 ], + [ 0.00015, 0.00015 ], + [ 0.00015, -0.00015 ], + [ -0.00015, -0.00015 ] ] + ] + } + }, + { + "type": "Feature", + "properties": { + "property": 30 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ [ 0, 0.00017 ], + [ 0, 0.00047 ], + [ 0.0003, 0.00047 ], + [ 0.0003, 0.00017 ], + [ 0, 0.00017 ] ] + ] + } + } + ] + } + } + }, + "pitch": 60, + "zoom": 19, + "layers": [ + { + "id": "fill", + "type": "fill", + "source": "geojson", + "paint": { + "fill-antialias": false, + "fill-color": "rgba(0,255,255,1)" + } + }, + { + "id": "extrusion", + "type": "fill-extrusion", + "source": "geojson", + "paint": { + "fill-extrusion-height": 10, + "fill-extrusion-translate": { + "stops": [[18, [0, -220]], [20, [100, -20]]], + "type": "exponential" + } + } + } + ] +} diff --git a/metrics/integration/render-tests/fill-extrusion-translate/literal-opacity/expected.png b/metrics/integration/render-tests/fill-extrusion-translate/literal-opacity/expected.png new file mode 100644 index 00000000000..51bbd4fc75a Binary files /dev/null and b/metrics/integration/render-tests/fill-extrusion-translate/literal-opacity/expected.png differ diff --git a/metrics/integration/render-tests/fill-extrusion-translate/literal-opacity/style.json b/metrics/integration/render-tests/fill-extrusion-translate/literal-opacity/style.json new file mode 100644 index 00000000000..a09a6c0a2b4 --- /dev/null +++ b/metrics/integration/render-tests/fill-extrusion-translate/literal-opacity/style.json @@ -0,0 +1,89 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "property": 10 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ [ -0.0003, -0.00047 ], + [ -0.0003, -0.00017 ], + [ 0, -0.00017 ], + [ 0, -0.00047 ], + [ -0.0003, -0.00047 ] ] + ] + } + }, + { + "type": "Feature", + "properties": { + "property": 20 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ [ -0.00015, -0.00015 ], + [ -0.00015, 0.00015 ], + [ 0.00015, 0.00015 ], + [ 0.00015, -0.00015 ], + [ -0.00015, -0.00015 ] ] + ] + } + }, + { + "type": "Feature", + "properties": { + "property": 30 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ [ 0, 0.00017 ], + [ 0, 0.00047 ], + [ 0.0003, 0.00047 ], + [ 0.0003, 0.00017 ], + [ 0, 0.00017 ] ] + ] + } + } + ] + } + } + }, + "pitch": 60, + "zoom": 19, + "layers": [ + { + "id": "fill", + "type": "fill", + "source": "geojson", + "paint": { + "fill-antialias": false, + "fill-color": "rgba(0,255,255,1)" + } + }, + { + "id": "extrusion", + "type": "fill-extrusion", + "source": "geojson", + "paint": { + "fill-extrusion-height": 10, + "fill-extrusion-translate": [-30, -30], + "fill-extrusion-opacity": 0.5 + } + } + ] +} diff --git a/metrics/integration/render-tests/fill-extrusion-translate/literal/expected.png b/metrics/integration/render-tests/fill-extrusion-translate/literal/expected.png new file mode 100644 index 00000000000..8e981820bb2 Binary files /dev/null and b/metrics/integration/render-tests/fill-extrusion-translate/literal/expected.png differ diff --git a/metrics/integration/render-tests/fill-extrusion-translate/literal/style.json b/metrics/integration/render-tests/fill-extrusion-translate/literal/style.json new file mode 100644 index 00000000000..f4eab87156b --- /dev/null +++ b/metrics/integration/render-tests/fill-extrusion-translate/literal/style.json @@ -0,0 +1,88 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "property": 10 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ [ -0.0003, -0.00047 ], + [ -0.0003, -0.00017 ], + [ 0, -0.00017 ], + [ 0, -0.00047 ], + [ -0.0003, -0.00047 ] ] + ] + } + }, + { + "type": "Feature", + "properties": { + "property": 20 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ [ -0.00015, -0.00015 ], + [ -0.00015, 0.00015 ], + [ 0.00015, 0.00015 ], + [ 0.00015, -0.00015 ], + [ -0.00015, -0.00015 ] ] + ] + } + }, + { + "type": "Feature", + "properties": { + "property": 30 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ [ 0, 0.00017 ], + [ 0, 0.00047 ], + [ 0.0003, 0.00047 ], + [ 0.0003, 0.00017 ], + [ 0, 0.00017 ] ] + ] + } + } + ] + } + } + }, + "pitch": 60, + "zoom": 19, + "layers": [ + { + "id": "fill", + "type": "fill", + "source": "geojson", + "paint": { + "fill-antialias": false, + "fill-color": "rgba(0,255,255,1)" + } + }, + { + "id": "extrusion", + "type": "fill-extrusion", + "source": "geojson", + "paint": { + "fill-extrusion-height": 10, + "fill-extrusion-translate": [-30, -30] + } + } + ] +} diff --git a/metrics/integration/render-tests/fill-extrusion-vertical-gradient/default/expected.png b/metrics/integration/render-tests/fill-extrusion-vertical-gradient/default/expected.png new file mode 100644 index 00000000000..051c62a6002 Binary files /dev/null and b/metrics/integration/render-tests/fill-extrusion-vertical-gradient/default/expected.png differ diff --git a/metrics/integration/render-tests/fill-extrusion-vertical-gradient/default/style.json b/metrics/integration/render-tests/fill-extrusion-vertical-gradient/default/style.json new file mode 100644 index 00000000000..405797c646a --- /dev/null +++ b/metrics/integration/render-tests/fill-extrusion-vertical-gradient/default/style.json @@ -0,0 +1,101 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "light": { + "intensity": 1 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "property": 0 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -0.0003, + -0.0003 + ], + [ + -0.0003, + 0.0003 + ], + [ + 0.0003, + 0.0003 + ], + [ + 0.0003, + -0.0003 + ], + [ + -0.0003, + -0.0003 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "property": 20 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -0.0003, + -0.0003 + ], + [ + -0.0003, + 0.0003 + ], + [ + 0.0003, + 0.0003 + ], + [ + 0.0003, + -0.0003 + ], + [ + -0.0003, + -0.0003 + ] + ] + ] + } + } + ] + } + } + }, + "pitch": 60, + "zoom": 18, + "layers": [ + { + "id": "extrusion", + "type": "fill-extrusion", + "source": "geojson", + "paint": { + "fill-extrusion-height": ["+", ["get", "property"], 18], + "fill-extrusion-base": ["get", "property"], + "fill-extrusion-color": "#999" + } + } + ] +} diff --git a/metrics/integration/render-tests/fill-extrusion-vertical-gradient/false/expected.png b/metrics/integration/render-tests/fill-extrusion-vertical-gradient/false/expected.png new file mode 100644 index 00000000000..48ddf5ab016 Binary files /dev/null and b/metrics/integration/render-tests/fill-extrusion-vertical-gradient/false/expected.png differ diff --git a/metrics/integration/render-tests/fill-extrusion-vertical-gradient/false/style.json b/metrics/integration/render-tests/fill-extrusion-vertical-gradient/false/style.json new file mode 100644 index 00000000000..7b7d5a6af3b --- /dev/null +++ b/metrics/integration/render-tests/fill-extrusion-vertical-gradient/false/style.json @@ -0,0 +1,102 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "light": { + "intensity": 1 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "property": 0 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -0.0003, + -0.0003 + ], + [ + -0.0003, + 0.0003 + ], + [ + 0.0003, + 0.0003 + ], + [ + 0.0003, + -0.0003 + ], + [ + -0.0003, + -0.0003 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "property": 20 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -0.0003, + -0.0003 + ], + [ + -0.0003, + 0.0003 + ], + [ + 0.0003, + 0.0003 + ], + [ + 0.0003, + -0.0003 + ], + [ + -0.0003, + -0.0003 + ] + ] + ] + } + } + ] + } + } + }, + "pitch": 60, + "zoom": 18, + "layers": [ + { + "id": "extrusion", + "type": "fill-extrusion", + "source": "geojson", + "paint": { + "fill-extrusion-height": ["+", ["get", "property"], 18], + "fill-extrusion-base": ["get", "property"], + "fill-extrusion-color": "#999", + "fill-extrusion-vertical-gradient": false + } + } + ] +} diff --git a/metrics/integration/render-tests/fill-opacity/default/expected.png b/metrics/integration/render-tests/fill-opacity/default/expected.png new file mode 100644 index 00000000000..8f17810f559 Binary files /dev/null and b/metrics/integration/render-tests/fill-opacity/default/expected.png differ diff --git a/metrics/integration/render-tests/fill-opacity/default/style.json b/metrics/integration/render-tests/fill-opacity/default/style.json new file mode 100644 index 00000000000..04a517e6510 --- /dev/null +++ b/metrics/integration/render-tests/fill-opacity/default/style.json @@ -0,0 +1,48 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -10, + -10 + ], + [ + -10, + 10 + ], + [ + 10, + 10 + ], + [ + 10, + -10 + ], + [ + -10, + -10 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "fill", + "type": "fill", + "source": "geojson" + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/fill-opacity/function/expected.png b/metrics/integration/render-tests/fill-opacity/function/expected.png new file mode 100644 index 00000000000..b5bbe84015f Binary files /dev/null and b/metrics/integration/render-tests/fill-opacity/function/expected.png differ diff --git a/metrics/integration/render-tests/fill-opacity/function/style.json b/metrics/integration/render-tests/fill-opacity/function/style.json new file mode 100644 index 00000000000..c37b640acc9 --- /dev/null +++ b/metrics/integration/render-tests/fill-opacity/function/style.json @@ -0,0 +1,62 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -10, + -10 + ], + [ + -10, + 10 + ], + [ + 10, + 10 + ], + [ + 10, + -10 + ], + [ + -10, + -10 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "fill", + "type": "fill", + "source": "geojson", + "paint": { + "fill-opacity": { + "stops": [ + [ + 0, + 0.5 + ], + [ + 1, + 0.6 + ] + ] + } + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/fill-opacity/literal/expected.png b/metrics/integration/render-tests/fill-opacity/literal/expected.png new file mode 100644 index 00000000000..32e38315c5f Binary files /dev/null and b/metrics/integration/render-tests/fill-opacity/literal/expected.png differ diff --git a/metrics/integration/render-tests/fill-opacity/literal/style.json b/metrics/integration/render-tests/fill-opacity/literal/style.json new file mode 100644 index 00000000000..664e97c2607 --- /dev/null +++ b/metrics/integration/render-tests/fill-opacity/literal/style.json @@ -0,0 +1,51 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -10, + -10 + ], + [ + -10, + 10 + ], + [ + 10, + 10 + ], + [ + 10, + -10 + ], + [ + -10, + -10 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "fill", + "type": "fill", + "source": "geojson", + "paint": { + "fill-opacity": 0.3 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/fill-opacity/opaque-fill-over-symbol-layer/expected.png b/metrics/integration/render-tests/fill-opacity/opaque-fill-over-symbol-layer/expected.png new file mode 100644 index 00000000000..289251c9776 Binary files /dev/null and b/metrics/integration/render-tests/fill-opacity/opaque-fill-over-symbol-layer/expected.png differ diff --git a/metrics/integration/render-tests/fill-opacity/opaque-fill-over-symbol-layer/style.json b/metrics/integration/render-tests/fill-opacity/opaque-fill-over-symbol-layer/style.json new file mode 100644 index 00000000000..397b180f8ae --- /dev/null +++ b/metrics/integration/render-tests/fill-opacity/opaque-fill-over-symbol-layer/style.json @@ -0,0 +1,78 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -20, + -20 + ], + [ + -20, + 20 + ], + [ + 20, + 20 + ], + [ + 20, + -20 + ], + [ + -20, + -20 + ] + ] + ] + } + }, + "icon-source": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + }, + "properties": { + "icon": "building" + } + } + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "icons", + "type": "symbol", + "source": "icon-source", + "layout": { + "icon-image": "{icon}-12" + } + }, + { + "id": "fill", + "type": "fill", + "source": "geojson" + } + ] +} diff --git a/metrics/integration/render-tests/fill-opacity/overlapping/expected.png b/metrics/integration/render-tests/fill-opacity/overlapping/expected.png new file mode 100644 index 00000000000..258bc57f4e0 Binary files /dev/null and b/metrics/integration/render-tests/fill-opacity/overlapping/expected.png differ diff --git a/metrics/integration/render-tests/fill-opacity/overlapping/style.json b/metrics/integration/render-tests/fill-opacity/overlapping/style.json new file mode 100644 index 00000000000..0d32e742561 --- /dev/null +++ b/metrics/integration/render-tests/fill-opacity/overlapping/style.json @@ -0,0 +1,92 @@ +{ + "version": 8, + "sources": { + "rectangles": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -130.78125, + -33.13755119234615 + ], + [ + -130.78125, + 63.548552232036414 + ], + [ + 15.468749999999998, + 63.548552232036414 + ], + [ + 15.468749999999998, + -33.13755119234615 + ], + [ + -130.78125, + -33.13755119234615 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -48.515625, + -54.97761367069625 + ], + [ + -48.515625, + 36.5978891330702 + ], + [ + 169.45312499999997, + 36.5978891330702 + ], + [ + 169.45312499999997, + -54.97761367069625 + ], + [ + -48.515625, + -54.97761367069625 + ] + ] + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "rectangles", + "type": "fill", + "source": "rectangles", + "paint": { + "fill-opacity": 0.3 + } + } + ] +} diff --git a/metrics/integration/render-tests/fill-opacity/property-function-pattern/expected.png b/metrics/integration/render-tests/fill-opacity/property-function-pattern/expected.png new file mode 100644 index 00000000000..1e1ff15d47d Binary files /dev/null and b/metrics/integration/render-tests/fill-opacity/property-function-pattern/expected.png differ diff --git a/metrics/integration/render-tests/fill-opacity/property-function-pattern/style.json b/metrics/integration/render-tests/fill-opacity/property-function-pattern/style.json new file mode 100644 index 00000000000..c4567a81b7f --- /dev/null +++ b/metrics/integration/render-tests/fill-opacity/property-function-pattern/style.json @@ -0,0 +1,143 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "property": 0 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -12, + -12 + ], + [ + -12, + 12 + ], + [ + -4, + 12 + ], + [ + -4, + -12 + ], + [ + -12, + -12 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "property": 1 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -4, + -12 + ], + [ + -4, + 12 + ], + [ + 4, + 12 + ], + [ + 4, + -12 + ], + [ + -4, + -12 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "property": 2 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + 4, + -12 + ], + [ + 4, + 12 + ], + [ + 12, + 12 + ], + [ + 12, + -12 + ], + [ + 4, + -12 + ] + ] + ] + } + } + ] + } + } + }, + "sprite": "local://sprites/emerald", + "layers": [ + { + "id": "fill", + "type": "fill", + "source": "geojson", + "paint": { + "fill-antialias": false, + "fill-pattern": "generic_icon", + "fill-opacity": { + "property": "property", + "stops": [ + [ + 0, + 1 + ], + [ + 4, + 0 + ] + ] + } + } + } + ] +} diff --git a/metrics/integration/render-tests/fill-opacity/property-function/expected.png b/metrics/integration/render-tests/fill-opacity/property-function/expected.png new file mode 100644 index 00000000000..72012fddc58 Binary files /dev/null and b/metrics/integration/render-tests/fill-opacity/property-function/expected.png differ diff --git a/metrics/integration/render-tests/fill-opacity/property-function/style.json b/metrics/integration/render-tests/fill-opacity/property-function/style.json new file mode 100644 index 00000000000..67afdc92144 --- /dev/null +++ b/metrics/integration/render-tests/fill-opacity/property-function/style.json @@ -0,0 +1,141 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "property": 0 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -12, + -12 + ], + [ + -12, + 12 + ], + [ + -4, + 12 + ], + [ + -4, + -12 + ], + [ + -12, + -12 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "property": 1 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -4, + -12 + ], + [ + -4, + 12 + ], + [ + 4, + 12 + ], + [ + 4, + -12 + ], + [ + -4, + -12 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "property": 2 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + 4, + -12 + ], + [ + 4, + 12 + ], + [ + 12, + 12 + ], + [ + 12, + -12 + ], + [ + 4, + -12 + ] + ] + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "fill", + "type": "fill", + "source": "geojson", + "paint": { + "fill-antialias": false, + "fill-opacity": { + "property": "property", + "stops": [ + [ + 0, + 1 + ], + [ + 4, + 0 + ] + ] + } + } + } + ] +} diff --git a/metrics/integration/render-tests/fill-opacity/zoom-and-property-function-pattern/expected.png b/metrics/integration/render-tests/fill-opacity/zoom-and-property-function-pattern/expected.png new file mode 100644 index 00000000000..6548b8e8b36 Binary files /dev/null and b/metrics/integration/render-tests/fill-opacity/zoom-and-property-function-pattern/expected.png differ diff --git a/metrics/integration/render-tests/fill-opacity/zoom-and-property-function-pattern/style.json b/metrics/integration/render-tests/fill-opacity/zoom-and-property-function-pattern/style.json new file mode 100644 index 00000000000..3d96ca6836b --- /dev/null +++ b/metrics/integration/render-tests/fill-opacity/zoom-and-property-function-pattern/style.json @@ -0,0 +1,164 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "zoom": 0.1, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "property": 0 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -12, + -12 + ], + [ + -12, + 12 + ], + [ + -4, + 12 + ], + [ + -4, + -12 + ], + [ + -12, + -12 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "property": 1 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -4, + -12 + ], + [ + -4, + 12 + ], + [ + 4, + 12 + ], + [ + 4, + -12 + ], + [ + -4, + -12 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "property": 2 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + 4, + -12 + ], + [ + 4, + 12 + ], + [ + 12, + 12 + ], + [ + 12, + -12 + ], + [ + 4, + -12 + ] + ] + ] + } + } + ] + } + } + }, + "sprite": "local://sprites/emerald", + "layers": [ + { + "id": "fill", + "type": "fill", + "source": "geojson", + "paint": { + "fill-antialias": false, + "fill-pattern": "generic_icon", + "fill-opacity": { + "property": "property", + "stops": [ + [ + { + "zoom": 0, + "value": 0 + }, + 1 + ], + [ + { + "zoom": 0, + "value": 4 + }, + 0 + ], + [ + { + "zoom": 1, + "value": 0 + }, + 0 + ], + [ + { + "zoom": 1, + "value": 4 + }, + 0 + ] + ] + } + } + } + ] +} diff --git a/metrics/integration/render-tests/fill-opacity/zoom-and-property-function/expected.png b/metrics/integration/render-tests/fill-opacity/zoom-and-property-function/expected.png new file mode 100644 index 00000000000..0e3275740ab Binary files /dev/null and b/metrics/integration/render-tests/fill-opacity/zoom-and-property-function/expected.png differ diff --git a/metrics/integration/render-tests/fill-opacity/zoom-and-property-function/style.json b/metrics/integration/render-tests/fill-opacity/zoom-and-property-function/style.json new file mode 100644 index 00000000000..b815079dfcd --- /dev/null +++ b/metrics/integration/render-tests/fill-opacity/zoom-and-property-function/style.json @@ -0,0 +1,162 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "zoom": 0.1, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "property": 0 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -12, + -12 + ], + [ + -12, + 12 + ], + [ + -4, + 12 + ], + [ + -4, + -12 + ], + [ + -12, + -12 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "property": 1 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -4, + -12 + ], + [ + -4, + 12 + ], + [ + 4, + 12 + ], + [ + 4, + -12 + ], + [ + -4, + -12 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "property": 2 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + 4, + -12 + ], + [ + 4, + 12 + ], + [ + 12, + 12 + ], + [ + 12, + -12 + ], + [ + 4, + -12 + ] + ] + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "fill", + "type": "fill", + "source": "geojson", + "paint": { + "fill-antialias": false, + "fill-opacity": { + "property": "property", + "stops": [ + [ + { + "zoom": 0, + "value": 0 + }, + 1 + ], + [ + { + "zoom": 0, + "value": 4 + }, + 0 + ], + [ + { + "zoom": 1, + "value": 0 + }, + 0 + ], + [ + { + "zoom": 1, + "value": 4 + }, + 0 + ] + ] + } + } + } + ] +} diff --git a/metrics/integration/render-tests/fill-outline-color/default/expected.png b/metrics/integration/render-tests/fill-outline-color/default/expected.png new file mode 100644 index 00000000000..724d17cd7d3 Binary files /dev/null and b/metrics/integration/render-tests/fill-outline-color/default/expected.png differ diff --git a/metrics/integration/render-tests/fill-outline-color/default/style.json b/metrics/integration/render-tests/fill-outline-color/default/style.json new file mode 100644 index 00000000000..cab0a71e517 --- /dev/null +++ b/metrics/integration/render-tests/fill-outline-color/default/style.json @@ -0,0 +1,51 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -10, + -10 + ], + [ + -10, + 10 + ], + [ + 10, + 10 + ], + [ + 10, + -10 + ], + [ + -10, + -10 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "fill", + "type": "fill", + "source": "geojson", + "paint": { + "fill-color": "rgba(0,0,0,0)" + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/fill-outline-color/fill/expected.png b/metrics/integration/render-tests/fill-outline-color/fill/expected.png new file mode 100644 index 00000000000..c9a44190230 Binary files /dev/null and b/metrics/integration/render-tests/fill-outline-color/fill/expected.png differ diff --git a/metrics/integration/render-tests/fill-outline-color/fill/style.json b/metrics/integration/render-tests/fill-outline-color/fill/style.json new file mode 100644 index 00000000000..7d23e7648fb --- /dev/null +++ b/metrics/integration/render-tests/fill-outline-color/fill/style.json @@ -0,0 +1,53 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "allowed": 0.00075 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -13, + -13 + ], + [ + -10, + 7 + ], + [ + 10, + 10 + ], + [ + 7, + -10 + ], + [ + -13, + -13 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "fill", + "type": "fill", + "source": "geojson", + "paint": { + "fill-color": "#CCC", + "fill-outline-color": "#000" + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/fill-outline-color/function/expected.png b/metrics/integration/render-tests/fill-outline-color/function/expected.png new file mode 100644 index 00000000000..d1641cb2bcb Binary files /dev/null and b/metrics/integration/render-tests/fill-outline-color/function/expected.png differ diff --git a/metrics/integration/render-tests/fill-outline-color/function/style.json b/metrics/integration/render-tests/fill-outline-color/function/style.json new file mode 100644 index 00000000000..457900c525a --- /dev/null +++ b/metrics/integration/render-tests/fill-outline-color/function/style.json @@ -0,0 +1,64 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "allowed": 0.00075 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -10, + -10 + ], + [ + -10, + 10 + ], + [ + 10, + 10 + ], + [ + 10, + -10 + ], + [ + -10, + -10 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "fill", + "type": "fill", + "source": "geojson", + "paint": { + "fill-color": "rgba(0,0,0,0)", + "fill-outline-color": { + "stops": [ + [ + 0, + "green" + ], + [ + 1, + "blue" + ] + ] + } + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/fill-outline-color/literal/expected.png b/metrics/integration/render-tests/fill-outline-color/literal/expected.png new file mode 100644 index 00000000000..a9af2fc7aab Binary files /dev/null and b/metrics/integration/render-tests/fill-outline-color/literal/expected.png differ diff --git a/metrics/integration/render-tests/fill-outline-color/literal/style.json b/metrics/integration/render-tests/fill-outline-color/literal/style.json new file mode 100644 index 00000000000..1e8be720930 --- /dev/null +++ b/metrics/integration/render-tests/fill-outline-color/literal/style.json @@ -0,0 +1,53 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "allowed": 0.00075 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -10, + -10 + ], + [ + -10, + 10 + ], + [ + 10, + 10 + ], + [ + 10, + -10 + ], + [ + -10, + -10 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "fill", + "type": "fill", + "source": "geojson", + "paint": { + "fill-color": "rgba(0,0,0,0)", + "fill-outline-color": "blue" + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/fill-outline-color/multiply/expected.png b/metrics/integration/render-tests/fill-outline-color/multiply/expected.png new file mode 100644 index 00000000000..fe7613d9592 Binary files /dev/null and b/metrics/integration/render-tests/fill-outline-color/multiply/expected.png differ diff --git a/metrics/integration/render-tests/fill-outline-color/multiply/style.json b/metrics/integration/render-tests/fill-outline-color/multiply/style.json new file mode 100644 index 00000000000..f54b9711aaa --- /dev/null +++ b/metrics/integration/render-tests/fill-outline-color/multiply/style.json @@ -0,0 +1,53 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -10, + -10 + ], + [ + -10, + 10 + ], + [ + 10, + 10 + ], + [ + 10, + -10 + ], + [ + -10, + -10 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "fill", + "type": "fill", + "source": "geojson", + "paint": { + "fill-color": "rgba(0,0,0,0)", + "fill-outline-color": "rgba(255,0,0,0.5)", + "fill-opacity": 0.5 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/fill-outline-color/opacity/expected.png b/metrics/integration/render-tests/fill-outline-color/opacity/expected.png new file mode 100644 index 00000000000..56adf226718 Binary files /dev/null and b/metrics/integration/render-tests/fill-outline-color/opacity/expected.png differ diff --git a/metrics/integration/render-tests/fill-outline-color/opacity/style.json b/metrics/integration/render-tests/fill-outline-color/opacity/style.json new file mode 100644 index 00000000000..cc57346269e --- /dev/null +++ b/metrics/integration/render-tests/fill-outline-color/opacity/style.json @@ -0,0 +1,54 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "allowed": 0.00075 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -10, + -10 + ], + [ + -10, + 10 + ], + [ + 10, + 10 + ], + [ + 10, + -10 + ], + [ + -10, + -10 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "fill", + "type": "fill", + "source": "geojson", + "paint": { + "fill-color": "rgba(0,0,0,0)", + "fill-outline-color": "rgba(255,0,0,1)", + "fill-opacity": 0.5 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/fill-outline-color/property-function/expected.png b/metrics/integration/render-tests/fill-outline-color/property-function/expected.png new file mode 100644 index 00000000000..5b9082750c8 Binary files /dev/null and b/metrics/integration/render-tests/fill-outline-color/property-function/expected.png differ diff --git a/metrics/integration/render-tests/fill-outline-color/property-function/style.json b/metrics/integration/render-tests/fill-outline-color/property-function/style.json new file mode 100644 index 00000000000..652224894b3 --- /dev/null +++ b/metrics/integration/render-tests/fill-outline-color/property-function/style.json @@ -0,0 +1,145 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "property": 0 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -12, + -12 + ], + [ + -12, + 12 + ], + [ + -4, + 12 + ], + [ + -4, + -12 + ], + [ + -12, + -12 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "property": 1 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -4, + -12 + ], + [ + -4, + 12 + ], + [ + 4, + 12 + ], + [ + 4, + -12 + ], + [ + -4, + -12 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "property": 2 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + 4, + -12 + ], + [ + 4, + 12 + ], + [ + 12, + 12 + ], + [ + 12, + -12 + ], + [ + 4, + -12 + ] + ] + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "fill", + "type": "fill", + "source": "geojson", + "paint": { + "fill-color": "rgba(0,0,0,0)", + "fill-outline-color": { + "property": "property", + "stops": [ + [ + 0, + "rgba(255,0,0,1)" + ], + [ + 1, + "rgba(0,255,0,1)" + ], + [ + 2, + "rgba(0,0,255,1)" + ] + ] + } + } + } + ] +} diff --git a/metrics/integration/render-tests/fill-outline-color/zoom-and-property-function/expected.png b/metrics/integration/render-tests/fill-outline-color/zoom-and-property-function/expected.png new file mode 100644 index 00000000000..b8ea39d48f7 Binary files /dev/null and b/metrics/integration/render-tests/fill-outline-color/zoom-and-property-function/expected.png differ diff --git a/metrics/integration/render-tests/fill-outline-color/zoom-and-property-function/style.json b/metrics/integration/render-tests/fill-outline-color/zoom-and-property-function/style.json new file mode 100644 index 00000000000..1322032145f --- /dev/null +++ b/metrics/integration/render-tests/fill-outline-color/zoom-and-property-function/style.json @@ -0,0 +1,177 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "allowed": 0.00075 + } + }, + "zoom": 0.1, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "property": 0 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -12, + -12 + ], + [ + -12, + 12 + ], + [ + -4, + 12 + ], + [ + -4, + -12 + ], + [ + -12, + -12 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "property": 1 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -4, + -12 + ], + [ + -4, + 12 + ], + [ + 4, + 12 + ], + [ + 4, + -12 + ], + [ + -4, + -12 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "property": 2 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + 4, + -12 + ], + [ + 4, + 12 + ], + [ + 12, + 12 + ], + [ + 12, + -12 + ], + [ + 4, + -12 + ] + ] + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "fill", + "type": "fill", + "source": "geojson", + "paint": { + "fill-color": "rgba(0,0,0,0)", + "fill-outline-color": { + "property": "property", + "stops": [ + [ + { + "zoom": 0, + "value": 0 + }, + "rgba(255,0,0,1)" + ], + [ + { + "zoom": 0, + "value": 1 + }, + "rgba(0,255,0,1)" + ], + [ + { + "zoom": 0, + "value": 2 + }, + "rgba(0,0,255,1)" + ], + [ + { + "zoom": 1, + "value": 0 + }, + "rgba(255,0,0,0)" + ], + [ + { + "zoom": 1, + "value": 1 + }, + "rgba(0,255,0,0)" + ], + [ + { + "zoom": 1, + "value": 2 + }, + "rgba(0,0,255,0)" + ] + ] + } + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/fill-pattern/@2x/expected.png b/metrics/integration/render-tests/fill-pattern/@2x/expected.png new file mode 100644 index 00000000000..f01c269f708 Binary files /dev/null and b/metrics/integration/render-tests/fill-pattern/@2x/expected.png differ diff --git a/metrics/integration/render-tests/fill-pattern/@2x/style.json b/metrics/integration/render-tests/fill-pattern/@2x/style.json new file mode 100644 index 00000000000..1d12983c392 --- /dev/null +++ b/metrics/integration/render-tests/fill-pattern/@2x/style.json @@ -0,0 +1,54 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "pixelRatio": 2 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -10, + -10 + ], + [ + -10, + 10 + ], + [ + 10, + 10 + ], + [ + 10, + -10 + ], + [ + -10, + -10 + ] + ] + ] + } + } + }, + "sprite": "local://sprites/emerald", + "layers": [ + { + "id": "fill", + "type": "fill", + "source": "geojson", + "paint": { + "fill-antialias": false, + "fill-pattern": "generic_icon" + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/fill-pattern/case-data-expression/expected.png b/metrics/integration/render-tests/fill-pattern/case-data-expression/expected.png new file mode 100644 index 00000000000..3dadba9aa54 Binary files /dev/null and b/metrics/integration/render-tests/fill-pattern/case-data-expression/expected.png differ diff --git a/metrics/integration/render-tests/fill-pattern/case-data-expression/style.json b/metrics/integration/render-tests/fill-pattern/case-data-expression/style.json new file mode 100644 index 00000000000..54a92f94092 --- /dev/null +++ b/metrics/integration/render-tests/fill-pattern/case-data-expression/style.json @@ -0,0 +1,130 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 128, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [{ + "type": "Feature", + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + 20, + -10 + ], + [ + 20, + 10 + ], + [ + 40, + 10 + ], + [ + 40, + -10 + ], + [ + 20, + -10 + ] + ] + ] + }, + "properties": { + "class": "grass" + } + }, { + "type": "Feature", + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -10, + -10 + ], + [ + -10, + 10 + ], + [ + 10, + 10 + ], + [ + 10, + -10 + ], + [ + -10, + -10 + ] + ] + ] + }, + "properties": { + "class": "trees" + } + }, { + "type": "Feature", + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -40, + -10 + ], + [ + -40, + 10 + ], + [ + -20, + 10 + ], + [ + -20, + -10 + ], + [ + -40, + -10 + ] + ] + ] + }, + "properties": { + "class": "grass" + } + } + ] + } + + + } + }, + "sprite": "local://sprites/emerald", + "layers": [{ + "id": "fill", + "type": "fill", + "source": "geojson", + "paint": { + "fill-antialias": false, + "fill-pattern": ["case", ["==", ["get", "class"], "grass"], "zoo_icon", "hospital_icon"] + } + } + ] +} + + diff --git a/metrics/integration/render-tests/fill-pattern/invalid-feature-expression/expected.png b/metrics/integration/render-tests/fill-pattern/invalid-feature-expression/expected.png new file mode 100644 index 00000000000..431d3a6f67f Binary files /dev/null and b/metrics/integration/render-tests/fill-pattern/invalid-feature-expression/expected.png differ diff --git a/metrics/integration/render-tests/fill-pattern/invalid-feature-expression/style.json b/metrics/integration/render-tests/fill-pattern/invalid-feature-expression/style.json new file mode 100644 index 00000000000..33db53cb4d7 --- /dev/null +++ b/metrics/integration/render-tests/fill-pattern/invalid-feature-expression/style.json @@ -0,0 +1,135 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 128, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [{ + "type": "Feature", + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + 20, + -10 + ], + [ + 20, + 10 + ], + [ + 40, + 10 + ], + [ + 40, + -10 + ], + [ + 20, + -10 + ] + ] + ] + }, + "properties": { + } + }, { + "type": "Feature", + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -10, + -10 + ], + [ + -10, + 10 + ], + [ + 10, + 10 + ], + [ + 10, + -10 + ], + [ + -10, + -10 + ] + ] + ] + }, + "properties": { + } + }, { + "type": "Feature", + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -40, + -10 + ], + [ + -40, + 10 + ], + [ + -20, + 10 + ], + [ + -20, + -10 + ], + [ + -40, + -10 + ] + ] + ] + }, + "properties": { + } + } + ] + } + + + } + }, + "sprite": "local://sprites/emerald", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color" : "#fff" + } + }, + { + "id": "fill", + "type": "fill", + "source": "geojson", + "paint": { + "fill-antialias": false, + "fill-pattern": ["get", "pattern"] + } + } + ] +} + + diff --git a/metrics/integration/render-tests/fill-pattern/literal/expected.png b/metrics/integration/render-tests/fill-pattern/literal/expected.png new file mode 100644 index 00000000000..c12cf951f41 Binary files /dev/null and b/metrics/integration/render-tests/fill-pattern/literal/expected.png differ diff --git a/metrics/integration/render-tests/fill-pattern/literal/style.json b/metrics/integration/render-tests/fill-pattern/literal/style.json new file mode 100644 index 00000000000..32304b61472 --- /dev/null +++ b/metrics/integration/render-tests/fill-pattern/literal/style.json @@ -0,0 +1,53 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -10, + -10 + ], + [ + -10, + 10 + ], + [ + 10, + 10 + ], + [ + 10, + -10 + ], + [ + -10, + -10 + ] + ] + ] + } + } + }, + "sprite": "local://sprites/emerald", + "layers": [ + { + "id": "fill", + "type": "fill", + "source": "geojson", + "paint": { + "fill-antialias": false, + "fill-pattern": "generic_icon" + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/fill-pattern/missing/expected.png b/metrics/integration/render-tests/fill-pattern/missing/expected.png new file mode 100644 index 00000000000..724d17cd7d3 Binary files /dev/null and b/metrics/integration/render-tests/fill-pattern/missing/expected.png differ diff --git a/metrics/integration/render-tests/fill-pattern/missing/style.json b/metrics/integration/render-tests/fill-pattern/missing/style.json new file mode 100644 index 00000000000..dee7bdb9570 --- /dev/null +++ b/metrics/integration/render-tests/fill-pattern/missing/style.json @@ -0,0 +1,53 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -10, + -10 + ], + [ + -10, + 10 + ], + [ + 10, + 10 + ], + [ + 10, + -10 + ], + [ + -10, + -10 + ] + ] + ] + } + } + }, + "sprite": "local://sprites/emerald", + "layers": [ + { + "id": "fill", + "type": "fill", + "source": "geojson", + "paint": { + "fill-antialias": false, + "fill-pattern": "missing" + } + } + ] +} diff --git a/metrics/integration/render-tests/fill-pattern/opacity/expected.png b/metrics/integration/render-tests/fill-pattern/opacity/expected.png new file mode 100644 index 00000000000..aa0a0eda8e8 Binary files /dev/null and b/metrics/integration/render-tests/fill-pattern/opacity/expected.png differ diff --git a/metrics/integration/render-tests/fill-pattern/opacity/style.json b/metrics/integration/render-tests/fill-pattern/opacity/style.json new file mode 100644 index 00000000000..eb10f814791 --- /dev/null +++ b/metrics/integration/render-tests/fill-pattern/opacity/style.json @@ -0,0 +1,54 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -10, + -10 + ], + [ + -10, + 10 + ], + [ + 10, + 10 + ], + [ + 10, + -10 + ], + [ + -10, + -10 + ] + ] + ] + } + } + }, + "sprite": "local://sprites/emerald", + "layers": [ + { + "id": "fill", + "type": "fill", + "source": "geojson", + "paint": { + "fill-antialias": false, + "fill-pattern": "generic_icon", + "fill-opacity": 0.5 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/fill-pattern/uneven-pattern/expected.png b/metrics/integration/render-tests/fill-pattern/uneven-pattern/expected.png new file mode 100644 index 00000000000..64777db1dd4 Binary files /dev/null and b/metrics/integration/render-tests/fill-pattern/uneven-pattern/expected.png differ diff --git a/metrics/integration/render-tests/fill-pattern/uneven-pattern/style.json b/metrics/integration/render-tests/fill-pattern/uneven-pattern/style.json new file mode 100644 index 00000000000..2227c423e2c --- /dev/null +++ b/metrics/integration/render-tests/fill-pattern/uneven-pattern/style.json @@ -0,0 +1,35 @@ +{ + "version": 8, + "metadata": { + "test": {} + }, + "zoom": 2, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "sprite": "local://sprites/emerald", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "land", + "type": "fill", + "source": "mapbox", + "source-layer": "water", + "paint": { + "fill-pattern": "interstate_1" + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/fill-pattern/update-feature-state/expected.png b/metrics/integration/render-tests/fill-pattern/update-feature-state/expected.png new file mode 100644 index 00000000000..bccb3e19cf6 Binary files /dev/null and b/metrics/integration/render-tests/fill-pattern/update-feature-state/expected.png differ diff --git a/metrics/integration/render-tests/fill-pattern/update-feature-state/style.json b/metrics/integration/render-tests/fill-pattern/update-feature-state/style.json new file mode 100644 index 00000000000..4b534505751 --- /dev/null +++ b/metrics/integration/render-tests/fill-pattern/update-feature-state/style.json @@ -0,0 +1,85 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setFeatureState", + { + "source": "geojson", + "id": "1" + }, + { + "hover": true + } + ], + [ + "wait" + ] + ] + } + }, + "sprite": "local://sprites/emerald", + "zoom": 1, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "id": 1, + "properties": { + "pattern": "generic_icon" + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -10, + -10 + ], + [ + -10, + 10 + ], + [ + 10, + 10 + ], + [ + 10, + -10 + ], + [ + -10, + -10 + ] + ] + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "fill", + "type": "fill", + "source": "geojson", + "paint": { + "fill-pattern": [ + "case", + ["boolean", ["feature-state", "hover"], false], + "generic_icon", + "generic_metro" + ] + } + } + ] +} diff --git a/metrics/integration/render-tests/fill-pattern/wrapping-with-interpolation/expected.png b/metrics/integration/render-tests/fill-pattern/wrapping-with-interpolation/expected.png new file mode 100644 index 00000000000..377644ed392 Binary files /dev/null and b/metrics/integration/render-tests/fill-pattern/wrapping-with-interpolation/expected.png differ diff --git a/metrics/integration/render-tests/fill-pattern/wrapping-with-interpolation/style.json b/metrics/integration/render-tests/fill-pattern/wrapping-with-interpolation/style.json new file mode 100644 index 00000000000..06e497aa53e --- /dev/null +++ b/metrics/integration/render-tests/fill-pattern/wrapping-with-interpolation/style.json @@ -0,0 +1,39 @@ +{ + "version": 8, + "metadata": { + "test": {} + }, + "zoom": 0.99, + "center": [ + 0.7, + 0 + ], + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "sprite": "local://sprites/solid-black", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "land", + "type": "fill", + "source": "mapbox", + "source-layer": "water", + "paint": { + "fill-pattern": "black" + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/fill-pattern/zoomed/expected.png b/metrics/integration/render-tests/fill-pattern/zoomed/expected.png new file mode 100644 index 00000000000..1835ff6b39d Binary files /dev/null and b/metrics/integration/render-tests/fill-pattern/zoomed/expected.png differ diff --git a/metrics/integration/render-tests/fill-pattern/zoomed/style.json b/metrics/integration/render-tests/fill-pattern/zoomed/style.json new file mode 100644 index 00000000000..42b7cd21913 --- /dev/null +++ b/metrics/integration/render-tests/fill-pattern/zoomed/style.json @@ -0,0 +1,54 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "zoom": 0.5, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -10, + -10 + ], + [ + -10, + 10 + ], + [ + 10, + 10 + ], + [ + 10, + -10 + ], + [ + -10, + -10 + ] + ] + ] + } + } + }, + "sprite": "local://sprites/emerald", + "layers": [ + { + "id": "fill", + "type": "fill", + "source": "geojson", + "paint": { + "fill-antialias": false, + "fill-pattern": "generic_icon" + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/fill-sort-key/literal/expected.png b/metrics/integration/render-tests/fill-sort-key/literal/expected.png new file mode 100644 index 00000000000..bf77c2d934e Binary files /dev/null and b/metrics/integration/render-tests/fill-sort-key/literal/expected.png differ diff --git a/metrics/integration/render-tests/fill-sort-key/literal/style.json b/metrics/integration/render-tests/fill-sort-key/literal/style.json new file mode 100644 index 00000000000..fe81a37039c --- /dev/null +++ b/metrics/integration/render-tests/fill-sort-key/literal/style.json @@ -0,0 +1,93 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 32, + "width": 32 + } + }, + "center": [0, 0], + "zoom": 1, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "color": "red", + "sort-key": 1 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ -2, -2 ], + [ -2, 2 ], + [ 2, 2 ], + [ 2, -2 ], + [ -2, -2 ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "color": "green", + "sort-key": 0 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ -3, -3 ], + [ -3, 1 ], + [ 1, 1 ], + [ 1, -3 ], + [ -3, -3 ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "color": "blue", + "sort-key": 2 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ -1, -1 ], + [ -1, 3 ], + [ 3, 3 ], + [ 3, -1 ], + [ -1, -1 ] + ] + ] + } + } + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "fill", + "type": "fill", + "source": "geojson", + "layout": { + "fill-sort-key": ["get", "sort-key"] + }, + "paint": { + "fill-color": ["get", "color"], + "fill-antialias": false + } + } + ] +} diff --git a/metrics/integration/render-tests/fill-translate-anchor/map/expected.png b/metrics/integration/render-tests/fill-translate-anchor/map/expected.png new file mode 100644 index 00000000000..e9b9bfb47e6 Binary files /dev/null and b/metrics/integration/render-tests/fill-translate-anchor/map/expected.png differ diff --git a/metrics/integration/render-tests/fill-translate-anchor/map/style.json b/metrics/integration/render-tests/fill-translate-anchor/map/style.json new file mode 100644 index 00000000000..32e0e178388 --- /dev/null +++ b/metrics/integration/render-tests/fill-translate-anchor/map/style.json @@ -0,0 +1,57 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "bearing": 90, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -10, + -10 + ], + [ + -10, + 10 + ], + [ + 10, + 10 + ], + [ + 10, + -10 + ], + [ + -10, + -10 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "fill", + "type": "fill", + "source": "geojson", + "paint": { + "fill-antialias": false, + "fill-translate": [ + 10, + 10 + ], + "fill-translate-anchor": "map" + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/fill-translate-anchor/viewport/expected.png b/metrics/integration/render-tests/fill-translate-anchor/viewport/expected.png new file mode 100644 index 00000000000..8685c013b27 Binary files /dev/null and b/metrics/integration/render-tests/fill-translate-anchor/viewport/expected.png differ diff --git a/metrics/integration/render-tests/fill-translate-anchor/viewport/style.json b/metrics/integration/render-tests/fill-translate-anchor/viewport/style.json new file mode 100644 index 00000000000..e20eadf98ef --- /dev/null +++ b/metrics/integration/render-tests/fill-translate-anchor/viewport/style.json @@ -0,0 +1,57 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "bearing": 90, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -10, + -10 + ], + [ + -10, + 10 + ], + [ + 10, + 10 + ], + [ + 10, + -10 + ], + [ + -10, + -10 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "fill", + "type": "fill", + "source": "geojson", + "paint": { + "fill-antialias": false, + "fill-translate": [ + 10, + 10 + ], + "fill-translate-anchor": "viewport" + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/fill-translate/default/expected.png b/metrics/integration/render-tests/fill-translate/default/expected.png new file mode 100644 index 00000000000..ba8caeead69 Binary files /dev/null and b/metrics/integration/render-tests/fill-translate/default/expected.png differ diff --git a/metrics/integration/render-tests/fill-translate/default/style.json b/metrics/integration/render-tests/fill-translate/default/style.json new file mode 100644 index 00000000000..fc9adb4e27c --- /dev/null +++ b/metrics/integration/render-tests/fill-translate/default/style.json @@ -0,0 +1,51 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -10, + -10 + ], + [ + -10, + 10 + ], + [ + 10, + 10 + ], + [ + 10, + -10 + ], + [ + -10, + -10 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "fill", + "type": "fill", + "source": "geojson", + "paint": { + "fill-antialias": false + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/fill-translate/function/expected.png b/metrics/integration/render-tests/fill-translate/function/expected.png new file mode 100644 index 00000000000..5c7d56acf75 Binary files /dev/null and b/metrics/integration/render-tests/fill-translate/function/expected.png differ diff --git a/metrics/integration/render-tests/fill-translate/function/style.json b/metrics/integration/render-tests/fill-translate/function/style.json new file mode 100644 index 00000000000..8a76cd7a2fb --- /dev/null +++ b/metrics/integration/render-tests/fill-translate/function/style.json @@ -0,0 +1,69 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -10, + -10 + ], + [ + -10, + 10 + ], + [ + 10, + 10 + ], + [ + 10, + -10 + ], + [ + -10, + -10 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "fill", + "type": "fill", + "source": "geojson", + "paint": { + "fill-antialias": false, + "fill-translate": { + "stops": [ + [ + 16, + [ + 15, + 15 + ] + ], + [ + 17, + [ + 20, + 20 + ] + ] + ] + } + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/fill-translate/literal/expected.png b/metrics/integration/render-tests/fill-translate/literal/expected.png new file mode 100644 index 00000000000..a87f773fb99 Binary files /dev/null and b/metrics/integration/render-tests/fill-translate/literal/expected.png differ diff --git a/metrics/integration/render-tests/fill-translate/literal/style.json b/metrics/integration/render-tests/fill-translate/literal/style.json new file mode 100644 index 00000000000..9cbb19cd0a1 --- /dev/null +++ b/metrics/integration/render-tests/fill-translate/literal/style.json @@ -0,0 +1,55 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -10, + -10 + ], + [ + -10, + 10 + ], + [ + 10, + 10 + ], + [ + 10, + -10 + ], + [ + -10, + -10 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "fill", + "type": "fill", + "source": "geojson", + "paint": { + "fill-antialias": false, + "fill-translate": [ + 5, + 5 + ] + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/fill-visibility/none/expected.png b/metrics/integration/render-tests/fill-visibility/none/expected.png new file mode 100644 index 00000000000..4d1bfc103f9 Binary files /dev/null and b/metrics/integration/render-tests/fill-visibility/none/expected.png differ diff --git a/metrics/integration/render-tests/fill-visibility/none/style.json b/metrics/integration/render-tests/fill-visibility/none/style.json new file mode 100644 index 00000000000..f514d1b950c --- /dev/null +++ b/metrics/integration/render-tests/fill-visibility/none/style.json @@ -0,0 +1,58 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + 0, + 0 + ], + "zoom": 0, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "fill-visible", + "type": "fill", + "source": "mapbox", + "source-layer": "water", + "layout": { + "visibility": "visible" + }, + "paint": { + "fill-color": "#000", + "fill-opacity": 0 + } + }, + { + "id": "fill-none", + "type": "fill", + "source": "mapbox", + "source-layer": "water", + "layout": { + "visibility": "none" + }, + "paint": { + "fill-color": "#000", + "fill-opacity": 1 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/fill-visibility/visible/expected.png b/metrics/integration/render-tests/fill-visibility/visible/expected.png new file mode 100644 index 00000000000..f1dd99270f3 Binary files /dev/null and b/metrics/integration/render-tests/fill-visibility/visible/expected.png differ diff --git a/metrics/integration/render-tests/fill-visibility/visible/style.json b/metrics/integration/render-tests/fill-visibility/visible/style.json new file mode 100644 index 00000000000..102ecd5a357 --- /dev/null +++ b/metrics/integration/render-tests/fill-visibility/visible/style.json @@ -0,0 +1,58 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + 0, + 0 + ], + "zoom": 0, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "fill-visible", + "type": "fill", + "source": "mapbox", + "source-layer": "water", + "layout": { + "visibility": "visible" + }, + "paint": { + "fill-color": "#000", + "fill-opacity": 1 + } + }, + { + "id": "fill-none", + "type": "fill", + "source": "mapbox", + "source-layer": "water", + "layout": { + "visibility": "none" + }, + "paint": { + "fill-color": "#000", + "fill-opacity": 0 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/filter/equality/expected.png b/metrics/integration/render-tests/filter/equality/expected.png new file mode 100644 index 00000000000..d2563476b26 Binary files /dev/null and b/metrics/integration/render-tests/filter/equality/expected.png differ diff --git a/metrics/integration/render-tests/filter/equality/style.json b/metrics/integration/render-tests/filter/equality/style.json new file mode 100644 index 00000000000..36eb34810b9 --- /dev/null +++ b/metrics/integration/render-tests/filter/equality/style.json @@ -0,0 +1,56 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "circles": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "position": "right" + }, + "geometry": { + "type": "Point", + "coordinates": [ + 8, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + "position": "left" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -8, + 0 + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "circles", + "filter": ["==", ["get" ,"position"], "left"], + "type": "circle", + "source": "circles", + "paint": { + "circle-radius": 7 + } + } + ] +} diff --git a/metrics/integration/render-tests/filter/in/expected.png b/metrics/integration/render-tests/filter/in/expected.png new file mode 100644 index 00000000000..8886ddfa061 Binary files /dev/null and b/metrics/integration/render-tests/filter/in/expected.png differ diff --git a/metrics/integration/render-tests/filter/in/style.json b/metrics/integration/render-tests/filter/in/style.json new file mode 100644 index 00000000000..67c01c41248 --- /dev/null +++ b/metrics/integration/render-tests/filter/in/style.json @@ -0,0 +1,99 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "quadrants": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "name": "ABC", + "color": "red" + }, + "geometry": { + "type": "Polygon", + "coordinates": [[ + [-180, -90], + [-180, 0], + [0, 0], + [0, -90], + [-180, -90] + ]] + } + }, + { + "type": "Feature", + "properties": { + "name": "DEF", + "color": "#00ff00" + }, + "geometry": { + "type": "Polygon", + "coordinates": [[ + [-180, 90], + [-180, 0], + [0, 0], + [0, 90], + [-180, 90] + ]] + } + }, + { + "type": "Feature", + "properties": { + "name": "GHI", + "color": "#0000ff" + }, + "geometry": { + "type": "Polygon", + "coordinates": [[ + [180, -90], + [180, 0], + [0, 0], + [0, -90], + [180, -90] + ]] + } + }, + { + "type": "Feature", + "properties": { + "name": "GHI", + "color": "#ffff00" + }, + "geometry": { + "type": "Polygon", + "coordinates": [[ + [180, 90], + [180, 0], + [0, 0], + [0, 90], + [180, 90] + ]] + } + } + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "colors", + "type": "fill", + "source": "quadrants", + "filter": ["in", "#", ["get", "color"]], + "paint": { + "fill-color": ["get", "color"] + } + } + ] +} diff --git a/metrics/integration/render-tests/filter/legacy-equality/expected.png b/metrics/integration/render-tests/filter/legacy-equality/expected.png new file mode 100644 index 00000000000..d2563476b26 Binary files /dev/null and b/metrics/integration/render-tests/filter/legacy-equality/expected.png differ diff --git a/metrics/integration/render-tests/filter/legacy-equality/style.json b/metrics/integration/render-tests/filter/legacy-equality/style.json new file mode 100644 index 00000000000..49f823228d9 --- /dev/null +++ b/metrics/integration/render-tests/filter/legacy-equality/style.json @@ -0,0 +1,56 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "circles": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "position": "right" + }, + "geometry": { + "type": "Point", + "coordinates": [ + 8, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + "position": "left" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -8, + 0 + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "circles", + "filter": ["==", "position", "left"], + "type": "circle", + "source": "circles", + "paint": { + "circle-radius": 7 + } + } + ] +} diff --git a/metrics/integration/render-tests/filter/none/expected.png b/metrics/integration/render-tests/filter/none/expected.png new file mode 100644 index 00000000000..e2b9b5e5686 Binary files /dev/null and b/metrics/integration/render-tests/filter/none/expected.png differ diff --git a/metrics/integration/render-tests/filter/none/style.json b/metrics/integration/render-tests/filter/none/style.json new file mode 100644 index 00000000000..11c4116b2eb --- /dev/null +++ b/metrics/integration/render-tests/filter/none/style.json @@ -0,0 +1,55 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "circles": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "position": "right" + }, + "geometry": { + "type": "Point", + "coordinates": [ + 8, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + "position": "left" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -8, + 0 + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "circles", + "type": "circle", + "source": "circles", + "paint": { + "circle-radius": 7 + } + } + ] +} diff --git a/metrics/integration/render-tests/geojson/clustered-properties/expected.png b/metrics/integration/render-tests/geojson/clustered-properties/expected.png new file mode 100644 index 00000000000..a1fb2060a2c Binary files /dev/null and b/metrics/integration/render-tests/geojson/clustered-properties/expected.png differ diff --git a/metrics/integration/render-tests/geojson/clustered-properties/style.json b/metrics/integration/render-tests/geojson/clustered-properties/style.json new file mode 100644 index 00000000000..8dfbf751417 --- /dev/null +++ b/metrics/integration/render-tests/geojson/clustered-properties/style.json @@ -0,0 +1,78 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 256, + "height": 128 + } + }, + "center": [ + -10, + -5 + ], + "zoom": 0, + "sources": { + "geojson": { + "type": "geojson", + "data": "local://data/places.geojson", + "cluster": true, + "clusterRadius": 50, + "clusterProperties": { + "max": ["max", ["get", "scalerank"]], + "sum": ["+", ["get", "scalerank"]], + "has_island": ["any", ["==", ["get", "featureclass"], "island"]] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "cluster", + "type": "circle", + "source": "geojson", + "filter": [ + "==", + "cluster", + true + ], + "paint": { + "circle-color": ["case", ["get", "has_island"], "orange", "rgba(0, 200, 0, 1)"], + "circle-radius": 20 + } + }, + { + "id": "cluster_label", + "type": "symbol", + "source": "geojson", + "filter": [ + "==", + "cluster", + true + ], + "layout": { + "text-field": "{sum},{max}", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-size": 12, + "text-allow-overlap": true, + "text-ignore-placement": true + } + }, + { + "id": "unclustered_point", + "type": "circle", + "source": "geojson", + "filter": [ + "!=", + "cluster", + true + ], + "paint": { + "circle-color": "rgba(0, 0, 200, 1)", + "circle-radius": 10 + } + } + ] +} diff --git a/metrics/integration/render-tests/geojson/clustered/expected.png b/metrics/integration/render-tests/geojson/clustered/expected.png new file mode 100644 index 00000000000..56a2639ad58 Binary files /dev/null and b/metrics/integration/render-tests/geojson/clustered/expected.png differ diff --git a/metrics/integration/render-tests/geojson/clustered/style.json b/metrics/integration/render-tests/geojson/clustered/style.json new file mode 100644 index 00000000000..206c1866a79 --- /dev/null +++ b/metrics/integration/render-tests/geojson/clustered/style.json @@ -0,0 +1,73 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 512, + "height": 512 + } + }, + "center": [ + -0.01, + 0 + ], + "zoom": 0, + "sources": { + "geojson": { + "type": "geojson", + "data": "local://data/places.geojson", + "cluster": true, + "clusterRadius": 25 + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "cluster", + "type": "circle", + "source": "geojson", + "filter": [ + "==", + "cluster", + true + ], + "paint": { + "circle-color": "rgba(0, 200, 0, 1)", + "circle-radius": 20 + } + }, + { + "id": "cluster_label", + "type": "symbol", + "source": "geojson", + "filter": [ + "==", + "cluster", + true + ], + "layout": { + "text-field": "{point_count}", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-size": 12, + "text-allow-overlap": true, + "text-ignore-placement": true + } + }, + { + "id": "unclustered_point", + "type": "circle", + "source": "geojson", + "filter": [ + "!=", + "cluster", + true + ], + "paint": { + "circle-color": "rgba(0, 0, 200, 1)", + "circle-radius": 10 + } + } + ] +} diff --git a/metrics/integration/render-tests/geojson/external-feature/expected.png b/metrics/integration/render-tests/geojson/external-feature/expected.png new file mode 100644 index 00000000000..e6743f0a8ee Binary files /dev/null and b/metrics/integration/render-tests/geojson/external-feature/expected.png differ diff --git a/metrics/integration/render-tests/geojson/external-feature/style.json b/metrics/integration/render-tests/geojson/external-feature/style.json new file mode 100644 index 00000000000..5aeefd779c6 --- /dev/null +++ b/metrics/integration/render-tests/geojson/external-feature/style.json @@ -0,0 +1,31 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 512, + "height": 512 + } + }, + "center": [ + -77.0305, + 38.9014 + ], + "zoom": 12.15, + "sources": { + "geojson": { + "type": "geojson", + "data": "local://data/feature.geojson" + } + }, + "layers": [ + { + "id": "line", + "type": "line", + "source": "geojson", + "paint": { + "line-color": "#EC8D8D", + "line-width": 4 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/geojson/external-invalid/expected.png b/metrics/integration/render-tests/geojson/external-invalid/expected.png new file mode 100644 index 00000000000..da62bb0db1d Binary files /dev/null and b/metrics/integration/render-tests/geojson/external-invalid/expected.png differ diff --git a/metrics/integration/render-tests/geojson/external-invalid/style.json b/metrics/integration/render-tests/geojson/external-invalid/style.json new file mode 100644 index 00000000000..3f07825d5fd --- /dev/null +++ b/metrics/integration/render-tests/geojson/external-invalid/style.json @@ -0,0 +1,31 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 512, + "height": 512 + } + }, + "center": [ + -77.0305, + 38.9014 + ], + "zoom": 12.15, + "sources": { + "geojson": { + "type": "geojson", + "data": "local://data/invalid.geojson" + } + }, + "layers": [ + { + "id": "line", + "type": "line", + "source": "geojson", + "paint": { + "line-color": "#EC8D8D", + "line-width": 4 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/geojson/external-linestring/expected.png b/metrics/integration/render-tests/geojson/external-linestring/expected.png new file mode 100644 index 00000000000..e6743f0a8ee Binary files /dev/null and b/metrics/integration/render-tests/geojson/external-linestring/expected.png differ diff --git a/metrics/integration/render-tests/geojson/external-linestring/style.json b/metrics/integration/render-tests/geojson/external-linestring/style.json new file mode 100644 index 00000000000..5aeefd779c6 --- /dev/null +++ b/metrics/integration/render-tests/geojson/external-linestring/style.json @@ -0,0 +1,31 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 512, + "height": 512 + } + }, + "center": [ + -77.0305, + 38.9014 + ], + "zoom": 12.15, + "sources": { + "geojson": { + "type": "geojson", + "data": "local://data/feature.geojson" + } + }, + "layers": [ + { + "id": "line", + "type": "line", + "source": "geojson", + "paint": { + "line-color": "#EC8D8D", + "line-width": 4 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/geojson/external-malformed/expected.png b/metrics/integration/render-tests/geojson/external-malformed/expected.png new file mode 100644 index 00000000000..da62bb0db1d Binary files /dev/null and b/metrics/integration/render-tests/geojson/external-malformed/expected.png differ diff --git a/metrics/integration/render-tests/geojson/external-malformed/style.json b/metrics/integration/render-tests/geojson/external-malformed/style.json new file mode 100644 index 00000000000..3e080600e75 --- /dev/null +++ b/metrics/integration/render-tests/geojson/external-malformed/style.json @@ -0,0 +1,31 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 512, + "height": 512 + } + }, + "center": [ + -77.0305, + 38.9014 + ], + "zoom": 12.15, + "sources": { + "geojson": { + "type": "geojson", + "data": "local://data/malformed.geojson" + } + }, + "layers": [ + { + "id": "line", + "type": "line", + "source": "geojson", + "paint": { + "line-color": "#EC8D8D", + "line-width": 4 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/geojson/inconsistent-winding-order/expected.png b/metrics/integration/render-tests/geojson/inconsistent-winding-order/expected.png new file mode 100644 index 00000000000..1cf5c65d9fe Binary files /dev/null and b/metrics/integration/render-tests/geojson/inconsistent-winding-order/expected.png differ diff --git a/metrics/integration/render-tests/geojson/inconsistent-winding-order/style.json b/metrics/integration/render-tests/geojson/inconsistent-winding-order/style.json new file mode 100644 index 00000000000..f07396f8365 --- /dev/null +++ b/metrics/integration/render-tests/geojson/inconsistent-winding-order/style.json @@ -0,0 +1,31 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 512, + "height": 512 + } + }, + "center": [ + 0, + 0 + ], + "zoom": 1, + "sources": { + "geojson": { + "type": "geojson", + "data": "local://data/winding.geojson" + } + }, + "layers": [ + { + "id": "fill", + "type": "fill", + "source": "geojson", + "paint": { + "fill-color": "#EC8D8D", + "fill-antialias": false + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/geojson/inline-feature/expected.png b/metrics/integration/render-tests/geojson/inline-feature/expected.png new file mode 100644 index 00000000000..e6743f0a8ee Binary files /dev/null and b/metrics/integration/render-tests/geojson/inline-feature/expected.png differ diff --git a/metrics/integration/render-tests/geojson/inline-feature/style.json b/metrics/integration/render-tests/geojson/inline-feature/style.json new file mode 100644 index 00000000000..d0a1e74e33f --- /dev/null +++ b/metrics/integration/render-tests/geojson/inline-feature/style.json @@ -0,0 +1,737 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 512, + "height": 512 + } + }, + "center": [ + -77.0305, + 38.9014 + ], + "zoom": 12.15, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Feature", + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -77.066104, + 38.910203 + ], + [ + -77.066106, + 38.910321 + ], + [ + -77.066112, + 38.910758 + ], + [ + -77.065249, + 38.910775 + ], + [ + -77.065178, + 38.910793 + ], + [ + -77.065139, + 38.910804 + ], + [ + -77.064904, + 38.91036 + ], + [ + -77.064855, + 38.910268 + ], + [ + -77.064621, + 38.909825 + ], + [ + -77.06459, + 38.909766 + ], + [ + -77.064342, + 38.909298 + ], + [ + -77.064281, + 38.909182 + ], + [ + -77.064201, + 38.909226 + ], + [ + -77.064175, + 38.909235 + ], + [ + -77.064149, + 38.909241 + ], + [ + -77.064122, + 38.909244 + ], + [ + -77.06336, + 38.90926 + ], + [ + -77.061442, + 38.909288 + ], + [ + -77.060801, + 38.909297 + ], + [ + -77.059237, + 38.909315 + ], + [ + -77.058186, + 38.90933 + ], + [ + -77.057113, + 38.909343 + ], + [ + -77.055623, + 38.909368 + ], + [ + -77.054762, + 38.909377 + ], + [ + -77.053951, + 38.909389 + ], + [ + -77.053904, + 38.909393 + ], + [ + -77.053858, + 38.909399 + ], + [ + -77.053813, + 38.909408 + ], + [ + -77.052833, + 38.909635 + ], + [ + -77.052799, + 38.909642 + ], + [ + -77.052772, + 38.909645 + ], + [ + -77.052692, + 38.90965 + ], + [ + -77.052443, + 38.909649 + ], + [ + -77.05096, + 38.909639 + ], + [ + -77.050327, + 38.909634 + ], + [ + -77.049545, + 38.909631 + ], + [ + -77.049533, + 38.909635 + ], + [ + -77.049341, + 38.909635 + ], + [ + -77.048903, + 38.909635 + ], + [ + -77.048797, + 38.909634 + ], + [ + -77.04773, + 38.909639 + ], + [ + -77.046632, + 38.90964 + ], + [ + -77.045758, + 38.909641 + ], + [ + -77.044877, + 38.909643 + ], + [ + -77.044578, + 38.909641 + ], + [ + -77.044493, + 38.909635 + ], + [ + -77.04442, + 38.909626 + ], + [ + -77.044345, + 38.909608 + ], + [ + -77.044283, + 38.909578 + ], + [ + -77.044249, + 38.909541 + ], + [ + -77.044212, + 38.909496 + ], + [ + -77.044199, + 38.909458 + ], + [ + -77.044182, + 38.909421 + ], + [ + -77.044162, + 38.909385 + ], + [ + -77.04414, + 38.90935 + ], + [ + -77.044113, + 38.909313 + ], + [ + -77.044083, + 38.90928 + ], + [ + -77.044051, + 38.909247 + ], + [ + -77.044018, + 38.909165 + ], + [ + -77.044018, + 38.909117 + ], + [ + -77.044029, + 38.909071 + ], + [ + -77.044037, + 38.909038 + ], + [ + -77.044058, + 38.908981 + ], + [ + -77.043996, + 38.909021 + ], + [ + -77.043919, + 38.909052 + ], + [ + -77.043854, + 38.909067 + ], + [ + -77.043798, + 38.909073 + ], + [ + -77.043755, + 38.909075 + ], + [ + -77.043689, + 38.909056 + ], + [ + -77.043656, + 38.909048 + ], + [ + -77.04359, + 38.909036 + ], + [ + -77.043527, + 38.909028 + ], + [ + -77.043486, + 38.909026 + ], + [ + -77.043444, + 38.909025 + ], + [ + -77.043402, + 38.909026 + ], + [ + -77.043344, + 38.909029 + ], + [ + -77.043286, + 38.909037 + ], + [ + -77.043263, + 38.909041 + ], + [ + -77.04323, + 38.909047 + ], + [ + -77.043194, + 38.909056 + ], + [ + -77.043022, + 38.909118 + ], + [ + -77.042995, + 38.909132 + ], + [ + -77.04296, + 38.909151 + ], + [ + -77.042938, + 38.909165 + ], + [ + -77.042915, + 38.90918 + ], + [ + -77.042875, + 38.909209 + ], + [ + -77.04284, + 38.909239 + ], + [ + -77.042823, + 38.909255 + ], + [ + -77.042791, + 38.909288 + ], + [ + -77.042774, + 38.909307 + ], + [ + -77.042712, + 38.909315 + ], + [ + -77.042637, + 38.909322 + ], + [ + -77.042551, + 38.909317 + ], + [ + -77.042422, + 38.909299 + ], + [ + -77.041676, + 38.90903 + ], + [ + -77.039935, + 38.908425 + ], + [ + -77.038503, + 38.907925 + ], + [ + -77.037656, + 38.907632 + ], + [ + -77.037477, + 38.907534 + ], + [ + -77.037317, + 38.907438 + ], + [ + -77.037238, + 38.90739 + ], + [ + -77.037121, + 38.907315 + ], + [ + -77.036997, + 38.907233 + ], + [ + -77.036875, + 38.907137 + ], + [ + -77.036833, + 38.907094 + ], + [ + -77.036817, + 38.907081 + ], + [ + -77.036795, + 38.907068 + ], + [ + -77.036774, + 38.907058 + ], + [ + -77.036767, + 38.907052 + ], + [ + -77.036712, + 38.907034 + ], + [ + -77.03669, + 38.907028 + ], + [ + -77.036643, + 38.907022 + ], + [ + -77.03661, + 38.907021 + ], + [ + -77.03653, + 38.907021 + ], + [ + -77.036474, + 38.907021 + ], + [ + -77.03643, + 38.907025 + ], + [ + -77.03639, + 38.907033 + ], + [ + -77.036295, + 38.907058 + ], + [ + -77.036005, + 38.906995 + ], + [ + -77.035439, + 38.906869 + ], + [ + -77.035142, + 38.906757 + ], + [ + -77.035049, + 38.906725 + ], + [ + -77.0348, + 38.906641 + ], + [ + -77.034673, + 38.906594 + ], + [ + -77.034568, + 38.906558 + ], + [ + -77.034059, + 38.906382 + ], + [ + -77.033931, + 38.906338 + ], + [ + -77.032623, + 38.905883 + ], + [ + -77.03129, + 38.905426 + ], + [ + -77.030031, + 38.904982 + ], + [ + -77.029623, + 38.904835 + ], + [ + -77.028082, + 38.904304 + ], + [ + -77.027679, + 38.904167 + ], + [ + -77.02705, + 38.903949 + ], + [ + -77.026409, + 38.903729 + ], + [ + -77.025984, + 38.903579 + ], + [ + -77.024321, + 38.902997 + ], + [ + -77.024139, + 38.902954 + ], + [ + -77.023952, + 38.902954 + ], + [ + -77.023188, + 38.902956 + ], + [ + -77.022699, + 38.902958 + ], + [ + -77.021917, + 38.90296 + ], + [ + -77.021918, + 38.902902 + ], + [ + -77.021918, + 38.902521 + ], + [ + -77.019907, + 38.902521 + ], + [ + -77.018928, + 38.902521 + ], + [ + -77.016176, + 38.902519 + ], + [ + -77.015177, + 38.902518 + ], + [ + -77.013722, + 38.902514 + ], + [ + -77.012171, + 38.902516 + ], + [ + -77.011237, + 38.902516 + ], + [ + -77.009846, + 38.902515 + ], + [ + -77.009117, + 38.902514 + ], + [ + -77.009126, + 38.901346 + ], + [ + -77.00912, + 38.900203 + ], + [ + -77.009062, + 38.900203 + ], + [ + -77.008975, + 38.900203 + ], + [ + -77.008004, + 38.900198 + ], + [ + -77.00631, + 38.900193 + ], + [ + -77.005531, + 38.900197 + ], + [ + -77.002929, + 38.9002 + ], + [ + -77.002038, + 38.900203 + ], + [ + -77.001892, + 38.900203 + ], + [ + -77.000571, + 38.900205 + ], + [ + -76.999507, + 38.900204 + ], + [ + -76.998442, + 38.900204 + ], + [ + -76.998369, + 38.900204 + ], + [ + -76.996167, + 38.900205 + ], + [ + -76.994961, + 38.900203 + ], + [ + -76.994962, + 38.899748 + ], + [ + -76.994961, + 38.899626 + ], + [ + -76.994961, + 38.899367 + ], + [ + -76.994961, + 38.898908 + ], + [ + -76.994962, + 38.898447 + ] + ] + }, + "properties": { + "name": "P Street Northwest - Massachusetts Avenue Northwest" + } + } + } + }, + "layers": [ + { + "id": "line", + "type": "line", + "source": "geojson", + "paint": { + "line-color": "#EC8D8D", + "line-width": 4 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/geojson/inline-invalid/expected.png b/metrics/integration/render-tests/geojson/inline-invalid/expected.png new file mode 100644 index 00000000000..da62bb0db1d Binary files /dev/null and b/metrics/integration/render-tests/geojson/inline-invalid/expected.png differ diff --git a/metrics/integration/render-tests/geojson/inline-invalid/style.json b/metrics/integration/render-tests/geojson/inline-invalid/style.json new file mode 100644 index 00000000000..64ab0777e91 --- /dev/null +++ b/metrics/integration/render-tests/geojson/inline-invalid/style.json @@ -0,0 +1,31 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 512, + "height": 512 + } + }, + "center": [ + -77.0305, + 38.9014 + ], + "zoom": 12.15, + "sources": { + "geojson": { + "type": "geojson", + "data": 42 + } + }, + "layers": [ + { + "id": "line", + "type": "line", + "source": "geojson", + "paint": { + "line-color": "#EC8D8D", + "line-width": 4 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/geojson/inline-linestring-circle/expected.png b/metrics/integration/render-tests/geojson/inline-linestring-circle/expected.png new file mode 100644 index 00000000000..931bf9a4cb6 Binary files /dev/null and b/metrics/integration/render-tests/geojson/inline-linestring-circle/expected.png differ diff --git a/metrics/integration/render-tests/geojson/inline-linestring-circle/style.json b/metrics/integration/render-tests/geojson/inline-linestring-circle/style.json new file mode 100644 index 00000000000..febf41e83b9 --- /dev/null +++ b/metrics/integration/render-tests/geojson/inline-linestring-circle/style.json @@ -0,0 +1,43 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "LineString", + "coordinates": [ + [ + -10, + 10 + ], + [ + 10, + 10 + ], + [ + -10, + -10 + ], + [ + 10, + -10 + ] + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson" + } + ] +} diff --git a/metrics/integration/render-tests/geojson/inline-linestring-fill/expected.png b/metrics/integration/render-tests/geojson/inline-linestring-fill/expected.png new file mode 100644 index 00000000000..6b126ae98ca Binary files /dev/null and b/metrics/integration/render-tests/geojson/inline-linestring-fill/expected.png differ diff --git a/metrics/integration/render-tests/geojson/inline-linestring-fill/style.json b/metrics/integration/render-tests/geojson/inline-linestring-fill/style.json new file mode 100644 index 00000000000..294ab9f16a8 --- /dev/null +++ b/metrics/integration/render-tests/geojson/inline-linestring-fill/style.json @@ -0,0 +1,43 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "LineString", + "coordinates": [ + [ + -10, + 10 + ], + [ + 10, + 10 + ], + [ + -10, + -10 + ], + [ + 10, + -10 + ] + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "fill", + "type": "fill", + "source": "geojson" + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/geojson/inline-linestring-line/expected.png b/metrics/integration/render-tests/geojson/inline-linestring-line/expected.png new file mode 100644 index 00000000000..6af662bba55 Binary files /dev/null and b/metrics/integration/render-tests/geojson/inline-linestring-line/expected.png differ diff --git a/metrics/integration/render-tests/geojson/inline-linestring-line/style.json b/metrics/integration/render-tests/geojson/inline-linestring-line/style.json new file mode 100644 index 00000000000..009c250a5e3 --- /dev/null +++ b/metrics/integration/render-tests/geojson/inline-linestring-line/style.json @@ -0,0 +1,43 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "LineString", + "coordinates": [ + [ + -10, + 10 + ], + [ + 10, + 10 + ], + [ + -10, + -10 + ], + [ + 10, + -10 + ] + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "line", + "type": "line", + "source": "geojson" + } + ] +} diff --git a/metrics/integration/render-tests/geojson/inline-linestring-symbol/expected.png b/metrics/integration/render-tests/geojson/inline-linestring-symbol/expected.png new file mode 100644 index 00000000000..abba259acd5 Binary files /dev/null and b/metrics/integration/render-tests/geojson/inline-linestring-symbol/expected.png differ diff --git a/metrics/integration/render-tests/geojson/inline-linestring-symbol/style.json b/metrics/integration/render-tests/geojson/inline-linestring-symbol/style.json new file mode 100644 index 00000000000..0aa0db1b108 --- /dev/null +++ b/metrics/integration/render-tests/geojson/inline-linestring-symbol/style.json @@ -0,0 +1,48 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "LineString", + "coordinates": [ + [ + -10, + 10 + ], + [ + 10, + 10 + ], + [ + -10, + -10 + ], + [ + 10, + -10 + ] + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "circle-12", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + } + ] +} diff --git a/metrics/integration/render-tests/geojson/inline-malformed/expected.png b/metrics/integration/render-tests/geojson/inline-malformed/expected.png new file mode 100644 index 00000000000..da62bb0db1d Binary files /dev/null and b/metrics/integration/render-tests/geojson/inline-malformed/expected.png differ diff --git a/metrics/integration/render-tests/geojson/inline-malformed/style.json b/metrics/integration/render-tests/geojson/inline-malformed/style.json new file mode 100644 index 00000000000..d412d286427 --- /dev/null +++ b/metrics/integration/render-tests/geojson/inline-malformed/style.json @@ -0,0 +1,40 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 512, + "height": 512 + } + }, + "center": [ + -77.0305, + 38.9014 + ], + "zoom": 12.15, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Model", + "geometry": [ + -77.050327, + 38.909634 + ], + "properties": { + "name": "P Street Northwest - Massachusetts Avenue Northwest" + } + } + } + }, + "layers": [ + { + "id": "line", + "type": "line", + "source": "geojson", + "paint": { + "line-color": "#EC8D8D", + "line-width": 4 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/geojson/inline-point-circle/expected.png b/metrics/integration/render-tests/geojson/inline-point-circle/expected.png new file mode 100644 index 00000000000..4cb77303dde Binary files /dev/null and b/metrics/integration/render-tests/geojson/inline-point-circle/expected.png differ diff --git a/metrics/integration/render-tests/geojson/inline-point-circle/style.json b/metrics/integration/render-tests/geojson/inline-point-circle/style.json new file mode 100644 index 00000000000..84ec6808b95 --- /dev/null +++ b/metrics/integration/render-tests/geojson/inline-point-circle/style.json @@ -0,0 +1,29 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson" + } + ] +} diff --git a/metrics/integration/render-tests/geojson/inline-point-fill/expected.png b/metrics/integration/render-tests/geojson/inline-point-fill/expected.png new file mode 100644 index 00000000000..724d17cd7d3 Binary files /dev/null and b/metrics/integration/render-tests/geojson/inline-point-fill/expected.png differ diff --git a/metrics/integration/render-tests/geojson/inline-point-fill/style.json b/metrics/integration/render-tests/geojson/inline-point-fill/style.json new file mode 100644 index 00000000000..572f53e5f92 --- /dev/null +++ b/metrics/integration/render-tests/geojson/inline-point-fill/style.json @@ -0,0 +1,29 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "fill", + "type": "fill", + "source": "geojson" + } + ] +} diff --git a/metrics/integration/render-tests/geojson/inline-point-line/expected.png b/metrics/integration/render-tests/geojson/inline-point-line/expected.png new file mode 100644 index 00000000000..724d17cd7d3 Binary files /dev/null and b/metrics/integration/render-tests/geojson/inline-point-line/expected.png differ diff --git a/metrics/integration/render-tests/geojson/inline-point-line/style.json b/metrics/integration/render-tests/geojson/inline-point-line/style.json new file mode 100644 index 00000000000..ad39c64f5bb --- /dev/null +++ b/metrics/integration/render-tests/geojson/inline-point-line/style.json @@ -0,0 +1,29 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "line", + "type": "line", + "source": "geojson" + } + ] +} diff --git a/metrics/integration/render-tests/geojson/inline-point-symbol/expected.png b/metrics/integration/render-tests/geojson/inline-point-symbol/expected.png new file mode 100644 index 00000000000..feed2e457f1 Binary files /dev/null and b/metrics/integration/render-tests/geojson/inline-point-symbol/expected.png differ diff --git a/metrics/integration/render-tests/geojson/inline-point-symbol/style.json b/metrics/integration/render-tests/geojson/inline-point-symbol/style.json new file mode 100644 index 00000000000..c6a85f1869c --- /dev/null +++ b/metrics/integration/render-tests/geojson/inline-point-symbol/style.json @@ -0,0 +1,32 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "circle-12" + } + } + ] +} diff --git a/metrics/integration/render-tests/geojson/inline-polygon-circle/expected.png b/metrics/integration/render-tests/geojson/inline-polygon-circle/expected.png new file mode 100644 index 00000000000..8b28765ff12 Binary files /dev/null and b/metrics/integration/render-tests/geojson/inline-polygon-circle/expected.png differ diff --git a/metrics/integration/render-tests/geojson/inline-polygon-circle/style.json b/metrics/integration/render-tests/geojson/inline-polygon-circle/style.json new file mode 100644 index 00000000000..e94d70f36df --- /dev/null +++ b/metrics/integration/render-tests/geojson/inline-polygon-circle/style.json @@ -0,0 +1,49 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -10, + -10 + ], + [ + -10, + 10 + ], + [ + 10, + 10 + ], + [ + 10, + -10 + ], + [ + -10, + -10 + ] + ] + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson" + } + ] +} diff --git a/metrics/integration/render-tests/geojson/inline-polygon-fill/expected.png b/metrics/integration/render-tests/geojson/inline-polygon-fill/expected.png new file mode 100644 index 00000000000..8f17810f559 Binary files /dev/null and b/metrics/integration/render-tests/geojson/inline-polygon-fill/expected.png differ diff --git a/metrics/integration/render-tests/geojson/inline-polygon-fill/style.json b/metrics/integration/render-tests/geojson/inline-polygon-fill/style.json new file mode 100644 index 00000000000..42723a5d4c3 --- /dev/null +++ b/metrics/integration/render-tests/geojson/inline-polygon-fill/style.json @@ -0,0 +1,49 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -10, + -10 + ], + [ + -10, + 10 + ], + [ + 10, + 10 + ], + [ + 10, + -10 + ], + [ + -10, + -10 + ] + ] + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "fill", + "type": "fill", + "source": "geojson" + } + ] +} diff --git a/metrics/integration/render-tests/geojson/inline-polygon-line/expected.png b/metrics/integration/render-tests/geojson/inline-polygon-line/expected.png new file mode 100644 index 00000000000..167ae112050 Binary files /dev/null and b/metrics/integration/render-tests/geojson/inline-polygon-line/expected.png differ diff --git a/metrics/integration/render-tests/geojson/inline-polygon-line/style.json b/metrics/integration/render-tests/geojson/inline-polygon-line/style.json new file mode 100644 index 00000000000..0a5b8ed2d19 --- /dev/null +++ b/metrics/integration/render-tests/geojson/inline-polygon-line/style.json @@ -0,0 +1,49 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -10, + -10 + ], + [ + -10, + 10 + ], + [ + 10, + 10 + ], + [ + 10, + -10 + ], + [ + -10, + -10 + ] + ] + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "line", + "type": "line", + "source": "geojson" + } + ] +} diff --git a/metrics/integration/render-tests/geojson/inline-polygon-symbol/expected.png b/metrics/integration/render-tests/geojson/inline-polygon-symbol/expected.png new file mode 100644 index 00000000000..feed2e457f1 Binary files /dev/null and b/metrics/integration/render-tests/geojson/inline-polygon-symbol/expected.png differ diff --git a/metrics/integration/render-tests/geojson/inline-polygon-symbol/style.json b/metrics/integration/render-tests/geojson/inline-polygon-symbol/style.json new file mode 100644 index 00000000000..ad8d5505ddb --- /dev/null +++ b/metrics/integration/render-tests/geojson/inline-polygon-symbol/style.json @@ -0,0 +1,54 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -10, + -10 + ], + [ + -10, + 10 + ], + [ + 10, + 10 + ], + [ + 10, + -10 + ], + [ + -10, + -10 + ] + ] + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "circle-12", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/geojson/missing/expected.png b/metrics/integration/render-tests/geojson/missing/expected.png new file mode 100644 index 00000000000..da62bb0db1d Binary files /dev/null and b/metrics/integration/render-tests/geojson/missing/expected.png differ diff --git a/metrics/integration/render-tests/geojson/missing/style.json b/metrics/integration/render-tests/geojson/missing/style.json new file mode 100644 index 00000000000..856abfb6196 --- /dev/null +++ b/metrics/integration/render-tests/geojson/missing/style.json @@ -0,0 +1,30 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 512, + "height": 512 + } + }, + "center": [ + -77.0305, + 38.9014 + ], + "zoom": 12.15, + "sources": { + "geojson": { + "type": "geojson" + } + }, + "layers": [ + { + "id": "line", + "type": "line", + "source": "geojson", + "paint": { + "line-color": "#EC8D8D", + "line-width": 4 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/geojson/reparse-overscaled/expected.png b/metrics/integration/render-tests/geojson/reparse-overscaled/expected.png new file mode 100644 index 00000000000..f1d902c28b4 Binary files /dev/null and b/metrics/integration/render-tests/geojson/reparse-overscaled/expected.png differ diff --git a/metrics/integration/render-tests/geojson/reparse-overscaled/style.json b/metrics/integration/render-tests/geojson/reparse-overscaled/style.json new file mode 100644 index 00000000000..c27a1d2ba05 --- /dev/null +++ b/metrics/integration/render-tests/geojson/reparse-overscaled/style.json @@ -0,0 +1,32 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 512, + "height": 512 + } + }, + "center": [ + -77.0424, + 38.90924 + ], + "zoom": 19, + "sources": { + "geojson": { + "type": "geojson", + "data": "local://data/feature.geojson" + } + }, + "layers": [ + { + "id": "line", + "type": "line", + "source": "geojson", + "minzoom": 19, + "paint": { + "line-color": "#EC8D8D", + "line-width": 4 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/heatmap-color/default/expected-half-float.png b/metrics/integration/render-tests/heatmap-color/default/expected-half-float.png new file mode 100644 index 00000000000..0c589d20940 Binary files /dev/null and b/metrics/integration/render-tests/heatmap-color/default/expected-half-float.png differ diff --git a/metrics/integration/render-tests/heatmap-color/default/expected.png b/metrics/integration/render-tests/heatmap-color/default/expected.png new file mode 100644 index 00000000000..deb0f101d73 Binary files /dev/null and b/metrics/integration/render-tests/heatmap-color/default/expected.png differ diff --git a/metrics/integration/render-tests/heatmap-color/default/style.json b/metrics/integration/render-tests/heatmap-color/default/style.json new file mode 100644 index 00000000000..f41200873b9 --- /dev/null +++ b/metrics/integration/render-tests/heatmap-color/default/style.json @@ -0,0 +1,40 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 64, + "width": 256, + "description": "Contains two expected images (for ubyte-based rendering and half-float-based); one of them should pass depending on platform." + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "poi_label", + "type": "heatmap", + "source": "mapbox", + "source-layer": "poi_label", + "paint": {} + } + ] +} diff --git a/metrics/integration/render-tests/heatmap-color/expression/expected-half-float.png b/metrics/integration/render-tests/heatmap-color/expression/expected-half-float.png new file mode 100644 index 00000000000..0c589d20940 Binary files /dev/null and b/metrics/integration/render-tests/heatmap-color/expression/expected-half-float.png differ diff --git a/metrics/integration/render-tests/heatmap-color/expression/expected.png b/metrics/integration/render-tests/heatmap-color/expression/expected.png new file mode 100644 index 00000000000..deb0f101d73 Binary files /dev/null and b/metrics/integration/render-tests/heatmap-color/expression/expected.png differ diff --git a/metrics/integration/render-tests/heatmap-color/expression/style.json b/metrics/integration/render-tests/heatmap-color/expression/style.json new file mode 100644 index 00000000000..9beaa0dff6e --- /dev/null +++ b/metrics/integration/render-tests/heatmap-color/expression/style.json @@ -0,0 +1,52 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 64, + "width": 256, + "description": "Contains two expected images (for ubyte-based rendering and half-float-based); one of them should pass depending on platform." + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "poi_label", + "type": "heatmap", + "source": "mapbox", + "source-layer": "poi_label", + "paint": { + "heatmap-color": [ + "interpolate", + ["linear"], + ["heatmap-density"], + 0, "rgba(0, 0, 255, 0)", + 0.1, "royalblue", + 0.3, "cyan", + 0.5, "lime", + 0.7, "yellow", + 1, "red" + ] + } + } + ] +} diff --git a/metrics/integration/render-tests/heatmap-intensity/default/expected-half-float.png b/metrics/integration/render-tests/heatmap-intensity/default/expected-half-float.png new file mode 100644 index 00000000000..0adb438d402 Binary files /dev/null and b/metrics/integration/render-tests/heatmap-intensity/default/expected-half-float.png differ diff --git a/metrics/integration/render-tests/heatmap-intensity/default/expected.png b/metrics/integration/render-tests/heatmap-intensity/default/expected.png new file mode 100644 index 00000000000..563ee0e8ab8 Binary files /dev/null and b/metrics/integration/render-tests/heatmap-intensity/default/expected.png differ diff --git a/metrics/integration/render-tests/heatmap-intensity/default/style.json b/metrics/integration/render-tests/heatmap-intensity/default/style.json new file mode 100644 index 00000000000..c7a936dad49 --- /dev/null +++ b/metrics/integration/render-tests/heatmap-intensity/default/style.json @@ -0,0 +1,40 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 128, + "width": 256, + "description": "Contains two expected images (for ubyte-based rendering and half-float-based); one of them should pass depending on platform." + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "poi_label", + "type": "heatmap", + "source": "mapbox", + "source-layer": "poi_label", + "paint": {} + } + ] +} diff --git a/metrics/integration/render-tests/heatmap-intensity/function/expected-half-float.png b/metrics/integration/render-tests/heatmap-intensity/function/expected-half-float.png new file mode 100644 index 00000000000..9c452b45ddb Binary files /dev/null and b/metrics/integration/render-tests/heatmap-intensity/function/expected-half-float.png differ diff --git a/metrics/integration/render-tests/heatmap-intensity/function/expected.png b/metrics/integration/render-tests/heatmap-intensity/function/expected.png new file mode 100644 index 00000000000..51b027a8c95 Binary files /dev/null and b/metrics/integration/render-tests/heatmap-intensity/function/expected.png differ diff --git a/metrics/integration/render-tests/heatmap-intensity/function/style.json b/metrics/integration/render-tests/heatmap-intensity/function/style.json new file mode 100644 index 00000000000..2492d147287 --- /dev/null +++ b/metrics/integration/render-tests/heatmap-intensity/function/style.json @@ -0,0 +1,44 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 128, + "width": 256, + "description": "Contains two expected images (for ubyte-based rendering and half-float-based); one of them should pass depending on platform." + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "poi_label", + "type": "heatmap", + "source": "mapbox", + "source-layer": "poi_label", + "paint": { + "heatmap-intensity": { + "stops": [[12, 0.1], [16, 1]] + } + } + } + ] +} diff --git a/metrics/integration/render-tests/heatmap-intensity/literal/expected-half-float.png b/metrics/integration/render-tests/heatmap-intensity/literal/expected-half-float.png new file mode 100644 index 00000000000..985348745f5 Binary files /dev/null and b/metrics/integration/render-tests/heatmap-intensity/literal/expected-half-float.png differ diff --git a/metrics/integration/render-tests/heatmap-intensity/literal/expected.png b/metrics/integration/render-tests/heatmap-intensity/literal/expected.png new file mode 100644 index 00000000000..5891e360d5c Binary files /dev/null and b/metrics/integration/render-tests/heatmap-intensity/literal/expected.png differ diff --git a/metrics/integration/render-tests/heatmap-intensity/literal/style.json b/metrics/integration/render-tests/heatmap-intensity/literal/style.json new file mode 100644 index 00000000000..f1be28bf29b --- /dev/null +++ b/metrics/integration/render-tests/heatmap-intensity/literal/style.json @@ -0,0 +1,42 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 128, + "width": 256, + "description": "Contains two expected images (for ubyte-based rendering and half-float-based); one of them should pass depending on platform." + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "poi_label", + "type": "heatmap", + "source": "mapbox", + "source-layer": "poi_label", + "paint": { + "heatmap-intensity": 0.5 + } + } + ] +} diff --git a/metrics/integration/render-tests/heatmap-opacity/default/expected-half-float.png b/metrics/integration/render-tests/heatmap-opacity/default/expected-half-float.png new file mode 100644 index 00000000000..5685eb92698 Binary files /dev/null and b/metrics/integration/render-tests/heatmap-opacity/default/expected-half-float.png differ diff --git a/metrics/integration/render-tests/heatmap-opacity/default/expected.png b/metrics/integration/render-tests/heatmap-opacity/default/expected.png new file mode 100644 index 00000000000..7f0ba0a9a80 Binary files /dev/null and b/metrics/integration/render-tests/heatmap-opacity/default/expected.png differ diff --git a/metrics/integration/render-tests/heatmap-opacity/default/style.json b/metrics/integration/render-tests/heatmap-opacity/default/style.json new file mode 100644 index 00000000000..4b4c3fb0711 --- /dev/null +++ b/metrics/integration/render-tests/heatmap-opacity/default/style.json @@ -0,0 +1,40 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 32, + "width": 128, + "description": "Contains two expected images (for ubyte-based rendering and half-float-based); one of them should pass depending on platform." + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "poi_label", + "type": "heatmap", + "source": "mapbox", + "source-layer": "poi_label", + "paint": {} + } + ] +} diff --git a/metrics/integration/render-tests/heatmap-opacity/function/expected-half-float.png b/metrics/integration/render-tests/heatmap-opacity/function/expected-half-float.png new file mode 100644 index 00000000000..2ebb331af17 Binary files /dev/null and b/metrics/integration/render-tests/heatmap-opacity/function/expected-half-float.png differ diff --git a/metrics/integration/render-tests/heatmap-opacity/function/expected.png b/metrics/integration/render-tests/heatmap-opacity/function/expected.png new file mode 100644 index 00000000000..8b369583118 Binary files /dev/null and b/metrics/integration/render-tests/heatmap-opacity/function/expected.png differ diff --git a/metrics/integration/render-tests/heatmap-opacity/function/style.json b/metrics/integration/render-tests/heatmap-opacity/function/style.json new file mode 100644 index 00000000000..291fbc019f5 --- /dev/null +++ b/metrics/integration/render-tests/heatmap-opacity/function/style.json @@ -0,0 +1,44 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 32, + "width": 128, + "description": "Contains two expected images (for ubyte-based rendering and half-float-based); one of them should pass depending on platform." + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "poi_label", + "type": "heatmap", + "source": "mapbox", + "source-layer": "poi_label", + "paint": { + "heatmap-opacity": { + "stops": [[12, 0.1], [16, 1]] + } + } + } + ] +} diff --git a/metrics/integration/render-tests/heatmap-opacity/literal/expected-half-float.png b/metrics/integration/render-tests/heatmap-opacity/literal/expected-half-float.png new file mode 100644 index 00000000000..737bb7f1dbb Binary files /dev/null and b/metrics/integration/render-tests/heatmap-opacity/literal/expected-half-float.png differ diff --git a/metrics/integration/render-tests/heatmap-opacity/literal/expected.png b/metrics/integration/render-tests/heatmap-opacity/literal/expected.png new file mode 100644 index 00000000000..70cc004c240 Binary files /dev/null and b/metrics/integration/render-tests/heatmap-opacity/literal/expected.png differ diff --git a/metrics/integration/render-tests/heatmap-opacity/literal/style.json b/metrics/integration/render-tests/heatmap-opacity/literal/style.json new file mode 100644 index 00000000000..51c87df9122 --- /dev/null +++ b/metrics/integration/render-tests/heatmap-opacity/literal/style.json @@ -0,0 +1,42 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 32, + "width": 128, + "description": "Contains two expected images (for ubyte-based rendering and half-float-based); one of them should pass depending on platform." + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "poi_label", + "type": "heatmap", + "source": "mapbox", + "source-layer": "poi_label", + "paint": { + "heatmap-opacity": 0.5 + } + } + ] +} diff --git a/metrics/integration/render-tests/heatmap-radius/antimeridian/expected-half-float.png b/metrics/integration/render-tests/heatmap-radius/antimeridian/expected-half-float.png new file mode 100644 index 00000000000..3f5b61ef57c Binary files /dev/null and b/metrics/integration/render-tests/heatmap-radius/antimeridian/expected-half-float.png differ diff --git a/metrics/integration/render-tests/heatmap-radius/antimeridian/expected.png b/metrics/integration/render-tests/heatmap-radius/antimeridian/expected.png new file mode 100644 index 00000000000..32b15d283d5 Binary files /dev/null and b/metrics/integration/render-tests/heatmap-radius/antimeridian/expected.png differ diff --git a/metrics/integration/render-tests/heatmap-radius/antimeridian/style.json b/metrics/integration/render-tests/heatmap-radius/antimeridian/style.json new file mode 100644 index 00000000000..9cf4e90e269 --- /dev/null +++ b/metrics/integration/render-tests/heatmap-radius/antimeridian/style.json @@ -0,0 +1,37 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 514, + "height": 64, + "description": "Contains two expected images (for ubyte-based rendering and half-float-based); one of them should pass depending on platform." + } + }, + "center": [ + 0, + 0 + ], + "zoom": 0, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 179, + 0 + ] + } + } + }, + "layers": [ + { + "id": "heatmap", + "type": "heatmap", + "source": "geojson", + "paint": { + "heatmap-radius": 50 + } + } + ] +} diff --git a/metrics/integration/render-tests/heatmap-radius/data-expression/expected-half-float.png b/metrics/integration/render-tests/heatmap-radius/data-expression/expected-half-float.png new file mode 100644 index 00000000000..f0ce9b71b33 Binary files /dev/null and b/metrics/integration/render-tests/heatmap-radius/data-expression/expected-half-float.png differ diff --git a/metrics/integration/render-tests/heatmap-radius/data-expression/expected.png b/metrics/integration/render-tests/heatmap-radius/data-expression/expected.png new file mode 100644 index 00000000000..40a057f59da Binary files /dev/null and b/metrics/integration/render-tests/heatmap-radius/data-expression/expected.png differ diff --git a/metrics/integration/render-tests/heatmap-radius/data-expression/style.json b/metrics/integration/render-tests/heatmap-radius/data-expression/style.json new file mode 100644 index 00000000000..89e94f1aa71 --- /dev/null +++ b/metrics/integration/render-tests/heatmap-radius/data-expression/style.json @@ -0,0 +1,59 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 64, + "width": 64, + "description": "Contains two expected images (for ubyte-based rendering and half-float-based); one of them should pass depending on platform." + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "radius": 5 + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + "radius": 10 + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "heatmap", + "type": "heatmap", + "source": "geojson", + "paint": { + "heatmap-radius": [ + "get", + "radius" + ] + } + } + ] +} diff --git a/metrics/integration/render-tests/heatmap-radius/default/expected-half-float.png b/metrics/integration/render-tests/heatmap-radius/default/expected-half-float.png new file mode 100644 index 00000000000..0adb438d402 Binary files /dev/null and b/metrics/integration/render-tests/heatmap-radius/default/expected-half-float.png differ diff --git a/metrics/integration/render-tests/heatmap-radius/default/expected.png b/metrics/integration/render-tests/heatmap-radius/default/expected.png new file mode 100644 index 00000000000..563ee0e8ab8 Binary files /dev/null and b/metrics/integration/render-tests/heatmap-radius/default/expected.png differ diff --git a/metrics/integration/render-tests/heatmap-radius/default/style.json b/metrics/integration/render-tests/heatmap-radius/default/style.json new file mode 100644 index 00000000000..c7a936dad49 --- /dev/null +++ b/metrics/integration/render-tests/heatmap-radius/default/style.json @@ -0,0 +1,40 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 128, + "width": 256, + "description": "Contains two expected images (for ubyte-based rendering and half-float-based); one of them should pass depending on platform." + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "poi_label", + "type": "heatmap", + "source": "mapbox", + "source-layer": "poi_label", + "paint": {} + } + ] +} diff --git a/metrics/integration/render-tests/heatmap-radius/function/expected-half-float.png b/metrics/integration/render-tests/heatmap-radius/function/expected-half-float.png new file mode 100644 index 00000000000..0a5daa456bc Binary files /dev/null and b/metrics/integration/render-tests/heatmap-radius/function/expected-half-float.png differ diff --git a/metrics/integration/render-tests/heatmap-radius/function/expected.png b/metrics/integration/render-tests/heatmap-radius/function/expected.png new file mode 100644 index 00000000000..f05a3f3831b Binary files /dev/null and b/metrics/integration/render-tests/heatmap-radius/function/expected.png differ diff --git a/metrics/integration/render-tests/heatmap-radius/function/style.json b/metrics/integration/render-tests/heatmap-radius/function/style.json new file mode 100644 index 00000000000..5ad88e9c009 --- /dev/null +++ b/metrics/integration/render-tests/heatmap-radius/function/style.json @@ -0,0 +1,44 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 128, + "width": 256, + "description": "Contains two expected images (for ubyte-based rendering and half-float-based); one of them should pass depending on platform." + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "poi_label", + "type": "heatmap", + "source": "mapbox", + "source-layer": "poi_label", + "paint": { + "heatmap-radius": { + "stops": [[12, 10], [18, 30]] + } + } + } + ] +} diff --git a/metrics/integration/render-tests/heatmap-radius/literal/expected-half-float.png b/metrics/integration/render-tests/heatmap-radius/literal/expected-half-float.png new file mode 100644 index 00000000000..bbd63d3d67a Binary files /dev/null and b/metrics/integration/render-tests/heatmap-radius/literal/expected-half-float.png differ diff --git a/metrics/integration/render-tests/heatmap-radius/literal/expected.png b/metrics/integration/render-tests/heatmap-radius/literal/expected.png new file mode 100644 index 00000000000..697980ed048 Binary files /dev/null and b/metrics/integration/render-tests/heatmap-radius/literal/expected.png differ diff --git a/metrics/integration/render-tests/heatmap-radius/literal/style.json b/metrics/integration/render-tests/heatmap-radius/literal/style.json new file mode 100644 index 00000000000..7e092f0d72d --- /dev/null +++ b/metrics/integration/render-tests/heatmap-radius/literal/style.json @@ -0,0 +1,42 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 128, + "width": 256, + "description": "Contains two expected images (for ubyte-based rendering and half-float-based); one of them should pass depending on platform." + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "poi_label", + "type": "heatmap", + "source": "mapbox", + "source-layer": "poi_label", + "paint": { + "heatmap-radius": 20 + } + } + ] +} diff --git a/metrics/integration/render-tests/heatmap-radius/pitch30/expected-half-float.png b/metrics/integration/render-tests/heatmap-radius/pitch30/expected-half-float.png new file mode 100644 index 00000000000..509615854aa Binary files /dev/null and b/metrics/integration/render-tests/heatmap-radius/pitch30/expected-half-float.png differ diff --git a/metrics/integration/render-tests/heatmap-radius/pitch30/expected.png b/metrics/integration/render-tests/heatmap-radius/pitch30/expected.png new file mode 100644 index 00000000000..756e9836ea3 Binary files /dev/null and b/metrics/integration/render-tests/heatmap-radius/pitch30/expected.png differ diff --git a/metrics/integration/render-tests/heatmap-radius/pitch30/style.json b/metrics/integration/render-tests/heatmap-radius/pitch30/style.json new file mode 100644 index 00000000000..ae024a3ac1e --- /dev/null +++ b/metrics/integration/render-tests/heatmap-radius/pitch30/style.json @@ -0,0 +1,43 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 128, + "width": 256, + "description": "Contains two expected images (for ubyte-based rendering and half-float-based); one of them should pass depending on platform." + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "pitch": 30, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "poi_label", + "type": "heatmap", + "source": "mapbox", + "source-layer": "poi_label", + "paint": { + "heatmap-radius": 20 + } + } + ] +} diff --git a/metrics/integration/render-tests/heatmap-weight/default/expected-half-float.png b/metrics/integration/render-tests/heatmap-weight/default/expected-half-float.png new file mode 100644 index 00000000000..0adb438d402 Binary files /dev/null and b/metrics/integration/render-tests/heatmap-weight/default/expected-half-float.png differ diff --git a/metrics/integration/render-tests/heatmap-weight/default/expected.png b/metrics/integration/render-tests/heatmap-weight/default/expected.png new file mode 100644 index 00000000000..563ee0e8ab8 Binary files /dev/null and b/metrics/integration/render-tests/heatmap-weight/default/expected.png differ diff --git a/metrics/integration/render-tests/heatmap-weight/default/style.json b/metrics/integration/render-tests/heatmap-weight/default/style.json new file mode 100644 index 00000000000..c7a936dad49 --- /dev/null +++ b/metrics/integration/render-tests/heatmap-weight/default/style.json @@ -0,0 +1,40 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 128, + "width": 256, + "description": "Contains two expected images (for ubyte-based rendering and half-float-based); one of them should pass depending on platform." + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "poi_label", + "type": "heatmap", + "source": "mapbox", + "source-layer": "poi_label", + "paint": {} + } + ] +} diff --git a/metrics/integration/render-tests/heatmap-weight/identity-property-function/expected-half-float.png b/metrics/integration/render-tests/heatmap-weight/identity-property-function/expected-half-float.png new file mode 100644 index 00000000000..d4eecc1333e Binary files /dev/null and b/metrics/integration/render-tests/heatmap-weight/identity-property-function/expected-half-float.png differ diff --git a/metrics/integration/render-tests/heatmap-weight/identity-property-function/expected.png b/metrics/integration/render-tests/heatmap-weight/identity-property-function/expected.png new file mode 100644 index 00000000000..86a1256d4d1 Binary files /dev/null and b/metrics/integration/render-tests/heatmap-weight/identity-property-function/expected.png differ diff --git a/metrics/integration/render-tests/heatmap-weight/identity-property-function/style.json b/metrics/integration/render-tests/heatmap-weight/identity-property-function/style.json new file mode 100644 index 00000000000..52dd5348db5 --- /dev/null +++ b/metrics/integration/render-tests/heatmap-weight/identity-property-function/style.json @@ -0,0 +1,46 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 128, + "width": 256, + "description": "Contains two expected images (for ubyte-based rendering and half-float-based); one of them should pass depending on platform." + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "poi_label", + "type": "heatmap", + "source": "mapbox", + "source-layer": "poi_label", + "paint": { + "heatmap-intensity": 0.05, + "heatmap-weight": { + "type": "identity", + "property": "localrank" + } + } + } + ] +} diff --git a/metrics/integration/render-tests/heatmap-weight/literal/expected-half-float.png b/metrics/integration/render-tests/heatmap-weight/literal/expected-half-float.png new file mode 100644 index 00000000000..985348745f5 Binary files /dev/null and b/metrics/integration/render-tests/heatmap-weight/literal/expected-half-float.png differ diff --git a/metrics/integration/render-tests/heatmap-weight/literal/expected.png b/metrics/integration/render-tests/heatmap-weight/literal/expected.png new file mode 100644 index 00000000000..5891e360d5c Binary files /dev/null and b/metrics/integration/render-tests/heatmap-weight/literal/expected.png differ diff --git a/metrics/integration/render-tests/heatmap-weight/literal/style.json b/metrics/integration/render-tests/heatmap-weight/literal/style.json new file mode 100644 index 00000000000..956e52a58ba --- /dev/null +++ b/metrics/integration/render-tests/heatmap-weight/literal/style.json @@ -0,0 +1,42 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 128, + "width": 256, + "description": "Contains two expected images (for ubyte-based rendering and half-float-based); one of them should pass depending on platform." + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "poi_label", + "type": "heatmap", + "source": "mapbox", + "source-layer": "poi_label", + "paint": { + "heatmap-weight": 0.5 + } + } + ] +} diff --git a/metrics/integration/render-tests/hillshade-accent-color/default/expected.png b/metrics/integration/render-tests/hillshade-accent-color/default/expected.png new file mode 100644 index 00000000000..726a95a7275 Binary files /dev/null and b/metrics/integration/render-tests/hillshade-accent-color/default/expected.png differ diff --git a/metrics/integration/render-tests/hillshade-accent-color/default/style.json b/metrics/integration/render-tests/hillshade-accent-color/default/style.json new file mode 100644 index 00000000000..7da8c589697 --- /dev/null +++ b/metrics/integration/render-tests/hillshade-accent-color/default/style.json @@ -0,0 +1,35 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256, + "width": 256 + } + }, + "center": [-113.26903, 35.9654], + "zoom": 11, + "sources": { + "source": { + "type": "raster-dem", + "tiles": [ + "local://tiles/{z}-{x}-{y}.terrain.png" + ], + "maxzoom": 15, + "tileSize": 256 + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "hillshade", + "type": "hillshade", + "source": "source" + } + ] +} diff --git a/metrics/integration/render-tests/hillshade-accent-color/literal/expected.png b/metrics/integration/render-tests/hillshade-accent-color/literal/expected.png new file mode 100644 index 00000000000..fbe8edd8a20 Binary files /dev/null and b/metrics/integration/render-tests/hillshade-accent-color/literal/expected.png differ diff --git a/metrics/integration/render-tests/hillshade-accent-color/literal/style.json b/metrics/integration/render-tests/hillshade-accent-color/literal/style.json new file mode 100644 index 00000000000..731b0390fe5 --- /dev/null +++ b/metrics/integration/render-tests/hillshade-accent-color/literal/style.json @@ -0,0 +1,38 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256, + "width": 256 + } + }, + "center": [-113.26903, 35.9654], + "zoom": 11, + "sources": { + "source": { + "type": "raster-dem", + "tiles": [ + "local://tiles/{z}-{x}-{y}.terrain.png" + ], + "maxzoom": 15, + "tileSize": 256 + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "hillshade", + "type": "hillshade", + "source": "source", + "paint": { + "hillshade-accent-color": "purple" + } + } + ] +} diff --git a/metrics/integration/render-tests/hillshade-accent-color/terrarium/expected.png b/metrics/integration/render-tests/hillshade-accent-color/terrarium/expected.png new file mode 100644 index 00000000000..c29f7932875 Binary files /dev/null and b/metrics/integration/render-tests/hillshade-accent-color/terrarium/expected.png differ diff --git a/metrics/integration/render-tests/hillshade-accent-color/terrarium/style.json b/metrics/integration/render-tests/hillshade-accent-color/terrarium/style.json new file mode 100644 index 00000000000..ca14a4da901 --- /dev/null +++ b/metrics/integration/render-tests/hillshade-accent-color/terrarium/style.json @@ -0,0 +1,36 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 64, + "width": 64 + } + }, + "center": [-113.26903, 35.995], + "zoom": 11, + "sources": { + "source": { + "type": "raster-dem", + "tiles": [ + "local://tiles/{z}-{x}-{y}.terrarium.png" + ], + "maxzoom": 15, + "tileSize": 256, + "encoding": "terrarium" + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "hillshade", + "type": "hillshade", + "source": "source" + } + ] +} diff --git a/metrics/integration/render-tests/hillshade-accent-color/zoom-function/expected.png b/metrics/integration/render-tests/hillshade-accent-color/zoom-function/expected.png new file mode 100644 index 00000000000..eb3df786259 Binary files /dev/null and b/metrics/integration/render-tests/hillshade-accent-color/zoom-function/expected.png differ diff --git a/metrics/integration/render-tests/hillshade-accent-color/zoom-function/style.json b/metrics/integration/render-tests/hillshade-accent-color/zoom-function/style.json new file mode 100644 index 00000000000..e6324e2fea6 --- /dev/null +++ b/metrics/integration/render-tests/hillshade-accent-color/zoom-function/style.json @@ -0,0 +1,49 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256, + "width": 256 + } + }, + "center": [-113.26903, 35.9654], + "zoom": 11, + "sources": { + "source": { + "type": "raster-dem", + "tiles": [ + "local://tiles/{z}-{x}-{y}.terrain.png" + ], + "maxzoom": 15, + "tileSize": 256 + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "hillshade", + "type": "hillshade", + "source": "source", + "paint": { + "hillshade-accent-color": { + "stops": [ + [ + 10, + "#0473c0" + ], + [ + 12, + "#04c04c" + ] + ] + } + } + } + ] +} diff --git a/metrics/integration/render-tests/hillshade-highlight-color/default/expected.png b/metrics/integration/render-tests/hillshade-highlight-color/default/expected.png new file mode 100644 index 00000000000..726a95a7275 Binary files /dev/null and b/metrics/integration/render-tests/hillshade-highlight-color/default/expected.png differ diff --git a/metrics/integration/render-tests/hillshade-highlight-color/default/style.json b/metrics/integration/render-tests/hillshade-highlight-color/default/style.json new file mode 100644 index 00000000000..7da8c589697 --- /dev/null +++ b/metrics/integration/render-tests/hillshade-highlight-color/default/style.json @@ -0,0 +1,35 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256, + "width": 256 + } + }, + "center": [-113.26903, 35.9654], + "zoom": 11, + "sources": { + "source": { + "type": "raster-dem", + "tiles": [ + "local://tiles/{z}-{x}-{y}.terrain.png" + ], + "maxzoom": 15, + "tileSize": 256 + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "hillshade", + "type": "hillshade", + "source": "source" + } + ] +} diff --git a/metrics/integration/render-tests/hillshade-highlight-color/literal/expected.png b/metrics/integration/render-tests/hillshade-highlight-color/literal/expected.png new file mode 100644 index 00000000000..298e7f3262b Binary files /dev/null and b/metrics/integration/render-tests/hillshade-highlight-color/literal/expected.png differ diff --git a/metrics/integration/render-tests/hillshade-highlight-color/literal/style.json b/metrics/integration/render-tests/hillshade-highlight-color/literal/style.json new file mode 100644 index 00000000000..d17363d0c64 --- /dev/null +++ b/metrics/integration/render-tests/hillshade-highlight-color/literal/style.json @@ -0,0 +1,38 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256, + "width": 256 + } + }, + "center": [-113.26903, 35.9654], + "zoom": 11, + "sources": { + "source": { + "type": "raster-dem", + "tiles": [ + "local://tiles/{z}-{x}-{y}.terrain.png" + ], + "maxzoom": 15, + "tileSize": 256 + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "hillshade", + "type": "hillshade", + "source": "source", + "paint": { + "hillshade-highlight-color": "#ddd" + } + } + ] +} diff --git a/metrics/integration/render-tests/hillshade-highlight-color/zoom-function/expected.png b/metrics/integration/render-tests/hillshade-highlight-color/zoom-function/expected.png new file mode 100644 index 00000000000..59ecda0129c Binary files /dev/null and b/metrics/integration/render-tests/hillshade-highlight-color/zoom-function/expected.png differ diff --git a/metrics/integration/render-tests/hillshade-highlight-color/zoom-function/style.json b/metrics/integration/render-tests/hillshade-highlight-color/zoom-function/style.json new file mode 100644 index 00000000000..5c9a81d09a0 --- /dev/null +++ b/metrics/integration/render-tests/hillshade-highlight-color/zoom-function/style.json @@ -0,0 +1,49 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256, + "width": 256 + } + }, + "center": [-113.26903, 35.9654], + "zoom": 11, + "sources": { + "source": { + "type": "raster-dem", + "tiles": [ + "local://tiles/{z}-{x}-{y}.terrain.png" + ], + "maxzoom": 15, + "tileSize": 256 + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "hillshade", + "type": "hillshade", + "source": "source", + "paint": { + "hillshade-highlight-color": { + "stops": [ + [ + 10, + "#0473c0" + ], + [ + 12, + "#04c04c" + ] + ] + } + } + } + ] +} diff --git a/metrics/integration/render-tests/hillshade-shadow-color/default/expected.png b/metrics/integration/render-tests/hillshade-shadow-color/default/expected.png new file mode 100644 index 00000000000..726a95a7275 Binary files /dev/null and b/metrics/integration/render-tests/hillshade-shadow-color/default/expected.png differ diff --git a/metrics/integration/render-tests/hillshade-shadow-color/default/style.json b/metrics/integration/render-tests/hillshade-shadow-color/default/style.json new file mode 100644 index 00000000000..7da8c589697 --- /dev/null +++ b/metrics/integration/render-tests/hillshade-shadow-color/default/style.json @@ -0,0 +1,35 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256, + "width": 256 + } + }, + "center": [-113.26903, 35.9654], + "zoom": 11, + "sources": { + "source": { + "type": "raster-dem", + "tiles": [ + "local://tiles/{z}-{x}-{y}.terrain.png" + ], + "maxzoom": 15, + "tileSize": 256 + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "hillshade", + "type": "hillshade", + "source": "source" + } + ] +} diff --git a/metrics/integration/render-tests/hillshade-shadow-color/literal/expected.png b/metrics/integration/render-tests/hillshade-shadow-color/literal/expected.png new file mode 100644 index 00000000000..6f8a4ed6aa6 Binary files /dev/null and b/metrics/integration/render-tests/hillshade-shadow-color/literal/expected.png differ diff --git a/metrics/integration/render-tests/hillshade-shadow-color/literal/style.json b/metrics/integration/render-tests/hillshade-shadow-color/literal/style.json new file mode 100644 index 00000000000..88343b17f63 --- /dev/null +++ b/metrics/integration/render-tests/hillshade-shadow-color/literal/style.json @@ -0,0 +1,38 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256, + "width": 256 + } + }, + "center": [-113.26903, 35.9654], + "zoom": 11, + "sources": { + "source": { + "type": "raster-dem", + "tiles": [ + "local://tiles/{z}-{x}-{y}.terrain.png" + ], + "maxzoom": 15, + "tileSize": 256 + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "hillshade", + "type": "hillshade", + "source": "source", + "paint": { + "hillshade-shadow-color": "green" + } + } + ] +} diff --git a/metrics/integration/render-tests/hillshade-shadow-color/zoom-function/expected.png b/metrics/integration/render-tests/hillshade-shadow-color/zoom-function/expected.png new file mode 100644 index 00000000000..c5298d185e5 Binary files /dev/null and b/metrics/integration/render-tests/hillshade-shadow-color/zoom-function/expected.png differ diff --git a/metrics/integration/render-tests/hillshade-shadow-color/zoom-function/style.json b/metrics/integration/render-tests/hillshade-shadow-color/zoom-function/style.json new file mode 100644 index 00000000000..430fc35ff48 --- /dev/null +++ b/metrics/integration/render-tests/hillshade-shadow-color/zoom-function/style.json @@ -0,0 +1,49 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256, + "width": 256 + } + }, + "center": [-113.26903, 35.9654], + "zoom": 11, + "sources": { + "source": { + "type": "raster-dem", + "tiles": [ + "local://tiles/{z}-{x}-{y}.terrain.png" + ], + "maxzoom": 15, + "tileSize": 256 + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "hillshade", + "type": "hillshade", + "source": "source", + "paint": { + "hillshade-shadow-color": { + "stops": [ + [ + 10, + "#0473c0" + ], + [ + 12, + "#04c04c" + ] + ] + } + } + } + ] +} diff --git a/metrics/integration/render-tests/icon-anchor/bottom-left/expected.png b/metrics/integration/render-tests/icon-anchor/bottom-left/expected.png new file mode 100644 index 00000000000..fc63825b1f0 Binary files /dev/null and b/metrics/integration/render-tests/icon-anchor/bottom-left/expected.png differ diff --git a/metrics/integration/render-tests/icon-anchor/bottom-left/style.json b/metrics/integration/render-tests/icon-anchor/bottom-left/style.json new file mode 100644 index 00000000000..87cc90a34c1 --- /dev/null +++ b/metrics/integration/render-tests/icon-anchor/bottom-left/style.json @@ -0,0 +1,33 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "dot.sdf", + "icon-anchor": "bottom-left" + } + } + ] +} diff --git a/metrics/integration/render-tests/icon-anchor/bottom-right/expected.png b/metrics/integration/render-tests/icon-anchor/bottom-right/expected.png new file mode 100644 index 00000000000..57c4c9354e6 Binary files /dev/null and b/metrics/integration/render-tests/icon-anchor/bottom-right/expected.png differ diff --git a/metrics/integration/render-tests/icon-anchor/bottom-right/style.json b/metrics/integration/render-tests/icon-anchor/bottom-right/style.json new file mode 100644 index 00000000000..500957eea8a --- /dev/null +++ b/metrics/integration/render-tests/icon-anchor/bottom-right/style.json @@ -0,0 +1,33 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "dot.sdf", + "icon-anchor": "bottom-right" + } + } + ] +} diff --git a/metrics/integration/render-tests/icon-anchor/bottom/expected.png b/metrics/integration/render-tests/icon-anchor/bottom/expected.png new file mode 100644 index 00000000000..e05b575d94c Binary files /dev/null and b/metrics/integration/render-tests/icon-anchor/bottom/expected.png differ diff --git a/metrics/integration/render-tests/icon-anchor/bottom/style.json b/metrics/integration/render-tests/icon-anchor/bottom/style.json new file mode 100644 index 00000000000..02667fd5316 --- /dev/null +++ b/metrics/integration/render-tests/icon-anchor/bottom/style.json @@ -0,0 +1,33 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "dot.sdf", + "icon-anchor": "bottom" + } + } + ] +} diff --git a/metrics/integration/render-tests/icon-anchor/center/expected.png b/metrics/integration/render-tests/icon-anchor/center/expected.png new file mode 100644 index 00000000000..0cd32ecc454 Binary files /dev/null and b/metrics/integration/render-tests/icon-anchor/center/expected.png differ diff --git a/metrics/integration/render-tests/icon-anchor/center/style.json b/metrics/integration/render-tests/icon-anchor/center/style.json new file mode 100644 index 00000000000..397036a6205 --- /dev/null +++ b/metrics/integration/render-tests/icon-anchor/center/style.json @@ -0,0 +1,33 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "dot.sdf", + "icon-anchor": "center" + } + } + ] +} diff --git a/metrics/integration/render-tests/icon-anchor/default/expected.png b/metrics/integration/render-tests/icon-anchor/default/expected.png new file mode 100644 index 00000000000..0cd32ecc454 Binary files /dev/null and b/metrics/integration/render-tests/icon-anchor/default/expected.png differ diff --git a/metrics/integration/render-tests/icon-anchor/default/style.json b/metrics/integration/render-tests/icon-anchor/default/style.json new file mode 100644 index 00000000000..4cd9745554a --- /dev/null +++ b/metrics/integration/render-tests/icon-anchor/default/style.json @@ -0,0 +1,32 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "dot.sdf" + } + } + ] +} diff --git a/metrics/integration/render-tests/icon-anchor/left/expected.png b/metrics/integration/render-tests/icon-anchor/left/expected.png new file mode 100644 index 00000000000..11febab2a11 Binary files /dev/null and b/metrics/integration/render-tests/icon-anchor/left/expected.png differ diff --git a/metrics/integration/render-tests/icon-anchor/left/style.json b/metrics/integration/render-tests/icon-anchor/left/style.json new file mode 100644 index 00000000000..5f85f3ca3e9 --- /dev/null +++ b/metrics/integration/render-tests/icon-anchor/left/style.json @@ -0,0 +1,33 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "dot.sdf", + "icon-anchor": "left" + } + } + ] +} diff --git a/metrics/integration/render-tests/icon-anchor/property-function/expected.png b/metrics/integration/render-tests/icon-anchor/property-function/expected.png new file mode 100644 index 00000000000..50f8966f72d Binary files /dev/null and b/metrics/integration/render-tests/icon-anchor/property-function/expected.png differ diff --git a/metrics/integration/render-tests/icon-anchor/property-function/style.json b/metrics/integration/render-tests/icon-anchor/property-function/style.json new file mode 100644 index 00000000000..dfc462f5c74 --- /dev/null +++ b/metrics/integration/render-tests/icon-anchor/property-function/style.json @@ -0,0 +1,109 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256, + "width": 256 + } + }, + "center": [ 0, 0 ], + "zoom": 0, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { "x": "bottom-right" }, + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + }, + { + "type": "Feature", + "properties": { "x": "bottom" }, + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + }, + { + "type": "Feature", + "properties": { "x": "bottom-left" }, + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + }, + { + "type": "Feature", + "properties": { "x": "right" }, + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + }, + { + "type": "Feature", + "properties": { "x": "center" }, + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + }, + { + "type": "Feature", + "properties": { "x": "left" }, + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + }, + { + "type": "Feature", + "properties": { "x": "top-right" }, + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + }, + { + "type": "Feature", + "properties": { "x": "top" }, + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + }, + { + "type": "Feature", + "properties": { "x": "top-left" }, + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + } + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "dot.sdf", + "icon-allow-overlap": true, + "icon-anchor": { + "type": "identity", + "property": "x" + } + } + } + ] +} diff --git a/metrics/integration/render-tests/icon-anchor/right/expected.png b/metrics/integration/render-tests/icon-anchor/right/expected.png new file mode 100644 index 00000000000..d7036fa5c05 Binary files /dev/null and b/metrics/integration/render-tests/icon-anchor/right/expected.png differ diff --git a/metrics/integration/render-tests/icon-anchor/right/style.json b/metrics/integration/render-tests/icon-anchor/right/style.json new file mode 100644 index 00000000000..4f5296cd546 --- /dev/null +++ b/metrics/integration/render-tests/icon-anchor/right/style.json @@ -0,0 +1,33 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "dot.sdf", + "icon-anchor": "right" + } + } + ] +} diff --git a/metrics/integration/render-tests/icon-anchor/top-left/expected.png b/metrics/integration/render-tests/icon-anchor/top-left/expected.png new file mode 100644 index 00000000000..d5e9160a6e3 Binary files /dev/null and b/metrics/integration/render-tests/icon-anchor/top-left/expected.png differ diff --git a/metrics/integration/render-tests/icon-anchor/top-left/style.json b/metrics/integration/render-tests/icon-anchor/top-left/style.json new file mode 100644 index 00000000000..670a60b4cca --- /dev/null +++ b/metrics/integration/render-tests/icon-anchor/top-left/style.json @@ -0,0 +1,33 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "dot.sdf", + "icon-anchor": "top-left" + } + } + ] +} diff --git a/metrics/integration/render-tests/icon-anchor/top-right/expected.png b/metrics/integration/render-tests/icon-anchor/top-right/expected.png new file mode 100644 index 00000000000..e4aaf6cd05d Binary files /dev/null and b/metrics/integration/render-tests/icon-anchor/top-right/expected.png differ diff --git a/metrics/integration/render-tests/icon-anchor/top-right/style.json b/metrics/integration/render-tests/icon-anchor/top-right/style.json new file mode 100644 index 00000000000..a9d68dd967a --- /dev/null +++ b/metrics/integration/render-tests/icon-anchor/top-right/style.json @@ -0,0 +1,33 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "dot.sdf", + "icon-anchor": "top-right" + } + } + ] +} diff --git a/metrics/integration/render-tests/icon-anchor/top/expected.png b/metrics/integration/render-tests/icon-anchor/top/expected.png new file mode 100644 index 00000000000..9217d4be61f Binary files /dev/null and b/metrics/integration/render-tests/icon-anchor/top/expected.png differ diff --git a/metrics/integration/render-tests/icon-anchor/top/style.json b/metrics/integration/render-tests/icon-anchor/top/style.json new file mode 100644 index 00000000000..a176997c15b --- /dev/null +++ b/metrics/integration/render-tests/icon-anchor/top/style.json @@ -0,0 +1,33 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "dot.sdf", + "icon-anchor": "top" + } + } + ] +} diff --git a/metrics/integration/render-tests/icon-color/default/expected.png b/metrics/integration/render-tests/icon-color/default/expected.png new file mode 100644 index 00000000000..0cd32ecc454 Binary files /dev/null and b/metrics/integration/render-tests/icon-color/default/expected.png differ diff --git a/metrics/integration/render-tests/icon-color/default/style.json b/metrics/integration/render-tests/icon-color/default/style.json new file mode 100644 index 00000000000..195b84d2ae0 --- /dev/null +++ b/metrics/integration/render-tests/icon-color/default/style.json @@ -0,0 +1,32 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "dot.sdf" + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/icon-color/function/expected.png b/metrics/integration/render-tests/icon-color/function/expected.png new file mode 100644 index 00000000000..c685c0a1922 Binary files /dev/null and b/metrics/integration/render-tests/icon-color/function/expected.png differ diff --git a/metrics/integration/render-tests/icon-color/function/style.json b/metrics/integration/render-tests/icon-color/function/style.json new file mode 100644 index 00000000000..6443a326642 --- /dev/null +++ b/metrics/integration/render-tests/icon-color/function/style.json @@ -0,0 +1,46 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "dot.sdf" + }, + "paint": { + "icon-color": { + "stops": [ + [ + 16, + "blue" + ], + [ + 17, + "red" + ] + ] + } + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/icon-color/literal/expected.png b/metrics/integration/render-tests/icon-color/literal/expected.png new file mode 100644 index 00000000000..f03c42fab68 Binary files /dev/null and b/metrics/integration/render-tests/icon-color/literal/expected.png differ diff --git a/metrics/integration/render-tests/icon-color/literal/style.json b/metrics/integration/render-tests/icon-color/literal/style.json new file mode 100644 index 00000000000..6f2cd053107 --- /dev/null +++ b/metrics/integration/render-tests/icon-color/literal/style.json @@ -0,0 +1,35 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "dot.sdf" + }, + "paint": { + "icon-color": "red" + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/icon-color/property-function/expected.png b/metrics/integration/render-tests/icon-color/property-function/expected.png new file mode 100644 index 00000000000..0c2b2271ed9 Binary files /dev/null and b/metrics/integration/render-tests/icon-color/property-function/expected.png differ diff --git a/metrics/integration/render-tests/icon-color/property-function/style.json b/metrics/integration/render-tests/icon-color/property-function/style.json new file mode 100644 index 00000000000..52c08a91015 --- /dev/null +++ b/metrics/integration/render-tests/icon-color/property-function/style.json @@ -0,0 +1,67 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { "x": 0 }, + "geometry": { + "type": "Point", + "coordinates": [ + 0, + -10 + ] + } + }, + { + "type": "Feature", + "properties": { "x": 1 }, + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 10 + ] + } + } + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "dot.sdf" + }, + "paint": { + "icon-color": { + "property": "x", + "stops": [ + [ + 0, + "blue" + ], + [ + 1, + "red" + ] + ] + } + } + } + ] +} diff --git a/metrics/integration/render-tests/icon-halo-blur/default/expected.png b/metrics/integration/render-tests/icon-halo-blur/default/expected.png new file mode 100644 index 00000000000..b69375c06d2 Binary files /dev/null and b/metrics/integration/render-tests/icon-halo-blur/default/expected.png differ diff --git a/metrics/integration/render-tests/icon-halo-blur/default/style.json b/metrics/integration/render-tests/icon-halo-blur/default/style.json new file mode 100644 index 00000000000..6af45978897 --- /dev/null +++ b/metrics/integration/render-tests/icon-halo-blur/default/style.json @@ -0,0 +1,36 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "dot.sdf" + }, + "paint": { + "icon-halo-color": "blue", + "icon-halo-width": 2 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/icon-halo-blur/function/expected.png b/metrics/integration/render-tests/icon-halo-blur/function/expected.png new file mode 100644 index 00000000000..7c8fd1ea15d Binary files /dev/null and b/metrics/integration/render-tests/icon-halo-blur/function/expected.png differ diff --git a/metrics/integration/render-tests/icon-halo-blur/function/style.json b/metrics/integration/render-tests/icon-halo-blur/function/style.json new file mode 100644 index 00000000000..50d5d55e5a3 --- /dev/null +++ b/metrics/integration/render-tests/icon-halo-blur/function/style.json @@ -0,0 +1,48 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "dot.sdf" + }, + "paint": { + "icon-halo-color": "blue", + "icon-halo-width": 2, + "icon-halo-blur": { + "stops": [ + [ + 16, + 4 + ], + [ + 17, + 5 + ] + ] + } + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/icon-halo-blur/literal/expected.png b/metrics/integration/render-tests/icon-halo-blur/literal/expected.png new file mode 100644 index 00000000000..e1303e33b54 Binary files /dev/null and b/metrics/integration/render-tests/icon-halo-blur/literal/expected.png differ diff --git a/metrics/integration/render-tests/icon-halo-blur/literal/style.json b/metrics/integration/render-tests/icon-halo-blur/literal/style.json new file mode 100644 index 00000000000..14cbc84fa57 --- /dev/null +++ b/metrics/integration/render-tests/icon-halo-blur/literal/style.json @@ -0,0 +1,37 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "dot.sdf" + }, + "paint": { + "icon-halo-color": "blue", + "icon-halo-width": 2, + "icon-halo-blur": 2 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/icon-halo-blur/property-function/expected.png b/metrics/integration/render-tests/icon-halo-blur/property-function/expected.png new file mode 100644 index 00000000000..440086adb3c Binary files /dev/null and b/metrics/integration/render-tests/icon-halo-blur/property-function/expected.png differ diff --git a/metrics/integration/render-tests/icon-halo-blur/property-function/style.json b/metrics/integration/render-tests/icon-halo-blur/property-function/style.json new file mode 100644 index 00000000000..b86cd5181f4 --- /dev/null +++ b/metrics/integration/render-tests/icon-halo-blur/property-function/style.json @@ -0,0 +1,68 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { "x": 0 }, + "geometry": { + "type": "Point", + "coordinates": [ + 0, + -10 + ] + } + }, { + "type": "Feature", + "properties": { "x": 1 }, + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 10 + ] + } + } + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "dot.sdf" + }, + "paint": { + "icon-halo-width": 3, + "icon-halo-color": "green", + "icon-halo-blur": { + "property": "x", + "stops": [ + [ + 0, + 1 + ], + [ + 1, + 3 + ] + ] + } + } + } + ] +} diff --git a/metrics/integration/render-tests/icon-halo-color/default/expected.png b/metrics/integration/render-tests/icon-halo-color/default/expected.png new file mode 100644 index 00000000000..0cd32ecc454 Binary files /dev/null and b/metrics/integration/render-tests/icon-halo-color/default/expected.png differ diff --git a/metrics/integration/render-tests/icon-halo-color/default/style.json b/metrics/integration/render-tests/icon-halo-color/default/style.json new file mode 100644 index 00000000000..dfbb7dbb32c --- /dev/null +++ b/metrics/integration/render-tests/icon-halo-color/default/style.json @@ -0,0 +1,35 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "dot.sdf" + }, + "paint": { + "icon-halo-width": 2 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/icon-halo-color/function/expected.png b/metrics/integration/render-tests/icon-halo-color/function/expected.png new file mode 100644 index 00000000000..b69375c06d2 Binary files /dev/null and b/metrics/integration/render-tests/icon-halo-color/function/expected.png differ diff --git a/metrics/integration/render-tests/icon-halo-color/function/style.json b/metrics/integration/render-tests/icon-halo-color/function/style.json new file mode 100644 index 00000000000..521b763808f --- /dev/null +++ b/metrics/integration/render-tests/icon-halo-color/function/style.json @@ -0,0 +1,47 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "dot.sdf" + }, + "paint": { + "icon-halo-width": 2, + "icon-halo-color": { + "stops": [ + [ + 16, + "blue" + ], + [ + 17, + "red" + ] + ] + } + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/icon-halo-color/literal/expected.png b/metrics/integration/render-tests/icon-halo-color/literal/expected.png new file mode 100644 index 00000000000..e87cec316ae Binary files /dev/null and b/metrics/integration/render-tests/icon-halo-color/literal/expected.png differ diff --git a/metrics/integration/render-tests/icon-halo-color/literal/style.json b/metrics/integration/render-tests/icon-halo-color/literal/style.json new file mode 100644 index 00000000000..9c92b9b177e --- /dev/null +++ b/metrics/integration/render-tests/icon-halo-color/literal/style.json @@ -0,0 +1,36 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "dot.sdf" + }, + "paint": { + "icon-halo-width": 2, + "icon-halo-color": "red" + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/icon-halo-color/multiply/expected.png b/metrics/integration/render-tests/icon-halo-color/multiply/expected.png new file mode 100644 index 00000000000..6001bde0984 Binary files /dev/null and b/metrics/integration/render-tests/icon-halo-color/multiply/expected.png differ diff --git a/metrics/integration/render-tests/icon-halo-color/multiply/style.json b/metrics/integration/render-tests/icon-halo-color/multiply/style.json new file mode 100644 index 00000000000..06755a5073a --- /dev/null +++ b/metrics/integration/render-tests/icon-halo-color/multiply/style.json @@ -0,0 +1,37 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "dot.sdf" + }, + "paint": { + "icon-halo-width": 2, + "icon-halo-color": "rgba(255,0,0,0.5)", + "icon-opacity": 0.5 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/icon-halo-color/opacity/expected.png b/metrics/integration/render-tests/icon-halo-color/opacity/expected.png new file mode 100644 index 00000000000..bc661748ccf Binary files /dev/null and b/metrics/integration/render-tests/icon-halo-color/opacity/expected.png differ diff --git a/metrics/integration/render-tests/icon-halo-color/opacity/style.json b/metrics/integration/render-tests/icon-halo-color/opacity/style.json new file mode 100644 index 00000000000..adb4d345eb1 --- /dev/null +++ b/metrics/integration/render-tests/icon-halo-color/opacity/style.json @@ -0,0 +1,37 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "dot.sdf" + }, + "paint": { + "icon-halo-width": 2, + "icon-halo-color": "rgba(255,0,0,1)", + "icon-opacity": 0.5 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/icon-halo-color/property-function/expected.png b/metrics/integration/render-tests/icon-halo-color/property-function/expected.png new file mode 100644 index 00000000000..cae8e00fc5d Binary files /dev/null and b/metrics/integration/render-tests/icon-halo-color/property-function/expected.png differ diff --git a/metrics/integration/render-tests/icon-halo-color/property-function/style.json b/metrics/integration/render-tests/icon-halo-color/property-function/style.json new file mode 100644 index 00000000000..fcf54206a50 --- /dev/null +++ b/metrics/integration/render-tests/icon-halo-color/property-function/style.json @@ -0,0 +1,67 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { "x": 0 }, + "geometry": { + "type": "Point", + "coordinates": [ + 0, + -10 + ] + } + }, { + "type": "Feature", + "properties": { "x": 1 }, + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 10 + ] + } + } + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "dot.sdf" + }, + "paint": { + "icon-halo-width": 2, + "icon-halo-color": { + "property": "x", + "stops": [ + [ + 0, + "blue" + ], + [ + 1, + "red" + ] + ] + } + } + } + ] +} diff --git a/metrics/integration/render-tests/icon-halo-color/transparent/expected.png b/metrics/integration/render-tests/icon-halo-color/transparent/expected.png new file mode 100644 index 00000000000..724d17cd7d3 Binary files /dev/null and b/metrics/integration/render-tests/icon-halo-color/transparent/expected.png differ diff --git a/metrics/integration/render-tests/icon-halo-color/transparent/style.json b/metrics/integration/render-tests/icon-halo-color/transparent/style.json new file mode 100644 index 00000000000..d2108d9dda0 --- /dev/null +++ b/metrics/integration/render-tests/icon-halo-color/transparent/style.json @@ -0,0 +1,37 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "dot.sdf" + }, + "paint": { + "icon-halo-width": 2, + "icon-halo-color": "rgba(255,0,0,1)", + "icon-opacity": 0 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/icon-halo-width/default/expected.png b/metrics/integration/render-tests/icon-halo-width/default/expected.png new file mode 100644 index 00000000000..0cd32ecc454 Binary files /dev/null and b/metrics/integration/render-tests/icon-halo-width/default/expected.png differ diff --git a/metrics/integration/render-tests/icon-halo-width/default/style.json b/metrics/integration/render-tests/icon-halo-width/default/style.json new file mode 100644 index 00000000000..7e05a1484b7 --- /dev/null +++ b/metrics/integration/render-tests/icon-halo-width/default/style.json @@ -0,0 +1,35 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "dot.sdf" + }, + "paint": { + "icon-halo-color": "blue" + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/icon-halo-width/function/expected.png b/metrics/integration/render-tests/icon-halo-width/function/expected.png new file mode 100644 index 00000000000..17b5455ca27 Binary files /dev/null and b/metrics/integration/render-tests/icon-halo-width/function/expected.png differ diff --git a/metrics/integration/render-tests/icon-halo-width/function/style.json b/metrics/integration/render-tests/icon-halo-width/function/style.json new file mode 100644 index 00000000000..dc0f1886943 --- /dev/null +++ b/metrics/integration/render-tests/icon-halo-width/function/style.json @@ -0,0 +1,47 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "dot.sdf" + }, + "paint": { + "icon-halo-color": "blue", + "icon-halo-width": { + "stops": [ + [ + 16, + 4 + ], + [ + 17, + 5 + ] + ] + } + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/icon-halo-width/literal/expected.png b/metrics/integration/render-tests/icon-halo-width/literal/expected.png new file mode 100644 index 00000000000..b69375c06d2 Binary files /dev/null and b/metrics/integration/render-tests/icon-halo-width/literal/expected.png differ diff --git a/metrics/integration/render-tests/icon-halo-width/literal/style.json b/metrics/integration/render-tests/icon-halo-width/literal/style.json new file mode 100644 index 00000000000..6af45978897 --- /dev/null +++ b/metrics/integration/render-tests/icon-halo-width/literal/style.json @@ -0,0 +1,36 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "dot.sdf" + }, + "paint": { + "icon-halo-color": "blue", + "icon-halo-width": 2 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/icon-halo-width/property-function/expected.png b/metrics/integration/render-tests/icon-halo-width/property-function/expected.png new file mode 100644 index 00000000000..d5b3de00200 Binary files /dev/null and b/metrics/integration/render-tests/icon-halo-width/property-function/expected.png differ diff --git a/metrics/integration/render-tests/icon-halo-width/property-function/style.json b/metrics/integration/render-tests/icon-halo-width/property-function/style.json new file mode 100644 index 00000000000..077e811082b --- /dev/null +++ b/metrics/integration/render-tests/icon-halo-width/property-function/style.json @@ -0,0 +1,67 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { "x": 0 }, + "geometry": { + "type": "Point", + "coordinates": [ + 0, + -10 + ] + } + }, { + "type": "Feature", + "properties": { "x": 1 }, + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 10 + ] + } + } + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "dot.sdf" + }, + "paint": { + "icon-halo-color": "blue", + "icon-halo-width": { + "property": "x", + "stops": [ + [ + 0, + 1 + ], + [ + 1, + 3 + ] + ] + } + } + } + ] +} diff --git a/metrics/integration/render-tests/icon-image/icon-sdf-non-sdf-one-layer/expected.png b/metrics/integration/render-tests/icon-image/icon-sdf-non-sdf-one-layer/expected.png new file mode 100644 index 00000000000..4861e66a75c Binary files /dev/null and b/metrics/integration/render-tests/icon-image/icon-sdf-non-sdf-one-layer/expected.png differ 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 new file mode 100644 index 00000000000..4970e0005fc --- /dev/null +++ b/metrics/integration/render-tests/icon-image/icon-sdf-non-sdf-one-layer/style.json @@ -0,0 +1,62 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 128, + "width" : 128 + } + }, + "center": [ + 0, + 0 + ], + "zoom": 0, + "sources": { + "geojson": + { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [0, 0] + }, + "properties": { + "icon": "squares-18" + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [20, 20] + }, + "properties": { + "icon": "dot.sdf" + } + } + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "background", + "type": "background", + "paint": {"background-color": "white"} + + }, + { + "id": "sdf-icon-mix", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": ["get", "icon"] + } + } + ] +} diff --git a/metrics/integration/render-tests/icon-image/image-expression/expected.png b/metrics/integration/render-tests/icon-image/image-expression/expected.png new file mode 100644 index 00000000000..0cd32ecc454 Binary files /dev/null and b/metrics/integration/render-tests/icon-image/image-expression/expected.png differ diff --git a/metrics/integration/render-tests/icon-image/image-expression/style.json b/metrics/integration/render-tests/icon-image/image-expression/style.json new file mode 100644 index 00000000000..7f0390b0e92 --- /dev/null +++ b/metrics/integration/render-tests/icon-image/image-expression/style.json @@ -0,0 +1,32 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 64, + "width": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "text", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": ["coalesce", ["image", "dot.sdf"], ["image", "foo"]] + } + } + ] +} diff --git a/metrics/integration/render-tests/icon-image/literal/expected.png b/metrics/integration/render-tests/icon-image/literal/expected.png new file mode 100644 index 00000000000..0cd32ecc454 Binary files /dev/null and b/metrics/integration/render-tests/icon-image/literal/expected.png differ diff --git a/metrics/integration/render-tests/icon-image/literal/style.json b/metrics/integration/render-tests/icon-image/literal/style.json new file mode 100644 index 00000000000..9a8595da116 --- /dev/null +++ b/metrics/integration/render-tests/icon-image/literal/style.json @@ -0,0 +1,32 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 64, + "width": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "text", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "dot.sdf" + } + } + ] +} diff --git a/metrics/integration/render-tests/icon-image/property-function/expected.png b/metrics/integration/render-tests/icon-image/property-function/expected.png new file mode 100644 index 00000000000..202e7899d40 Binary files /dev/null and b/metrics/integration/render-tests/icon-image/property-function/expected.png differ diff --git a/metrics/integration/render-tests/icon-image/property-function/style.json b/metrics/integration/render-tests/icon-image/property-function/style.json new file mode 100644 index 00000000000..26919a1ce93 --- /dev/null +++ b/metrics/integration/render-tests/icon-image/property-function/style.json @@ -0,0 +1,59 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 64, + "width": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "image": "bank-12" + }, + "geometry": { + "type": "Point", + "coordinates": [ + 0, + -10 + ] + } + }, + { + "type": "Feature", + "properties": { + "image": "bakery-12" + }, + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 10 + ] + } + } + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "text", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": { + "type": "identity", + "property": "image" + } + } + } + ] +} diff --git a/metrics/integration/render-tests/icon-image/stretchable-content/expected.png b/metrics/integration/render-tests/icon-image/stretchable-content/expected.png new file mode 100644 index 00000000000..04453e4b961 Binary files /dev/null and b/metrics/integration/render-tests/icon-image/stretchable-content/expected.png differ diff --git a/metrics/integration/render-tests/icon-image/stretchable-content/style.json b/metrics/integration/render-tests/icon-image/stretchable-content/style.json new file mode 100644 index 00000000000..b4914406fd6 --- /dev/null +++ b/metrics/integration/render-tests/icon-image/stretchable-content/style.json @@ -0,0 +1,41 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 200, + "height": 150 + } + }, + "zoom": 0.5, + "sources": { + "geojson": { + "type": "geojson", + "data": "local://geojson/anchors.json" + } + }, + "sprite": "local://sprites/stretch", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "anchor-left", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "nine-part", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchors", + "type": "circle", + "source": "geojson", + "paint": { + "circle-radius": 2, + "circle-color": "green", + "circle-stroke-color": "white", + "circle-stroke-width": 1 + } + } + ] +} diff --git a/metrics/integration/render-tests/icon-image/stretchable/expected.png b/metrics/integration/render-tests/icon-image/stretchable/expected.png new file mode 100644 index 00000000000..5a8e5d5b41a Binary files /dev/null and b/metrics/integration/render-tests/icon-image/stretchable/expected.png differ diff --git a/metrics/integration/render-tests/icon-image/stretchable/style.json b/metrics/integration/render-tests/icon-image/stretchable/style.json new file mode 100644 index 00000000000..56edb0c4305 --- /dev/null +++ b/metrics/integration/render-tests/icon-image/stretchable/style.json @@ -0,0 +1,41 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 200, + "height": 150 + } + }, + "zoom": 0.5, + "sources": { + "geojson": { + "type": "geojson", + "data": "local://geojson/anchors.json" + } + }, + "sprite": "local://sprites/stretch", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "anchor-left", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "nine-part-content", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchors", + "type": "circle", + "source": "geojson", + "paint": { + "circle-radius": 2, + "circle-color": "green", + "circle-stroke-color": "white", + "circle-stroke-width": 1 + } + } + ] +} diff --git a/metrics/integration/render-tests/icon-image/token/expected.png b/metrics/integration/render-tests/icon-image/token/expected.png new file mode 100644 index 00000000000..202e7899d40 Binary files /dev/null and b/metrics/integration/render-tests/icon-image/token/expected.png differ diff --git a/metrics/integration/render-tests/icon-image/token/style.json b/metrics/integration/render-tests/icon-image/token/style.json new file mode 100644 index 00000000000..e8479b70c3e --- /dev/null +++ b/metrics/integration/render-tests/icon-image/token/style.json @@ -0,0 +1,56 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 64, + "width": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "image": "bank-12" + }, + "geometry": { + "type": "Point", + "coordinates": [ + 0, + -10 + ] + } + }, + { + "type": "Feature", + "properties": { + "image": "bakery-12" + }, + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 10 + ] + } + } + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "text", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "{image}" + } + } + ] +} diff --git a/metrics/integration/render-tests/icon-no-cross-source-collision/default/expected.png b/metrics/integration/render-tests/icon-no-cross-source-collision/default/expected.png new file mode 100644 index 00000000000..3af0d05b2a2 Binary files /dev/null and b/metrics/integration/render-tests/icon-no-cross-source-collision/default/expected.png differ diff --git a/metrics/integration/render-tests/icon-no-cross-source-collision/default/style.json b/metrics/integration/render-tests/icon-no-cross-source-collision/default/style.json new file mode 100644 index 00000000000..b88ab61d71b --- /dev/null +++ b/metrics/integration/render-tests/icon-no-cross-source-collision/default/style.json @@ -0,0 +1,145 @@ +{ + "version": 8, + "metadata": { + "test": { + "crossSourceCollisions": false, + "height": 128, + "width": 128, + "description": "Three collision groups of two layers each. Each group should show one label (overlapping with labels from other groups)" + } + }, + "center": [ + 0, + 0 + ], + "zoom": 0, + "sources": { + "source1": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + ] + } + }, + "source2": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + ] + } + }, + "source3": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "source1Group1", + "type": "symbol", + "source": "source1", + "layout": { + "symbol-placement": "point", + "icon-image": "building-12" + } + }, + { + "id": "source1Group2", + "type": "symbol", + "source": "source1", + "layout": { + "symbol-placement": "point", + "icon-image": "night-building-12" + } + }, + { + "id": "source2Group1", + "type": "symbol", + "source": "source2", + "layout": { + "symbol-placement": "point", + "icon-image": "restaurant-12", + "icon-offset": [ + 7, + 7 + ] + } + }, + { + "id": "source2Group2", + "type": "symbol", + "source": "source2", + "layout": { + "symbol-placement": "point", + "icon-image": "night-restaurant-12", + "icon-offset": [ + 7, + 7 + ] + } + }, + { + "id": "source3Group1", + "type": "symbol", + "source": "source3", + "layout": { + "symbol-placement": "point", + "icon-image": "school-12", + "icon-offset": [ + 14, + 14 + ] + } + }, + { + "id": "source3Group2", + "type": "symbol", + "source": "source3", + "layout": { + "symbol-placement": "point", + "icon-image": "night-school-12", + "icon-offset": [ + 14, + 14 + ] + } + } + ] +} diff --git a/metrics/integration/render-tests/icon-offset/literal/expected.png b/metrics/integration/render-tests/icon-offset/literal/expected.png new file mode 100644 index 00000000000..fb5d36ef70a Binary files /dev/null and b/metrics/integration/render-tests/icon-offset/literal/expected.png differ diff --git a/metrics/integration/render-tests/icon-offset/literal/style.json b/metrics/integration/render-tests/icon-offset/literal/style.json new file mode 100644 index 00000000000..5a1064be79e --- /dev/null +++ b/metrics/integration/render-tests/icon-offset/literal/style.json @@ -0,0 +1,56 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "literal", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "filter": [ + "==", + "maki", + "restaurant" + ], + "layout": { + "symbol-placement": "point", + "icon-allow-overlap": true, + "icon-ignore-placement": true, + "icon-image": "{maki}-12", + "icon-offset": [ + 5, + 5 + ] + }, + "paint": { + "icon-opacity": 1 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/icon-offset/property-function/expected.png b/metrics/integration/render-tests/icon-offset/property-function/expected.png new file mode 100644 index 00000000000..0bf4543441e Binary files /dev/null and b/metrics/integration/render-tests/icon-offset/property-function/expected.png differ diff --git a/metrics/integration/render-tests/icon-offset/property-function/style.json b/metrics/integration/render-tests/icon-offset/property-function/style.json new file mode 100644 index 00000000000..7c79a062fd8 --- /dev/null +++ b/metrics/integration/render-tests/icon-offset/property-function/style.json @@ -0,0 +1,69 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "literal", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "filter": [ + "==", + "maki", + "restaurant" + ], + "layout": { + "symbol-placement": "point", + "icon-allow-overlap": true, + "icon-ignore-placement": true, + "icon-image": "{maki}-12", + "icon-offset": { + "base": 1, + "stops": [ + [ + 0, + [ + 0, + 10 + ] + ], + [ + 50, + [ + 20, + 10 + ] + ] + ], + "property": "localrank" + } + } + } + ] +} diff --git a/metrics/integration/render-tests/icon-offset/zoom-and-property-function/expected.png b/metrics/integration/render-tests/icon-offset/zoom-and-property-function/expected.png new file mode 100644 index 00000000000..c63833bb6c0 Binary files /dev/null and b/metrics/integration/render-tests/icon-offset/zoom-and-property-function/expected.png differ diff --git a/metrics/integration/render-tests/icon-offset/zoom-and-property-function/style.json b/metrics/integration/render-tests/icon-offset/zoom-and-property-function/style.json new file mode 100644 index 00000000000..0f0c0c7fc70 --- /dev/null +++ b/metrics/integration/render-tests/icon-offset/zoom-and-property-function/style.json @@ -0,0 +1,98 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "literal", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "filter": [ + "==", + "maki", + "restaurant" + ], + "layout": { + "symbol-placement": "point", + "icon-allow-overlap": true, + "icon-ignore-placement": true, + "icon-image": "{maki}-12", + "icon-offset": { + "base": 1, + "stops": [ + [ + { + "zoom": 13.9, + "value": 0 + }, + [ + 0, + 10 + ] + ], + [ + { + "zoom": 13.9, + "value": 50 + }, + [ + 20, + 10 + ] + ], + [ + { + "zoom": 14.2, + "value": 0 + }, + [ + 0, + 25 + ] + ], + [ + { + "zoom": 14.2, + "value": 50 + }, + [ + 50, + 25 + ] + ] + ], + "property": "localrank" + } + }, + "paint": { + "icon-opacity": 1 + } + } + ] +} diff --git a/metrics/integration/render-tests/icon-opacity/default/expected.png b/metrics/integration/render-tests/icon-opacity/default/expected.png new file mode 100644 index 00000000000..23e022ca364 Binary files /dev/null and b/metrics/integration/render-tests/icon-opacity/default/expected.png differ diff --git a/metrics/integration/render-tests/icon-opacity/default/style.json b/metrics/integration/render-tests/icon-opacity/default/style.json new file mode 100644 index 00000000000..d6b9029466d --- /dev/null +++ b/metrics/integration/render-tests/icon-opacity/default/style.json @@ -0,0 +1,51 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "sprite": "local://sprites/sprite", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "icon", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "filter": [ + "==", + "maki", + "restaurant" + ], + "layout": { + "symbol-placement": "point", + "icon-allow-overlap": true, + "icon-ignore-placement": true, + "icon-image": "building-12" + }, + "paint": {} + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/icon-opacity/function/expected.png b/metrics/integration/render-tests/icon-opacity/function/expected.png new file mode 100644 index 00000000000..cc1de5a67d1 Binary files /dev/null and b/metrics/integration/render-tests/icon-opacity/function/expected.png differ diff --git a/metrics/integration/render-tests/icon-opacity/function/style.json b/metrics/integration/render-tests/icon-opacity/function/style.json new file mode 100644 index 00000000000..f7c7da50c07 --- /dev/null +++ b/metrics/integration/render-tests/icon-opacity/function/style.json @@ -0,0 +1,64 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "sprite": "local://sprites/sprite", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "icon", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "filter": [ + "==", + "maki", + "restaurant" + ], + "layout": { + "symbol-placement": "point", + "icon-allow-overlap": true, + "icon-ignore-placement": true, + "icon-image": "building-12" + }, + "paint": { + "icon-opacity": { + "stops": [ + [ + 16, + 0.5 + ], + [ + 17, + 0.6 + ] + ] + } + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/icon-opacity/icon-only/expected.png b/metrics/integration/render-tests/icon-opacity/icon-only/expected.png new file mode 100644 index 00000000000..23e022ca364 Binary files /dev/null and b/metrics/integration/render-tests/icon-opacity/icon-only/expected.png differ diff --git a/metrics/integration/render-tests/icon-opacity/icon-only/style.json b/metrics/integration/render-tests/icon-opacity/icon-only/style.json new file mode 100644 index 00000000000..2c4d624291c --- /dev/null +++ b/metrics/integration/render-tests/icon-opacity/icon-only/style.json @@ -0,0 +1,61 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "sprite": "local://sprites/sprite", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "icon-only", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "filter": [ + "==", + "maki", + "restaurant" + ], + "layout": { + "symbol-placement": "point", + "icon-allow-overlap": true, + "icon-ignore-placement": true, + "icon-image": "building-12", + "text-allow-overlap": true, + "text-ignore-placement": true, + "text-field": "Test", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + }, + "paint": { + "icon-opacity": 1, + "text-opacity": 0 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/icon-opacity/literal/expected.png b/metrics/integration/render-tests/icon-opacity/literal/expected.png new file mode 100644 index 00000000000..ddea35f5c38 Binary files /dev/null and b/metrics/integration/render-tests/icon-opacity/literal/expected.png differ diff --git a/metrics/integration/render-tests/icon-opacity/literal/style.json b/metrics/integration/render-tests/icon-opacity/literal/style.json new file mode 100644 index 00000000000..a3a0a37b34a --- /dev/null +++ b/metrics/integration/render-tests/icon-opacity/literal/style.json @@ -0,0 +1,53 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "sprite": "local://sprites/sprite", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "icon", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "filter": [ + "==", + "maki", + "restaurant" + ], + "layout": { + "symbol-placement": "point", + "icon-allow-overlap": true, + "icon-ignore-placement": true, + "icon-image": "building-12" + }, + "paint": { + "icon-opacity": 0.3 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/icon-opacity/property-function/expected.png b/metrics/integration/render-tests/icon-opacity/property-function/expected.png new file mode 100644 index 00000000000..0bec22b0daa Binary files /dev/null and b/metrics/integration/render-tests/icon-opacity/property-function/expected.png differ diff --git a/metrics/integration/render-tests/icon-opacity/property-function/style.json b/metrics/integration/render-tests/icon-opacity/property-function/style.json new file mode 100644 index 00000000000..bbce8b842d1 --- /dev/null +++ b/metrics/integration/render-tests/icon-opacity/property-function/style.json @@ -0,0 +1,77 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 64, + "width": 64 + } + }, + "center": [ 0, 0 ], + "zoom": 0, + "sprite": "local://sprites/sprite", + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { "x": 35 }, + "geometry": { + "type": "Point", + "coordinates": [ + -5, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { "x": 55 }, + "geometry": { + "type": "Point", + "coordinates": [ + 5, + 0 + ] + } + } + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { "background-color": "white" } + }, + { + "id": "text", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-allow-overlap": true, + "icon-image": "building-12" + }, + "paint": { + "icon-opacity": { + "property": "x", + "base": 1, + "stops": [ + [ + 0, + 0 + ], + [ + 100, + 1 + ] + ] + } + } + } + ] +} diff --git a/metrics/integration/render-tests/icon-opacity/text-and-icon/expected.png b/metrics/integration/render-tests/icon-opacity/text-and-icon/expected.png new file mode 100644 index 00000000000..935f71db776 Binary files /dev/null and b/metrics/integration/render-tests/icon-opacity/text-and-icon/expected.png differ diff --git a/metrics/integration/render-tests/icon-opacity/text-and-icon/style.json b/metrics/integration/render-tests/icon-opacity/text-and-icon/style.json new file mode 100644 index 00000000000..0f6908bba20 --- /dev/null +++ b/metrics/integration/render-tests/icon-opacity/text-and-icon/style.json @@ -0,0 +1,61 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "sprite": "local://sprites/sprite", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "text-and-icon", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "filter": [ + "==", + "maki", + "restaurant" + ], + "layout": { + "symbol-placement": "point", + "icon-allow-overlap": true, + "icon-ignore-placement": true, + "icon-image": "building-12", + "text-allow-overlap": true, + "text-ignore-placement": true, + "text-field": "Test", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + }, + "paint": { + "icon-opacity": 1, + "text-opacity": 1 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/icon-opacity/text-only/expected.png b/metrics/integration/render-tests/icon-opacity/text-only/expected.png new file mode 100644 index 00000000000..147ff7a0de9 Binary files /dev/null and b/metrics/integration/render-tests/icon-opacity/text-only/expected.png differ diff --git a/metrics/integration/render-tests/icon-opacity/text-only/style.json b/metrics/integration/render-tests/icon-opacity/text-only/style.json new file mode 100644 index 00000000000..062e60f1150 --- /dev/null +++ b/metrics/integration/render-tests/icon-opacity/text-only/style.json @@ -0,0 +1,61 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "sprite": "local://sprites/sprite", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "text-only", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "filter": [ + "==", + "maki", + "restaurant" + ], + "layout": { + "symbol-placement": "point", + "icon-allow-overlap": true, + "icon-ignore-placement": true, + "icon-image": "building-12", + "text-allow-overlap": true, + "text-ignore-placement": true, + "text-field": "Test", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + }, + "paint": { + "icon-opacity": 0, + "text-opacity": 1 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/icon-pitch-alignment/auto-rotation-alignment-map/expected.png b/metrics/integration/render-tests/icon-pitch-alignment/auto-rotation-alignment-map/expected.png new file mode 100644 index 00000000000..7ca030bdea3 Binary files /dev/null and b/metrics/integration/render-tests/icon-pitch-alignment/auto-rotation-alignment-map/expected.png differ diff --git a/metrics/integration/render-tests/icon-pitch-alignment/auto-rotation-alignment-map/style.json b/metrics/integration/render-tests/icon-pitch-alignment/auto-rotation-alignment-map/style.json new file mode 100644 index 00000000000..3c626d04311 --- /dev/null +++ b/metrics/integration/render-tests/icon-pitch-alignment/auto-rotation-alignment-map/style.json @@ -0,0 +1,36 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "bearing": 45, + "pitch": 45, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "symbol-placement": "point", + "icon-rotation-alignment": "map", + "icon-image": "oneway" + } + } + ] +} diff --git a/metrics/integration/render-tests/icon-pitch-alignment/auto-rotation-alignment-viewport/expected.png b/metrics/integration/render-tests/icon-pitch-alignment/auto-rotation-alignment-viewport/expected.png new file mode 100644 index 00000000000..c38cf492db0 Binary files /dev/null and b/metrics/integration/render-tests/icon-pitch-alignment/auto-rotation-alignment-viewport/expected.png differ diff --git a/metrics/integration/render-tests/icon-pitch-alignment/auto-rotation-alignment-viewport/style.json b/metrics/integration/render-tests/icon-pitch-alignment/auto-rotation-alignment-viewport/style.json new file mode 100644 index 00000000000..7e2a0c4b04d --- /dev/null +++ b/metrics/integration/render-tests/icon-pitch-alignment/auto-rotation-alignment-viewport/style.json @@ -0,0 +1,35 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "bearing": 45, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "symbol-placement": "point", + "icon-rotation-alignment": "auto", + "icon-image": "oneway" + } + } + ] +} diff --git a/metrics/integration/render-tests/icon-pitch-alignment/map-rotation-alignment-viewport/expected.png b/metrics/integration/render-tests/icon-pitch-alignment/map-rotation-alignment-viewport/expected.png new file mode 100644 index 00000000000..1f2571eac14 Binary files /dev/null and b/metrics/integration/render-tests/icon-pitch-alignment/map-rotation-alignment-viewport/expected.png differ diff --git a/metrics/integration/render-tests/icon-pitch-alignment/map-rotation-alignment-viewport/style.json b/metrics/integration/render-tests/icon-pitch-alignment/map-rotation-alignment-viewport/style.json new file mode 100644 index 00000000000..d6cebadd959 --- /dev/null +++ b/metrics/integration/render-tests/icon-pitch-alignment/map-rotation-alignment-viewport/style.json @@ -0,0 +1,37 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "bearing": 45, + "pitch": 45, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "symbol-placement": "point", + "icon-rotation-alignment": "viewport", + "icon-pitch-alignment": "map", + "icon-image": "oneway" + } + } + ] +} diff --git a/metrics/integration/render-tests/icon-pitch-alignment/viewport-rotation-alignment-map/expected.png b/metrics/integration/render-tests/icon-pitch-alignment/viewport-rotation-alignment-map/expected.png new file mode 100644 index 00000000000..d60c635256b Binary files /dev/null and b/metrics/integration/render-tests/icon-pitch-alignment/viewport-rotation-alignment-map/expected.png differ diff --git a/metrics/integration/render-tests/icon-pitch-alignment/viewport-rotation-alignment-map/style.json b/metrics/integration/render-tests/icon-pitch-alignment/viewport-rotation-alignment-map/style.json new file mode 100644 index 00000000000..239dc412ee2 --- /dev/null +++ b/metrics/integration/render-tests/icon-pitch-alignment/viewport-rotation-alignment-map/style.json @@ -0,0 +1,37 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "bearing": 45, + "pitch": 45, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "symbol-placement": "point", + "icon-rotation-alignment": "map", + "icon-pitch-alignment": "viewport", + "icon-image": "oneway" + } + } + ] +} diff --git a/metrics/integration/render-tests/icon-pitch-scaling/rotation-alignment-map/expected.png b/metrics/integration/render-tests/icon-pitch-scaling/rotation-alignment-map/expected.png new file mode 100644 index 00000000000..c38ed3078bf Binary files /dev/null and b/metrics/integration/render-tests/icon-pitch-scaling/rotation-alignment-map/expected.png differ diff --git a/metrics/integration/render-tests/icon-pitch-scaling/rotation-alignment-map/style.json b/metrics/integration/render-tests/icon-pitch-scaling/rotation-alignment-map/style.json new file mode 100644 index 00000000000..f7105ed65ba --- /dev/null +++ b/metrics/integration/render-tests/icon-pitch-scaling/rotation-alignment-map/style.json @@ -0,0 +1,53 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 512 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "pitch": 30, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "sprite": "local://sprites/sprite", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "icon", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "filter": [ + "==", + "maki", + "restaurant" + ], + "layout": { + "symbol-placement": "point", + "icon-rotation-alignment": "map", + "icon-allow-overlap": true, + "icon-ignore-placement": true, + "icon-image": "building-12" + }, + "paint": {} + } + ] +} diff --git a/metrics/integration/render-tests/icon-pitch-scaling/rotation-alignment-viewport/expected.png b/metrics/integration/render-tests/icon-pitch-scaling/rotation-alignment-viewport/expected.png new file mode 100644 index 00000000000..823e130428d Binary files /dev/null and b/metrics/integration/render-tests/icon-pitch-scaling/rotation-alignment-viewport/expected.png differ diff --git a/metrics/integration/render-tests/icon-pitch-scaling/rotation-alignment-viewport/style.json b/metrics/integration/render-tests/icon-pitch-scaling/rotation-alignment-viewport/style.json new file mode 100644 index 00000000000..6e65c27a44e --- /dev/null +++ b/metrics/integration/render-tests/icon-pitch-scaling/rotation-alignment-viewport/style.json @@ -0,0 +1,52 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 512 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "pitch": 30, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "sprite": "local://sprites/sprite", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "icon", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "filter": [ + "==", + "maki", + "restaurant" + ], + "layout": { + "symbol-placement": "point", + "icon-allow-overlap": true, + "icon-ignore-placement": true, + "icon-image": "building-12" + }, + "paint": {} + } + ] +} diff --git a/metrics/integration/render-tests/icon-pixelratio-mismatch/default/expected.png b/metrics/integration/render-tests/icon-pixelratio-mismatch/default/expected.png new file mode 100644 index 00000000000..6b4b416b67e Binary files /dev/null and b/metrics/integration/render-tests/icon-pixelratio-mismatch/default/expected.png differ diff --git a/metrics/integration/render-tests/icon-pixelratio-mismatch/default/style.json b/metrics/integration/render-tests/icon-pixelratio-mismatch/default/style.json new file mode 100644 index 00000000000..f918c923c17 --- /dev/null +++ b/metrics/integration/render-tests/icon-pixelratio-mismatch/default/style.json @@ -0,0 +1,53 @@ +{ + "version": 8, + "metadata": { + "test": { + "pixelRatio": 0.5, + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "sprite": "local://sprites/emerald", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "icon-default", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "filter": [ + "==", + "maki", + "restaurant" + ], + "layout": { + "symbol-placement": "point", + "icon-allow-overlap": true, + "icon-ignore-placement": true, + "icon-image": "generic_icon" + }, + "paint": { + "icon-opacity": 1 + } + } + ] +} diff --git a/metrics/integration/render-tests/icon-rotate/literal/expected.png b/metrics/integration/render-tests/icon-rotate/literal/expected.png new file mode 100644 index 00000000000..823190282f8 Binary files /dev/null and b/metrics/integration/render-tests/icon-rotate/literal/expected.png differ diff --git a/metrics/integration/render-tests/icon-rotate/literal/style.json b/metrics/integration/render-tests/icon-rotate/literal/style.json new file mode 100644 index 00000000000..14b1cf06214 --- /dev/null +++ b/metrics/integration/render-tests/icon-rotate/literal/style.json @@ -0,0 +1,54 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "symbol-placement": "point", + "icon-image": "oneway", + "icon-rotate": 45 + } + } + ] +} diff --git a/metrics/integration/render-tests/icon-rotate/property-function/expected.png b/metrics/integration/render-tests/icon-rotate/property-function/expected.png new file mode 100644 index 00000000000..9bdc0fb87b9 Binary files /dev/null and b/metrics/integration/render-tests/icon-rotate/property-function/expected.png differ diff --git a/metrics/integration/render-tests/icon-rotate/property-function/style.json b/metrics/integration/render-tests/icon-rotate/property-function/style.json new file mode 100644 index 00000000000..5b22e51760f --- /dev/null +++ b/metrics/integration/render-tests/icon-rotate/property-function/style.json @@ -0,0 +1,61 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "rotate": 45 + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + "rotate": 90 + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "symbol-placement": "point", + "icon-image": "oneway", + "icon-rotate": { + "type": "identity", + "property": "rotate" + } + } + } + ] +} diff --git a/metrics/integration/render-tests/icon-rotate/with-offset/expected.png b/metrics/integration/render-tests/icon-rotate/with-offset/expected.png new file mode 100644 index 00000000000..dd68e281351 Binary files /dev/null and b/metrics/integration/render-tests/icon-rotate/with-offset/expected.png differ diff --git a/metrics/integration/render-tests/icon-rotate/with-offset/style.json b/metrics/integration/render-tests/icon-rotate/with-offset/style.json new file mode 100644 index 00000000000..f1048abf36d --- /dev/null +++ b/metrics/integration/render-tests/icon-rotate/with-offset/style.json @@ -0,0 +1,47 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 128, + "height": 256, + "collisionDebug": true + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "offset", + "type": "symbol", + "source": "geojson", + "layout": { + "symbol-placement": "point", + "icon-image": "oneway", + "icon-rotate": 45, + "icon-offset": [ + 40, + 50 + ], + "icon-allow-overlap": true + } + } + ] +} diff --git a/metrics/integration/render-tests/icon-rotation-alignment/auto-symbol-placement-line/expected.png b/metrics/integration/render-tests/icon-rotation-alignment/auto-symbol-placement-line/expected.png new file mode 100644 index 00000000000..efcc9e12cd9 Binary files /dev/null and b/metrics/integration/render-tests/icon-rotation-alignment/auto-symbol-placement-line/expected.png differ diff --git a/metrics/integration/render-tests/icon-rotation-alignment/auto-symbol-placement-line/style.json b/metrics/integration/render-tests/icon-rotation-alignment/auto-symbol-placement-line/style.json new file mode 100644 index 00000000000..07e4c34b645 --- /dev/null +++ b/metrics/integration/render-tests/icon-rotation-alignment/auto-symbol-placement-line/style.json @@ -0,0 +1,41 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "bearing": 45, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "LineString", + "coordinates": [ + [ + -20, + 0 + ], + [ + 20, + 0 + ] + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "symbol-placement": "line", + "icon-rotation-alignment": "auto", + "icon-image": "oneway" + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/icon-rotation-alignment/auto-symbol-placement-point/expected.png b/metrics/integration/render-tests/icon-rotation-alignment/auto-symbol-placement-point/expected.png new file mode 100644 index 00000000000..c38cf492db0 Binary files /dev/null and b/metrics/integration/render-tests/icon-rotation-alignment/auto-symbol-placement-point/expected.png differ diff --git a/metrics/integration/render-tests/icon-rotation-alignment/auto-symbol-placement-point/style.json b/metrics/integration/render-tests/icon-rotation-alignment/auto-symbol-placement-point/style.json new file mode 100644 index 00000000000..e288eaf10ac --- /dev/null +++ b/metrics/integration/render-tests/icon-rotation-alignment/auto-symbol-placement-point/style.json @@ -0,0 +1,35 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "bearing": 45, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "symbol-placement": "point", + "icon-rotation-alignment": "auto", + "icon-image": "oneway" + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/icon-rotation-alignment/map-symbol-placement-line/expected.png b/metrics/integration/render-tests/icon-rotation-alignment/map-symbol-placement-line/expected.png new file mode 100644 index 00000000000..efcc9e12cd9 Binary files /dev/null and b/metrics/integration/render-tests/icon-rotation-alignment/map-symbol-placement-line/expected.png differ diff --git a/metrics/integration/render-tests/icon-rotation-alignment/map-symbol-placement-line/style.json b/metrics/integration/render-tests/icon-rotation-alignment/map-symbol-placement-line/style.json new file mode 100644 index 00000000000..1943dbb22b5 --- /dev/null +++ b/metrics/integration/render-tests/icon-rotation-alignment/map-symbol-placement-line/style.json @@ -0,0 +1,41 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "bearing": 45, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "LineString", + "coordinates": [ + [ + -20, + 0 + ], + [ + 20, + 0 + ] + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "symbol-placement": "line", + "icon-rotation-alignment": "map", + "icon-image": "oneway" + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/icon-rotation-alignment/map-symbol-placement-point/expected.png b/metrics/integration/render-tests/icon-rotation-alignment/map-symbol-placement-point/expected.png new file mode 100644 index 00000000000..d411883ab36 Binary files /dev/null and b/metrics/integration/render-tests/icon-rotation-alignment/map-symbol-placement-point/expected.png differ diff --git a/metrics/integration/render-tests/icon-rotation-alignment/map-symbol-placement-point/style.json b/metrics/integration/render-tests/icon-rotation-alignment/map-symbol-placement-point/style.json new file mode 100644 index 00000000000..6c41bc510cf --- /dev/null +++ b/metrics/integration/render-tests/icon-rotation-alignment/map-symbol-placement-point/style.json @@ -0,0 +1,35 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "bearing": 45, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "symbol-placement": "point", + "icon-rotation-alignment": "map", + "icon-image": "oneway" + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/icon-rotation-alignment/viewport-symbol-placement-line/expected.png b/metrics/integration/render-tests/icon-rotation-alignment/viewport-symbol-placement-line/expected.png new file mode 100644 index 00000000000..aef397321f9 Binary files /dev/null and b/metrics/integration/render-tests/icon-rotation-alignment/viewport-symbol-placement-line/expected.png differ diff --git a/metrics/integration/render-tests/icon-rotation-alignment/viewport-symbol-placement-line/style.json b/metrics/integration/render-tests/icon-rotation-alignment/viewport-symbol-placement-line/style.json new file mode 100644 index 00000000000..4ff75482137 --- /dev/null +++ b/metrics/integration/render-tests/icon-rotation-alignment/viewport-symbol-placement-line/style.json @@ -0,0 +1,41 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "bearing": 45, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "LineString", + "coordinates": [ + [ + -20, + 0 + ], + [ + 20, + 0 + ] + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "symbol-placement": "line", + "icon-rotation-alignment": "viewport", + "icon-image": "oneway" + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/icon-rotation-alignment/viewport-symbol-placement-point/expected.png b/metrics/integration/render-tests/icon-rotation-alignment/viewport-symbol-placement-point/expected.png new file mode 100644 index 00000000000..c38cf492db0 Binary files /dev/null and b/metrics/integration/render-tests/icon-rotation-alignment/viewport-symbol-placement-point/expected.png differ diff --git a/metrics/integration/render-tests/icon-rotation-alignment/viewport-symbol-placement-point/style.json b/metrics/integration/render-tests/icon-rotation-alignment/viewport-symbol-placement-point/style.json new file mode 100644 index 00000000000..3567ca88d81 --- /dev/null +++ b/metrics/integration/render-tests/icon-rotation-alignment/viewport-symbol-placement-point/style.json @@ -0,0 +1,35 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "bearing": 45, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "symbol-placement": "point", + "icon-rotation-alignment": "viewport", + "icon-image": "oneway" + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/icon-size/camera-function-high-base-plain/expected.png b/metrics/integration/render-tests/icon-size/camera-function-high-base-plain/expected.png new file mode 100644 index 00000000000..d5c38ebf814 Binary files /dev/null and b/metrics/integration/render-tests/icon-size/camera-function-high-base-plain/expected.png differ diff --git a/metrics/integration/render-tests/icon-size/camera-function-high-base-plain/style.json b/metrics/integration/render-tests/icon-size/camera-function-high-base-plain/style.json new file mode 100644 index 00000000000..c061277af1b --- /dev/null +++ b/metrics/integration/render-tests/icon-size/camera-function-high-base-plain/style.json @@ -0,0 +1,50 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "zoom": 0.5, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + } + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-size": { + "base": 99, + "stops": [ + [ 0, 0.5 ], + [ 1, 1.5 ] + ] + }, + "icon-image": "restaurant-12" + }, + "paint": { + "icon-color": "red" + } + } + ] +} diff --git a/metrics/integration/render-tests/icon-size/camera-function-high-base-sdf/expected.png b/metrics/integration/render-tests/icon-size/camera-function-high-base-sdf/expected.png new file mode 100644 index 00000000000..940ef796353 Binary files /dev/null and b/metrics/integration/render-tests/icon-size/camera-function-high-base-sdf/expected.png differ diff --git a/metrics/integration/render-tests/icon-size/camera-function-high-base-sdf/style.json b/metrics/integration/render-tests/icon-size/camera-function-high-base-sdf/style.json new file mode 100644 index 00000000000..77251b00541 --- /dev/null +++ b/metrics/integration/render-tests/icon-size/camera-function-high-base-sdf/style.json @@ -0,0 +1,50 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "zoom": 0.5, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + } + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-size": { + "base": 99, + "stops": [ + [ 0, 1 ], + [ 1, 2 ] + ] + }, + "icon-image": "dot.sdf" + }, + "paint": { + "icon-color": "red" + } + } + ] +} diff --git a/metrics/integration/render-tests/icon-size/camera-function-plain/expected.png b/metrics/integration/render-tests/icon-size/camera-function-plain/expected.png new file mode 100644 index 00000000000..1217255510c Binary files /dev/null and b/metrics/integration/render-tests/icon-size/camera-function-plain/expected.png differ diff --git a/metrics/integration/render-tests/icon-size/camera-function-plain/style.json b/metrics/integration/render-tests/icon-size/camera-function-plain/style.json new file mode 100644 index 00000000000..3d694c79630 --- /dev/null +++ b/metrics/integration/render-tests/icon-size/camera-function-plain/style.json @@ -0,0 +1,49 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "zoom": 0.5, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + } + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-size": { + "stops": [ + [ 0, 0.5 ], + [ 1, 1.5 ] + ] + }, + "icon-image": "restaurant-12" + }, + "paint": { + "icon-color": "red" + } + } + ] +} diff --git a/metrics/integration/render-tests/icon-size/camera-function-sdf/expected.png b/metrics/integration/render-tests/icon-size/camera-function-sdf/expected.png new file mode 100644 index 00000000000..9ca548ceefb Binary files /dev/null and b/metrics/integration/render-tests/icon-size/camera-function-sdf/expected.png differ diff --git a/metrics/integration/render-tests/icon-size/camera-function-sdf/style.json b/metrics/integration/render-tests/icon-size/camera-function-sdf/style.json new file mode 100644 index 00000000000..10ebd43a4d6 --- /dev/null +++ b/metrics/integration/render-tests/icon-size/camera-function-sdf/style.json @@ -0,0 +1,49 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "zoom": 0.5, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { "x": 0 }, + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + } + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-size": { + "stops": [ + [ 0, 1 ], + [ 1, 2 ] + ] + }, + "icon-image": "dot.sdf" + }, + "paint": { + "icon-color": "red" + } + } + ] +} diff --git a/metrics/integration/render-tests/icon-size/composite-function-plain/expected.png b/metrics/integration/render-tests/icon-size/composite-function-plain/expected.png new file mode 100644 index 00000000000..1217255510c Binary files /dev/null and b/metrics/integration/render-tests/icon-size/composite-function-plain/expected.png differ diff --git a/metrics/integration/render-tests/icon-size/composite-function-plain/style.json b/metrics/integration/render-tests/icon-size/composite-function-plain/style.json new file mode 100644 index 00000000000..2337fba7402 --- /dev/null +++ b/metrics/integration/render-tests/icon-size/composite-function-plain/style.json @@ -0,0 +1,50 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "zoom": 0.5, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": {"x": 0}, + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + } + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-size": { + "property": "x", + "stops": [ + [ {"zoom": 0, "value": 0}, 0.5 ], + [ {"zoom": 1, "value": 0}, 1.5 ] + ] + }, + "icon-image": "restaurant-12" + }, + "paint": { + "icon-color": "red" + } + } + ] +} diff --git a/metrics/integration/render-tests/icon-size/composite-function-sdf/expected.png b/metrics/integration/render-tests/icon-size/composite-function-sdf/expected.png new file mode 100644 index 00000000000..9ca548ceefb Binary files /dev/null and b/metrics/integration/render-tests/icon-size/composite-function-sdf/expected.png differ diff --git a/metrics/integration/render-tests/icon-size/composite-function-sdf/style.json b/metrics/integration/render-tests/icon-size/composite-function-sdf/style.json new file mode 100644 index 00000000000..f0dd8d3dced --- /dev/null +++ b/metrics/integration/render-tests/icon-size/composite-function-sdf/style.json @@ -0,0 +1,50 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "zoom": 0.5, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { "x": 0 }, + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + } + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-size": { + "property": "x", + "stops": [ + [ {"zoom": 0, "value": 0}, 1 ], + [ {"zoom": 1, "value": 0}, 2 ] + ] + }, + "icon-image": "dot.sdf" + }, + "paint": { + "icon-color": "red" + } + } + ] +} diff --git a/metrics/integration/render-tests/icon-size/default/expected.png b/metrics/integration/render-tests/icon-size/default/expected.png new file mode 100644 index 00000000000..6360625fe39 Binary files /dev/null and b/metrics/integration/render-tests/icon-size/default/expected.png differ diff --git a/metrics/integration/render-tests/icon-size/default/style.json b/metrics/integration/render-tests/icon-size/default/style.json new file mode 100644 index 00000000000..80070cc9391 --- /dev/null +++ b/metrics/integration/render-tests/icon-size/default/style.json @@ -0,0 +1,32 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "sprite": "local://sprites/emerald", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "generic_icon" + } + } + ] +} diff --git a/metrics/integration/render-tests/icon-size/function/expected.png b/metrics/integration/render-tests/icon-size/function/expected.png new file mode 100644 index 00000000000..a946d3c74ce Binary files /dev/null and b/metrics/integration/render-tests/icon-size/function/expected.png differ diff --git a/metrics/integration/render-tests/icon-size/function/style.json b/metrics/integration/render-tests/icon-size/function/style.json new file mode 100644 index 00000000000..b87cae8ee93 --- /dev/null +++ b/metrics/integration/render-tests/icon-size/function/style.json @@ -0,0 +1,45 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "zoom": 0.5, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "sprite": "local://sprites/emerald", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "generic_icon", + "icon-size": { + "stops": [ + [ + 0, + 1 + ], + [ + 1, + 2 + ] + ] + } + } + } + ] +} diff --git a/metrics/integration/render-tests/icon-size/literal/expected.png b/metrics/integration/render-tests/icon-size/literal/expected.png new file mode 100644 index 00000000000..a2f239f85ed Binary files /dev/null and b/metrics/integration/render-tests/icon-size/literal/expected.png differ diff --git a/metrics/integration/render-tests/icon-size/literal/style.json b/metrics/integration/render-tests/icon-size/literal/style.json new file mode 100644 index 00000000000..31a42a59e2e --- /dev/null +++ b/metrics/integration/render-tests/icon-size/literal/style.json @@ -0,0 +1,33 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "sprite": "local://sprites/emerald", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "generic_icon", + "icon-size": 2 + } + } + ] +} diff --git a/metrics/integration/render-tests/icon-size/property-function-plain/expected.png b/metrics/integration/render-tests/icon-size/property-function-plain/expected.png new file mode 100644 index 00000000000..f16405077bd Binary files /dev/null and b/metrics/integration/render-tests/icon-size/property-function-plain/expected.png differ diff --git a/metrics/integration/render-tests/icon-size/property-function-plain/style.json b/metrics/integration/render-tests/icon-size/property-function-plain/style.json new file mode 100644 index 00000000000..1dafa6d26e8 --- /dev/null +++ b/metrics/integration/render-tests/icon-size/property-function-plain/style.json @@ -0,0 +1,66 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { "x": 0 }, + "geometry": { + "type": "Point", + "coordinates": [ -10, 0 ] + } + }, + { + "type": "Feature", + "properties": { "x": 5 }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-size": { + "property": "x", + "stops": [ + [ + 0, + 0.5 + ], + [ + 10, + 1.5 + ] + ] + }, + "icon-image": "restaurant-12" + }, + "paint": { + "icon-color": "red" + } + } + ] +} diff --git a/metrics/integration/render-tests/icon-size/property-function-sdf/expected.png b/metrics/integration/render-tests/icon-size/property-function-sdf/expected.png new file mode 100644 index 00000000000..8f2aa4f7aea Binary files /dev/null and b/metrics/integration/render-tests/icon-size/property-function-sdf/expected.png differ diff --git a/metrics/integration/render-tests/icon-size/property-function-sdf/style.json b/metrics/integration/render-tests/icon-size/property-function-sdf/style.json new file mode 100644 index 00000000000..04565292d6d --- /dev/null +++ b/metrics/integration/render-tests/icon-size/property-function-sdf/style.json @@ -0,0 +1,66 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { "x": 0 }, + "geometry": { + "type": "Point", + "coordinates": [ -10, 0 ] + } + }, + { + "type": "Feature", + "properties": { "x": 5 }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-size": { + "property": "x", + "stops": [ + [ + 0, + 1 + ], + [ + 10, + 2 + ] + ] + }, + "icon-image": "dot.sdf" + }, + "paint": { + "icon-color": "red" + } + } + ] +} diff --git a/metrics/integration/render-tests/icon-text-fit/both-collision-variable-anchor-text-fit/expected.png b/metrics/integration/render-tests/icon-text-fit/both-collision-variable-anchor-text-fit/expected.png new file mode 100644 index 00000000000..1e46bda35fe Binary files /dev/null and b/metrics/integration/render-tests/icon-text-fit/both-collision-variable-anchor-text-fit/expected.png differ diff --git a/metrics/integration/render-tests/icon-text-fit/both-collision-variable-anchor-text-fit/style.json b/metrics/integration/render-tests/icon-text-fit/both-collision-variable-anchor-text-fit/style.json new file mode 100644 index 00000000000..df1eb8aa177 --- /dev/null +++ b/metrics/integration/render-tests/icon-text-fit/both-collision-variable-anchor-text-fit/style.json @@ -0,0 +1,73 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "allowed": 0.00025 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ 0, -8 ] + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ 0, -8 ] + } + } + ] + } + } + }, + "sprite": "local://sprites/sprite", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "text-field": "ABC", + "text-anchor": "top", + "text-offset": [0, 0.5], + "text-variable-anchor": ["left", "right"], + "text-radial-offset": 0.3, + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "icon-image": "motorway_lg_6", + "icon-text-fit": "both", + "icon-text-fit-padding": [0, 4, 0, 4] + } + }, + { + "id": "symbol_with_offset", + "type": "symbol", + "source": "geojson", + "layout": { + "text-field": "ABC", + "text-offset": [0, -1.5], + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "icon-image": "motorway_lg_6", + "icon-text-fit": "both", + "icon-text-fit-padding": [0, 4, 0, 4] + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/icon-text-fit/both-collision-variable-anchor/expected.png b/metrics/integration/render-tests/icon-text-fit/both-collision-variable-anchor/expected.png new file mode 100644 index 00000000000..08b51c9337f Binary files /dev/null and b/metrics/integration/render-tests/icon-text-fit/both-collision-variable-anchor/expected.png differ diff --git a/metrics/integration/render-tests/icon-text-fit/both-collision-variable-anchor/style.json b/metrics/integration/render-tests/icon-text-fit/both-collision-variable-anchor/style.json new file mode 100644 index 00000000000..c1f2213864a --- /dev/null +++ b/metrics/integration/render-tests/icon-text-fit/both-collision-variable-anchor/style.json @@ -0,0 +1,70 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "allowed": 0.00025 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ 0, -8 ] + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ 0, -8 ] + } + } + ] + } + } + }, + "sprite": "local://sprites/sprite", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "text-field": "ABC", + "text-anchor": "top", + "text-offset": [0, 0.5], + "text-variable-anchor": ["left", "right"], + "text-radial-offset": 0.1, + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + } + }, + { + "id": "symbol_with_offset", + "type": "symbol", + "source": "geojson", + "layout": { + "text-field": "ABC", + "text-offset": [0, -1.5], + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "icon-image": "motorway_lg_6", + "icon-text-fit": "both", + "icon-text-fit-padding": [0, 4, 0, 4] + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/icon-text-fit/both-collision/expected.png b/metrics/integration/render-tests/icon-text-fit/both-collision/expected.png new file mode 100644 index 00000000000..5c069e64a82 Binary files /dev/null and b/metrics/integration/render-tests/icon-text-fit/both-collision/expected.png differ diff --git a/metrics/integration/render-tests/icon-text-fit/both-collision/style.json b/metrics/integration/render-tests/icon-text-fit/both-collision/style.json new file mode 100644 index 00000000000..7296ab56940 --- /dev/null +++ b/metrics/integration/render-tests/icon-text-fit/both-collision/style.json @@ -0,0 +1,56 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + -4 + ] + } + } + }, + "sprite": "local://sprites/sprite", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "text-field": "ABC", + "text-anchor": "top", + "text-offset": [0, 0.5], + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "icon-image": "motorway_lg_6" + } + }, + { + "id": "symbol_with_offset", + "type": "symbol", + "source": "geojson", + "layout": { + "text-field": "ABC", + "text-offset": [0, -1.5], + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "icon-image": "motorway_lg_6", + "icon-text-fit": "both", + "icon-text-fit-padding": [0, 4, 0, 4] + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/icon-text-fit/both-padding/expected.png b/metrics/integration/render-tests/icon-text-fit/both-padding/expected.png new file mode 100644 index 00000000000..fb545001ce7 Binary files /dev/null and b/metrics/integration/render-tests/icon-text-fit/both-padding/expected.png differ diff --git a/metrics/integration/render-tests/icon-text-fit/both-padding/style.json b/metrics/integration/render-tests/icon-text-fit/both-padding/style.json new file mode 100644 index 00000000000..274141e97bf --- /dev/null +++ b/metrics/integration/render-tests/icon-text-fit/both-padding/style.json @@ -0,0 +1,45 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "sprite": "local://sprites/icon-text-fit", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "text-field": "ABC", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "icon-image": "label", + "icon-text-fit": "both", + "icon-text-fit-padding": [ + 5, + 10, + 5, + 10 + ] + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/icon-text-fit/both-text-anchor-1x-image-2x-screen/expected.png b/metrics/integration/render-tests/icon-text-fit/both-text-anchor-1x-image-2x-screen/expected.png new file mode 100644 index 00000000000..69a22d5e171 Binary files /dev/null and b/metrics/integration/render-tests/icon-text-fit/both-text-anchor-1x-image-2x-screen/expected.png differ diff --git a/metrics/integration/render-tests/icon-text-fit/both-text-anchor-1x-image-2x-screen/style.json b/metrics/integration/render-tests/icon-text-fit/both-text-anchor-1x-image-2x-screen/style.json new file mode 100644 index 00000000000..087a99dd604 --- /dev/null +++ b/metrics/integration/render-tests/icon-text-fit/both-text-anchor-1x-image-2x-screen/style.json @@ -0,0 +1,193 @@ +{ + "version": 8, + "metadata": { + "test": { + "pixelRatio": 2, + "width": 200, + "height": 150 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": "local://geojson/anchors.json" + } + }, + "sprite": "local://sprites/icon-text-fit-1x", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "anchor-center", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "center"], + "layout": { + "text-field": "Ügt", + "text-size": 20, + "text-anchor": "center", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "small-box", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-left", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "left"], + "layout": { + "text-field": "Ügt", + "text-size": 20, + "text-anchor": "left", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "small-box", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-top-left", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "top-left"], + "layout": { + "text-field": "Ügt", + "text-size": 20, + "text-anchor": "top-left", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "small-box", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-top", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "top"], + "layout": { + "text-field": "Ügt", + "text-size": 20, + "text-anchor": "top", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "small-box", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-top-right", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "top-right"], + "layout": { + "text-field": "Ügt", + "text-size": 20, + "text-anchor": "top-right", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "small-box", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-right", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "right"], + "layout": { + "text-field": "Ügt", + "text-size": 20, + "text-anchor": "right", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "small-box", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-bottom-left", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "bottom-left"], + "layout": { + "text-field": "Ügt", + "text-size": 20, + "text-anchor": "bottom-left", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "small-box", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-bottom", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "bottom"], + "layout": { + "text-field": "Ügt", + "text-size": 20, + "text-anchor": "bottom", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "small-box", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-bottom-right", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "bottom-right"], + "layout": { + "text-field": "Ügt", + "text-size": 20, + "text-anchor": "bottom-right", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "small-box", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchors", + "type": "circle", + "source": "geojson", + "paint": { + "circle-radius": 2, + "circle-color": "green", + "circle-stroke-color": "white", + "circle-stroke-width": 1 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/icon-text-fit/both-text-anchor-2x-image-1x-screen/expected.png b/metrics/integration/render-tests/icon-text-fit/both-text-anchor-2x-image-1x-screen/expected.png new file mode 100644 index 00000000000..6b27859c39e Binary files /dev/null and b/metrics/integration/render-tests/icon-text-fit/both-text-anchor-2x-image-1x-screen/expected.png differ diff --git a/metrics/integration/render-tests/icon-text-fit/both-text-anchor-2x-image-1x-screen/style.json b/metrics/integration/render-tests/icon-text-fit/both-text-anchor-2x-image-1x-screen/style.json new file mode 100644 index 00000000000..d21af0963b4 --- /dev/null +++ b/metrics/integration/render-tests/icon-text-fit/both-text-anchor-2x-image-1x-screen/style.json @@ -0,0 +1,192 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 200, + "height": 150 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": "local://geojson/anchors.json" + } + }, + "sprite": "local://sprites/icon-text-fit-2x", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "anchor-center", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "center"], + "layout": { + "text-field": "Ügt", + "text-size": 20, + "text-anchor": "center", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "small-box", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-left", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "left"], + "layout": { + "text-field": "Ügt", + "text-size": 20, + "text-anchor": "left", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "small-box", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-top-left", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "top-left"], + "layout": { + "text-field": "Ügt", + "text-size": 20, + "text-anchor": "top-left", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "small-box", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-top", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "top"], + "layout": { + "text-field": "Ügt", + "text-size": 20, + "text-anchor": "top", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "small-box", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-top-right", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "top-right"], + "layout": { + "text-field": "Ügt", + "text-size": 20, + "text-anchor": "top-right", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "small-box", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-right", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "right"], + "layout": { + "text-field": "Ügt", + "text-size": 20, + "text-anchor": "right", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "small-box", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-bottom-left", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "bottom-left"], + "layout": { + "text-field": "Ügt", + "text-size": 20, + "text-anchor": "bottom-left", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "small-box", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-bottom", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "bottom"], + "layout": { + "text-field": "Ügt", + "text-size": 20, + "text-anchor": "bottom", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "small-box", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-bottom-right", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "bottom-right"], + "layout": { + "text-field": "Ügt", + "text-size": 20, + "text-anchor": "bottom-right", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "small-box", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchors", + "type": "circle", + "source": "geojson", + "paint": { + "circle-radius": 2, + "circle-color": "green", + "circle-stroke-color": "white", + "circle-stroke-width": 1 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/icon-text-fit/both-text-anchor-2x-image-2x-screen/expected.png b/metrics/integration/render-tests/icon-text-fit/both-text-anchor-2x-image-2x-screen/expected.png new file mode 100644 index 00000000000..585b0d15857 Binary files /dev/null and b/metrics/integration/render-tests/icon-text-fit/both-text-anchor-2x-image-2x-screen/expected.png differ diff --git a/metrics/integration/render-tests/icon-text-fit/both-text-anchor-2x-image-2x-screen/style.json b/metrics/integration/render-tests/icon-text-fit/both-text-anchor-2x-image-2x-screen/style.json new file mode 100644 index 00000000000..1e75952eb13 --- /dev/null +++ b/metrics/integration/render-tests/icon-text-fit/both-text-anchor-2x-image-2x-screen/style.json @@ -0,0 +1,194 @@ +{ + "version": 8, + "metadata": { + "test": { + "pixelRatio": 2, + "width": 200, + "height": 150, + "allowed": 0.001 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": "local://geojson/anchors.json" + } + }, + "sprite": "local://sprites/icon-text-fit", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "anchor-center", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "center"], + "layout": { + "text-field": "Ügt", + "text-size": 20, + "text-anchor": "center", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "small-box", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-left", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "left"], + "layout": { + "text-field": "Ügt", + "text-size": 20, + "text-anchor": "left", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "small-box", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-top-left", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "top-left"], + "layout": { + "text-field": "Ügt", + "text-size": 20, + "text-anchor": "top-left", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "small-box", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-top", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "top"], + "layout": { + "text-field": "Ügt", + "text-size": 20, + "text-anchor": "top", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "small-box", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-top-right", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "top-right"], + "layout": { + "text-field": "Ügt", + "text-size": 20, + "text-anchor": "top-right", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "small-box", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-right", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "right"], + "layout": { + "text-field": "Ügt", + "text-size": 20, + "text-anchor": "right", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "small-box", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-bottom-left", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "bottom-left"], + "layout": { + "text-field": "Ügt", + "text-size": 20, + "text-anchor": "bottom-left", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "small-box", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-bottom", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "bottom"], + "layout": { + "text-field": "Ügt", + "text-size": 20, + "text-anchor": "bottom", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "small-box", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-bottom-right", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "bottom-right"], + "layout": { + "text-field": "Ügt", + "text-size": 20, + "text-anchor": "bottom-right", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "small-box", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchors", + "type": "circle", + "source": "geojson", + "paint": { + "circle-radius": 2, + "circle-color": "green", + "circle-stroke-color": "white", + "circle-stroke-width": 1 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/icon-text-fit/both-text-anchor-icon-anchor/expected.png b/metrics/integration/render-tests/icon-text-fit/both-text-anchor-icon-anchor/expected.png new file mode 100644 index 00000000000..95ca30121e0 Binary files /dev/null and b/metrics/integration/render-tests/icon-text-fit/both-text-anchor-icon-anchor/expected.png differ diff --git a/metrics/integration/render-tests/icon-text-fit/both-text-anchor-icon-anchor/style.json b/metrics/integration/render-tests/icon-text-fit/both-text-anchor-icon-anchor/style.json new file mode 100644 index 00000000000..354b691aa72 --- /dev/null +++ b/metrics/integration/render-tests/icon-text-fit/both-text-anchor-icon-anchor/style.json @@ -0,0 +1,201 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 200, + "height": 150 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": "local://geojson/anchors.json" + } + }, + "sprite": "local://sprites/icon-text-fit", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "anchor-center", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "center"], + "layout": { + "text-field": "Ügt", + "text-size": 20, + "text-anchor": "center", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "small-box", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true, + "icon-anchor": "top-left" + } + }, + { + "id": "anchor-left", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "left"], + "layout": { + "text-field": "Ügt", + "text-size": 20, + "text-anchor": "left", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "small-box", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true, + "icon-anchor": "top-left" + } + }, + { + "id": "anchor-top-left", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "top-left"], + "layout": { + "text-field": "Ügt", + "text-size": 20, + "text-anchor": "top-left", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "small-box", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true, + "icon-anchor": "top-left" + } + }, + { + "id": "anchor-top", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "top"], + "layout": { + "text-field": "Ügt", + "text-size": 20, + "text-anchor": "top", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "small-box", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true, + "icon-anchor": "top-left" + } + }, + { + "id": "anchor-top-right", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "top-right"], + "layout": { + "text-field": "Ügt", + "text-size": 20, + "text-anchor": "top-right", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "small-box", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true, + "icon-anchor": "top-left" + } + }, + { + "id": "anchor-right", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "right"], + "layout": { + "text-field": "Ügt", + "text-size": 20, + "text-anchor": "right", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "small-box", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true, + "icon-anchor": "top-left" + } + }, + { + "id": "anchor-bottom-left", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "bottom-left"], + "layout": { + "text-field": "Ügt", + "text-size": 20, + "text-anchor": "bottom-left", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "small-box", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true, + "icon-anchor": "top-left" + } + }, + { + "id": "anchor-bottom", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "bottom"], + "layout": { + "text-field": "Ügt", + "text-size": 20, + "text-anchor": "bottom", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "small-box", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true, + "icon-anchor": "top-left" + } + }, + { + "id": "anchor-bottom-right", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "bottom-right"], + "layout": { + "text-field": "Ügt", + "text-size": 20, + "text-anchor": "bottom-right", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "small-box", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true, + "icon-anchor": "top-left" + } + }, + { + "id": "anchors", + "type": "circle", + "source": "geojson", + "paint": { + "circle-radius": 2, + "circle-color": "green", + "circle-stroke-color": "white", + "circle-stroke-width": 1 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/icon-text-fit/both-text-anchor-icon-offset/expected.png b/metrics/integration/render-tests/icon-text-fit/both-text-anchor-icon-offset/expected.png new file mode 100644 index 00000000000..6f2af350db5 Binary files /dev/null and b/metrics/integration/render-tests/icon-text-fit/both-text-anchor-icon-offset/expected.png differ diff --git a/metrics/integration/render-tests/icon-text-fit/both-text-anchor-icon-offset/style.json b/metrics/integration/render-tests/icon-text-fit/both-text-anchor-icon-offset/style.json new file mode 100644 index 00000000000..9218b731040 --- /dev/null +++ b/metrics/integration/render-tests/icon-text-fit/both-text-anchor-icon-offset/style.json @@ -0,0 +1,201 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 200, + "height": 150 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": "local://geojson/anchors.json" + } + }, + "sprite": "local://sprites/icon-text-fit", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "anchor-center", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "center"], + "layout": { + "text-field": "Ügt", + "text-size": 20, + "text-anchor": "center", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "small-box", + "icon-text-fit": "both", + "icon-offset": [ 4, 8 ], + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-left", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "left"], + "layout": { + "text-field": "Ügt", + "text-size": 20, + "text-anchor": "left", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "small-box", + "icon-text-fit": "both", + "icon-offset": [ 4, 8 ], + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-top-left", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "top-left"], + "layout": { + "text-field": "Ügt", + "text-size": 20, + "text-anchor": "top-left", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "small-box", + "icon-text-fit": "both", + "icon-offset": [ 4, 8 ], + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-top", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "top"], + "layout": { + "text-field": "Ügt", + "text-size": 20, + "text-anchor": "top", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "small-box", + "icon-text-fit": "both", + "icon-offset": [ 4, 8 ], + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-top-right", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "top-right"], + "layout": { + "text-field": "Ügt", + "text-size": 20, + "text-anchor": "top-right", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "small-box", + "icon-text-fit": "both", + "icon-offset": [ 4, 8 ], + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-right", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "right"], + "layout": { + "text-field": "Ügt", + "text-size": 20, + "text-anchor": "right", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "small-box", + "icon-text-fit": "both", + "icon-offset": [ 4, 8 ], + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-bottom-left", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "bottom-left"], + "layout": { + "text-field": "Ügt", + "text-size": 20, + "text-anchor": "bottom-left", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "small-box", + "icon-text-fit": "both", + "icon-offset": [ 4, 8 ], + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-bottom", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "bottom"], + "layout": { + "text-field": "Ügt", + "text-size": 20, + "text-anchor": "bottom", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "small-box", + "icon-text-fit": "both", + "icon-offset": [ 4, 8 ], + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-bottom-right", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "bottom-right"], + "layout": { + "text-field": "Ügt", + "text-size": 20, + "text-anchor": "bottom-right", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "small-box", + "icon-text-fit": "both", + "icon-offset": [ 4, 8 ], + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchors", + "type": "circle", + "source": "geojson", + "paint": { + "circle-radius": 2, + "circle-color": "green", + "circle-stroke-color": "white", + "circle-stroke-width": 1 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/icon-text-fit/both-text-anchor-padding/expected.png b/metrics/integration/render-tests/icon-text-fit/both-text-anchor-padding/expected.png new file mode 100644 index 00000000000..ed953be8afb Binary files /dev/null and b/metrics/integration/render-tests/icon-text-fit/both-text-anchor-padding/expected.png differ diff --git a/metrics/integration/render-tests/icon-text-fit/both-text-anchor-padding/style.json b/metrics/integration/render-tests/icon-text-fit/both-text-anchor-padding/style.json new file mode 100644 index 00000000000..3be058e38f8 --- /dev/null +++ b/metrics/integration/render-tests/icon-text-fit/both-text-anchor-padding/style.json @@ -0,0 +1,201 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 200, + "height": 150 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": "local://geojson/anchors.json" + } + }, + "sprite": "local://sprites/icon-text-fit", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "anchor-center", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "center"], + "layout": { + "text-field": "Ügt", + "text-size": 20, + "text-anchor": "center", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "small-box", + "icon-text-fit": "both", + "icon-text-fit-padding": [ 2, 4, 6, 8 ], + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-left", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "left"], + "layout": { + "text-field": "Ügt", + "text-size": 20, + "text-anchor": "left", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "small-box", + "icon-text-fit": "both", + "icon-text-fit-padding": [ 2, 4, 6, 8 ], + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-top-left", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "top-left"], + "layout": { + "text-field": "Ügt", + "text-size": 20, + "text-anchor": "top-left", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "small-box", + "icon-text-fit": "both", + "icon-text-fit-padding": [ 2, 4, 6, 8 ], + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-top", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "top"], + "layout": { + "text-field": "Ügt", + "text-size": 20, + "text-anchor": "top", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "small-box", + "icon-text-fit": "both", + "icon-text-fit-padding": [ 2, 4, 6, 8 ], + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-top-right", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "top-right"], + "layout": { + "text-field": "Ügt", + "text-size": 20, + "text-anchor": "top-right", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "small-box", + "icon-text-fit": "both", + "icon-text-fit-padding": [ 2, 4, 6, 8 ], + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-right", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "right"], + "layout": { + "text-field": "Ügt", + "text-size": 20, + "text-anchor": "right", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "small-box", + "icon-text-fit": "both", + "icon-text-fit-padding": [ 2, 4, 6, 8 ], + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-bottom-left", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "bottom-left"], + "layout": { + "text-field": "Ügt", + "text-size": 20, + "text-anchor": "bottom-left", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "small-box", + "icon-text-fit": "both", + "icon-text-fit-padding": [ 2, 4, 6, 8 ], + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-bottom", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "bottom"], + "layout": { + "text-field": "Ügt", + "text-size": 20, + "text-anchor": "bottom", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "small-box", + "icon-text-fit": "both", + "icon-text-fit-padding": [ 2, 4, 6, 8 ], + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-bottom-right", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "bottom-right"], + "layout": { + "text-field": "Ügt", + "text-size": 20, + "text-anchor": "bottom-right", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "small-box", + "icon-text-fit": "both", + "icon-text-fit-padding": [ 2, 4, 6, 8 ], + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchors", + "type": "circle", + "source": "geojson", + "paint": { + "circle-radius": 2, + "circle-color": "green", + "circle-stroke-color": "white", + "circle-stroke-width": 1 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/icon-text-fit/both-text-anchor/expected.png b/metrics/integration/render-tests/icon-text-fit/both-text-anchor/expected.png new file mode 100644 index 00000000000..95ca30121e0 Binary files /dev/null and b/metrics/integration/render-tests/icon-text-fit/both-text-anchor/expected.png differ diff --git a/metrics/integration/render-tests/icon-text-fit/both-text-anchor/style.json b/metrics/integration/render-tests/icon-text-fit/both-text-anchor/style.json new file mode 100644 index 00000000000..b3a3e0b7772 --- /dev/null +++ b/metrics/integration/render-tests/icon-text-fit/both-text-anchor/style.json @@ -0,0 +1,192 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 200, + "height": 150 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": "local://geojson/anchors.json" + } + }, + "sprite": "local://sprites/icon-text-fit", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "anchor-center", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "center"], + "layout": { + "text-field": "Ügt", + "text-size": 20, + "text-anchor": "center", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "small-box", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-left", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "left"], + "layout": { + "text-field": "Ügt", + "text-size": 20, + "text-anchor": "left", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "small-box", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-top-left", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "top-left"], + "layout": { + "text-field": "Ügt", + "text-size": 20, + "text-anchor": "top-left", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "small-box", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-top", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "top"], + "layout": { + "text-field": "Ügt", + "text-size": 20, + "text-anchor": "top", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "small-box", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-top-right", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "top-right"], + "layout": { + "text-field": "Ügt", + "text-size": 20, + "text-anchor": "top-right", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "small-box", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-right", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "right"], + "layout": { + "text-field": "Ügt", + "text-size": 20, + "text-anchor": "right", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "small-box", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-bottom-left", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "bottom-left"], + "layout": { + "text-field": "Ügt", + "text-size": 20, + "text-anchor": "bottom-left", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "small-box", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-bottom", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "bottom"], + "layout": { + "text-field": "Ügt", + "text-size": 20, + "text-anchor": "bottom", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "small-box", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-bottom-right", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "bottom-right"], + "layout": { + "text-field": "Ügt", + "text-size": 20, + "text-anchor": "bottom-right", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "small-box", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchors", + "type": "circle", + "source": "geojson", + "paint": { + "circle-radius": 2, + "circle-color": "green", + "circle-stroke-color": "white", + "circle-stroke-width": 1 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/icon-text-fit/both/expected.png b/metrics/integration/render-tests/icon-text-fit/both/expected.png new file mode 100644 index 00000000000..809bdcbd86c Binary files /dev/null and b/metrics/integration/render-tests/icon-text-fit/both/expected.png differ diff --git a/metrics/integration/render-tests/icon-text-fit/both/style.json b/metrics/integration/render-tests/icon-text-fit/both/style.json new file mode 100644 index 00000000000..17017a0351b --- /dev/null +++ b/metrics/integration/render-tests/icon-text-fit/both/style.json @@ -0,0 +1,39 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "sprite": "local://sprites/icon-text-fit", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "text-field": "ABC", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "icon-image": "label", + "icon-text-fit": "both" + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/icon-text-fit/enlargen-both-padding/expected.png b/metrics/integration/render-tests/icon-text-fit/enlargen-both-padding/expected.png new file mode 100644 index 00000000000..7541ddfcb74 Binary files /dev/null and b/metrics/integration/render-tests/icon-text-fit/enlargen-both-padding/expected.png differ diff --git a/metrics/integration/render-tests/icon-text-fit/enlargen-both-padding/style.json b/metrics/integration/render-tests/icon-text-fit/enlargen-both-padding/style.json new file mode 100644 index 00000000000..2114e648b4f --- /dev/null +++ b/metrics/integration/render-tests/icon-text-fit/enlargen-both-padding/style.json @@ -0,0 +1,42 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 150, + "height": 64, + "allowed": 0.005 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "sprite": "local://sprites/icon-text-fit", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "text-field": "ABCD efgh", + "text-size": 24, + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "icon-image": "small-box", + "icon-text-fit": "both", + "icon-text-fit-padding": [ 12, 8, 4, 2 ] + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/icon-text-fit/enlargen-both/expected.png b/metrics/integration/render-tests/icon-text-fit/enlargen-both/expected.png new file mode 100644 index 00000000000..26e70320f9e Binary files /dev/null and b/metrics/integration/render-tests/icon-text-fit/enlargen-both/expected.png differ diff --git a/metrics/integration/render-tests/icon-text-fit/enlargen-both/style.json b/metrics/integration/render-tests/icon-text-fit/enlargen-both/style.json new file mode 100644 index 00000000000..7c76c51f153 --- /dev/null +++ b/metrics/integration/render-tests/icon-text-fit/enlargen-both/style.json @@ -0,0 +1,41 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 128, + "height": 64, + "allowed": 0.004 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "sprite": "local://sprites/icon-text-fit", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "text-field": "ABCD efgh", + "text-size": 24, + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "icon-image": "small-box", + "icon-text-fit": "both" + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/icon-text-fit/enlargen-height/expected.png b/metrics/integration/render-tests/icon-text-fit/enlargen-height/expected.png new file mode 100644 index 00000000000..e4950716277 Binary files /dev/null and b/metrics/integration/render-tests/icon-text-fit/enlargen-height/expected.png differ diff --git a/metrics/integration/render-tests/icon-text-fit/enlargen-height/style.json b/metrics/integration/render-tests/icon-text-fit/enlargen-height/style.json new file mode 100644 index 00000000000..2cf205f0b6d --- /dev/null +++ b/metrics/integration/render-tests/icon-text-fit/enlargen-height/style.json @@ -0,0 +1,40 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 128, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "sprite": "local://sprites/icon-text-fit", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "text-field": "ABCD efgh", + "text-size": 24, + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "icon-image": "small-box", + "icon-text-fit": "height" + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/icon-text-fit/enlargen-width/expected.png b/metrics/integration/render-tests/icon-text-fit/enlargen-width/expected.png new file mode 100644 index 00000000000..ad9c5ca6e6f Binary files /dev/null and b/metrics/integration/render-tests/icon-text-fit/enlargen-width/expected.png differ diff --git a/metrics/integration/render-tests/icon-text-fit/enlargen-width/style.json b/metrics/integration/render-tests/icon-text-fit/enlargen-width/style.json new file mode 100644 index 00000000000..00f0e293488 --- /dev/null +++ b/metrics/integration/render-tests/icon-text-fit/enlargen-width/style.json @@ -0,0 +1,41 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 128, + "height": 64, + "allowed": 0.002 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "sprite": "local://sprites/icon-text-fit", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "text-field": "ABCD efgh", + "text-size": 24, + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "icon-image": "small-box", + "icon-text-fit": "width" + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/icon-text-fit/height-padding/expected.png b/metrics/integration/render-tests/icon-text-fit/height-padding/expected.png new file mode 100644 index 00000000000..ac07d82e7ca Binary files /dev/null and b/metrics/integration/render-tests/icon-text-fit/height-padding/expected.png differ diff --git a/metrics/integration/render-tests/icon-text-fit/height-padding/style.json b/metrics/integration/render-tests/icon-text-fit/height-padding/style.json new file mode 100644 index 00000000000..377ef31c01c --- /dev/null +++ b/metrics/integration/render-tests/icon-text-fit/height-padding/style.json @@ -0,0 +1,45 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 96, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "sprite": "local://sprites/icon-text-fit", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "text-field": "ABC", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "icon-image": "label", + "icon-text-fit": "height", + "icon-text-fit-padding": [ + 5, + 10, + 5, + 10 + ] + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/icon-text-fit/height-text-anchor-padding/expected.png b/metrics/integration/render-tests/icon-text-fit/height-text-anchor-padding/expected.png new file mode 100644 index 00000000000..301592014d9 Binary files /dev/null and b/metrics/integration/render-tests/icon-text-fit/height-text-anchor-padding/expected.png differ diff --git a/metrics/integration/render-tests/icon-text-fit/height-text-anchor-padding/style.json b/metrics/integration/render-tests/icon-text-fit/height-text-anchor-padding/style.json new file mode 100644 index 00000000000..253b546ff42 --- /dev/null +++ b/metrics/integration/render-tests/icon-text-fit/height-text-anchor-padding/style.json @@ -0,0 +1,201 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 200, + "height": 150 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": "local://geojson/anchors.json" + } + }, + "sprite": "local://sprites/icon-text-fit", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "anchor-center", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "center"], + "layout": { + "text-field": "Ügt", + "text-size": 20, + "text-anchor": "center", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "small-box", + "icon-text-fit": "height", + "icon-text-fit-padding": [ 2, 4, 6, 8 ], + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-left", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "left"], + "layout": { + "text-field": "Ügt", + "text-size": 20, + "text-anchor": "left", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "small-box", + "icon-text-fit": "height", + "icon-text-fit-padding": [ 2, 4, 6, 8 ], + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-top-left", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "top-left"], + "layout": { + "text-field": "Ügt", + "text-size": 20, + "text-anchor": "top-left", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "small-box", + "icon-text-fit": "height", + "icon-text-fit-padding": [ 2, 4, 6, 8 ], + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-top", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "top"], + "layout": { + "text-field": "Ügt", + "text-size": 20, + "text-anchor": "top", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "small-box", + "icon-text-fit": "height", + "icon-text-fit-padding": [ 2, 4, 6, 8 ], + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-top-right", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "top-right"], + "layout": { + "text-field": "Ügt", + "text-size": 20, + "text-anchor": "top-right", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "small-box", + "icon-text-fit": "height", + "icon-text-fit-padding": [ 2, 4, 6, 8 ], + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-right", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "right"], + "layout": { + "text-field": "Ügt", + "text-size": 20, + "text-anchor": "right", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "small-box", + "icon-text-fit": "height", + "icon-text-fit-padding": [ 2, 4, 6, 8 ], + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-bottom-left", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "bottom-left"], + "layout": { + "text-field": "Ügt", + "text-size": 20, + "text-anchor": "bottom-left", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "small-box", + "icon-text-fit": "height", + "icon-text-fit-padding": [ 2, 4, 6, 8 ], + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-bottom", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "bottom"], + "layout": { + "text-field": "Ügt", + "text-size": 20, + "text-anchor": "bottom", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "small-box", + "icon-text-fit": "height", + "icon-text-fit-padding": [ 2, 4, 6, 8 ], + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-bottom-right", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "bottom-right"], + "layout": { + "text-field": "Ügt", + "text-size": 20, + "text-anchor": "bottom-right", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "small-box", + "icon-text-fit": "height", + "icon-text-fit-padding": [ 2, 4, 6, 8 ], + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchors", + "type": "circle", + "source": "geojson", + "paint": { + "circle-radius": 2, + "circle-color": "green", + "circle-stroke-color": "white", + "circle-stroke-width": 1 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/icon-text-fit/height-text-anchor/expected.png b/metrics/integration/render-tests/icon-text-fit/height-text-anchor/expected.png new file mode 100644 index 00000000000..2b6e781e52d Binary files /dev/null and b/metrics/integration/render-tests/icon-text-fit/height-text-anchor/expected.png differ diff --git a/metrics/integration/render-tests/icon-text-fit/height-text-anchor/style.json b/metrics/integration/render-tests/icon-text-fit/height-text-anchor/style.json new file mode 100644 index 00000000000..582d02aab07 --- /dev/null +++ b/metrics/integration/render-tests/icon-text-fit/height-text-anchor/style.json @@ -0,0 +1,192 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 200, + "height": 150 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": "local://geojson/anchors.json" + } + }, + "sprite": "local://sprites/icon-text-fit", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "anchor-center", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "center"], + "layout": { + "text-field": "Ügt", + "text-size": 20, + "text-anchor": "center", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "small-box", + "icon-text-fit": "height", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-left", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "left"], + "layout": { + "text-field": "Ügt", + "text-size": 20, + "text-anchor": "left", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "small-box", + "icon-text-fit": "height", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-top-left", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "top-left"], + "layout": { + "text-field": "Ügt", + "text-size": 20, + "text-anchor": "top-left", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "small-box", + "icon-text-fit": "height", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-top", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "top"], + "layout": { + "text-field": "Ügt", + "text-size": 20, + "text-anchor": "top", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "small-box", + "icon-text-fit": "height", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-top-right", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "top-right"], + "layout": { + "text-field": "Ügt", + "text-size": 20, + "text-anchor": "top-right", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "small-box", + "icon-text-fit": "height", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-right", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "right"], + "layout": { + "text-field": "Ügt", + "text-size": 20, + "text-anchor": "right", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "small-box", + "icon-text-fit": "height", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-bottom-left", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "bottom-left"], + "layout": { + "text-field": "Ügt", + "text-size": 20, + "text-anchor": "bottom-left", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "small-box", + "icon-text-fit": "height", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-bottom", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "bottom"], + "layout": { + "text-field": "Ügt", + "text-size": 20, + "text-anchor": "bottom", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "small-box", + "icon-text-fit": "height", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-bottom-right", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "bottom-right"], + "layout": { + "text-field": "Ügt", + "text-size": 20, + "text-anchor": "bottom-right", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "small-box", + "icon-text-fit": "height", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchors", + "type": "circle", + "source": "geojson", + "paint": { + "circle-radius": 2, + "circle-color": "green", + "circle-stroke-color": "white", + "circle-stroke-width": 1 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/icon-text-fit/height/expected.png b/metrics/integration/render-tests/icon-text-fit/height/expected.png new file mode 100644 index 00000000000..5c743d5773c Binary files /dev/null and b/metrics/integration/render-tests/icon-text-fit/height/expected.png differ diff --git a/metrics/integration/render-tests/icon-text-fit/height/style.json b/metrics/integration/render-tests/icon-text-fit/height/style.json new file mode 100644 index 00000000000..58263210f9f --- /dev/null +++ b/metrics/integration/render-tests/icon-text-fit/height/style.json @@ -0,0 +1,39 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 96, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "sprite": "local://sprites/icon-text-fit", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "text-field": "ABC", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "icon-image": "label", + "icon-text-fit": "height" + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/icon-text-fit/none/expected.png b/metrics/integration/render-tests/icon-text-fit/none/expected.png new file mode 100644 index 00000000000..cb6040cdd9d Binary files /dev/null and b/metrics/integration/render-tests/icon-text-fit/none/expected.png differ diff --git a/metrics/integration/render-tests/icon-text-fit/none/style.json b/metrics/integration/render-tests/icon-text-fit/none/style.json new file mode 100644 index 00000000000..d5a1ea09179 --- /dev/null +++ b/metrics/integration/render-tests/icon-text-fit/none/style.json @@ -0,0 +1,39 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 96, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "sprite": "local://sprites/icon-text-fit", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "text-field": "ABC", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "icon-image": "label", + "icon-text-fit": "none" + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/icon-text-fit/placement-line/expected.png b/metrics/integration/render-tests/icon-text-fit/placement-line/expected.png new file mode 100644 index 00000000000..0de83fd974a Binary files /dev/null and b/metrics/integration/render-tests/icon-text-fit/placement-line/expected.png differ diff --git a/metrics/integration/render-tests/icon-text-fit/placement-line/style.json b/metrics/integration/render-tests/icon-text-fit/placement-line/style.json new file mode 100644 index 00000000000..a0349275aba --- /dev/null +++ b/metrics/integration/render-tests/icon-text-fit/placement-line/style.json @@ -0,0 +1,63 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256, + "allowed": 0.0005 + } + }, + "center": [ + 13.417, + 52.502 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "sprite": "local://sprites/icon-text-fit", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "road", + "type": "symbol", + "source": "mapbox", + "source-layer": "road_label", + "layout": { + "symbol-placement": "line", + "text-field": "{name}", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-allow-overlap": true, + "icon-ignore-placement": true, + "icon-image": "label", + "icon-text-fit": "both", + "icon-text-fit-padding": [ + 5, + 10, + 5, + 10 + ] + }, + "paint": { + "icon-opacity": 1 + } + } + ] +} diff --git a/metrics/integration/render-tests/icon-text-fit/stretch-fifteen-part/expected.png b/metrics/integration/render-tests/icon-text-fit/stretch-fifteen-part/expected.png new file mode 100644 index 00000000000..e9a97643789 Binary files /dev/null and b/metrics/integration/render-tests/icon-text-fit/stretch-fifteen-part/expected.png differ diff --git a/metrics/integration/render-tests/icon-text-fit/stretch-fifteen-part/style.json b/metrics/integration/render-tests/icon-text-fit/stretch-fifteen-part/style.json new file mode 100644 index 00000000000..f06d1490eeb --- /dev/null +++ b/metrics/integration/render-tests/icon-text-fit/stretch-fifteen-part/style.json @@ -0,0 +1,192 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 200, + "height": 150 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": "local://geojson/anchors.json" + } + }, + "sprite": "local://sprites/stretch", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "anchor-center", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "center"], + "layout": { + "text-field": "ASDF", + "text-size": 20, + "text-anchor": "center", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "fifteen-part", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-left", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "left"], + "layout": { + "text-field": "ASDF", + "text-size": 20, + "text-anchor": "left", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "fifteen-part", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-top-left", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "top-left"], + "layout": { + "text-field": "ASDF", + "text-size": 20, + "text-anchor": "top-left", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "fifteen-part", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-top", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "top"], + "layout": { + "text-field": "ASDF", + "text-size": 20, + "text-anchor": "top", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "fifteen-part", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-top-right", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "top-right"], + "layout": { + "text-field": "ASDF", + "text-size": 20, + "text-anchor": "top-right", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "fifteen-part", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-right", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "right"], + "layout": { + "text-field": "ASDF", + "text-size": 20, + "text-anchor": "right", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "fifteen-part", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-bottom-left", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "bottom-left"], + "layout": { + "text-field": "ASDF", + "text-size": 20, + "text-anchor": "bottom-left", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "fifteen-part", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-bottom", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "bottom"], + "layout": { + "text-field": "ASDF", + "text-size": 20, + "text-anchor": "bottom", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "fifteen-part", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-bottom-right", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "bottom-right"], + "layout": { + "text-field": "ASDF", + "text-size": 20, + "text-anchor": "bottom-right", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "fifteen-part", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchors", + "type": "circle", + "source": "geojson", + "paint": { + "circle-radius": 2, + "circle-color": "green", + "circle-stroke-color": "white", + "circle-stroke-width": 1 + } + } + ] +} diff --git a/metrics/integration/render-tests/icon-text-fit/stretch-nine-part-@2x/expected.png b/metrics/integration/render-tests/icon-text-fit/stretch-nine-part-@2x/expected.png new file mode 100644 index 00000000000..fe56e368c01 Binary files /dev/null and b/metrics/integration/render-tests/icon-text-fit/stretch-nine-part-@2x/expected.png differ diff --git a/metrics/integration/render-tests/icon-text-fit/stretch-nine-part-@2x/style.json b/metrics/integration/render-tests/icon-text-fit/stretch-nine-part-@2x/style.json new file mode 100644 index 00000000000..d7ebfbd8afc --- /dev/null +++ b/metrics/integration/render-tests/icon-text-fit/stretch-nine-part-@2x/style.json @@ -0,0 +1,192 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 200, + "height": 150 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": "local://geojson/anchors.json" + } + }, + "sprite": "local://sprites/stretch", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "anchor-center", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "center"], + "layout": { + "text-field": "ASDF", + "text-size": 20, + "text-anchor": "center", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "nine-part-@2x", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-left", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "left"], + "layout": { + "text-field": "ASDF", + "text-size": 20, + "text-anchor": "left", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "nine-part-@2x", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-top-left", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "top-left"], + "layout": { + "text-field": "ASDF", + "text-size": 20, + "text-anchor": "top-left", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "nine-part-@2x", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-top", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "top"], + "layout": { + "text-field": "ASDF", + "text-size": 20, + "text-anchor": "top", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "nine-part-@2x", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-top-right", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "top-right"], + "layout": { + "text-field": "ASDF", + "text-size": 20, + "text-anchor": "top-right", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "nine-part-@2x", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-right", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "right"], + "layout": { + "text-field": "ASDF", + "text-size": 20, + "text-anchor": "right", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "nine-part-@2x", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-bottom-left", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "bottom-left"], + "layout": { + "text-field": "ASDF", + "text-size": 20, + "text-anchor": "bottom-left", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "nine-part-@2x", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-bottom", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "bottom"], + "layout": { + "text-field": "ASDF", + "text-size": 20, + "text-anchor": "bottom", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "nine-part-@2x", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-bottom-right", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "bottom-right"], + "layout": { + "text-field": "ASDF", + "text-size": 20, + "text-anchor": "bottom-right", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "nine-part-@2x", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchors", + "type": "circle", + "source": "geojson", + "paint": { + "circle-radius": 2, + "circle-color": "green", + "circle-stroke-color": "white", + "circle-stroke-width": 1 + } + } + ] +} diff --git a/metrics/integration/render-tests/icon-text-fit/stretch-nine-part-content-collision/expected.png b/metrics/integration/render-tests/icon-text-fit/stretch-nine-part-content-collision/expected.png new file mode 100644 index 00000000000..efa33d5b53a Binary files /dev/null and b/metrics/integration/render-tests/icon-text-fit/stretch-nine-part-content-collision/expected.png differ diff --git a/metrics/integration/render-tests/icon-text-fit/stretch-nine-part-content-collision/style.json b/metrics/integration/render-tests/icon-text-fit/stretch-nine-part-content-collision/style.json new file mode 100644 index 00000000000..b7d16e7207c --- /dev/null +++ b/metrics/integration/render-tests/icon-text-fit/stretch-nine-part-content-collision/style.json @@ -0,0 +1,156 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 200, + "height": 150 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": "local://geojson/anchors.json" + } + }, + "sprite": "local://sprites/stretch", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "anchor-center", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "center"], + "layout": { + "text-field": "ABC", + "text-size": 20, + "text-anchor": "center", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "icon-image": "nine-part-content", + "icon-text-fit": "both" + } + }, + { + "id": "anchor-left", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "left"], + "layout": { + "text-field": "ABC", + "text-size": 20, + "text-anchor": "left", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "icon-image": "nine-part-content", + "icon-text-fit": "both" + } + }, + { + "id": "anchor-top-left", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "top-left"], + "layout": { + "text-field": "ABC", + "text-size": 20, + "text-anchor": "top-left", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "icon-image": "nine-part-content", + "icon-text-fit": "both" + } + }, + { + "id": "anchor-top", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "top"], + "layout": { + "text-field": "ABC", + "text-size": 20, + "text-anchor": "top", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "icon-image": "nine-part-content", + "icon-text-fit": "both" + } + }, + { + "id": "anchor-top-right", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "top-right"], + "layout": { + "text-field": "ABC", + "text-size": 20, + "text-anchor": "top-right", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "icon-image": "nine-part-content", + "icon-text-fit": "both" + } + }, + { + "id": "anchor-right", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "right"], + "layout": { + "text-field": "ABC", + "text-size": 20, + "text-anchor": "right", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "icon-image": "nine-part-content", + "icon-text-fit": "both" + } + }, + { + "id": "anchor-bottom-left", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "bottom-left"], + "layout": { + "text-field": "ABC", + "text-size": 20, + "text-anchor": "bottom-left", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "icon-image": "nine-part-content", + "icon-text-fit": "both" + } + }, + { + "id": "anchor-bottom", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "bottom"], + "layout": { + "text-field": "ABC", + "text-size": 20, + "text-anchor": "bottom", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "icon-image": "nine-part-content", + "icon-text-fit": "both" + } + }, + { + "id": "anchor-bottom-right", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "bottom-right"], + "layout": { + "text-field": "ABC", + "text-size": 20, + "text-anchor": "bottom-right", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "icon-image": "nine-part-content", + "icon-text-fit": "both" + } + }, + { + "id": "anchors", + "type": "circle", + "source": "geojson", + "paint": { + "circle-radius": 2, + "circle-color": "green", + "circle-stroke-color": "white", + "circle-stroke-width": 1 + } + } + ] +} diff --git a/metrics/integration/render-tests/icon-text-fit/stretch-nine-part-content/expected.png b/metrics/integration/render-tests/icon-text-fit/stretch-nine-part-content/expected.png new file mode 100644 index 00000000000..87b0ca1431c Binary files /dev/null and b/metrics/integration/render-tests/icon-text-fit/stretch-nine-part-content/expected.png differ diff --git a/metrics/integration/render-tests/icon-text-fit/stretch-nine-part-content/style.json b/metrics/integration/render-tests/icon-text-fit/stretch-nine-part-content/style.json new file mode 100644 index 00000000000..f0babee1c58 --- /dev/null +++ b/metrics/integration/render-tests/icon-text-fit/stretch-nine-part-content/style.json @@ -0,0 +1,192 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 200, + "height": 150 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": "local://geojson/anchors.json" + } + }, + "sprite": "local://sprites/stretch", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "anchor-center", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "center"], + "layout": { + "text-field": "ABC", + "text-size": 20, + "text-anchor": "center", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "nine-part-content", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-left", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "left"], + "layout": { + "text-field": "ABC", + "text-size": 20, + "text-anchor": "left", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "nine-part-content", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-top-left", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "top-left"], + "layout": { + "text-field": "ABC", + "text-size": 20, + "text-anchor": "top-left", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "nine-part-content", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-top", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "top"], + "layout": { + "text-field": "ABC", + "text-size": 20, + "text-anchor": "top", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "nine-part-content", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-top-right", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "top-right"], + "layout": { + "text-field": "ABC", + "text-size": 20, + "text-anchor": "top-right", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "nine-part-content", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-right", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "right"], + "layout": { + "text-field": "ABC", + "text-size": 20, + "text-anchor": "right", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "nine-part-content", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-bottom-left", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "bottom-left"], + "layout": { + "text-field": "ABC", + "text-size": 20, + "text-anchor": "bottom-left", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "nine-part-content", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-bottom", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "bottom"], + "layout": { + "text-field": "ABC", + "text-size": 20, + "text-anchor": "bottom", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "nine-part-content", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-bottom-right", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "bottom-right"], + "layout": { + "text-field": "ABC", + "text-size": 20, + "text-anchor": "bottom-right", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "nine-part-content", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchors", + "type": "circle", + "source": "geojson", + "paint": { + "circle-radius": 2, + "circle-color": "green", + "circle-stroke-color": "white", + "circle-stroke-width": 1 + } + } + ] +} diff --git a/metrics/integration/render-tests/icon-text-fit/stretch-nine-part-just-height/expected.png b/metrics/integration/render-tests/icon-text-fit/stretch-nine-part-just-height/expected.png new file mode 100644 index 00000000000..cedb6506279 Binary files /dev/null and b/metrics/integration/render-tests/icon-text-fit/stretch-nine-part-just-height/expected.png differ diff --git a/metrics/integration/render-tests/icon-text-fit/stretch-nine-part-just-height/style.json b/metrics/integration/render-tests/icon-text-fit/stretch-nine-part-just-height/style.json new file mode 100644 index 00000000000..650f9a9e169 --- /dev/null +++ b/metrics/integration/render-tests/icon-text-fit/stretch-nine-part-just-height/style.json @@ -0,0 +1,192 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 200, + "height": 150 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": "local://geojson/anchors.json" + } + }, + "sprite": "local://sprites/stretch", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "anchor-center", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "center"], + "layout": { + "text-field": "ASDFASDF", + "text-size": 10, + "text-anchor": "center", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "nine-part", + "icon-text-fit": "height", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-left", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "left"], + "layout": { + "text-field": "ASDFASDF", + "text-size": 10, + "text-anchor": "left", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "nine-part", + "icon-text-fit": "height", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-top-left", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "top-left"], + "layout": { + "text-field": "ASDFASDF", + "text-size": 10, + "text-anchor": "top-left", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "nine-part", + "icon-text-fit": "height", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-top", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "top"], + "layout": { + "text-field": "ASDFASDF", + "text-size": 10, + "text-anchor": "top", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "nine-part", + "icon-text-fit": "height", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-top-right", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "top-right"], + "layout": { + "text-field": "ASDFASDF", + "text-size": 10, + "text-anchor": "top-right", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "nine-part", + "icon-text-fit": "height", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-right", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "right"], + "layout": { + "text-field": "ASDFASDF", + "text-size": 10, + "text-anchor": "right", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "nine-part", + "icon-text-fit": "height", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-bottom-left", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "bottom-left"], + "layout": { + "text-field": "ASDFASDF", + "text-size": 10, + "text-anchor": "bottom-left", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "nine-part", + "icon-text-fit": "height", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-bottom", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "bottom"], + "layout": { + "text-field": "ASDFASDF", + "text-size": 10, + "text-anchor": "bottom", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "nine-part", + "icon-text-fit": "height", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-bottom-right", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "bottom-right"], + "layout": { + "text-field": "ASDFASDF", + "text-size": 10, + "text-anchor": "bottom-right", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "nine-part", + "icon-text-fit": "height", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchors", + "type": "circle", + "source": "geojson", + "paint": { + "circle-radius": 2, + "circle-color": "green", + "circle-stroke-color": "white", + "circle-stroke-width": 1 + } + } + ] +} diff --git a/metrics/integration/render-tests/icon-text-fit/stretch-nine-part-just-width/expected.png b/metrics/integration/render-tests/icon-text-fit/stretch-nine-part-just-width/expected.png new file mode 100644 index 00000000000..0d59496c399 Binary files /dev/null and b/metrics/integration/render-tests/icon-text-fit/stretch-nine-part-just-width/expected.png differ diff --git a/metrics/integration/render-tests/icon-text-fit/stretch-nine-part-just-width/style.json b/metrics/integration/render-tests/icon-text-fit/stretch-nine-part-just-width/style.json new file mode 100644 index 00000000000..9776d8cc4dd --- /dev/null +++ b/metrics/integration/render-tests/icon-text-fit/stretch-nine-part-just-width/style.json @@ -0,0 +1,192 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 200, + "height": 150 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": "local://geojson/anchors.json" + } + }, + "sprite": "local://sprites/stretch", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "anchor-center", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "center"], + "layout": { + "text-field": "ASDFASDF", + "text-size": 10, + "text-anchor": "center", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "nine-part", + "icon-text-fit": "width", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-left", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "left"], + "layout": { + "text-field": "ASDFASDF", + "text-size": 10, + "text-anchor": "left", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "nine-part", + "icon-text-fit": "width", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-top-left", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "top-left"], + "layout": { + "text-field": "ASDFASDF", + "text-size": 10, + "text-anchor": "top-left", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "nine-part", + "icon-text-fit": "width", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-top", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "top"], + "layout": { + "text-field": "ASDFASDF", + "text-size": 10, + "text-anchor": "top", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "nine-part", + "icon-text-fit": "width", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-top-right", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "top-right"], + "layout": { + "text-field": "ASDFASDF", + "text-size": 10, + "text-anchor": "top-right", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "nine-part", + "icon-text-fit": "width", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-right", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "right"], + "layout": { + "text-field": "ASDFASDF", + "text-size": 10, + "text-anchor": "right", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "nine-part", + "icon-text-fit": "width", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-bottom-left", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "bottom-left"], + "layout": { + "text-field": "ASDFASDF", + "text-size": 10, + "text-anchor": "bottom-left", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "nine-part", + "icon-text-fit": "width", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-bottom", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "bottom"], + "layout": { + "text-field": "ASDFASDF", + "text-size": 10, + "text-anchor": "bottom", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "nine-part", + "icon-text-fit": "width", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-bottom-right", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "bottom-right"], + "layout": { + "text-field": "ASDFASDF", + "text-size": 10, + "text-anchor": "bottom-right", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "nine-part", + "icon-text-fit": "width", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchors", + "type": "circle", + "source": "geojson", + "paint": { + "circle-radius": 2, + "circle-color": "green", + "circle-stroke-color": "white", + "circle-stroke-width": 1 + } + } + ] +} diff --git a/metrics/integration/render-tests/icon-text-fit/stretch-nine-part/expected.png b/metrics/integration/render-tests/icon-text-fit/stretch-nine-part/expected.png new file mode 100644 index 00000000000..8a035589456 Binary files /dev/null and b/metrics/integration/render-tests/icon-text-fit/stretch-nine-part/expected.png differ diff --git a/metrics/integration/render-tests/icon-text-fit/stretch-nine-part/style.json b/metrics/integration/render-tests/icon-text-fit/stretch-nine-part/style.json new file mode 100644 index 00000000000..547817396e9 --- /dev/null +++ b/metrics/integration/render-tests/icon-text-fit/stretch-nine-part/style.json @@ -0,0 +1,192 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 200, + "height": 150 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": "local://geojson/anchors.json" + } + }, + "sprite": "local://sprites/stretch", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "anchor-center", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "center"], + "layout": { + "text-field": "ASDF", + "text-size": 20, + "text-anchor": "center", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "nine-part", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-left", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "left"], + "layout": { + "text-field": "ASDF", + "text-size": 20, + "text-anchor": "left", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "nine-part", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-top-left", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "top-left"], + "layout": { + "text-field": "ASDF", + "text-size": 20, + "text-anchor": "top-left", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "nine-part", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-top", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "top"], + "layout": { + "text-field": "ASDF", + "text-size": 20, + "text-anchor": "top", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "nine-part", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-top-right", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "top-right"], + "layout": { + "text-field": "ASDF", + "text-size": 20, + "text-anchor": "top-right", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "nine-part", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-right", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "right"], + "layout": { + "text-field": "ASDF", + "text-size": 20, + "text-anchor": "right", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "nine-part", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-bottom-left", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "bottom-left"], + "layout": { + "text-field": "ASDF", + "text-size": 20, + "text-anchor": "bottom-left", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "nine-part", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-bottom", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "bottom"], + "layout": { + "text-field": "ASDF", + "text-size": 20, + "text-anchor": "bottom", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "nine-part", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-bottom-right", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "bottom-right"], + "layout": { + "text-field": "ASDF", + "text-size": 20, + "text-anchor": "bottom-right", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "nine-part", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchors", + "type": "circle", + "source": "geojson", + "paint": { + "circle-radius": 2, + "circle-color": "green", + "circle-stroke-color": "white", + "circle-stroke-width": 1 + } + } + ] +} diff --git a/metrics/integration/render-tests/icon-text-fit/stretch-three-part/expected.png b/metrics/integration/render-tests/icon-text-fit/stretch-three-part/expected.png new file mode 100644 index 00000000000..eee29df9f9d Binary files /dev/null and b/metrics/integration/render-tests/icon-text-fit/stretch-three-part/expected.png differ diff --git a/metrics/integration/render-tests/icon-text-fit/stretch-three-part/style.json b/metrics/integration/render-tests/icon-text-fit/stretch-three-part/style.json new file mode 100644 index 00000000000..30cebd99ce9 --- /dev/null +++ b/metrics/integration/render-tests/icon-text-fit/stretch-three-part/style.json @@ -0,0 +1,192 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 200, + "height": 150 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": "local://geojson/anchors.json" + } + }, + "sprite": "local://sprites/stretch", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "anchor-center", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "center"], + "layout": { + "text-field": "ASDF", + "text-size": 20, + "text-anchor": "center", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "three-part", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-left", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "left"], + "layout": { + "text-field": "ASDF", + "text-size": 20, + "text-anchor": "left", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "three-part", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-top-left", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "top-left"], + "layout": { + "text-field": "ASDF", + "text-size": 20, + "text-anchor": "top-left", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "three-part", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-top", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "top"], + "layout": { + "text-field": "ASDF", + "text-size": 20, + "text-anchor": "top", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "three-part", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-top-right", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "top-right"], + "layout": { + "text-field": "ASDF", + "text-size": 20, + "text-anchor": "top-right", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "three-part", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-right", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "right"], + "layout": { + "text-field": "ASDF", + "text-size": 20, + "text-anchor": "right", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "three-part", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-bottom-left", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "bottom-left"], + "layout": { + "text-field": "ASDF", + "text-size": 20, + "text-anchor": "bottom-left", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "three-part", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-bottom", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "bottom"], + "layout": { + "text-field": "ASDF", + "text-size": 20, + "text-anchor": "bottom", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "three-part", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-bottom-right", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "bottom-right"], + "layout": { + "text-field": "ASDF", + "text-size": 20, + "text-anchor": "bottom-right", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "three-part", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchors", + "type": "circle", + "source": "geojson", + "paint": { + "circle-radius": 2, + "circle-color": "green", + "circle-stroke-color": "white", + "circle-stroke-width": 1 + } + } + ] +} diff --git a/metrics/integration/render-tests/icon-text-fit/stretch-two-part/expected.png b/metrics/integration/render-tests/icon-text-fit/stretch-two-part/expected.png new file mode 100644 index 00000000000..f218020df93 Binary files /dev/null and b/metrics/integration/render-tests/icon-text-fit/stretch-two-part/expected.png differ diff --git a/metrics/integration/render-tests/icon-text-fit/stretch-two-part/style.json b/metrics/integration/render-tests/icon-text-fit/stretch-two-part/style.json new file mode 100644 index 00000000000..5c45313726d --- /dev/null +++ b/metrics/integration/render-tests/icon-text-fit/stretch-two-part/style.json @@ -0,0 +1,192 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 200, + "height": 150 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": "local://geojson/anchors.json" + } + }, + "sprite": "local://sprites/stretch", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "anchor-center", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "center"], + "layout": { + "text-field": "ASDF", + "text-size": 20, + "text-anchor": "center", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "two-part", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-left", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "left"], + "layout": { + "text-field": "ASDF", + "text-size": 20, + "text-anchor": "left", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "two-part", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-top-left", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "top-left"], + "layout": { + "text-field": "ASDF", + "text-size": 20, + "text-anchor": "top-left", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "two-part", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-top", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "top"], + "layout": { + "text-field": "ASDF", + "text-size": 20, + "text-anchor": "top", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "two-part", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-top-right", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "top-right"], + "layout": { + "text-field": "ASDF", + "text-size": 20, + "text-anchor": "top-right", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "two-part", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-right", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "right"], + "layout": { + "text-field": "ASDF", + "text-size": 20, + "text-anchor": "right", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "two-part", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-bottom-left", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "bottom-left"], + "layout": { + "text-field": "ASDF", + "text-size": 20, + "text-anchor": "bottom-left", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "two-part", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-bottom", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "bottom"], + "layout": { + "text-field": "ASDF", + "text-size": 20, + "text-anchor": "bottom", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "two-part", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-bottom-right", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "bottom-right"], + "layout": { + "text-field": "ASDF", + "text-size": 20, + "text-anchor": "bottom-right", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "two-part", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchors", + "type": "circle", + "source": "geojson", + "paint": { + "circle-radius": 2, + "circle-color": "green", + "circle-stroke-color": "white", + "circle-stroke-width": 1 + } + } + ] +} diff --git a/metrics/integration/render-tests/icon-text-fit/stretch-underscale/expected.png b/metrics/integration/render-tests/icon-text-fit/stretch-underscale/expected.png new file mode 100644 index 00000000000..f6e32fca763 Binary files /dev/null and b/metrics/integration/render-tests/icon-text-fit/stretch-underscale/expected.png differ diff --git a/metrics/integration/render-tests/icon-text-fit/stretch-underscale/style.json b/metrics/integration/render-tests/icon-text-fit/stretch-underscale/style.json new file mode 100644 index 00000000000..a658c727bc6 --- /dev/null +++ b/metrics/integration/render-tests/icon-text-fit/stretch-underscale/style.json @@ -0,0 +1,192 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 200, + "height": 150 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": "local://geojson/anchors.json" + } + }, + "sprite": "local://sprites/stretch", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "anchor-center", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "center"], + "layout": { + "text-field": "A", + "text-size": 20, + "text-anchor": "center", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "three-part", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-left", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "left"], + "layout": { + "text-field": "A", + "text-size": 20, + "text-anchor": "left", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "three-part", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-top-left", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "top-left"], + "layout": { + "text-field": "A", + "text-size": 20, + "text-anchor": "top-left", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "three-part", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-top", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "top"], + "layout": { + "text-field": "A", + "text-size": 20, + "text-anchor": "top", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "three-part", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-top-right", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "top-right"], + "layout": { + "text-field": "A", + "text-size": 20, + "text-anchor": "top-right", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "three-part", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-right", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "right"], + "layout": { + "text-field": "A", + "text-size": 20, + "text-anchor": "right", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "three-part", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-bottom-left", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "bottom-left"], + "layout": { + "text-field": "A", + "text-size": 20, + "text-anchor": "bottom-left", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "three-part", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-bottom", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "bottom"], + "layout": { + "text-field": "A", + "text-size": 20, + "text-anchor": "bottom", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "three-part", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-bottom-right", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "bottom-right"], + "layout": { + "text-field": "A", + "text-size": 20, + "text-anchor": "bottom-right", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "three-part", + "icon-text-fit": "both", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchors", + "type": "circle", + "source": "geojson", + "paint": { + "circle-radius": 2, + "circle-color": "green", + "circle-stroke-color": "white", + "circle-stroke-width": 1 + } + } + ] +} diff --git a/metrics/integration/render-tests/icon-text-fit/text-variable-anchor-overlap/expected.png b/metrics/integration/render-tests/icon-text-fit/text-variable-anchor-overlap/expected.png new file mode 100644 index 00000000000..abc7219feb3 Binary files /dev/null and b/metrics/integration/render-tests/icon-text-fit/text-variable-anchor-overlap/expected.png differ diff --git a/metrics/integration/render-tests/icon-text-fit/text-variable-anchor-overlap/style.json b/metrics/integration/render-tests/icon-text-fit/text-variable-anchor-overlap/style.json new file mode 100644 index 00000000000..73c869feb54 --- /dev/null +++ b/metrics/integration/render-tests/icon-text-fit/text-variable-anchor-overlap/style.json @@ -0,0 +1,61 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256, + "allowed": 0.0005 + } + }, + "center": [ + 13.417, + 52.502 + ], + "zoom": 16, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "sprite": "local://sprites/icon-text-fit", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "road", + "type": "symbol", + "source": "mapbox", + "source-layer": "road_label", + "layout": { + "text-variable-anchor": ["left", "right", "bottom", "top"], + "text-field": "{name}", + "text-allow-overlap": true, + "icon-allow-overlap": true, + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "icon-image": "label", + "icon-text-fit": "both", + "icon-text-fit-padding": [ + 5, + 10, + 5, + 10 + ] + }, + "paint": { + "icon-opacity": 1 + } + } + ] +} diff --git a/metrics/integration/render-tests/icon-text-fit/text-variable-anchor/expected.png b/metrics/integration/render-tests/icon-text-fit/text-variable-anchor/expected.png new file mode 100644 index 00000000000..93fe892b0ea Binary files /dev/null and b/metrics/integration/render-tests/icon-text-fit/text-variable-anchor/expected.png differ diff --git a/metrics/integration/render-tests/icon-text-fit/text-variable-anchor/style.json b/metrics/integration/render-tests/icon-text-fit/text-variable-anchor/style.json new file mode 100644 index 00000000000..e27f39374e8 --- /dev/null +++ b/metrics/integration/render-tests/icon-text-fit/text-variable-anchor/style.json @@ -0,0 +1,59 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256, + "allowed": 0.0005 + } + }, + "center": [ + 13.417, + 52.502 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "sprite": "local://sprites/icon-text-fit", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "road", + "type": "symbol", + "source": "mapbox", + "source-layer": "road_label", + "layout": { + "text-variable-anchor": ["left", "right", "bottom", "top"], + "text-field": "{name}", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "icon-image": "label", + "icon-text-fit": "both", + "icon-text-fit-padding": [ + 5, + 10, + 5, + 10 + ] + }, + "paint": { + "icon-opacity": 1 + } + } + ] +} diff --git a/metrics/integration/render-tests/icon-text-fit/width-padding/expected.png b/metrics/integration/render-tests/icon-text-fit/width-padding/expected.png new file mode 100644 index 00000000000..0e00bbbcae1 Binary files /dev/null and b/metrics/integration/render-tests/icon-text-fit/width-padding/expected.png differ diff --git a/metrics/integration/render-tests/icon-text-fit/width-padding/style.json b/metrics/integration/render-tests/icon-text-fit/width-padding/style.json new file mode 100644 index 00000000000..c886c9a4355 --- /dev/null +++ b/metrics/integration/render-tests/icon-text-fit/width-padding/style.json @@ -0,0 +1,45 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "sprite": "local://sprites/icon-text-fit", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "text-field": "ABC", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "icon-image": "label", + "icon-text-fit": "width", + "icon-text-fit-padding": [ + 5, + 10, + 5, + 10 + ] + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/icon-text-fit/width-text-anchor-padding/expected.png b/metrics/integration/render-tests/icon-text-fit/width-text-anchor-padding/expected.png new file mode 100644 index 00000000000..770743fd738 Binary files /dev/null and b/metrics/integration/render-tests/icon-text-fit/width-text-anchor-padding/expected.png differ diff --git a/metrics/integration/render-tests/icon-text-fit/width-text-anchor-padding/style.json b/metrics/integration/render-tests/icon-text-fit/width-text-anchor-padding/style.json new file mode 100644 index 00000000000..0bfc7214cdb --- /dev/null +++ b/metrics/integration/render-tests/icon-text-fit/width-text-anchor-padding/style.json @@ -0,0 +1,201 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 200, + "height": 150 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": "local://geojson/anchors.json" + } + }, + "sprite": "local://sprites/icon-text-fit", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "anchor-center", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "center"], + "layout": { + "text-field": "Ügt", + "text-size": 20, + "text-anchor": "center", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "small-box", + "icon-text-fit": "width", + "icon-text-fit-padding": [ 2, 4, 6, 8 ], + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-left", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "left"], + "layout": { + "text-field": "Ügt", + "text-size": 20, + "text-anchor": "left", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "small-box", + "icon-text-fit": "width", + "icon-text-fit-padding": [ 2, 4, 6, 8 ], + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-top-left", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "top-left"], + "layout": { + "text-field": "Ügt", + "text-size": 20, + "text-anchor": "top-left", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "small-box", + "icon-text-fit": "width", + "icon-text-fit-padding": [ 2, 4, 6, 8 ], + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-top", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "top"], + "layout": { + "text-field": "Ügt", + "text-size": 20, + "text-anchor": "top", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "small-box", + "icon-text-fit": "width", + "icon-text-fit-padding": [ 2, 4, 6, 8 ], + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-top-right", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "top-right"], + "layout": { + "text-field": "Ügt", + "text-size": 20, + "text-anchor": "top-right", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "small-box", + "icon-text-fit": "width", + "icon-text-fit-padding": [ 2, 4, 6, 8 ], + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-right", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "right"], + "layout": { + "text-field": "Ügt", + "text-size": 20, + "text-anchor": "right", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "small-box", + "icon-text-fit": "width", + "icon-text-fit-padding": [ 2, 4, 6, 8 ], + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-bottom-left", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "bottom-left"], + "layout": { + "text-field": "Ügt", + "text-size": 20, + "text-anchor": "bottom-left", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "small-box", + "icon-text-fit": "width", + "icon-text-fit-padding": [ 2, 4, 6, 8 ], + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-bottom", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "bottom"], + "layout": { + "text-field": "Ügt", + "text-size": 20, + "text-anchor": "bottom", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "small-box", + "icon-text-fit": "width", + "icon-text-fit-padding": [ 2, 4, 6, 8 ], + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-bottom-right", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "bottom-right"], + "layout": { + "text-field": "Ügt", + "text-size": 20, + "text-anchor": "bottom-right", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "small-box", + "icon-text-fit": "width", + "icon-text-fit-padding": [ 2, 4, 6, 8 ], + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchors", + "type": "circle", + "source": "geojson", + "paint": { + "circle-radius": 2, + "circle-color": "green", + "circle-stroke-color": "white", + "circle-stroke-width": 1 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/icon-text-fit/width-text-anchor/expected.png b/metrics/integration/render-tests/icon-text-fit/width-text-anchor/expected.png new file mode 100644 index 00000000000..f5f29a8cd95 Binary files /dev/null and b/metrics/integration/render-tests/icon-text-fit/width-text-anchor/expected.png differ diff --git a/metrics/integration/render-tests/icon-text-fit/width-text-anchor/style.json b/metrics/integration/render-tests/icon-text-fit/width-text-anchor/style.json new file mode 100644 index 00000000000..783b19cdd0d --- /dev/null +++ b/metrics/integration/render-tests/icon-text-fit/width-text-anchor/style.json @@ -0,0 +1,192 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 200, + "height": 150 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": "local://geojson/anchors.json" + } + }, + "sprite": "local://sprites/icon-text-fit", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "anchor-center", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "center"], + "layout": { + "text-field": "Ügt", + "text-size": 20, + "text-anchor": "center", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "small-box", + "icon-text-fit": "width", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-left", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "left"], + "layout": { + "text-field": "Ügt", + "text-size": 20, + "text-anchor": "left", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "small-box", + "icon-text-fit": "width", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-top-left", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "top-left"], + "layout": { + "text-field": "Ügt", + "text-size": 20, + "text-anchor": "top-left", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "small-box", + "icon-text-fit": "width", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-top", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "top"], + "layout": { + "text-field": "Ügt", + "text-size": 20, + "text-anchor": "top", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "small-box", + "icon-text-fit": "width", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-top-right", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "top-right"], + "layout": { + "text-field": "Ügt", + "text-size": 20, + "text-anchor": "top-right", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "small-box", + "icon-text-fit": "width", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-right", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "right"], + "layout": { + "text-field": "Ügt", + "text-size": 20, + "text-anchor": "right", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "small-box", + "icon-text-fit": "width", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-bottom-left", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "bottom-left"], + "layout": { + "text-field": "Ügt", + "text-size": 20, + "text-anchor": "bottom-left", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "small-box", + "icon-text-fit": "width", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-bottom", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "bottom"], + "layout": { + "text-field": "Ügt", + "text-size": 20, + "text-anchor": "bottom", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "small-box", + "icon-text-fit": "width", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchor-bottom-right", + "type": "symbol", + "source": "geojson", + "filter": ["==", "anchor", "bottom-right"], + "layout": { + "text-field": "Ügt", + "text-size": 20, + "text-anchor": "bottom-right", + "text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "icon-image": "small-box", + "icon-text-fit": "width", + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "anchors", + "type": "circle", + "source": "geojson", + "paint": { + "circle-radius": 2, + "circle-color": "green", + "circle-stroke-color": "white", + "circle-stroke-width": 1 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/icon-text-fit/width/expected.png b/metrics/integration/render-tests/icon-text-fit/width/expected.png new file mode 100644 index 00000000000..cab1f66b207 Binary files /dev/null and b/metrics/integration/render-tests/icon-text-fit/width/expected.png differ diff --git a/metrics/integration/render-tests/icon-text-fit/width/style.json b/metrics/integration/render-tests/icon-text-fit/width/style.json new file mode 100644 index 00000000000..48ba9c44466 --- /dev/null +++ b/metrics/integration/render-tests/icon-text-fit/width/style.json @@ -0,0 +1,39 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "sprite": "local://sprites/icon-text-fit", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "text-field": "ABC", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "icon-image": "label", + "icon-text-fit": "width" + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/icon-translate-anchor/map/expected.png b/metrics/integration/render-tests/icon-translate-anchor/map/expected.png new file mode 100644 index 00000000000..f7e79717544 Binary files /dev/null and b/metrics/integration/render-tests/icon-translate-anchor/map/expected.png differ diff --git a/metrics/integration/render-tests/icon-translate-anchor/map/style.json b/metrics/integration/render-tests/icon-translate-anchor/map/style.json new file mode 100644 index 00000000000..d9283b19a38 --- /dev/null +++ b/metrics/integration/render-tests/icon-translate-anchor/map/style.json @@ -0,0 +1,57 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "bearing": 90, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "text", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "filter": [ + "==", + "maki", + "restaurant" + ], + "layout": { + "symbol-placement": "point", + "icon-allow-overlap": true, + "icon-ignore-placement": true, + "icon-image": "{maki}-12" + }, + "paint": { + "icon-translate": [ + 10, + 10 + ], + "icon-translate-anchor": "map" + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/icon-translate-anchor/viewport/expected.png b/metrics/integration/render-tests/icon-translate-anchor/viewport/expected.png new file mode 100644 index 00000000000..c99db2a5860 Binary files /dev/null and b/metrics/integration/render-tests/icon-translate-anchor/viewport/expected.png differ diff --git a/metrics/integration/render-tests/icon-translate-anchor/viewport/style.json b/metrics/integration/render-tests/icon-translate-anchor/viewport/style.json new file mode 100644 index 00000000000..f9da241318b --- /dev/null +++ b/metrics/integration/render-tests/icon-translate-anchor/viewport/style.json @@ -0,0 +1,57 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "bearing": 90, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "text", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "filter": [ + "==", + "maki", + "restaurant" + ], + "layout": { + "symbol-placement": "point", + "icon-allow-overlap": true, + "icon-ignore-placement": true, + "icon-image": "{maki}-12" + }, + "paint": { + "icon-translate": [ + 10, + 10 + ], + "icon-translate-anchor": "viewport" + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/icon-translate/default/expected.png b/metrics/integration/render-tests/icon-translate/default/expected.png new file mode 100644 index 00000000000..21812ce379a Binary files /dev/null and b/metrics/integration/render-tests/icon-translate/default/expected.png differ diff --git a/metrics/integration/render-tests/icon-translate/default/style.json b/metrics/integration/render-tests/icon-translate/default/style.json new file mode 100644 index 00000000000..1ca89d38d3d --- /dev/null +++ b/metrics/integration/render-tests/icon-translate/default/style.json @@ -0,0 +1,50 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "icon", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "filter": [ + "==", + "maki", + "restaurant" + ], + "layout": { + "symbol-placement": "point", + "icon-allow-overlap": true, + "icon-ignore-placement": true, + "icon-image": "{maki}-12" + }, + "paint": {} + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/icon-translate/function/expected.png b/metrics/integration/render-tests/icon-translate/function/expected.png new file mode 100644 index 00000000000..926299e6cb0 Binary files /dev/null and b/metrics/integration/render-tests/icon-translate/function/expected.png differ diff --git a/metrics/integration/render-tests/icon-translate/function/style.json b/metrics/integration/render-tests/icon-translate/function/style.json new file mode 100644 index 00000000000..11400b04561 --- /dev/null +++ b/metrics/integration/render-tests/icon-translate/function/style.json @@ -0,0 +1,69 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "icon", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "filter": [ + "==", + "maki", + "restaurant" + ], + "layout": { + "symbol-placement": "point", + "icon-allow-overlap": true, + "icon-ignore-placement": true, + "icon-image": "{maki}-12" + }, + "paint": { + "icon-translate": { + "stops": [ + [ + 16, + [ + 15, + 15 + ] + ], + [ + 17, + [ + 20, + 20 + ] + ] + ] + } + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/icon-translate/literal/expected.png b/metrics/integration/render-tests/icon-translate/literal/expected.png new file mode 100644 index 00000000000..fb5d36ef70a Binary files /dev/null and b/metrics/integration/render-tests/icon-translate/literal/expected.png differ diff --git a/metrics/integration/render-tests/icon-translate/literal/style.json b/metrics/integration/render-tests/icon-translate/literal/style.json new file mode 100644 index 00000000000..b1f6c9f3e07 --- /dev/null +++ b/metrics/integration/render-tests/icon-translate/literal/style.json @@ -0,0 +1,55 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "icon", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "filter": [ + "==", + "maki", + "restaurant" + ], + "layout": { + "symbol-placement": "point", + "icon-allow-overlap": true, + "icon-ignore-placement": true, + "icon-image": "{maki}-12" + }, + "paint": { + "icon-translate": [ + 5, + 5 + ] + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/icon-visibility/none/expected.png b/metrics/integration/render-tests/icon-visibility/none/expected.png new file mode 100644 index 00000000000..5308b74aacb Binary files /dev/null and b/metrics/integration/render-tests/icon-visibility/none/expected.png differ diff --git a/metrics/integration/render-tests/icon-visibility/none/style.json b/metrics/integration/render-tests/icon-visibility/none/style.json new file mode 100644 index 00000000000..eb85058ecca --- /dev/null +++ b/metrics/integration/render-tests/icon-visibility/none/style.json @@ -0,0 +1,54 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "icon-none", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "filter": [ + "==", + "maki", + "restaurant" + ], + "layout": { + "symbol-placement": "point", + "icon-allow-overlap": true, + "icon-ignore-placement": true, + "icon-image": "{maki}-12", + "icon-rotation-alignment": "viewport", + "visibility": "none" + }, + "paint": { + "icon-opacity": 1 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/icon-visibility/visible/expected.png b/metrics/integration/render-tests/icon-visibility/visible/expected.png new file mode 100644 index 00000000000..21812ce379a Binary files /dev/null and b/metrics/integration/render-tests/icon-visibility/visible/expected.png differ diff --git a/metrics/integration/render-tests/icon-visibility/visible/style.json b/metrics/integration/render-tests/icon-visibility/visible/style.json new file mode 100644 index 00000000000..ebc898d4c60 --- /dev/null +++ b/metrics/integration/render-tests/icon-visibility/visible/style.json @@ -0,0 +1,54 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "icon-visible", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "filter": [ + "==", + "maki", + "restaurant" + ], + "layout": { + "symbol-placement": "point", + "icon-allow-overlap": true, + "icon-ignore-placement": true, + "icon-image": "{maki}-12", + "icon-rotation-alignment": "viewport", + "visibility": "visible" + }, + "paint": { + "icon-opacity": 1 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/image/default/expected.png b/metrics/integration/render-tests/image/default/expected.png new file mode 100644 index 00000000000..7ba33271e5e Binary files /dev/null and b/metrics/integration/render-tests/image/default/expected.png differ diff --git a/metrics/integration/render-tests/image/default/style.json b/metrics/integration/render-tests/image/default/style.json new file mode 100644 index 00000000000..f417e14ace6 --- /dev/null +++ b/metrics/integration/render-tests/image/default/style.json @@ -0,0 +1,48 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 512, + "height": 512 + } + }, + "center": [ + -122.514426, + 37.562984 + ], + "zoom": 17, + "sources": { + "image": { + "type": "image", + "coordinates": [ + [ + -122.51596391201019, + 37.56238816766053 + ], + [ + -122.51467645168304, + 37.56410183312965 + ], + [ + -122.51309394836426, + 37.563391708549425 + ], + [ + -122.51423120498657, + 37.56161849366671 + ] + ], + "url": "local://image/0.png" + } + }, + "layers": [ + { + "id": "image", + "type": "raster", + "source": "image", + "paint": { + "raster-fade-duration": 0 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/image/pitched/expected.png b/metrics/integration/render-tests/image/pitched/expected.png new file mode 100644 index 00000000000..cb6ebbfeff0 Binary files /dev/null and b/metrics/integration/render-tests/image/pitched/expected.png differ diff --git a/metrics/integration/render-tests/image/pitched/style.json b/metrics/integration/render-tests/image/pitched/style.json new file mode 100644 index 00000000000..e73a9db77e3 --- /dev/null +++ b/metrics/integration/render-tests/image/pitched/style.json @@ -0,0 +1,37 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 512, + "height": 512 + } + }, + "center": [ + -79.68916667, + 26.68694444 + ], + "zoom": 12, + "pitch": 60, + "sources": { + "image": { + "type": "image", + "coordinates": [ + [-90.24006072802854, 36.928147474567794], + [-75.1441643681673, 36.928147474567794], + [-75.1441643681673, 22.551103322318994], + [-90.24006072802854, 22.551103322318994] + ], + "url": "local://image/0.png" + } + }, + "layers": [ + { + "id": "image", + "type": "raster", + "source": "image", + "paint": { + "raster-fade-duration": 0 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/image/raster-brightness/expected.png b/metrics/integration/render-tests/image/raster-brightness/expected.png new file mode 100644 index 00000000000..ccaa5a5f264 Binary files /dev/null and b/metrics/integration/render-tests/image/raster-brightness/expected.png differ diff --git a/metrics/integration/render-tests/image/raster-brightness/style.json b/metrics/integration/render-tests/image/raster-brightness/style.json new file mode 100644 index 00000000000..14c3f9065ef --- /dev/null +++ b/metrics/integration/render-tests/image/raster-brightness/style.json @@ -0,0 +1,50 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 512, + "height": 512 + } + }, + "center": [ + -122.514426, + 37.562984 + ], + "zoom": 17, + "sources": { + "image": { + "type": "image", + "coordinates": [ + [ + -122.51596391201019, + 37.56238816766053 + ], + [ + -122.51467645168304, + 37.56410183312965 + ], + [ + -122.51309394836426, + 37.563391708549425 + ], + [ + -122.51423120498657, + 37.56161849366671 + ] + ], + "url": "local://image/0.png" + } + }, + "layers": [ + { + "id": "image", + "type": "raster", + "source": "image", + "paint": { + "raster-fade-duration": 0, + "raster-brightness-min": 0.2, + "raster-brightness-max": 0.8 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/image/raster-contrast/expected.png b/metrics/integration/render-tests/image/raster-contrast/expected.png new file mode 100644 index 00000000000..0518fe29b89 Binary files /dev/null and b/metrics/integration/render-tests/image/raster-contrast/expected.png differ diff --git a/metrics/integration/render-tests/image/raster-contrast/style.json b/metrics/integration/render-tests/image/raster-contrast/style.json new file mode 100644 index 00000000000..6d3df6a0a73 --- /dev/null +++ b/metrics/integration/render-tests/image/raster-contrast/style.json @@ -0,0 +1,49 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 512, + "height": 512 + } + }, + "center": [ + -122.514426, + 37.562984 + ], + "zoom": 17, + "sources": { + "image": { + "type": "image", + "coordinates": [ + [ + -122.51596391201019, + 37.56238816766053 + ], + [ + -122.51467645168304, + 37.56410183312965 + ], + [ + -122.51309394836426, + 37.563391708549425 + ], + [ + -122.51423120498657, + 37.56161849366671 + ] + ], + "url": "local://image/0.png" + } + }, + "layers": [ + { + "id": "image", + "type": "raster", + "source": "image", + "paint": { + "raster-fade-duration": 0, + "raster-contrast": 0.2 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/image/raster-hue-rotate/expected.png b/metrics/integration/render-tests/image/raster-hue-rotate/expected.png new file mode 100644 index 00000000000..64dec9f4078 Binary files /dev/null and b/metrics/integration/render-tests/image/raster-hue-rotate/expected.png differ diff --git a/metrics/integration/render-tests/image/raster-hue-rotate/style.json b/metrics/integration/render-tests/image/raster-hue-rotate/style.json new file mode 100644 index 00000000000..c8f53c4326b --- /dev/null +++ b/metrics/integration/render-tests/image/raster-hue-rotate/style.json @@ -0,0 +1,49 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 512, + "height": 512 + } + }, + "center": [ + -122.514426, + 37.562984 + ], + "zoom": 17, + "sources": { + "image": { + "type": "image", + "coordinates": [ + [ + -122.51596391201019, + 37.56238816766053 + ], + [ + -122.51467645168304, + 37.56410183312965 + ], + [ + -122.51309394836426, + 37.563391708549425 + ], + [ + -122.51423120498657, + 37.56161849366671 + ] + ], + "url": "local://image/0.png" + } + }, + "layers": [ + { + "id": "image", + "type": "raster", + "source": "image", + "paint": { + "raster-fade-duration": 0, + "raster-hue-rotate": 90 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/image/raster-opacity/expected.png b/metrics/integration/render-tests/image/raster-opacity/expected.png new file mode 100644 index 00000000000..3bd4eb39df2 Binary files /dev/null and b/metrics/integration/render-tests/image/raster-opacity/expected.png differ diff --git a/metrics/integration/render-tests/image/raster-opacity/style.json b/metrics/integration/render-tests/image/raster-opacity/style.json new file mode 100644 index 00000000000..09733fff75d --- /dev/null +++ b/metrics/integration/render-tests/image/raster-opacity/style.json @@ -0,0 +1,49 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 512, + "height": 512 + } + }, + "center": [ + -122.514426, + 37.562984 + ], + "zoom": 17, + "sources": { + "image": { + "type": "image", + "coordinates": [ + [ + -122.51596391201019, + 37.56238816766053 + ], + [ + -122.51467645168304, + 37.56410183312965 + ], + [ + -122.51309394836426, + 37.563391708549425 + ], + [ + -122.51423120498657, + 37.56161849366671 + ] + ], + "url": "local://image/0.png" + } + }, + "layers": [ + { + "id": "image", + "type": "raster", + "source": "image", + "paint": { + "raster-fade-duration": 0, + "raster-opacity": 0.5 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/image/raster-resampling/expected.png b/metrics/integration/render-tests/image/raster-resampling/expected.png new file mode 100644 index 00000000000..759c8e5c07e Binary files /dev/null and b/metrics/integration/render-tests/image/raster-resampling/expected.png differ diff --git a/metrics/integration/render-tests/image/raster-resampling/style.json b/metrics/integration/render-tests/image/raster-resampling/style.json new file mode 100644 index 00000000000..4bad88bbe2e --- /dev/null +++ b/metrics/integration/render-tests/image/raster-resampling/style.json @@ -0,0 +1,49 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + -122.514526, + 37.562984 + ], + "zoom": 20, + "sources": { + "image": { + "type": "image", + "coordinates": [ + [ + -122.51596391201019, + 37.56238816766053 + ], + [ + -122.51467645168304, + 37.56410183312965 + ], + [ + -122.51309394836426, + 37.563391708549425 + ], + [ + -122.51423120498657, + 37.56161849366671 + ] + ], + "url": "local://image/0.png" + } + }, + "layers": [ + { + "id": "image", + "type": "raster", + "source": "image", + "paint": { + "raster-fade-duration": 0, + "raster-resampling": "nearest" + } + } + ] +} diff --git a/metrics/integration/render-tests/image/raster-saturation/expected.png b/metrics/integration/render-tests/image/raster-saturation/expected.png new file mode 100644 index 00000000000..55b255ee2fe Binary files /dev/null and b/metrics/integration/render-tests/image/raster-saturation/expected.png differ diff --git a/metrics/integration/render-tests/image/raster-saturation/style.json b/metrics/integration/render-tests/image/raster-saturation/style.json new file mode 100644 index 00000000000..c5bd8da83a3 --- /dev/null +++ b/metrics/integration/render-tests/image/raster-saturation/style.json @@ -0,0 +1,49 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 512, + "height": 512 + } + }, + "center": [ + -122.514426, + 37.562984 + ], + "zoom": 17, + "sources": { + "image": { + "type": "image", + "coordinates": [ + [ + -122.51596391201019, + 37.56238816766053 + ], + [ + -122.51467645168304, + 37.56410183312965 + ], + [ + -122.51309394836426, + 37.563391708549425 + ], + [ + -122.51423120498657, + 37.56161849366671 + ] + ], + "url": "local://image/0.png" + } + }, + "layers": [ + { + "id": "image", + "type": "raster", + "source": "image", + "paint": { + "raster-fade-duration": 0, + "raster-saturation": 0.2 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/image/raster-visibility/expected.png b/metrics/integration/render-tests/image/raster-visibility/expected.png new file mode 100644 index 00000000000..7ba33271e5e Binary files /dev/null and b/metrics/integration/render-tests/image/raster-visibility/expected.png differ diff --git a/metrics/integration/render-tests/image/raster-visibility/style.json b/metrics/integration/render-tests/image/raster-visibility/style.json new file mode 100644 index 00000000000..f417e14ace6 --- /dev/null +++ b/metrics/integration/render-tests/image/raster-visibility/style.json @@ -0,0 +1,48 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 512, + "height": 512 + } + }, + "center": [ + -122.514426, + 37.562984 + ], + "zoom": 17, + "sources": { + "image": { + "type": "image", + "coordinates": [ + [ + -122.51596391201019, + 37.56238816766053 + ], + [ + -122.51467645168304, + 37.56410183312965 + ], + [ + -122.51309394836426, + 37.563391708549425 + ], + [ + -122.51423120498657, + 37.56161849366671 + ] + ], + "url": "local://image/0.png" + } + }, + "layers": [ + { + "id": "image", + "type": "raster", + "source": "image", + "paint": { + "raster-fade-duration": 0 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/is-supported-script/filter/expected.png b/metrics/integration/render-tests/is-supported-script/filter/expected.png new file mode 100644 index 00000000000..9c4b635b86a Binary files /dev/null and b/metrics/integration/render-tests/is-supported-script/filter/expected.png differ diff --git a/metrics/integration/render-tests/is-supported-script/filter/style.json b/metrics/integration/render-tests/is-supported-script/filter/style.json new file mode 100644 index 00000000000..beba4fd43ad --- /dev/null +++ b/metrics/integration/render-tests/is-supported-script/filter/style.json @@ -0,0 +1,69 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 128, + "height": 128 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "name": "देवनागरी" + }, + "geometry": { + "type": "Point", + "coordinates": [ + 0, + -15 + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "سلام۳۹" + }, + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 15 + ] + } + } + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "filter": ["is-supported-script", ["get", "name"]], + "layout": { + "symbol-placement": "point", + "text-field": ["get", "name"], + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + } + } + ] +} diff --git a/metrics/integration/render-tests/is-supported-script/layout/expected.png b/metrics/integration/render-tests/is-supported-script/layout/expected.png new file mode 100644 index 00000000000..3ac88faaa48 Binary files /dev/null and b/metrics/integration/render-tests/is-supported-script/layout/expected.png differ diff --git a/metrics/integration/render-tests/is-supported-script/layout/style.json b/metrics/integration/render-tests/is-supported-script/layout/style.json new file mode 100644 index 00000000000..6ecbdc3f9a1 --- /dev/null +++ b/metrics/integration/render-tests/is-supported-script/layout/style.json @@ -0,0 +1,72 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 128, + "height": 128 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "name": "देवनागरी" + }, + "geometry": { + "type": "Point", + "coordinates": [ + 0, + -15 + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "سلام۳۹" + }, + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 15 + ] + } + } + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "symbol-placement": "point", + "text-field": ["case", + ["is-supported-script", ["get", "name"]], + ["get", "name"], + "Not renderable" + ], + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + } + } + ] +} diff --git a/metrics/integration/render-tests/line-blur/default/expected.png b/metrics/integration/render-tests/line-blur/default/expected.png new file mode 100644 index 00000000000..9c36c78cd3f Binary files /dev/null and b/metrics/integration/render-tests/line-blur/default/expected.png differ diff --git a/metrics/integration/render-tests/line-blur/default/style.json b/metrics/integration/render-tests/line-blur/default/style.json new file mode 100644 index 00000000000..2909fedc77d --- /dev/null +++ b/metrics/integration/render-tests/line-blur/default/style.json @@ -0,0 +1,41 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "road", + "type": "line", + "source": "mapbox", + "source-layer": "road", + "paint": { + "line-width": 2, + "line-color": "#000" + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/line-blur/function/expected.png b/metrics/integration/render-tests/line-blur/function/expected.png new file mode 100644 index 00000000000..4e5a40ce092 Binary files /dev/null and b/metrics/integration/render-tests/line-blur/function/expected.png differ diff --git a/metrics/integration/render-tests/line-blur/function/style.json b/metrics/integration/render-tests/line-blur/function/style.json new file mode 100644 index 00000000000..3047aafa026 --- /dev/null +++ b/metrics/integration/render-tests/line-blur/function/style.json @@ -0,0 +1,53 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "road", + "type": "line", + "source": "mapbox", + "source-layer": "road", + "paint": { + "line-width": 2, + "line-color": "#000", + "line-blur": { + "stops": [ + [ + 16, + 15 + ], + [ + 17, + 20 + ] + ] + } + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/line-blur/literal/expected.png b/metrics/integration/render-tests/line-blur/literal/expected.png new file mode 100644 index 00000000000..a0630d03959 Binary files /dev/null and b/metrics/integration/render-tests/line-blur/literal/expected.png differ diff --git a/metrics/integration/render-tests/line-blur/literal/style.json b/metrics/integration/render-tests/line-blur/literal/style.json new file mode 100644 index 00000000000..5aeeccd0576 --- /dev/null +++ b/metrics/integration/render-tests/line-blur/literal/style.json @@ -0,0 +1,42 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "road", + "type": "line", + "source": "mapbox", + "source-layer": "road", + "paint": { + "line-width": 2, + "line-color": "#000", + "line-blur": 5 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/line-blur/property-function/expected.png b/metrics/integration/render-tests/line-blur/property-function/expected.png new file mode 100644 index 00000000000..2d478b8a9a0 Binary files /dev/null and b/metrics/integration/render-tests/line-blur/property-function/expected.png differ diff --git a/metrics/integration/render-tests/line-blur/property-function/style.json b/metrics/integration/render-tests/line-blur/property-function/style.json new file mode 100644 index 00000000000..902496e52be --- /dev/null +++ b/metrics/integration/render-tests/line-blur/property-function/style.json @@ -0,0 +1,70 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "road", + "type": "line", + "source": "mapbox", + "source-layer": "road", + "paint": { + "line-width": 10, + "line-blur": { + "property": "class", + "type": "categorical", + "stops": [ + [ + "path", + 0 + ], + [ + "driveway", + 2 + ], + [ + "service", + 4 + ], + [ + "street_limited", + 6 + ], + [ + "street", + 8 + ], + [ + "main", + 10 + ] + ] + } + } + } + ] +} diff --git a/metrics/integration/render-tests/line-cap/butt/expected.png b/metrics/integration/render-tests/line-cap/butt/expected.png new file mode 100644 index 00000000000..5fd1699eaab Binary files /dev/null and b/metrics/integration/render-tests/line-cap/butt/expected.png differ diff --git a/metrics/integration/render-tests/line-cap/butt/style.json b/metrics/integration/render-tests/line-cap/butt/style.json new file mode 100644 index 00000000000..4c736cd3c73 --- /dev/null +++ b/metrics/integration/render-tests/line-cap/butt/style.json @@ -0,0 +1,45 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "butt", + "type": "line", + "source": "mapbox", + "source-layer": "road", + "layout": { + "line-cap": "butt" + }, + "paint": { + "line-width": 10, + "line-color": "#000", + "line-opacity": 1 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/line-cap/round/expected.png b/metrics/integration/render-tests/line-cap/round/expected.png new file mode 100644 index 00000000000..eae20caaa31 Binary files /dev/null and b/metrics/integration/render-tests/line-cap/round/expected.png differ diff --git a/metrics/integration/render-tests/line-cap/round/style.json b/metrics/integration/render-tests/line-cap/round/style.json new file mode 100644 index 00000000000..ae5786c53d6 --- /dev/null +++ b/metrics/integration/render-tests/line-cap/round/style.json @@ -0,0 +1,45 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "round", + "type": "line", + "source": "mapbox", + "source-layer": "road", + "layout": { + "line-cap": "round" + }, + "paint": { + "line-width": 10, + "line-color": "#000", + "line-opacity": 1 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/line-cap/square/expected.png b/metrics/integration/render-tests/line-cap/square/expected.png new file mode 100644 index 00000000000..4e094cc759e Binary files /dev/null and b/metrics/integration/render-tests/line-cap/square/expected.png differ diff --git a/metrics/integration/render-tests/line-cap/square/style.json b/metrics/integration/render-tests/line-cap/square/style.json new file mode 100644 index 00000000000..e353b9e4d46 --- /dev/null +++ b/metrics/integration/render-tests/line-cap/square/style.json @@ -0,0 +1,45 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "square", + "type": "line", + "source": "mapbox", + "source-layer": "road", + "layout": { + "line-cap": "square" + }, + "paint": { + "line-width": 10, + "line-color": "#000", + "line-opacity": 1 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/line-color/default/expected.png b/metrics/integration/render-tests/line-color/default/expected.png new file mode 100644 index 00000000000..5fd1699eaab Binary files /dev/null and b/metrics/integration/render-tests/line-color/default/expected.png differ diff --git a/metrics/integration/render-tests/line-color/default/style.json b/metrics/integration/render-tests/line-color/default/style.json new file mode 100644 index 00000000000..fa0b24a6bb2 --- /dev/null +++ b/metrics/integration/render-tests/line-color/default/style.json @@ -0,0 +1,40 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "road", + "type": "line", + "source": "mapbox", + "source-layer": "road", + "paint": { + "line-width": 10 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/line-color/function/expected.png b/metrics/integration/render-tests/line-color/function/expected.png new file mode 100644 index 00000000000..b2c93d3cefe Binary files /dev/null and b/metrics/integration/render-tests/line-color/function/expected.png differ diff --git a/metrics/integration/render-tests/line-color/function/style.json b/metrics/integration/render-tests/line-color/function/style.json new file mode 100644 index 00000000000..95fffe147b7 --- /dev/null +++ b/metrics/integration/render-tests/line-color/function/style.json @@ -0,0 +1,52 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "road", + "type": "line", + "source": "mapbox", + "source-layer": "road", + "paint": { + "line-width": 10, + "line-color": { + "stops": [ + [ + 16, + "green" + ], + [ + 17, + "blue" + ] + ] + } + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/line-color/literal/expected.png b/metrics/integration/render-tests/line-color/literal/expected.png new file mode 100644 index 00000000000..01d4cc39de0 Binary files /dev/null and b/metrics/integration/render-tests/line-color/literal/expected.png differ diff --git a/metrics/integration/render-tests/line-color/literal/style.json b/metrics/integration/render-tests/line-color/literal/style.json new file mode 100644 index 00000000000..5f63f4ecd1a --- /dev/null +++ b/metrics/integration/render-tests/line-color/literal/style.json @@ -0,0 +1,41 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "road", + "type": "line", + "source": "mapbox", + "source-layer": "road", + "paint": { + "line-width": 10, + "line-color": "blue" + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/line-color/property-function-identity/expected.png b/metrics/integration/render-tests/line-color/property-function-identity/expected.png new file mode 100644 index 00000000000..3de542c3ea0 Binary files /dev/null and b/metrics/integration/render-tests/line-color/property-function-identity/expected.png differ diff --git a/metrics/integration/render-tests/line-color/property-function-identity/style.json b/metrics/integration/render-tests/line-color/property-function-identity/style.json new file mode 100644 index 00000000000..04ea46fa198 --- /dev/null +++ b/metrics/integration/render-tests/line-color/property-function-identity/style.json @@ -0,0 +1,59 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [{ + "type": "Feature", + "properties": { + "color": "blue" + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [-10, 10], + [10, 10], + [-10, -10], + [10, -10] + ] + } + }, { + "type": "Feature", + "properties": { + "color": "green" + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [-10, 9], + [10, 9], + [-10, -9], + [10, -9] + ] + } + }] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [{ + "id": "line", + "type": "line", + "source": "geojson", + "paint": { + "line-color": { + "property": "color", + "type": "identity" + }, + "line-width": 2 + } + }] +} diff --git a/metrics/integration/render-tests/line-color/property-function/expected.png b/metrics/integration/render-tests/line-color/property-function/expected.png new file mode 100644 index 00000000000..b29f0189440 Binary files /dev/null and b/metrics/integration/render-tests/line-color/property-function/expected.png differ diff --git a/metrics/integration/render-tests/line-color/property-function/style.json b/metrics/integration/render-tests/line-color/property-function/style.json new file mode 100644 index 00000000000..8006b3dddbd --- /dev/null +++ b/metrics/integration/render-tests/line-color/property-function/style.json @@ -0,0 +1,70 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "road", + "type": "line", + "source": "mapbox", + "source-layer": "road", + "paint": { + "line-width": 10, + "line-color": { + "property": "class", + "type": "categorical", + "stops": [ + [ + "path", + "red" + ], + [ + "driveway", + "orange" + ], + [ + "service", + "yellow" + ], + [ + "street_limited", + "green" + ], + [ + "street", + "blue" + ], + [ + "main", + "purple" + ] + ] + } + } + } + ] +} diff --git a/metrics/integration/render-tests/line-dasharray/default/expected.png b/metrics/integration/render-tests/line-dasharray/default/expected.png new file mode 100644 index 00000000000..25ab39c3670 Binary files /dev/null and b/metrics/integration/render-tests/line-dasharray/default/expected.png differ diff --git a/metrics/integration/render-tests/line-dasharray/default/style.json b/metrics/integration/render-tests/line-dasharray/default/style.json new file mode 100644 index 00000000000..26ed3bc7b08 --- /dev/null +++ b/metrics/integration/render-tests/line-dasharray/default/style.json @@ -0,0 +1,34 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "LineString", + "coordinates": [ + [ + -10, + 0 + ], + [ + 10, + 0 + ] + ] + } + } + }, + "layers": [ + { + "id": "line", + "type": "line", + "source": "geojson" + } + ] +} diff --git a/metrics/integration/render-tests/line-dasharray/fractional-zoom/expected.png b/metrics/integration/render-tests/line-dasharray/fractional-zoom/expected.png new file mode 100644 index 00000000000..0225ed2a529 Binary files /dev/null and b/metrics/integration/render-tests/line-dasharray/fractional-zoom/expected.png differ diff --git a/metrics/integration/render-tests/line-dasharray/fractional-zoom/style.json b/metrics/integration/render-tests/line-dasharray/fractional-zoom/style.json new file mode 100644 index 00000000000..2f32b8412c4 --- /dev/null +++ b/metrics/integration/render-tests/line-dasharray/fractional-zoom/style.json @@ -0,0 +1,41 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "zoom": 0.5, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "LineString", + "coordinates": [ + [ + -10, + 0 + ], + [ + 10, + 0 + ] + ] + } + } + }, + "layers": [ + { + "id": "line", + "type": "line", + "source": "geojson", + "paint": { + "line-dasharray": [ + 4, + 4 + ] + } + } + ] +} diff --git a/metrics/integration/render-tests/line-dasharray/function/line-width-composite-function/expected.png b/metrics/integration/render-tests/line-dasharray/function/line-width-composite-function/expected.png new file mode 100644 index 00000000000..1589de16c17 Binary files /dev/null and b/metrics/integration/render-tests/line-dasharray/function/line-width-composite-function/expected.png differ diff --git a/metrics/integration/render-tests/line-dasharray/function/line-width-composite-function/style.json b/metrics/integration/render-tests/line-dasharray/function/line-width-composite-function/style.json new file mode 100644 index 00000000000..a2ebd810390 --- /dev/null +++ b/metrics/integration/render-tests/line-dasharray/function/line-width-composite-function/style.json @@ -0,0 +1,152 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "zoom": 0.5, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "property": 1 + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -10, + -5 + ], + [ + 10, + -5 + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "property": 2 + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -10, + 0 + ], + [ + 10, + 0 + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "property": 3 + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -10, + 5 + ], + [ + 10, + 5 + ] + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "road", + "type": "line", + "source": "geojson", + "paint": { + "line-width": { + "property": "property", + "type": "categorical", + "stops": [ + [ + { + "zoom": 0, + "value": 1 + }, + 1 + ], + [ + { + "zoom": 0, + "value": 2 + }, + 2 + ], + [ + { + "zoom": 0, + "value": 3 + }, + 3 + ], + [ + { + "zoom": 1, + "value": 1 + }, + 4 + ], + [ + { + "zoom": 1, + "value": 2 + }, + 5 + ], + [ + { + "zoom": 1, + "value": 3 + }, + 6 + ] + ] + }, + "line-dasharray": { + "stops": [ + [ + 0, + [ + 1, + 1 + ] + ], + [ + 1, + [ + 2, + 1 + ] + ] + ] + } + } + } + ] +} diff --git a/metrics/integration/render-tests/line-dasharray/function/line-width-constant/expected.png b/metrics/integration/render-tests/line-dasharray/function/line-width-constant/expected.png new file mode 100644 index 00000000000..397035cf914 Binary files /dev/null and b/metrics/integration/render-tests/line-dasharray/function/line-width-constant/expected.png differ diff --git a/metrics/integration/render-tests/line-dasharray/function/line-width-constant/style.json b/metrics/integration/render-tests/line-dasharray/function/line-width-constant/style.json new file mode 100644 index 00000000000..7a0c1832f00 --- /dev/null +++ b/metrics/integration/render-tests/line-dasharray/function/line-width-constant/style.json @@ -0,0 +1,56 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "zoom": 1, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "LineString", + "coordinates": [ + [ + -10, + 0 + ], + [ + 10, + 0 + ] + ] + } + } + }, + "layers": [ + { + "id": "line", + "type": "line", + "source": "geojson", + "paint": { + "line-width": 4, + "line-dasharray": { + "stops": [ + [ + 0, + [ + 1, + 1 + ] + ], + [ + 2, + [ + 2, + 2 + ] + ] + ] + } + } + } + ] +} diff --git a/metrics/integration/render-tests/line-dasharray/function/line-width-property-function/expected.png b/metrics/integration/render-tests/line-dasharray/function/line-width-property-function/expected.png new file mode 100644 index 00000000000..9dc6a1ddb7e Binary files /dev/null and b/metrics/integration/render-tests/line-dasharray/function/line-width-property-function/expected.png differ diff --git a/metrics/integration/render-tests/line-dasharray/function/line-width-property-function/style.json b/metrics/integration/render-tests/line-dasharray/function/line-width-property-function/style.json new file mode 100644 index 00000000000..043ad25c275 --- /dev/null +++ b/metrics/integration/render-tests/line-dasharray/function/line-width-property-function/style.json @@ -0,0 +1,108 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "zoom": 0.5, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "property": 1 + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -10, + -5 + ], + [ + 10, + -5 + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "property": 2 + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -10, + 0 + ], + [ + 10, + 0 + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "property": 3 + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -10, + 5 + ], + [ + 10, + 5 + ] + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "road", + "type": "line", + "source": "geojson", + "paint": { + "line-width": { + "type": "identity", + "property": "property" + }, + "line-dasharray": { + "stops": [ + [ + 0, + [ + 1, + 1 + ] + ], + [ + 1, + [ + 2, + 1 + ] + ] + ] + } + } + } + ] +} diff --git a/metrics/integration/render-tests/line-dasharray/literal/line-width-composite-function/expected.png b/metrics/integration/render-tests/line-dasharray/literal/line-width-composite-function/expected.png new file mode 100644 index 00000000000..f2f754294c3 Binary files /dev/null and b/metrics/integration/render-tests/line-dasharray/literal/line-width-composite-function/expected.png differ diff --git a/metrics/integration/render-tests/line-dasharray/literal/line-width-composite-function/style.json b/metrics/integration/render-tests/line-dasharray/literal/line-width-composite-function/style.json new file mode 100644 index 00000000000..21da53ec11f --- /dev/null +++ b/metrics/integration/render-tests/line-dasharray/literal/line-width-composite-function/style.json @@ -0,0 +1,138 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "zoom": 0.5, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "property": 1 + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -10, + -5 + ], + [ + 10, + -5 + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "property": 2 + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -10, + 0 + ], + [ + 10, + 0 + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "property": 3 + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -10, + 5 + ], + [ + 10, + 5 + ] + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "road", + "type": "line", + "source": "geojson", + "paint": { + "line-width": { + "property": "property", + "type": "categorical", + "stops": [ + [ + { + "zoom": 0, + "value": 1 + }, + 1 + ], + [ + { + "zoom": 0, + "value": 2 + }, + 2 + ], + [ + { + "zoom": 0, + "value": 3 + }, + 3 + ], + [ + { + "zoom": 1, + "value": 1 + }, + 4 + ], + [ + { + "zoom": 1, + "value": 2 + }, + 5 + ], + [ + { + "zoom": 1, + "value": 3 + }, + 6 + ] + ] + }, + "line-dasharray": [ + 2, + 1 + ] + } + } + ] +} diff --git a/metrics/integration/render-tests/line-dasharray/literal/line-width-constant/expected.png b/metrics/integration/render-tests/line-dasharray/literal/line-width-constant/expected.png new file mode 100644 index 00000000000..724a43365e5 Binary files /dev/null and b/metrics/integration/render-tests/line-dasharray/literal/line-width-constant/expected.png differ diff --git a/metrics/integration/render-tests/line-dasharray/literal/line-width-constant/style.json b/metrics/integration/render-tests/line-dasharray/literal/line-width-constant/style.json new file mode 100644 index 00000000000..0301a104ff9 --- /dev/null +++ b/metrics/integration/render-tests/line-dasharray/literal/line-width-constant/style.json @@ -0,0 +1,97 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "a": { + "type": "geojson", + "data": { + "type": "LineString", + "coordinates": [ + [ + -10, + -10 + ], + [ + 10, + -10 + ] + ] + } + }, + "b": { + "type": "geojson", + "data": { + "type": "LineString", + "coordinates": [ + [ + -10, + 0 + ], + [ + 10, + 0 + ] + ] + } + }, + "c": { + "type": "geojson", + "data": { + "type": "LineString", + "coordinates": [ + [ + -10, + 10 + ], + [ + 10, + 10 + ] + ] + } + } + }, + "layers": [ + { + "id": "a", + "type": "line", + "source": "a", + "paint": { + "line-width": 2, + "line-dasharray": [ + 1, + 1 + ] + } + }, + { + "id": "b", + "type": "line", + "source": "b", + "paint": { + "line-width": 4, + "line-dasharray": [ + 1, + 1 + ] + } + }, + { + "id": "c", + "type": "line", + "source": "c", + "paint": { + "line-width": 8, + "line-dasharray": [ + 1, + 1 + ] + } + } + ] +} diff --git a/metrics/integration/render-tests/line-dasharray/literal/line-width-property-function/expected.png b/metrics/integration/render-tests/line-dasharray/literal/line-width-property-function/expected.png new file mode 100644 index 00000000000..d396180c3ea Binary files /dev/null and b/metrics/integration/render-tests/line-dasharray/literal/line-width-property-function/expected.png differ diff --git a/metrics/integration/render-tests/line-dasharray/literal/line-width-property-function/style.json b/metrics/integration/render-tests/line-dasharray/literal/line-width-property-function/style.json new file mode 100644 index 00000000000..dafc933f524 --- /dev/null +++ b/metrics/integration/render-tests/line-dasharray/literal/line-width-property-function/style.json @@ -0,0 +1,94 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "zoom": 0.5, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "property": 1 + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -10, + -5 + ], + [ + 10, + -5 + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "property": 2 + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -10, + 0 + ], + [ + 10, + 0 + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "property": 3 + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -10, + 5 + ], + [ + 10, + 5 + ] + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "road", + "type": "line", + "source": "geojson", + "paint": { + "line-width": { + "type": "identity", + "property": "property" + }, + "line-dasharray": [ + 2, + 1 + ] + } + } + ] +} diff --git a/metrics/integration/render-tests/line-dasharray/literal/line-width-zoom-function/expected.png b/metrics/integration/render-tests/line-dasharray/literal/line-width-zoom-function/expected.png new file mode 100644 index 00000000000..c5b0fd9bd8c Binary files /dev/null and b/metrics/integration/render-tests/line-dasharray/literal/line-width-zoom-function/expected.png differ diff --git a/metrics/integration/render-tests/line-dasharray/literal/line-width-zoom-function/style.json b/metrics/integration/render-tests/line-dasharray/literal/line-width-zoom-function/style.json new file mode 100644 index 00000000000..1d8ee1b7095 --- /dev/null +++ b/metrics/integration/render-tests/line-dasharray/literal/line-width-zoom-function/style.json @@ -0,0 +1,53 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "zoom": 0.5, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "LineString", + "coordinates": [ + [ + -10, + 0 + ], + [ + 10, + 0 + ] + ] + } + } + }, + "layers": [ + { + "id": "line", + "type": "line", + "source": "geojson", + "paint": { + "line-width": { + "stops": [ + [ + 0, + 1 + ], + [ + 1, + 10 + ] + ] + }, + "line-dasharray": [ + 1, + 1 + ] + } + } + ] +} diff --git a/metrics/integration/render-tests/line-dasharray/long-segment/expected.png b/metrics/integration/render-tests/line-dasharray/long-segment/expected.png new file mode 100644 index 00000000000..e90d51306ea Binary files /dev/null and b/metrics/integration/render-tests/line-dasharray/long-segment/expected.png differ diff --git a/metrics/integration/render-tests/line-dasharray/long-segment/style.json b/metrics/integration/render-tests/line-dasharray/long-segment/style.json new file mode 100644 index 00000000000..b87c5b628b4 --- /dev/null +++ b/metrics/integration/render-tests/line-dasharray/long-segment/style.json @@ -0,0 +1,59 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + -77.0305, + 38.9014 + ], + "zoom": 12.15, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Feature", + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -80, + 38.910203 + ], + [ + 80, + 38.910321 + ] + ] + }, + "properties": { + "name": "P Street Northwest - Massachusetts Avenue Northwest" + } + } + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "#FFF" + } + }, + { + "id": "line", + "type": "line", + "source": "geojson", + "paint": { + "line-color": "#000", + "line-dasharray": [ + 1, + 1 + ], + "line-width": 50 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/line-dasharray/overscaled/expected.png b/metrics/integration/render-tests/line-dasharray/overscaled/expected.png new file mode 100644 index 00000000000..7b495d58ee7 Binary files /dev/null and b/metrics/integration/render-tests/line-dasharray/overscaled/expected.png differ diff --git a/metrics/integration/render-tests/line-dasharray/overscaled/style.json b/metrics/integration/render-tests/line-dasharray/overscaled/style.json new file mode 100644 index 00000000000..9fefc820e5e --- /dev/null +++ b/metrics/integration/render-tests/line-dasharray/overscaled/style.json @@ -0,0 +1,45 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 17, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "road", + "type": "line", + "source": "mapbox", + "source-layer": "road", + "paint": { + "line-width": 2, + "line-color": "#000", + "line-dasharray": [ + 2.5, + 2.5 + ] + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/line-dasharray/round/segments/expected.png b/metrics/integration/render-tests/line-dasharray/round/segments/expected.png new file mode 100644 index 00000000000..1f63286776c Binary files /dev/null and b/metrics/integration/render-tests/line-dasharray/round/segments/expected.png differ diff --git a/metrics/integration/render-tests/line-dasharray/round/segments/style.json b/metrics/integration/render-tests/line-dasharray/round/segments/style.json new file mode 100644 index 00000000000..0ef061e46ae --- /dev/null +++ b/metrics/integration/render-tests/line-dasharray/round/segments/style.json @@ -0,0 +1,85 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 128, + "height": 64 + } + }, + "zoom": 0, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "property": 1 + }, + "geometry": { + "type": "LineString", + "coordinates": [ [ -40, -18 ], [ 40, -18 ] ] + } + }, + { + "type": "Feature", + "properties": { + "property": 2 + }, + "geometry": { + "type": "LineString", + "coordinates": [ [ -40, -10 ], [ 40, -10 ] ] + } + }, + { + "type": "Feature", + "properties": { + "property": 3 + }, + "geometry": { + "type": "LineString", + "coordinates": [ [ -40, -2 ], [ 40, -2 ] ] + } + }, + { + "type": "Feature", + "properties": { + "property": 6 + }, + "geometry": { + "type": "LineString", + "coordinates": [ [ -40, 7 ], [ 40, 7 ] ] + } + }, + { + "type": "Feature", + "properties": { + "property": 8 + }, + "geometry": { + "type": "LineString", + "coordinates": [ [ -40, 18 ], [ 40, 18 ] + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "road", + "type": "line", + "source": "geojson", + "layout": { + "line-cap": "round" + }, + "paint": { + "line-width": ["get", "property"], + "line-dasharray": [1, 2, 0, 4] + } + } + ] +} diff --git a/metrics/integration/render-tests/line-dasharray/round/zero-gap-width/expected.png b/metrics/integration/render-tests/line-dasharray/round/zero-gap-width/expected.png new file mode 100644 index 00000000000..3c33d025b26 Binary files /dev/null and b/metrics/integration/render-tests/line-dasharray/round/zero-gap-width/expected.png differ diff --git a/metrics/integration/render-tests/line-dasharray/round/zero-gap-width/style.json b/metrics/integration/render-tests/line-dasharray/round/zero-gap-width/style.json new file mode 100644 index 00000000000..1f25935b670 --- /dev/null +++ b/metrics/integration/render-tests/line-dasharray/round/zero-gap-width/style.json @@ -0,0 +1,85 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 128, + "height": 64 + } + }, + "zoom": 0, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "property": 1 + }, + "geometry": { + "type": "LineString", + "coordinates": [ [ -40, -18 ], [ 40, -18 ] ] + } + }, + { + "type": "Feature", + "properties": { + "property": 2 + }, + "geometry": { + "type": "LineString", + "coordinates": [ [ -40, -10 ], [ 40, -10 ] ] + } + }, + { + "type": "Feature", + "properties": { + "property": 3 + }, + "geometry": { + "type": "LineString", + "coordinates": [ [ -40, -2 ], [ 40, -2 ] ] + } + }, + { + "type": "Feature", + "properties": { + "property": 6 + }, + "geometry": { + "type": "LineString", + "coordinates": [ [ -40, 7 ], [ 40, 7 ] ] + } + }, + { + "type": "Feature", + "properties": { + "property": 8 + }, + "geometry": { + "type": "LineString", + "coordinates": [ [ -40, 18 ], [ 40, 18 ] + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "road", + "type": "line", + "source": "geojson", + "layout": { + "line-cap": "round" + }, + "paint": { + "line-width": ["get", "property"], + "line-dasharray": [0, 2] + } + } + ] +} diff --git a/metrics/integration/render-tests/line-dasharray/slant/expected.png b/metrics/integration/render-tests/line-dasharray/slant/expected.png new file mode 100644 index 00000000000..a96453abda0 Binary files /dev/null and b/metrics/integration/render-tests/line-dasharray/slant/expected.png differ diff --git a/metrics/integration/render-tests/line-dasharray/slant/style.json b/metrics/integration/render-tests/line-dasharray/slant/style.json new file mode 100644 index 00000000000..f063b04d961 --- /dev/null +++ b/metrics/integration/render-tests/line-dasharray/slant/style.json @@ -0,0 +1,45 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.429056, + 52.498167 + ], + "zoom": 18, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "road", + "type": "line", + "source": "mapbox", + "source-layer": "building", + "paint": { + "line-width": 4, + "line-color": "#000", + "line-dasharray": [ + 2.5, + 2.5 + ] + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/line-dasharray/zero-length-gap/expected.png b/metrics/integration/render-tests/line-dasharray/zero-length-gap/expected.png new file mode 100644 index 00000000000..004d3873e7c Binary files /dev/null and b/metrics/integration/render-tests/line-dasharray/zero-length-gap/expected.png differ diff --git a/metrics/integration/render-tests/line-dasharray/zero-length-gap/style.json b/metrics/integration/render-tests/line-dasharray/zero-length-gap/style.json new file mode 100644 index 00000000000..4efa605913f --- /dev/null +++ b/metrics/integration/render-tests/line-dasharray/zero-length-gap/style.json @@ -0,0 +1,108 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 128, + "height": 132 + } + }, + "zoom": 0, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "width": 2, + "offset": 0 + }, + "geometry": { + "type": "LineString", + "coordinates": [ [ -40, -18 ], [ 40, -18 ] ] + } + }, + { + "type": "Feature", + "properties": { + "width": 4, + "offset": 0 + }, + "geometry": { + "type": "LineString", + "coordinates": [ [ -40, -10 ], [ 40, -10 ] ] + } + }, + { + "type": "Feature", + "properties": { + "width": 6, + "offset": 0 + }, + "geometry": { + "type": "LineString", + "coordinates": [ [ -40, -2 ], [ 40, -2 ] ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "road0", + "type": "line", + "source": "geojson", + "paint": { + "line-width": ["get", "width"], + "line-offset": ["+", ["get", "offset"], 32], + "line-dasharray": [1, 0, 1, 1], + "line-color": "red" + } + }, + { + "id": "road1", + "type": "line", + "source": "geojson", + "paint": { + "line-width": ["get", "width"], + "line-offset": ["-", ["get", "offset"], 32], + "line-dasharray": [1, 1, 0], + "line-color": "green" + } + }, + { + "id": "road2", + "type": "line", + "source": "geojson", + "paint": { + "line-width": ["get", "width"], + "line-offset": ["-", ["get", "offset"], 64], + "line-dasharray": [1, 0, 1], + "line-color": "blue" + } + }, + { + "id": "road3", + "type": "line", + "source": "geojson", + "paint": { + "line-width": ["get", "width"], + "line-dasharray": [1, 0], + "line-color": "yellow" + } + }, + { + "id": "road4", + "type": "line", + "source": "geojson", + "paint": { + "line-width": ["get", "width"], + "line-dasharray": [0, 1], + "line-color": "black" + } + } + ] +} diff --git a/metrics/integration/render-tests/line-dasharray/zoom-history/expected.png b/metrics/integration/render-tests/line-dasharray/zoom-history/expected.png new file mode 100644 index 00000000000..aa5568e63e5 Binary files /dev/null and b/metrics/integration/render-tests/line-dasharray/zoom-history/expected.png differ diff --git a/metrics/integration/render-tests/line-dasharray/zoom-history/style.json b/metrics/integration/render-tests/line-dasharray/zoom-history/style.json new file mode 100644 index 00000000000..cf679f09ce6 --- /dev/null +++ b/metrics/integration/render-tests/line-dasharray/zoom-history/style.json @@ -0,0 +1,53 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 512, + "height": 512, + "operations": [ + [ + "wait" + ], + [ + "setZoom", + 1 + ], + [ + "wait" + ] + ] + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "LineString", + "coordinates": [ + [ + -150, + -75 + ], + [ + 150, + 75 + ] + ] + } + } + }, + "layers": [ + { + "id": "line", + "type": "line", + "source": "geojson", + "paint": { + "line-dasharray": [ + 1, + 2 + ], + "line-width": 16 + } + } + ] +} diff --git a/metrics/integration/render-tests/line-gap-width/default/expected.png b/metrics/integration/render-tests/line-gap-width/default/expected.png new file mode 100644 index 00000000000..ef32e3b169d Binary files /dev/null and b/metrics/integration/render-tests/line-gap-width/default/expected.png differ diff --git a/metrics/integration/render-tests/line-gap-width/default/style.json b/metrics/integration/render-tests/line-gap-width/default/style.json new file mode 100644 index 00000000000..3c1cce5bddb --- /dev/null +++ b/metrics/integration/render-tests/line-gap-width/default/style.json @@ -0,0 +1,69 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "allowed": 0.00075 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "MultiLineString", + "coordinates": [ + [ + [ + -14, + -16 + ], + [ + -14, + 0 + ], + [ + -14, + 16 + ] + ], + [ + [ + -3, + -16 + ], + [ + -3, + 0 + ], + [ + 0, + 16 + ] + ], + [ + [ + 8, + -16 + ], + [ + 12, + 16 + ], + [ + 16, + -16 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "line", + "type": "line", + "source": "geojson" + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/line-gap-width/function/expected.png b/metrics/integration/render-tests/line-gap-width/function/expected.png new file mode 100644 index 00000000000..126cb5a4c22 Binary files /dev/null and b/metrics/integration/render-tests/line-gap-width/function/expected.png differ diff --git a/metrics/integration/render-tests/line-gap-width/function/style.json b/metrics/integration/render-tests/line-gap-width/function/style.json new file mode 100644 index 00000000000..d66a2f77318 --- /dev/null +++ b/metrics/integration/render-tests/line-gap-width/function/style.json @@ -0,0 +1,83 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "allowed": 0.00075 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "MultiLineString", + "coordinates": [ + [ + [ + -14, + -16 + ], + [ + -14, + 0 + ], + [ + -14, + 16 + ] + ], + [ + [ + -3, + -16 + ], + [ + -3, + 0 + ], + [ + 0, + 16 + ] + ], + [ + [ + 8, + -16 + ], + [ + 12, + 16 + ], + [ + 16, + -16 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "line", + "type": "line", + "source": "geojson", + "paint": { + "line-gap-width": { + "stops": [ + [ + 0, + 5 + ], + [ + 1, + 8 + ] + ] + } + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/line-gap-width/literal/expected.png b/metrics/integration/render-tests/line-gap-width/literal/expected.png new file mode 100644 index 00000000000..92866c95e26 Binary files /dev/null and b/metrics/integration/render-tests/line-gap-width/literal/expected.png differ diff --git a/metrics/integration/render-tests/line-gap-width/literal/style.json b/metrics/integration/render-tests/line-gap-width/literal/style.json new file mode 100644 index 00000000000..b9e0e8a2452 --- /dev/null +++ b/metrics/integration/render-tests/line-gap-width/literal/style.json @@ -0,0 +1,72 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "allowed": 0.00075 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "MultiLineString", + "coordinates": [ + [ + [ + -14, + -16 + ], + [ + -14, + 0 + ], + [ + -14, + 16 + ] + ], + [ + [ + -3, + -16 + ], + [ + -3, + 0 + ], + [ + 0, + 16 + ] + ], + [ + [ + 8, + -16 + ], + [ + 12, + 16 + ], + [ + 16, + -16 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "line", + "type": "line", + "source": "geojson", + "paint": { + "line-gap-width": 3 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/line-gap-width/property-function/expected.png b/metrics/integration/render-tests/line-gap-width/property-function/expected.png new file mode 100644 index 00000000000..c263a00eb02 Binary files /dev/null and b/metrics/integration/render-tests/line-gap-width/property-function/expected.png differ diff --git a/metrics/integration/render-tests/line-gap-width/property-function/style.json b/metrics/integration/render-tests/line-gap-width/property-function/style.json new file mode 100644 index 00000000000..732600d4db6 --- /dev/null +++ b/metrics/integration/render-tests/line-gap-width/property-function/style.json @@ -0,0 +1,69 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "road", + "type": "line", + "source": "mapbox", + "source-layer": "road", + "paint": { + "line-gap-width": { + "property": "class", + "type": "categorical", + "stops": [ + [ + "path", + 1 + ], + [ + "driveway", + 2 + ], + [ + "service", + 3 + ], + [ + "street_limited", + 4 + ], + [ + "street", + 5 + ], + [ + "main", + 6 + ] + ] + } + } + } + ] +} diff --git a/metrics/integration/render-tests/line-gradient/gradient-tile-boundaries/expected.png b/metrics/integration/render-tests/line-gradient/gradient-tile-boundaries/expected.png new file mode 100644 index 00000000000..e85d8986b31 Binary files /dev/null and b/metrics/integration/render-tests/line-gradient/gradient-tile-boundaries/expected.png differ diff --git a/metrics/integration/render-tests/line-gradient/gradient-tile-boundaries/style.json b/metrics/integration/render-tests/line-gradient/gradient-tile-boundaries/style.json new file mode 100644 index 00000000000..106da0da967 --- /dev/null +++ b/metrics/integration/render-tests/line-gradient/gradient-tile-boundaries/style.json @@ -0,0 +1,56 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 128 + } + }, + "center": [ + -77.02803308586635, + 38.891047607560125 + ], + "zoom": 18, + "sources": { + "gradient": { + "type": "geojson", + "data": { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "LineString", + "coordinates": [ + [-77.028035, 38.890600 ], + [-77.028035, 38.891088 ] + ] + } + }, + "lineMetrics": true + } + }, + "layers": [ + { + "id": "line", + "type": "line", + "source": "gradient", + "layout": { + "line-cap": "round", + "line-join": "round" + }, + "paint": { + "line-width": 15, + "line-gradient": [ + "interpolate", + ["linear"], + ["line-progress"], + 0, "rgba(0, 0, 255, 0)", + 0.1, "royalblue", + 0.3, "cyan", + 0.5, "lime", + 0.7, "yellow", + 1, "red" + ] + } + } + ] +} diff --git a/metrics/integration/render-tests/line-gradient/gradient/expected.png b/metrics/integration/render-tests/line-gradient/gradient/expected.png new file mode 100644 index 00000000000..d2381f658eb Binary files /dev/null and b/metrics/integration/render-tests/line-gradient/gradient/expected.png differ diff --git a/metrics/integration/render-tests/line-gradient/gradient/style.json b/metrics/integration/render-tests/line-gradient/gradient/style.json new file mode 100644 index 00000000000..9a9b003e087 --- /dev/null +++ b/metrics/integration/render-tests/line-gradient/gradient/style.json @@ -0,0 +1,82 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 100, + "height": 100 + } + }, + "zoom": 2, + "sources": { + "gradient": { + "type": "geojson", + "data": { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -1, + 8 + ], + [ + 8, + 1 + ], + [ + 1, + -8 + ], + [ + -8, + -1 + ], + [ + 1, + 4 + ], + [ + 4, + -1 + ], + [ + -1, + -4 + ], + [ + -2, + 0 + ] + ] + } + }, + "lineMetrics": true + } + }, + "layers": [ + { + "id": "line", + "type": "line", + "source": "gradient", + "layout": { + "line-cap": "round", + "line-join": "round" + }, + "paint": { + "line-width": 10, + "line-gradient": [ + "interpolate", + ["linear"], + ["line-progress"], + 0, "rgba(0, 0, 255, 0)", + 0.1, "royalblue", + 0.3, "cyan", + 0.5, "lime", + 0.7, "yellow", + 1, "red" + ] + } + } + ] +} diff --git a/metrics/integration/render-tests/line-gradient/translucent/expected.png b/metrics/integration/render-tests/line-gradient/translucent/expected.png new file mode 100644 index 00000000000..73399722761 Binary files /dev/null and b/metrics/integration/render-tests/line-gradient/translucent/expected.png differ diff --git a/metrics/integration/render-tests/line-gradient/translucent/style.json b/metrics/integration/render-tests/line-gradient/translucent/style.json new file mode 100644 index 00000000000..c78380b12cd --- /dev/null +++ b/metrics/integration/render-tests/line-gradient/translucent/style.json @@ -0,0 +1,83 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 100, + "height": 100, + "allowed": 0.00075 + } + }, + "zoom": 2, + "sources": { + "gradient": { + "type": "geojson", + "data": { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -1, + 8 + ], + [ + 8, + 1 + ], + [ + 1, + -8 + ], + [ + -8, + -1 + ], + [ + 1, + 4 + ], + [ + 4, + -1 + ], + [ + -1, + -4 + ], + [ + -2, + 0 + ] + ] + } + }, + "lineMetrics": true + } + }, + "layers": [ + { + "id": "line", + "type": "line", + "source": "gradient", + "layout": { + "line-cap": "round", + "line-join": "round" + }, + "paint": { + "line-width": 10, + "line-gradient": [ + "interpolate", + ["linear"], + ["line-progress"], + 0, "rgba(255, 0, 0, 1)", + 0.35, "rgba(255, 0, 0, 0)", + 0.351, "rgba(255, 0, 0, 1)", + 0.5, "rgba(255, 0, 0, 0.5)", + 0.75, "rgba(255, 0, 0, 0)", + 1, "rgba(255, 0, 0, 1)" + ] + } + } + ] +} diff --git a/metrics/integration/render-tests/line-join/bevel-transparent/expected.png b/metrics/integration/render-tests/line-join/bevel-transparent/expected.png new file mode 100644 index 00000000000..7102d87f12f Binary files /dev/null and b/metrics/integration/render-tests/line-join/bevel-transparent/expected.png differ diff --git a/metrics/integration/render-tests/line-join/bevel-transparent/style.json b/metrics/integration/render-tests/line-join/bevel-transparent/style.json new file mode 100644 index 00000000000..c4ac5e243b2 --- /dev/null +++ b/metrics/integration/render-tests/line-join/bevel-transparent/style.json @@ -0,0 +1,104 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 112, + "height": 64, + "allowed": 0.00075 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "MultiLineString", + "coordinates": [ + [ + [ + -24, + -16 + ], + [ + -24, + 0 + ], + [ + -24, + 16 + ] + ], + [ + [ + -13, + -16 + ], + [ + -13, + 0 + ], + [ + -10, + 16 + ] + ], + [ + [ + -2, + -16 + ], + [ + 2, + 16 + ], + [ + 6, + -16 + ] + ], + [ + [ + 14, + -16 + ], + [ + 14, + 16 + ], + [ + 14, + 0 + ] + ], + [ + [ + 24, + -16 + ], + [ + 24, + 16 + ], + [ + 24.2, + -16 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "line", + "type": "line", + "source": "geojson", + "layout": { + "line-join": "bevel" + }, + "paint": { + "line-width": 8, + "line-opacity": 0.5 + } + } + ] +} diff --git a/metrics/integration/render-tests/line-join/bevel/expected.png b/metrics/integration/render-tests/line-join/bevel/expected.png new file mode 100644 index 00000000000..f5c6e53c05a Binary files /dev/null and b/metrics/integration/render-tests/line-join/bevel/expected.png differ diff --git a/metrics/integration/render-tests/line-join/bevel/style.json b/metrics/integration/render-tests/line-join/bevel/style.json new file mode 100644 index 00000000000..58fd6b584ea --- /dev/null +++ b/metrics/integration/render-tests/line-join/bevel/style.json @@ -0,0 +1,103 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 112, + "height": 64, + "allowed": 0.00075 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "MultiLineString", + "coordinates": [ + [ + [ + -24, + -16 + ], + [ + -24, + 0 + ], + [ + -24, + 16 + ] + ], + [ + [ + -13, + -16 + ], + [ + -13, + 0 + ], + [ + -10, + 16 + ] + ], + [ + [ + -2, + -16 + ], + [ + 2, + 16 + ], + [ + 6, + -16 + ] + ], + [ + [ + 14, + -16 + ], + [ + 14, + 16 + ], + [ + 14, + 0 + ] + ], + [ + [ + 24, + -16 + ], + [ + 24, + 16 + ], + [ + 24.2, + -16 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "line", + "type": "line", + "source": "geojson", + "layout": { + "line-join": "bevel" + }, + "paint": { + "line-width": 8 + } + } + ] +} diff --git a/metrics/integration/render-tests/line-join/default/expected.png b/metrics/integration/render-tests/line-join/default/expected.png new file mode 100644 index 00000000000..f5c6e53c05a Binary files /dev/null and b/metrics/integration/render-tests/line-join/default/expected.png differ diff --git a/metrics/integration/render-tests/line-join/default/style.json b/metrics/integration/render-tests/line-join/default/style.json new file mode 100644 index 00000000000..94694f0abcc --- /dev/null +++ b/metrics/integration/render-tests/line-join/default/style.json @@ -0,0 +1,100 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 112, + "height": 64, + "allowed": 0.00075 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "MultiLineString", + "coordinates": [ + [ + [ + -24, + -16 + ], + [ + -24, + 0 + ], + [ + -24, + 16 + ] + ], + [ + [ + -13, + -16 + ], + [ + -13, + 0 + ], + [ + -10, + 16 + ] + ], + [ + [ + -2, + -16 + ], + [ + 2, + 16 + ], + [ + 6, + -16 + ] + ], + [ + [ + 14, + -16 + ], + [ + 14, + 16 + ], + [ + 14, + 0 + ] + ], + [ + [ + 24, + -16 + ], + [ + 24, + 16 + ], + [ + 24.2, + -16 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "line", + "type": "line", + "source": "geojson", + "paint": { + "line-width": 8 + } + } + ] +} diff --git a/metrics/integration/render-tests/line-join/miter-transparent/expected.png b/metrics/integration/render-tests/line-join/miter-transparent/expected.png new file mode 100644 index 00000000000..7102d87f12f Binary files /dev/null and b/metrics/integration/render-tests/line-join/miter-transparent/expected.png differ diff --git a/metrics/integration/render-tests/line-join/miter-transparent/style.json b/metrics/integration/render-tests/line-join/miter-transparent/style.json new file mode 100644 index 00000000000..6c2d904c22c --- /dev/null +++ b/metrics/integration/render-tests/line-join/miter-transparent/style.json @@ -0,0 +1,104 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 112, + "height": 64, + "allowed": 0.00075 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "MultiLineString", + "coordinates": [ + [ + [ + -24, + -16 + ], + [ + -24, + 0 + ], + [ + -24, + 16 + ] + ], + [ + [ + -13, + -16 + ], + [ + -13, + 0 + ], + [ + -10, + 16 + ] + ], + [ + [ + -2, + -16 + ], + [ + 2, + 16 + ], + [ + 6, + -16 + ] + ], + [ + [ + 14, + -16 + ], + [ + 14, + 16 + ], + [ + 14, + 0 + ] + ], + [ + [ + 24, + -16 + ], + [ + 24, + 16 + ], + [ + 24.2, + -16 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "line", + "type": "line", + "source": "geojson", + "layout": { + "line-join": "miter" + }, + "paint": { + "line-width": 8, + "line-opacity": 0.5 + } + } + ] +} diff --git a/metrics/integration/render-tests/line-join/miter/expected.png b/metrics/integration/render-tests/line-join/miter/expected.png new file mode 100644 index 00000000000..f5c6e53c05a Binary files /dev/null and b/metrics/integration/render-tests/line-join/miter/expected.png differ diff --git a/metrics/integration/render-tests/line-join/miter/style.json b/metrics/integration/render-tests/line-join/miter/style.json new file mode 100644 index 00000000000..8aabc8890ad --- /dev/null +++ b/metrics/integration/render-tests/line-join/miter/style.json @@ -0,0 +1,103 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 112, + "height": 64, + "allowed": 0.00075 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "MultiLineString", + "coordinates": [ + [ + [ + -24, + -16 + ], + [ + -24, + 0 + ], + [ + -24, + 16 + ] + ], + [ + [ + -13, + -16 + ], + [ + -13, + 0 + ], + [ + -10, + 16 + ] + ], + [ + [ + -2, + -16 + ], + [ + 2, + 16 + ], + [ + 6, + -16 + ] + ], + [ + [ + 14, + -16 + ], + [ + 14, + 16 + ], + [ + 14, + 0 + ] + ], + [ + [ + 24, + -16 + ], + [ + 24, + 16 + ], + [ + 24.2, + -16 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "line", + "type": "line", + "source": "geojson", + "layout": { + "line-join": "miter" + }, + "paint": { + "line-width": 8 + } + } + ] +} diff --git a/metrics/integration/render-tests/line-join/property-function-dasharray/expected.png b/metrics/integration/render-tests/line-join/property-function-dasharray/expected.png new file mode 100644 index 00000000000..fef23ec06f1 Binary files /dev/null and b/metrics/integration/render-tests/line-join/property-function-dasharray/expected.png differ diff --git a/metrics/integration/render-tests/line-join/property-function-dasharray/style.json b/metrics/integration/render-tests/line-join/property-function-dasharray/style.json new file mode 100644 index 00000000000..e1cfe7a60a1 --- /dev/null +++ b/metrics/integration/render-tests/line-join/property-function-dasharray/style.json @@ -0,0 +1,130 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 128, + "height": 64 + } + }, + "zoom": 0, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "join": "miter" + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -36, + 16 + ], + [ + -36, + 0 + ], + [ + -20, + -16 + ], + [ + -20, + 16 + ], + [ + -28, + 16 + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "join": "round" + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -8, + 16 + ], + [ + -8, + 0 + ], + [ + 8, + -16 + ], + [ + 8, + 16 + ], + [ + 0, + 16 + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "join": "bevel" + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + 20, + 16 + ], + [ + 20, + 0 + ], + [ + 36, + -16 + ], + [ + 36, + 16 + ], + [ + 28, + 16 + ] + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "line", + "type": "line", + "source": "geojson", + "layout": { + "line-join": { + "type": "identity", + "property": "join" + } + }, + "paint": { + "line-width": 8, + "line-dasharray": [1, 1] + } + } + ] +} diff --git a/metrics/integration/render-tests/line-join/property-function/expected.png b/metrics/integration/render-tests/line-join/property-function/expected.png new file mode 100644 index 00000000000..b4be40940a8 Binary files /dev/null and b/metrics/integration/render-tests/line-join/property-function/expected.png differ diff --git a/metrics/integration/render-tests/line-join/property-function/style.json b/metrics/integration/render-tests/line-join/property-function/style.json new file mode 100644 index 00000000000..d73fcb76747 --- /dev/null +++ b/metrics/integration/render-tests/line-join/property-function/style.json @@ -0,0 +1,129 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 128, + "height": 64 + } + }, + "zoom": 0, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "join": "miter" + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -36, + 16 + ], + [ + -36, + 0 + ], + [ + -20, + -16 + ], + [ + -20, + 16 + ], + [ + -28, + 16 + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "join": "round" + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -8, + 16 + ], + [ + -8, + 0 + ], + [ + 8, + -16 + ], + [ + 8, + 16 + ], + [ + 0, + 16 + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "join": "bevel" + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + 20, + 16 + ], + [ + 20, + 0 + ], + [ + 36, + -16 + ], + [ + 36, + 16 + ], + [ + 28, + 16 + ] + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "line", + "type": "line", + "source": "geojson", + "layout": { + "line-join": { + "type": "identity", + "property": "join" + } + }, + "paint": { + "line-width": 8 + } + } + ] +} diff --git a/metrics/integration/render-tests/line-join/round-transparent/expected.png b/metrics/integration/render-tests/line-join/round-transparent/expected.png new file mode 100644 index 00000000000..f35dc4f0d39 Binary files /dev/null and b/metrics/integration/render-tests/line-join/round-transparent/expected.png differ diff --git a/metrics/integration/render-tests/line-join/round-transparent/style.json b/metrics/integration/render-tests/line-join/round-transparent/style.json new file mode 100644 index 00000000000..b455bb032c8 --- /dev/null +++ b/metrics/integration/render-tests/line-join/round-transparent/style.json @@ -0,0 +1,104 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 112, + "height": 64, + "allowed": 0.00075 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "MultiLineString", + "coordinates": [ + [ + [ + -24, + -16 + ], + [ + -24, + 0 + ], + [ + -24, + 16 + ] + ], + [ + [ + -13, + -16 + ], + [ + -13, + 0 + ], + [ + -10, + 16 + ] + ], + [ + [ + -2, + -16 + ], + [ + 2, + 16 + ], + [ + 6, + -16 + ] + ], + [ + [ + 14, + -16 + ], + [ + 14, + 16 + ], + [ + 14, + 0 + ] + ], + [ + [ + 24, + -16 + ], + [ + 24, + 16 + ], + [ + 24.2, + -16 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "line", + "type": "line", + "source": "geojson", + "layout": { + "line-join": "round" + }, + "paint": { + "line-width": 8, + "line-opacity": 0.5 + } + } + ] +} diff --git a/metrics/integration/render-tests/line-join/round/expected.png b/metrics/integration/render-tests/line-join/round/expected.png new file mode 100644 index 00000000000..339638aad28 Binary files /dev/null and b/metrics/integration/render-tests/line-join/round/expected.png differ diff --git a/metrics/integration/render-tests/line-join/round/style.json b/metrics/integration/render-tests/line-join/round/style.json new file mode 100644 index 00000000000..3472973fc75 --- /dev/null +++ b/metrics/integration/render-tests/line-join/round/style.json @@ -0,0 +1,103 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 112, + "height": 64, + "allowed": 0.00075 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "MultiLineString", + "coordinates": [ + [ + [ + -24, + -16 + ], + [ + -24, + 0 + ], + [ + -24, + 16 + ] + ], + [ + [ + -13, + -16 + ], + [ + -13, + 0 + ], + [ + -10, + 16 + ] + ], + [ + [ + -2, + -16 + ], + [ + 2, + 16 + ], + [ + 6, + -16 + ] + ], + [ + [ + 14, + -16 + ], + [ + 14, + 16 + ], + [ + 14, + 0 + ] + ], + [ + [ + 24, + -16 + ], + [ + 24, + 16 + ], + [ + 24.2, + -16 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "line", + "type": "line", + "source": "geojson", + "layout": { + "line-join": "round" + }, + "paint": { + "line-width": 8 + } + } + ] +} diff --git a/metrics/integration/render-tests/line-offset/default/expected.png b/metrics/integration/render-tests/line-offset/default/expected.png new file mode 100644 index 00000000000..9c36c78cd3f Binary files /dev/null and b/metrics/integration/render-tests/line-offset/default/expected.png differ diff --git a/metrics/integration/render-tests/line-offset/default/style.json b/metrics/integration/render-tests/line-offset/default/style.json new file mode 100644 index 00000000000..42234103913 --- /dev/null +++ b/metrics/integration/render-tests/line-offset/default/style.json @@ -0,0 +1,42 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "road", + "type": "line", + "source": "mapbox", + "source-layer": "road", + "paint": { + "line-width": 2, + "line-color": "#000", + "line-offset": 0 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/line-offset/function/expected.png b/metrics/integration/render-tests/line-offset/function/expected.png new file mode 100644 index 00000000000..fc082593f86 Binary files /dev/null and b/metrics/integration/render-tests/line-offset/function/expected.png differ diff --git a/metrics/integration/render-tests/line-offset/function/style.json b/metrics/integration/render-tests/line-offset/function/style.json new file mode 100644 index 00000000000..32fc629bbc4 --- /dev/null +++ b/metrics/integration/render-tests/line-offset/function/style.json @@ -0,0 +1,53 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "road", + "type": "line", + "source": "mapbox", + "source-layer": "road", + "paint": { + "line-width": 2, + "line-color": "#000", + "line-offset": { + "stops": [ + [ + 13, + 1 + ], + [ + 15, + 4 + ] + ] + } + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/line-offset/literal-negative/expected.png b/metrics/integration/render-tests/line-offset/literal-negative/expected.png new file mode 100644 index 00000000000..b12cc6fce55 Binary files /dev/null and b/metrics/integration/render-tests/line-offset/literal-negative/expected.png differ diff --git a/metrics/integration/render-tests/line-offset/literal-negative/style.json b/metrics/integration/render-tests/line-offset/literal-negative/style.json new file mode 100644 index 00000000000..b9c5e68caaa --- /dev/null +++ b/metrics/integration/render-tests/line-offset/literal-negative/style.json @@ -0,0 +1,43 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256, + "allowed": 0.0002 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "road", + "type": "line", + "source": "mapbox", + "source-layer": "road", + "paint": { + "line-width": 2, + "line-color": "#000", + "line-offset": -3 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/line-offset/literal/expected.png b/metrics/integration/render-tests/line-offset/literal/expected.png new file mode 100644 index 00000000000..77517bcf26d Binary files /dev/null and b/metrics/integration/render-tests/line-offset/literal/expected.png differ diff --git a/metrics/integration/render-tests/line-offset/literal/style.json b/metrics/integration/render-tests/line-offset/literal/style.json new file mode 100644 index 00000000000..81ef815b789 --- /dev/null +++ b/metrics/integration/render-tests/line-offset/literal/style.json @@ -0,0 +1,42 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "road", + "type": "line", + "source": "mapbox", + "source-layer": "road", + "paint": { + "line-width": 2, + "line-color": "#000", + "line-offset": 2 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/line-offset/property-function/expected.png b/metrics/integration/render-tests/line-offset/property-function/expected.png new file mode 100644 index 00000000000..47619f4839b Binary files /dev/null and b/metrics/integration/render-tests/line-offset/property-function/expected.png differ diff --git a/metrics/integration/render-tests/line-offset/property-function/style.json b/metrics/integration/render-tests/line-offset/property-function/style.json new file mode 100644 index 00000000000..9c611f97fa9 --- /dev/null +++ b/metrics/integration/render-tests/line-offset/property-function/style.json @@ -0,0 +1,69 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "road", + "type": "line", + "source": "mapbox", + "source-layer": "road", + "paint": { + "line-offset": { + "property": "class", + "type": "categorical", + "stops": [ + [ + "path", + 1 + ], + [ + "driveway", + 2 + ], + [ + "service", + 3 + ], + [ + "street_limited", + 4 + ], + [ + "street", + 5 + ], + [ + "main", + 6 + ] + ] + } + } + } + ] +} diff --git a/metrics/integration/render-tests/line-opacity/default/expected.png b/metrics/integration/render-tests/line-opacity/default/expected.png new file mode 100644 index 00000000000..26f41c832a4 Binary files /dev/null and b/metrics/integration/render-tests/line-opacity/default/expected.png differ diff --git a/metrics/integration/render-tests/line-opacity/default/style.json b/metrics/integration/render-tests/line-opacity/default/style.json new file mode 100644 index 00000000000..01b8ab97896 --- /dev/null +++ b/metrics/integration/render-tests/line-opacity/default/style.json @@ -0,0 +1,72 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "allowed": 0.00075 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "MultiLineString", + "coordinates": [ + [ + [ + -14, + -16 + ], + [ + -14, + 0 + ], + [ + -14, + 16 + ] + ], + [ + [ + -3, + -16 + ], + [ + -3, + 0 + ], + [ + 0, + 16 + ] + ], + [ + [ + 8, + -16 + ], + [ + 12, + 16 + ], + [ + 16, + -16 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "line", + "type": "line", + "source": "geojson", + "paint": { + "line-width": 8 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/line-opacity/function/expected.png b/metrics/integration/render-tests/line-opacity/function/expected.png new file mode 100644 index 00000000000..0ae6100ae29 Binary files /dev/null and b/metrics/integration/render-tests/line-opacity/function/expected.png differ diff --git a/metrics/integration/render-tests/line-opacity/function/style.json b/metrics/integration/render-tests/line-opacity/function/style.json new file mode 100644 index 00000000000..b130e9094db --- /dev/null +++ b/metrics/integration/render-tests/line-opacity/function/style.json @@ -0,0 +1,84 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "allowed": 0.00075 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "MultiLineString", + "coordinates": [ + [ + [ + -14, + -16 + ], + [ + -14, + 0 + ], + [ + -14, + 16 + ] + ], + [ + [ + -3, + -16 + ], + [ + -3, + 0 + ], + [ + 0, + 16 + ] + ], + [ + [ + 8, + -16 + ], + [ + 12, + 16 + ], + [ + 16, + -16 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "line", + "type": "line", + "source": "geojson", + "paint": { + "line-width": 8, + "line-opacity": { + "stops": [ + [ + 0, + 0.5 + ], + [ + 1, + 0.6 + ] + ] + } + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/line-opacity/literal/expected.png b/metrics/integration/render-tests/line-opacity/literal/expected.png new file mode 100644 index 00000000000..4e7831b2ce9 Binary files /dev/null and b/metrics/integration/render-tests/line-opacity/literal/expected.png differ diff --git a/metrics/integration/render-tests/line-opacity/literal/style.json b/metrics/integration/render-tests/line-opacity/literal/style.json new file mode 100644 index 00000000000..50213cf69e3 --- /dev/null +++ b/metrics/integration/render-tests/line-opacity/literal/style.json @@ -0,0 +1,73 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "allowed": 0.00075 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "MultiLineString", + "coordinates": [ + [ + [ + -14, + -16 + ], + [ + -14, + 0 + ], + [ + -14, + 16 + ] + ], + [ + [ + -3, + -16 + ], + [ + -3, + 0 + ], + [ + 0, + 16 + ] + ], + [ + [ + 8, + -16 + ], + [ + 12, + 16 + ], + [ + 16, + -16 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "line", + "type": "line", + "source": "geojson", + "paint": { + "line-width": 8, + "line-opacity": 0.3 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/line-opacity/property-function/expected.png b/metrics/integration/render-tests/line-opacity/property-function/expected.png new file mode 100644 index 00000000000..a7915e89806 Binary files /dev/null and b/metrics/integration/render-tests/line-opacity/property-function/expected.png differ diff --git a/metrics/integration/render-tests/line-opacity/property-function/style.json b/metrics/integration/render-tests/line-opacity/property-function/style.json new file mode 100644 index 00000000000..3c3893015f0 --- /dev/null +++ b/metrics/integration/render-tests/line-opacity/property-function/style.json @@ -0,0 +1,70 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "road", + "type": "line", + "source": "mapbox", + "source-layer": "road", + "paint": { + "line-width": 10, + "line-opacity": { + "property": "class", + "type": "categorical", + "stops": [ + [ + "path", + 0 + ], + [ + "driveway", + 0.2 + ], + [ + "service", + 0.4 + ], + [ + "street_limited", + 0.6 + ], + [ + "street", + 0.8 + ], + [ + "main", + 1 + ] + ] + } + } + } + ] +} diff --git a/metrics/integration/render-tests/line-opacity/step-curve/expected.png b/metrics/integration/render-tests/line-opacity/step-curve/expected.png new file mode 100644 index 00000000000..4cc39724f3f Binary files /dev/null and b/metrics/integration/render-tests/line-opacity/step-curve/expected.png differ diff --git a/metrics/integration/render-tests/line-opacity/step-curve/style.json b/metrics/integration/render-tests/line-opacity/step-curve/style.json new file mode 100644 index 00000000000..a649864026b --- /dev/null +++ b/metrics/integration/render-tests/line-opacity/step-curve/style.json @@ -0,0 +1,84 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 64, + "width": 64 + } + }, + "center": [ + 0, + 0 + ], + "zoom": 0.99, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { "class": "motorway" }, + "geometry": { + "type": "LineString", + "coordinates": [ + [-10, 10], + [10, -10] + ] + } + }, + { + "type": "Feature", + "properties": { "class": "trunk" }, + "geometry": { + "type": "LineString", + "coordinates": [ + [10, 10], + [-10, -10] + ] + } + }, + { + "type": "Feature", + "properties": { "class": "other" }, + "geometry": { + "type": "LineString", + "coordinates": [ + [-10, 0], + [10, 0] + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "road", + "type": "line", + "source": "geojson", + "paint": { + "line-width": 10, + "line-opacity": [ + "step", ["zoom"], + ["match", ["string", ["get", "class"]], + "motorway", 1, + "trunk", 0.25, + 0.1 + ], + 1, + 1 + ] + } + } + ] +} diff --git a/metrics/integration/render-tests/line-pattern/@2x/expected.png b/metrics/integration/render-tests/line-pattern/@2x/expected.png new file mode 100644 index 00000000000..9aefa026012 Binary files /dev/null and b/metrics/integration/render-tests/line-pattern/@2x/expected.png differ diff --git a/metrics/integration/render-tests/line-pattern/@2x/style.json b/metrics/integration/render-tests/line-pattern/@2x/style.json new file mode 100644 index 00000000000..281273cc532 --- /dev/null +++ b/metrics/integration/render-tests/line-pattern/@2x/style.json @@ -0,0 +1,90 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "pixelRatio": 2 + } + }, + "sources": { + "a": { + "type": "geojson", + "data": { + "type": "LineString", + "coordinates": [ + [ + -10, + -10 + ], + [ + 10, + -10 + ] + ] + } + }, + "b": { + "type": "geojson", + "data": { + "type": "LineString", + "coordinates": [ + [ + -10, + 0 + ], + [ + 10, + 0 + ] + ] + } + }, + "c": { + "type": "geojson", + "data": { + "type": "LineString", + "coordinates": [ + [ + -10, + 10 + ], + [ + 10, + 10 + ] + ] + } + } + }, + "sprite": "local://sprites/emerald", + "layers": [ + { + "id": "a", + "type": "line", + "source": "a", + "paint": { + "line-width": 2, + "line-pattern": "generic_icon" + } + }, + { + "id": "b", + "type": "line", + "source": "b", + "paint": { + "line-width": 4, + "line-pattern": "generic_icon" + } + }, + { + "id": "c", + "type": "line", + "source": "c", + "paint": { + "line-width": 8, + "line-pattern": "generic_icon" + } + } + ] +} diff --git a/metrics/integration/render-tests/line-pattern/literal/expected.png b/metrics/integration/render-tests/line-pattern/literal/expected.png new file mode 100644 index 00000000000..c93c29a5cca Binary files /dev/null and b/metrics/integration/render-tests/line-pattern/literal/expected.png differ diff --git a/metrics/integration/render-tests/line-pattern/literal/style.json b/metrics/integration/render-tests/line-pattern/literal/style.json new file mode 100644 index 00000000000..a458d6d05eb --- /dev/null +++ b/metrics/integration/render-tests/line-pattern/literal/style.json @@ -0,0 +1,89 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "a": { + "type": "geojson", + "data": { + "type": "LineString", + "coordinates": [ + [ + -10, + -10 + ], + [ + 10, + -10 + ] + ] + } + }, + "b": { + "type": "geojson", + "data": { + "type": "LineString", + "coordinates": [ + [ + -10, + 0 + ], + [ + 10, + 0 + ] + ] + } + }, + "c": { + "type": "geojson", + "data": { + "type": "LineString", + "coordinates": [ + [ + -10, + 10 + ], + [ + 10, + 10 + ] + ] + } + } + }, + "sprite": "local://sprites/emerald", + "layers": [ + { + "id": "a", + "type": "line", + "source": "a", + "paint": { + "line-width": 2, + "line-pattern": "generic_icon" + } + }, + { + "id": "b", + "type": "line", + "source": "b", + "paint": { + "line-width": 4, + "line-pattern": "generic_icon" + } + }, + { + "id": "c", + "type": "line", + "source": "c", + "paint": { + "line-width": 8, + "line-pattern": "generic_icon" + } + } + ] +} diff --git a/metrics/integration/render-tests/line-pattern/opacity/expected.png b/metrics/integration/render-tests/line-pattern/opacity/expected.png new file mode 100644 index 00000000000..b94d13b4c36 Binary files /dev/null and b/metrics/integration/render-tests/line-pattern/opacity/expected.png differ diff --git a/metrics/integration/render-tests/line-pattern/opacity/style.json b/metrics/integration/render-tests/line-pattern/opacity/style.json new file mode 100644 index 00000000000..632cd4715bc --- /dev/null +++ b/metrics/integration/render-tests/line-pattern/opacity/style.json @@ -0,0 +1,92 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "a": { + "type": "geojson", + "data": { + "type": "LineString", + "coordinates": [ + [ + -10, + -10 + ], + [ + 10, + -10 + ] + ] + } + }, + "b": { + "type": "geojson", + "data": { + "type": "LineString", + "coordinates": [ + [ + -10, + 0 + ], + [ + 10, + 0 + ] + ] + } + }, + "c": { + "type": "geojson", + "data": { + "type": "LineString", + "coordinates": [ + [ + -10, + 10 + ], + [ + 10, + 10 + ] + ] + } + } + }, + "sprite": "local://sprites/emerald", + "layers": [ + { + "id": "a", + "type": "line", + "source": "a", + "paint": { + "line-width": 2, + "line-opacity": 0.5, + "line-pattern": "generic_icon" + } + }, + { + "id": "b", + "type": "line", + "source": "b", + "paint": { + "line-width": 4, + "line-opacity": 0.5, + "line-pattern": "generic_icon" + } + }, + { + "id": "c", + "type": "line", + "source": "c", + "paint": { + "line-width": 8, + "line-opacity": 0.5, + "line-pattern": "generic_icon" + } + } + ] +} diff --git a/metrics/integration/render-tests/line-pattern/overscaled/expected.png b/metrics/integration/render-tests/line-pattern/overscaled/expected.png new file mode 100644 index 00000000000..9397519221a Binary files /dev/null and b/metrics/integration/render-tests/line-pattern/overscaled/expected.png differ diff --git a/metrics/integration/render-tests/line-pattern/overscaled/style.json b/metrics/integration/render-tests/line-pattern/overscaled/style.json new file mode 100644 index 00000000000..e1960eeb97e --- /dev/null +++ b/metrics/integration/render-tests/line-pattern/overscaled/style.json @@ -0,0 +1,97 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 128, + "width": 64 + } + }, + "zoom": 11.7, + "sources": { + "a": { + "type": "geojson", + "maxzoom": 10, + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "class": "street" + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + 10, + -0.01 + ], + [ + -10, + -0.01 + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "class": "path" + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -10, + 0 + ], + [ + 10, + 0 + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "class": "street" + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -10, + 0.01 + ], + [ + 10, + 0.01 + ] + ] + } + } + ] + } + } + }, + "sprite": "local://sprites/emerald", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "road", + "type": "line", + "source": "a", + "paint": { + "line-width": 20, + "line-pattern": "generic_icon" + } + } + ] +} diff --git a/metrics/integration/render-tests/line-pattern/pitch/expected.png b/metrics/integration/render-tests/line-pattern/pitch/expected.png new file mode 100644 index 00000000000..44174f9118d Binary files /dev/null and b/metrics/integration/render-tests/line-pattern/pitch/expected.png differ diff --git a/metrics/integration/render-tests/line-pattern/pitch/style.json b/metrics/integration/render-tests/line-pattern/pitch/style.json new file mode 100644 index 00000000000..8da8920cb21 --- /dev/null +++ b/metrics/integration/render-tests/line-pattern/pitch/style.json @@ -0,0 +1,44 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 17, + "pitch": 60, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "sprite": "local://sprites/emerald", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "road", + "type": "line", + "source": "mapbox", + "source-layer": "road", + "paint": { + "line-width": 20, + "line-pattern": "generic_icon", + "line-opacity": 0.5 + } + } + ] +} diff --git a/metrics/integration/render-tests/line-pattern/property-function/expected.png b/metrics/integration/render-tests/line-pattern/property-function/expected.png new file mode 100644 index 00000000000..65fc1687d2b Binary files /dev/null and b/metrics/integration/render-tests/line-pattern/property-function/expected.png differ diff --git a/metrics/integration/render-tests/line-pattern/property-function/style.json b/metrics/integration/render-tests/line-pattern/property-function/style.json new file mode 100644 index 00000000000..57be602f7bb --- /dev/null +++ b/metrics/integration/render-tests/line-pattern/property-function/style.json @@ -0,0 +1,96 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 128, + "width": 128 + } + }, + "zoom": 2, + "sprite": "local://sprites/emerald", + "sources": { + "a": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "class": "street" + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + 10, + -10 + ], + [ + -10, + -10 + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "class": "path" + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -10, + 0 + ], + [ + 10, + 0 + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "class": "street" + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -10, + 10 + ], + [ + 10, + 10 + ] + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "road", + "type": "line", + "source": "a", + "paint": { + "line-width": 10, + "line-pattern": ["case", ["==", ["get", "class"], "street"], "generic_icon", "generic_metro" ] + } + } + ] +} diff --git a/metrics/integration/render-tests/line-pattern/step-curve/expected.png b/metrics/integration/render-tests/line-pattern/step-curve/expected.png new file mode 100644 index 00000000000..5d384c00ec1 Binary files /dev/null and b/metrics/integration/render-tests/line-pattern/step-curve/expected.png differ diff --git a/metrics/integration/render-tests/line-pattern/step-curve/style.json b/metrics/integration/render-tests/line-pattern/step-curve/style.json new file mode 100644 index 00000000000..b355db44bed --- /dev/null +++ b/metrics/integration/render-tests/line-pattern/step-curve/style.json @@ -0,0 +1,105 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 128, + "width": 128 + } + }, + "zoom": 2, + "sprite": "local://sprites/emerald", + "sources": { + "a": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "class": "trunk" + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + 10, + -10 + ], + [ + -10, + -10 + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "class": "path" + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -10, + 0 + ], + [ + 10, + 0 + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "class": "street" + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -10, + 10 + ], + [ + 10, + 10 + ] + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "road", + "type": "line", + "source": "a", + "paint": { + "line-width": 10, + "line-pattern": [ + "step", ["zoom"], + "generic_icon", + 2, + ["match", ["string", ["get", "class"]], + "street", "generic_icon", + "path", "generic_metro", + "school_icon" + ] + ] + } + } + ] +} diff --git a/metrics/integration/render-tests/line-pattern/with-dasharray/expected.png b/metrics/integration/render-tests/line-pattern/with-dasharray/expected.png new file mode 100644 index 00000000000..c93c29a5cca Binary files /dev/null and b/metrics/integration/render-tests/line-pattern/with-dasharray/expected.png differ diff --git a/metrics/integration/render-tests/line-pattern/with-dasharray/style.json b/metrics/integration/render-tests/line-pattern/with-dasharray/style.json new file mode 100644 index 00000000000..5e7a6cfbcab --- /dev/null +++ b/metrics/integration/render-tests/line-pattern/with-dasharray/style.json @@ -0,0 +1,92 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "a": { + "type": "geojson", + "data": { + "type": "LineString", + "coordinates": [ + [ + -10, + -10 + ], + [ + 10, + -10 + ] + ] + } + }, + "b": { + "type": "geojson", + "data": { + "type": "LineString", + "coordinates": [ + [ + -10, + 0 + ], + [ + 10, + 0 + ] + ] + } + }, + "c": { + "type": "geojson", + "data": { + "type": "LineString", + "coordinates": [ + [ + -10, + 10 + ], + [ + 10, + 10 + ] + ] + } + } + }, + "sprite": "local://sprites/emerald", + "layers": [ + { + "id": "a", + "type": "line", + "source": "a", + "paint": { + "line-width": 2, + "line-dasharray": [2, 4], + "line-pattern": "generic_icon" + } + }, + { + "id": "b", + "type": "line", + "source": "b", + "paint": { + "line-width": 4, + "line-dasharray": [2, 4], + "line-pattern": "generic_icon" + } + }, + { + "id": "c", + "type": "line", + "source": "c", + "paint": { + "line-width": 8, + "line-dasharray": [2, 4], + "line-pattern": "generic_icon" + } + } + ] +} diff --git a/metrics/integration/render-tests/line-pattern/zoom-expression/expected.png b/metrics/integration/render-tests/line-pattern/zoom-expression/expected.png new file mode 100644 index 00000000000..38c3ab2ad09 Binary files /dev/null and b/metrics/integration/render-tests/line-pattern/zoom-expression/expected.png differ diff --git a/metrics/integration/render-tests/line-pattern/zoom-expression/style.json b/metrics/integration/render-tests/line-pattern/zoom-expression/style.json new file mode 100644 index 00000000000..bf6e5f3deac --- /dev/null +++ b/metrics/integration/render-tests/line-pattern/zoom-expression/style.json @@ -0,0 +1,101 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 128, + "width": 128 + } + }, + "zoom": 2, + "sprite": "local://sprites/emerald", + "sources": { + "a": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "class": "trunk" + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + 10, + -10 + ], + [ + -10, + -10 + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "class": "path" + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -10, + 0 + ], + [ + 10, + 0 + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "class": "street" + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -10, + 10 + ], + [ + 10, + 10 + ] + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "road", + "type": "line", + "source": "a", + "paint": { + "line-width": 10, + "line-pattern": [ + "step", ["zoom"], + "generic_icon", + 2, + "generic_metro" + ] + } + } + ] +} diff --git a/metrics/integration/render-tests/line-pitch/default/expected.png b/metrics/integration/render-tests/line-pitch/default/expected.png new file mode 100644 index 00000000000..5fd1699eaab Binary files /dev/null and b/metrics/integration/render-tests/line-pitch/default/expected.png differ diff --git a/metrics/integration/render-tests/line-pitch/default/style.json b/metrics/integration/render-tests/line-pitch/default/style.json new file mode 100644 index 00000000000..fa0b24a6bb2 --- /dev/null +++ b/metrics/integration/render-tests/line-pitch/default/style.json @@ -0,0 +1,40 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "road", + "type": "line", + "source": "mapbox", + "source-layer": "road", + "paint": { + "line-width": 10 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/line-pitch/pitch0/expected.png b/metrics/integration/render-tests/line-pitch/pitch0/expected.png new file mode 100644 index 00000000000..5fd1699eaab Binary files /dev/null and b/metrics/integration/render-tests/line-pitch/pitch0/expected.png differ diff --git a/metrics/integration/render-tests/line-pitch/pitch0/style.json b/metrics/integration/render-tests/line-pitch/pitch0/style.json new file mode 100644 index 00000000000..46def87bb27 --- /dev/null +++ b/metrics/integration/render-tests/line-pitch/pitch0/style.json @@ -0,0 +1,41 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "pitch": 0, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "road", + "type": "line", + "source": "mapbox", + "source-layer": "road", + "paint": { + "line-width": 10 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/line-pitch/pitch15/expected.png b/metrics/integration/render-tests/line-pitch/pitch15/expected.png new file mode 100644 index 00000000000..8e61dc7286a Binary files /dev/null and b/metrics/integration/render-tests/line-pitch/pitch15/expected.png differ diff --git a/metrics/integration/render-tests/line-pitch/pitch15/style.json b/metrics/integration/render-tests/line-pitch/pitch15/style.json new file mode 100644 index 00000000000..2a7d866c827 --- /dev/null +++ b/metrics/integration/render-tests/line-pitch/pitch15/style.json @@ -0,0 +1,41 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "pitch": 15, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "road", + "type": "line", + "source": "mapbox", + "source-layer": "road", + "paint": { + "line-width": 10 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/line-pitch/pitch30/expected.png b/metrics/integration/render-tests/line-pitch/pitch30/expected.png new file mode 100644 index 00000000000..40c9e72252a Binary files /dev/null and b/metrics/integration/render-tests/line-pitch/pitch30/expected.png differ diff --git a/metrics/integration/render-tests/line-pitch/pitch30/style.json b/metrics/integration/render-tests/line-pitch/pitch30/style.json new file mode 100644 index 00000000000..48c2b97ed33 --- /dev/null +++ b/metrics/integration/render-tests/line-pitch/pitch30/style.json @@ -0,0 +1,41 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "pitch": 30, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "road", + "type": "line", + "source": "mapbox", + "source-layer": "road", + "paint": { + "line-width": 10 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/line-pitch/pitchAndBearing/expected.png b/metrics/integration/render-tests/line-pitch/pitchAndBearing/expected.png new file mode 100644 index 00000000000..c97d3d730cb Binary files /dev/null and b/metrics/integration/render-tests/line-pitch/pitchAndBearing/expected.png differ diff --git a/metrics/integration/render-tests/line-pitch/pitchAndBearing/style.json b/metrics/integration/render-tests/line-pitch/pitchAndBearing/style.json new file mode 100644 index 00000000000..b686d447bbe --- /dev/null +++ b/metrics/integration/render-tests/line-pitch/pitchAndBearing/style.json @@ -0,0 +1,42 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "bearing": 180, + "pitch": 30, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "road", + "type": "line", + "source": "mapbox", + "source-layer": "road", + "paint": { + "line-width": 10 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/line-sort-key/literal/expected.png b/metrics/integration/render-tests/line-sort-key/literal/expected.png new file mode 100644 index 00000000000..f6ee234fb75 Binary files /dev/null and b/metrics/integration/render-tests/line-sort-key/literal/expected.png differ diff --git a/metrics/integration/render-tests/line-sort-key/literal/style.json b/metrics/integration/render-tests/line-sort-key/literal/style.json new file mode 100644 index 00000000000..9683dcc203f --- /dev/null +++ b/metrics/integration/render-tests/line-sort-key/literal/style.json @@ -0,0 +1,69 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 32, + "width": 32 + } + }, + "center": [0, 0], + "zoom": 1, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "color": "red", + "sort-key": 0 + }, + "geometry": { + "type": "LineString", + "coordinates": [ [-5, -5], [5, 5] ] + } + }, + { + "type": "Feature", + "properties": { + "color": "green", + "sort-key": 2 + }, + "geometry": { + "type": "LineString", + "coordinates": [ [-5, 5], [5, -5] ] + } + }, + { + "type": "Feature", + "properties": { + "color": "blue", + "sort-key": 1 + }, + "geometry": { + "type": "LineString", + "coordinates": [ [-5, 2.5], [5, 2.5] ] + } + } + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "line", + "type": "line", + "source": "geojson", + "layout": { + "line-sort-key": ["get", "sort-key"] + }, + "paint": { + "line-color": ["get", "color"], + "line-width": 4 + } + } + ] +} diff --git a/metrics/integration/render-tests/line-translate-anchor/map/expected.png b/metrics/integration/render-tests/line-translate-anchor/map/expected.png new file mode 100644 index 00000000000..4ad45fe8e7f Binary files /dev/null and b/metrics/integration/render-tests/line-translate-anchor/map/expected.png differ diff --git a/metrics/integration/render-tests/line-translate-anchor/map/style.json b/metrics/integration/render-tests/line-translate-anchor/map/style.json new file mode 100644 index 00000000000..89aa1a23a67 --- /dev/null +++ b/metrics/integration/render-tests/line-translate-anchor/map/style.json @@ -0,0 +1,47 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "bearing": 90, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "road", + "type": "line", + "source": "mapbox", + "source-layer": "road", + "paint": { + "line-width": 2, + "line-color": "#000", + "line-translate": [ + 10, + 10 + ], + "line-translate-anchor": "map" + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/line-translate-anchor/viewport/expected.png b/metrics/integration/render-tests/line-translate-anchor/viewport/expected.png new file mode 100644 index 00000000000..50e366bc8f9 Binary files /dev/null and b/metrics/integration/render-tests/line-translate-anchor/viewport/expected.png differ diff --git a/metrics/integration/render-tests/line-translate-anchor/viewport/style.json b/metrics/integration/render-tests/line-translate-anchor/viewport/style.json new file mode 100644 index 00000000000..d52d898846f --- /dev/null +++ b/metrics/integration/render-tests/line-translate-anchor/viewport/style.json @@ -0,0 +1,47 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "bearing": 90, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "road", + "type": "line", + "source": "mapbox", + "source-layer": "road", + "paint": { + "line-width": 2, + "line-color": "#000", + "line-translate": [ + 10, + 10 + ], + "line-translate-anchor": "viewport" + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/line-translate/default/expected.png b/metrics/integration/render-tests/line-translate/default/expected.png new file mode 100644 index 00000000000..9c36c78cd3f Binary files /dev/null and b/metrics/integration/render-tests/line-translate/default/expected.png differ diff --git a/metrics/integration/render-tests/line-translate/default/style.json b/metrics/integration/render-tests/line-translate/default/style.json new file mode 100644 index 00000000000..2909fedc77d --- /dev/null +++ b/metrics/integration/render-tests/line-translate/default/style.json @@ -0,0 +1,41 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "road", + "type": "line", + "source": "mapbox", + "source-layer": "road", + "paint": { + "line-width": 2, + "line-color": "#000" + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/line-translate/function/expected.png b/metrics/integration/render-tests/line-translate/function/expected.png new file mode 100644 index 00000000000..d84c516144b Binary files /dev/null and b/metrics/integration/render-tests/line-translate/function/expected.png differ diff --git a/metrics/integration/render-tests/line-translate/function/style.json b/metrics/integration/render-tests/line-translate/function/style.json new file mode 100644 index 00000000000..39a939ad72a --- /dev/null +++ b/metrics/integration/render-tests/line-translate/function/style.json @@ -0,0 +1,59 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "road", + "type": "line", + "source": "mapbox", + "source-layer": "road", + "paint": { + "line-width": 2, + "line-color": "#000", + "line-translate": { + "stops": [ + [ + 16, + [ + 15, + 15 + ] + ], + [ + 17, + [ + 20, + 20 + ] + ] + ] + } + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/line-translate/literal/expected.png b/metrics/integration/render-tests/line-translate/literal/expected.png new file mode 100644 index 00000000000..4c33bfae7bb Binary files /dev/null and b/metrics/integration/render-tests/line-translate/literal/expected.png differ diff --git a/metrics/integration/render-tests/line-translate/literal/style.json b/metrics/integration/render-tests/line-translate/literal/style.json new file mode 100644 index 00000000000..b8d68b8a380 --- /dev/null +++ b/metrics/integration/render-tests/line-translate/literal/style.json @@ -0,0 +1,45 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "road", + "type": "line", + "source": "mapbox", + "source-layer": "road", + "paint": { + "line-width": 2, + "line-color": "#000", + "line-translate": [ + 5, + 5 + ] + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/line-triangulation/default/expected.png b/metrics/integration/render-tests/line-triangulation/default/expected.png new file mode 100644 index 00000000000..2c2256b8955 Binary files /dev/null and b/metrics/integration/render-tests/line-triangulation/default/expected.png differ diff --git a/metrics/integration/render-tests/line-triangulation/default/style.json b/metrics/integration/render-tests/line-triangulation/default/style.json new file mode 100644 index 00000000000..c09adcbcdf9 --- /dev/null +++ b/metrics/integration/render-tests/line-triangulation/default/style.json @@ -0,0 +1,203 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 512, + "height": 512 + } + }, + "center": [ + -122.4393, + 37.706 + ], + "zoom": 14, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "id": 6730066, + "interval": 2 + }, + "geometry": { + "type": "MultiPolygon", + "coordinates": [ + [ + [ + [ + -122.437225, + 37.706797 + ], + [ + -122.442106, + 37.704101 + ], + [ + -122.434055, + 37.704745 + ], + [ + -122.432285, + 37.704409 + ], + [ + -122.428845, + 37.704965 + ], + [ + -122.428391, + 37.706397 + ], + [ + -122.431341, + 37.708231 + ], + [ + -122.433382, + 37.708232 + ], + [ + -122.433982, + 37.708132 + ], + [ + -122.435382, + 37.708132 + ], + [ + -122.440781, + 37.708304 + ], + [ + -122.442079, + 37.708231 + ], + [ + -122.441605, + 37.707348 + ], + [ + -122.441575, + 37.707264 + ], + [ + -122.440376, + 37.706495 + ], + [ + -122.440498, + 37.707529 + ], + [ + -122.437225, + 37.706797 + ] + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "id": 6730069, + "interval": 1 + }, + "geometry": { + "type": "MultiPolygon", + "coordinates": [ + [ + [ + [ + -122.449238, + 37.703158 + ], + [ + -122.450546, + 37.70245 + ], + [ + -122.448257, + 37.7032 + ], + [ + -122.446617, + 37.702705 + ], + [ + -122.445848, + 37.702302 + ], + [ + -122.442218, + 37.701728 + ], + [ + -122.442106, + 37.704101 + ], + [ + -122.437225, + 37.706797 + ], + [ + -122.440498, + 37.707529 + ], + [ + -122.440376, + 37.706495 + ], + [ + -122.441575, + 37.707264 + ], + [ + -122.441661, + 37.707239 + ], + [ + -122.448078, + 37.705053 + ], + [ + -122.449959, + 37.70441 + ], + [ + -122.449238, + 37.703158 + ] + ] + ] + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "#FFF" + } + }, + { + "id": "line", + "type": "line", + "source": "geojson", + "paint": { + "line-color": "#EC8D8D", + "line-opacity": 1, + "line-width": 8 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/line-triangulation/round/expected.png b/metrics/integration/render-tests/line-triangulation/round/expected.png new file mode 100644 index 00000000000..6b12549c8c1 Binary files /dev/null and b/metrics/integration/render-tests/line-triangulation/round/expected.png differ diff --git a/metrics/integration/render-tests/line-triangulation/round/style.json b/metrics/integration/render-tests/line-triangulation/round/style.json new file mode 100644 index 00000000000..9045b405b57 --- /dev/null +++ b/metrics/integration/render-tests/line-triangulation/round/style.json @@ -0,0 +1,206 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 512, + "height": 512 + } + }, + "center": [ + -122.4393, + 37.706 + ], + "zoom": 14, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "id": 6730066, + "interval": 2 + }, + "geometry": { + "type": "MultiPolygon", + "coordinates": [ + [ + [ + [ + -122.437225, + 37.706797 + ], + [ + -122.442106, + 37.704101 + ], + [ + -122.434055, + 37.704745 + ], + [ + -122.432285, + 37.704409 + ], + [ + -122.428845, + 37.704965 + ], + [ + -122.428391, + 37.706397 + ], + [ + -122.431341, + 37.708231 + ], + [ + -122.433382, + 37.708232 + ], + [ + -122.433982, + 37.708132 + ], + [ + -122.435382, + 37.708132 + ], + [ + -122.440781, + 37.708304 + ], + [ + -122.442079, + 37.708231 + ], + [ + -122.441605, + 37.707348 + ], + [ + -122.441575, + 37.707264 + ], + [ + -122.440376, + 37.706495 + ], + [ + -122.440498, + 37.707529 + ], + [ + -122.437225, + 37.706797 + ] + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "id": 6730069, + "interval": 1 + }, + "geometry": { + "type": "MultiPolygon", + "coordinates": [ + [ + [ + [ + -122.449238, + 37.703158 + ], + [ + -122.450546, + 37.70245 + ], + [ + -122.448257, + 37.7032 + ], + [ + -122.446617, + 37.702705 + ], + [ + -122.445848, + 37.702302 + ], + [ + -122.442218, + 37.701728 + ], + [ + -122.442106, + 37.704101 + ], + [ + -122.437225, + 37.706797 + ], + [ + -122.440498, + 37.707529 + ], + [ + -122.440376, + 37.706495 + ], + [ + -122.441575, + 37.707264 + ], + [ + -122.441661, + 37.707239 + ], + [ + -122.448078, + 37.705053 + ], + [ + -122.449959, + 37.70441 + ], + [ + -122.449238, + 37.703158 + ] + ] + ] + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "#FFF" + } + }, + { + "id": "line-round", + "type": "line", + "source": "geojson", + "layout": { + "line-join": "round" + }, + "paint": { + "line-color": "#EC8D8D", + "line-opacity": 0.5, + "line-width": 16 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/line-visibility/none/expected.png b/metrics/integration/render-tests/line-visibility/none/expected.png new file mode 100644 index 00000000000..5308b74aacb Binary files /dev/null and b/metrics/integration/render-tests/line-visibility/none/expected.png differ diff --git a/metrics/integration/render-tests/line-visibility/none/style.json b/metrics/integration/render-tests/line-visibility/none/style.json new file mode 100644 index 00000000000..06287532bf3 --- /dev/null +++ b/metrics/integration/render-tests/line-visibility/none/style.json @@ -0,0 +1,44 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "bearing": 90, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "line-none", + "type": "line", + "source": "mapbox", + "source-layer": "road", + "layout": { + "visibility": "none" + }, + "paint": { + "line-opacity": 1 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/line-visibility/visible/expected.png b/metrics/integration/render-tests/line-visibility/visible/expected.png new file mode 100644 index 00000000000..d5075037128 Binary files /dev/null and b/metrics/integration/render-tests/line-visibility/visible/expected.png differ diff --git a/metrics/integration/render-tests/line-visibility/visible/style.json b/metrics/integration/render-tests/line-visibility/visible/style.json new file mode 100644 index 00000000000..11461f588b7 --- /dev/null +++ b/metrics/integration/render-tests/line-visibility/visible/style.json @@ -0,0 +1,44 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "bearing": 90, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "line-visible", + "type": "line", + "source": "mapbox", + "source-layer": "road", + "layout": { + "visibility": "visible" + }, + "paint": { + "line-opacity": 1 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/line-width/default/expected.png b/metrics/integration/render-tests/line-width/default/expected.png new file mode 100644 index 00000000000..369cd722014 Binary files /dev/null and b/metrics/integration/render-tests/line-width/default/expected.png differ diff --git a/metrics/integration/render-tests/line-width/default/style.json b/metrics/integration/render-tests/line-width/default/style.json new file mode 100644 index 00000000000..a777a61801c --- /dev/null +++ b/metrics/integration/render-tests/line-width/default/style.json @@ -0,0 +1,38 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "road", + "type": "line", + "source": "mapbox", + "source-layer": "road", + "paint": {} + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/line-width/function/expected.png b/metrics/integration/render-tests/line-width/function/expected.png new file mode 100644 index 00000000000..51478d58fba Binary files /dev/null and b/metrics/integration/render-tests/line-width/function/expected.png differ diff --git a/metrics/integration/render-tests/line-width/function/style.json b/metrics/integration/render-tests/line-width/function/style.json new file mode 100644 index 00000000000..9041621894b --- /dev/null +++ b/metrics/integration/render-tests/line-width/function/style.json @@ -0,0 +1,51 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "road", + "type": "line", + "source": "mapbox", + "source-layer": "road", + "paint": { + "line-width": { + "stops": [ + [ + 16, + 15 + ], + [ + 17, + 20 + ] + ] + } + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/line-width/literal/expected.png b/metrics/integration/render-tests/line-width/literal/expected.png new file mode 100644 index 00000000000..b6d7de90b56 Binary files /dev/null and b/metrics/integration/render-tests/line-width/literal/expected.png differ diff --git a/metrics/integration/render-tests/line-width/literal/style.json b/metrics/integration/render-tests/line-width/literal/style.json new file mode 100644 index 00000000000..3d374dce6d2 --- /dev/null +++ b/metrics/integration/render-tests/line-width/literal/style.json @@ -0,0 +1,40 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "road", + "type": "line", + "source": "mapbox", + "source-layer": "road", + "paint": { + "line-width": 5 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/line-width/property-function/expected.png b/metrics/integration/render-tests/line-width/property-function/expected.png new file mode 100644 index 00000000000..18966687770 Binary files /dev/null and b/metrics/integration/render-tests/line-width/property-function/expected.png differ diff --git a/metrics/integration/render-tests/line-width/property-function/style.json b/metrics/integration/render-tests/line-width/property-function/style.json new file mode 100644 index 00000000000..95f123f171b --- /dev/null +++ b/metrics/integration/render-tests/line-width/property-function/style.json @@ -0,0 +1,69 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "road", + "type": "line", + "source": "mapbox", + "source-layer": "road", + "paint": { + "line-width": { + "property": "class", + "type": "categorical", + "stops": [ + [ + "path", + 1 + ], + [ + "driveway", + 2 + ], + [ + "service", + 3 + ], + [ + "street_limited", + 4 + ], + [ + "street", + 5 + ], + [ + "main", + 6 + ] + ] + } + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/line-width/very-overscaled/expected.png b/metrics/integration/render-tests/line-width/very-overscaled/expected.png new file mode 100644 index 00000000000..f70211be7f7 Binary files /dev/null and b/metrics/integration/render-tests/line-width/very-overscaled/expected.png differ diff --git a/metrics/integration/render-tests/line-width/very-overscaled/style.json b/metrics/integration/render-tests/line-width/very-overscaled/style.json new file mode 100644 index 00000000000..811cd2c2b6c --- /dev/null +++ b/metrics/integration/render-tests/line-width/very-overscaled/style.json @@ -0,0 +1,40 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.417504, + 52.499167 + ], + "zoom": 20, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "road", + "type": "line", + "source": "mapbox", + "source-layer": "road", + "paint": { + "line-width": 5 + } + } + ] +} diff --git a/metrics/integration/render-tests/line-width/zero-width-function/expected.png b/metrics/integration/render-tests/line-width/zero-width-function/expected.png new file mode 100644 index 00000000000..ae9d962e081 Binary files /dev/null and b/metrics/integration/render-tests/line-width/zero-width-function/expected.png differ diff --git a/metrics/integration/render-tests/line-width/zero-width-function/style.json b/metrics/integration/render-tests/line-width/zero-width-function/style.json new file mode 100644 index 00000000000..071d12d57ce --- /dev/null +++ b/metrics/integration/render-tests/line-width/zero-width-function/style.json @@ -0,0 +1,75 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 100, + "height": 100, + "allowed": 0.00075 + } + }, + "zoom": 2, + "sources": { + "linesource": { + "type": "geojson", + "data": { + "type": "Feature", + "properties": { + "width": 0 + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -1, + 8 + ], + [ + 8, + 1 + ], + [ + 1, + -8 + ], + [ + -8, + -1 + ], + [ + 1, + 4 + ], + [ + 4, + -1 + ], + [ + -1, + -4 + ], + [ + -2, + 0 + ] + ] + } + }, + "lineMetrics": true + } + }, + "layers": [ + { + "id": "line", + "type": "line", + "source": "linesource", + "layout": { + "line-cap": "round", + "line-join": "round" + }, + "paint": { + "line-width": ["get", "width"], + "line-color": "red" + } + } + ] +} diff --git a/metrics/integration/render-tests/line-width/zero-width/expected.png b/metrics/integration/render-tests/line-width/zero-width/expected.png new file mode 100644 index 00000000000..ae9d962e081 Binary files /dev/null and b/metrics/integration/render-tests/line-width/zero-width/expected.png differ diff --git a/metrics/integration/render-tests/line-width/zero-width/style.json b/metrics/integration/render-tests/line-width/zero-width/style.json new file mode 100644 index 00000000000..d86c4591aff --- /dev/null +++ b/metrics/integration/render-tests/line-width/zero-width/style.json @@ -0,0 +1,73 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 100, + "height": 100, + "allowed": 0.00075 + } + }, + "zoom": 2, + "sources": { + "linesource": { + "type": "geojson", + "data": { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -1, + 8 + ], + [ + 8, + 1 + ], + [ + 1, + -8 + ], + [ + -8, + -1 + ], + [ + 1, + 4 + ], + [ + 4, + -1 + ], + [ + -1, + -4 + ], + [ + -2, + 0 + ] + ] + } + }, + "lineMetrics": true + } + }, + "layers": [ + { + "id": "line", + "type": "line", + "source": "linesource", + "layout": { + "line-cap": "round", + "line-join": "round" + }, + "paint": { + "line-width": 0, + "line-color": "red" + } + } + ] +} diff --git a/metrics/integration/render-tests/linear-filter-opacity-edge/literal/expected.png b/metrics/integration/render-tests/linear-filter-opacity-edge/literal/expected.png new file mode 100644 index 00000000000..1ca3c162898 Binary files /dev/null and b/metrics/integration/render-tests/linear-filter-opacity-edge/literal/expected.png differ diff --git a/metrics/integration/render-tests/linear-filter-opacity-edge/literal/style.json b/metrics/integration/render-tests/linear-filter-opacity-edge/literal/style.json new file mode 100644 index 00000000000..56cc0544462 --- /dev/null +++ b/metrics/integration/render-tests/linear-filter-opacity-edge/literal/style.json @@ -0,0 +1,51 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "icon", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "filter": [ + "==", + "maki", + "restaurant" + ], + "layout": { + "symbol-placement": "point", + "icon-allow-overlap": true, + "icon-ignore-placement": true, + "icon-size": 3, + "icon-image": "squares-18" + }, + "paint": {} + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/map-mode/static/expected.png b/metrics/integration/render-tests/map-mode/static/expected.png new file mode 100644 index 00000000000..c68b54da9e0 Binary files /dev/null and b/metrics/integration/render-tests/map-mode/static/expected.png differ diff --git a/metrics/integration/render-tests/map-mode/static/style.json b/metrics/integration/render-tests/map-mode/static/style.json new file mode 100644 index 00000000000..adacc7db9eb --- /dev/null +++ b/metrics/integration/render-tests/map-mode/static/style.json @@ -0,0 +1,56 @@ +{ + "version": 8, + "metadata": { + "test": { + "mapMode": "static", + "height": 512, + "width": 512 + } + }, + "center": [ + 13.414306640625, + 52.502847659403955 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "text", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "filter": [ + "==", + "maki", + "restaurant" + ], + "layout": { + "symbol-placement": "point", + "text-allow-overlap": true, + "text-ignore-placement": true, + "text-field": "A B C D\nE F G H", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + }, + "paint": {} + } + ] +} diff --git a/metrics/integration/render-tests/map-mode/tile-avoid-edges/expected.png b/metrics/integration/render-tests/map-mode/tile-avoid-edges/expected.png new file mode 100644 index 00000000000..39d3ebcd40c Binary files /dev/null and b/metrics/integration/render-tests/map-mode/tile-avoid-edges/expected.png differ diff --git a/metrics/integration/render-tests/map-mode/tile-avoid-edges/style.json b/metrics/integration/render-tests/map-mode/tile-avoid-edges/style.json new file mode 100644 index 00000000000..cdd829e7c5f --- /dev/null +++ b/metrics/integration/render-tests/map-mode/tile-avoid-edges/style.json @@ -0,0 +1,20 @@ +{ + "version": 8, + "metadata": { + "test": { + "mapMode": "tile", + "collisionDebug": true, + "debug": true, + "width": 512, + "height": 512, + "operations": [ + ["setStyle", "local://styles/chicago.json"], + ["setZoom", 13 ], + ["setCenter", [-87.7442445, 41.8403965] ], + ["wait"] + ] + } + }, + "sources": {}, + "layers": [] +} diff --git a/metrics/integration/render-tests/map-mode/tile/expected.png b/metrics/integration/render-tests/map-mode/tile/expected.png new file mode 100644 index 00000000000..7697b012d26 Binary files /dev/null and b/metrics/integration/render-tests/map-mode/tile/expected.png differ diff --git a/metrics/integration/render-tests/map-mode/tile/style.json b/metrics/integration/render-tests/map-mode/tile/style.json new file mode 100644 index 00000000000..5f8d0287c04 --- /dev/null +++ b/metrics/integration/render-tests/map-mode/tile/style.json @@ -0,0 +1,56 @@ +{ + "version": 8, + "metadata": { + "test": { + "mapMode": "tile", + "height": 512, + "width": 512 + } + }, + "center": [ + 13.414306640625, + 52.502847659403955 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "text", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "filter": [ + "==", + "maki", + "restaurant" + ], + "layout": { + "symbol-placement": "point", + "text-allow-overlap": true, + "text-ignore-placement": true, + "text-field": "A B C D\nE F G H", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + }, + "paint": {} + } + ] +} diff --git a/metrics/integration/render-tests/mixed-zoom/z10-z11/expected.png b/metrics/integration/render-tests/mixed-zoom/z10-z11/expected.png new file mode 100644 index 00000000000..6f20dd1e182 Binary files /dev/null and b/metrics/integration/render-tests/mixed-zoom/z10-z11/expected.png differ diff --git a/metrics/integration/render-tests/mixed-zoom/z10-z11/style.json b/metrics/integration/render-tests/mixed-zoom/z10-z11/style.json new file mode 100644 index 00000000000..e8576af0384 --- /dev/null +++ b/metrics/integration/render-tests/mixed-zoom/z10-z11/style.json @@ -0,0 +1,24 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 512, + "height": 512, + "debug": true, + "collisionDebug": true, + "operations": [ + ["setStyle", "local://mapbox-gl-styles/styles/basic-v9.json"], + ["wait"], + ["setZoom", 11.1], + ["sleep", 3000] + ] + } + }, + "center": [ + -118.303, + 33.908 + ], + "zoom": 10.5, + "sources": {}, + "layers": [] +} diff --git a/metrics/integration/render-tests/projection/axonometric-multiple/expected.png b/metrics/integration/render-tests/projection/axonometric-multiple/expected.png new file mode 100644 index 00000000000..bb57972e27c Binary files /dev/null and b/metrics/integration/render-tests/projection/axonometric-multiple/expected.png differ diff --git a/metrics/integration/render-tests/projection/axonometric-multiple/style.json b/metrics/integration/render-tests/projection/axonometric-multiple/style.json new file mode 100644 index 00000000000..ec1bb76ad8c --- /dev/null +++ b/metrics/integration/render-tests/projection/axonometric-multiple/style.json @@ -0,0 +1,156 @@ +{ + "version": 8, + "metadata": { + "test": { + "axonometric": true, + "height": 256, + "allowed": 0.0005 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "which": "a", + "property": 10 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -0.0003, + -0.0003 + ], + [ + -0.0003, + 0.0003 + ], + [ + 0.0003, + 0.0003 + ], + [ + 0.0003, + -0.0003 + ], + [ + -0.0003, + -0.0003 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "which": "b", + "property": 20 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -0.0002, + 0 + ], + [ + 0, + 0.0002 + ], + [ + 0.0002, + 0 + ], + [ + 0, + -0.0002 + ], + [ + -0.0002, + 0 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "which": "c", + "property": 30 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -0.00008, + -0.00008 + ], + [ + -0.00008, + 0.00008 + ], + [ + 0.00008, + 0.00008 + ], + [ + 0.00008, + -0.00008 + ], + [ + -0.00008, + -0.00008 + ] + ] + ] + } + } + ] + } + } + }, + "pitch": 60, + "zoom": 18, + "layers": [ + { + "id": "a", + "type": "fill-extrusion", + "source": "geojson", + "filter": ["==", "which", "a"], + "paint": { + "fill-extrusion-color": "red", + "fill-extrusion-height": 10 + } + }, + { + "id": "b", + "type": "fill-extrusion", + "source": "geojson", + "filter": ["==", "which", "b"], + "paint": { + "fill-extrusion-color": "blue", + "fill-extrusion-height": 20 + } + }, + { + "id": "c", + "type": "fill-extrusion", + "source": "geojson", + "filter": ["==", "which", "c"], + "paint": { + "fill-extrusion-color": "yellow", + "fill-extrusion-height": 30 + } + } + ] +} diff --git a/metrics/integration/render-tests/projection/axonometric/expected.png b/metrics/integration/render-tests/projection/axonometric/expected.png new file mode 100644 index 00000000000..406e5bc59c1 Binary files /dev/null and b/metrics/integration/render-tests/projection/axonometric/expected.png differ diff --git a/metrics/integration/render-tests/projection/axonometric/style.json b/metrics/integration/render-tests/projection/axonometric/style.json new file mode 100644 index 00000000000..3e5a1550336 --- /dev/null +++ b/metrics/integration/render-tests/projection/axonometric/style.json @@ -0,0 +1,154 @@ +{ + "version": 8, + "metadata": { + "test": { + "axonometric": true + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -0.0003, + -0.0003 + ], + [ + -0.0004, + -0.0003 + ], + [ + -0.0004, + -0.0004 + ], + [ + -0.0003, + -0.0004 + ], + [ + -0.0003, + -0.0003 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + 0.0003, + 0.0003 + ], + [ + 0.0004, + 0.0003 + ], + [ + 0.0004, + 0.0004 + ], + [ + 0.0003, + 0.0004 + ], + [ + 0.0003, + 0.0003 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + 0.0003, + -0.0003 + ], + [ + 0.0004, + -0.0003 + ], + [ + 0.0004, + -0.0004 + ], + [ + 0.0003, + -0.0004 + ], + [ + 0.0003, + -0.0003 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -0.0003, + 0.0003 + ], + [ + -0.0004, + 0.0003 + ], + [ + -0.0004, + 0.0004 + ], + [ + -0.0003, + 0.0004 + ], + [ + -0.0003, + 0.0003 + ] + ] + ] + } + } + ] + } + } + }, + "zoom": 18, + "layers": [ + { + "id": "extrusion", + "type": "fill-extrusion", + "source": "geojson", + "paint": { + "fill-extrusion-height": 100, + "fill-extrusion-color": "red" + } + } + ] +} diff --git a/metrics/integration/render-tests/projection/perspective/expected.png b/metrics/integration/render-tests/projection/perspective/expected.png new file mode 100644 index 00000000000..9f38cb37ba5 Binary files /dev/null and b/metrics/integration/render-tests/projection/perspective/expected.png differ diff --git a/metrics/integration/render-tests/projection/perspective/style.json b/metrics/integration/render-tests/projection/perspective/style.json new file mode 100644 index 00000000000..831d3575802 --- /dev/null +++ b/metrics/integration/render-tests/projection/perspective/style.json @@ -0,0 +1,155 @@ +{ + "version": 8, + "metadata": { + "test": { + "axonometric": false, + "allowed": 0.00075 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -0.0003, + -0.0003 + ], + [ + -0.0004, + -0.0003 + ], + [ + -0.0004, + -0.0004 + ], + [ + -0.0003, + -0.0004 + ], + [ + -0.0003, + -0.0003 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + 0.0003, + 0.0003 + ], + [ + 0.0004, + 0.0003 + ], + [ + 0.0004, + 0.0004 + ], + [ + 0.0003, + 0.0004 + ], + [ + 0.0003, + 0.0003 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + 0.0003, + -0.0003 + ], + [ + 0.0004, + -0.0003 + ], + [ + 0.0004, + -0.0004 + ], + [ + 0.0003, + -0.0004 + ], + [ + 0.0003, + -0.0003 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -0.0003, + 0.0003 + ], + [ + -0.0004, + 0.0003 + ], + [ + -0.0004, + 0.0004 + ], + [ + -0.0003, + 0.0004 + ], + [ + -0.0003, + 0.0003 + ] + ] + ] + } + } + ] + } + } + }, + "zoom": 18, + "layers": [ + { + "id": "extrusion", + "type": "fill-extrusion", + "source": "geojson", + "paint": { + "fill-extrusion-height": 100, + "fill-extrusion-color": "red" + } + } + ] +} diff --git a/metrics/integration/render-tests/projection/skew/expected.png b/metrics/integration/render-tests/projection/skew/expected.png new file mode 100644 index 00000000000..0f4e759b9f6 Binary files /dev/null and b/metrics/integration/render-tests/projection/skew/expected.png differ diff --git a/metrics/integration/render-tests/projection/skew/style.json b/metrics/integration/render-tests/projection/skew/style.json new file mode 100644 index 00000000000..3094c2bc067 --- /dev/null +++ b/metrics/integration/render-tests/projection/skew/style.json @@ -0,0 +1,155 @@ +{ + "version": 8, + "metadata": { + "test": { + "axonometric": true, + "skew": [-1, -1] + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -0.0003, + -0.0003 + ], + [ + -0.0004, + -0.0003 + ], + [ + -0.0004, + -0.0004 + ], + [ + -0.0003, + -0.0004 + ], + [ + -0.0003, + -0.0003 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + 0.0003, + 0.0003 + ], + [ + 0.0004, + 0.0003 + ], + [ + 0.0004, + 0.0004 + ], + [ + 0.0003, + 0.0004 + ], + [ + 0.0003, + 0.0003 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + 0.0003, + -0.0003 + ], + [ + 0.0004, + -0.0003 + ], + [ + 0.0004, + -0.0004 + ], + [ + 0.0003, + -0.0004 + ], + [ + 0.0003, + -0.0003 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -0.0003, + 0.0003 + ], + [ + -0.0004, + 0.0003 + ], + [ + -0.0004, + 0.0004 + ], + [ + -0.0003, + 0.0004 + ], + [ + -0.0003, + 0.0003 + ] + ] + ] + } + } + ] + } + } + }, + "zoom": 18, + "layers": [ + { + "id": "extrusion", + "type": "fill-extrusion", + "source": "geojson", + "paint": { + "fill-extrusion-height": 100, + "fill-extrusion-color": "red" + } + } + ] +} diff --git a/metrics/integration/render-tests/raster-alpha/default/expected.png b/metrics/integration/render-tests/raster-alpha/default/expected.png new file mode 100644 index 00000000000..91bad78ad4e Binary files /dev/null and b/metrics/integration/render-tests/raster-alpha/default/expected.png differ diff --git a/metrics/integration/render-tests/raster-alpha/default/style.json b/metrics/integration/render-tests/raster-alpha/default/style.json new file mode 100644 index 00000000000..8d3ccbb5877 --- /dev/null +++ b/metrics/integration/render-tests/raster-alpha/default/style.json @@ -0,0 +1,40 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 52.499167, + 13.418056 + ], + "zoom": 16, + "sources": { + "source": { + "type": "raster", + "tiles": [ + "local://tiles/alpha.png" + ], + "maxzoom": 17, + "tileSize": 256 + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "orange" + } + }, + { + "id": "raster", + "type": "raster", + "source": "source", + "paint": { + "raster-fade-duration": 0 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/raster-brightness/default/expected.png b/metrics/integration/render-tests/raster-brightness/default/expected.png new file mode 100644 index 00000000000..1a5e0a61fa2 Binary files /dev/null and b/metrics/integration/render-tests/raster-brightness/default/expected.png differ diff --git a/metrics/integration/render-tests/raster-brightness/default/style.json b/metrics/integration/render-tests/raster-brightness/default/style.json new file mode 100644 index 00000000000..a2db2f18d83 --- /dev/null +++ b/metrics/integration/render-tests/raster-brightness/default/style.json @@ -0,0 +1,33 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 16, + "sources": { + "satellite": { + "type": "raster", + "tiles": [ + "local://tiles/{z}-{x}-{y}.satellite.png" + ], + "maxzoom": 17, + "tileSize": 256 + } + }, + "layers": [ + { + "id": "raster", + "type": "raster", + "source": "satellite", + "paint": { + "raster-fade-duration": 0 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/raster-brightness/function/expected.png b/metrics/integration/render-tests/raster-brightness/function/expected.png new file mode 100644 index 00000000000..67eecce9e88 Binary files /dev/null and b/metrics/integration/render-tests/raster-brightness/function/expected.png differ diff --git a/metrics/integration/render-tests/raster-brightness/function/style.json b/metrics/integration/render-tests/raster-brightness/function/style.json new file mode 100644 index 00000000000..e2935e34074 --- /dev/null +++ b/metrics/integration/render-tests/raster-brightness/function/style.json @@ -0,0 +1,57 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 16, + "sources": { + "satellite": { + "type": "raster", + "tiles": [ + "local://tiles/{z}-{x}-{y}.satellite.png" + ], + "maxzoom": 17, + "tileSize": 256 + } + }, + "layers": [ + { + "id": "raster", + "type": "raster", + "source": "satellite", + "paint": { + "raster-fade-duration": 0, + "raster-brightness-min": { + "stops": [ + [ + 16, + 0.5 + ], + [ + 17, + 0.5 + ] + ] + }, + "raster-brightness-max": { + "stops": [ + [ + 16, + 0.6 + ], + [ + 17, + 0.4 + ] + ] + } + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/raster-brightness/literal/expected.png b/metrics/integration/render-tests/raster-brightness/literal/expected.png new file mode 100644 index 00000000000..3456af8bce8 Binary files /dev/null and b/metrics/integration/render-tests/raster-brightness/literal/expected.png differ diff --git a/metrics/integration/render-tests/raster-brightness/literal/style.json b/metrics/integration/render-tests/raster-brightness/literal/style.json new file mode 100644 index 00000000000..4cb59b0fc8a --- /dev/null +++ b/metrics/integration/render-tests/raster-brightness/literal/style.json @@ -0,0 +1,35 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 16, + "sources": { + "satellite": { + "type": "raster", + "tiles": [ + "local://tiles/{z}-{x}-{y}.satellite.png" + ], + "maxzoom": 17, + "tileSize": 256 + } + }, + "layers": [ + { + "id": "raster", + "type": "raster", + "source": "satellite", + "paint": { + "raster-fade-duration": 0, + "raster-brightness-min": 0.2, + "raster-brightness-max": 0.8 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/raster-contrast/default/expected.png b/metrics/integration/render-tests/raster-contrast/default/expected.png new file mode 100644 index 00000000000..1a5e0a61fa2 Binary files /dev/null and b/metrics/integration/render-tests/raster-contrast/default/expected.png differ diff --git a/metrics/integration/render-tests/raster-contrast/default/style.json b/metrics/integration/render-tests/raster-contrast/default/style.json new file mode 100644 index 00000000000..a2db2f18d83 --- /dev/null +++ b/metrics/integration/render-tests/raster-contrast/default/style.json @@ -0,0 +1,33 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 16, + "sources": { + "satellite": { + "type": "raster", + "tiles": [ + "local://tiles/{z}-{x}-{y}.satellite.png" + ], + "maxzoom": 17, + "tileSize": 256 + } + }, + "layers": [ + { + "id": "raster", + "type": "raster", + "source": "satellite", + "paint": { + "raster-fade-duration": 0 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/raster-contrast/function/expected.png b/metrics/integration/render-tests/raster-contrast/function/expected.png new file mode 100644 index 00000000000..245e38eca8c Binary files /dev/null and b/metrics/integration/render-tests/raster-contrast/function/expected.png differ diff --git a/metrics/integration/render-tests/raster-contrast/function/style.json b/metrics/integration/render-tests/raster-contrast/function/style.json new file mode 100644 index 00000000000..dcf22a3524f --- /dev/null +++ b/metrics/integration/render-tests/raster-contrast/function/style.json @@ -0,0 +1,45 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 16, + "sources": { + "satellite": { + "type": "raster", + "tiles": [ + "local://tiles/{z}-{x}-{y}.satellite.png" + ], + "maxzoom": 17, + "tileSize": 256 + } + }, + "layers": [ + { + "id": "raster", + "type": "raster", + "source": "satellite", + "paint": { + "raster-fade-duration": 0, + "raster-contrast": { + "stops": [ + [ + 16, + 0.6 + ], + [ + 17, + 0.8 + ] + ] + } + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/raster-contrast/literal/expected.png b/metrics/integration/render-tests/raster-contrast/literal/expected.png new file mode 100644 index 00000000000..a4a016fdb24 Binary files /dev/null and b/metrics/integration/render-tests/raster-contrast/literal/expected.png differ diff --git a/metrics/integration/render-tests/raster-contrast/literal/style.json b/metrics/integration/render-tests/raster-contrast/literal/style.json new file mode 100644 index 00000000000..25e131c1ad6 --- /dev/null +++ b/metrics/integration/render-tests/raster-contrast/literal/style.json @@ -0,0 +1,34 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 16, + "sources": { + "satellite": { + "type": "raster", + "tiles": [ + "local://tiles/{z}-{x}-{y}.satellite.png" + ], + "maxzoom": 17, + "tileSize": 256 + } + }, + "layers": [ + { + "id": "raster", + "type": "raster", + "source": "satellite", + "paint": { + "raster-fade-duration": 0, + "raster-contrast": 0.2 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/raster-extent/maxzoom/expected.png b/metrics/integration/render-tests/raster-extent/maxzoom/expected.png new file mode 100644 index 00000000000..57cf3f091e4 Binary files /dev/null and b/metrics/integration/render-tests/raster-extent/maxzoom/expected.png differ diff --git a/metrics/integration/render-tests/raster-extent/maxzoom/style.json b/metrics/integration/render-tests/raster-extent/maxzoom/style.json new file mode 100644 index 00000000000..b3c147175cc --- /dev/null +++ b/metrics/integration/render-tests/raster-extent/maxzoom/style.json @@ -0,0 +1,41 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 17, + "sources": { + "satellite": { + "type": "raster", + "tiles": [ + "local://tiles/{z}-{x}-{y}.satellite.png" + ], + "maxzoom": 17, + "tileSize": 256 + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "green" + } + }, + { + "id": "raster-none", + "type": "raster", + "source": "satellite", + "maxzoom": 10, + "paint": { + "raster-fade-duration": 0 + } + } + ] +} diff --git a/metrics/integration/render-tests/raster-extent/minzoom/expected.png b/metrics/integration/render-tests/raster-extent/minzoom/expected.png new file mode 100644 index 00000000000..57cf3f091e4 Binary files /dev/null and b/metrics/integration/render-tests/raster-extent/minzoom/expected.png differ diff --git a/metrics/integration/render-tests/raster-extent/minzoom/style.json b/metrics/integration/render-tests/raster-extent/minzoom/style.json new file mode 100644 index 00000000000..14a53170836 --- /dev/null +++ b/metrics/integration/render-tests/raster-extent/minzoom/style.json @@ -0,0 +1,41 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 0, + "sources": { + "satellite": { + "type": "raster", + "tiles": [ + "local://tiles/{z}-{x}-{y}.satellite.png" + ], + "maxzoom": 17, + "tileSize": 256 + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "green" + } + }, + { + "id": "raster-none", + "type": "raster", + "source": "satellite", + "minzoom": 1, + "paint": { + "raster-fade-duration": 0 + } + } + ] +} diff --git a/metrics/integration/render-tests/raster-hue-rotate/default/expected.png b/metrics/integration/render-tests/raster-hue-rotate/default/expected.png new file mode 100644 index 00000000000..1a5e0a61fa2 Binary files /dev/null and b/metrics/integration/render-tests/raster-hue-rotate/default/expected.png differ diff --git a/metrics/integration/render-tests/raster-hue-rotate/default/style.json b/metrics/integration/render-tests/raster-hue-rotate/default/style.json new file mode 100644 index 00000000000..a2db2f18d83 --- /dev/null +++ b/metrics/integration/render-tests/raster-hue-rotate/default/style.json @@ -0,0 +1,33 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 16, + "sources": { + "satellite": { + "type": "raster", + "tiles": [ + "local://tiles/{z}-{x}-{y}.satellite.png" + ], + "maxzoom": 17, + "tileSize": 256 + } + }, + "layers": [ + { + "id": "raster", + "type": "raster", + "source": "satellite", + "paint": { + "raster-fade-duration": 0 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/raster-hue-rotate/function/expected.png b/metrics/integration/render-tests/raster-hue-rotate/function/expected.png new file mode 100644 index 00000000000..ed230b6e88c Binary files /dev/null and b/metrics/integration/render-tests/raster-hue-rotate/function/expected.png differ diff --git a/metrics/integration/render-tests/raster-hue-rotate/function/style.json b/metrics/integration/render-tests/raster-hue-rotate/function/style.json new file mode 100644 index 00000000000..011c5c09923 --- /dev/null +++ b/metrics/integration/render-tests/raster-hue-rotate/function/style.json @@ -0,0 +1,45 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 16, + "sources": { + "satellite": { + "type": "raster", + "tiles": [ + "local://tiles/{z}-{x}-{y}.satellite.png" + ], + "maxzoom": 17, + "tileSize": 256 + } + }, + "layers": [ + { + "id": "raster", + "type": "raster", + "source": "satellite", + "paint": { + "raster-fade-duration": 0, + "raster-hue-rotate": { + "stops": [ + [ + 16, + 270 + ], + [ + 17, + 365 + ] + ] + } + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/raster-hue-rotate/literal/expected.png b/metrics/integration/render-tests/raster-hue-rotate/literal/expected.png new file mode 100644 index 00000000000..60ce6b0cbed Binary files /dev/null and b/metrics/integration/render-tests/raster-hue-rotate/literal/expected.png differ diff --git a/metrics/integration/render-tests/raster-hue-rotate/literal/style.json b/metrics/integration/render-tests/raster-hue-rotate/literal/style.json new file mode 100644 index 00000000000..14b3c376db5 --- /dev/null +++ b/metrics/integration/render-tests/raster-hue-rotate/literal/style.json @@ -0,0 +1,34 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 16, + "sources": { + "satellite": { + "type": "raster", + "tiles": [ + "local://tiles/{z}-{x}-{y}.satellite.png" + ], + "maxzoom": 17, + "tileSize": 256 + } + }, + "layers": [ + { + "id": "raster", + "type": "raster", + "source": "satellite", + "paint": { + "raster-fade-duration": 0, + "raster-hue-rotate": 90 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/raster-loading/missing/expected.png b/metrics/integration/render-tests/raster-loading/missing/expected.png new file mode 100644 index 00000000000..8426541c139 Binary files /dev/null and b/metrics/integration/render-tests/raster-loading/missing/expected.png differ diff --git a/metrics/integration/render-tests/raster-loading/missing/style.json b/metrics/integration/render-tests/raster-loading/missing/style.json new file mode 100644 index 00000000000..f23377290c7 --- /dev/null +++ b/metrics/integration/render-tests/raster-loading/missing/style.json @@ -0,0 +1,34 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 17, + "sources": { + "satellite": { + "type": "raster", + "tiles": [ + "local://tiles/{z}-{x}-{y}.satellite.png" + ], + "maxzoom": 18, + "tileSize": 256 + } + }, + "layers": [ + { + "id": "raster", + "type": "raster", + "source": "satellite", + "paint": { + "raster-fade-duration": 0 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/raster-masking/overlapping-vector/expected.png b/metrics/integration/render-tests/raster-masking/overlapping-vector/expected.png new file mode 100644 index 00000000000..043b1fdab05 Binary files /dev/null and b/metrics/integration/render-tests/raster-masking/overlapping-vector/expected.png differ diff --git a/metrics/integration/render-tests/raster-masking/overlapping-vector/style.json b/metrics/integration/render-tests/raster-masking/overlapping-vector/style.json new file mode 100644 index 00000000000..d5253448cf3 --- /dev/null +++ b/metrics/integration/render-tests/raster-masking/overlapping-vector/style.json @@ -0,0 +1,90 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + -122.48, + 37.84 + ], + "zoom": 14, + "sources": { + "contour": { + "type": "raster", + "tiles": [ + "local://tiles/{z}-{x}-{y}.contour.png" + ], + "maxzoom": 17, + "tileSize": 256 + }, + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -123, + 37.839 + ], + [ + -123, + 37.843 + ], + [ + -122, + 37.843 + ], + [ + -122, + 37.839 + ], + [ + -123, + 37.839 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "raster", + "type": "raster", + "source": "contour", + "paint": { + "raster-fade-duration": 0 + } + }, + { + "id": "fill", + "type": "fill", + "source": "geojson", + "paint": { + "fill-antialias": false, + "fill-color": "green", + "fill-opacity": 0.2 + } + }, + { + "id": "raster-transparent", + "type": "raster", + "source": "contour", + "paint": { + "raster-fade-duration": 0, + "raster-opacity": 0.5, + "raster-hue-rotate": 90 + } + } + ] +} diff --git a/metrics/integration/render-tests/raster-masking/overlapping-zoom/expected.png b/metrics/integration/render-tests/raster-masking/overlapping-zoom/expected.png new file mode 100644 index 00000000000..b4cdd24619c Binary files /dev/null and b/metrics/integration/render-tests/raster-masking/overlapping-zoom/expected.png differ diff --git a/metrics/integration/render-tests/raster-masking/overlapping-zoom/style.json b/metrics/integration/render-tests/raster-masking/overlapping-zoom/style.json new file mode 100644 index 00000000000..9d7c8a8cb17 --- /dev/null +++ b/metrics/integration/render-tests/raster-masking/overlapping-zoom/style.json @@ -0,0 +1,59 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256, + "operations": [ + [ + "setZoom", + 15, + null + ], + [ + "wait" + ], + [ + "setZoom", + 13, + null + ], + [ + "wait" + ] + ] + } + }, + "center": [ + -122.48, + 37.84 + ], + "zoom": 14, + "sources": { + "contour": { + "type": "raster", + "tiles": [ + "local://tiles/{z}-{x}-{y}.contour.png" + ], + "maxzoom": 17, + "tileSize": 256 + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "raster", + "type": "raster", + "source": "contour", + "paint": { + "raster-fade-duration": 0, + "raster-opacity": 0.5 + } + } + ] +} diff --git a/metrics/integration/render-tests/raster-masking/overlapping/expected.png b/metrics/integration/render-tests/raster-masking/overlapping/expected.png new file mode 100644 index 00000000000..28c47880620 Binary files /dev/null and b/metrics/integration/render-tests/raster-masking/overlapping/expected.png differ diff --git a/metrics/integration/render-tests/raster-masking/overlapping/style.json b/metrics/integration/render-tests/raster-masking/overlapping/style.json new file mode 100644 index 00000000000..7bf70d9a603 --- /dev/null +++ b/metrics/integration/render-tests/raster-masking/overlapping/style.json @@ -0,0 +1,40 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + -122.48, + 37.84 + ], + "zoom": 14, + "sources": { + "contour": { + "type": "raster", + "tiles": [ + "local://tiles/{z}-{x}-{y}.contour.png" + ], + "maxzoom": 17, + "tileSize": 256 + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "raster", + "type": "raster", + "source": "contour", + "paint": { + "raster-fade-duration": 0 + } + } + ] +} diff --git a/metrics/integration/render-tests/raster-opacity/default/expected.png b/metrics/integration/render-tests/raster-opacity/default/expected.png new file mode 100644 index 00000000000..1a5e0a61fa2 Binary files /dev/null and b/metrics/integration/render-tests/raster-opacity/default/expected.png differ diff --git a/metrics/integration/render-tests/raster-opacity/default/style.json b/metrics/integration/render-tests/raster-opacity/default/style.json new file mode 100644 index 00000000000..a2db2f18d83 --- /dev/null +++ b/metrics/integration/render-tests/raster-opacity/default/style.json @@ -0,0 +1,33 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 16, + "sources": { + "satellite": { + "type": "raster", + "tiles": [ + "local://tiles/{z}-{x}-{y}.satellite.png" + ], + "maxzoom": 17, + "tileSize": 256 + } + }, + "layers": [ + { + "id": "raster", + "type": "raster", + "source": "satellite", + "paint": { + "raster-fade-duration": 0 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/raster-opacity/function/expected.png b/metrics/integration/render-tests/raster-opacity/function/expected.png new file mode 100644 index 00000000000..1b48187feca Binary files /dev/null and b/metrics/integration/render-tests/raster-opacity/function/expected.png differ diff --git a/metrics/integration/render-tests/raster-opacity/function/style.json b/metrics/integration/render-tests/raster-opacity/function/style.json new file mode 100644 index 00000000000..ee238d41b8a --- /dev/null +++ b/metrics/integration/render-tests/raster-opacity/function/style.json @@ -0,0 +1,45 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 16, + "sources": { + "satellite": { + "type": "raster", + "tiles": [ + "local://tiles/{z}-{x}-{y}.satellite.png" + ], + "maxzoom": 17, + "tileSize": 256 + } + }, + "layers": [ + { + "id": "raster", + "type": "raster", + "source": "satellite", + "paint": { + "raster-fade-duration": 0, + "raster-opacity": { + "stops": [ + [ + 16, + 0.6 + ], + [ + 17, + 0.8 + ] + ] + } + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/raster-opacity/literal/expected.png b/metrics/integration/render-tests/raster-opacity/literal/expected.png new file mode 100644 index 00000000000..ad4a0c26fcb Binary files /dev/null and b/metrics/integration/render-tests/raster-opacity/literal/expected.png differ diff --git a/metrics/integration/render-tests/raster-opacity/literal/style.json b/metrics/integration/render-tests/raster-opacity/literal/style.json new file mode 100644 index 00000000000..989097bf1dc --- /dev/null +++ b/metrics/integration/render-tests/raster-opacity/literal/style.json @@ -0,0 +1,34 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 16, + "sources": { + "satellite": { + "type": "raster", + "tiles": [ + "local://tiles/{z}-{x}-{y}.satellite.png" + ], + "maxzoom": 17, + "tileSize": 256 + } + }, + "layers": [ + { + "id": "raster", + "type": "raster", + "source": "satellite", + "paint": { + "raster-fade-duration": 0, + "raster-opacity": 0.5 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/raster-resampling/default/expected.png b/metrics/integration/render-tests/raster-resampling/default/expected.png new file mode 100644 index 00000000000..4db0b165ef2 Binary files /dev/null and b/metrics/integration/render-tests/raster-resampling/default/expected.png differ diff --git a/metrics/integration/render-tests/raster-resampling/default/style.json b/metrics/integration/render-tests/raster-resampling/default/style.json new file mode 100644 index 00000000000..ec0fa9ef2af --- /dev/null +++ b/metrics/integration/render-tests/raster-resampling/default/style.json @@ -0,0 +1,33 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 20, + "sources": { + "satellite": { + "type": "raster", + "tiles": [ + "local://tiles/{z}-{x}-{y}.satellite.png" + ], + "maxzoom": 17, + "tileSize": 256 + } + }, + "layers": [ + { + "id": "raster", + "type": "raster", + "source": "satellite", + "paint": { + "raster-fade-duration": 0 + } + } + ] +} diff --git a/metrics/integration/render-tests/raster-resampling/function/expected.png b/metrics/integration/render-tests/raster-resampling/function/expected.png new file mode 100644 index 00000000000..f4f7bce7123 Binary files /dev/null and b/metrics/integration/render-tests/raster-resampling/function/expected.png differ diff --git a/metrics/integration/render-tests/raster-resampling/function/style.json b/metrics/integration/render-tests/raster-resampling/function/style.json new file mode 100644 index 00000000000..2ac91b44c55 --- /dev/null +++ b/metrics/integration/render-tests/raster-resampling/function/style.json @@ -0,0 +1,45 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 20, + "sources": { + "satellite": { + "type": "raster", + "tiles": [ + "local://tiles/{z}-{x}-{y}.satellite.png" + ], + "maxzoom": 17, + "tileSize": 256 + } + }, + "layers": [ + { + "id": "raster", + "type": "raster", + "source": "satellite", + "paint": { + "raster-fade-duration": 0, + "raster-resampling": { + "stops": [ + [ + 19, + "linear" + ], + [ + 20, + "nearest" + ] + ] + } + } + } + ] +} diff --git a/metrics/integration/render-tests/raster-resampling/literal/expected.png b/metrics/integration/render-tests/raster-resampling/literal/expected.png new file mode 100644 index 00000000000..f4f7bce7123 Binary files /dev/null and b/metrics/integration/render-tests/raster-resampling/literal/expected.png differ diff --git a/metrics/integration/render-tests/raster-resampling/literal/style.json b/metrics/integration/render-tests/raster-resampling/literal/style.json new file mode 100644 index 00000000000..daf15580f02 --- /dev/null +++ b/metrics/integration/render-tests/raster-resampling/literal/style.json @@ -0,0 +1,34 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 20, + "sources": { + "satellite": { + "type": "raster", + "tiles": [ + "local://tiles/{z}-{x}-{y}.satellite.png" + ], + "maxzoom": 17, + "tileSize": 256 + } + }, + "layers": [ + { + "id": "raster", + "type": "raster", + "source": "satellite", + "paint": { + "raster-fade-duration": 0, + "raster-resampling": "nearest" + } + } + ] +} diff --git a/metrics/integration/render-tests/raster-rotation/0/expected.png b/metrics/integration/render-tests/raster-rotation/0/expected.png new file mode 100644 index 00000000000..1a5e0a61fa2 Binary files /dev/null and b/metrics/integration/render-tests/raster-rotation/0/expected.png differ diff --git a/metrics/integration/render-tests/raster-rotation/0/style.json b/metrics/integration/render-tests/raster-rotation/0/style.json new file mode 100644 index 00000000000..bfbebd2c095 --- /dev/null +++ b/metrics/integration/render-tests/raster-rotation/0/style.json @@ -0,0 +1,34 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 16, + "bearing": 0, + "sources": { + "satellite": { + "type": "raster", + "tiles": [ + "local://tiles/{z}-{x}-{y}.satellite.png" + ], + "maxzoom": 17, + "tileSize": 256 + } + }, + "layers": [ + { + "id": "raster", + "type": "raster", + "source": "satellite", + "paint": { + "raster-fade-duration": 0 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/raster-rotation/180/expected.png b/metrics/integration/render-tests/raster-rotation/180/expected.png new file mode 100644 index 00000000000..9d5504bc563 Binary files /dev/null and b/metrics/integration/render-tests/raster-rotation/180/expected.png differ diff --git a/metrics/integration/render-tests/raster-rotation/180/style.json b/metrics/integration/render-tests/raster-rotation/180/style.json new file mode 100644 index 00000000000..974b7a02d38 --- /dev/null +++ b/metrics/integration/render-tests/raster-rotation/180/style.json @@ -0,0 +1,34 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 16, + "bearing": 180, + "sources": { + "satellite": { + "type": "raster", + "tiles": [ + "local://tiles/{z}-{x}-{y}.satellite.png" + ], + "maxzoom": 17, + "tileSize": 256 + } + }, + "layers": [ + { + "id": "raster", + "type": "raster", + "source": "satellite", + "paint": { + "raster-fade-duration": 0 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/raster-rotation/270/expected.png b/metrics/integration/render-tests/raster-rotation/270/expected.png new file mode 100644 index 00000000000..4e8c251bd90 Binary files /dev/null and b/metrics/integration/render-tests/raster-rotation/270/expected.png differ diff --git a/metrics/integration/render-tests/raster-rotation/270/style.json b/metrics/integration/render-tests/raster-rotation/270/style.json new file mode 100644 index 00000000000..3105d4859fe --- /dev/null +++ b/metrics/integration/render-tests/raster-rotation/270/style.json @@ -0,0 +1,34 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 16, + "bearing": 270, + "sources": { + "satellite": { + "type": "raster", + "tiles": [ + "local://tiles/{z}-{x}-{y}.satellite.png" + ], + "maxzoom": 17, + "tileSize": 256 + } + }, + "layers": [ + { + "id": "raster", + "type": "raster", + "source": "satellite", + "paint": { + "raster-fade-duration": 0 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/raster-rotation/45/expected.png b/metrics/integration/render-tests/raster-rotation/45/expected.png new file mode 100644 index 00000000000..fbd23c70558 Binary files /dev/null and b/metrics/integration/render-tests/raster-rotation/45/expected.png differ diff --git a/metrics/integration/render-tests/raster-rotation/45/style.json b/metrics/integration/render-tests/raster-rotation/45/style.json new file mode 100644 index 00000000000..afafdf4dad0 --- /dev/null +++ b/metrics/integration/render-tests/raster-rotation/45/style.json @@ -0,0 +1,34 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 16, + "bearing": 45, + "sources": { + "satellite": { + "type": "raster", + "tiles": [ + "local://tiles/{z}-{x}-{y}.satellite.png" + ], + "maxzoom": 17, + "tileSize": 256 + } + }, + "layers": [ + { + "id": "raster", + "type": "raster", + "source": "satellite", + "paint": { + "raster-fade-duration": 0 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/raster-rotation/90/expected.png b/metrics/integration/render-tests/raster-rotation/90/expected.png new file mode 100644 index 00000000000..e33275efe23 Binary files /dev/null and b/metrics/integration/render-tests/raster-rotation/90/expected.png differ diff --git a/metrics/integration/render-tests/raster-rotation/90/style.json b/metrics/integration/render-tests/raster-rotation/90/style.json new file mode 100644 index 00000000000..bb9d7269d8b --- /dev/null +++ b/metrics/integration/render-tests/raster-rotation/90/style.json @@ -0,0 +1,34 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 16, + "bearing": 90, + "sources": { + "satellite": { + "type": "raster", + "tiles": [ + "local://tiles/{z}-{x}-{y}.satellite.png" + ], + "maxzoom": 17, + "tileSize": 256 + } + }, + "layers": [ + { + "id": "raster", + "type": "raster", + "source": "satellite", + "paint": { + "raster-fade-duration": 0 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/raster-saturation/default/expected.png b/metrics/integration/render-tests/raster-saturation/default/expected.png new file mode 100644 index 00000000000..1a5e0a61fa2 Binary files /dev/null and b/metrics/integration/render-tests/raster-saturation/default/expected.png differ diff --git a/metrics/integration/render-tests/raster-saturation/default/style.json b/metrics/integration/render-tests/raster-saturation/default/style.json new file mode 100644 index 00000000000..a2db2f18d83 --- /dev/null +++ b/metrics/integration/render-tests/raster-saturation/default/style.json @@ -0,0 +1,33 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 16, + "sources": { + "satellite": { + "type": "raster", + "tiles": [ + "local://tiles/{z}-{x}-{y}.satellite.png" + ], + "maxzoom": 17, + "tileSize": 256 + } + }, + "layers": [ + { + "id": "raster", + "type": "raster", + "source": "satellite", + "paint": { + "raster-fade-duration": 0 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/raster-saturation/function/expected.png b/metrics/integration/render-tests/raster-saturation/function/expected.png new file mode 100644 index 00000000000..991080cb0b7 Binary files /dev/null and b/metrics/integration/render-tests/raster-saturation/function/expected.png differ diff --git a/metrics/integration/render-tests/raster-saturation/function/style.json b/metrics/integration/render-tests/raster-saturation/function/style.json new file mode 100644 index 00000000000..aa0adda6b1d --- /dev/null +++ b/metrics/integration/render-tests/raster-saturation/function/style.json @@ -0,0 +1,45 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 16, + "sources": { + "satellite": { + "type": "raster", + "tiles": [ + "local://tiles/{z}-{x}-{y}.satellite.png" + ], + "maxzoom": 17, + "tileSize": 256 + } + }, + "layers": [ + { + "id": "raster", + "type": "raster", + "source": "satellite", + "paint": { + "raster-fade-duration": 0, + "raster-saturation": { + "stops": [ + [ + 16, + 0.6 + ], + [ + 17, + 0.8 + ] + ] + } + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/raster-saturation/literal/expected.png b/metrics/integration/render-tests/raster-saturation/literal/expected.png new file mode 100644 index 00000000000..b77322257fa Binary files /dev/null and b/metrics/integration/render-tests/raster-saturation/literal/expected.png differ diff --git a/metrics/integration/render-tests/raster-saturation/literal/style.json b/metrics/integration/render-tests/raster-saturation/literal/style.json new file mode 100644 index 00000000000..307b80829cd --- /dev/null +++ b/metrics/integration/render-tests/raster-saturation/literal/style.json @@ -0,0 +1,34 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 16, + "sources": { + "satellite": { + "type": "raster", + "tiles": [ + "local://tiles/{z}-{x}-{y}.satellite.png" + ], + "maxzoom": 17, + "tileSize": 256 + } + }, + "layers": [ + { + "id": "raster", + "type": "raster", + "source": "satellite", + "paint": { + "raster-fade-duration": 0, + "raster-saturation": 0.2 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/raster-visibility/none/expected.png b/metrics/integration/render-tests/raster-visibility/none/expected.png new file mode 100644 index 00000000000..5308b74aacb Binary files /dev/null and b/metrics/integration/render-tests/raster-visibility/none/expected.png differ diff --git a/metrics/integration/render-tests/raster-visibility/none/style.json b/metrics/integration/render-tests/raster-visibility/none/style.json new file mode 100644 index 00000000000..1cfd1c686f9 --- /dev/null +++ b/metrics/integration/render-tests/raster-visibility/none/style.json @@ -0,0 +1,56 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 16, + "sources": { + "satellite": { + "type": "raster", + "tiles": [ + "local://tiles/{z}-{x}-{y}.satellite.png" + ], + "maxzoom": 17, + "tileSize": 256 + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "raster-visible", + "type": "raster", + "source": "satellite", + "layout": { + "visibility": "visible" + }, + "paint": { + "raster-opacity": 0, + "raster-fade-duration": 0 + } + }, + { + "id": "raster-none", + "type": "raster", + "source": "satellite", + "layout": { + "visibility": "none" + }, + "paint": { + "raster-opacity": 1, + "raster-fade-duration": 0 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/raster-visibility/visible/expected.png b/metrics/integration/render-tests/raster-visibility/visible/expected.png new file mode 100644 index 00000000000..1a5e0a61fa2 Binary files /dev/null and b/metrics/integration/render-tests/raster-visibility/visible/expected.png differ diff --git a/metrics/integration/render-tests/raster-visibility/visible/style.json b/metrics/integration/render-tests/raster-visibility/visible/style.json new file mode 100644 index 00000000000..54e4718e36f --- /dev/null +++ b/metrics/integration/render-tests/raster-visibility/visible/style.json @@ -0,0 +1,56 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 16, + "sources": { + "satellite": { + "type": "raster", + "tiles": [ + "local://tiles/{z}-{x}-{y}.satellite.png" + ], + "maxzoom": 17, + "tileSize": 256 + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "raster-visible", + "type": "raster", + "source": "satellite", + "layout": { + "visibility": "visible" + }, + "paint": { + "raster-opacity": 1, + "raster-fade-duration": 0 + } + }, + { + "id": "raster-none", + "type": "raster", + "source": "satellite", + "layout": { + "visibility": "none" + }, + "paint": { + "raster-opacity": 0, + "raster-fade-duration": 0 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/real-world/bangkok/expected.png b/metrics/integration/render-tests/real-world/bangkok/expected.png new file mode 100644 index 00000000000..6967962250a Binary files /dev/null and b/metrics/integration/render-tests/real-world/bangkok/expected.png differ diff --git a/metrics/integration/render-tests/real-world/bangkok/style.json b/metrics/integration/render-tests/real-world/bangkok/style.json new file mode 100644 index 00000000000..deca22d175b --- /dev/null +++ b/metrics/integration/render-tests/real-world/bangkok/style.json @@ -0,0 +1,17 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 512, + "height": 512, + "operations": [ + ["setStyle", "local://styles/bangkok.json"], + ["setZoom", 12 ], + ["setCenter", [100.5434415, 13.714627] ], + ["wait"] + ] + } + }, + "sources": {}, + "layers": [] +} diff --git a/metrics/integration/render-tests/real-world/chicago/expected.png b/metrics/integration/render-tests/real-world/chicago/expected.png new file mode 100644 index 00000000000..1993d16f3bb Binary files /dev/null and b/metrics/integration/render-tests/real-world/chicago/expected.png differ diff --git a/metrics/integration/render-tests/real-world/chicago/style.json b/metrics/integration/render-tests/real-world/chicago/style.json new file mode 100644 index 00000000000..2443a3f49d5 --- /dev/null +++ b/metrics/integration/render-tests/real-world/chicago/style.json @@ -0,0 +1,17 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 512, + "height": 512, + "operations": [ + ["setStyle", "local://styles/chicago.json"], + ["setZoom", 13 ], + ["setCenter", [-87.6942445, 41.8703965] ], + ["wait"] + ] + } + }, + "sources": {}, + "layers": [] +} diff --git a/metrics/integration/render-tests/real-world/nepal/expected.png b/metrics/integration/render-tests/real-world/nepal/expected.png new file mode 100644 index 00000000000..4c10138ca42 Binary files /dev/null and b/metrics/integration/render-tests/real-world/nepal/expected.png differ diff --git a/metrics/integration/render-tests/real-world/nepal/style.json b/metrics/integration/render-tests/real-world/nepal/style.json new file mode 100644 index 00000000000..0d648891cd8 --- /dev/null +++ b/metrics/integration/render-tests/real-world/nepal/style.json @@ -0,0 +1,17 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 512, + "height": 512, + "operations": [ + ["setStyle", "local://styles/nepal.json"], + ["setZoom", 13 ], + ["setCenter", [85.48805250000001, 28.115547] ], + ["wait"] + ] + } + }, + "sources": {}, + "layers": [] +} diff --git a/metrics/integration/render-tests/real-world/norway/expected.png b/metrics/integration/render-tests/real-world/norway/expected.png new file mode 100644 index 00000000000..09012f69c86 Binary files /dev/null and b/metrics/integration/render-tests/real-world/norway/expected.png differ diff --git a/metrics/integration/render-tests/real-world/norway/style.json b/metrics/integration/render-tests/real-world/norway/style.json new file mode 100644 index 00000000000..df3e8ce7ed7 --- /dev/null +++ b/metrics/integration/render-tests/real-world/norway/style.json @@ -0,0 +1,17 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 512, + "height": 512, + "operations": [ + ["setStyle", "local://styles/norway.json"], + ["setZoom", 12 ], + ["setCenter", [10.8181, 64.863174] ], + ["wait"] + ] + } + }, + "sources": {}, + "layers": [] +} diff --git a/metrics/integration/render-tests/real-world/sanfrancisco/expected.png b/metrics/integration/render-tests/real-world/sanfrancisco/expected.png new file mode 100644 index 00000000000..3ef52e44dd9 Binary files /dev/null and b/metrics/integration/render-tests/real-world/sanfrancisco/expected.png differ diff --git a/metrics/integration/render-tests/real-world/sanfrancisco/style.json b/metrics/integration/render-tests/real-world/sanfrancisco/style.json new file mode 100644 index 00000000000..29110468bc1 --- /dev/null +++ b/metrics/integration/render-tests/real-world/sanfrancisco/style.json @@ -0,0 +1,17 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 512, + "height": 512, + "operations": [ + ["setStyle", "local://styles/sanfrancisco.json"], + ["setZoom", 15 ], + ["setCenter", [-122.448635, 37.7669995] ], + ["wait"] + ] + } + }, + "sources": {}, + "layers": [] +} diff --git a/metrics/integration/render-tests/real-world/uruguay/expected.png b/metrics/integration/render-tests/real-world/uruguay/expected.png new file mode 100644 index 00000000000..4b5ea75a250 Binary files /dev/null and b/metrics/integration/render-tests/real-world/uruguay/expected.png differ diff --git a/metrics/integration/render-tests/real-world/uruguay/style.json b/metrics/integration/render-tests/real-world/uruguay/style.json new file mode 100644 index 00000000000..9d5c8cb5234 --- /dev/null +++ b/metrics/integration/render-tests/real-world/uruguay/style.json @@ -0,0 +1,17 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 512, + "height": 512, + "operations": [ + ["setStyle", "local://styles/uruguay.json"], + ["setZoom", 9 ], + ["setCenter", [-56.509552, -32.865788] ], + ["wait"] + ] + } + }, + "sources": {}, + "layers": [] +} diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#2305/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-js#2305/expected.png new file mode 100644 index 00000000000..412225a6a6d Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-js#2305/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#2305/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-js#2305/style.json new file mode 100644 index 00000000000..8aa0243bf12 --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-js#2305/style.json @@ -0,0 +1,35 @@ +{ + "version": 8, + "metadata": { + "test": {} + }, + "zoom": 2, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "sprite": "local://sprites/emerald", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-pattern": "cemetery_icon" + } + }, + { + "id": "land", + "type": "fill", + "source": "mapbox", + "source-layer": "water", + "paint": { + "fill-color": "blue" + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#2467/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-js#2467/expected.png new file mode 100644 index 00000000000..cdd8f874e13 Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-js#2467/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#2467/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-js#2467/style.json new file mode 100644 index 00000000000..ffb9d77b467 --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-js#2467/style.json @@ -0,0 +1,56 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "description": "Tests that raster tiles are retained for cross-fading. The first pair of wait operations ensures that z1 tiles are fully faded in. The third wait ensures that v0 tiles are loaded, and the last two waits fade them halfway in.", + "operations": [ + [ + "wait", + 0 + ], + [ + "wait", + 1000 + ], + [ + "setZoom", + 0 + ], + [ + "wait" + ], + [ + "wait", + 0 + ], + [ + "wait", + 500 + ] + ] + } + }, + "zoom": 1, + "sources": { + "satellite": { + "type": "raster", + "tiles": [ + "local://tiles/{z}-{x}-{y}.cross-fade.png" + ], + "maxzoom": 17, + "tileSize": 256 + } + }, + "layers": [ + { + "id": "raster", + "type": "raster", + "source": "satellite", + "paint": { + "raster-fade-duration": 1000 + } + } + ] +} diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#2523/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-js#2523/expected.png new file mode 100644 index 00000000000..3892f3a6986 Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-js#2523/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#2523/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-js#2523/style.json new file mode 100644 index 00000000000..f0af0d8c46e --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-js#2523/style.json @@ -0,0 +1,58 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256, + "allowed": 0.003 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "sprite": "local://sprites/emerald", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-pattern": "cemetery_icon" + } + }, + { + "id": "literal", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "filter": [ + "==", + "maki", + "restaurant" + ], + "layout": { + "symbol-placement": "point", + "text-allow-overlap": true, + "text-ignore-placement": true, + "text-field": "Test", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + }, + "paint": { + "text-opacity": 1 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#2533/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-js#2533/expected.png new file mode 100644 index 00000000000..04c3afcb784 Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-js#2533/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#2533/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-js#2533/style.json new file mode 100644 index 00000000000..bbf9b40c2bd --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-js#2533/style.json @@ -0,0 +1,43 @@ +{ + "version": 8, + "metadata": { + "test": { + "operations": [ + ["setPaintProperty", "land", "fill-pattern", "zoo_icon"], + ["wait"] + ] + } + }, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "transition": { + "duration": 0 + }, + "sprite": "local://sprites/emerald", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "land", + "type": "fill", + "source": "mapbox", + "source-layer": "water", + "paint": { + "fill-color": "#3bb2d0", + "fill-antialias": false + } + } + ] +} diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#2534/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-js#2534/expected.png new file mode 100644 index 00000000000..d46c3a6fc16 Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-js#2534/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#2534/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-js#2534/style.json new file mode 100644 index 00000000000..b4acada4e13 --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-js#2534/style.json @@ -0,0 +1,44 @@ +{ + "version": 8, + "metadata": { + "test": { + "allowed": 0.0003, + "operations": [ + ["setPaintProperty", "land", "fill-pattern", null], + ["wait"] + ] + } + }, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "transition": { + "duration": 0 + }, + "sprite": "local://sprites/emerald", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "land", + "type": "fill", + "source": "mapbox", + "source-layer": "water", + "paint": { + "fill-color": "#3bb2d0", + "fill-pattern": "zoo_icon" + } + } + ] +} diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#2762/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-js#2762/expected.png new file mode 100644 index 00000000000..155f4f9ee99 Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-js#2762/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#2762/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-js#2762/style.json new file mode 100644 index 00000000000..d7f1690b1a3 --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-js#2762/style.json @@ -0,0 +1,63 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "description": "Tests that text-translate transitions correctly by checking the rendering halfway through the (default 300ms long) transition from [-10, 0] to [10, 0].", + "operations": [ + [ + "setPaintProperty", + "symbol", + "text-translate", + [ + 10, + 0 + ] + ], + [ + "wait", + 0 + ], + [ + "wait", + 150 + ] + ] + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "symbol-placement": "point", + "text-field": "A", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + }, + "paint": { + "text-translate": [ + -10, + 0 + ] + } + } + ] +} diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#2769/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-js#2769/expected.png new file mode 100644 index 00000000000..ba43568194b Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-js#2769/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#2769/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-js#2769/style.json new file mode 100644 index 00000000000..97357211a86 --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-js#2769/style.json @@ -0,0 +1,45 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "description": "Tests that transitions from property default values function correctly by checking the rendering halfway through the (default 300ms long) transition from the default circle-color (black) to red.", + "operations": [ + [ + "setPaintProperty", + "circle", + "circle-color", + "red" + ], + [ + "wait", + 0 + ], + [ + "wait", + 150 + ] + ] + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson" + } + ] +} diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#2787/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-js#2787/expected.png new file mode 100644 index 00000000000..da62bb0db1d Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-js#2787/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#2787/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-js#2787/style.json new file mode 100644 index 00000000000..4eb359463bf --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-js#2787/style.json @@ -0,0 +1,14 @@ +{ + "version": 8, + "metadata": { + "test": { + "operations": [ + ["addLayer", {"id": "mapbox", "type": "background"}], + ["removeLayer", "mapbox"], + ["wait"] + ] + } + }, + "sources": {}, + "layers": [] +} diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#2846/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-js#2846/expected.png new file mode 100644 index 00000000000..bbce05c5865 Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-js#2846/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#2846/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-js#2846/style.json new file mode 100644 index 00000000000..be012f08bdd --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-js#2846/style.json @@ -0,0 +1,141 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "source": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "property": 0 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -12, + -12 + ], + [ + -12, + 12 + ], + [ + -4, + 12 + ], + [ + -4, + -12 + ], + [ + -12, + -12 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "property": 1 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -4, + -12 + ], + [ + -4, + 12 + ], + [ + 4, + 12 + ], + [ + 4, + -12 + ], + [ + -4, + -12 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "property": 2 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + 4, + -12 + ], + [ + 4, + 12 + ], + [ + 12, + 12 + ], + [ + 12, + -12 + ], + [ + 4, + -12 + ] + ] + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "fill", + "type": "fill", + "source": "source", + "paint": { + "fill-antialias": false, + "fill-opacity": { + "property": "property", + "stops": [ + [ + 0, + 0 + ], + [ + 4, + 1 + ] + ] + } + } + } + ] +} diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#2929/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-js#2929/expected.png new file mode 100644 index 00000000000..646602d9416 Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-js#2929/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#2929/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-js#2929/style.json new file mode 100644 index 00000000000..4b8b1db09a4 --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-js#2929/style.json @@ -0,0 +1,61 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "center": [ + 0, + 0 + ], + "zoom": 4.5, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [0, 0] + }, + "properties": {} + } + } + }, + "layers": [ + { + "id": "line1", + "type": "circle", + "source": "geojson", + "minzoom": 4.3, + "paint": { + "circle-color": "red", + "circle-radius": 4, + "circle-translate": [-5, -5] + } + }, + { + "id": "line2", + "type": "circle", + "source": "geojson", + "minzoom": 4.5, + "paint": { + "circle-color": "green", + "circle-radius": 4 + } + }, + { + "id": "line3", + "type": "circle", + "source": "geojson", + "minzoom": 4.7, + "paint": { + "circle-color": "blue", + "circle-radius": 4, + "circle-translate": [5, 5] + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#3010/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-js#3010/expected.png new file mode 100644 index 00000000000..61995c23168 Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-js#3010/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#3010/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-js#3010/style.json new file mode 100644 index 00000000000..56e0e089fea --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-js#3010/style.json @@ -0,0 +1,48 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 512, + "height": 512 + } + }, + "center": [ + -122.51309394836426, + 37.563391708549425 + ], + "zoom": 20, + "sources": { + "image": { + "type": "image", + "coordinates": [ + [ + -122.51596391201019, + 37.56238816766053 + ], + [ + -122.51467645168304, + 37.56410183312965 + ], + [ + -122.51309394836426, + 37.563391708549425 + ], + [ + -122.51423120498657, + 37.56161849366671 + ] + ], + "url": "local://image/0.png" + } + }, + "layers": [ + { + "id": "image", + "type": "raster", + "source": "image", + "paint": { + "raster-fade-duration": 0 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#3107/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-js#3107/expected.png new file mode 100644 index 00000000000..c12cf951f41 Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-js#3107/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#3107/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-js#3107/style.json new file mode 100644 index 00000000000..b9c9ccd284a --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-js#3107/style.json @@ -0,0 +1,54 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -10, + -10 + ], + [ + -10, + 10 + ], + [ + 10, + 10 + ], + [ + 10, + -10 + ], + [ + -10, + -10 + ] + ] + ] + } + } + }, + "sprite": "local://sprites/emerald", + "layers": [ + { + "id": "fill", + "type": "fill", + "source": "geojson", + "paint": { + "fill-outline-color": "hsla(0, 0, 0, 0)", + "fill-color": "hsla(0, 0, 0, 0)", + "fill-pattern": "generic_icon" + } + } + ] +} diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#3320/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-js#3320/expected.png new file mode 100644 index 00000000000..b2d77d5f7ad Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-js#3320/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#3320/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-js#3320/style.json new file mode 100644 index 00000000000..9318ae0acc3 --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-js#3320/style.json @@ -0,0 +1,88 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "pitch": 40, + "bearing": 20, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "GeometryCollection", + "geometries": [ + { + "type": "Polygon", + "coordinates": [ + [ + [ + -20, + -20 + ], + [ + -20, + 20 + ], + [ + 20, + 20 + ], + [ + 20, + -20 + ], + [ + -20, + -20 + ] + ] + ] + }, + { + "type": "Polygon", + "coordinates": [ + [ + [ + -25, + -25 + ], + [ + -25, + 25 + ], + [ + 25, + 25 + ], + [ + 25, + -25 + ], + [ + -25, + -25 + ] + ] + ] + } + ] + } + } + }, + "sprite": "local://sprites/emerald", + "layers": [ + { + "id": "fill", + "type": "fill", + "source": "geojson", + "paint": { + "fill-antialias": false, + "fill-color": "blue", + "fill-opacity": 0.5 + } + } + ] +} diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#3365/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-js#3365/expected.png new file mode 100644 index 00000000000..db0852c7ed1 Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-js#3365/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#3365/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-js#3365/style.json new file mode 100644 index 00000000000..58f3897aa96 --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-js#3365/style.json @@ -0,0 +1,61 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 128, + "height": 128, + "operations": [ + [ + "wait" + ], + [ + "setBearing", + 90 + ], + [ + "wait" + ] + ] + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "GeometryCollection", + "geometries": [ + { + "type": "Point", + "coordinates": [ + 0, + 20 + ] + }, + { + "type": "Point", + "coordinates": [ + 0, + -20 + ] + } + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "symbol-placement": "point", + "text-field": "Long Label", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#3394/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-js#3394/expected.png new file mode 100644 index 00000000000..dcd1ab11f1f Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-js#3394/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#3394/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-js#3394/style.json new file mode 100644 index 00000000000..1c442038cef --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-js#3394/style.json @@ -0,0 +1,50 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "1", + "type": "symbol", + "source": "geojson", + "layout": { + "symbol-placement": "point", + "text-field": "1", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + } + }, + { + "id": "0", + "type": "symbol", + "source": "geojson", + "layout": { + "symbol-placement": "point", + "text-field": "0", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#3426/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-js#3426/expected.png new file mode 100644 index 00000000000..204976c3fac Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-js#3426/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#3426/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-js#3426/style.json new file mode 100644 index 00000000000..5e95679f1b6 --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-js#3426/style.json @@ -0,0 +1,55 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "wait" + ], + [ + "setPaintProperty", + "line", + "line-width", + 10 + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "LineString", + "coordinates": [ + [ + -180, + 0 + ], + [ + 180, + 0 + ] + ] + } + } + }, + "layers": [ + { + "id": "line", + "type": "line", + "source": "geojson", + "paint": { + "line-width": 1, + "line-dasharray": [1, 1] + } + } + ] +} diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#3548/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-js#3548/expected.png new file mode 100644 index 00000000000..c19aa0b53ab Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-js#3548/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#3548/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-js#3548/style.json new file mode 100644 index 00000000000..587606ebb0f --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-js#3548/style.json @@ -0,0 +1,184 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 512 + } + }, + "sources": { + "rect": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -0.0004, + -0.0004 + ], + [ + -0.0004, + 0 + ], + [ + 0.0004, + 0.0004 + ], + [ + 0.0004, + 0 + ], + [ + -0.0004, + -0.0004 + ] + ] + ] + } + } + ] + } + }, + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "property": 30 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -0.0003, + -0.0003 + ], + [ + -0.0003, + 0.0003 + ], + [ + 0.0003, + 0.0003 + ], + [ + 0.0003, + -0.0003 + ], + [ + -0.0003, + -0.0003 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "property": 20 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -0.0002, + 0 + ], + [ + 0, + 0.0002 + ], + [ + 0.0002, + 0 + ], + [ + 0, + -0.0002 + ], + [ + -0.0002, + 0 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "property": 10 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -0.0001, + -0.0001 + ], + [ + -0.0001, + 0.0001 + ], + [ + 0.0001, + 0.0001 + ], + [ + 0.0001, + -0.0001 + ], + [ + -0.0001, + -0.0001 + ] + ] + ] + } + } + ] + } + } + }, + "pitch": 60, + "zoom": 18, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "blue" + } + }, + { + "id": "rect", + "type": "fill", + "source": "rect", + "paint": { + "fill-color": "rgba(0,255,255,1)" + } + }, + { + "id": "extrusion", + "type": "fill-extrusion", + "source": "geojson", + "paint": { + "fill-extrusion-height": 10, + "fill-extrusion-color": "black" + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#3612/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-js#3612/expected.png new file mode 100644 index 00000000000..1c7748a5cad Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-js#3612/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#3612/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-js#3612/style.json new file mode 100644 index 00000000000..dd100894e50 --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-js#3612/style.json @@ -0,0 +1,78 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.413, + 52.498 + ], + "zoom": 15, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "sprite": "local://sprites/emerald", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-pattern": "cemetery_icon" + } + }, + { + "id": "literal", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "filter": [ + "==", + "maki", + "restaurant" + ], + "layout": { + "symbol-placement": "point", + "text-allow-overlap": true, + "text-ignore-placement": true, + "text-field": "Test", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + }, + "paint": { + "text-opacity": 1 + } + }, + { + "id": "translucent", + "type": "fill", + "source": "mapbox", + "source-layer": "landuse", + "filter": ["==", "class", "park"], + "paint": { + "fill-color": "rgba(0,0,0,0.8)", + "fill-antialias": false + } + }, + { + "id": "opaque", + "type": "fill", + "source": "mapbox", + "source-layer": "landuse", + "filter": ["==", "class", "pitch"], + "paint": { + "fill-color": "red" + } + } + ] +} diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#3614/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-js#3614/expected.png new file mode 100644 index 00000000000..49901b2de80 Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-js#3614/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#3614/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-js#3614/style.json new file mode 100644 index 00000000000..1cc10611ffd --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-js#3614/style.json @@ -0,0 +1,40 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "wait" + ], + [ + "setBearing", + 10 + ], + [ + "wait" + ] + ] + } + }, + "sources": { + "satellite": { + "type": "raster", + "tiles": [ + "local://tiles/{z}-{x}-{y}.satellite.png" + ], + "tileSize": 256 + } + }, + "layers": [ + { + "id": "satellite", + "type": "raster", + "source": "satellite", + "paint": { + "raster-fade-duration": 0 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#3623/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-js#3623/expected.png new file mode 100644 index 00000000000..db0852c7ed1 Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-js#3623/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#3623/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-js#3623/style.json new file mode 100644 index 00000000000..94bdbaf7c09 --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-js#3623/style.json @@ -0,0 +1,78 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 128, + "height": 128, + "operations": [ + [ + "wait" + ], + [ + "setZoom", + 1 + ], + [ + "wait" + ], + [ + "setBearing", + 90 + ], + [ + "wait" + ], + [ + "setZoom", + 0 + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "GeometryCollection", + "geometries": [ + { + "type": "Point", + "coordinates": [ + 0, + 20 + ] + }, + { + "type": "Point", + "coordinates": [ + 0, + -20 + ] + } + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "symbol-placement": "point", + "text-field": "Long Label", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#3633/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-js#3633/expected.png new file mode 100644 index 00000000000..4cb77303dde Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-js#3633/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#3633/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-js#3633/style.json new file mode 100644 index 00000000000..f2d865dc993 --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-js#3633/style.json @@ -0,0 +1,50 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ "removeLayer", "circle" ], + [ + "addLayer", + { + "id": "circle", + "type": "circle", + "source": "geojson" + } + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [{ + "id": "circle", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "dot.sdf" + }, + "paint": { + "icon-color": "red" + } + }] +} diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#3682/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-js#3682/expected.png new file mode 100644 index 00000000000..f5be29d3660 Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-js#3682/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#3682/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-js#3682/style.json new file mode 100644 index 00000000000..ed5b8bb3ff0 --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-js#3682/style.json @@ -0,0 +1,50 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Feature", + "properties": { + "width": 5 + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + 0, + -20 + ], + [ + 0, + 20 + ] + ] + } + } + } + }, + "layers": [ + { + "id": "line", + "type": "line", + "source": "geojson", + "paint": { + "line-dasharray": [ + 1, + 1 + ], + "line-width": { + "type": "identity", + "property": "width" + } + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#3702/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-js#3702/expected.png new file mode 100644 index 00000000000..75fff6a51ae Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-js#3702/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#3702/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-js#3702/style.json new file mode 100644 index 00000000000..ac1ee22f55e --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-js#3702/style.json @@ -0,0 +1,106 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 128, + "height": 128 + } + }, + "center": [ + -97.5, + 34 + ], + "zoom": 4, + "pitch": 60, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "color": "blue" + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -101.31591796875, + 33.50475906922609 + ], + [ + -101.31591796875, + 37.45741810262938 + ], + [ + -96.61376953125, + 37.45741810262938 + ], + [ + -96.61376953125, + 33.50475906922609 + ], + [ + -101.31591796875, + 33.50475906922609 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "color": "red" + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -98.87695312499999, + 32.175612478499325 + ], + [ + -98.87695312499999, + 35.99578538642032 + ], + [ + -94.2626953125, + 35.99578538642032 + ], + [ + -94.2626953125, + 32.175612478499325 + ], + [ + -98.87695312499999, + 32.175612478499325 + ] + ] + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "fill", + "type": "fill", + "source": "geojson", + "paint": { + "fill-antialias": false, + "fill-opacity": 1, + "fill-color": { + "property": "color", + "type": "identity" + } + } + } + ] +} diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#3723/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-js#3723/expected.png new file mode 100644 index 00000000000..89f84a8e824 Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-js#3723/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#3723/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-js#3723/style.json new file mode 100644 index 00000000000..5481ce5592e --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-js#3723/style.json @@ -0,0 +1,29 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "raster": { + "type": "raster", + "tiles": [ + "local://tiles/alpha.png" + ], + "tileSize": 256 + } + }, + "layers": [ + { + "id": "raster", + "type": "raster", + "source": "raster", + "paint": { + "raster-fade-duration": 0, + "raster-brightness-min": 0.5 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#3819/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-js#3819/expected.png new file mode 100644 index 00000000000..3a2d7006298 Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-js#3819/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#3819/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-js#3819/style.json new file mode 100644 index 00000000000..14adeb2c265 --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-js#3819/style.json @@ -0,0 +1,41 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [] + } + } + }, + "layers": [ + { + "id": "red", + "type": "background", + "paint": { + "background-color": "rgb(255, 0, 0)", + "background-opacity": 1 + } + }, + { + "id": "green", + "type": "background", + "paint": { + "background-color": "rgb(0, 255, 0)", + "background-opacity": 0 + } + }, + { + "id": "other", + "type": "circle", + "source": "geojson" + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#3903/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-js#3903/expected.png new file mode 100644 index 00000000000..7b8ae763ee7 Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-js#3903/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#3903/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-js#3903/style.json new file mode 100644 index 00000000000..57acc74aeb2 --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-js#3903/style.json @@ -0,0 +1,32 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 1, + "height": 1, + "operations": [ + [ + "removeLayer", + "background" + ], + [ + "addLayer", + { + "id": "background", + "type": "background" + } + ], + [ + "wait" + ] + ] + } + }, + "sources": {}, + "layers": [ + { + "id": "background", + "type": "background" + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#3910/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-js#3910/expected.png new file mode 100644 index 00000000000..9567991a8e2 Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-js#3910/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#3910/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-js#3910/style.json new file mode 100644 index 00000000000..ef1dfccfd7a --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-js#3910/style.json @@ -0,0 +1,51 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Feature", + "properties": { + "red": "red", + "blue": "blue" + }, + "geometry": { + "type": "Point", + "coordinates": [0, 0] + } + } + } + }, + "layers": [ + { + "id": "red", + "type": "circle", + "source": "geojson", + "paint": { + "circle-color": { + "type": "identity", + "property": "red" + }, + "circle-translate": [-5, 0] + } + }, + { + "id": "blue", + "type": "circle", + "source": "geojson", + "paint": { + "circle-color": { + "type": "identity", + "property": "blue" + }, + "circle-translate": [5, 0] + } + } + ] +} diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#3949/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-js#3949/expected.png new file mode 100644 index 00000000000..fa15a2a551d Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-js#3949/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#3949/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-js#3949/style.json new file mode 100644 index 00000000000..e37e4667c08 --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-js#3949/style.json @@ -0,0 +1,78 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "wait" + ], + [ + "setPaintProperty", + "circle", + "circle-radius", + 3 + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "radius": 10 + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + "radius": 15 + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson", + "paint": { + "circle-radius": { + "property": "radius", + "stops": [ + [{"value": 10, "zoom": 0}, 10], + [{"value": 15, "zoom": 0}, 15] + ] + } + } + } + ] +} diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#4124/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-js#4124/expected.png new file mode 100644 index 00000000000..fc39bcd84fc Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-js#4124/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#4124/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-js#4124/style.json new file mode 100644 index 00000000000..3bb82bc4498 --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-js#4124/style.json @@ -0,0 +1,56 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "a": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + "b": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + }, + "layers": [ + { + "id": "a", + "source": "a", + "type": "circle", + "paint": { + "circle-color": { + "type": "identity", + "property": "nonesuch", + "default": "red" + } + } + }, + { + "id": "b", + "source": "b", + "type": "circle", + "paint": { + "circle-color": { + "type": "identity", + "property": "nonesuch" + } + } + } + ] +} diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#4144/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-js#4144/expected.png new file mode 100644 index 00000000000..fc39bcd84fc Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-js#4144/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#4144/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-js#4144/style.json new file mode 100644 index 00000000000..be8d116f26d --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-js#4144/style.json @@ -0,0 +1,70 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "a": { + "type": "geojson", + "data": { + "type": "Feature", + "properties": { + "property": "foo" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + } + }, + "b": { + "type": "geojson", + "data": { + "type": "Feature", + "properties": { + "property": "foo" + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + } + }, + "layers": [ + { + "id": "a", + "source": "a", + "type": "circle", + "paint": { + "circle-color": { + "type": "categorical", + "property": "property", + "stops": [["bar", "blue"]], + "default": "red" + } + } + }, + { + "id": "b", + "source": "b", + "type": "circle", + "paint": { + "circle-color": { + "type": "categorical", + "property": "property", + "stops": [["bar", "blue"]] + } + } + } + ] +} diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#4146/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-js#4146/expected.png new file mode 100644 index 00000000000..fc39bcd84fc Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-js#4146/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#4146/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-js#4146/style.json new file mode 100644 index 00000000000..b3c9d733324 --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-js#4146/style.json @@ -0,0 +1,70 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "a": { + "type": "geojson", + "data": { + "type": "Feature", + "properties": { + "property": "foo" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + } + }, + "b": { + "type": "geojson", + "data": { + "type": "Feature", + "properties": { + "property": "foo" + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + } + }, + "layers": [ + { + "id": "a", + "source": "a", + "type": "circle", + "paint": { + "circle-color": { + "type": "interval", + "property": "property", + "stops": [[0, "blue"]], + "default": "red" + } + } + }, + { + "id": "b", + "source": "b", + "type": "circle", + "paint": { + "circle-color": { + "type": "interval", + "property": "property", + "stops": [[0, "blue"]] + } + } + } + ] +} diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#4150/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-js#4150/expected.png new file mode 100644 index 00000000000..ba16f6237be Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-js#4150/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#4150/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-js#4150/style.json new file mode 100644 index 00000000000..4c8df625cd7 --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-js#4150/style.json @@ -0,0 +1,123 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "a": { + "type": "geojson", + "data": { + "type": "Feature", + "properties": { + "property": 0 + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + -10 + ] + } + } + }, + "b": { + "type": "geojson", + "data": { + "type": "Feature", + "properties": { + "property": 0 + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + -10 + ] + } + } + }, + "c": { + "type": "geojson", + "data": { + "type": "Feature", + "properties": { + "property": "invalid" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 10 + ] + } + } + }, + "d": { + "type": "geojson", + "data": { + "type": "Feature", + "properties": { + "property": "invalid" + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 10 + ] + } + } + } + }, + "layers": [ + { + "id": "a", + "source": "a", + "type": "circle", + "paint": { + "circle-color": { + "type": "identity", + "property": "property", + "default": "red" + } + } + }, + { + "id": "b", + "source": "b", + "type": "circle", + "paint": { + "circle-color": { + "type": "identity", + "property": "property" + } + } + }, + { + "id": "c", + "source": "c", + "type": "circle", + "paint": { + "circle-color": { + "type": "identity", + "property": "property", + "default": "blue" + } + } + }, + { + "id": "d", + "source": "d", + "type": "circle", + "paint": { + "circle-color": { + "type": "identity", + "property": "property" + } + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#4172/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-js#4172/expected.png new file mode 100644 index 00000000000..ee941df5560 Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-js#4172/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#4172/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-js#4172/style.json new file mode 100644 index 00000000000..63bfb6e967a --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-js#4172/style.json @@ -0,0 +1,61 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 64, + "width": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "zero": 0 + }, + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "baseline", + "type": "circle", + "source": "geojson", + "paint": { + "circle-radius": 5, + "circle-translate": [-5, 0] + } + }, + { + "id": "interpolate", + "type": "circle", + "source": "geojson", + "paint": { + "circle-radius": ["interpolate", ["linear"], ["/", 0, ["get", "zero"]], 1, 1, 2, 2], + "circle-translate": [0, 0] + } + }, + { + "id": "step", + "type": "circle", + "source": "geojson", + "paint": { + "circle-radius": ["step", ["/", 0, ["get", "zero"]], 1, 2, 2], + "circle-translate": [5, 0] + } + } + ] +} diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#4235/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-js#4235/expected.png new file mode 100644 index 00000000000..c0dee2bab22 Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-js#4235/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#4235/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-js#4235/style.json new file mode 100644 index 00000000000..7c2284ede3a --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-js#4235/style.json @@ -0,0 +1,70 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": {}, + "id": 1, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + "$id": "b" + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "a", + "type": "circle", + "source": "geojson", + "filter": [ + "has", + "$id" + ], + "paint": { + "circle-color": "red" + } + }, + { + "id": "b", + "type": "circle", + "source": "geojson", + "filter": [ + "!has", + "$id" + ], + "paint": { + "circle-color": "blue" + } + } + ] +} diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#4550/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-js#4550/expected.png new file mode 100644 index 00000000000..46abe690d4b Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-js#4550/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#4550/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-js#4550/style.json new file mode 100644 index 00000000000..c3a81b942dd --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-js#4550/style.json @@ -0,0 +1,43 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "image": { + "type": "image", + "coordinates": [ + [ + -180, + 85 + ], + [ + 180, + 85 + ], + [ + 180, + -85 + ], + [ + -180, + -85 + ] + ], + "url": "local://image/0.png" + } + }, + "layers": [ + { + "id": "image", + "type": "raster", + "source": "image", + "paint": { + "raster-fade-duration": 0 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#4551/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-js#4551/expected.png new file mode 100644 index 00000000000..f72022dd3ae Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-js#4551/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#4551/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-js#4551/style.json new file mode 100644 index 00000000000..d2c89a4e5ad --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-js#4551/style.json @@ -0,0 +1,47 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 128, + "height": 64 + } + }, + "center": [ + -180, + 0 + ], + "sources": { + "image": { + "type": "image", + "coordinates": [ + [ + -180, + 45 + ], + [ + 180, + 45 + ], + [ + 180, + -45 + ], + [ + -180, + -45 + ] + ], + "url": "local://image/0.png" + } + }, + "layers": [ + { + "id": "image", + "type": "raster", + "source": "image", + "paint": { + "raster-fade-duration": 0 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#4564/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-js#4564/expected.png new file mode 100644 index 00000000000..32d3ded3e5c Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-js#4564/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#4564/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-js#4564/style.json new file mode 100644 index 00000000000..00a38e806c0 --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-js#4564/style.json @@ -0,0 +1,43 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 64, + "width":64 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 16, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ], + "bounds":[13.4043671, 52.4959407, 13.43183291,52.502459] + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "road", + "type": "line", + "source": "mapbox", + "source-layer": "road", + "paint": { + "line-width": 2, + "line-color": "#000" + } + } + ] +} diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#4573/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-js#4573/expected.png new file mode 100644 index 00000000000..fb46f9aaf74 Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-js#4573/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#4573/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-js#4573/style.json new file mode 100644 index 00000000000..b4c684e126f --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-js#4573/style.json @@ -0,0 +1,43 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "image": { + "type": "image", + "coordinates": [ + [ + -180, + 85.05113 + ], + [ + 180, + 85.05113 + ], + [ + 180, + -85.05113 + ], + [ + -180, + -85.05113 + ] + ], + "url": "local://image/0.png" + } + }, + "layers": [ + { + "id": "image", + "type": "raster", + "source": "image", + "paint": { + "raster-fade-duration": 0 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#4579/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-js#4579/expected.png new file mode 100644 index 00000000000..f3005a7b020 Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-js#4579/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#4579/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-js#4579/style.json new file mode 100644 index 00000000000..ae7feb14531 --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-js#4579/style.json @@ -0,0 +1,42 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 64, + "width": 64 + } + }, + "zoom": 16.7, + "center": [0.13429, 52.22056], + "sources": { + "geojson": { + "maxzoom": 16, + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [0.134411688130084, 52.2205792605345], + [0.134414225556761, 52.2206321864999], + [0.1342400618783, 52.2206353389478], + [0.134235355257573, 52.2205371595184], + [0.134408523751762, 52.2205340250887], + [0.134411688130084, 52.2205792605345], + [0.134411688130084, 52.2205792605345] + ] + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "line", + "source": "geojson", + "type": "line", + "paint": { + "line-width": 3 + } + } + ] +} diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#4605/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-js#4605/expected.png new file mode 100644 index 00000000000..b3c31490b20 Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-js#4605/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#4605/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-js#4605/style.json new file mode 100644 index 00000000000..e31be9520f5 --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-js#4605/style.json @@ -0,0 +1,53 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 64, + "width": 64 + } + }, + "zoom": 1, + "sources": { + "point": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "foo": "bar" + }, + "geometry": { + "type": "Point", + "coordinates": [ 0.1, 0.1 ] + } + } + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "text", + "type": "symbol", + "source": "point", + "layout": { + "text-field": { + "type": "categorical", + "property": "foo", + "stops": [ + [{ "value": "bar", "zoom": 0 }, "xxx"], + [{ "value": "bar", "zoom": 2 }, "XXX"] + ] + + }, + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + } + } + ] +} diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#4617/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-js#4617/expected.png new file mode 100644 index 00000000000..3e8200f5752 Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-js#4617/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#4617/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-js#4617/style.json new file mode 100644 index 00000000000..58e2bb8c386 --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-js#4617/style.json @@ -0,0 +1,34 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 64, + "width": 64 + } + }, + "zoom": 1, + "sources": { + "point": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "text", + "type": "symbol", + "source": "point", + "layout": { + "text-field": "xxx", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + } + } + ] +} diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#4647/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-js#4647/expected.png new file mode 100644 index 00000000000..02fa9864883 Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-js#4647/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#4647/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-js#4647/style.json new file mode 100644 index 00000000000..3859f2ac58c --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-js#4647/style.json @@ -0,0 +1,46 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 64, + "width": 64, + "allowed": 0.001, + "collisionDebug":true + } + }, + "center": [ 0, 0 ], + "zoom": 0, + "sources": { + "point": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + } + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "text", + "type": "symbol", + "source": "point", + "layout": { + "text-field": "Test", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + } + } + ] +} diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#4651/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-js#4651/expected.png new file mode 100644 index 00000000000..9f3f1288da6 Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-js#4651/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#4651/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-js#4651/style.json new file mode 100644 index 00000000000..cf5ce10dce1 --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-js#4651/style.json @@ -0,0 +1,50 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 64, + "width": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Feature", + "properties": { + "foo": "bar" + }, + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson", + "paint": { + "circle-color": { + "type": "categorical", + "property": "foo", + "stops": [ + [ + { + "value": "nonesuch", + "zoom": 0 + }, + "red" + ] + ], + "default": "green" + } + } + } + ] +} diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#4860/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-js#4860/expected.png new file mode 100644 index 00000000000..6fed4818f5e Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-js#4860/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#4860/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-js#4860/style.json new file mode 100644 index 00000000000..a7618abb5ac --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-js#4860/style.json @@ -0,0 +1,41 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 256, + "height": 256 + } + }, + "bearing": 45, + "pitch": 45, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "text", + "type": "symbol", + "source": "geojson", + "layout": { + "symbol-placement": "point", + "text-rotation-alignment": "map", + "text-pitch-alignment": "viewport", + "text-field": "Test Text", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + } + } + ] +} diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#4928/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-js#4928/expected.png new file mode 100644 index 00000000000..6790c597eb9 Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-js#4928/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#4928/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-js#4928/style.json new file mode 100644 index 00000000000..07efc76aa60 --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-js#4928/style.json @@ -0,0 +1,41 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "pixelRatio": 1.1, + "operations": [ + [ + "addImage", + "marker", + "./image/marker.png" + ], + [ + "addLayer", + { + "id": "geometry", + "type": "symbol", + "source": "geometry", + "layout": { + "icon-image": "marker" + } + } + ], + [ + "wait" + ] + ] + } + }, + "sources": { + "geometry": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [0, 0] + } + } + }, + "layers": [] +} diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#5171/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-js#5171/expected.png new file mode 100644 index 00000000000..8784429cebc Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-js#5171/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#5171/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-js#5171/style.json new file mode 100644 index 00000000000..bbcbe066ed0 --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-js#5171/style.json @@ -0,0 +1,35 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 32 + } + }, + "center": [-0.63938, 44.77458], + "zoom": 18, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "LineString", + "coordinates": [ + [-0.639208, 44.774651], + [-0.639605, 44.774487], + [-0.639605, 44.774487] + ] + } + } + }, + "layers": [ + { + "id": "line", + "type": "line", + "source": "geojson", + "paint": { + "line-color": "#f44336", + "line-width": 10 + } + } + ] +} diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#5370/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-js#5370/expected.png new file mode 100644 index 00000000000..b62d1b2ece7 Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-js#5370/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#5370/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-js#5370/style.json new file mode 100644 index 00000000000..64e42ec5414 --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-js#5370/style.json @@ -0,0 +1,72 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "wait" + ], + [ + "setPaintProperty", + "circle", + "circle-radius", + ["get", "radius"] + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "radius": 10 + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + "radius": 15 + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson", + "paint": { + "circle-radius": 5 + } + } + ] +} diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#5466/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-js#5466/expected.png new file mode 100644 index 00000000000..deea9c60b46 Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-js#5466/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#5466/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-js#5466/style.json new file mode 100644 index 00000000000..a874716aaef --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-js#5466/style.json @@ -0,0 +1,84 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 512, + "height": 512 + } + }, + "sources": { + "satellite": { + "type": "raster", + "tiles": [ + "local://tiles/{z}-{x}-{y}.satellite.png" + ], + "maxzoom": 17, + "tileSize": 256 + }, + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -58, + 1 + ], + [ + 26, + 1 + ], + [ + 26, + 47 + ], + [ + -58, + 47 + ], + [ + -58, + 1 + ] + ] + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "#fff" + } + }, + { + "id": "raster", + "type": "raster", + "source": "satellite", + "paint": { + "raster-fade-duration": 0 + } + }, + { + "id": "fill", + "type": "fill", + "source": "geojson", + "paint": { + "fill-color": "red", + "fill-antialias": false + } + } + ] +} diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#5496/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-js#5496/expected.png new file mode 100644 index 00000000000..3e6fe907dbf Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-js#5496/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#5496/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-js#5496/style.json new file mode 100644 index 00000000000..c4e8687f328 --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-js#5496/style.json @@ -0,0 +1,54 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson", + "paint": { + "circle-color": "#fff", + "circle-stroke-opacity": 0 + } + } + ] +} diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#5544/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-js#5544/expected.png new file mode 100644 index 00000000000..1a5a17637d1 Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-js#5544/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#5544/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-js#5544/style.json new file mode 100644 index 00000000000..d9f4e84d53f --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-js#5544/style.json @@ -0,0 +1,202 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 512, + "width": 512 + } + }, + "zoom": 2, + "center": [-14.41400, 39.09187], + "sources": { + "mapbox": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "name": "中" + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -14.4195556640625, + 39.091699613104595 + ], + [ + 102.3046875, + 39.36827914916014 + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "中" + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -14.403076171875, + 39.10022600175347 + ], + [ + 103.35937499999999, + 65.80277639340238 + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "中" + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -14.414062499999998, + 39.091699613104595 + ], + [ + -14.765625, + 82.21421714106776 + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "中" + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -14.408569335937498, + 39.091699613104595 + ], + [ + -130.78125, + 39.095962936305476 + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "中" + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -14.414062499999998, + 39.095962936305476 + ], + [ + -16.5234375, + -58.81374171570779 + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "中" + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -14.4195556640625, + 39.10022600175347 + ], + [ + -130.4296875, + 64.47279382008166 + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "中" + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -14.4195556640625, + 39.0831721934762 + ], + [ + 33.75, + 81.87364125482827 + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "中" + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -14.447021484374998, + 39.104488809440475 + ], + [ + -66.4453125, + 82.26169873683153 + ] + ] + } + } + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "lines-symbol", + "type": "symbol", + "source": "mapbox", + "layout": { + "text-field": "{name}", + "symbol-placement": "line", + "symbol-spacing": 100, + "text-allow-overlap": true, + "text-font": [ "NotoCJK" ] + } + }, { + "id": "lines", + "type": "line", + "source": "mapbox", + "paint": { + "line-opacity": 0.25 + } + } + ] +} diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#5546/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-js#5546/expected.png new file mode 100644 index 00000000000..e1a8189c6bc Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-js#5546/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#5546/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-js#5546/style.json new file mode 100644 index 00000000000..670042770ca --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-js#5546/style.json @@ -0,0 +1,183 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256, + "width": 1024 + } + }, + "zoom": 2, + "center": [-14.41400, 45], + "sources": { + "mapbox": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "name": "氣到身什戰只白質位歡" + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -14.4195556640625, + 39.091699613104595 + ], + [ + 102.3046875, + 39.36827914916014 + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "電局今情再夜面造" + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -14.403076171875, + 39.10022600175347 + ], + [ + 103.35937499999999, + 65.80277639340238 + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "有究往極他生血通育" + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -14.414062499999998, + 39.091699613104595 + ], + [ + -14.765625, + 82.21421714106776 + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "不示有電親界因來終" + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -14.408569335937498, + 39.091699613104595 + ], + [ + -130.78125, + 39.095962936305476 + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "有下人費也家了清,黨光她保過每心" + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -14.4195556640625, + 39.10022600175347 + ], + [ + -130.4296875, + 64.47279382008166 + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "醫公藝說就公和有" + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -14.4195556640625, + 39.0831721934762 + ], + [ + 33.75, + 81.87364125482827 + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "光中輪的態指那差車" + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -14.447021484374998, + 39.104488809440475 + ], + [ + -66.4453125, + 82.26169873683153 + ] + ] + } + } + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "lines-symbol", + "type": "symbol", + "source": "mapbox", + "layout": { + "text-field": "{name}", + "symbol-placement": "line", + "symbol-spacing": 100, + "text-allow-overlap": true, + "text-font": [ "NotoCJK" ] + } + }, { + "id": "lines", + "type": "line", + "source": "mapbox", + "paint": { + "line-opacity": 0.25 + } + } + ] +} diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#5576/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-js#5576/expected.png new file mode 100644 index 00000000000..fb3ada1ad2f Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-js#5576/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#5576/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-js#5576/style.json new file mode 100644 index 00000000000..4602143c7fc --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-js#5576/style.json @@ -0,0 +1,72 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [] + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [{ + "type": "Feature", + "properties": { + "x": "invalid" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + "x": "center" + }, + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + "x": "top" + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + }] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [{ + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "dot.sdf", + "icon-anchor": ["get", "x"], + "icon-allow-overlap": true, + "icon-ignore-placement": true + }, + "paint": { + "icon-color": "red" + } + }] +} diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#5599/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-js#5599/expected.png new file mode 100644 index 00000000000..9211bbfea3e Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-js#5599/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#5599/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-js#5599/style.json new file mode 100644 index 00000000000..0cbb9b9536d --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-js#5599/style.json @@ -0,0 +1,87 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [] + } + }, + "center": [0, 0], + "zoom": 0, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Feature", + "properties": { + "icon": "dot.sdf", + "name": "X" + }, + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + } + }, + "sprite": "local://sprites/sprite", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [{ + "id": "icon-expression", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-offset": [-16, -16], + "icon-image": ["step", ["zoom"], "{icon}", 10, ""], + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, { + "id": "text-expression", + "type": "symbol", + "source": "geojson", + "layout": { + "text-offset": [1, -1], + "text-field": ["step", ["zoom"], "{name}", 10, ""], + "text-font": ["Open Sans Semibold", "Arial Unicode MS Bold"], + "text-allow-overlap": true, + "text-ignore-placement": true + } + }, { + "id": "icon-function", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-offset": [-16, 16], + + "icon-image": { + "stops": [ + [0, "{icon}"], + [22, ""] + ] + }, + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, { + "id": "text-function", + "type": "symbol", + "source": "geojson", + "layout": { + "text-offset": [1, 1], + "text-field": { + "stops": [ + [0, "{name}"], + [22, ""] + ] + }, + "text-font": ["Open Sans Semibold", "Arial Unicode MS Bold"], + "text-allow-overlap": true, + "text-ignore-placement": true + } + }] +} diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#5631/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-js#5631/expected.png new file mode 100644 index 00000000000..eb535e2022f Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-js#5631/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#5631/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-js#5631/style.json new file mode 100644 index 00000000000..001aa030fca --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-js#5631/style.json @@ -0,0 +1,74 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "name": "A", + "size": 12 + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "B", + "size": 24 + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "sprite": "local://sprites/icon-text-fit", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-field": [ + "get", + "name" + ], + "text-size": [ + "get", + "size" + ], + "icon-image": "label", + "icon-text-fit": "both", + "icon-ignore-placement": true, + "icon-allow-overlap": true + } + } + ] +} diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#5642/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-js#5642/expected.png new file mode 100644 index 00000000000..f245720a099 Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-js#5642/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#5642/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-js#5642/style.json new file mode 100644 index 00000000000..28048e6d4ea --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-js#5642/style.json @@ -0,0 +1,59 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "allowed": 0.001 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -10, + -10 + ], + [ + -10, + 10 + ], + [ + 10, + 10 + ], + [ + 10, + -10 + ], + [ + -10, + -10 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "fill", + "type": "fill", + "source": "geojson", + "paint": { + "fill-color": "rgba(0, 0, 0, 0)", + "fill-outline-color": [ + "interpolate", + ["linear"], + ["zoom"], + 0, "rgba(255,255,255,1)", + 1, "rgba(255,255,255,0)" + ] + } + } + ] +} diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#5740/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-js#5740/expected.png new file mode 100644 index 00000000000..1dd26a18ce6 Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-js#5740/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#5740/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-js#5740/style.json new file mode 100644 index 00000000000..2ab02ada1c6 --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-js#5740/style.json @@ -0,0 +1,72 @@ +{ + "version": 8, + "metadata": { + "test": { + "fadeDuration": 1000, + "width": 64, + "height": 64, + "description": "Tests that fill-pattern cross-fading completes, by checking the rendering after the fade duration has elapsed.", + "operations": [ + [ + "wait" + ], + [ + "setZoom", + 1.1 + ], + [ + "wait", + 0 + ], + [ + "wait", + 1000 + ] + ] + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -10, + -10 + ], + [ + -10, + 10 + ], + [ + 10, + 10 + ], + [ + 10, + -10 + ], + [ + -10, + -10 + ] + ] + ] + } + } + }, + "sprite": "local://sprites/emerald", + "layers": [ + { + "id": "fill", + "type": "fill", + "source": "geojson", + "paint": { + "fill-antialias": false, + "fill-pattern": "generic_icon" + } + } + ] +} diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#5776/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-js#5776/expected.png new file mode 100644 index 00000000000..a4a0f74496a Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-js#5776/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#5776/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-js#5776/style.json new file mode 100644 index 00000000000..7670ff58a2b --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-js#5776/style.json @@ -0,0 +1,85 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 256, + "height": 256 + } + }, + "center": [ + 0, + 0 + ], + "zoom": 0.5, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "MultiPoint", + "coordinates": [ + [ + 0, + 0 + ] + ] + } + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "bottom", + "type": "symbol", + "source": "geojson", + "layout": { + "text-field": "Bottom Layer", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + }, + "paint": { + "text-color": "black" + } + }, + { + "id": "middle", + "type": "symbol", + "source": "geojson", + "minzoom": 0.8, + "layout": { + "text-field": "Middle Minzoom Layer", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + }, + "paint": { + "text-color": "blue" + } + }, + { + "id": "top", + "type": "symbol", + "source": "geojson", + "maxzoom": 0.3, + "layout": { + "text-field": "Top Maxzoom Layer", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + }, + "paint": { + "text-color": "blue" + } + } + ] +} diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#5911/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-js#5911/expected.png new file mode 100644 index 00000000000..35f2828e4d6 Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-js#5911/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#5911/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-js#5911/style.json new file mode 100644 index 00000000000..a8c9e153f66 --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-js#5911/style.json @@ -0,0 +1,61 @@ +{ + "version": 8, + "metadata": { + "test": { + "collisionDebug": true, + "width": 256, + "height": 2048, + "description": "Issue #5911 caused items in the distance on a pitched map to have collision boxes that were too small, although the debug box drew correctly. Before the fix, this test would show both labels, with the boxes visibly overlapping." + } + }, + "center": [ + 0, + 70 + ], + "zoom": 5, + "pitch": 60, + "bearing": 0, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "MultiPoint", + "coordinates": [ + [ + -0.8, + 81.25 + ], + [ + 1, + 82 + ] + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "symbol-placement": "point", + "text-field": "test\ntest test\ntest", + "text-pitch-alignment": "viewport", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + } + } + ] +} diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#5911a/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-js#5911a/expected.png new file mode 100644 index 00000000000..7dd35ba9bf5 Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-js#5911a/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#5911a/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-js#5911a/style.json new file mode 100644 index 00000000000..433268e7a1a --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-js#5911a/style.json @@ -0,0 +1,111 @@ +{ + "version": 8, + "metadata": { + "test": { + "collisionDebug": true, + "width": 512, + "height": 2048, + "description": "This is the line-label equivalent of issue #5911. The middle feature barely misses the bottom feature and barely collides with the top feature, so that the test can detect a small change in either direction." + } + }, + "center": [ + -15, + 70 + ], + "zoom": 5, + "pitch": 60, + "bearing": 0, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "name": "First First First" + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -19.9, + 81.37 + ], + [ + -10, + 81.37 + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "Second 2nd" + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -18, + 82 + ], + [ + -10, + 82 + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "Third 3rd 3rd" + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -19.9, + 82.55 + ], + [ + -10, + 82.55 + ] + ] + } + } + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "symbol-placement": "line", + "text-field": "{name}", + "text-size": 32, + "text-pitch-alignment": "viewport", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + } + } + ] +} diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#5947/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-js#5947/expected.png new file mode 100644 index 00000000000..4cb77303dde Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-js#5947/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#5947/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-js#5947/style.json new file mode 100644 index 00000000000..905b0633670 --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-js#5947/style.json @@ -0,0 +1,37 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Feature", + "properties": { + "property": 0 + }, + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson", + "paint": { + "circle-color": ["case", ["==", ["get", "property"], 0], "black", "white"] + } + } + ] +} diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#5953/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-js#5953/expected.png new file mode 100644 index 00000000000..8f17810f559 Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-js#5953/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#5953/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-js#5953/style.json new file mode 100644 index 00000000000..41509f8789c --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-js#5953/style.json @@ -0,0 +1,66 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "allowed": 0.001, + "operations": [ + [ + "wait" + ], + [ + "setPaintProperty", + "fill", + "fill-outline-color", + null + ], + [ + "wait" + ] + ] + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -10, + -10 + ], + [ + -10, + 10 + ], + [ + 10, + 10 + ], + [ + 10, + -10 + ], + [ + -10, + -10 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "fill", + "type": "fill", + "source": "geojson", + "paint": { + "fill-outline-color": "black" + } + } + ] +} diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#5978/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-js#5978/expected.png new file mode 100644 index 00000000000..b0c9aab7879 Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-js#5978/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#5978/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-js#5978/style.json new file mode 100644 index 00000000000..b0add2c5c6d --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-js#5978/style.json @@ -0,0 +1,64 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sprite": "local://sprites/emerald", + "sources": { + "a": { + "type": "geojson", + "data": { + "type": "LineString", + "coordinates": [ + [ + -180, + 10 + ], + [ + 180, + 10 + ] + ] + } + }, + "b": { + "type": "geojson", + "data": { + "type": "LineString", + "coordinates": [ + [ + -180, + -10 + ], + [ + 180, + -10 + ] + ] + } + } + }, + "layers": [ + { + "id": "a", + "type": "line", + "source": "a", + "paint": { + "line-width": 4, + "line-pattern": "oneway_road" + } + }, + { + "id": "b", + "type": "line", + "source": "b", + "paint": { + "line-width": 30, + "line-pattern": "default_3" + } + } + ] +} diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#5982/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-js#5982/expected.png new file mode 100644 index 00000000000..80ca5fcd29f Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-js#5982/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#5982/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-js#5982/style.json new file mode 100644 index 00000000000..b01540d4dca --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-js#5982/style.json @@ -0,0 +1,71 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "description": "Tests that light transitions correctly by checking the rendering halfway through the (default 300ms long) transition", + "operations": [ + [ + "setLight", + { + "position": [1.15, 0, 30], + "intensity": 1, + "color": "red" + } + ], + [ + "wait", + 0 + ], + [ + "wait", + 150 + ] + ] + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -10, + -10 + ], + [ + -10, + 10 + ], + [ + 10, + 10 + ], + [ + 10, + -10 + ], + [ + -10, + -10 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "extrusion", + "type": "fill-extrusion", + "source": "geojson", + "paint": { + "fill-extrusion-height": 0, + "fill-extrusion-color":"blue" + } + } + ] +} diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#6160/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-js#6160/expected.png new file mode 100644 index 00000000000..698ae5ece43 Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-js#6160/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#6160/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-js#6160/style.json new file mode 100644 index 00000000000..693bec2bd7f --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-js#6160/style.json @@ -0,0 +1,73 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "description": "Checks that icons are not hidden when the text is an empty string" + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + }, + "properties": { + "text": "OK" + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ + 20, + 0 + ] + }, + "properties": { + "text": "" + } + } + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "symbol-placement": "point", + "text-allow-overlap": true, + "icon-allow-overlap": true, + "icon-image": "triangle-12", + "text-field": "{text}", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + }, + "paint": { + "icon-opacity": 0.5, + "text-translate": [ + -10, + 0 + ] + } + } + ] +} diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#6238/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-js#6238/expected.png new file mode 100644 index 00000000000..8f17810f559 Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-js#6238/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#6238/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-js#6238/style.json new file mode 100644 index 00000000000..07db401ff6a --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-js#6238/style.json @@ -0,0 +1,64 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "allowed": 0.001, + "operations": [ + [ + "wait" + ], + [ + "setPaintProperty", + "fill", + "fill-outline-color", + "black" + ], + [ + "wait", + 0 + ] + ] + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -10, + -10 + ], + [ + -10, + 10 + ], + [ + 10, + 10 + ], + [ + 10, + -10 + ], + [ + -10, + -10 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "fill", + "type": "fill", + "source": "geojson" + } + ] +} diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#6548/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-js#6548/expected.png new file mode 100644 index 00000000000..0aa9204c050 Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-js#6548/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#6548/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-js#6548/style.json new file mode 100644 index 00000000000..1f80d158870 --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-js#6548/style.json @@ -0,0 +1,62 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 64, + "width": 128 + } + }, + "center": [ + 0, + 0 + ], + "zoom": 0, + "sources": { + "point": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "text1", + "type": "symbol", + "source": "point", + "layout": { + "text-field": "Rendered Twice", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + } + }, + { + "id": "text2", + "type": "symbol", + "source": "point", + "layout": { + "text-field": "Rendered Twice", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + } + } + ] +} diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#6649/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-js#6649/expected.png new file mode 100644 index 00000000000..599d18ba610 Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-js#6649/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#6649/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-js#6649/style.json new file mode 100644 index 00000000000..1990f799d83 --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-js#6649/style.json @@ -0,0 +1,52 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "zoom": 2, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "MultiLineString", + "coordinates": [ + [ + [ + -3, + -3 + ], + [ + -3, + 3 + ] + ], + [ + [ + 3, + -3 + ], + [ + 3, + 3 + ] + ] + ] + } + }, + "lineMetrics": true + } + }, + "layers": [ + { + "id": "id", + "type": "line", + "source": "geojson" + } + ] +} diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#6655/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-js#6655/expected.png new file mode 100644 index 00000000000..0f286c436a1 Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-js#6655/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#6655/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-js#6655/style.json new file mode 100644 index 00000000000..31572b22e00 --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-js#6655/style.json @@ -0,0 +1,59 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setFeatureState", + { + "source": "geojson", + "id": "1" + }, + { + "hover": true + } + ], + [ + "wait" + ] + ] + } + }, + "zoom": 2, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Feature", + "id": 1, + "properties": { + "radius": 5 + }, + "geometry": { + "type": "Point", + "coordinates": [0,0] + } + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson", + "paint": { + "circle-radius": [ "get", "radius" ], + "circle-opacity": 0.5, + "circle-color": "#ff0000", + "circle-stroke-width": [ + "case", + ["boolean", ["feature-state", "hover"], false], + 4, + 1 + ] + } + } + ] +} diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#6660/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-js#6660/expected.png new file mode 100644 index 00000000000..22d1b116c44 Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-js#6660/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#6660/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-js#6660/style.json new file mode 100644 index 00000000000..aba8be7a8cb --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-js#6660/style.json @@ -0,0 +1,44 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 64, + "width": 64 + } + }, + "center": [ 0, 0 ], + "zoom": 0, + "sources": { + "point.with.dots": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + } + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "text", + "type": "symbol", + "source": "point.with.dots", + "layout": { + "text-field": "Test", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + } + } + ] +} diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#6706/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-js#6706/expected.png new file mode 100644 index 00000000000..2ea45751076 Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-js#6706/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#6706/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-js#6706/style.json new file mode 100644 index 00000000000..b78a0515acd --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-js#6706/style.json @@ -0,0 +1,44 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 64, + "width": 64, + "description": "Tests that runtime styling can set -transition properties.", + "operations": [ + [ + "setPaintProperty", + "background", + "background-color-transition", + { + "duration": 500 + } + ], + [ + "setPaintProperty", + "background", + "background-color", + "white" + ], + [ + "wait", + 0 + ], + [ + "wait", + 250 + ] + ] + } + }, + "sources": {}, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "black" + } + } + ] +} diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#6806/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-js#6806/expected.png new file mode 100644 index 00000000000..11c42091c4e Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-js#6806/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#6806/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-js#6806/style.json new file mode 100644 index 00000000000..d67837a09b1 --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-js#6806/style.json @@ -0,0 +1,47 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 64, + "width": 64, + "description": "Contains two expected images (for ubyte-based rendering and half-float-based); one of them should pass depending on platform." + } + }, + "center": [ + 13.418056, + 52.4963 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "fill", + "type": "fill", + "source": "mapbox", + "source-layer": "building" + }, + { + "id": "poi_heat", + "type": "heatmap", + "source": "mapbox", + "source-layer": "poi_label", + "paint": {} + } + ] +} diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#6919/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-js#6919/expected.png new file mode 100644 index 00000000000..092bd527112 Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-js#6919/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#6919/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-js#6919/style.json new file mode 100644 index 00000000000..f5abd421e1b --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-js#6919/style.json @@ -0,0 +1,61 @@ +{ + "version": 8, + "metadata": { + "test": { + "collisionDebug": true, + "description": "This test looks pretty boring -- what it does is make sure that a label without collision boxes won't get drawn.", + "height": 256, + "width": 1024 + } + }, + "center": [ + -73, + 15 + ], + "zoom": 4.5, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/mapbox.mapbox-streets-v7/{z}-{x}-{y}.mvt" + ] + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "line-center", + "type": "symbol", + "source": "mapbox", + "source-layer": "marine_label", + "layout": { + "text-field": "{name_en}", + "symbol-placement": "line-center", + "text-allow-overlap": true, + "text-size": 40, + "text-letter-spacing": 0.5, + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + } + }, + { + "id": "line", + "type": "line", + "source": "mapbox", + "source-layer": "marine_label", + "paint": { + "line-width": 1 + } + } + ] +} diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#7032/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-js#7032/expected.png new file mode 100644 index 00000000000..73a3a03a124 Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-js#7032/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#7032/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-js#7032/style.json new file mode 100644 index 00000000000..e9859c4d43c --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-js#7032/style.json @@ -0,0 +1,75 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 128, + "width": 128, + "description": "This test renders before the first placement happens, to exercise default opacities. Before fixing #7032, the restaurant icon would incorrectly appear even though its matched text hadn't been placed.", + "fadeDuration": 100, + "operations": [ + ["wait"], + ["wait", 50] + ] + } + }, + "center": [ 0, 0 ], + "zoom": 0, + "sources": { + "point": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + } + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "text", + "type": "symbol", + "source": "point", + "layout": { + "text-field": "Needs Placement", + "icon-image": "restaurant-12", + "text-allow-overlap": false, + "icon-allow-overlap": true, + "text-optional": false, + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + } + }, + { + "id": "label", + "type": "symbol", + "source": "point", + "layout": { + "text-field": "Shows w/o Placement", + "text-allow-overlap": true, + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + } + } + ] +} diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#7066/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-js#7066/expected.png new file mode 100644 index 00000000000..2eaefeaa3e4 Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-js#7066/expected.png differ 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 new file mode 100644 index 00000000000..878ac257b35 --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-js#7066/style.json @@ -0,0 +1,40 @@ +{ + "version": 8, + "metadata": { + "test": { + "pixelRatio": 10, + "width": 24, + "height": 24 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Feature", + "properties": { + "size": 0.05 + }, + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + } + }, + "sprite": "local://sprites/emerald", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-size": ["get", "size"], + "icon-image": "generic_icon" + } + } + ] +} diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#7172/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-js#7172/expected.png new file mode 100644 index 00000000000..4926dcafb02 Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-js#7172/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#7172/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-js#7172/style.json new file mode 100644 index 00000000000..6fc4b20e63e --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-js#7172/style.json @@ -0,0 +1,67 @@ +{ + "version": 8, + "metadata": { + "test": { + "fadeDuration": 100, + "width": 512, + "height": 512, + "description": "This test ensures that symbols with allow-overlap: true are always visible, even if they get included in a placement where they are outside of the collision grid. Before the fix, this test showed partially transparent icons in the right quarter of the viewport.", + "operations": [ + ["wait", 100], + ["wait", 100], + ["setCenter", [ + 13.428056, + 52.499167 + ]], + ["wait"], + ["wait", 100], + [ + "wait", + 50 + ] + ] + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "icon", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "filter": [ + "==", + "maki", + "restaurant" + ], + "layout": { + "symbol-placement": "point", + "icon-allow-overlap": true, + "icon-ignore-placement": true, + "icon-image": "{maki}-12" + }, + "paint": {} + } + ] +} diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#7271/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-js#7271/expected.png new file mode 100644 index 00000000000..fa168b2454f Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-js#7271/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#7271/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-js#7271/style.json new file mode 100644 index 00000000000..2b2fc291cf6 --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-js#7271/style.json @@ -0,0 +1,48 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 512, + "height": 64 + } + }, + "center": [ + -10, + 0 + ], + "zoom": 0, + "sources": { + "image": { + "type": "image", + "coordinates": [ + [ + -270, + -80 + ], + [ + 90, + -80 + ], + [ + 90, + 80 + ], + [ + -270, + 80 + ] + ], + "url": "local://image/0.png" + } + }, + "layers": [ + { + "id": "image", + "type": "raster", + "source": "image", + "paint": { + "raster-fade-duration": 0 + } + } + ] +} diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#7302/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-js#7302/expected.png new file mode 100644 index 00000000000..c54bf1b7297 Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-js#7302/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#7302/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-js#7302/style.json new file mode 100644 index 00000000000..4d3c6897d70 --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-js#7302/style.json @@ -0,0 +1,52 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 512, + "height": 512, + "addFakeCanvas": { + "id": "fake-canvas", + "image": "./image/rocket.png" + } + } + }, + "center": [ + -122.514426, + 37.562984 + ], + "zoom": 17, + "sources": { + "canvas": { + "type": "canvas", + "coordinates": [ + [ + -122.51596391201019, + 37.56238816766053 + ], + [ + -122.51467645168304, + 37.56410183312965 + ], + [ + -122.51309394836426, + 37.563391708549425 + ], + [ + -122.51423120498657, + 37.56161849366671 + ] + ], + "canvas": "fake-canvas" + } + }, + "layers": [ + { + "id": "canvas", + "type": "raster", + "source": "canvas", + "paint": { + "raster-fade-duration": 0 + } + } + ] +} diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#7708/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-js#7708/expected.png new file mode 100644 index 00000000000..8546863a53e Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-js#7708/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#7708/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-js#7708/style.json new file mode 100644 index 00000000000..c5fc3d05fe1 --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-js#7708/style.json @@ -0,0 +1,44 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "addCustomLayer", + "null-island" + ] + ] + } + }, + "sources": { + "geometry": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [{ + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Point", + "coordinates": [0, 0] + } + }] + } + } + }, + "layers": [ + { + "id": "geometry", + "type": "circle", + "source": "geometry", + "layout": { + "visibility": "none" + }, + "paint": { + "circle-radius": 40 + } + } + ] +} diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#8026/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-js#8026/expected.png new file mode 100644 index 00000000000..4cb77303dde Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-js#8026/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#8026/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-js#8026/style.json new file mode 100644 index 00000000000..b5790d49bb6 --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-js#8026/style.json @@ -0,0 +1,81 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setFeatureState", + { + "source": "geojson", + "id": "1" + }, + { + "color": "red" + } + ], + [ + "wait" + ], + [ + "setZoom", 3 + ] + , + [ + "wait" + ], + [ + "removeFeatureState", + { + "source": "geojson" + } + ], + [ + "wait" + ], + [ + "setZoom", 2 + ], + [ + "wait" + ] + ] + } + }, + "zoom": 2, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Feature", + "id": "1", + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson", + "paint": { + "circle-radius": 5, + "circle-color": [ + "coalesce", + [ + "feature-state", + "color" + ], + "black" + ] + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#8273/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-js#8273/expected.png new file mode 100644 index 00000000000..5b2447069be Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-js#8273/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#8273/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-js#8273/style.json new file mode 100644 index 00000000000..a5786217e3f --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-js#8273/style.json @@ -0,0 +1,43 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + ["setPaintProperty", "line", "line-pattern", "zoo_icon"], + ["wait"] + ] + } + }, + "sprite": "local://sprites/emerald", + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "LineString", + "coordinates": [ + [ + -20, + -20 + ], + [ + 20, + 20 + ] + ] + } + } + }, + "layers": [ + { + "id": "line", + "type": "line", + "source": "geojson", + "paint": { + "line-pattern": "generic_icon", + "line-width": 20 + } + } + ] +} diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#8817/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-js#8817/expected.png new file mode 100644 index 00000000000..b36e37b0862 Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-js#8817/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#8817/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-js#8817/style.json new file mode 100644 index 00000000000..7799971f603 --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-js#8817/style.json @@ -0,0 +1,68 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "comment": "The `pauseSource` prevents new tiles from loading and forces the map to use tiles outside of their ideal zoom range.", + "operations": [ + ["pauseSource", "geojson"], + ["setZoom", 2], + ["wait"] + ] + } + }, + "zoom": 0, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -10, + -10 + ], + [ + -10, + 10 + ], + [ + 10, + 10 + ], + [ + 10, + -10 + ], + [ + -10, + -10 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "fill", + "type": "fill", + "source": "geojson", + "paint": { + "fill-antialias": false, + "fill-color": "green", + "fill-opacity": [ + "interpolate", + ["linear"], + ["zoom"], + 0.5, + 0, + 1, + ["match", ["get", "fakeproptotriggercompositeexpression"], "nope", 1, 1] + ] + } + } + ] +} diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#9009/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-js#9009/expected.png new file mode 100644 index 00000000000..c6f451504a0 Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-js#9009/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-js#9009/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-js#9009/style.json new file mode 100644 index 00000000000..f6c9625ad2e --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-js#9009/style.json @@ -0,0 +1,45 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 100, + "width": 100 + } + }, + "center": [ + 0, + 0 + ], + "zoom": 18, + "sources": { + "line": { + "type": "geojson", + "maxzoom": 10, + "data": { + "type": "Feature", + "geometry": { + "type": "LineString", + "coordinates": [[-180, 70], [0, 0], [100, 80]] + } + } + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "road", + "type": "line", + "source": "line", + "paint": { + "line-width": 20, + "line-color": "#000" + } + } + ] +} diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-native#10849/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-native#10849/expected.png new file mode 100644 index 00000000000..6d053f86fb4 Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-native#10849/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-native#10849/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-native#10849/style.json new file mode 100644 index 00000000000..ff1a5dc3344 --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-native#10849/style.json @@ -0,0 +1,36 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Point", + "coordinates": [0, 0] + } + } + } + }, + "layers": [{ + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "text-field": "ABCD", + "text-font": ["array", "string", ["literal", ["Open Sans Semibold", "Arial Unicode MS Bold"]]] + }, + "paint": { + "text-color": ["get", "color", ["literal", {"color": "black"}]], + "text-opacity": ["let", "opacity", 1, ["var", "opacity"]] + } + }] +} diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-native#11451/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-native#11451/expected.png new file mode 100644 index 00000000000..3c3433adba1 Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-native#11451/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-native#11451/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-native#11451/style.json new file mode 100644 index 00000000000..b0a6dddc0b1 --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-native#11451/style.json @@ -0,0 +1,51 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Feature", + "properties": { + "sizeA": 2, + "sizeB": 1 + }, + "geometry": { + "type": "Point", + "coordinates": [0, 0] + } + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [{ + "id": "a", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "dot.sdf", + "icon-allow-overlap": true, + "icon-size": ["get", "sizeA"] + }, + "paint": { + "icon-color": "blue" + } + }, { + "id": "b", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "dot.sdf", + "icon-allow-overlap": true, + "icon-size": ["get", "sizeB"] + }, + "paint": { + "icon-color": "red" + } + }] +} diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-native#11729/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-native#11729/expected.png new file mode 100644 index 00000000000..fc18ef695a4 Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-native#11729/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-native#11729/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-native#11729/style.json new file mode 100644 index 00000000000..52e3ad8d8e1 --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-native#11729/style.json @@ -0,0 +1,69 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 256, + "height": 256 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { "name": "តីរវិថី ព្រះស៊ីសុវត្តិ" }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -100, + -10 + ], + [ + 100, + -10 + ] + ] + } + }, + { + "type": "Feature", + "properties": { "name": "This one should render." }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -100, + 10 + ], + [ + 100, + 10 + ] + ] + } + } + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "symbol-placement": "line", + "text-field": "{name}", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + } + } + ] +} diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-native#12812/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-native#12812/expected.png new file mode 100644 index 00000000000..001c9b2df87 Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-native#12812/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-native#12812/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-native#12812/style.json new file mode 100644 index 00000000000..45e9c301908 --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-native#12812/style.json @@ -0,0 +1,55 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "description": "Before the fix, gl-native would incorrectly interpolate to the second stop (size 24) when the zoom was less than the first stop." + } + }, + "zoom": 2, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "text-field": "This should be 10 point", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-size": [ + "interpolate", + [ + "cubic-bezier", + 0.85, + 0.7, + 0.65, + 1 + ], + [ + "zoom" + ], + 4, + 10, + 9, + 24 + ] + } + } + ] +} diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-native#14402/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-native#14402/expected.png new file mode 100644 index 00000000000..51bf1e08b58 Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-native#14402/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-native#14402/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-native#14402/style.json new file mode 100644 index 00000000000..a045302d15c --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-native#14402/style.json @@ -0,0 +1,51 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "first-source": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 1, + 1 + ] + } + }, + "second-source": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 1, + 1 + ] + } + } + }, + "layers": [ + { + "id": "first-circle", + "type": "circle", + "source": "second-source", + "paint": { + "circle-radius": 10, + "circle-color": "red" + } + }, + { + "id": "other", + "type": "circle", + "source": "first-source", + "paint": { + "circle-radius": 10, + "circle-color": "green" + } + } + ] +} diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-native#15139/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-native#15139/expected.png new file mode 100644 index 00000000000..3595bdb0fbb Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-native#15139/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-native#15139/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-native#15139/style.json new file mode 100644 index 00000000000..0614b39ae42 --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-native#15139/style.json @@ -0,0 +1,72 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 100, + "height": 100 + } + }, + "center": [ + 11.582393, + 48.187820 + ], + "zoom": 19.420100, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Feature", + "geometry": { + "type": "LineString", + "coordinates": [ + [ + 11.581739, + 48.187768 + ], + [ + 11.582435, + 48.187821 + ], + [ + 11.582301, + 48.187832 + ], + [ + 11.581708, + 48.187823 + ] + ] + } + } + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "road", + "type": "line", + "source": "geojson" + }, + { + "id": "label", + "type": "symbol", + "source": "geojson", + "layout": { + "text-field": "Frankfurter Ring", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-size": 24, + "symbol-placement": "line-center" + } + } + ] +} diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-native#3292/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-native#3292/expected.png new file mode 100644 index 00000000000..55cfceeb319 Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-native#3292/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-native#3292/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-native#3292/style.json new file mode 100644 index 00000000000..92dc8da5de7 --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-native#3292/style.json @@ -0,0 +1,59 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -10, + -10 + ], + [ + -10, + 10 + ], + [ + 10, + 10 + ], + [ + 10, + -10 + ], + [ + -10, + -10 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "fill", + "type": "fill", + "source": "geojson", + "paint": { + "fill-color": "blue", + "fill-antialias": false + } + }, + { + "id": "background", + "type": "background", + "paint": { + "background-color": "rgba(0,0,0,0.7)" + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-native#5648/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-native#5648/expected.png new file mode 100644 index 00000000000..4a9da2edc5c Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-native#5648/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-native#5648/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-native#5648/style.json new file mode 100644 index 00000000000..0074d337e7f --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-native#5648/style.json @@ -0,0 +1,41 @@ +{ + "version": 8, + "metadata": { + "test": { + "allowed": 0.0003 + } + }, + "center": [ + -170, + 0 + ], + "zoom": 0.99, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "sprite": "local://sprites/emerald", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "land", + "type": "fill", + "source": "mapbox", + "source-layer": "water", + "paint": { + "fill-color": "#3bb2d0" + } + } + ] +} diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-native#5701/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-native#5701/expected.png new file mode 100644 index 00000000000..feed2e457f1 Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-native#5701/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-native#5701/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-native#5701/style.json new file mode 100644 index 00000000000..8e668e0bc5d --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-native#5701/style.json @@ -0,0 +1,49 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "wait" + ], + [ + "setLayoutProperty", + "symbol", + "icon-image", + "circle-12" + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "triangle-12" + } + } + ] +} diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-native#5754/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-native#5754/expected.png new file mode 100644 index 00000000000..feed2e457f1 Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-native#5754/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-native#5754/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-native#5754/style.json new file mode 100644 index 00000000000..4efb2abe0ba --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-native#5754/style.json @@ -0,0 +1,55 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setFilter", + "symbol", + [ + "==", + "property", + 2 + ] + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Feature", + "properties": { + "property": 2 + }, + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "circle-12" + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-native#6063/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-native#6063/expected.png new file mode 100644 index 00000000000..724d17cd7d3 Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-native#6063/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-native#6063/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-native#6063/style.json new file mode 100644 index 00000000000..ae2b0163cde --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-native#6063/style.json @@ -0,0 +1,58 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "wait" + ], + [ + "setFilter", + "symbol", + [ + "==", + "property", + "b" + ] + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Feature", + "properties": { + "property": "a" + }, + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "circle-12" + } + } + ] +} diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-native#6233/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-native#6233/expected.png new file mode 100644 index 00000000000..6af662bba55 Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-native#6233/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-native#6233/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-native#6233/style.json new file mode 100644 index 00000000000..f5e3bd41232 --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-native#6233/style.json @@ -0,0 +1,68 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "wait" + ], + [ + "setLayoutProperty", + "line", + "visibility", + "visible" + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "LineString", + "coordinates": [ + [ + -10, + 10 + ], + [ + 10, + 10 + ], + [ + -10, + -10 + ], + [ + 10, + -10 + ] + ] + } + } + }, + "layers": [ + { + "id": "placeholder - forces the source to load", + "type": "line", + "source": "geojson", + "filter": ["==", "$id", "nonesuch"] + }, + { + "id": "line", + "type": "line", + "source": "geojson", + "layout": { + "visibility": "none" + } + } + ] +} diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-native#6820/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-native#6820/expected.png new file mode 100644 index 00000000000..44c8081cef9 Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-native#6820/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-native#6820/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-native#6820/style.json new file mode 100644 index 00000000000..b79d4bae66c --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-native#6820/style.json @@ -0,0 +1,52 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 64, + "width": 64, + "operations": [ + [ + "wait" + ], + [ + "setLayoutProperty", + "symbol", + "text-field", + "ā" + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "text-field": "A", + "text-font": [ + "NotoCJK" + ] + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-native#6903/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-native#6903/expected.png new file mode 100644 index 00000000000..45bb1b9831e Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-native#6903/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-native#6903/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-native#6903/style.json new file mode 100644 index 00000000000..2e9f0abcca2 --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-native#6903/style.json @@ -0,0 +1,61 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 64, + "width": 64, + "operations": [ + [ + "wait" + ], + [ + "setLayoutProperty", + "symbol", + "icon-size", + 2 + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "sprite": "local://sprites/emerald", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-size": 1, + "symbol-placement": "point", + "icon-allow-overlap": true, + "icon-ignore-placement": true, + "icon-image": "generic_icon" + } + } + ] +} + diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-native#7241/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-native#7241/expected.png new file mode 100644 index 00000000000..4cb77303dde Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-native#7241/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-native#7241/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-native#7241/style.json new file mode 100644 index 00000000000..db40942cdf0 --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-native#7241/style.json @@ -0,0 +1,51 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "wait" + ], + [ + "setLayoutProperty", + "layer", + "visibility", + "none" + ], + [ + "wait" + ], + [ + "setLayoutProperty", + "layer", + "visibility", + "visible" + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [0, 0] + } + } + }, + "layers": [ + { + "id": "layer", + "type": "circle", + "source": "geojson" + } + ] +} diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-native#7357/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-native#7357/expected.png new file mode 100644 index 00000000000..aadac74addc Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-native#7357/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-native#7357/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-native#7357/style.json new file mode 100644 index 00000000000..7e180f58023 --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-native#7357/style.json @@ -0,0 +1,77 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "zoom": 1, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Point", + "coordinates": [ + -1, + 1 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Point", + "coordinates": [ + 1, + 1 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Point", + "coordinates": [ + 1, + -1 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Point", + "coordinates": [ + -1, + -1 + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson", + "paint": { + "circle-color": "#fff", + "circle-radius": 3, + "circle-stroke-width": 3, + "circle-stroke-color": "blue" + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-native#7572/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-native#7572/expected.png new file mode 100644 index 00000000000..473b1c8eb2e Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-native#7572/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-native#7572/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-native#7572/style.json new file mode 100644 index 00000000000..86e5cc3e7e4 --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-native#7572/style.json @@ -0,0 +1,50 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setLayoutProperty", + "b", + "icon-offset", + [0, 10] + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [0, 0] + } + } + }, + "sprite": "local://sprites/emerald", + "layers": [ + { + "id": "a", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "generic_icon", + "icon-allow-overlap": true, + "icon-ignore-placement": true, + "icon-offset": [0, 0] + } + }, + { + "id": "b", + "ref": "a" + } + ] +} diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-native#7714/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-native#7714/expected.png new file mode 100644 index 00000000000..28d4525beb9 Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-native#7714/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-native#7714/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-native#7714/style.json new file mode 100644 index 00000000000..b0d2363f95d --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-native#7714/style.json @@ -0,0 +1,94 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 256, + "height": 256 + } + }, + "zoom": 1, + "center": [ + -60, + -50 + ], + "sources": { + "LineStrings": { + "type": "geojson", + "data": { + "type": "GeometryCollection", + "geometries": [ + { + "type": "LineString", + "coordinates": [ + [-60, -60], + [-60, 60], + [60, 60], + [60, -60], + [-60, -60] + ] + }, + { + "type": "LineString", + "coordinates": [ + [-90, -50], + [-90, -40], + [-70, -40], + [-70, -50], + [-90, -50] + ] + } + ] + } + }, + "Polygons": { + "type": "geojson", + "data": { + "type": "GeometryCollection", + "geometries": [ + { + "type": "Polygon", + "coordinates": [[ + [-50, -50], + [-50, 70], + [70, 70], + [70, -50], + [-50, -50] + ]] + }, + { + "type": "Polygon", + "coordinates": [[ + [-90, -65], + [-90, -55], + [-70, -55], + [-70, -65], + [-90, -65] + ]] + } + ] + } + } + }, + "layers": [ + { + "id": "LineString", + "type": "line", + "source": "LineStrings", + "paint": { + "line-width": 20, + "line-opacity": 0.5, + "line-color": "green" + } + }, + { + "id": "Polygon", + "type": "line", + "source": "Polygons", + "paint": { + "line-width": 20, + "line-opacity": 0.5, + "line-color": "blue" + } + } + ] +} diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-native#7792/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-native#7792/expected.png new file mode 100644 index 00000000000..6d3dd01dca6 Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-native#7792/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-native#7792/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-native#7792/style.json new file mode 100644 index 00000000000..39ee775b359 --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-native#7792/style.json @@ -0,0 +1,55 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": {}, + "id": 1, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": {}, + "id": 2, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson", + "filter": [ + "==", + "$id", + 1 + ] + } + ] +} diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-native#8078/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-native#8078/expected.png new file mode 100644 index 00000000000..171cc864650 Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-native#8078/expected.png differ 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 new file mode 100644 index 00000000000..c9188a16653 --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-native#8078/style.json @@ -0,0 +1,105 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "sourceOne": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": {}, + "id": "a", + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + } + ] + } + }, + "sourceTwo": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": {}, + "id": "a", + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + }, + "sourceThree": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": {}, + "id": "a", + "geometry": { + "type": "Point", + "coordinates": [ + 0, + -10 + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "circleOne", + "type": "circle", + "source": "sourceOne", + "paint": { + "circle-color": "rgba(0,0,0,0)", + "circle-radius": 10, + "circle-stroke-color": "blue", + "circle-stroke-width": 2 + } + }, + { + "id": "circleTwo", + "type": "circle", + "source": "sourceTwo", + "paint": { + "circle-opacity": 0, + "circle-radius": 10, + "circle-stroke-color": "red", + "circle-stroke-width": 2 + } + }, + { + "id": "circleThree", + "type": "circle", + "source": "sourceThree", + "paint": { + "circle-radius": 0, + "circle-stroke-color": "green", + "circle-stroke-width": 2 + } + } + ] +} diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-native#8303/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-native#8303/expected.png new file mode 100644 index 00000000000..122c2914143 Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-native#8303/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-native#8303/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-native#8303/style.json new file mode 100644 index 00000000000..10747dd27b9 --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-native#8303/style.json @@ -0,0 +1,45 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "bearing": 180, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Feature", + "properties": { + "rotation": 90 + }, + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "symbol-placement": "point", + "icon-rotate": { + "type": "identity", + "property": "rotation" + }, + "icon-rotation-alignment": "map", + "icon-image": "building-12" + } + } + ] +} diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-native#8460/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-native#8460/expected.png new file mode 100644 index 00000000000..6ba956dc955 Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-native#8460/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-native#8460/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-native#8460/style.json new file mode 100644 index 00000000000..8cadfcff814 --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-native#8460/style.json @@ -0,0 +1,74 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "zoom": 0.999, + "sources": { + "a": { + "type": "geojson", + "data": { + "type": "Feature", + "properties": { + "property": 0 + }, + "geometry": { + "type": "Point", + "coordinates": [ + -5, + 0 + ] + } + } + }, + "b": { + "type": "geojson", + "data": { + "type": "Feature", + "properties": { + "property": 0 + }, + "geometry": { + "type": "Point", + "coordinates": [ + 5, + 0 + ] + } + } + } + }, + "layers": [ + { + "id": "a", + "type": "circle", + "source": "a", + "paint": { + "circle-radius": { + "property": "property", + "stops": [ + [{"zoom": 0.0, "value": 0}, 0], + [{"zoom": 0.5, "value": 0}, 10] + ] + } + } + }, + { + "id": "b", + "type": "circle", + "source": "b", + "paint": { + "circle-radius": { + "property": "property", + "stops": [ + [{"zoom": 0.5, "value": 0}, 0], + [{"zoom": 1.5, "value": 0}, 10] + ] + } + } + } + ] +} diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-native#8505/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-native#8505/expected.png new file mode 100644 index 00000000000..305cba90ab0 Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-native#8505/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-native#8505/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-native#8505/style.json new file mode 100644 index 00000000000..b8f031e759f --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-native#8505/style.json @@ -0,0 +1,62 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 128, + "height": 128, + "operations": [ + [ + "wait" + ], + [ + "setZoom", + 2 + ], + [ + "wait" + ], + [ + "setFilter", + "circle", + [ + "has", + "nonexistent" + ] + ], + [ + "wait" + ], + [ + "setZoom", + 0 + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson", + "maxzoom": 1 + } + ] +} diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-native#8871/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-native#8871/expected.png new file mode 100644 index 00000000000..05dad19c5f9 Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-native#8871/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-native#8871/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-native#8871/style.json new file mode 100644 index 00000000000..a0e7ed2facc --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-native#8871/style.json @@ -0,0 +1,52 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "wait" + ], + [ + "addLayer", + { + "id": "circle2", + "type": "circle", + "source": "geojson", + "paint": { + "circle-color": "red", + "circle-radius": 5 + } + } + ], + [ + "wait" + ] + ] + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson", + "paint": { + "circle-color": "blue", + "circle-radius": 10 + } + } + ] +} diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-native#8952/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-native#8952/expected.png new file mode 100644 index 00000000000..d58554e96e6 Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-native#8952/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-native#8952/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-native#8952/style.json new file mode 100644 index 00000000000..f02d55b9c58 --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-native#8952/style.json @@ -0,0 +1,36 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "wait" + ], + [ + "setZoom", + 1 + ], + [ + "wait" + ] + ] + } + }, + "sources": {}, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": { + "stops": [ + [0, "white"], + [1, "black"] + ] + } + } + } + ] +} diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-native#9406/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-native#9406/expected.png new file mode 100644 index 00000000000..2da35107f02 Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-native#9406/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-native#9406/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-native#9406/style.json new file mode 100644 index 00000000000..beb5cfd8a39 --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-native#9406/style.json @@ -0,0 +1,48 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Feature", + "properties": { + "color": "blue" + }, + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + } + }, + "layers": [ + { + "id": "a", + "type": "circle", + "source": "geojson", + "paint": { + "circle-color": { + "type": "identity", + "property": "color" + } + } + }, + { + "id": "b", + "type": "circle", + "source": "geojson", + "paint": { + "circle-color": "red" + } + } + ] +} diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-native#9557/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-native#9557/expected.png new file mode 100644 index 00000000000..fae7013e853 Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-native#9557/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-native#9557/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-native#9557/style.json new file mode 100644 index 00000000000..c410190867f --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-native#9557/style.json @@ -0,0 +1,69 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "wait" + ], + [ + "setStyle", + { + "version": 8, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "sprite": "local://sprites/dark", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "marker" + } + } + ] + } + ], + [ + "wait" + ] + ] + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "sprite": "local://sprites/light", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "marker" + } + } + ] +} diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-native#9792/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-native#9792/expected.png new file mode 100644 index 00000000000..b0315bb5449 Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-native#9792/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-native#9792/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-native#9792/style.json new file mode 100644 index 00000000000..0b9666266dc --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-native#9792/style.json @@ -0,0 +1,56 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "icon": "marker" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + "icon": "nonesuch" + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "sprite": "local://sprites/light", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "{icon}" + } + } + ] +} diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-native#9900/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-native#9900/expected.png new file mode 100644 index 00000000000..a5a8ad4654c Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-native#9900/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-native#9900/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-native#9900/style.json new file mode 100644 index 00000000000..3f11cfc94be --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-native#9900/style.json @@ -0,0 +1,76 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 128, + "height": 128, + "operations": [ + [ + "wait" + ], + [ + "addSource", + "geojson", + { + "type": "geojson", + "data": { + "type": "LineString", + "coordinates": [ + [ + -45, + -45 + ], + [ + 45, + 45 + ] + ] + } + } + ], + [ + "addLayer", + { + "id": "noop", + "type": "symbol", + "source": "geojson" + } + ], + [ + "wait" + ], + [ + "setCenter", + [ + 45, + 45 + ] + ], + [ + "addLayer", + { + "id": "line", + "type": "line", + "source": "geojson" + } + ], + [ + "wait" + ], + [ + "setCenter", + [ + 0, + 0 + ] + ], + [ + "wait" + ] + ] + } + }, + "zoom": 10, + "sources": {}, + "layers": [] +} diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-native#9976/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-native#9976/expected.png new file mode 100644 index 00000000000..19244c5fc39 Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-native#9976/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-native#9976/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-native#9976/style.json new file mode 100644 index 00000000000..81d3b574735 --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-native#9976/style.json @@ -0,0 +1,132 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256, + "operations": [ + [ + "addImage", + "marker", + "./image/marker.png" + ], + [ + "addLayer", + { + "id": "fill", + "type": "fill", + "source": "mapbox", + "paint": { + "fill-pattern": "marker" + } + } + ], + [ + "wait" + ], + [ + "removeImage", + "marker" + ], + [ + "removeLayer", + "fill" + ], + [ + "addLayer", + { + "id": "road", + "type": "line", + "source": "mapbox", + "paint": { + "line-width": 20, + "line-pattern": "generic_icon" + } + } + ], + [ + "wait" + ] + ] + + } + }, +"zoom": 11, + "sources": { + "mapbox": { + "type": "geojson", + "maxzoom": 10, + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "class": "street" + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + 10, + -0.01 + ], + [ + -10, + -0.01 + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "class": "path" + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -10, + 0 + ], + [ + 10, + 0 + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "class": "street" + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -10, + 0.01 + ], + [ + 10, + 0.01 + ] + ] + } + } + ] + } + } + }, + "sprite": "local://sprites/emerald", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + } + ] +} diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-native#9979/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-native#9979/expected.png new file mode 100644 index 00000000000..f3005a7b020 Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-native#9979/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-native#9979/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-native#9979/style.json new file mode 100644 index 00000000000..58b78bac147 --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-native#9979/style.json @@ -0,0 +1,85 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 64, + "width": 64, + "operations": [ + [ + "addSource", + "geojson", + { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [] + } + } + ], + [ + "addLayer", + { + "id": "line", + "source": "geojson", + "type": "line" + } + ], + [ + "wait" + ], + [ + "removeLayer", + "line" + ], + [ + "removeSource", + "geojson" + ], + [ + "addSource", + "geojson", + { + "maxzoom": 16, + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [0.134411688130084, 52.2205792605345], + [0.134414225556761, 52.2206321864999], + [0.1342400618783, 52.2206353389478], + [0.134235355257573, 52.2205371595184], + [0.134408523751762, 52.2205340250887], + [0.134411688130084, 52.2205792605345] + ] + ] + } + } + ], + [ + "addLayer", + { + "id": "line", + "source": "geojson", + "type": "line", + "paint": { + "line-width": 3 + } + } + ], + [ + "setZoom", + 16.7 + ], + [ + "wait" + ] + ] + } + }, + "zoom": 18, + "center": [0.13429, 52.22056], + "sources": {}, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [] +} diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-shaders#37/expected.png b/metrics/integration/render-tests/regressions/mapbox-gl-shaders#37/expected.png new file mode 100644 index 00000000000..a265ee8a844 Binary files /dev/null and b/metrics/integration/render-tests/regressions/mapbox-gl-shaders#37/expected.png differ diff --git a/metrics/integration/render-tests/regressions/mapbox-gl-shaders#37/style.json b/metrics/integration/render-tests/regressions/mapbox-gl-shaders#37/style.json new file mode 100644 index 00000000000..65dd08ff8a7 --- /dev/null +++ b/metrics/integration/render-tests/regressions/mapbox-gl-shaders#37/style.json @@ -0,0 +1,75 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "opacity": 0.6 + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -10, + -20 + ], + [ + -10, + 20 + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "opacity": 0.9 + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + 10, + -20 + ], + [ + 10, + 20 + ] + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "line", + "type": "line", + "source": "geojson", + "paint": { + "line-width": 5, + "line-dasharray": [ + 1, + 1 + ], + "line-opacity": { + "type": "identity", + "property": "opacity" + } + } + } + ] +} diff --git a/metrics/integration/render-tests/remove-feature-state/composite-expression/expected.png b/metrics/integration/render-tests/remove-feature-state/composite-expression/expected.png new file mode 100644 index 00000000000..4cb77303dde Binary files /dev/null and b/metrics/integration/render-tests/remove-feature-state/composite-expression/expected.png differ diff --git a/metrics/integration/render-tests/remove-feature-state/composite-expression/style.json b/metrics/integration/render-tests/remove-feature-state/composite-expression/style.json new file mode 100644 index 00000000000..0823a9e8afa --- /dev/null +++ b/metrics/integration/render-tests/remove-feature-state/composite-expression/style.json @@ -0,0 +1,78 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setFeatureState", + { + "source": "geojson", + "id": "1" + }, + { + "color": "red" + } + ], + [ + "wait" + ], + [ + "removeFeatureState", + { + "source": "geojson", + "id": "1" + }, + "color" + ], + [ + "wait" + ] + ] + } + }, + "zoom": 2, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Feature", + "id": "1", + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson", + "paint": { + "circle-radius": 5, + "circle-color": [ + "step", + [ + "zoom" + ], + "black", + 1, + [ + "coalesce", + [ + "feature-state", + "color" + ], + "black" + ] + ] + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/remove-feature-state/data-expression/expected.png b/metrics/integration/render-tests/remove-feature-state/data-expression/expected.png new file mode 100644 index 00000000000..4cb77303dde Binary files /dev/null and b/metrics/integration/render-tests/remove-feature-state/data-expression/expected.png differ diff --git a/metrics/integration/render-tests/remove-feature-state/data-expression/style.json b/metrics/integration/render-tests/remove-feature-state/data-expression/style.json new file mode 100644 index 00000000000..2c6e0b03c4d --- /dev/null +++ b/metrics/integration/render-tests/remove-feature-state/data-expression/style.json @@ -0,0 +1,70 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setFeatureState", + { + "source": "geojson", + "id": "1" + }, + { + "color": "red" + } + ], + [ + "wait" + ], + [ + "removeFeatureState", + { + "source": "geojson", + "id": "1" + }, + "color" + ], + [ + "wait" + ] + ] + } + }, + "zoom": 2, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Feature", + "id": "1", + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson", + "paint": { + "circle-radius": 5, + "circle-color": [ + "coalesce", + [ + "feature-state", + "color" + ], + "black" + ] + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/remove-feature-state/vector-source/expected.png b/metrics/integration/render-tests/remove-feature-state/vector-source/expected.png new file mode 100644 index 00000000000..d51d572887d Binary files /dev/null and b/metrics/integration/render-tests/remove-feature-state/vector-source/expected.png differ diff --git a/metrics/integration/render-tests/remove-feature-state/vector-source/style.json b/metrics/integration/render-tests/remove-feature-state/vector-source/style.json new file mode 100644 index 00000000000..ff67795589c --- /dev/null +++ b/metrics/integration/render-tests/remove-feature-state/vector-source/style.json @@ -0,0 +1,76 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256, + "operations": [ + [ + "setFeatureState", + { + "source": "mapbox", + "sourceLayer": "poi_label", + "id": "1000059876748" + }, + { + "color": "red" + } + ], + [ + "wait" + ], + [ + "removeFeatureState", + { + "source": "mapbox", + "sourceLayer": "poi_label", + "id": "1000059876748" + }, + "color" + ], + [ + "wait" + ] + ] + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "poi_label", + "type": "circle", + "source": "mapbox", + "source-layer": "poi_label", + "paint": { + "circle-radius": 5, + "circle-color": [ + "coalesce", + [ + "feature-state", + "color" + ], + "black" + ] + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/result_item.html.tmpl b/metrics/integration/render-tests/result_item.html.tmpl new file mode 100644 index 00000000000..cb4a544dff3 --- /dev/null +++ b/metrics/integration/render-tests/result_item.html.tmpl @@ -0,0 +1,8 @@ +
+

<%- r.status %> <%- r.id %>

+ <% if (r.status !== 'errored') { %> + + <% } %> + <% if (r.error) { %>

Error: <%- r.error.message %>

<% } %> + <% if (r.difference) { %>

Diff: <%- r.difference %>

<% } %> +
diff --git a/metrics/integration/render-tests/retina-raster/default/expected.png b/metrics/integration/render-tests/retina-raster/default/expected.png new file mode 100644 index 00000000000..a865d05bb79 Binary files /dev/null and b/metrics/integration/render-tests/retina-raster/default/expected.png differ diff --git a/metrics/integration/render-tests/retina-raster/default/style.json b/metrics/integration/render-tests/retina-raster/default/style.json new file mode 100644 index 00000000000..e834a122879 --- /dev/null +++ b/metrics/integration/render-tests/retina-raster/default/style.json @@ -0,0 +1,35 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 256, + "height": 128, + "pixelRatio": 2 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 16, + "sources": { + "satellite": { + "type": "raster", + "tiles": [ + "local://tiles/{z}-{x}-{y}.satellite.png" + ], + "maxzoom": 17, + "tileSize": 256 + } + }, + "layers": [ + { + "id": "raster", + "type": "raster", + "source": "satellite", + "paint": { + "raster-fade-duration": 0 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/runtime-styling/filter-default-to-false/expected.png b/metrics/integration/render-tests/runtime-styling/filter-default-to-false/expected.png new file mode 100644 index 00000000000..724d17cd7d3 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/filter-default-to-false/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/filter-default-to-false/style.json b/metrics/integration/render-tests/runtime-styling/filter-default-to-false/style.json new file mode 100644 index 00000000000..2614d30e840 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/filter-default-to-false/style.json @@ -0,0 +1,55 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setFilter", + "symbol", + [ + "==", + "property", + "b" + ] + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Feature", + "properties": { + "property": "a" + }, + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "circle-12" + } + } + ] +} diff --git a/metrics/integration/render-tests/runtime-styling/filter-default-to-true/expected.png b/metrics/integration/render-tests/runtime-styling/filter-default-to-true/expected.png new file mode 100644 index 00000000000..feed2e457f1 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/filter-default-to-true/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/filter-default-to-true/style.json b/metrics/integration/render-tests/runtime-styling/filter-default-to-true/style.json new file mode 100644 index 00000000000..bd12f6558a2 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/filter-default-to-true/style.json @@ -0,0 +1,55 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setFilter", + "symbol", + [ + "==", + "property", + "a" + ] + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Feature", + "properties": { + "property": "a" + }, + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "circle-12" + } + } + ] +} diff --git a/metrics/integration/render-tests/runtime-styling/filter-false-to-default/expected.png b/metrics/integration/render-tests/runtime-styling/filter-false-to-default/expected.png new file mode 100644 index 00000000000..feed2e457f1 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/filter-false-to-default/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/filter-false-to-default/style.json b/metrics/integration/render-tests/runtime-styling/filter-false-to-default/style.json new file mode 100644 index 00000000000..8544bfb3e0e --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/filter-false-to-default/style.json @@ -0,0 +1,56 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setFilter", + "symbol", + null + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Feature", + "properties": { + "property": "a" + }, + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "circle-12" + }, + "filter": [ + "==", + "property", + false + ] + } + ] +} diff --git a/metrics/integration/render-tests/runtime-styling/filter-false-to-true/expected.png b/metrics/integration/render-tests/runtime-styling/filter-false-to-true/expected.png new file mode 100644 index 00000000000..feed2e457f1 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/filter-false-to-true/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/filter-false-to-true/style.json b/metrics/integration/render-tests/runtime-styling/filter-false-to-true/style.json new file mode 100644 index 00000000000..0570d091073 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/filter-false-to-true/style.json @@ -0,0 +1,60 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setFilter", + "symbol", + [ + "==", + "property", + "a" + ] + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Feature", + "properties": { + "property": "a" + }, + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "circle-12" + }, + "filter": [ + "==", + "property", + false + ] + } + ] +} diff --git a/metrics/integration/render-tests/runtime-styling/filter-true-to-default/expected.png b/metrics/integration/render-tests/runtime-styling/filter-true-to-default/expected.png new file mode 100644 index 00000000000..feed2e457f1 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/filter-true-to-default/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/filter-true-to-default/style.json b/metrics/integration/render-tests/runtime-styling/filter-true-to-default/style.json new file mode 100644 index 00000000000..d1d9f9787b4 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/filter-true-to-default/style.json @@ -0,0 +1,56 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setFilter", + "symbol", + null + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Feature", + "properties": { + "property": "a" + }, + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "circle-12" + }, + "filter": [ + "==", + "property", + true + ] + } + ] +} diff --git a/metrics/integration/render-tests/runtime-styling/filter-true-to-false/expected.png b/metrics/integration/render-tests/runtime-styling/filter-true-to-false/expected.png new file mode 100644 index 00000000000..724d17cd7d3 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/filter-true-to-false/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/filter-true-to-false/style.json b/metrics/integration/render-tests/runtime-styling/filter-true-to-false/style.json new file mode 100644 index 00000000000..efb71facfe2 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/filter-true-to-false/style.json @@ -0,0 +1,60 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setFilter", + "symbol", + [ + "==", + "property", + "b" + ] + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Feature", + "properties": { + "property": "a" + }, + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "circle-12" + }, + "filter": [ + "==", + "property", + true + ] + } + ] +} diff --git a/metrics/integration/render-tests/runtime-styling/image-add-1.5x-image-1x-screen/expected.png b/metrics/integration/render-tests/runtime-styling/image-add-1.5x-image-1x-screen/expected.png new file mode 100644 index 00000000000..f18b2bc34d5 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/image-add-1.5x-image-1x-screen/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/image-add-1.5x-image-1x-screen/style.json b/metrics/integration/render-tests/runtime-styling/image-add-1.5x-image-1x-screen/style.json new file mode 100644 index 00000000000..e050778aa8c --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/image-add-1.5x-image-1x-screen/style.json @@ -0,0 +1,44 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "pixelRatio": 1, + "operations": [ + [ + "addImage", + "marker", + "./sprites/1.5x.png", + { + "pixelRatio": 1.5 + } + ], + [ + "addLayer", + { + "id": "geometry", + "type": "symbol", + "source": "geometry", + "layout": { + "icon-image": "marker" + } + } + ], + [ + "wait" + ] + ] + } + }, + "sources": { + "geometry": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [0, 0] + } + } + }, + "layers": [] +} diff --git a/metrics/integration/render-tests/runtime-styling/image-add-1.5x-image-2x-screen/expected.png b/metrics/integration/render-tests/runtime-styling/image-add-1.5x-image-2x-screen/expected.png new file mode 100644 index 00000000000..de3b86aa0db Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/image-add-1.5x-image-2x-screen/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/image-add-1.5x-image-2x-screen/style.json b/metrics/integration/render-tests/runtime-styling/image-add-1.5x-image-2x-screen/style.json new file mode 100644 index 00000000000..c735dd6251d --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/image-add-1.5x-image-2x-screen/style.json @@ -0,0 +1,44 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "pixelRatio": 2, + "operations": [ + [ + "addImage", + "marker", + "./sprites/1.5x.png", + { + "pixelRatio": 1.5 + } + ], + [ + "addLayer", + { + "id": "geometry", + "type": "symbol", + "source": "geometry", + "layout": { + "icon-image": "marker" + } + } + ], + [ + "wait" + ] + ] + } + }, + "sources": { + "geometry": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [0, 0] + } + } + }, + "layers": [] +} diff --git a/metrics/integration/render-tests/runtime-styling/image-add-1x-image-1x-screen/expected.png b/metrics/integration/render-tests/runtime-styling/image-add-1x-image-1x-screen/expected.png new file mode 100644 index 00000000000..c7cf15d48b0 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/image-add-1x-image-1x-screen/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/image-add-1x-image-1x-screen/style.json b/metrics/integration/render-tests/runtime-styling/image-add-1x-image-1x-screen/style.json new file mode 100644 index 00000000000..97fad3bf076 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/image-add-1x-image-1x-screen/style.json @@ -0,0 +1,40 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "addImage", + "marker", + "./sprites/1x.png" + ], + [ + "addLayer", + { + "id": "geometry", + "type": "symbol", + "source": "geometry", + "layout": { + "icon-image": "marker" + } + } + ], + [ + "wait" + ] + ] + } + }, + "sources": { + "geometry": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [0, 0] + } + } + }, + "layers": [] +} diff --git a/metrics/integration/render-tests/runtime-styling/image-add-1x-image-2x-screen/expected.png b/metrics/integration/render-tests/runtime-styling/image-add-1x-image-2x-screen/expected.png new file mode 100644 index 00000000000..c6888ec5dbf Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/image-add-1x-image-2x-screen/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/image-add-1x-image-2x-screen/style.json b/metrics/integration/render-tests/runtime-styling/image-add-1x-image-2x-screen/style.json new file mode 100644 index 00000000000..57bd8adee83 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/image-add-1x-image-2x-screen/style.json @@ -0,0 +1,41 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "pixelRatio": 2, + "operations": [ + [ + "addImage", + "marker", + "./sprites/1x.png" + ], + [ + "addLayer", + { + "id": "geometry", + "type": "symbol", + "source": "geometry", + "layout": { + "icon-image": "marker" + } + } + ], + [ + "wait" + ] + ] + } + }, + "sources": { + "geometry": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [0, 0] + } + } + }, + "layers": [] +} diff --git a/metrics/integration/render-tests/runtime-styling/image-add-2x-image-1x-screen/expected.png b/metrics/integration/render-tests/runtime-styling/image-add-2x-image-1x-screen/expected.png new file mode 100644 index 00000000000..c6c06859474 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/image-add-2x-image-1x-screen/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/image-add-2x-image-1x-screen/style.json b/metrics/integration/render-tests/runtime-styling/image-add-2x-image-1x-screen/style.json new file mode 100644 index 00000000000..376a00c383a --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/image-add-2x-image-1x-screen/style.json @@ -0,0 +1,44 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "pixelRatio": 1, + "operations": [ + [ + "addImage", + "marker", + "./sprites/2x.png", + { + "pixelRatio": 2 + } + ], + [ + "addLayer", + { + "id": "geometry", + "type": "symbol", + "source": "geometry", + "layout": { + "icon-image": "marker" + } + } + ], + [ + "wait" + ] + ] + } + }, + "sources": { + "geometry": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [0, 0] + } + } + }, + "layers": [] +} diff --git a/metrics/integration/render-tests/runtime-styling/image-add-2x-image-2x-screen/expected.png b/metrics/integration/render-tests/runtime-styling/image-add-2x-image-2x-screen/expected.png new file mode 100644 index 00000000000..8117459a35b Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/image-add-2x-image-2x-screen/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/image-add-2x-image-2x-screen/style.json b/metrics/integration/render-tests/runtime-styling/image-add-2x-image-2x-screen/style.json new file mode 100644 index 00000000000..c9b8419a598 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/image-add-2x-image-2x-screen/style.json @@ -0,0 +1,44 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "pixelRatio" :2, + "operations": [ + [ + "addImage", + "marker", + "./sprites/2x.png", + { + "pixelRatio": 2 + } + ], + [ + "addLayer", + { + "id": "geometry", + "type": "symbol", + "source": "geometry", + "layout": { + "icon-image": "marker" + } + } + ], + [ + "wait" + ] + ] + } + }, + "sources": { + "geometry": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [0, 0] + } + } + }, + "layers": [] +} diff --git a/metrics/integration/render-tests/runtime-styling/image-add-alpha/expected.png b/metrics/integration/render-tests/runtime-styling/image-add-alpha/expected.png new file mode 100644 index 00000000000..042ef907267 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/image-add-alpha/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/image-add-alpha/style.json b/metrics/integration/render-tests/runtime-styling/image-add-alpha/style.json new file mode 100644 index 00000000000..36368dec715 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/image-add-alpha/style.json @@ -0,0 +1,40 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "addImage", + "rocket", + "./image/rocket.png" + ], + [ + "addLayer", + { + "id": "geometry", + "type": "symbol", + "source": "geometry", + "layout": { + "icon-image": "rocket" + } + } + ], + [ + "wait" + ] + ] + } + }, + "sources": { + "geometry": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [0, 0] + } + } + }, + "layers": [] +} diff --git a/metrics/integration/render-tests/runtime-styling/image-add-nonsdf/expected.png b/metrics/integration/render-tests/runtime-styling/image-add-nonsdf/expected.png new file mode 100644 index 00000000000..f32c41c447f Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/image-add-nonsdf/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/image-add-nonsdf/style.json b/metrics/integration/render-tests/runtime-styling/image-add-nonsdf/style.json new file mode 100644 index 00000000000..18885ac73bb --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/image-add-nonsdf/style.json @@ -0,0 +1,41 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "addImage", + "line.sdf", + "./image/line.sdf.png" + ], + [ + "addLayer", + { + "id": "geometry", + "type": "symbol", + "source": "geometry", + "layout": { + "icon-image": "line.sdf" + } + } + ], + [ + "wait" + ] + ] + } + }, + "sources": { + "geometry": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [0, 0] + } + } + }, + "layers": [] +} + diff --git a/metrics/integration/render-tests/runtime-styling/image-add-pattern/expected.png b/metrics/integration/render-tests/runtime-styling/image-add-pattern/expected.png new file mode 100644 index 00000000000..35a9122a3d7 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/image-add-pattern/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/image-add-pattern/style.json b/metrics/integration/render-tests/runtime-styling/image-add-pattern/style.json new file mode 100644 index 00000000000..e4ede8476c8 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/image-add-pattern/style.json @@ -0,0 +1,65 @@ +{ + "version": 8, + "zoom": 1, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "addImage", + "marker", + "./image/marker.png" + ], + [ + "addLayer", + { + "id": "fill", + "type": "fill", + "source": "geojson", + "paint": { + "fill-antialias": false, + "fill-pattern": "marker" + } + } + ], + [ + "wait" + ] + ] + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -10, + -10 + ], + [ + -10, + 10 + ], + [ + 10, + 10 + ], + [ + 10, + -10 + ], + [ + -10, + -10 + ] + ] + ] + } + } + }, + "layers": [] +} diff --git a/metrics/integration/render-tests/runtime-styling/image-add-remove-add/expected.png b/metrics/integration/render-tests/runtime-styling/image-add-remove-add/expected.png new file mode 100644 index 00000000000..94d4b5440aa Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/image-add-remove-add/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/image-add-remove-add/style.json b/metrics/integration/render-tests/runtime-styling/image-add-remove-add/style.json new file mode 100644 index 00000000000..e9c0403b608 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/image-add-remove-add/style.json @@ -0,0 +1,52 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "addImage", + "marker", + "./sprites/1x.png" + ], + [ + "addLayer", + { + "id": "geometry", + "type": "symbol", + "source": "geometry", + "layout": { + "icon-image": "marker" + } + } + ], + [ + "wait" + ], + [ + "removeImage", + "marker" + ], + [ + "addImage", + "marker", + "./sprites/dark.png" + ], + [ + "wait" + ] + ] + } + }, + "sources": { + "geometry": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [0, 0] + } + } + }, + "layers": [] +} diff --git a/metrics/integration/render-tests/runtime-styling/image-add-sdf/expected.png b/metrics/integration/render-tests/runtime-styling/image-add-sdf/expected.png new file mode 100644 index 00000000000..2a734a7faab Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/image-add-sdf/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/image-add-sdf/style.json b/metrics/integration/render-tests/runtime-styling/image-add-sdf/style.json new file mode 100644 index 00000000000..1db28280b4a --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/image-add-sdf/style.json @@ -0,0 +1,47 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "addImage", + "line.sdf", + "./image/line.sdf.png", + { + "sdf": true + } + ], + [ + "addLayer", + { + "id": "geometry", + "type": "symbol", + "source": "geometry", + "layout": { + "icon-image": "line.sdf" + }, + "paint": { + "icon-color": "red" + } + } + ], + [ + "wait" + ] + ] + } + }, + "sources": { + "geometry": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [0, 0] + } + } + }, + "layers": [] +} + diff --git a/metrics/integration/render-tests/runtime-styling/image-remove/expected.png b/metrics/integration/render-tests/runtime-styling/image-remove/expected.png new file mode 100644 index 00000000000..c0889384758 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/image-remove/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/image-remove/style.json b/metrics/integration/render-tests/runtime-styling/image-remove/style.json new file mode 100644 index 00000000000..717f609b93b --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/image-remove/style.json @@ -0,0 +1,49 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "addImage", + "marker", + "./image/0.png" + ], + [ + "removeImage", + "marker" + ], + [ + "addImage", + "marker", + "./image/marker.png" + ], + [ + "addLayer", + { + "id": "geometry", + "type": "symbol", + "source": "geometry", + "layout": { + "icon-image": "marker" + } + } + ], + [ + "wait" + ] + ] + } + }, + "sources": { + "geometry": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [0, 0] + } + } + }, + "layers": [] +} diff --git a/metrics/integration/render-tests/runtime-styling/image-update-icon/expected.png b/metrics/integration/render-tests/runtime-styling/image-update-icon/expected.png new file mode 100644 index 00000000000..027baead205 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/image-update-icon/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/image-update-icon/style.json b/metrics/integration/render-tests/runtime-styling/image-update-icon/style.json new file mode 100644 index 00000000000..97aeedd5b98 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/image-update-icon/style.json @@ -0,0 +1,45 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "wait" + ], + [ + "updateImage", + "generic_icon", + "./image/marker.png" + ], + [ + "wait" + ] + ] + } + }, + "sources": { + "geometry": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "sprite": "local://sprites/emerald", + "layers": [ + { + "id": "geometry", + "type": "symbol", + "source": "geometry", + "layout": { + "icon-image": "generic_icon" + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/runtime-styling/image-update-pattern/expected.png b/metrics/integration/render-tests/runtime-styling/image-update-pattern/expected.png new file mode 100644 index 00000000000..0fc06575a26 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/image-update-pattern/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/image-update-pattern/style.json b/metrics/integration/render-tests/runtime-styling/image-update-pattern/style.json new file mode 100644 index 00000000000..f1ec46c722b --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/image-update-pattern/style.json @@ -0,0 +1,67 @@ +{ + "version": 8, + "zoom": 1, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "wait" + ], + [ + "updateImage", + "generic_icon", + "./image/marker.png" + ], + [ + "wait" + ] + ] + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -10, + -10 + ], + [ + -10, + 10 + ], + [ + 10, + 10 + ], + [ + 10, + -10 + ], + [ + -10, + -10 + ] + ] + ] + } + } + }, + "sprite": "local://sprites/emerald", + "layers": [ + { + "id": "fill", + "type": "fill", + "source": "geojson", + "paint": { + "fill-antialias": false, + "fill-pattern": "generic_icon" + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/runtime-styling/layer-add-background/expected.png b/metrics/integration/render-tests/runtime-styling/layer-add-background/expected.png new file mode 100644 index 00000000000..d58554e96e6 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/layer-add-background/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/layer-add-background/style.json b/metrics/integration/render-tests/runtime-styling/layer-add-background/style.json new file mode 100644 index 00000000000..e50fbeb0024 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/layer-add-background/style.json @@ -0,0 +1,26 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "addLayer", + { + "id": "background", + "type": "background" + } + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": {}, + "layers": [] +} diff --git a/metrics/integration/render-tests/runtime-styling/layer-add-circle/expected.png b/metrics/integration/render-tests/runtime-styling/layer-add-circle/expected.png new file mode 100644 index 00000000000..4cb77303dde Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/layer-add-circle/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/layer-add-circle/style.json b/metrics/integration/render-tests/runtime-styling/layer-add-circle/style.json new file mode 100644 index 00000000000..5f758bc094c --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/layer-add-circle/style.json @@ -0,0 +1,38 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "addLayer", + { + "id": "circle", + "type": "circle", + "source": "geojson" + } + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "layers": [] +} diff --git a/metrics/integration/render-tests/runtime-styling/layer-add-fill/expected.png b/metrics/integration/render-tests/runtime-styling/layer-add-fill/expected.png new file mode 100644 index 00000000000..8f17810f559 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/layer-add-fill/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/layer-add-fill/style.json b/metrics/integration/render-tests/runtime-styling/layer-add-fill/style.json new file mode 100644 index 00000000000..6c812388307 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/layer-add-fill/style.json @@ -0,0 +1,58 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "addLayer", + { + "id": "fill", + "type": "fill", + "source": "geojson" + } + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -10, + -10 + ], + [ + -10, + 10 + ], + [ + 10, + 10 + ], + [ + 10, + -10 + ], + [ + -10, + -10 + ] + ] + ] + } + } + }, + "layers": [] +} diff --git a/metrics/integration/render-tests/runtime-styling/layer-add-line/expected.png b/metrics/integration/render-tests/runtime-styling/layer-add-line/expected.png new file mode 100644 index 00000000000..6af662bba55 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/layer-add-line/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/layer-add-line/style.json b/metrics/integration/render-tests/runtime-styling/layer-add-line/style.json new file mode 100644 index 00000000000..cafb9172780 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/layer-add-line/style.json @@ -0,0 +1,52 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "addLayer", + { + "id": "line", + "type": "line", + "source": "geojson" + } + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "LineString", + "coordinates": [ + [ + -10, + 10 + ], + [ + 10, + 10 + ], + [ + -10, + -10 + ], + [ + 10, + -10 + ] + ] + } + } + }, + "layers": [] +} diff --git a/metrics/integration/render-tests/runtime-styling/layer-add-raster/expected.png b/metrics/integration/render-tests/runtime-styling/layer-add-raster/expected.png new file mode 100644 index 00000000000..1c1ef5d4c64 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/layer-add-raster/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/layer-add-raster/style.json b/metrics/integration/render-tests/runtime-styling/layer-add-raster/style.json new file mode 100644 index 00000000000..dc3671d8c5a --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/layer-add-raster/style.json @@ -0,0 +1,38 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "addLayer", + { + "id": "raster", + "type": "raster", + "source": "raster", + "paint": { + "raster-fade-duration": 0 + } + } + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "raster": { + "type": "raster", + "tiles": [ + "local://tiles/{z}-{x}-{y}.satellite.png" + ], + "tileSize": 256 + } + }, + "layers": [] +} diff --git a/metrics/integration/render-tests/runtime-styling/layer-add-symbol/expected.png b/metrics/integration/render-tests/runtime-styling/layer-add-symbol/expected.png new file mode 100644 index 00000000000..feed2e457f1 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/layer-add-symbol/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/layer-add-symbol/style.json b/metrics/integration/render-tests/runtime-styling/layer-add-symbol/style.json new file mode 100644 index 00000000000..62eb54f07d6 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/layer-add-symbol/style.json @@ -0,0 +1,42 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "addLayer", + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "circle-12" + } + } + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [] +} diff --git a/metrics/integration/render-tests/runtime-styling/layer-remove-background/expected.png b/metrics/integration/render-tests/runtime-styling/layer-remove-background/expected.png new file mode 100644 index 00000000000..724d17cd7d3 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/layer-remove-background/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/layer-remove-background/style.json b/metrics/integration/render-tests/runtime-styling/layer-remove-background/style.json new file mode 100644 index 00000000000..68533286791 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/layer-remove-background/style.json @@ -0,0 +1,28 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "removeLayer", + "background" + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": {}, + "layers": [ + { + "id": "background", + "type": "background" + } + ] +} diff --git a/metrics/integration/render-tests/runtime-styling/layer-remove-circle/expected.png b/metrics/integration/render-tests/runtime-styling/layer-remove-circle/expected.png new file mode 100644 index 00000000000..724d17cd7d3 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/layer-remove-circle/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/layer-remove-circle/style.json b/metrics/integration/render-tests/runtime-styling/layer-remove-circle/style.json new file mode 100644 index 00000000000..26ba0fe7197 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/layer-remove-circle/style.json @@ -0,0 +1,40 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "removeLayer", + "circle" + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson" + } + ] +} diff --git a/metrics/integration/render-tests/runtime-styling/layer-remove-fill/expected.png b/metrics/integration/render-tests/runtime-styling/layer-remove-fill/expected.png new file mode 100644 index 00000000000..724d17cd7d3 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/layer-remove-fill/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/layer-remove-fill/style.json b/metrics/integration/render-tests/runtime-styling/layer-remove-fill/style.json new file mode 100644 index 00000000000..8ecf42103b2 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/layer-remove-fill/style.json @@ -0,0 +1,60 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "removeLayer", + "fill" + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -10, + -10 + ], + [ + -10, + 10 + ], + [ + 10, + 10 + ], + [ + 10, + -10 + ], + [ + -10, + -10 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "fill", + "type": "fill", + "source": "geojson" + } + ] +} diff --git a/metrics/integration/render-tests/runtime-styling/layer-remove-line/expected.png b/metrics/integration/render-tests/runtime-styling/layer-remove-line/expected.png new file mode 100644 index 00000000000..724d17cd7d3 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/layer-remove-line/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/layer-remove-line/style.json b/metrics/integration/render-tests/runtime-styling/layer-remove-line/style.json new file mode 100644 index 00000000000..9b0ddcdf11c --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/layer-remove-line/style.json @@ -0,0 +1,54 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "removeLayer", + "line" + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "LineString", + "coordinates": [ + [ + -10, + 10 + ], + [ + 10, + 10 + ], + [ + -10, + -10 + ], + [ + 10, + -10 + ] + ] + } + } + }, + "layers": [ + { + "id": "line", + "type": "line", + "source": "geojson" + } + ] +} diff --git a/metrics/integration/render-tests/runtime-styling/layer-remove-raster/expected.png b/metrics/integration/render-tests/runtime-styling/layer-remove-raster/expected.png new file mode 100644 index 00000000000..724d17cd7d3 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/layer-remove-raster/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/layer-remove-raster/style.json b/metrics/integration/render-tests/runtime-styling/layer-remove-raster/style.json new file mode 100644 index 00000000000..1cbca0b3542 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/layer-remove-raster/style.json @@ -0,0 +1,40 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "removeLayer", + "raster" + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "raster": { + "type": "raster", + "tiles": [ + "local://tiles/{z}-{x}-{y}.satellite.png" + ], + "tileSize": 256 + } + }, + "layers": [ + { + "id": "raster", + "type": "raster", + "source": "raster", + "paint": { + "raster-fade-duration": 0 + } + } + ] +} diff --git a/metrics/integration/render-tests/runtime-styling/layer-remove-symbol/expected.png b/metrics/integration/render-tests/runtime-styling/layer-remove-symbol/expected.png new file mode 100644 index 00000000000..724d17cd7d3 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/layer-remove-symbol/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/layer-remove-symbol/style.json b/metrics/integration/render-tests/runtime-styling/layer-remove-symbol/style.json new file mode 100644 index 00000000000..29f0d9320db --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/layer-remove-symbol/style.json @@ -0,0 +1,44 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "removeLayer", + "symbol" + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "circle-12" + } + } + ] +} diff --git a/metrics/integration/render-tests/runtime-styling/layout-property-default-to-literal/expected.png b/metrics/integration/render-tests/runtime-styling/layout-property-default-to-literal/expected.png new file mode 100644 index 00000000000..ecb49c45999 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/layout-property-default-to-literal/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/layout-property-default-to-literal/style.json b/metrics/integration/render-tests/runtime-styling/layout-property-default-to-literal/style.json new file mode 100644 index 00000000000..bb2c62b5a8d --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/layout-property-default-to-literal/style.json @@ -0,0 +1,43 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setLayoutProperty", + "symbol", + "icon-image", + "triangle-12" + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson" + } + ] +} diff --git a/metrics/integration/render-tests/runtime-styling/layout-property-default-to-property-expression/expected.png b/metrics/integration/render-tests/runtime-styling/layout-property-default-to-property-expression/expected.png new file mode 100644 index 00000000000..d665d8dd5d6 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/layout-property-default-to-property-expression/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/layout-property-default-to-property-expression/style.json b/metrics/integration/render-tests/runtime-styling/layout-property-default-to-property-expression/style.json new file mode 100644 index 00000000000..346baaa178a --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/layout-property-default-to-property-expression/style.json @@ -0,0 +1,73 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setLayoutProperty", + "symbol", + "icon-rotate", + [ + "get", + "rotate" + ] + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "rotate": -45 + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + "rotate": 45 + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "oneway" + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/runtime-styling/layout-property-default-to-property-function/expected.png b/metrics/integration/render-tests/runtime-styling/layout-property-default-to-property-function/expected.png new file mode 100644 index 00000000000..d665d8dd5d6 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/layout-property-default-to-property-function/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/layout-property-default-to-property-function/style.json b/metrics/integration/render-tests/runtime-styling/layout-property-default-to-property-function/style.json new file mode 100644 index 00000000000..9b80377e763 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/layout-property-default-to-property-function/style.json @@ -0,0 +1,73 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setLayoutProperty", + "symbol", + "icon-rotate", + { + "type": "identity", + "property": "rotate" + } + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "rotate": -45 + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + "rotate": 45 + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "oneway" + } + } + ] +} diff --git a/metrics/integration/render-tests/runtime-styling/layout-property-default-to-zoom-expression/expected.png b/metrics/integration/render-tests/runtime-styling/layout-property-default-to-zoom-expression/expected.png new file mode 100644 index 00000000000..feed2e457f1 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/layout-property-default-to-zoom-expression/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/layout-property-default-to-zoom-expression/style.json b/metrics/integration/render-tests/runtime-styling/layout-property-default-to-zoom-expression/style.json new file mode 100644 index 00000000000..38148fdf334 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/layout-property-default-to-zoom-expression/style.json @@ -0,0 +1,51 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setLayoutProperty", + "symbol", + "icon-image", + [ + "step", + [ + "zoom" + ], + "circle-12", + 10, + "triangle-12" + ] + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson" + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/runtime-styling/layout-property-default-to-zoom-function/expected.png b/metrics/integration/render-tests/runtime-styling/layout-property-default-to-zoom-function/expected.png new file mode 100644 index 00000000000..feed2e457f1 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/layout-property-default-to-zoom-function/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/layout-property-default-to-zoom-function/style.json b/metrics/integration/render-tests/runtime-styling/layout-property-default-to-zoom-function/style.json new file mode 100644 index 00000000000..b3f8aa143b5 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/layout-property-default-to-zoom-function/style.json @@ -0,0 +1,54 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setLayoutProperty", + "symbol", + "icon-image", + { + "stops": [ + [ + 0, + "circle-12" + ], + [ + 10, + "triangle-12" + ] + ] + } + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson" + } + ] +} diff --git a/metrics/integration/render-tests/runtime-styling/layout-property-literal-to-default/expected.png b/metrics/integration/render-tests/runtime-styling/layout-property-literal-to-default/expected.png new file mode 100644 index 00000000000..724d17cd7d3 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/layout-property-literal-to-default/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/layout-property-literal-to-default/style.json b/metrics/integration/render-tests/runtime-styling/layout-property-literal-to-default/style.json new file mode 100644 index 00000000000..4e1e1bc37b7 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/layout-property-literal-to-default/style.json @@ -0,0 +1,46 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setLayoutProperty", + "symbol", + "icon-image", + null + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "triangle-12" + } + } + ] +} diff --git a/metrics/integration/render-tests/runtime-styling/layout-property-literal-to-property-expression/expected.png b/metrics/integration/render-tests/runtime-styling/layout-property-literal-to-property-expression/expected.png new file mode 100644 index 00000000000..d665d8dd5d6 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/layout-property-literal-to-property-expression/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/layout-property-literal-to-property-expression/style.json b/metrics/integration/render-tests/runtime-styling/layout-property-literal-to-property-expression/style.json new file mode 100644 index 00000000000..3a0827e56e9 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/layout-property-literal-to-property-expression/style.json @@ -0,0 +1,74 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setLayoutProperty", + "symbol", + "icon-rotate", + [ + "get", + "rotate" + ] + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "rotate": -45 + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + "rotate": 45 + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "oneway", + "icon-rotate": 90 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/runtime-styling/layout-property-literal-to-property-function/expected.png b/metrics/integration/render-tests/runtime-styling/layout-property-literal-to-property-function/expected.png new file mode 100644 index 00000000000..d665d8dd5d6 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/layout-property-literal-to-property-function/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/layout-property-literal-to-property-function/style.json b/metrics/integration/render-tests/runtime-styling/layout-property-literal-to-property-function/style.json new file mode 100644 index 00000000000..2e12c305254 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/layout-property-literal-to-property-function/style.json @@ -0,0 +1,74 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setLayoutProperty", + "symbol", + "icon-rotate", + { + "type": "identity", + "property": "rotate" + } + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "rotate": -45 + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + "rotate": 45 + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "oneway", + "icon-rotate": 90 + } + } + ] +} diff --git a/metrics/integration/render-tests/runtime-styling/layout-property-literal-to-zoom-expression/expected.png b/metrics/integration/render-tests/runtime-styling/layout-property-literal-to-zoom-expression/expected.png new file mode 100644 index 00000000000..feed2e457f1 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/layout-property-literal-to-zoom-expression/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/layout-property-literal-to-zoom-expression/style.json b/metrics/integration/render-tests/runtime-styling/layout-property-literal-to-zoom-expression/style.json new file mode 100644 index 00000000000..f5afa5d8cab --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/layout-property-literal-to-zoom-expression/style.json @@ -0,0 +1,54 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setLayoutProperty", + "symbol", + "icon-image", + [ + "step", + [ + "zoom" + ], + "circle-12", + 10, + "triangle-12" + ] + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "triangle-12" + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/runtime-styling/layout-property-literal-to-zoom-function/expected.png b/metrics/integration/render-tests/runtime-styling/layout-property-literal-to-zoom-function/expected.png new file mode 100644 index 00000000000..feed2e457f1 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/layout-property-literal-to-zoom-function/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/layout-property-literal-to-zoom-function/style.json b/metrics/integration/render-tests/runtime-styling/layout-property-literal-to-zoom-function/style.json new file mode 100644 index 00000000000..e371c01ed09 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/layout-property-literal-to-zoom-function/style.json @@ -0,0 +1,57 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setLayoutProperty", + "symbol", + "icon-image", + { + "stops": [ + [ + 0, + "circle-12" + ], + [ + 10, + "triangle-12" + ] + ] + } + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "triangle-12" + } + } + ] +} diff --git a/metrics/integration/render-tests/runtime-styling/layout-property-override-paint-property-expression/expected.png b/metrics/integration/render-tests/runtime-styling/layout-property-override-paint-property-expression/expected.png new file mode 100644 index 00000000000..65504b23ad2 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/layout-property-override-paint-property-expression/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/layout-property-override-paint-property-expression/style.json b/metrics/integration/render-tests/runtime-styling/layout-property-override-paint-property-expression/style.json new file mode 100644 index 00000000000..0ec02feab35 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/layout-property-override-paint-property-expression/style.json @@ -0,0 +1,66 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 64, + "width": 64, + "operations": [ + [ + "setLayoutProperty", + "text", + "text-field", + ["format", ["get", "name_en"], {"text-color": "#5F4B8B"}] + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "center": [ 0, 0 ], + "zoom": 0, + "sources": { + "point": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "name_en": "Ultra Violet", + "default_color": "hsl(0, 0%, 0%)" + }, + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + } + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "text", + "type": "symbol", + "source": "point", + "layout": { + "text-field": "{name_en}", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-size": 18, + "text-max-width": 1 + }, + "paint": { + "text-color": ["get", "default_color"] + } + } + ] +} diff --git a/metrics/integration/render-tests/runtime-styling/layout-property-override-paint-property-literal/expected.png b/metrics/integration/render-tests/runtime-styling/layout-property-override-paint-property-literal/expected.png new file mode 100644 index 00000000000..eee145e190c Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/layout-property-override-paint-property-literal/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/layout-property-override-paint-property-literal/style.json b/metrics/integration/render-tests/runtime-styling/layout-property-override-paint-property-literal/style.json new file mode 100644 index 00000000000..e7f75bbf901 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/layout-property-override-paint-property-literal/style.json @@ -0,0 +1,65 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 64, + "width": 64, + "operations": [ + [ + "setLayoutProperty", + "text", + "text-field", + ["format", ["get", "name_en"], {"text-color": "#FA7268"}] + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "center": [ 0, 0 ], + "zoom": 0, + "sources": { + "point": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "name_en": "Living Coral" + }, + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + } + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "text", + "type": "symbol", + "source": "point", + "layout": { + "text-field": "{name_en}", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-size": 18, + "text-max-width": 1 + }, + "paint": { + "text-color": "hsl(0, 0%, 0%)" + } + } + ] +} diff --git a/metrics/integration/render-tests/runtime-styling/layout-property-property-expression-to-default/expected.png b/metrics/integration/render-tests/runtime-styling/layout-property-property-expression-to-default/expected.png new file mode 100644 index 00000000000..5b91fba2068 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/layout-property-property-expression-to-default/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/layout-property-property-expression-to-default/style.json b/metrics/integration/render-tests/runtime-styling/layout-property-property-expression-to-default/style.json new file mode 100644 index 00000000000..79123ffb9c2 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/layout-property-property-expression-to-default/style.json @@ -0,0 +1,74 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setLayoutProperty", + "symbol", + "icon-rotate", + null + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "rotate": -45 + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + "rotate": 45 + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "oneway", + "icon-rotate": [ + "get", + "rotate" + ] + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/runtime-styling/layout-property-property-expression-to-literal/expected.png b/metrics/integration/render-tests/runtime-styling/layout-property-property-expression-to-literal/expected.png new file mode 100644 index 00000000000..1d9050047f3 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/layout-property-property-expression-to-literal/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/layout-property-property-expression-to-literal/style.json b/metrics/integration/render-tests/runtime-styling/layout-property-property-expression-to-literal/style.json new file mode 100644 index 00000000000..6ce1247ab65 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/layout-property-property-expression-to-literal/style.json @@ -0,0 +1,74 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setLayoutProperty", + "symbol", + "icon-rotate", + 90 + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "rotate": -45 + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + "rotate": 45 + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "oneway", + "icon-rotate": [ + "get", + "rotate" + ] + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/runtime-styling/layout-property-property-expression-to-property-expression/expected.png b/metrics/integration/render-tests/runtime-styling/layout-property-property-expression-to-property-expression/expected.png new file mode 100644 index 00000000000..5f9f0989f3b Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/layout-property-property-expression-to-property-expression/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/layout-property-property-expression-to-property-expression/style.json b/metrics/integration/render-tests/runtime-styling/layout-property-property-expression-to-property-expression/style.json new file mode 100644 index 00000000000..404827c8d3c --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/layout-property-property-expression-to-property-expression/style.json @@ -0,0 +1,80 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setLayoutProperty", + "symbol", + "icon-rotate", + [ "+", + [ + "get", + "rotate" + ], + 45 + ] + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "rotate": -45 + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + "rotate": 45 + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "oneway", + "icon-rotate": [ + "get", + "rotate" + ] + } + } + ] +} diff --git a/metrics/integration/render-tests/runtime-styling/layout-property-property-expression-to-zoom-expression/expected.png b/metrics/integration/render-tests/runtime-styling/layout-property-property-expression-to-zoom-expression/expected.png new file mode 100644 index 00000000000..feed2e457f1 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/layout-property-property-expression-to-zoom-expression/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/layout-property-property-expression-to-zoom-expression/style.json b/metrics/integration/render-tests/runtime-styling/layout-property-property-expression-to-zoom-expression/style.json new file mode 100644 index 00000000000..888c8fe5898 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/layout-property-property-expression-to-zoom-expression/style.json @@ -0,0 +1,61 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setLayoutProperty", + "symbol", + "icon-size", + [ + "step", + [ + "zoom" + ], + 1, + 10, + 2 + ] + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + }, + "properties": { + "size": 0.125 + } + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-size": ["get", "size"], + "icon-image": "circle-12" + } + } + ] +} diff --git a/metrics/integration/render-tests/runtime-styling/layout-property-property-function-to-default/expected.png b/metrics/integration/render-tests/runtime-styling/layout-property-property-function-to-default/expected.png new file mode 100644 index 00000000000..5b91fba2068 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/layout-property-property-function-to-default/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/layout-property-property-function-to-default/style.json b/metrics/integration/render-tests/runtime-styling/layout-property-property-function-to-default/style.json new file mode 100644 index 00000000000..ec48aea06de --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/layout-property-property-function-to-default/style.json @@ -0,0 +1,74 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setLayoutProperty", + "symbol", + "icon-rotate", + null + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "rotate": -45 + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + "rotate": 45 + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "oneway", + "icon-rotate": { + "type": "identity", + "property": "rotate" + } + } + } + ] +} diff --git a/metrics/integration/render-tests/runtime-styling/layout-property-property-function-to-literal/expected.png b/metrics/integration/render-tests/runtime-styling/layout-property-property-function-to-literal/expected.png new file mode 100644 index 00000000000..1d9050047f3 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/layout-property-property-function-to-literal/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/layout-property-property-function-to-literal/style.json b/metrics/integration/render-tests/runtime-styling/layout-property-property-function-to-literal/style.json new file mode 100644 index 00000000000..c350eff03d0 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/layout-property-property-function-to-literal/style.json @@ -0,0 +1,74 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setLayoutProperty", + "symbol", + "icon-rotate", + 90 + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "rotate": -45 + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + "rotate": 45 + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "oneway", + "icon-rotate": { + "type": "identity", + "property": "rotate" + } + } + } + ] +} diff --git a/metrics/integration/render-tests/runtime-styling/layout-property-text-variable-anchor/expected.png b/metrics/integration/render-tests/runtime-styling/layout-property-text-variable-anchor/expected.png new file mode 100644 index 00000000000..2637d73ac8e Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/layout-property-text-variable-anchor/expected.png differ 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 new file mode 100644 index 00000000000..c98b00662e4 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/layout-property-text-variable-anchor/style.json @@ -0,0 +1,73 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setLayoutProperty", + "symbol", + "text-variable-anchor", + ["bottom"] + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "text-variable-anchor": ["left"], + "text-field": "ABC", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "symbol-placement": "point" + }, + "paint": { + "text-color": "red" + } + }, + { + "id" : "dot", + "type": "circle", + "source": "geojson", + "paint": { + "circle-color": "red" + } + + } + ] + } + \ No newline at end of file diff --git a/metrics/integration/render-tests/runtime-styling/layout-property-zoom-and-property-expression-to-property-expression/expected.png b/metrics/integration/render-tests/runtime-styling/layout-property-zoom-and-property-expression-to-property-expression/expected.png new file mode 100644 index 00000000000..5f9f0989f3b Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/layout-property-zoom-and-property-expression-to-property-expression/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/layout-property-zoom-and-property-expression-to-property-expression/style.json b/metrics/integration/render-tests/runtime-styling/layout-property-zoom-and-property-expression-to-property-expression/style.json new file mode 100644 index 00000000000..bf449cb80fd --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/layout-property-zoom-and-property-expression-to-property-expression/style.json @@ -0,0 +1,86 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setLayoutProperty", + "symbol", + "icon-rotate", + [ "+", + [ + "get", + "rotate" + ], + 45 + ] + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "rotate": -45 + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + "rotate": 45 + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "oneway", + "icon-rotate": [ + "step", + ["zoom"], + [ + "get", + "rotate" + ], + 20, + 0 + ] + } + } + ] +} diff --git a/metrics/integration/render-tests/runtime-styling/layout-property-zoom-and-property-expression-to-zoom-and-property-expression/expected.png b/metrics/integration/render-tests/runtime-styling/layout-property-zoom-and-property-expression-to-zoom-and-property-expression/expected.png new file mode 100644 index 00000000000..5f9f0989f3b Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/layout-property-zoom-and-property-expression-to-zoom-and-property-expression/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/layout-property-zoom-and-property-expression-to-zoom-and-property-expression/style.json b/metrics/integration/render-tests/runtime-styling/layout-property-zoom-and-property-expression-to-zoom-and-property-expression/style.json new file mode 100644 index 00000000000..f13b8b9f495 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/layout-property-zoom-and-property-expression-to-zoom-and-property-expression/style.json @@ -0,0 +1,92 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setLayoutProperty", + "symbol", + "icon-rotate", + [ + "step", + ["zoom"], + [ "+", + [ + "get", + "rotate" + ], + 45 + ], + 10, + 0 + ] + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "rotate": -45 + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + "rotate": 45 + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "oneway", + "icon-rotate": [ + "step", + ["zoom"], + [ + "get", + "rotate" + ], + 20, + 0 + ] + } + } + ] +} diff --git a/metrics/integration/render-tests/runtime-styling/layout-property-zoom-and-property-expression-to-zoom-expression/expected.png b/metrics/integration/render-tests/runtime-styling/layout-property-zoom-and-property-expression-to-zoom-expression/expected.png new file mode 100644 index 00000000000..feed2e457f1 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/layout-property-zoom-and-property-expression-to-zoom-expression/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/layout-property-zoom-and-property-expression-to-zoom-expression/style.json b/metrics/integration/render-tests/runtime-styling/layout-property-zoom-and-property-expression-to-zoom-expression/style.json new file mode 100644 index 00000000000..1ca3712ebf9 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/layout-property-zoom-and-property-expression-to-zoom-expression/style.json @@ -0,0 +1,67 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setLayoutProperty", + "symbol", + "icon-size", + [ + "step", + [ + "zoom" + ], + 1, + 10, + 2 + ] + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + }, + "properties": { + "size": 0.125 + } + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-size": [ + "step", + ["zoom"], + ["get", "size"], + 10, + 0 + ], + "icon-image": "circle-12" + } + } + ] +} diff --git a/metrics/integration/render-tests/runtime-styling/layout-property-zoom-expression-to-default/expected.png b/metrics/integration/render-tests/runtime-styling/layout-property-zoom-expression-to-default/expected.png new file mode 100644 index 00000000000..724d17cd7d3 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/layout-property-zoom-expression-to-default/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/layout-property-zoom-expression-to-default/style.json b/metrics/integration/render-tests/runtime-styling/layout-property-zoom-expression-to-default/style.json new file mode 100644 index 00000000000..e4094c2d4f3 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/layout-property-zoom-expression-to-default/style.json @@ -0,0 +1,54 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setLayoutProperty", + "symbol", + "icon-image", + null + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": [ + "step", + [ + "zoom" + ], + "circle-12", + 10, + "triangle-12" + ] + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/runtime-styling/layout-property-zoom-expression-to-literal/expected.png b/metrics/integration/render-tests/runtime-styling/layout-property-zoom-expression-to-literal/expected.png new file mode 100644 index 00000000000..ecb49c45999 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/layout-property-zoom-expression-to-literal/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/layout-property-zoom-expression-to-literal/style.json b/metrics/integration/render-tests/runtime-styling/layout-property-zoom-expression-to-literal/style.json new file mode 100644 index 00000000000..e49447f5deb --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/layout-property-zoom-expression-to-literal/style.json @@ -0,0 +1,54 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setLayoutProperty", + "symbol", + "icon-image", + "triangle-12" + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": [ + "step", + [ + "zoom" + ], + "circle-12", + 10, + "triangle-12" + ] + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/runtime-styling/layout-property-zoom-expression-to-property-expression/expected.png b/metrics/integration/render-tests/runtime-styling/layout-property-zoom-expression-to-property-expression/expected.png new file mode 100644 index 00000000000..5f9f0989f3b Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/layout-property-zoom-expression-to-property-expression/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/layout-property-zoom-expression-to-property-expression/style.json b/metrics/integration/render-tests/runtime-styling/layout-property-zoom-expression-to-property-expression/style.json new file mode 100644 index 00000000000..39994304406 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/layout-property-zoom-expression-to-property-expression/style.json @@ -0,0 +1,83 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setLayoutProperty", + "symbol", + "icon-rotate", + [ "+", + [ + "get", + "rotate" + ], + 45 + ] + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "rotate": -45 + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + "rotate": 45 + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "oneway", + "icon-rotate": [ + "step", + ["zoom"], + 45, + 10, + 0 + ] + } + } + ] +} diff --git a/metrics/integration/render-tests/runtime-styling/layout-property-zoom-expression-to-zoom-and-property-expression/expected.png b/metrics/integration/render-tests/runtime-styling/layout-property-zoom-expression-to-zoom-and-property-expression/expected.png new file mode 100644 index 00000000000..5f9f0989f3b Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/layout-property-zoom-expression-to-zoom-and-property-expression/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/layout-property-zoom-expression-to-zoom-and-property-expression/style.json b/metrics/integration/render-tests/runtime-styling/layout-property-zoom-expression-to-zoom-and-property-expression/style.json new file mode 100644 index 00000000000..b6d703969c8 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/layout-property-zoom-expression-to-zoom-and-property-expression/style.json @@ -0,0 +1,89 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setLayoutProperty", + "symbol", + "icon-rotate", + [ + "step", + ["zoom"], + [ "+", + [ + "get", + "rotate" + ], + 45 + ], + 10, + 0 + ] + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "rotate": -45 + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + "rotate": 45 + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "oneway", + "icon-rotate": [ + "step", + ["zoom"], + 45, + 10, + 0 + ] + } + } + ] +} diff --git a/metrics/integration/render-tests/runtime-styling/layout-property-zoom-expression-to-zoom-expression/expected.png b/metrics/integration/render-tests/runtime-styling/layout-property-zoom-expression-to-zoom-expression/expected.png new file mode 100644 index 00000000000..feed2e457f1 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/layout-property-zoom-expression-to-zoom-expression/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/layout-property-zoom-expression-to-zoom-expression/style.json b/metrics/integration/render-tests/runtime-styling/layout-property-zoom-expression-to-zoom-expression/style.json new file mode 100644 index 00000000000..7687314cdad --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/layout-property-zoom-expression-to-zoom-expression/style.json @@ -0,0 +1,62 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setLayoutProperty", + "symbol", + "icon-image", + [ + "step", + [ + "zoom" + ], + "circle-12", + 10, + "triangle-12" + ] + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": [ + "step", + [ + "zoom" + ], + "triangle-12", + 10, + "circle-12" + ] + } + } + ] +} diff --git a/metrics/integration/render-tests/runtime-styling/layout-property-zoom-function-to-default/expected.png b/metrics/integration/render-tests/runtime-styling/layout-property-zoom-function-to-default/expected.png new file mode 100644 index 00000000000..724d17cd7d3 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/layout-property-zoom-function-to-default/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/layout-property-zoom-function-to-default/style.json b/metrics/integration/render-tests/runtime-styling/layout-property-zoom-function-to-default/style.json new file mode 100644 index 00000000000..80c03f2673f --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/layout-property-zoom-function-to-default/style.json @@ -0,0 +1,57 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setLayoutProperty", + "symbol", + "icon-image", + null + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": { + "stops": [ + [ + 0, + "circle-12" + ], + [ + 10, + "triangle-12" + ] + ] + } + } + } + ] +} diff --git a/metrics/integration/render-tests/runtime-styling/layout-property-zoom-function-to-literal/expected.png b/metrics/integration/render-tests/runtime-styling/layout-property-zoom-function-to-literal/expected.png new file mode 100644 index 00000000000..ecb49c45999 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/layout-property-zoom-function-to-literal/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/layout-property-zoom-function-to-literal/style.json b/metrics/integration/render-tests/runtime-styling/layout-property-zoom-function-to-literal/style.json new file mode 100644 index 00000000000..d53711a19d6 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/layout-property-zoom-function-to-literal/style.json @@ -0,0 +1,57 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setLayoutProperty", + "symbol", + "icon-image", + "triangle-12" + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": { + "stops": [ + [ + 0, + "circle-12" + ], + [ + 10, + "triangle-12" + ] + ] + } + } + } + ] +} diff --git a/metrics/integration/render-tests/runtime-styling/paint-property-default-to-literal/expected.png b/metrics/integration/render-tests/runtime-styling/paint-property-default-to-literal/expected.png new file mode 100644 index 00000000000..3a2d7006298 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/paint-property-default-to-literal/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/paint-property-default-to-literal/style.json b/metrics/integration/render-tests/runtime-styling/paint-property-default-to-literal/style.json new file mode 100644 index 00000000000..3ad9302bc67 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/paint-property-default-to-literal/style.json @@ -0,0 +1,30 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setPaintProperty", + "background", + "background-color", + "red" + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": {}, + "layers": [ + { + "id": "background", + "type": "background" + } + ] +} diff --git a/metrics/integration/render-tests/runtime-styling/paint-property-default-to-property-expression/expected.png b/metrics/integration/render-tests/runtime-styling/paint-property-default-to-property-expression/expected.png new file mode 100644 index 00000000000..b62d1b2ece7 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/paint-property-default-to-property-expression/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/paint-property-default-to-property-expression/style.json b/metrics/integration/render-tests/runtime-styling/paint-property-default-to-property-expression/style.json new file mode 100644 index 00000000000..2ee40b0b33b --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/paint-property-default-to-property-expression/style.json @@ -0,0 +1,69 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setPaintProperty", + "circle", + "circle-radius", + [ + "get", + "radius" + ] + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "radius": 10 + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + "radius": 15 + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson" + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/runtime-styling/paint-property-default-to-property-function/expected.png b/metrics/integration/render-tests/runtime-styling/paint-property-default-to-property-function/expected.png new file mode 100644 index 00000000000..b62d1b2ece7 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/paint-property-default-to-property-function/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/paint-property-default-to-property-function/style.json b/metrics/integration/render-tests/runtime-styling/paint-property-default-to-property-function/style.json new file mode 100644 index 00000000000..5a4036ce85f --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/paint-property-default-to-property-function/style.json @@ -0,0 +1,69 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setPaintProperty", + "circle", + "circle-radius", + { + "type": "identity", + "property": "radius" + } + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "radius": 10 + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + "radius": 15 + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson" + } + ] +} diff --git a/metrics/integration/render-tests/runtime-styling/paint-property-default-to-zoom-expression/expected.png b/metrics/integration/render-tests/runtime-styling/paint-property-default-to-zoom-expression/expected.png new file mode 100644 index 00000000000..cc46431ca9e Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/paint-property-default-to-zoom-expression/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/paint-property-default-to-zoom-expression/style.json b/metrics/integration/render-tests/runtime-styling/paint-property-default-to-zoom-expression/style.json new file mode 100644 index 00000000000..422fc08f733 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/paint-property-default-to-zoom-expression/style.json @@ -0,0 +1,43 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setPaintProperty", + "background", + "background-color", + [ + "interpolate", + [ + "exponential", + 1 + ], + [ + "zoom" + ], + 0, + "blue", + 10, + "white" + ] + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": {}, + "layers": [ + { + "id": "background", + "type": "background" + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/runtime-styling/paint-property-default-to-zoom-function/expected.png b/metrics/integration/render-tests/runtime-styling/paint-property-default-to-zoom-function/expected.png new file mode 100644 index 00000000000..cc46431ca9e Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/paint-property-default-to-zoom-function/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/paint-property-default-to-zoom-function/style.json b/metrics/integration/render-tests/runtime-styling/paint-property-default-to-zoom-function/style.json new file mode 100644 index 00000000000..be2c0bf2074 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/paint-property-default-to-zoom-function/style.json @@ -0,0 +1,41 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setPaintProperty", + "background", + "background-color", + { + "stops": [ + [ + 0, + "blue" + ], + [ + 10, + "white" + ] + ] + } + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": {}, + "layers": [ + { + "id": "background", + "type": "background" + } + ] +} diff --git a/metrics/integration/render-tests/runtime-styling/paint-property-fill-flat-to-extrude/expected.png b/metrics/integration/render-tests/runtime-styling/paint-property-fill-flat-to-extrude/expected.png new file mode 100644 index 00000000000..37586fe09be Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/paint-property-fill-flat-to-extrude/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/paint-property-fill-flat-to-extrude/style.json b/metrics/integration/render-tests/runtime-styling/paint-property-fill-flat-to-extrude/style.json new file mode 100644 index 00000000000..b05246aa336 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/paint-property-fill-flat-to-extrude/style.json @@ -0,0 +1,62 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "wait" + ], + [ + "setPaintProperty", + "fill-extrusion", + "fill-extrusion-height", + 10 + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -10, + -10 + ], + [ + -10, + 10 + ], + [ + 10, + 10 + ], + [ + 10, + -10 + ], + [ + -10, + -10 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "fill-extrusion", + "type": "fill-extrusion", + "source": "geojson" + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/runtime-styling/paint-property-literal-to-default/expected.png b/metrics/integration/render-tests/runtime-styling/paint-property-literal-to-default/expected.png new file mode 100644 index 00000000000..d58554e96e6 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/paint-property-literal-to-default/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/paint-property-literal-to-default/style.json b/metrics/integration/render-tests/runtime-styling/paint-property-literal-to-default/style.json new file mode 100644 index 00000000000..a26c4b69c4d --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/paint-property-literal-to-default/style.json @@ -0,0 +1,33 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setPaintProperty", + "background", + "background-color", + null + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": {}, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "red" + } + } + ] +} diff --git a/metrics/integration/render-tests/runtime-styling/paint-property-literal-to-expression/expected.png b/metrics/integration/render-tests/runtime-styling/paint-property-literal-to-expression/expected.png new file mode 100644 index 00000000000..cc46431ca9e Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/paint-property-literal-to-expression/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/paint-property-literal-to-expression/style.json b/metrics/integration/render-tests/runtime-styling/paint-property-literal-to-expression/style.json new file mode 100644 index 00000000000..3d4e31a34fe --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/paint-property-literal-to-expression/style.json @@ -0,0 +1,46 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setPaintProperty", + "background", + "background-color", + [ + "interpolate", + [ + "exponential", + 1 + ], + [ + "zoom" + ], + 0, + "blue", + 10, + "white" + ] + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": {}, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "red" + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/runtime-styling/paint-property-literal-to-function/expected.png b/metrics/integration/render-tests/runtime-styling/paint-property-literal-to-function/expected.png new file mode 100644 index 00000000000..cc46431ca9e Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/paint-property-literal-to-function/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/paint-property-literal-to-function/style.json b/metrics/integration/render-tests/runtime-styling/paint-property-literal-to-function/style.json new file mode 100644 index 00000000000..15ddafa042e --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/paint-property-literal-to-function/style.json @@ -0,0 +1,44 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setPaintProperty", + "background", + "background-color", + { + "stops": [ + [ + 0, + "blue" + ], + [ + 10, + "white" + ] + ] + } + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": {}, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "red" + } + } + ] +} diff --git a/metrics/integration/render-tests/runtime-styling/paint-property-literal-to-property-expression/expected.png b/metrics/integration/render-tests/runtime-styling/paint-property-literal-to-property-expression/expected.png new file mode 100644 index 00000000000..b62d1b2ece7 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/paint-property-literal-to-property-expression/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/paint-property-literal-to-property-expression/style.json b/metrics/integration/render-tests/runtime-styling/paint-property-literal-to-property-expression/style.json new file mode 100644 index 00000000000..cd33e2202a1 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/paint-property-literal-to-property-expression/style.json @@ -0,0 +1,72 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setPaintProperty", + "circle", + "circle-radius", + [ + "get", + "radius" + ] + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "radius": 10 + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + "radius": 15 + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson", + "paint": { + "circle-radius": 1 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/runtime-styling/paint-property-literal-to-property-function/expected.png b/metrics/integration/render-tests/runtime-styling/paint-property-literal-to-property-function/expected.png new file mode 100644 index 00000000000..b62d1b2ece7 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/paint-property-literal-to-property-function/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/paint-property-literal-to-property-function/style.json b/metrics/integration/render-tests/runtime-styling/paint-property-literal-to-property-function/style.json new file mode 100644 index 00000000000..ddf0af9587e --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/paint-property-literal-to-property-function/style.json @@ -0,0 +1,72 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setPaintProperty", + "circle", + "circle-radius", + { + "type": "identity", + "property": "radius" + } + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "radius": 10 + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + "radius": 15 + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson", + "paint": { + "circle-radius": 1 + } + } + ] +} diff --git a/metrics/integration/render-tests/runtime-styling/paint-property-overriden-default-to-expression/expected.png b/metrics/integration/render-tests/runtime-styling/paint-property-overriden-default-to-expression/expected.png new file mode 100644 index 00000000000..262d9e2ed21 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/paint-property-overriden-default-to-expression/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/paint-property-overriden-default-to-expression/style.json b/metrics/integration/render-tests/runtime-styling/paint-property-overriden-default-to-expression/style.json new file mode 100644 index 00000000000..f2db1738641 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/paint-property-overriden-default-to-expression/style.json @@ -0,0 +1,65 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 64, + "width": 64, + "operations": [ + [ + "setPaintProperty", + "text", + "text-color", + ["get", "color"] + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "center": [ 0, 0 ], + "zoom": 0, + "sources": { + "point": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "color": "green" + }, + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + } + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "text", + "type": "symbol", + "source": "point", + "layout": { + "text-field": ["format", + "Blue", { "text-color": "blue" }, + "\n", {}, + "Green", {} + ], + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-size": 20 + } + } + ] +} diff --git a/metrics/integration/render-tests/runtime-styling/paint-property-overriden-default-to-literal/expected.png b/metrics/integration/render-tests/runtime-styling/paint-property-overriden-default-to-literal/expected.png new file mode 100644 index 00000000000..063ee2b6040 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/paint-property-overriden-default-to-literal/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/paint-property-overriden-default-to-literal/style.json b/metrics/integration/render-tests/runtime-styling/paint-property-overriden-default-to-literal/style.json new file mode 100644 index 00000000000..6cc9acd19e2 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/paint-property-overriden-default-to-literal/style.json @@ -0,0 +1,62 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 64, + "width": 64, + "operations": [ + [ + "setPaintProperty", + "text", + "text-color", + "red" + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "center": [ 0, 0 ], + "zoom": 0, + "sources": { + "point": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + } + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "text", + "type": "symbol", + "source": "point", + "layout": { + "text-field": ["format", + "Blue", { "text-color": "blue" }, + "\n", {}, + "Red", {} + ], + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-size": 20 + } + } + ] +} diff --git a/metrics/integration/render-tests/runtime-styling/paint-property-overriden-expression-to-literal/expected.png b/metrics/integration/render-tests/runtime-styling/paint-property-overriden-expression-to-literal/expected.png new file mode 100644 index 00000000000..f9a9c369ebb Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/paint-property-overriden-expression-to-literal/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/paint-property-overriden-expression-to-literal/style.json b/metrics/integration/render-tests/runtime-styling/paint-property-overriden-expression-to-literal/style.json new file mode 100644 index 00000000000..1f855a61795 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/paint-property-overriden-expression-to-literal/style.json @@ -0,0 +1,68 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 64, + "width": 64, + "operations": [ + [ + "setPaintProperty", + "text", + "text-color", + "orange" + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "center": [ 0, 0 ], + "zoom": 0, + "sources": { + "point": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "color": "blue" + }, + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + } + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "text", + "type": "symbol", + "source": "point", + "layout": { + "text-field": ["format", + "Blue", { "text-color": "blue" }, + "\n", {}, + "Orange", {} + ], + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-size": 18 + }, + "paint": { + "text-color": ["get", "color"] + } + } + ] +} diff --git a/metrics/integration/render-tests/runtime-styling/paint-property-property-expression-to-default/expected.png b/metrics/integration/render-tests/runtime-styling/paint-property-property-expression-to-default/expected.png new file mode 100644 index 00000000000..62c8dbcada2 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/paint-property-property-expression-to-default/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/paint-property-property-expression-to-default/style.json b/metrics/integration/render-tests/runtime-styling/paint-property-property-expression-to-default/style.json new file mode 100644 index 00000000000..17aec8c5b71 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/paint-property-property-expression-to-default/style.json @@ -0,0 +1,72 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setPaintProperty", + "circle", + "circle-radius", + null + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "radius": 10 + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + "radius": 15 + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson", + "paint": { + "circle-radius": [ + "get", + "radius" + ] + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/runtime-styling/paint-property-property-expression-to-literal/expected.png b/metrics/integration/render-tests/runtime-styling/paint-property-property-expression-to-literal/expected.png new file mode 100644 index 00000000000..b48c32b3e5f Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/paint-property-property-expression-to-literal/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/paint-property-property-expression-to-literal/style.json b/metrics/integration/render-tests/runtime-styling/paint-property-property-expression-to-literal/style.json new file mode 100644 index 00000000000..05960b6db17 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/paint-property-property-expression-to-literal/style.json @@ -0,0 +1,75 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "wait" + ], + [ + "setPaintProperty", + "circle", + "circle-radius", + 1 + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "radius": 10 + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + "radius": 15 + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson", + "paint": { + "circle-radius": [ + "get", + "radius" + ] + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/runtime-styling/paint-property-property-expression-to-property-expression/expected.png b/metrics/integration/render-tests/runtime-styling/paint-property-property-expression-to-property-expression/expected.png new file mode 100644 index 00000000000..b62d1b2ece7 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/paint-property-property-expression-to-property-expression/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/paint-property-property-expression-to-property-expression/style.json b/metrics/integration/render-tests/runtime-styling/paint-property-property-expression-to-property-expression/style.json new file mode 100644 index 00000000000..cc3cd32ad37 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/paint-property-property-expression-to-property-expression/style.json @@ -0,0 +1,79 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setPaintProperty", + "circle", + "circle-radius", + [ + "get", + "radius" + ] + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "radius": 10 + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + "radius": 15 + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson", + "paint": { + "circle-radius": [ + "/", + [ + "get", + "radius" + ], + 5 + ] + } + } + ] +} diff --git a/metrics/integration/render-tests/runtime-styling/paint-property-property-expression-to-zoom-expression/expected.png b/metrics/integration/render-tests/runtime-styling/paint-property-property-expression-to-zoom-expression/expected.png new file mode 100644 index 00000000000..c46ba2a30d9 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/paint-property-property-expression-to-zoom-expression/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/paint-property-property-expression-to-zoom-expression/style.json b/metrics/integration/render-tests/runtime-styling/paint-property-property-expression-to-zoom-expression/style.json new file mode 100644 index 00000000000..2c7b40ea53b --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/paint-property-property-expression-to-zoom-expression/style.json @@ -0,0 +1,85 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setPaintProperty", + "circle", + "circle-color", + [ + "interpolate", + [ + "exponential", + 1 + ], + [ + "zoom" + ], + 0, + "blue", + 10, + "white" + ] + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "color": "red" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + "color": "green" + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson", + "paint": { + "circle-color": [ + "get", + "color" + ] + } + } + ] +} diff --git a/metrics/integration/render-tests/runtime-styling/paint-property-property-function-to-default/expected.png b/metrics/integration/render-tests/runtime-styling/paint-property-property-function-to-default/expected.png new file mode 100644 index 00000000000..62c8dbcada2 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/paint-property-property-function-to-default/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/paint-property-property-function-to-default/style.json b/metrics/integration/render-tests/runtime-styling/paint-property-property-function-to-default/style.json new file mode 100644 index 00000000000..841ded27b42 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/paint-property-property-function-to-default/style.json @@ -0,0 +1,72 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setPaintProperty", + "circle", + "circle-radius", + null + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "radius": 10 + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + "radius": 15 + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson", + "paint": { + "circle-radius": { + "type": "identity", + "property": "radius" + } + } + } + ] +} diff --git a/metrics/integration/render-tests/runtime-styling/paint-property-property-function-to-literal/expected.png b/metrics/integration/render-tests/runtime-styling/paint-property-property-function-to-literal/expected.png new file mode 100644 index 00000000000..b48c32b3e5f Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/paint-property-property-function-to-literal/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/paint-property-property-function-to-literal/style.json b/metrics/integration/render-tests/runtime-styling/paint-property-property-function-to-literal/style.json new file mode 100644 index 00000000000..f769b1ecceb --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/paint-property-property-function-to-literal/style.json @@ -0,0 +1,75 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "wait" + ], + [ + "setPaintProperty", + "circle", + "circle-radius", + 1 + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "radius": 10 + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + "radius": 15 + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson", + "paint": { + "circle-radius": { + "type": "identity", + "property": "radius" + } + } + } + ] +} diff --git a/metrics/integration/render-tests/runtime-styling/paint-property-zoom-and-property-expression-to-property-expression/expected.png b/metrics/integration/render-tests/runtime-styling/paint-property-zoom-and-property-expression-to-property-expression/expected.png new file mode 100644 index 00000000000..b62d1b2ece7 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/paint-property-zoom-and-property-expression-to-property-expression/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/paint-property-zoom-and-property-expression-to-property-expression/style.json b/metrics/integration/render-tests/runtime-styling/paint-property-zoom-and-property-expression-to-property-expression/style.json new file mode 100644 index 00000000000..a1fb53ed303 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/paint-property-zoom-and-property-expression-to-property-expression/style.json @@ -0,0 +1,85 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setPaintProperty", + "circle", + "circle-radius", + [ + "get", + "radius" + ] + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "radius": 10 + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + "radius": 15 + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson", + "paint": { + "circle-radius": [ + "step", + ["zoom"], + [ + "/", + [ + "get", + "radius" + ], + 5 + ], + 10, + 0 + ] + } + } + ] +} diff --git a/metrics/integration/render-tests/runtime-styling/paint-property-zoom-and-property-expression-to-zoom-and-property-expression/expected.png b/metrics/integration/render-tests/runtime-styling/paint-property-zoom-and-property-expression-to-zoom-and-property-expression/expected.png new file mode 100644 index 00000000000..b62d1b2ece7 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/paint-property-zoom-and-property-expression-to-zoom-and-property-expression/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/paint-property-zoom-and-property-expression-to-zoom-and-property-expression/style.json b/metrics/integration/render-tests/runtime-styling/paint-property-zoom-and-property-expression-to-zoom-and-property-expression/style.json new file mode 100644 index 00000000000..870d0874592 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/paint-property-zoom-and-property-expression-to-zoom-and-property-expression/style.json @@ -0,0 +1,88 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setPaintProperty", + "circle", + "circle-radius", + [ + "step", + ["zoom"], + ["get", "radius"], + 10, + 0 + ] + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "radius": 10 + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + "radius": 15 + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson", + "paint": { + "circle-radius": [ + "step", + ["zoom"], + [ + "/", + [ + "get", + "radius" + ], + 5 + ], + 10, + 0 + ] + } + } + ] +} diff --git a/metrics/integration/render-tests/runtime-styling/paint-property-zoom-and-property-expression-to-zoom-expression/expected.png b/metrics/integration/render-tests/runtime-styling/paint-property-zoom-and-property-expression-to-zoom-expression/expected.png new file mode 100644 index 00000000000..c46ba2a30d9 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/paint-property-zoom-and-property-expression-to-zoom-expression/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/paint-property-zoom-and-property-expression-to-zoom-expression/style.json b/metrics/integration/render-tests/runtime-styling/paint-property-zoom-and-property-expression-to-zoom-expression/style.json new file mode 100644 index 00000000000..5f5e2db312c --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/paint-property-zoom-and-property-expression-to-zoom-expression/style.json @@ -0,0 +1,91 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setPaintProperty", + "circle", + "circle-color", + [ + "interpolate", + [ + "exponential", + 1 + ], + [ + "zoom" + ], + 0, + "blue", + 10, + "white" + ] + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "color": "red" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + "color": "green" + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson", + "paint": { + "circle-color": [ + "step", + ["zoom"], + [ + "get", + "color" + ], + 10, + "black" + ] + } + } + ] +} diff --git a/metrics/integration/render-tests/runtime-styling/paint-property-zoom-expression-to-default/expected.png b/metrics/integration/render-tests/runtime-styling/paint-property-zoom-expression-to-default/expected.png new file mode 100644 index 00000000000..d58554e96e6 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/paint-property-zoom-expression-to-default/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/paint-property-zoom-expression-to-default/style.json b/metrics/integration/render-tests/runtime-styling/paint-property-zoom-expression-to-default/style.json new file mode 100644 index 00000000000..f48b708e3c6 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/paint-property-zoom-expression-to-default/style.json @@ -0,0 +1,46 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setPaintProperty", + "background", + "background-color", + null + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": {}, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": [ + "interpolate", + [ + "exponential", + 1 + ], + [ + "zoom" + ], + 0, + "blue", + 10, + "white" + ] + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/runtime-styling/paint-property-zoom-expression-to-literal/expected.png b/metrics/integration/render-tests/runtime-styling/paint-property-zoom-expression-to-literal/expected.png new file mode 100644 index 00000000000..3a2d7006298 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/paint-property-zoom-expression-to-literal/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/paint-property-zoom-expression-to-literal/style.json b/metrics/integration/render-tests/runtime-styling/paint-property-zoom-expression-to-literal/style.json new file mode 100644 index 00000000000..e71d0fd37f2 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/paint-property-zoom-expression-to-literal/style.json @@ -0,0 +1,46 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setPaintProperty", + "background", + "background-color", + "red" + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": {}, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": [ + "interpolate", + [ + "exponential", + 1 + ], + [ + "zoom" + ], + 0, + "blue", + 10, + "white" + ] + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/runtime-styling/paint-property-zoom-expression-to-property-expression/expected.png b/metrics/integration/render-tests/runtime-styling/paint-property-zoom-expression-to-property-expression/expected.png new file mode 100644 index 00000000000..b62d1b2ece7 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/paint-property-zoom-expression-to-property-expression/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/paint-property-zoom-expression-to-property-expression/style.json b/metrics/integration/render-tests/runtime-styling/paint-property-zoom-expression-to-property-expression/style.json new file mode 100644 index 00000000000..0f80ac8da09 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/paint-property-zoom-expression-to-property-expression/style.json @@ -0,0 +1,80 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setPaintProperty", + "circle", + "circle-radius", + [ + "get", + "radius" + ] + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "radius": 10 + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + "radius": 15 + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson", + "paint": { + "circle-radius": [ + "step", + [ + "zoom" + ], + 3, + 10, + 6 + ] + } + } + ] +} diff --git a/metrics/integration/render-tests/runtime-styling/paint-property-zoom-expression-to-zoom-and-property-expression/expected.png b/metrics/integration/render-tests/runtime-styling/paint-property-zoom-expression-to-zoom-and-property-expression/expected.png new file mode 100644 index 00000000000..b62d1b2ece7 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/paint-property-zoom-expression-to-zoom-and-property-expression/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/paint-property-zoom-expression-to-zoom-and-property-expression/style.json b/metrics/integration/render-tests/runtime-styling/paint-property-zoom-expression-to-zoom-and-property-expression/style.json new file mode 100644 index 00000000000..caa66ed30d5 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/paint-property-zoom-expression-to-zoom-and-property-expression/style.json @@ -0,0 +1,86 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setPaintProperty", + "circle", + "circle-radius", + [ + "step", + ["zoom"], + [ + "get", + "radius" + ], + 10, + 0 + ] + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "radius": 10 + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + "radius": 15 + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson", + "paint": { + "circle-radius": [ + "step", + [ + "zoom" + ], + 3, + 10, + 6 + ] + } + } + ] +} diff --git a/metrics/integration/render-tests/runtime-styling/paint-property-zoom-expression-to-zoom-expression/expected.png b/metrics/integration/render-tests/runtime-styling/paint-property-zoom-expression-to-zoom-expression/expected.png new file mode 100644 index 00000000000..cc46431ca9e Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/paint-property-zoom-expression-to-zoom-expression/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/paint-property-zoom-expression-to-zoom-expression/style.json b/metrics/integration/render-tests/runtime-styling/paint-property-zoom-expression-to-zoom-expression/style.json new file mode 100644 index 00000000000..95e813507de --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/paint-property-zoom-expression-to-zoom-expression/style.json @@ -0,0 +1,54 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setPaintProperty", + "background", + "background-color", + [ + "interpolate", + [ + "exponential", + 1 + ], + [ + "zoom" + ], + 0, + "blue", + 10, + "white" + ] + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": {}, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": [ + "step", + [ + "zoom" + ], + "red", + 10, + "white" + ] + } + } + ] +} diff --git a/metrics/integration/render-tests/runtime-styling/paint-property-zoom-function-to-default/expected.png b/metrics/integration/render-tests/runtime-styling/paint-property-zoom-function-to-default/expected.png new file mode 100644 index 00000000000..d58554e96e6 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/paint-property-zoom-function-to-default/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/paint-property-zoom-function-to-default/style.json b/metrics/integration/render-tests/runtime-styling/paint-property-zoom-function-to-default/style.json new file mode 100644 index 00000000000..1ab47c3bcef --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/paint-property-zoom-function-to-default/style.json @@ -0,0 +1,44 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setPaintProperty", + "background", + "background-color", + null + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": {}, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": { + "stops": [ + [ + 0, + "blue" + ], + [ + 10, + "white" + ] + ] + } + } + } + ] +} diff --git a/metrics/integration/render-tests/runtime-styling/paint-property-zoom-function-to-literal/expected.png b/metrics/integration/render-tests/runtime-styling/paint-property-zoom-function-to-literal/expected.png new file mode 100644 index 00000000000..3a2d7006298 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/paint-property-zoom-function-to-literal/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/paint-property-zoom-function-to-literal/style.json b/metrics/integration/render-tests/runtime-styling/paint-property-zoom-function-to-literal/style.json new file mode 100644 index 00000000000..803444db3c9 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/paint-property-zoom-function-to-literal/style.json @@ -0,0 +1,44 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setPaintProperty", + "background", + "background-color", + "red" + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": {}, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": { + "stops": [ + [ + 0, + "blue" + ], + [ + 10, + "white" + ] + ] + } + } + } + ] +} diff --git a/metrics/integration/render-tests/runtime-styling/pattern-add-remove-add/expected.png b/metrics/integration/render-tests/runtime-styling/pattern-add-remove-add/expected.png new file mode 100644 index 00000000000..8325b5ef81a Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/pattern-add-remove-add/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/pattern-add-remove-add/style.json b/metrics/integration/render-tests/runtime-styling/pattern-add-remove-add/style.json new file mode 100644 index 00000000000..35610cc1bd4 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/pattern-add-remove-add/style.json @@ -0,0 +1,52 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "addImage", + "marker", + "./sprites/dark.png" + ], + [ + "addLayer", + { + "id": "geometry", + "type": "fill", + "source": "geometry", + "paint": { + "fill-pattern": "marker" + } + } + ], + [ + "wait" + ], + [ + "removeImage", + "marker" + ], + [ + "addImage", + "marker", + "./sprites/1x.png" + ], + [ + "wait" + ] + ] + } + }, + "sources": { + "geometry": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [[[-180, 80], [180, 80], [180, -80], [-180, -80]]] + } + } + }, + "layers": [] +} diff --git a/metrics/integration/render-tests/runtime-styling/set-style-filter-default-to-false/expected.png b/metrics/integration/render-tests/runtime-styling/set-style-filter-default-to-false/expected.png new file mode 100644 index 00000000000..724d17cd7d3 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/set-style-filter-default-to-false/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/set-style-filter-default-to-false/style.json b/metrics/integration/render-tests/runtime-styling/set-style-filter-default-to-false/style.json new file mode 100644 index 00000000000..d6304d75938 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/set-style-filter-default-to-false/style.json @@ -0,0 +1,89 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setStyle", + { + "version": 8, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Feature", + "properties": { + "property": "a" + }, + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "circle-12" + }, + "filter": [ + "==", + "property", + "b" + ] + } + ] + } + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Feature", + "properties": { + "property": "a" + }, + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "circle-12" + } + } + ] +} diff --git a/metrics/integration/render-tests/runtime-styling/set-style-filter-default-to-true/expected.png b/metrics/integration/render-tests/runtime-styling/set-style-filter-default-to-true/expected.png new file mode 100644 index 00000000000..feed2e457f1 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/set-style-filter-default-to-true/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/set-style-filter-default-to-true/style.json b/metrics/integration/render-tests/runtime-styling/set-style-filter-default-to-true/style.json new file mode 100644 index 00000000000..a6468db3fe3 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/set-style-filter-default-to-true/style.json @@ -0,0 +1,89 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setStyle", + { + "version": 8, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Feature", + "properties": { + "property": "a" + }, + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "circle-12" + }, + "filter": [ + "==", + "property", + "a" + ] + } + ] + } + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Feature", + "properties": { + "property": "a" + }, + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "circle-12" + } + } + ] +} diff --git a/metrics/integration/render-tests/runtime-styling/set-style-filter-false-to-default/expected.png b/metrics/integration/render-tests/runtime-styling/set-style-filter-false-to-default/expected.png new file mode 100644 index 00000000000..feed2e457f1 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/set-style-filter-false-to-default/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/set-style-filter-false-to-default/style.json b/metrics/integration/render-tests/runtime-styling/set-style-filter-false-to-default/style.json new file mode 100644 index 00000000000..a8302d7cd38 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/set-style-filter-false-to-default/style.json @@ -0,0 +1,89 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setStyle", + { + "version": 8, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Feature", + "properties": { + "property": "a" + }, + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "circle-12" + } + } + ] + } + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Feature", + "properties": { + "property": "a" + }, + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "circle-12" + }, + "filter": [ + "==", + "property", + false + ] + } + ] +} diff --git a/metrics/integration/render-tests/runtime-styling/set-style-filter-false-to-true/expected.png b/metrics/integration/render-tests/runtime-styling/set-style-filter-false-to-true/expected.png new file mode 100644 index 00000000000..feed2e457f1 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/set-style-filter-false-to-true/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/set-style-filter-false-to-true/style.json b/metrics/integration/render-tests/runtime-styling/set-style-filter-false-to-true/style.json new file mode 100644 index 00000000000..beed147905d --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/set-style-filter-false-to-true/style.json @@ -0,0 +1,94 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setStyle", + { + "version": 8, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Feature", + "properties": { + "property": "a" + }, + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "circle-12" + }, + "filter": [ + "==", + "property", + "a" + ] + } + ] + } + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Feature", + "properties": { + "property": "a" + }, + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "circle-12" + }, + "filter": [ + "==", + "property", + false + ] + } + ] +} diff --git a/metrics/integration/render-tests/runtime-styling/set-style-filter-true-to-default/expected.png b/metrics/integration/render-tests/runtime-styling/set-style-filter-true-to-default/expected.png new file mode 100644 index 00000000000..feed2e457f1 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/set-style-filter-true-to-default/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/set-style-filter-true-to-default/style.json b/metrics/integration/render-tests/runtime-styling/set-style-filter-true-to-default/style.json new file mode 100644 index 00000000000..914ca93fa56 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/set-style-filter-true-to-default/style.json @@ -0,0 +1,89 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setStyle", + { + "version": 8, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Feature", + "properties": { + "property": "a" + }, + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "circle-12" + } + } + ] + } + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Feature", + "properties": { + "property": "a" + }, + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "circle-12" + }, + "filter": [ + "==", + "property", + true + ] + } + ] +} diff --git a/metrics/integration/render-tests/runtime-styling/set-style-filter-true-to-false/expected.png b/metrics/integration/render-tests/runtime-styling/set-style-filter-true-to-false/expected.png new file mode 100644 index 00000000000..724d17cd7d3 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/set-style-filter-true-to-false/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/set-style-filter-true-to-false/style.json b/metrics/integration/render-tests/runtime-styling/set-style-filter-true-to-false/style.json new file mode 100644 index 00000000000..b44ff876891 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/set-style-filter-true-to-false/style.json @@ -0,0 +1,94 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setStyle", + { + "version": 8, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Feature", + "properties": { + "property": "a" + }, + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "circle-12" + }, + "filter": [ + "==", + "property", + "b" + ] + } + ] + } + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Feature", + "properties": { + "property": "a" + }, + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "circle-12" + }, + "filter": [ + "==", + "property", + true + ] + } + ] +} diff --git a/metrics/integration/render-tests/runtime-styling/set-style-glyphs/expected.png b/metrics/integration/render-tests/runtime-styling/set-style-glyphs/expected.png new file mode 100644 index 00000000000..5c2f8c4f28e Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/set-style-glyphs/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/set-style-glyphs/style.json b/metrics/integration/render-tests/runtime-styling/set-style-glyphs/style.json new file mode 100644 index 00000000000..37e469ec373 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/set-style-glyphs/style.json @@ -0,0 +1,90 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 512, + "height": 512, + "allowed": 0.0003, + "operations": [ + [ + "setStyle", + { + "version": 8, + "center": [ + -70.751953125, + 43.38904828677382 + ], + "zoom": 11, + "sources": { + "geojson": { + "type": "geojson", + "data": "local://data/chinese.geojson" + } + }, + "sprite": "local://sprites/sprite", + "glyphs": "local://glyphs/NotoCJK/{range}.pbf?ignore={fontstack}&hat_tip=jfirebaugh", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "icon", + "type": "symbol", + "source": "geojson", + "layout": { + "text-field": "{name}", + "text-font": [ + "NotoCJK" + ], + "symbol-placement": "point" + } + } + ] + } + ], + [ + "wait" + ] + ] + } + }, + "center": [ + -70.751953125, + 43.38904828677382 + ], + "zoom": 11, + "sources": { + "geojson": { + "type": "geojson", + "data": "local://data/chinese.geojson" + } + }, + "sprite": "local://sprites/sprite", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "icon", + "type": "symbol", + "source": "geojson", + "layout": { + "text-field": "HELLO", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "symbol-placement": "point" + } + } + ] +} diff --git a/metrics/integration/render-tests/runtime-styling/set-style-layer-add-background/expected.png b/metrics/integration/render-tests/runtime-styling/set-style-layer-add-background/expected.png new file mode 100644 index 00000000000..d58554e96e6 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/set-style-layer-add-background/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/set-style-layer-add-background/style.json b/metrics/integration/render-tests/runtime-styling/set-style-layer-add-background/style.json new file mode 100644 index 00000000000..841b4f97cc0 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/set-style-layer-add-background/style.json @@ -0,0 +1,35 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setStyle", + { + "version": 8, + "transition": { + "duration": 0 + }, + "sources": {}, + "layers": [ + { + "id": "background", + "type": "background" + } + ] + } + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": {}, + "layers": [] +} diff --git a/metrics/integration/render-tests/runtime-styling/set-style-layer-add-circle/expected.png b/metrics/integration/render-tests/runtime-styling/set-style-layer-add-circle/expected.png new file mode 100644 index 00000000000..4cb77303dde Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/set-style-layer-add-circle/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/set-style-layer-add-circle/style.json b/metrics/integration/render-tests/runtime-styling/set-style-layer-add-circle/style.json new file mode 100644 index 00000000000..1be9ab54acf --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/set-style-layer-add-circle/style.json @@ -0,0 +1,58 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setStyle", + { + "version": 8, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson" + } + ] + } + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "layers": [] +} diff --git a/metrics/integration/render-tests/runtime-styling/set-style-layer-add-fill/expected.png b/metrics/integration/render-tests/runtime-styling/set-style-layer-add-fill/expected.png new file mode 100644 index 00000000000..8f17810f559 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/set-style-layer-add-fill/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/set-style-layer-add-fill/style.json b/metrics/integration/render-tests/runtime-styling/set-style-layer-add-fill/style.json new file mode 100644 index 00000000000..9b6f7cab145 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/set-style-layer-add-fill/style.json @@ -0,0 +1,98 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setStyle", + { + "version": 8, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -10, + -10 + ], + [ + -10, + 10 + ], + [ + 10, + 10 + ], + [ + 10, + -10 + ], + [ + -10, + -10 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "fill", + "type": "fill", + "source": "geojson" + } + ] + } + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -10, + -10 + ], + [ + -10, + 10 + ], + [ + 10, + 10 + ], + [ + 10, + -10 + ], + [ + -10, + -10 + ] + ] + ] + } + } + }, + "layers": [] +} diff --git a/metrics/integration/render-tests/runtime-styling/set-style-layer-add-line/expected.png b/metrics/integration/render-tests/runtime-styling/set-style-layer-add-line/expected.png new file mode 100644 index 00000000000..6af662bba55 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/set-style-layer-add-line/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/set-style-layer-add-line/style.json b/metrics/integration/render-tests/runtime-styling/set-style-layer-add-line/style.json new file mode 100644 index 00000000000..14090cf2bf6 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/set-style-layer-add-line/style.json @@ -0,0 +1,86 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setStyle", + { + "version": 8, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "LineString", + "coordinates": [ + [ + -10, + 10 + ], + [ + 10, + 10 + ], + [ + -10, + -10 + ], + [ + 10, + -10 + ] + ] + } + } + }, + "layers": [ + { + "id": "line", + "type": "line", + "source": "geojson" + } + ] + } + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "LineString", + "coordinates": [ + [ + -10, + 10 + ], + [ + 10, + 10 + ], + [ + -10, + -10 + ], + [ + 10, + -10 + ] + ] + } + } + }, + "layers": [] +} diff --git a/metrics/integration/render-tests/runtime-styling/set-style-layer-add-raster/expected.png b/metrics/integration/render-tests/runtime-styling/set-style-layer-add-raster/expected.png new file mode 100644 index 00000000000..1c1ef5d4c64 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/set-style-layer-add-raster/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/set-style-layer-add-raster/style.json b/metrics/integration/render-tests/runtime-styling/set-style-layer-add-raster/style.json new file mode 100644 index 00000000000..ff7b6613495 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/set-style-layer-add-raster/style.json @@ -0,0 +1,55 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setStyle", + { + "version": 8, + "transition": { + "duration": 0 + }, + "sources": { + "raster": { + "type": "raster", + "tiles": [ + "local://tiles/{z}-{x}-{y}.satellite.png" + ], + "tileSize": 256 + } + }, + "layers": [ + { + "id": "raster", + "type": "raster", + "source": "raster", + "paint": { + "raster-fade-duration": 0 + } + } + ] + } + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "raster": { + "type": "raster", + "tiles": [ + "local://tiles/{z}-{x}-{y}.satellite.png" + ], + "tileSize": 256 + } + }, + "layers": [] +} diff --git a/metrics/integration/render-tests/runtime-styling/set-style-layer-add-symbol/expected.png b/metrics/integration/render-tests/runtime-styling/set-style-layer-add-symbol/expected.png new file mode 100644 index 00000000000..feed2e457f1 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/set-style-layer-add-symbol/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/set-style-layer-add-symbol/style.json b/metrics/integration/render-tests/runtime-styling/set-style-layer-add-symbol/style.json new file mode 100644 index 00000000000..50b67e0418a --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/set-style-layer-add-symbol/style.json @@ -0,0 +1,63 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setStyle", + { + "version": 8, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "circle-12" + } + } + ] + } + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [] +} diff --git a/metrics/integration/render-tests/runtime-styling/set-style-layer-change-source-layer/expected.png b/metrics/integration/render-tests/runtime-styling/set-style-layer-change-source-layer/expected.png new file mode 100644 index 00000000000..686dd021c27 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/set-style-layer-change-source-layer/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/set-style-layer-change-source-layer/style.json b/metrics/integration/render-tests/runtime-styling/set-style-layer-change-source-layer/style.json new file mode 100644 index 00000000000..697dfb540f4 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/set-style-layer-change-source-layer/style.json @@ -0,0 +1,66 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setStyle", + { + "version": 8, + "transition": { + "duration": 0 + }, + "sources": { + "vector": { + "type": "vector", + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "layers": [ + { + "id": "fill", + "type": "fill", + "source": "vector", + "source-layer": "building", + "paint": { + "fill-antialias": false + } + } + ] + } + ], + [ + "wait" + ] + ] + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "transition": { + "duration": 0 + }, + "sources": { + "vector": { + "type": "vector", + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "layers": [ + { + "id": "fill", + "type": "fill", + "source": "vector", + "source-layer": "landuse" + } + ] +} diff --git a/metrics/integration/render-tests/runtime-styling/set-style-layer-change-source-type/expected.png b/metrics/integration/render-tests/runtime-styling/set-style-layer-change-source-type/expected.png new file mode 100644 index 00000000000..4cb77303dde Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/set-style-layer-change-source-type/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/set-style-layer-change-source-type/style.json b/metrics/integration/render-tests/runtime-styling/set-style-layer-change-source-type/style.json new file mode 100644 index 00000000000..1c6ca895613 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/set-style-layer-change-source-type/style.json @@ -0,0 +1,72 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setStyle", + { + "version": 8, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson" + } + ] + } + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "circle", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "dot.sdf" + }, + "paint": { + "icon-color": "red" + } + } + ] +} diff --git a/metrics/integration/render-tests/runtime-styling/set-style-layer-change-source/expected.png b/metrics/integration/render-tests/runtime-styling/set-style-layer-change-source/expected.png new file mode 100644 index 00000000000..4cb77303dde Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/set-style-layer-change-source/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/set-style-layer-change-source/style.json b/metrics/integration/render-tests/runtime-styling/set-style-layer-change-source/style.json new file mode 100644 index 00000000000..1ada888f45d --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/set-style-layer-change-source/style.json @@ -0,0 +1,84 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setStyle", + { + "version": 8, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + }, + "wrong-geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 5, + 5 + ] + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson" + } + ] + } + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + }, + "wrong-geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 5, + 5 + ] + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "wrong-geojson" + } + ] +} diff --git a/metrics/integration/render-tests/runtime-styling/set-style-layer-remove-background/expected.png b/metrics/integration/render-tests/runtime-styling/set-style-layer-remove-background/expected.png new file mode 100644 index 00000000000..724d17cd7d3 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/set-style-layer-remove-background/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/set-style-layer-remove-background/style.json b/metrics/integration/render-tests/runtime-styling/set-style-layer-remove-background/style.json new file mode 100644 index 00000000000..c639f6e9636 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/set-style-layer-remove-background/style.json @@ -0,0 +1,35 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setStyle", + { + "version": 8, + "transition": { + "duration": 0 + }, + "sources": {}, + "layers": [] + } + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": {}, + "layers": [ + { + "id": "background", + "type": "background" + } + ] +} diff --git a/metrics/integration/render-tests/runtime-styling/set-style-layer-remove-circle/expected.png b/metrics/integration/render-tests/runtime-styling/set-style-layer-remove-circle/expected.png new file mode 100644 index 00000000000..724d17cd7d3 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/set-style-layer-remove-circle/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/set-style-layer-remove-circle/style.json b/metrics/integration/render-tests/runtime-styling/set-style-layer-remove-circle/style.json new file mode 100644 index 00000000000..e91f59c6bd7 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/set-style-layer-remove-circle/style.json @@ -0,0 +1,58 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setStyle", + { + "version": 8, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "layers": [] + } + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson" + } + ] +} diff --git a/metrics/integration/render-tests/runtime-styling/set-style-layer-remove-fill/expected.png b/metrics/integration/render-tests/runtime-styling/set-style-layer-remove-fill/expected.png new file mode 100644 index 00000000000..724d17cd7d3 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/set-style-layer-remove-fill/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/set-style-layer-remove-fill/style.json b/metrics/integration/render-tests/runtime-styling/set-style-layer-remove-fill/style.json new file mode 100644 index 00000000000..44d21c5b5bb --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/set-style-layer-remove-fill/style.json @@ -0,0 +1,98 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setStyle", + { + "version": 8, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -10, + -10 + ], + [ + -10, + 10 + ], + [ + 10, + 10 + ], + [ + 10, + -10 + ], + [ + -10, + -10 + ] + ] + ] + } + } + }, + "layers": [] + } + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -10, + -10 + ], + [ + -10, + 10 + ], + [ + 10, + 10 + ], + [ + 10, + -10 + ], + [ + -10, + -10 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "fill", + "type": "fill", + "source": "geojson" + } + ] +} diff --git a/metrics/integration/render-tests/runtime-styling/set-style-layer-remove-line/expected.png b/metrics/integration/render-tests/runtime-styling/set-style-layer-remove-line/expected.png new file mode 100644 index 00000000000..724d17cd7d3 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/set-style-layer-remove-line/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/set-style-layer-remove-line/style.json b/metrics/integration/render-tests/runtime-styling/set-style-layer-remove-line/style.json new file mode 100644 index 00000000000..06a1e475aa2 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/set-style-layer-remove-line/style.json @@ -0,0 +1,86 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setStyle", + { + "version": 8, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "LineString", + "coordinates": [ + [ + -10, + 10 + ], + [ + 10, + 10 + ], + [ + -10, + -10 + ], + [ + 10, + -10 + ] + ] + } + } + }, + "layers": [] + } + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "LineString", + "coordinates": [ + [ + -10, + 10 + ], + [ + 10, + 10 + ], + [ + -10, + -10 + ], + [ + 10, + -10 + ] + ] + } + } + }, + "layers": [ + { + "id": "line", + "type": "line", + "source": "geojson" + } + ] +} diff --git a/metrics/integration/render-tests/runtime-styling/set-style-layer-remove-raster/expected.png b/metrics/integration/render-tests/runtime-styling/set-style-layer-remove-raster/expected.png new file mode 100644 index 00000000000..724d17cd7d3 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/set-style-layer-remove-raster/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/set-style-layer-remove-raster/style.json b/metrics/integration/render-tests/runtime-styling/set-style-layer-remove-raster/style.json new file mode 100644 index 00000000000..f796c160dcd --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/set-style-layer-remove-raster/style.json @@ -0,0 +1,55 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setStyle", + { + "version": 8, + "transition": { + "duration": 0 + }, + "sources": { + "raster": { + "type": "raster", + "tiles": [ + "local://tiles/{z}-{x}-{y}.satellite.png" + ], + "tileSize": 256 + } + }, + "layers": [] + } + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "raster": { + "type": "raster", + "tiles": [ + "local://tiles/{z}-{x}-{y}.satellite.png" + ], + "tileSize": 256 + } + }, + "layers": [ + { + "id": "raster", + "type": "raster", + "source": "raster", + "paint": { + "raster-fade-duration": 0 + } + } + ] +} diff --git a/metrics/integration/render-tests/runtime-styling/set-style-layer-remove-symbol/expected.png b/metrics/integration/render-tests/runtime-styling/set-style-layer-remove-symbol/expected.png new file mode 100644 index 00000000000..724d17cd7d3 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/set-style-layer-remove-symbol/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/set-style-layer-remove-symbol/style.json b/metrics/integration/render-tests/runtime-styling/set-style-layer-remove-symbol/style.json new file mode 100644 index 00000000000..df2c1d2b98c --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/set-style-layer-remove-symbol/style.json @@ -0,0 +1,63 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setStyle", + { + "version": 8, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [] + } + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "circle-12" + } + } + ] +} diff --git a/metrics/integration/render-tests/runtime-styling/set-style-layer-reorder/expected.png b/metrics/integration/render-tests/runtime-styling/set-style-layer-reorder/expected.png new file mode 100644 index 00000000000..4cb77303dde Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/set-style-layer-reorder/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/set-style-layer-reorder/style.json b/metrics/integration/render-tests/runtime-styling/set-style-layer-reorder/style.json new file mode 100644 index 00000000000..01744b764a2 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/set-style-layer-reorder/style.json @@ -0,0 +1,82 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setStyle", + { + "version": 8, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "layers": [ + { + "id": "circle-2", + "type": "circle", + "source": "geojson", + "paint": { + "circle-radius": 2, + "circle-color": "red" + } + }, + { + "id": "circle", + "type": "circle", + "source": "geojson" + } + ] + } + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson" + }, + { + "id": "circle-2", + "type": "circle", + "source": "geojson", + "paint": { + "circle-radius": 2, + "circle-color": "red" + } + } + ] +} diff --git a/metrics/integration/render-tests/runtime-styling/set-style-layout-property-default-to-literal/expected.png b/metrics/integration/render-tests/runtime-styling/set-style-layout-property-default-to-literal/expected.png new file mode 100644 index 00000000000..ecb49c45999 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/set-style-layout-property-default-to-literal/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/set-style-layout-property-default-to-literal/style.json b/metrics/integration/render-tests/runtime-styling/set-style-layout-property-default-to-literal/style.json new file mode 100644 index 00000000000..d71f1238947 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/set-style-layout-property-default-to-literal/style.json @@ -0,0 +1,69 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setStyle", + { + "version": 8, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "triangle-12" + } + } + ] + } + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson" + } + ] +} diff --git a/metrics/integration/render-tests/runtime-styling/set-style-layout-property-default-to-property-expression/expected.png b/metrics/integration/render-tests/runtime-styling/set-style-layout-property-default-to-property-expression/expected.png new file mode 100644 index 00000000000..d665d8dd5d6 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/set-style-layout-property-default-to-property-expression/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/set-style-layout-property-default-to-property-expression/style.json b/metrics/integration/render-tests/runtime-styling/set-style-layout-property-default-to-property-expression/style.json new file mode 100644 index 00000000000..deede4b3604 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/set-style-layout-property-default-to-property-expression/style.json @@ -0,0 +1,124 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setStyle", + { + "version": 8, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "rotate": -45 + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + "rotate": 45 + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "oneway", + "icon-rotate": [ + "get", + "rotate" + ] + } + } + ] + } + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "rotate": -45 + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + "rotate": 45 + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "oneway" + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/runtime-styling/set-style-layout-property-default-to-property-function/expected.png b/metrics/integration/render-tests/runtime-styling/set-style-layout-property-default-to-property-function/expected.png new file mode 100644 index 00000000000..d665d8dd5d6 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/set-style-layout-property-default-to-property-function/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/set-style-layout-property-default-to-property-function/style.json b/metrics/integration/render-tests/runtime-styling/set-style-layout-property-default-to-property-function/style.json new file mode 100644 index 00000000000..5300a2ed3e4 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/set-style-layout-property-default-to-property-function/style.json @@ -0,0 +1,124 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setStyle", + { + "version": 8, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "rotate": -45 + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + "rotate": 45 + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "oneway", + "icon-rotate": { + "type": "identity", + "property": "rotate" + } + } + } + ] + } + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "rotate": -45 + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + "rotate": 45 + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "oneway" + } + } + ] +} diff --git a/metrics/integration/render-tests/runtime-styling/set-style-layout-property-default-to-zoom-expression/expected.png b/metrics/integration/render-tests/runtime-styling/set-style-layout-property-default-to-zoom-expression/expected.png new file mode 100644 index 00000000000..feed2e457f1 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/set-style-layout-property-default-to-zoom-expression/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/set-style-layout-property-default-to-zoom-expression/style.json b/metrics/integration/render-tests/runtime-styling/set-style-layout-property-default-to-zoom-expression/style.json new file mode 100644 index 00000000000..800c2b63b5e --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/set-style-layout-property-default-to-zoom-expression/style.json @@ -0,0 +1,77 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setStyle", + { + "version": 8, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": [ + "step", + [ + "zoom" + ], + "circle-12", + 10, + "triangle-12" + ] + } + } + ] + } + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson" + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/runtime-styling/set-style-layout-property-default-to-zoom-function/expected.png b/metrics/integration/render-tests/runtime-styling/set-style-layout-property-default-to-zoom-function/expected.png new file mode 100644 index 00000000000..feed2e457f1 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/set-style-layout-property-default-to-zoom-function/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/set-style-layout-property-default-to-zoom-function/style.json b/metrics/integration/render-tests/runtime-styling/set-style-layout-property-default-to-zoom-function/style.json new file mode 100644 index 00000000000..67789efcab5 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/set-style-layout-property-default-to-zoom-function/style.json @@ -0,0 +1,80 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setStyle", + { + "version": 8, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": { + "stops": [ + [ + 0, + "circle-12" + ], + [ + 10, + "triangle-12" + ] + ] + } + } + } + ] + } + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson" + } + ] +} diff --git a/metrics/integration/render-tests/runtime-styling/set-style-layout-property-literal-to-default/expected.png b/metrics/integration/render-tests/runtime-styling/set-style-layout-property-literal-to-default/expected.png new file mode 100644 index 00000000000..724d17cd7d3 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/set-style-layout-property-literal-to-default/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/set-style-layout-property-literal-to-default/style.json b/metrics/integration/render-tests/runtime-styling/set-style-layout-property-literal-to-default/style.json new file mode 100644 index 00000000000..33bd8168424 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/set-style-layout-property-literal-to-default/style.json @@ -0,0 +1,70 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setStyle", + { + "version": 8, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": {} + } + ] + } + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "triangle-12" + } + } + ] +} diff --git a/metrics/integration/render-tests/runtime-styling/set-style-layout-property-literal-to-property-expression/expected.png b/metrics/integration/render-tests/runtime-styling/set-style-layout-property-literal-to-property-expression/expected.png new file mode 100644 index 00000000000..d665d8dd5d6 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/set-style-layout-property-literal-to-property-expression/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/set-style-layout-property-literal-to-property-expression/style.json b/metrics/integration/render-tests/runtime-styling/set-style-layout-property-literal-to-property-expression/style.json new file mode 100644 index 00000000000..22628a297bc --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/set-style-layout-property-literal-to-property-expression/style.json @@ -0,0 +1,125 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setStyle", + { + "version": 8, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "rotate": -45 + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + "rotate": 45 + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "oneway", + "icon-rotate": [ + "get", + "rotate" + ] + } + } + ] + } + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "rotate": -45 + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + "rotate": 45 + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "oneway", + "icon-rotate": 90 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/runtime-styling/set-style-layout-property-literal-to-property-function/expected.png b/metrics/integration/render-tests/runtime-styling/set-style-layout-property-literal-to-property-function/expected.png new file mode 100644 index 00000000000..d665d8dd5d6 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/set-style-layout-property-literal-to-property-function/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/set-style-layout-property-literal-to-property-function/style.json b/metrics/integration/render-tests/runtime-styling/set-style-layout-property-literal-to-property-function/style.json new file mode 100644 index 00000000000..e2ab6267fed --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/set-style-layout-property-literal-to-property-function/style.json @@ -0,0 +1,125 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setStyle", + { + "version": 8, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "rotate": -45 + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + "rotate": 45 + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "oneway", + "icon-rotate": { + "type": "identity", + "property": "rotate" + } + } + } + ] + } + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "rotate": -45 + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + "rotate": 45 + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "oneway", + "icon-rotate": 90 + } + } + ] +} diff --git a/metrics/integration/render-tests/runtime-styling/set-style-layout-property-literal-to-zoom-expression/expected.png b/metrics/integration/render-tests/runtime-styling/set-style-layout-property-literal-to-zoom-expression/expected.png new file mode 100644 index 00000000000..feed2e457f1 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/set-style-layout-property-literal-to-zoom-expression/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/set-style-layout-property-literal-to-zoom-expression/style.json b/metrics/integration/render-tests/runtime-styling/set-style-layout-property-literal-to-zoom-expression/style.json new file mode 100644 index 00000000000..a8dd678d889 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/set-style-layout-property-literal-to-zoom-expression/style.json @@ -0,0 +1,80 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setStyle", + { + "version": 8, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": [ + "step", + [ + "zoom" + ], + "circle-12", + 10, + "triangle-12" + ] + } + } + ] + } + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "triangle-12" + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/runtime-styling/set-style-layout-property-literal-to-zoom-function/expected.png b/metrics/integration/render-tests/runtime-styling/set-style-layout-property-literal-to-zoom-function/expected.png new file mode 100644 index 00000000000..feed2e457f1 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/set-style-layout-property-literal-to-zoom-function/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/set-style-layout-property-literal-to-zoom-function/style.json b/metrics/integration/render-tests/runtime-styling/set-style-layout-property-literal-to-zoom-function/style.json new file mode 100644 index 00000000000..f827a535e6a --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/set-style-layout-property-literal-to-zoom-function/style.json @@ -0,0 +1,83 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setStyle", + { + "version": 8, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": { + "stops": [ + [ + 0, + "circle-12" + ], + [ + 10, + "triangle-12" + ] + ] + } + } + } + ] + } + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "triangle-12" + } + } + ] +} diff --git a/metrics/integration/render-tests/runtime-styling/set-style-layout-property-property-expression-to-default/expected.png b/metrics/integration/render-tests/runtime-styling/set-style-layout-property-property-expression-to-default/expected.png new file mode 100644 index 00000000000..5b91fba2068 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/set-style-layout-property-property-expression-to-default/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/set-style-layout-property-property-expression-to-default/style.json b/metrics/integration/render-tests/runtime-styling/set-style-layout-property-property-expression-to-default/style.json new file mode 100644 index 00000000000..79dfc3dfd2e --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/set-style-layout-property-property-expression-to-default/style.json @@ -0,0 +1,124 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setStyle", + { + "version": 8, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "rotate": -45 + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + "rotate": 45 + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "oneway" + } + } + ] + } + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "rotate": -45 + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + "rotate": 45 + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "oneway", + "icon-rotate": [ + "get", + "rotate" + ] + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/runtime-styling/set-style-layout-property-property-expression-to-literal/expected.png b/metrics/integration/render-tests/runtime-styling/set-style-layout-property-property-expression-to-literal/expected.png new file mode 100644 index 00000000000..1d9050047f3 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/set-style-layout-property-property-expression-to-literal/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/set-style-layout-property-property-expression-to-literal/style.json b/metrics/integration/render-tests/runtime-styling/set-style-layout-property-property-expression-to-literal/style.json new file mode 100644 index 00000000000..bd44eb4e0c3 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/set-style-layout-property-property-expression-to-literal/style.json @@ -0,0 +1,125 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setStyle", + { + "version": 8, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "rotate": -45 + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + "rotate": 45 + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "oneway", + "icon-rotate": 90 + } + } + ] + } + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "rotate": -45 + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + "rotate": 45 + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "oneway", + "icon-rotate": [ + "get", + "rotate" + ] + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/runtime-styling/set-style-layout-property-property-function-to-default/expected.png b/metrics/integration/render-tests/runtime-styling/set-style-layout-property-property-function-to-default/expected.png new file mode 100644 index 00000000000..5b91fba2068 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/set-style-layout-property-property-function-to-default/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/set-style-layout-property-property-function-to-default/style.json b/metrics/integration/render-tests/runtime-styling/set-style-layout-property-property-function-to-default/style.json new file mode 100644 index 00000000000..8e27f2db92f --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/set-style-layout-property-property-function-to-default/style.json @@ -0,0 +1,124 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setStyle", + { + "version": 8, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "rotate": -45 + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + "rotate": 45 + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "oneway" + } + } + ] + } + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "rotate": -45 + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + "rotate": 45 + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "oneway", + "icon-rotate": { + "type": "identity", + "property": "rotate" + } + } + } + ] +} diff --git a/metrics/integration/render-tests/runtime-styling/set-style-layout-property-property-function-to-literal/expected.png b/metrics/integration/render-tests/runtime-styling/set-style-layout-property-property-function-to-literal/expected.png new file mode 100644 index 00000000000..1d9050047f3 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/set-style-layout-property-property-function-to-literal/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/set-style-layout-property-property-function-to-literal/style.json b/metrics/integration/render-tests/runtime-styling/set-style-layout-property-property-function-to-literal/style.json new file mode 100644 index 00000000000..f80c31bf730 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/set-style-layout-property-property-function-to-literal/style.json @@ -0,0 +1,125 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setStyle", + { + "version": 8, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "rotate": -45 + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + "rotate": 45 + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "oneway", + "icon-rotate": 90 + } + } + ] + } + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "rotate": -45 + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + "rotate": 45 + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "oneway", + "icon-rotate": { + "type": "identity", + "property": "rotate" + } + } + } + ] +} diff --git a/metrics/integration/render-tests/runtime-styling/set-style-layout-property-zoom-expression-to-default/expected.png b/metrics/integration/render-tests/runtime-styling/set-style-layout-property-zoom-expression-to-default/expected.png new file mode 100644 index 00000000000..724d17cd7d3 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/set-style-layout-property-zoom-expression-to-default/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/set-style-layout-property-zoom-expression-to-default/style.json b/metrics/integration/render-tests/runtime-styling/set-style-layout-property-zoom-expression-to-default/style.json new file mode 100644 index 00000000000..0bf9a4535f3 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/set-style-layout-property-zoom-expression-to-default/style.json @@ -0,0 +1,78 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setStyle", + { + "version": 8, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": {} + } + ] + } + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": [ + "step", + [ + "zoom" + ], + "circle-12", + 10, + "triangle-12" + ] + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/runtime-styling/set-style-layout-property-zoom-expression-to-literal/expected.png b/metrics/integration/render-tests/runtime-styling/set-style-layout-property-zoom-expression-to-literal/expected.png new file mode 100644 index 00000000000..ecb49c45999 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/set-style-layout-property-zoom-expression-to-literal/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/set-style-layout-property-zoom-expression-to-literal/style.json b/metrics/integration/render-tests/runtime-styling/set-style-layout-property-zoom-expression-to-literal/style.json new file mode 100644 index 00000000000..61c317e3597 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/set-style-layout-property-zoom-expression-to-literal/style.json @@ -0,0 +1,80 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setStyle", + { + "version": 8, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "triangle-12" + } + } + ] + } + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": [ + "step", + [ + "zoom" + ], + "circle-12", + 10, + "triangle-12" + ] + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/runtime-styling/set-style-layout-property-zoom-function-to-default/expected.png b/metrics/integration/render-tests/runtime-styling/set-style-layout-property-zoom-function-to-default/expected.png new file mode 100644 index 00000000000..724d17cd7d3 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/set-style-layout-property-zoom-function-to-default/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/set-style-layout-property-zoom-function-to-default/style.json b/metrics/integration/render-tests/runtime-styling/set-style-layout-property-zoom-function-to-default/style.json new file mode 100644 index 00000000000..6e7fd90ac17 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/set-style-layout-property-zoom-function-to-default/style.json @@ -0,0 +1,81 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setStyle", + { + "version": 8, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": {} + } + ] + } + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": { + "stops": [ + [ + 0, + "circle-12" + ], + [ + 10, + "triangle-12" + ] + ] + } + } + } + ] +} diff --git a/metrics/integration/render-tests/runtime-styling/set-style-layout-property-zoom-function-to-literal/expected.png b/metrics/integration/render-tests/runtime-styling/set-style-layout-property-zoom-function-to-literal/expected.png new file mode 100644 index 00000000000..ecb49c45999 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/set-style-layout-property-zoom-function-to-literal/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/set-style-layout-property-zoom-function-to-literal/style.json b/metrics/integration/render-tests/runtime-styling/set-style-layout-property-zoom-function-to-literal/style.json new file mode 100644 index 00000000000..e5af9f8b00d --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/set-style-layout-property-zoom-function-to-literal/style.json @@ -0,0 +1,83 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setStyle", + { + "version": 8, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "triangle-12" + } + } + ] + } + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": { + "stops": [ + [ + 0, + "circle-12" + ], + [ + 10, + "triangle-12" + ] + ] + } + } + } + ] +} diff --git a/metrics/integration/render-tests/runtime-styling/set-style-paint-property-default-to-literal/expected.png b/metrics/integration/render-tests/runtime-styling/set-style-paint-property-default-to-literal/expected.png new file mode 100644 index 00000000000..3a2d7006298 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/set-style-paint-property-default-to-literal/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/set-style-paint-property-default-to-literal/style.json b/metrics/integration/render-tests/runtime-styling/set-style-paint-property-default-to-literal/style.json new file mode 100644 index 00000000000..8ed9f1b1059 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/set-style-paint-property-default-to-literal/style.json @@ -0,0 +1,43 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setStyle", + { + "version": 8, + "transition": { + "duration": 0 + }, + "sources": {}, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "red" + } + } + ] + } + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": {}, + "layers": [ + { + "id": "background", + "type": "background" + } + ] +} diff --git a/metrics/integration/render-tests/runtime-styling/set-style-paint-property-default-to-property-expression/expected.png b/metrics/integration/render-tests/runtime-styling/set-style-paint-property-default-to-property-expression/expected.png new file mode 100644 index 00000000000..b62d1b2ece7 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/set-style-paint-property-default-to-property-expression/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/set-style-paint-property-default-to-property-expression/style.json b/metrics/integration/render-tests/runtime-styling/set-style-paint-property-default-to-property-expression/style.json new file mode 100644 index 00000000000..dc592dc1227 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/set-style-paint-property-default-to-property-expression/style.json @@ -0,0 +1,118 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setStyle", + { + "version": 8, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "radius": 10 + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + "radius": 15 + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson", + "paint": { + "circle-radius": [ + "get", + "radius" + ] + } + } + ] + } + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "radius": 10 + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + "radius": 15 + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson" + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/runtime-styling/set-style-paint-property-default-to-property-function/expected.png b/metrics/integration/render-tests/runtime-styling/set-style-paint-property-default-to-property-function/expected.png new file mode 100644 index 00000000000..b62d1b2ece7 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/set-style-paint-property-default-to-property-function/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/set-style-paint-property-default-to-property-function/style.json b/metrics/integration/render-tests/runtime-styling/set-style-paint-property-default-to-property-function/style.json new file mode 100644 index 00000000000..496ecf3167f --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/set-style-paint-property-default-to-property-function/style.json @@ -0,0 +1,118 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setStyle", + { + "version": 8, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "radius": 10 + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + "radius": 15 + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson", + "paint": { + "circle-radius": { + "type": "identity", + "property": "radius" + } + } + } + ] + } + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "radius": 10 + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + "radius": 15 + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson" + } + ] +} diff --git a/metrics/integration/render-tests/runtime-styling/set-style-paint-property-default-to-zoom-expression/expected.png b/metrics/integration/render-tests/runtime-styling/set-style-paint-property-default-to-zoom-expression/expected.png new file mode 100644 index 00000000000..cc46431ca9e Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/set-style-paint-property-default-to-zoom-expression/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/set-style-paint-property-default-to-zoom-expression/style.json b/metrics/integration/render-tests/runtime-styling/set-style-paint-property-default-to-zoom-expression/style.json new file mode 100644 index 00000000000..e60964fed88 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/set-style-paint-property-default-to-zoom-expression/style.json @@ -0,0 +1,56 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setStyle", + { + "version": 8, + "transition": { + "duration": 0 + }, + "sources": {}, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": [ + "interpolate", + [ + "exponential", + 1 + ], + [ + "zoom" + ], + 0, + "blue", + 10, + "white" + ] + } + } + ] + } + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": {}, + "layers": [ + { + "id": "background", + "type": "background" + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/runtime-styling/set-style-paint-property-default-to-zoom-function/expected.png b/metrics/integration/render-tests/runtime-styling/set-style-paint-property-default-to-zoom-function/expected.png new file mode 100644 index 00000000000..cc46431ca9e Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/set-style-paint-property-default-to-zoom-function/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/set-style-paint-property-default-to-zoom-function/style.json b/metrics/integration/render-tests/runtime-styling/set-style-paint-property-default-to-zoom-function/style.json new file mode 100644 index 00000000000..e1f33a3c4c1 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/set-style-paint-property-default-to-zoom-function/style.json @@ -0,0 +1,54 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setStyle", + { + "version": 8, + "transition": { + "duration": 0 + }, + "sources": {}, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": { + "stops": [ + [ + 0, + "blue" + ], + [ + 10, + "white" + ] + ] + } + } + } + ] + } + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": {}, + "layers": [ + { + "id": "background", + "type": "background" + } + ] +} diff --git a/metrics/integration/render-tests/runtime-styling/set-style-paint-property-fill-flat-to-extrude/expected.png b/metrics/integration/render-tests/runtime-styling/set-style-paint-property-fill-flat-to-extrude/expected.png new file mode 100644 index 00000000000..37586fe09be Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/set-style-paint-property-fill-flat-to-extrude/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/set-style-paint-property-fill-flat-to-extrude/style.json b/metrics/integration/render-tests/runtime-styling/set-style-paint-property-fill-flat-to-extrude/style.json new file mode 100644 index 00000000000..88637b70e01 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/set-style-paint-property-fill-flat-to-extrude/style.json @@ -0,0 +1,107 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setStyle", + { + "version": 8, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -10, + -10 + ], + [ + -10, + 10 + ], + [ + 10, + 10 + ], + [ + 10, + -10 + ], + [ + -10, + -10 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "fill-extrusion", + "type": "fill-extrusion", + "source": "geojson", + "paint": { + "fill-extrusion-height": 10 + } + } + ] + } + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Polygon", + "coordinates": [ + [ + [ + -10, + -10 + ], + [ + -10, + 10 + ], + [ + 10, + 10 + ], + [ + 10, + -10 + ], + [ + -10, + -10 + ] + ] + ] + } + } + }, + "layers": [ + { + "id": "fill-extrusion", + "type": "fill-extrusion", + "source": "geojson" + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/runtime-styling/set-style-paint-property-literal-to-default/expected.png b/metrics/integration/render-tests/runtime-styling/set-style-paint-property-literal-to-default/expected.png new file mode 100644 index 00000000000..d58554e96e6 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/set-style-paint-property-literal-to-default/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/set-style-paint-property-literal-to-default/style.json b/metrics/integration/render-tests/runtime-styling/set-style-paint-property-literal-to-default/style.json new file mode 100644 index 00000000000..e3e6350d41a --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/set-style-paint-property-literal-to-default/style.json @@ -0,0 +1,44 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setStyle", + { + "version": 8, + "transition": { + "duration": 0 + }, + "sources": {}, + "layers": [ + { + "id": "background", + "type": "background", + "paint": {} + } + ] + } + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": {}, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "red" + } + } + ] +} diff --git a/metrics/integration/render-tests/runtime-styling/set-style-paint-property-literal-to-expression/expected.png b/metrics/integration/render-tests/runtime-styling/set-style-paint-property-literal-to-expression/expected.png new file mode 100644 index 00000000000..cc46431ca9e Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/set-style-paint-property-literal-to-expression/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/set-style-paint-property-literal-to-expression/style.json b/metrics/integration/render-tests/runtime-styling/set-style-paint-property-literal-to-expression/style.json new file mode 100644 index 00000000000..b7cbb92d4b1 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/set-style-paint-property-literal-to-expression/style.json @@ -0,0 +1,59 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setStyle", + { + "version": 8, + "transition": { + "duration": 0 + }, + "sources": {}, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": [ + "interpolate", + [ + "exponential", + 1 + ], + [ + "zoom" + ], + 0, + "blue", + 10, + "white" + ] + } + } + ] + } + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": {}, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "red" + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/runtime-styling/set-style-paint-property-literal-to-function/expected.png b/metrics/integration/render-tests/runtime-styling/set-style-paint-property-literal-to-function/expected.png new file mode 100644 index 00000000000..cc46431ca9e Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/set-style-paint-property-literal-to-function/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/set-style-paint-property-literal-to-function/style.json b/metrics/integration/render-tests/runtime-styling/set-style-paint-property-literal-to-function/style.json new file mode 100644 index 00000000000..549fc9046dc --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/set-style-paint-property-literal-to-function/style.json @@ -0,0 +1,57 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setStyle", + { + "version": 8, + "transition": { + "duration": 0 + }, + "sources": {}, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": { + "stops": [ + [ + 0, + "blue" + ], + [ + 10, + "white" + ] + ] + } + } + } + ] + } + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": {}, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "red" + } + } + ] +} diff --git a/metrics/integration/render-tests/runtime-styling/set-style-paint-property-literal-to-property-expression/expected.png b/metrics/integration/render-tests/runtime-styling/set-style-paint-property-literal-to-property-expression/expected.png new file mode 100644 index 00000000000..b62d1b2ece7 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/set-style-paint-property-literal-to-property-expression/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/set-style-paint-property-literal-to-property-expression/style.json b/metrics/integration/render-tests/runtime-styling/set-style-paint-property-literal-to-property-expression/style.json new file mode 100644 index 00000000000..70a761b6a2d --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/set-style-paint-property-literal-to-property-expression/style.json @@ -0,0 +1,121 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setStyle", + { + "version": 8, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "radius": 10 + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + "radius": 15 + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson", + "paint": { + "circle-radius": [ + "get", + "radius" + ] + } + } + ] + } + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "radius": 10 + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + "radius": 15 + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson", + "paint": { + "circle-radius": 1 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/runtime-styling/set-style-paint-property-literal-to-property-function/expected.png b/metrics/integration/render-tests/runtime-styling/set-style-paint-property-literal-to-property-function/expected.png new file mode 100644 index 00000000000..b62d1b2ece7 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/set-style-paint-property-literal-to-property-function/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/set-style-paint-property-literal-to-property-function/style.json b/metrics/integration/render-tests/runtime-styling/set-style-paint-property-literal-to-property-function/style.json new file mode 100644 index 00000000000..0ba3874eb59 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/set-style-paint-property-literal-to-property-function/style.json @@ -0,0 +1,121 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setStyle", + { + "version": 8, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "radius": 10 + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + "radius": 15 + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson", + "paint": { + "circle-radius": { + "type": "identity", + "property": "radius" + } + } + } + ] + } + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "radius": 10 + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + "radius": 15 + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson", + "paint": { + "circle-radius": 1 + } + } + ] +} diff --git a/metrics/integration/render-tests/runtime-styling/set-style-paint-property-property-expression-to-default/expected.png b/metrics/integration/render-tests/runtime-styling/set-style-paint-property-property-expression-to-default/expected.png new file mode 100644 index 00000000000..62c8dbcada2 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/set-style-paint-property-property-expression-to-default/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/set-style-paint-property-property-expression-to-default/style.json b/metrics/integration/render-tests/runtime-styling/set-style-paint-property-property-expression-to-default/style.json new file mode 100644 index 00000000000..0a7363fc1d6 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/set-style-paint-property-property-expression-to-default/style.json @@ -0,0 +1,119 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setStyle", + { + "version": 8, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "radius": 10 + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + "radius": 15 + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson", + "paint": {} + } + ] + } + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "radius": 10 + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + "radius": 15 + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson", + "paint": { + "circle-radius": [ + "get", + "radius" + ] + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/runtime-styling/set-style-paint-property-property-expression-to-literal/expected.png b/metrics/integration/render-tests/runtime-styling/set-style-paint-property-property-expression-to-literal/expected.png new file mode 100644 index 00000000000..b48c32b3e5f Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/set-style-paint-property-property-expression-to-literal/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/set-style-paint-property-property-expression-to-literal/style.json b/metrics/integration/render-tests/runtime-styling/set-style-paint-property-property-expression-to-literal/style.json new file mode 100644 index 00000000000..ade9d989710 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/set-style-paint-property-property-expression-to-literal/style.json @@ -0,0 +1,121 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setStyle", + { + "version": 8, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "radius": 10 + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + "radius": 15 + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson", + "paint": { + "circle-radius": 1 + } + } + ] + } + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "radius": 10 + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + "radius": 15 + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson", + "paint": { + "circle-radius": [ + "get", + "radius" + ] + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/runtime-styling/set-style-paint-property-property-function-to-default/expected.png b/metrics/integration/render-tests/runtime-styling/set-style-paint-property-property-function-to-default/expected.png new file mode 100644 index 00000000000..62c8dbcada2 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/set-style-paint-property-property-function-to-default/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/set-style-paint-property-property-function-to-default/style.json b/metrics/integration/render-tests/runtime-styling/set-style-paint-property-property-function-to-default/style.json new file mode 100644 index 00000000000..587b39dc1bf --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/set-style-paint-property-property-function-to-default/style.json @@ -0,0 +1,119 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setStyle", + { + "version": 8, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "radius": 10 + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + "radius": 15 + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson", + "paint": {} + } + ] + } + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "radius": 10 + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + "radius": 15 + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson", + "paint": { + "circle-radius": { + "type": "identity", + "property": "radius" + } + } + } + ] +} diff --git a/metrics/integration/render-tests/runtime-styling/set-style-paint-property-property-function-to-literal/expected.png b/metrics/integration/render-tests/runtime-styling/set-style-paint-property-property-function-to-literal/expected.png new file mode 100644 index 00000000000..b48c32b3e5f Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/set-style-paint-property-property-function-to-literal/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/set-style-paint-property-property-function-to-literal/style.json b/metrics/integration/render-tests/runtime-styling/set-style-paint-property-property-function-to-literal/style.json new file mode 100644 index 00000000000..60cf5cb4df1 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/set-style-paint-property-property-function-to-literal/style.json @@ -0,0 +1,121 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setStyle", + { + "version": 8, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "radius": 10 + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + "radius": 15 + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson", + "paint": { + "circle-radius": 1 + } + } + ] + } + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "radius": 10 + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + "radius": 15 + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson", + "paint": { + "circle-radius": { + "type": "identity", + "property": "radius" + } + } + } + ] +} diff --git a/metrics/integration/render-tests/runtime-styling/set-style-paint-property-zoom-expression-to-default/expected.png b/metrics/integration/render-tests/runtime-styling/set-style-paint-property-zoom-expression-to-default/expected.png new file mode 100644 index 00000000000..d58554e96e6 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/set-style-paint-property-zoom-expression-to-default/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/set-style-paint-property-zoom-expression-to-default/style.json b/metrics/integration/render-tests/runtime-styling/set-style-paint-property-zoom-expression-to-default/style.json new file mode 100644 index 00000000000..1b02003bee1 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/set-style-paint-property-zoom-expression-to-default/style.json @@ -0,0 +1,57 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setStyle", + { + "version": 8, + "transition": { + "duration": 0 + }, + "sources": {}, + "layers": [ + { + "id": "background", + "type": "background", + "paint": {} + } + ] + } + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": {}, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": [ + "interpolate", + [ + "exponential", + 1 + ], + [ + "zoom" + ], + 0, + "blue", + 10, + "white" + ] + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/runtime-styling/set-style-paint-property-zoom-expression-to-literal/expected.png b/metrics/integration/render-tests/runtime-styling/set-style-paint-property-zoom-expression-to-literal/expected.png new file mode 100644 index 00000000000..3a2d7006298 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/set-style-paint-property-zoom-expression-to-literal/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/set-style-paint-property-zoom-expression-to-literal/style.json b/metrics/integration/render-tests/runtime-styling/set-style-paint-property-zoom-expression-to-literal/style.json new file mode 100644 index 00000000000..1aa845aed21 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/set-style-paint-property-zoom-expression-to-literal/style.json @@ -0,0 +1,59 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setStyle", + { + "version": 8, + "transition": { + "duration": 0 + }, + "sources": {}, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "red" + } + } + ] + } + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": {}, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": [ + "interpolate", + [ + "exponential", + 1 + ], + [ + "zoom" + ], + 0, + "blue", + 10, + "white" + ] + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/runtime-styling/set-style-paint-property-zoom-function-to-default/expected.png b/metrics/integration/render-tests/runtime-styling/set-style-paint-property-zoom-function-to-default/expected.png new file mode 100644 index 00000000000..d58554e96e6 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/set-style-paint-property-zoom-function-to-default/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/set-style-paint-property-zoom-function-to-default/style.json b/metrics/integration/render-tests/runtime-styling/set-style-paint-property-zoom-function-to-default/style.json new file mode 100644 index 00000000000..3a4f5f933f5 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/set-style-paint-property-zoom-function-to-default/style.json @@ -0,0 +1,55 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setStyle", + { + "version": 8, + "transition": { + "duration": 0 + }, + "sources": {}, + "layers": [ + { + "id": "background", + "type": "background", + "paint": {} + } + ] + } + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": {}, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": { + "stops": [ + [ + 0, + "blue" + ], + [ + 10, + "white" + ] + ] + } + } + } + ] +} diff --git a/metrics/integration/render-tests/runtime-styling/set-style-paint-property-zoom-function-to-literal/expected.png b/metrics/integration/render-tests/runtime-styling/set-style-paint-property-zoom-function-to-literal/expected.png new file mode 100644 index 00000000000..3a2d7006298 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/set-style-paint-property-zoom-function-to-literal/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/set-style-paint-property-zoom-function-to-literal/style.json b/metrics/integration/render-tests/runtime-styling/set-style-paint-property-zoom-function-to-literal/style.json new file mode 100644 index 00000000000..023520cda7d --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/set-style-paint-property-zoom-function-to-literal/style.json @@ -0,0 +1,57 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setStyle", + { + "version": 8, + "transition": { + "duration": 0 + }, + "sources": {}, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "red" + } + } + ] + } + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": {}, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": { + "stops": [ + [ + 0, + "blue" + ], + [ + 10, + "white" + ] + ] + } + } + } + ] +} diff --git a/metrics/integration/render-tests/runtime-styling/set-style-source-add-geojson-inline/expected.png b/metrics/integration/render-tests/runtime-styling/set-style-source-add-geojson-inline/expected.png new file mode 100644 index 00000000000..4cb77303dde Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/set-style-source-add-geojson-inline/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/set-style-source-add-geojson-inline/style.json b/metrics/integration/render-tests/runtime-styling/set-style-source-add-geojson-inline/style.json new file mode 100644 index 00000000000..9868354ca46 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/set-style-source-add-geojson-inline/style.json @@ -0,0 +1,47 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setStyle", + { + "version": 8, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson" + } + ] + } + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": {}, + "layers": [] +} diff --git a/metrics/integration/render-tests/runtime-styling/set-style-source-add-geojson-url/expected.png b/metrics/integration/render-tests/runtime-styling/set-style-source-add-geojson-url/expected.png new file mode 100644 index 00000000000..4cb77303dde Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/set-style-source-add-geojson-url/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/set-style-source-add-geojson-url/style.json b/metrics/integration/render-tests/runtime-styling/set-style-source-add-geojson-url/style.json new file mode 100644 index 00000000000..a85e016f74a --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/set-style-source-add-geojson-url/style.json @@ -0,0 +1,41 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setStyle", + { + "version": 8, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": "local://geojson/point.json" + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson" + } + ] + } + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": {}, + "layers": [] +} diff --git a/metrics/integration/render-tests/runtime-styling/set-style-source-add-raster-inline/expected.png b/metrics/integration/render-tests/runtime-styling/set-style-source-add-raster-inline/expected.png new file mode 100644 index 00000000000..1c1ef5d4c64 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/set-style-source-add-raster-inline/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/set-style-source-add-raster-inline/style.json b/metrics/integration/render-tests/runtime-styling/set-style-source-add-raster-inline/style.json new file mode 100644 index 00000000000..4eea3295026 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/set-style-source-add-raster-inline/style.json @@ -0,0 +1,47 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setStyle", + { + "version": 8, + "transition": { + "duration": 0 + }, + "sources": { + "raster": { + "type": "raster", + "tiles": [ + "local://tiles/{z}-{x}-{y}.satellite.png" + ], + "tileSize": 256 + } + }, + "layers": [ + { + "id": "raster", + "type": "raster", + "source": "raster", + "paint": { + "raster-fade-duration": 0 + } + } + ] + } + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": {}, + "layers": [] +} diff --git a/metrics/integration/render-tests/runtime-styling/set-style-source-add-raster-url/expected.png b/metrics/integration/render-tests/runtime-styling/set-style-source-add-raster-url/expected.png new file mode 100644 index 00000000000..1c1ef5d4c64 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/set-style-source-add-raster-url/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/set-style-source-add-raster-url/style.json b/metrics/integration/render-tests/runtime-styling/set-style-source-add-raster-url/style.json new file mode 100644 index 00000000000..fc51c597bf8 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/set-style-source-add-raster-url/style.json @@ -0,0 +1,45 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setStyle", + { + "version": 8, + "transition": { + "duration": 0 + }, + "sources": { + "raster": { + "type": "raster", + "url": "local://tilesets/raster.json", + "tileSize": 256 + } + }, + "layers": [ + { + "id": "raster", + "type": "raster", + "source": "raster", + "paint": { + "raster-fade-duration": 0 + } + } + ] + } + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": {}, + "layers": [] +} diff --git a/metrics/integration/render-tests/runtime-styling/set-style-source-add-vector-inline/expected.png b/metrics/integration/render-tests/runtime-styling/set-style-source-add-vector-inline/expected.png new file mode 100644 index 00000000000..f8db1f36965 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/set-style-source-add-vector-inline/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/set-style-source-add-vector-inline/style.json b/metrics/integration/render-tests/runtime-styling/set-style-source-add-vector-inline/style.json new file mode 100644 index 00000000000..785dc4364be --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/set-style-source-add-vector-inline/style.json @@ -0,0 +1,44 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setStyle", + { + "version": 8, + "transition": { + "duration": 0 + }, + "sources": { + "vector": { + "type": "vector", + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "layers": [ + { + "id": "fill", + "type": "fill", + "source": "vector", + "source-layer": "water" + } + ] + } + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": {}, + "layers": [] +} diff --git a/metrics/integration/render-tests/runtime-styling/set-style-source-add-vector-url/expected.png b/metrics/integration/render-tests/runtime-styling/set-style-source-add-vector-url/expected.png new file mode 100644 index 00000000000..f8db1f36965 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/set-style-source-add-vector-url/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/set-style-source-add-vector-url/style.json b/metrics/integration/render-tests/runtime-styling/set-style-source-add-vector-url/style.json new file mode 100644 index 00000000000..7655b72c7e4 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/set-style-source-add-vector-url/style.json @@ -0,0 +1,42 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setStyle", + { + "version": 8, + "transition": { + "duration": 0 + }, + "sources": { + "vector": { + "type": "vector", + "url": "local://tilesets/vector.json" + } + }, + "layers": [ + { + "id": "fill", + "type": "fill", + "source": "vector", + "source-layer": "water" + } + ] + } + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": {}, + "layers": [] +} diff --git a/metrics/integration/render-tests/runtime-styling/set-style-source-update/expected.png b/metrics/integration/render-tests/runtime-styling/set-style-source-update/expected.png new file mode 100644 index 00000000000..4cb77303dde Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/set-style-source-update/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/set-style-source-update/style.json b/metrics/integration/render-tests/runtime-styling/set-style-source-update/style.json new file mode 100644 index 00000000000..7f1891bde42 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/set-style-source-update/style.json @@ -0,0 +1,64 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setStyle", + { + "version": 8, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson" + } + ] + } + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 10, + 10 + ] + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson" + } + ] +} diff --git a/metrics/integration/render-tests/runtime-styling/set-style-sprite/expected.png b/metrics/integration/render-tests/runtime-styling/set-style-sprite/expected.png new file mode 100644 index 00000000000..21812ce379a Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/set-style-sprite/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/set-style-sprite/style.json b/metrics/integration/render-tests/runtime-styling/set-style-sprite/style.json new file mode 100644 index 00000000000..a17bf7a3dc6 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/set-style-sprite/style.json @@ -0,0 +1,107 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256, + "operations": [ + [ + "setStyle", + { + "version": 8, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "literal", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "filter": [ + "==", + "maki", + "restaurant" + ], + "layout": { + "symbol-placement": "point", + "icon-allow-overlap": true, + "icon-ignore-placement": true, + "icon-image": "restaurant-12" + }, + "paint": { + "icon-opacity": 1 + } + } + ] + } + ], + [ + "wait" + ] + ] + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "sprite": "local://sprites/emerald", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "literal", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "filter": [ + "==", + "maki", + "restaurant" + ], + "layout": { + "symbol-placement": "point", + "icon-allow-overlap": true, + "icon-ignore-placement": true, + "icon-image": "generic_icon" + }, + "paint": { + "icon-opacity": 1 + } + } + ] +} diff --git a/metrics/integration/render-tests/runtime-styling/set-style-visibility-default-to-none/expected.png b/metrics/integration/render-tests/runtime-styling/set-style-visibility-default-to-none/expected.png new file mode 100644 index 00000000000..724d17cd7d3 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/set-style-visibility-default-to-none/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/set-style-visibility-default-to-none/style.json b/metrics/integration/render-tests/runtime-styling/set-style-visibility-default-to-none/style.json new file mode 100644 index 00000000000..3d02763a57b --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/set-style-visibility-default-to-none/style.json @@ -0,0 +1,43 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setStyle", + { + "version": 8, + "transition": { + "duration": 0 + }, + "sources": {}, + "layers": [ + { + "id": "background", + "type": "background", + "layout": { + "visibility": "none" + } + } + ] + } + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": {}, + "layers": [ + { + "id": "background", + "type": "background" + } + ] +} diff --git a/metrics/integration/render-tests/runtime-styling/set-style-visibility-default-to-visible/expected.png b/metrics/integration/render-tests/runtime-styling/set-style-visibility-default-to-visible/expected.png new file mode 100644 index 00000000000..d58554e96e6 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/set-style-visibility-default-to-visible/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/set-style-visibility-default-to-visible/style.json b/metrics/integration/render-tests/runtime-styling/set-style-visibility-default-to-visible/style.json new file mode 100644 index 00000000000..fd904b2ed19 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/set-style-visibility-default-to-visible/style.json @@ -0,0 +1,43 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setStyle", + { + "version": 8, + "transition": { + "duration": 0 + }, + "sources": {}, + "layers": [ + { + "id": "background", + "type": "background", + "layout": { + "visibility": "visible" + } + } + ] + } + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": {}, + "layers": [ + { + "id": "background", + "type": "background" + } + ] +} diff --git a/metrics/integration/render-tests/runtime-styling/set-style-visibility-none-to-default/expected.png b/metrics/integration/render-tests/runtime-styling/set-style-visibility-none-to-default/expected.png new file mode 100644 index 00000000000..d58554e96e6 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/set-style-visibility-none-to-default/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/set-style-visibility-none-to-default/style.json b/metrics/integration/render-tests/runtime-styling/set-style-visibility-none-to-default/style.json new file mode 100644 index 00000000000..88dd2bd6453 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/set-style-visibility-none-to-default/style.json @@ -0,0 +1,44 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setStyle", + { + "version": 8, + "transition": { + "duration": 0 + }, + "sources": {}, + "layers": [ + { + "id": "background", + "type": "background", + "layout": {} + } + ] + } + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": {}, + "layers": [ + { + "id": "background", + "type": "background", + "layout": { + "visibility": "none" + } + } + ] +} diff --git a/metrics/integration/render-tests/runtime-styling/set-style-visibility-none-to-visible/expected.png b/metrics/integration/render-tests/runtime-styling/set-style-visibility-none-to-visible/expected.png new file mode 100644 index 00000000000..d58554e96e6 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/set-style-visibility-none-to-visible/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/set-style-visibility-none-to-visible/style.json b/metrics/integration/render-tests/runtime-styling/set-style-visibility-none-to-visible/style.json new file mode 100644 index 00000000000..005e4768d75 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/set-style-visibility-none-to-visible/style.json @@ -0,0 +1,46 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setStyle", + { + "version": 8, + "transition": { + "duration": 0 + }, + "sources": {}, + "layers": [ + { + "id": "background", + "type": "background", + "layout": { + "visibility": "visible" + } + } + ] + } + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": {}, + "layers": [ + { + "id": "background", + "type": "background", + "layout": { + "visibility": "none" + } + } + ] +} diff --git a/metrics/integration/render-tests/runtime-styling/set-style-visibility-visible-to-default/expected.png b/metrics/integration/render-tests/runtime-styling/set-style-visibility-visible-to-default/expected.png new file mode 100644 index 00000000000..d58554e96e6 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/set-style-visibility-visible-to-default/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/set-style-visibility-visible-to-default/style.json b/metrics/integration/render-tests/runtime-styling/set-style-visibility-visible-to-default/style.json new file mode 100644 index 00000000000..2a48bc1617e --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/set-style-visibility-visible-to-default/style.json @@ -0,0 +1,44 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setStyle", + { + "version": 8, + "transition": { + "duration": 0 + }, + "sources": {}, + "layers": [ + { + "id": "background", + "type": "background", + "layout": {} + } + ] + } + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": {}, + "layers": [ + { + "id": "background", + "type": "background", + "layout": { + "visibility": "visible" + } + } + ] +} diff --git a/metrics/integration/render-tests/runtime-styling/set-style-visibility-visible-to-none/expected.png b/metrics/integration/render-tests/runtime-styling/set-style-visibility-visible-to-none/expected.png new file mode 100644 index 00000000000..724d17cd7d3 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/set-style-visibility-visible-to-none/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/set-style-visibility-visible-to-none/style.json b/metrics/integration/render-tests/runtime-styling/set-style-visibility-visible-to-none/style.json new file mode 100644 index 00000000000..251b237d7cd --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/set-style-visibility-visible-to-none/style.json @@ -0,0 +1,46 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setStyle", + { + "version": 8, + "transition": { + "duration": 0 + }, + "sources": {}, + "layers": [ + { + "id": "background", + "type": "background", + "layout": { + "visibility": "none" + } + } + ] + } + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": {}, + "layers": [ + { + "id": "background", + "type": "background", + "layout": { + "visibility": "visible" + } + } + ] +} diff --git a/metrics/integration/render-tests/runtime-styling/source-add-geojson-inline/expected.png b/metrics/integration/render-tests/runtime-styling/source-add-geojson-inline/expected.png new file mode 100644 index 00000000000..4cb77303dde Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/source-add-geojson-inline/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/source-add-geojson-inline/style.json b/metrics/integration/render-tests/runtime-styling/source-add-geojson-inline/style.json new file mode 100644 index 00000000000..50ff2700318 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/source-add-geojson-inline/style.json @@ -0,0 +1,41 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "addSource", + "geojson", + { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + ], + [ + "addLayer", + { + "id": "circle", + "type": "circle", + "source": "geojson" + } + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": {}, + "layers": [] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/runtime-styling/source-add-geojson-url/expected.png b/metrics/integration/render-tests/runtime-styling/source-add-geojson-url/expected.png new file mode 100644 index 00000000000..4cb77303dde Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/source-add-geojson-url/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/source-add-geojson-url/style.json b/metrics/integration/render-tests/runtime-styling/source-add-geojson-url/style.json new file mode 100644 index 00000000000..f7e6b9669dd --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/source-add-geojson-url/style.json @@ -0,0 +1,35 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "addSource", + "geojson", + { + "type": "geojson", + "data": "local://geojson/point.json" + } + ], + [ + "addLayer", + { + "id": "circle", + "type": "circle", + "source": "geojson" + } + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": {}, + "layers": [] +} diff --git a/metrics/integration/render-tests/runtime-styling/source-add-raster-inline/expected.png b/metrics/integration/render-tests/runtime-styling/source-add-raster-inline/expected.png new file mode 100644 index 00000000000..1c1ef5d4c64 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/source-add-raster-inline/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/source-add-raster-inline/style.json b/metrics/integration/render-tests/runtime-styling/source-add-raster-inline/style.json new file mode 100644 index 00000000000..c1b01514982 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/source-add-raster-inline/style.json @@ -0,0 +1,41 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "addSource", + "raster", + { + "type": "raster", + "tiles": [ + "local://tiles/{z}-{x}-{y}.satellite.png" + ], + "tileSize": 256 + } + ], + [ + "addLayer", + { + "id": "raster", + "type": "raster", + "source": "raster", + "paint": { + "raster-fade-duration": 0 + } + } + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": {}, + "layers": [] +} diff --git a/metrics/integration/render-tests/runtime-styling/source-add-raster-url/expected.png b/metrics/integration/render-tests/runtime-styling/source-add-raster-url/expected.png new file mode 100644 index 00000000000..1c1ef5d4c64 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/source-add-raster-url/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/source-add-raster-url/style.json b/metrics/integration/render-tests/runtime-styling/source-add-raster-url/style.json new file mode 100644 index 00000000000..3e644a61527 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/source-add-raster-url/style.json @@ -0,0 +1,39 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "addSource", + "raster", + { + "type": "raster", + "url": "local://tilesets/raster.json", + "tileSize": 256 + } + ], + [ + "addLayer", + { + "id": "raster", + "type": "raster", + "source": "raster", + "paint": { + "raster-fade-duration": 0 + } + } + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": {}, + "layers": [] +} diff --git a/metrics/integration/render-tests/runtime-styling/source-add-vector-inline/expected.png b/metrics/integration/render-tests/runtime-styling/source-add-vector-inline/expected.png new file mode 100644 index 00000000000..f8db1f36965 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/source-add-vector-inline/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/source-add-vector-inline/style.json b/metrics/integration/render-tests/runtime-styling/source-add-vector-inline/style.json new file mode 100644 index 00000000000..a6393d5b2a4 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/source-add-vector-inline/style.json @@ -0,0 +1,38 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "addSource", + "vector", + { + "type": "vector", + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + ], + [ + "addLayer", + { + "id": "fill", + "type": "fill", + "source": "vector", + "source-layer": "water" + } + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": {}, + "layers": [] +} diff --git a/metrics/integration/render-tests/runtime-styling/source-add-vector-url/expected.png b/metrics/integration/render-tests/runtime-styling/source-add-vector-url/expected.png new file mode 100644 index 00000000000..f8db1f36965 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/source-add-vector-url/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/source-add-vector-url/style.json b/metrics/integration/render-tests/runtime-styling/source-add-vector-url/style.json new file mode 100644 index 00000000000..ccaef8ffdc7 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/source-add-vector-url/style.json @@ -0,0 +1,36 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "addSource", + "vector", + { + "type": "vector", + "url": "local://tilesets/vector.json" + } + ], + [ + "addLayer", + { + "id": "fill", + "type": "fill", + "source": "vector", + "source-layer": "water" + } + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": {}, + "layers": [] +} diff --git a/metrics/integration/render-tests/runtime-styling/visibility-default-to-none/expected.png b/metrics/integration/render-tests/runtime-styling/visibility-default-to-none/expected.png new file mode 100644 index 00000000000..724d17cd7d3 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/visibility-default-to-none/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/visibility-default-to-none/style.json b/metrics/integration/render-tests/runtime-styling/visibility-default-to-none/style.json new file mode 100644 index 00000000000..33c666b133b --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/visibility-default-to-none/style.json @@ -0,0 +1,30 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setLayoutProperty", + "background", + "visibility", + "none" + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": {}, + "layers": [ + { + "id": "background", + "type": "background" + } + ] +} diff --git a/metrics/integration/render-tests/runtime-styling/visibility-default-to-visible/expected.png b/metrics/integration/render-tests/runtime-styling/visibility-default-to-visible/expected.png new file mode 100644 index 00000000000..d58554e96e6 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/visibility-default-to-visible/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/visibility-default-to-visible/style.json b/metrics/integration/render-tests/runtime-styling/visibility-default-to-visible/style.json new file mode 100644 index 00000000000..95675ff0d29 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/visibility-default-to-visible/style.json @@ -0,0 +1,30 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setLayoutProperty", + "background", + "visibility", + "visible" + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": {}, + "layers": [ + { + "id": "background", + "type": "background" + } + ] +} diff --git a/metrics/integration/render-tests/runtime-styling/visibility-none-to-default/expected.png b/metrics/integration/render-tests/runtime-styling/visibility-none-to-default/expected.png new file mode 100644 index 00000000000..d58554e96e6 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/visibility-none-to-default/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/visibility-none-to-default/style.json b/metrics/integration/render-tests/runtime-styling/visibility-none-to-default/style.json new file mode 100644 index 00000000000..c97f4c9f6c8 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/visibility-none-to-default/style.json @@ -0,0 +1,33 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setLayoutProperty", + "background", + "visibility", + null + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": {}, + "layers": [ + { + "id": "background", + "type": "background", + "layout": { + "visibility": "none" + } + } + ] +} diff --git a/metrics/integration/render-tests/runtime-styling/visibility-none-to-visible/expected.png b/metrics/integration/render-tests/runtime-styling/visibility-none-to-visible/expected.png new file mode 100644 index 00000000000..d58554e96e6 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/visibility-none-to-visible/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/visibility-none-to-visible/style.json b/metrics/integration/render-tests/runtime-styling/visibility-none-to-visible/style.json new file mode 100644 index 00000000000..dc09874c881 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/visibility-none-to-visible/style.json @@ -0,0 +1,33 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setLayoutProperty", + "background", + "visibility", + "visible" + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": {}, + "layers": [ + { + "id": "background", + "type": "background", + "layout": { + "visibility": "none" + } + } + ] +} diff --git a/metrics/integration/render-tests/runtime-styling/visibility-visible-to-default/expected.png b/metrics/integration/render-tests/runtime-styling/visibility-visible-to-default/expected.png new file mode 100644 index 00000000000..d58554e96e6 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/visibility-visible-to-default/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/visibility-visible-to-default/style.json b/metrics/integration/render-tests/runtime-styling/visibility-visible-to-default/style.json new file mode 100644 index 00000000000..413ecac89c7 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/visibility-visible-to-default/style.json @@ -0,0 +1,33 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setLayoutProperty", + "background", + "visibility", + null + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": {}, + "layers": [ + { + "id": "background", + "type": "background", + "layout": { + "visibility": "visible" + } + } + ] +} diff --git a/metrics/integration/render-tests/runtime-styling/visibility-visible-to-none/expected.png b/metrics/integration/render-tests/runtime-styling/visibility-visible-to-none/expected.png new file mode 100644 index 00000000000..724d17cd7d3 Binary files /dev/null and b/metrics/integration/render-tests/runtime-styling/visibility-visible-to-none/expected.png differ diff --git a/metrics/integration/render-tests/runtime-styling/visibility-visible-to-none/style.json b/metrics/integration/render-tests/runtime-styling/visibility-visible-to-none/style.json new file mode 100644 index 00000000000..59b74db4268 --- /dev/null +++ b/metrics/integration/render-tests/runtime-styling/visibility-visible-to-none/style.json @@ -0,0 +1,33 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setLayoutProperty", + "background", + "visibility", + "none" + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": {}, + "layers": [ + { + "id": "background", + "type": "background", + "layout": { + "visibility": "visible" + } + } + ] +} diff --git a/metrics/integration/render-tests/satellite-v9/z0/expected.png b/metrics/integration/render-tests/satellite-v9/z0/expected.png new file mode 100644 index 00000000000..009a74fb838 Binary files /dev/null and b/metrics/integration/render-tests/satellite-v9/z0/expected.png differ diff --git a/metrics/integration/render-tests/satellite-v9/z0/style.json b/metrics/integration/render-tests/satellite-v9/z0/style.json new file mode 100644 index 00000000000..a3a0ca083fa --- /dev/null +++ b/metrics/integration/render-tests/satellite-v9/z0/style.json @@ -0,0 +1,21 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 512, + "height": 512, + "operations": [ + ["setStyle", "local://mapbox-gl-styles/styles/satellite-v9.json"], + ["wait"], + ["setPaintProperty", + "satellite", + "raster-fade-duration", + 0 + ], + ["wait"] + ] + } + }, + "sources": {}, + "layers": [] +} diff --git a/metrics/integration/render-tests/sparse-tileset/overdraw/expected.png b/metrics/integration/render-tests/sparse-tileset/overdraw/expected.png new file mode 100644 index 00000000000..c24b773438c Binary files /dev/null and b/metrics/integration/render-tests/sparse-tileset/overdraw/expected.png differ diff --git a/metrics/integration/render-tests/sparse-tileset/overdraw/style.json b/metrics/integration/render-tests/sparse-tileset/overdraw/style.json new file mode 100644 index 00000000000..29eeefe9681 --- /dev/null +++ b/metrics/integration/render-tests/sparse-tileset/overdraw/style.json @@ -0,0 +1,39 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 1, + "sources": { + "mapbox": { + "type": "vector", + "tiles": [ + "local://tiles/sparse/{z}-{x}-{y}.mvt" + ] + } + }, + "layers": [ + { + "id": "background-layer", + "type": "background", + "paint": { + "background-color": "forestgreen" + } + }, + { + "id": "water-layer", + "source": "mapbox", + "source-layer": "water", + "type": "fill", + "paint": { + "fill-color": "blue" + } + } + ] +} diff --git a/metrics/integration/render-tests/sprites/1x-screen-1x-icon/expected.png b/metrics/integration/render-tests/sprites/1x-screen-1x-icon/expected.png new file mode 100644 index 00000000000..c7cf15d48b0 Binary files /dev/null and b/metrics/integration/render-tests/sprites/1x-screen-1x-icon/expected.png differ diff --git a/metrics/integration/render-tests/sprites/1x-screen-1x-icon/style.json b/metrics/integration/render-tests/sprites/1x-screen-1x-icon/style.json new file mode 100644 index 00000000000..2439b5aceb2 --- /dev/null +++ b/metrics/integration/render-tests/sprites/1x-screen-1x-icon/style.json @@ -0,0 +1,43 @@ +{ + "version": 8, + "metadata": { + "test": { + "pixelRatio": 1, + "width": 64, + "height": 64 + } + }, + "center": [ + 0, + 0 + ], + "zoom": 0, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + } + }, + "sprite": "local://sprites/1x", + "layers": [ + { + "id": "default", + "type": "symbol", + "source": "geojson", + "layout": { + "symbol-placement": "point", + "icon-image": "icon" + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/sprites/1x-screen-1x-pattern/expected.png b/metrics/integration/render-tests/sprites/1x-screen-1x-pattern/expected.png new file mode 100644 index 00000000000..f2bb3ff81dd Binary files /dev/null and b/metrics/integration/render-tests/sprites/1x-screen-1x-pattern/expected.png differ diff --git a/metrics/integration/render-tests/sprites/1x-screen-1x-pattern/style.json b/metrics/integration/render-tests/sprites/1x-screen-1x-pattern/style.json new file mode 100644 index 00000000000..7eed042e3e2 --- /dev/null +++ b/metrics/integration/render-tests/sprites/1x-screen-1x-pattern/style.json @@ -0,0 +1,26 @@ +{ + "version": 8, + "metadata": { + "test": { + "pixelRatio": 1, + "width": 64, + "height": 64 + } + }, + "center": [ + 0, + 0 + ], + "zoom": 0, + "sources": {}, + "sprite": "local://sprites/1x", + "layers": [ + { + "id": "default", + "type": "background", + "paint": { + "background-pattern": "icon" + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/sprites/1x-screen-2x-icon/expected.png b/metrics/integration/render-tests/sprites/1x-screen-2x-icon/expected.png new file mode 100644 index 00000000000..c6c06859474 Binary files /dev/null and b/metrics/integration/render-tests/sprites/1x-screen-2x-icon/expected.png differ diff --git a/metrics/integration/render-tests/sprites/1x-screen-2x-icon/style.json b/metrics/integration/render-tests/sprites/1x-screen-2x-icon/style.json new file mode 100644 index 00000000000..f0c4d7986ad --- /dev/null +++ b/metrics/integration/render-tests/sprites/1x-screen-2x-icon/style.json @@ -0,0 +1,43 @@ +{ + "version": 8, + "metadata": { + "test": { + "pixelRatio": 1, + "width": 64, + "height": 64 + } + }, + "center": [ + 0, + 0 + ], + "zoom": 0, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + } + }, + "sprite": "local://sprites/2x", + "layers": [ + { + "id": "default", + "type": "symbol", + "source": "geojson", + "layout": { + "symbol-placement": "point", + "icon-image": "icon" + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/sprites/1x-screen-2x-pattern/expected.png b/metrics/integration/render-tests/sprites/1x-screen-2x-pattern/expected.png new file mode 100644 index 00000000000..8bd4aea4179 Binary files /dev/null and b/metrics/integration/render-tests/sprites/1x-screen-2x-pattern/expected.png differ diff --git a/metrics/integration/render-tests/sprites/1x-screen-2x-pattern/style.json b/metrics/integration/render-tests/sprites/1x-screen-2x-pattern/style.json new file mode 100644 index 00000000000..1baa5415791 --- /dev/null +++ b/metrics/integration/render-tests/sprites/1x-screen-2x-pattern/style.json @@ -0,0 +1,26 @@ +{ + "version": 8, + "metadata": { + "test": { + "pixelRatio": 1, + "width": 64, + "height": 64 + } + }, + "center": [ + 0, + 0 + ], + "zoom": 0, + "sources": {}, + "sprite": "local://sprites/2x", + "layers": [ + { + "id": "default", + "type": "background", + "paint": { + "background-pattern": "icon" + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/sprites/2x-screen-1x-icon/expected.png b/metrics/integration/render-tests/sprites/2x-screen-1x-icon/expected.png new file mode 100644 index 00000000000..c6888ec5dbf Binary files /dev/null and b/metrics/integration/render-tests/sprites/2x-screen-1x-icon/expected.png differ diff --git a/metrics/integration/render-tests/sprites/2x-screen-1x-icon/style.json b/metrics/integration/render-tests/sprites/2x-screen-1x-icon/style.json new file mode 100644 index 00000000000..278807f2cf4 --- /dev/null +++ b/metrics/integration/render-tests/sprites/2x-screen-1x-icon/style.json @@ -0,0 +1,43 @@ +{ + "version": 8, + "metadata": { + "test": { + "pixelRatio": 2, + "width": 64, + "height": 64 + } + }, + "center": [ + 0, + 0 + ], + "zoom": 0, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + } + }, + "sprite": "local://sprites/1x", + "layers": [ + { + "id": "default", + "type": "symbol", + "source": "geojson", + "layout": { + "symbol-placement": "point", + "icon-image": "icon" + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/sprites/2x-screen-1x-pattern/expected.png b/metrics/integration/render-tests/sprites/2x-screen-1x-pattern/expected.png new file mode 100644 index 00000000000..caca2f74bc5 Binary files /dev/null and b/metrics/integration/render-tests/sprites/2x-screen-1x-pattern/expected.png differ diff --git a/metrics/integration/render-tests/sprites/2x-screen-1x-pattern/style.json b/metrics/integration/render-tests/sprites/2x-screen-1x-pattern/style.json new file mode 100644 index 00000000000..3f15d1aade3 --- /dev/null +++ b/metrics/integration/render-tests/sprites/2x-screen-1x-pattern/style.json @@ -0,0 +1,26 @@ +{ + "version": 8, + "metadata": { + "test": { + "pixelRatio": 2, + "width": 64, + "height": 64 + } + }, + "center": [ + 0, + 0 + ], + "zoom": 0, + "sources": {}, + "sprite": "local://sprites/1x", + "layers": [ + { + "id": "default", + "type": "background", + "paint": { + "background-pattern": "icon" + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/sprites/2x-screen-2x-icon/expected.png b/metrics/integration/render-tests/sprites/2x-screen-2x-icon/expected.png new file mode 100644 index 00000000000..8117459a35b Binary files /dev/null and b/metrics/integration/render-tests/sprites/2x-screen-2x-icon/expected.png differ diff --git a/metrics/integration/render-tests/sprites/2x-screen-2x-icon/style.json b/metrics/integration/render-tests/sprites/2x-screen-2x-icon/style.json new file mode 100644 index 00000000000..156be0b7337 --- /dev/null +++ b/metrics/integration/render-tests/sprites/2x-screen-2x-icon/style.json @@ -0,0 +1,43 @@ +{ + "version": 8, + "metadata": { + "test": { + "pixelRatio": 2, + "width": 64, + "height": 64 + } + }, + "center": [ + 0, + 0 + ], + "zoom": 0, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + } + }, + "sprite": "local://sprites/2x", + "layers": [ + { + "id": "default", + "type": "symbol", + "source": "geojson", + "layout": { + "symbol-placement": "point", + "icon-image": "icon" + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/sprites/2x-screen-2x-pattern/expected.png b/metrics/integration/render-tests/sprites/2x-screen-2x-pattern/expected.png new file mode 100644 index 00000000000..be4feeb68b3 Binary files /dev/null and b/metrics/integration/render-tests/sprites/2x-screen-2x-pattern/expected.png differ diff --git a/metrics/integration/render-tests/sprites/2x-screen-2x-pattern/style.json b/metrics/integration/render-tests/sprites/2x-screen-2x-pattern/style.json new file mode 100644 index 00000000000..7d7aaf231cc --- /dev/null +++ b/metrics/integration/render-tests/sprites/2x-screen-2x-pattern/style.json @@ -0,0 +1,26 @@ +{ + "version": 8, + "metadata": { + "test": { + "pixelRatio": 2, + "width": 64, + "height": 64 + } + }, + "center": [ + 0, + 0 + ], + "zoom": 0, + "sources": {}, + "sprite": "local://sprites/2x", + "layers": [ + { + "id": "default", + "type": "background", + "paint": { + "background-pattern": "icon" + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/symbol-cross-fade/chinese/expected.png b/metrics/integration/render-tests/symbol-cross-fade/chinese/expected.png new file mode 100644 index 00000000000..c09b8b80479 Binary files /dev/null and b/metrics/integration/render-tests/symbol-cross-fade/chinese/expected.png differ diff --git a/metrics/integration/render-tests/symbol-cross-fade/chinese/style.json b/metrics/integration/render-tests/symbol-cross-fade/chinese/style.json new file mode 100644 index 00000000000..ed24aa5a3c7 --- /dev/null +++ b/metrics/integration/render-tests/symbol-cross-fade/chinese/style.json @@ -0,0 +1,221 @@ +{ + "version": 8, + "metadata": { + "test": { + "fadeDuration": 100, + "width": 512, + "height": 512, + "description": "Line symbols are placed differently at different zoom levels: this test crosses a zoom level and renders 80% through the cross-fade. The 'wait' logic is tricky here: 1st 'wait 100' is to trigger placement at z2 after tiles have loaded, 2nd 'wait 100' is to allow z2 labels to fade in, 'wait' after 'setZoom' runs until the z3 tiles load (but doesn't elapse any time on the fake test clock), next 'wait 100' triggers a placement using the z3 and z2 tiles together, final 'wait 80' actually exercises the cross fade.", + "operations": [ + ["wait", 100], + ["wait", 100], + [ + "setZoom", + 3 + ], + ["wait"], + [ + "wait", + 100 + ], + [ + "wait", + 80 + ] + ] + } + }, + "zoom": 2, + "center": [-14.41400, 39.09187], + "sources": { + "mapbox": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "name": "氣到身什戰只白質位歡" + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -14.4195556640625, + 39.091699613104595 + ], + [ + 102.3046875, + 39.36827914916014 + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "電局今情再夜面造" + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -14.403076171875, + 39.10022600175347 + ], + [ + 103.35937499999999, + 65.80277639340238 + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "有究往極他生血通育" + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -14.414062499999998, + 39.091699613104595 + ], + [ + -14.765625, + 82.21421714106776 + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "不示有電親界因來終" + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -14.408569335937498, + 39.091699613104595 + ], + [ + -130.78125, + 39.095962936305476 + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "後再學全看素力來:不車" + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -14.414062499999998, + 39.095962936305476 + ], + [ + -16.5234375, + -58.81374171570779 + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "有下人費也家了清,黨光她保過每心" + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -14.4195556640625, + 39.10022600175347 + ], + [ + -130.4296875, + 64.47279382008166 + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "醫公藝說就公和有" + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -14.4195556640625, + 39.0831721934762 + ], + [ + 33.75, + 81.87364125482827 + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "光中輪的態指那差車" + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -14.447021484374998, + 39.104488809440475 + ], + [ + -66.4453125, + 82.26169873683153 + ] + ] + } + } + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "lines-symbol", + "type": "symbol", + "source": "mapbox", + "layout": { + "text-field": "{name}", + "symbol-placement": "line", + "symbol-spacing": 100, + "text-allow-overlap": false, + "text-font": [ "NotoCJK" ] + } + }, { + "id": "lines", + "type": "line", + "source": "mapbox", + "paint": { + "line-opacity": 0.25 + } + } + ] +} diff --git a/metrics/integration/render-tests/symbol-geometry/linestring/expected.png b/metrics/integration/render-tests/symbol-geometry/linestring/expected.png new file mode 100644 index 00000000000..c6a03ef7527 Binary files /dev/null and b/metrics/integration/render-tests/symbol-geometry/linestring/expected.png differ diff --git a/metrics/integration/render-tests/symbol-geometry/linestring/style.json b/metrics/integration/render-tests/symbol-geometry/linestring/style.json new file mode 100644 index 00000000000..a431033b056 --- /dev/null +++ b/metrics/integration/render-tests/symbol-geometry/linestring/style.json @@ -0,0 +1,64 @@ +{ + "version": 8, + "sprite": "local://sprites/sprite", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "metadata": { + "test": { + "height": 256 + } + }, + "center": [0, 0], + "zoom": 0, + "sources": { + "geometry": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + 0, + -25 + ], + [ + 0, + 25 + ] + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "geometry", + "type": "symbol", + "source": "geometry", + "layout": { + "icon-image": "rocket-12", + "text-field": "Mapbox", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "text-offset": [0, 1] + } + } + ] +} diff --git a/metrics/integration/render-tests/symbol-geometry/multilinestring/expected.png b/metrics/integration/render-tests/symbol-geometry/multilinestring/expected.png new file mode 100644 index 00000000000..2d67f610b3e Binary files /dev/null and b/metrics/integration/render-tests/symbol-geometry/multilinestring/expected.png differ diff --git a/metrics/integration/render-tests/symbol-geometry/multilinestring/style.json b/metrics/integration/render-tests/symbol-geometry/multilinestring/style.json new file mode 100644 index 00000000000..c936ea058c4 --- /dev/null +++ b/metrics/integration/render-tests/symbol-geometry/multilinestring/style.json @@ -0,0 +1,76 @@ +{ + "version": 8, + "sprite": "local://sprites/sprite", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "metadata": { + "test": { + "height": 256 + } + }, + "center": [0, 0], + "zoom": 0, + "sources": { + "geometry": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "MultiLineString", + "coordinates": [ + [ + [ + 25, + -25 + ], + [ + 25, + 25 + ] + ], + [ + [ + -25, + -25 + ], + [ + -25, + 25 + ] + ] + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "geometry", + "type": "symbol", + "source": "geometry", + "layout": { + "icon-image": "rocket-12", + "text-field": "Mapbox", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "text-offset": [0, 1] + } + } + ] +} diff --git a/metrics/integration/render-tests/symbol-geometry/multipoint/expected.png b/metrics/integration/render-tests/symbol-geometry/multipoint/expected.png new file mode 100644 index 00000000000..fc768dd71c6 Binary files /dev/null and b/metrics/integration/render-tests/symbol-geometry/multipoint/expected.png differ diff --git a/metrics/integration/render-tests/symbol-geometry/multipoint/style.json b/metrics/integration/render-tests/symbol-geometry/multipoint/style.json new file mode 100644 index 00000000000..f484f1255a4 --- /dev/null +++ b/metrics/integration/render-tests/symbol-geometry/multipoint/style.json @@ -0,0 +1,53 @@ +{ + "version": 8, + "sprite": "local://sprites/sprite", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "metadata": { + "test": { + "height": 256 + } + }, + "center": [0, 0], + "zoom": 0, + "sources": { + "geometry": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [{ + "type": "Feature", + "properties": {}, + "geometry": { + "type": "MultiPoint", + "coordinates": [ [50.0, 0.0], [-50.0, 0.0] ] + } + }] + } + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "geometry", + "type": "symbol", + "source": "geometry", + "layout": { + "icon-image": "rocket-12", + "text-field": "Mapbox", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "text-offset": [0, 1] + } + } + ] +} diff --git a/metrics/integration/render-tests/symbol-geometry/multipolygon/expected.png b/metrics/integration/render-tests/symbol-geometry/multipolygon/expected.png new file mode 100644 index 00000000000..fc768dd71c6 Binary files /dev/null and b/metrics/integration/render-tests/symbol-geometry/multipolygon/expected.png differ diff --git a/metrics/integration/render-tests/symbol-geometry/multipolygon/style.json b/metrics/integration/render-tests/symbol-geometry/multipolygon/style.json new file mode 100644 index 00000000000..0e3b29c6d20 --- /dev/null +++ b/metrics/integration/render-tests/symbol-geometry/multipolygon/style.json @@ -0,0 +1,104 @@ +{ + "version": 8, + "sprite": "local://sprites/sprite", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "metadata": { + "test": { + "height": 256 + } + }, + "center": [0, 0], + "zoom": 0, + "sources": { + "geometry": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "MultiPolygon", + "coordinates": [ + [ + [ + [ + -25, + -25 + ], + [ + -25, + 25 + ], + [ + -75, + 25 + ], + [ + -75, + -25 + ], + [ + -25, + -25 + ] + ] + ], + [ + [ + [ + 25, + -25 + ], + [ + 25, + 25 + ], + [ + 75, + 25 + ], + [ + 75, + -25 + ], + [ + 25, + -25 + ] + ] + ] + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "geometry", + "type": "symbol", + "source": "geometry", + "layout": { + "icon-image": "rocket-12", + "text-field": "Mapbox", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "text-offset": [0, 1] + } + } + ] +} diff --git a/metrics/integration/render-tests/symbol-geometry/point/expected.png b/metrics/integration/render-tests/symbol-geometry/point/expected.png new file mode 100644 index 00000000000..20821f81459 Binary files /dev/null and b/metrics/integration/render-tests/symbol-geometry/point/expected.png differ diff --git a/metrics/integration/render-tests/symbol-geometry/point/style.json b/metrics/integration/render-tests/symbol-geometry/point/style.json new file mode 100644 index 00000000000..7ff4d872e90 --- /dev/null +++ b/metrics/integration/render-tests/symbol-geometry/point/style.json @@ -0,0 +1,53 @@ +{ + "version": 8, + "sprite": "local://sprites/sprite", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "metadata": { + "test": { + "height": 256 + } + }, + "center": [0, 0], + "zoom": 0, + "sources": { + "geometry": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [{ + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Point", + "coordinates": [0, 0] + } + }] + } + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "geometry", + "type": "symbol", + "source": "geometry", + "layout": { + "icon-image": "rocket-12", + "text-field": "Mapbox", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "text-offset": [0, 1] + } + } + ] +} diff --git a/metrics/integration/render-tests/symbol-geometry/polygon/expected.png b/metrics/integration/render-tests/symbol-geometry/polygon/expected.png new file mode 100644 index 00000000000..20821f81459 Binary files /dev/null and b/metrics/integration/render-tests/symbol-geometry/polygon/expected.png differ diff --git a/metrics/integration/render-tests/symbol-geometry/polygon/style.json b/metrics/integration/render-tests/symbol-geometry/polygon/style.json new file mode 100644 index 00000000000..593a2bb881d --- /dev/null +++ b/metrics/integration/render-tests/symbol-geometry/polygon/style.json @@ -0,0 +1,78 @@ +{ + "version": 8, + "sprite": "local://sprites/sprite", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "metadata": { + "test": { + "height": 256 + } + }, + "center": [0, 0], + "zoom": 0, + "sources": { + "geometry": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -25, + -25 + ], + [ + -25, + 25 + ], + [ + 25, + 25 + ], + [ + 25, + -25 + ], + [ + -25, + -25 + ] + ] + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "geometry", + "type": "symbol", + "source": "geometry", + "layout": { + "icon-image": "rocket-12", + "text-field": "Mapbox", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-allow-overlap": true, + "text-ignore-placement": true, + "text-offset": [0, 1] + } + } + ] +} diff --git a/metrics/integration/render-tests/symbol-placement/line-center-buffer-tile-map-mode/expected.png b/metrics/integration/render-tests/symbol-placement/line-center-buffer-tile-map-mode/expected.png new file mode 100644 index 00000000000..06156ec40e1 Binary files /dev/null and b/metrics/integration/render-tests/symbol-placement/line-center-buffer-tile-map-mode/expected.png differ diff --git a/metrics/integration/render-tests/symbol-placement/line-center-buffer-tile-map-mode/style.json b/metrics/integration/render-tests/symbol-placement/line-center-buffer-tile-map-mode/style.json new file mode 100644 index 00000000000..bc64ab3b6f1 --- /dev/null +++ b/metrics/integration/render-tests/symbol-placement/line-center-buffer-tile-map-mode/style.json @@ -0,0 +1,60 @@ +{ + "version": 8, + "metadata": { + "test": { + "debug": true, + "mapMode": "tile" + } + }, + "center": [ + -73, + 15 + ], + "zoom": 4, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/mapbox.mapbox-streets-v7/{z}-{x}-{y}.mvt" + ] + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "line-center", + "type": "symbol", + "source": "mapbox", + "source-layer": "marine_label", + "layout": { + "text-field": "{name_en}", + "symbol-placement": "line-center", + "text-allow-overlap": true, + "text-size": 35, + "text-letter-spacing": 0.4, + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-max-width": 0 + } + }, + { + "id": "line", + "type": "line", + "source": "mapbox", + "source-layer": "marine_label", + "paint": { + "line-width": 1 + } + } + ] +} diff --git a/metrics/integration/render-tests/symbol-placement/line-center-buffer/expected.png b/metrics/integration/render-tests/symbol-placement/line-center-buffer/expected.png new file mode 100644 index 00000000000..b63b1517653 Binary files /dev/null and b/metrics/integration/render-tests/symbol-placement/line-center-buffer/expected.png differ diff --git a/metrics/integration/render-tests/symbol-placement/line-center-buffer/style.json b/metrics/integration/render-tests/symbol-placement/line-center-buffer/style.json new file mode 100644 index 00000000000..4f517d88b86 --- /dev/null +++ b/metrics/integration/render-tests/symbol-placement/line-center-buffer/style.json @@ -0,0 +1,62 @@ +{ + "version": 8, + "metadata": { + "test": { + "description": "'Carribean Sea' crosses a tile boundary, but we don't draw the tile boundary in the test because JS and Native render tile boundaries differently.", + "height": 256, + "width": 1024 + } + }, + "center": [ + -73, + 15 + ], + "zoom": 4.5, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/mapbox.mapbox-streets-v7/{z}-{x}-{y}.mvt" + ] + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "line-center", + "type": "symbol", + "source": "mapbox", + "source-layer": "marine_label", + "layout": { + "text-field": "{name_en}", + "symbol-placement": "line-center", + "text-allow-overlap": true, + "text-size": 35, + "text-letter-spacing": 0.4, + "text-offset": [3, 0], + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-max-width": 0 + } + }, + { + "id": "line", + "type": "line", + "source": "mapbox", + "source-layer": "marine_label", + "paint": { + "line-width": 1 + } + } + ] +} diff --git a/metrics/integration/render-tests/symbol-placement/line-center-tile-map-mode/expected.png b/metrics/integration/render-tests/symbol-placement/line-center-tile-map-mode/expected.png new file mode 100644 index 00000000000..0ef674e2a20 Binary files /dev/null and b/metrics/integration/render-tests/symbol-placement/line-center-tile-map-mode/expected.png differ diff --git a/metrics/integration/render-tests/symbol-placement/line-center-tile-map-mode/style.json b/metrics/integration/render-tests/symbol-placement/line-center-tile-map-mode/style.json new file mode 100644 index 00000000000..ec89964d3dc --- /dev/null +++ b/metrics/integration/render-tests/symbol-placement/line-center-tile-map-mode/style.json @@ -0,0 +1,71 @@ +{ + "version": 8, + "metadata": { + "test": { + "collisionDebug": true, + "debug": true, + "mapMode": "tile" + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 15, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "line-center", + "type": "symbol", + "source": "mapbox", + "source-layer": "road_label", + "layout": { + "text-field": ".", + "symbol-placement": "line-center", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + } + }, + { + "id": "road", + "type": "line", + "source": "mapbox", + "source-layer": "road_label", + "paint": { + "line-width": 1, + "line-color": ["match", + ["%", ["to-number", ["id"]], 10], + 0, ["to-color", "red"], + 1, ["to-color", "blue"], + 2, ["to-color", "yellow"], + 3, ["to-color", "black"], + 4, ["to-color", "grey"], + 5, ["to-color", "purple"], + 6, ["to-color", "green"], + 7, ["to-color", "orange"], + 8, ["to-color", "brown"], + 9, ["to-color", "lime"], + ["to-color", "magenta"] + ] + } + } + ] +} diff --git a/metrics/integration/render-tests/symbol-placement/line-center/expected.png b/metrics/integration/render-tests/symbol-placement/line-center/expected.png new file mode 100644 index 00000000000..07af2a7cbad Binary files /dev/null and b/metrics/integration/render-tests/symbol-placement/line-center/expected.png differ diff --git a/metrics/integration/render-tests/symbol-placement/line-center/style.json b/metrics/integration/render-tests/symbol-placement/line-center/style.json new file mode 100644 index 00000000000..068b09286b0 --- /dev/null +++ b/metrics/integration/render-tests/symbol-placement/line-center/style.json @@ -0,0 +1,70 @@ +{ + "version": 8, + "metadata": { + "test": { + "collisionDebug": true, + "height": 512 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 15, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "line-center", + "type": "symbol", + "source": "mapbox", + "source-layer": "road_label", + "layout": { + "text-field": ".", + "symbol-placement": "line-center", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + } + }, + { + "id": "road", + "type": "line", + "source": "mapbox", + "source-layer": "road_label", + "paint": { + "line-width": 1, + "line-color": ["match", + ["%", ["to-number", ["id"]], 10], + 0, ["to-color", "red"], + 1, ["to-color", "blue"], + 2, ["to-color", "yellow"], + 3, ["to-color", "black"], + 4, ["to-color", "grey"], + 5, ["to-color", "purple"], + 6, ["to-color", "green"], + 7, ["to-color", "orange"], + 8, ["to-color", "brown"], + 9, ["to-color", "lime"], + ["to-color", "magenta"] + ] + } + } + ] +} diff --git a/metrics/integration/render-tests/symbol-placement/line-overscaled/expected.png b/metrics/integration/render-tests/symbol-placement/line-overscaled/expected.png new file mode 100644 index 00000000000..db4e4415d48 Binary files /dev/null and b/metrics/integration/render-tests/symbol-placement/line-overscaled/expected.png differ diff --git a/metrics/integration/render-tests/symbol-placement/line-overscaled/style.json b/metrics/integration/render-tests/symbol-placement/line-overscaled/style.json new file mode 100644 index 00000000000..dd37488f8e7 --- /dev/null +++ b/metrics/integration/render-tests/symbol-placement/line-overscaled/style.json @@ -0,0 +1,64 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 17, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "line", + "type": "symbol", + "source": "mapbox", + "source-layer": "road_label", + "layout": { + "icon-image": "triangle-stroked-12", + "symbol-placement": "line", + "symbol-spacing": 20 + }, + "paint": { + "icon-opacity": 1 + } + }, + { + "id": "point", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "filter": [ + "==", + "maki", + "restaurant" + ], + "layout": { + "icon-image": "{maki}-12", + "symbol-placement": "point" + }, + "paint": { + "icon-opacity": 0 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/symbol-placement/line/expected.png b/metrics/integration/render-tests/symbol-placement/line/expected.png new file mode 100644 index 00000000000..adc199661c7 Binary files /dev/null and b/metrics/integration/render-tests/symbol-placement/line/expected.png differ diff --git a/metrics/integration/render-tests/symbol-placement/line/style.json b/metrics/integration/render-tests/symbol-placement/line/style.json new file mode 100644 index 00000000000..a9dbee9d654 --- /dev/null +++ b/metrics/integration/render-tests/symbol-placement/line/style.json @@ -0,0 +1,64 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "line", + "type": "symbol", + "source": "mapbox", + "source-layer": "road_label", + "layout": { + "icon-image": "triangle-stroked-12", + "symbol-placement": "line", + "symbol-spacing": 20 + }, + "paint": { + "icon-opacity": 1 + } + }, + { + "id": "point", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "filter": [ + "==", + "maki", + "restaurant" + ], + "layout": { + "icon-image": "{maki}-12", + "symbol-placement": "point" + }, + "paint": { + "icon-opacity": 0 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/symbol-placement/point-polygon/expected.png b/metrics/integration/render-tests/symbol-placement/point-polygon/expected.png new file mode 100644 index 00000000000..c0eb5120440 Binary files /dev/null and b/metrics/integration/render-tests/symbol-placement/point-polygon/expected.png differ diff --git a/metrics/integration/render-tests/symbol-placement/point-polygon/style.json b/metrics/integration/render-tests/symbol-placement/point-polygon/style.json new file mode 100644 index 00000000000..8e70f0f1909 --- /dev/null +++ b/metrics/integration/render-tests/symbol-placement/point-polygon/style.json @@ -0,0 +1,53 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.420466, + 52.4988 + ], + "zoom": 18, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "lines_pole_of_inaccessibility", + "type": "line", + "source": "mapbox", + "source-layer": "building" + }, + { + "id": "pole_of_inaccessibility", + "type": "symbol", + "source": "mapbox", + "source-layer": "building", + "layout": { + "symbol-placement": "point", + "text-field": "Test", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-size": 10 + } + } + ] +} diff --git a/metrics/integration/render-tests/symbol-placement/point/expected.png b/metrics/integration/render-tests/symbol-placement/point/expected.png new file mode 100644 index 00000000000..3decd9d2215 Binary files /dev/null and b/metrics/integration/render-tests/symbol-placement/point/expected.png differ diff --git a/metrics/integration/render-tests/symbol-placement/point/style.json b/metrics/integration/render-tests/symbol-placement/point/style.json new file mode 100644 index 00000000000..6d7394b9fe8 --- /dev/null +++ b/metrics/integration/render-tests/symbol-placement/point/style.json @@ -0,0 +1,64 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "line", + "type": "symbol", + "source": "mapbox", + "source-layer": "road_label", + "layout": { + "icon-image": "triangle-stroked-12", + "symbol-placement": "line", + "symbol-spacing": 20 + }, + "paint": { + "icon-opacity": 0 + } + }, + { + "id": "point", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "filter": [ + "==", + "maki", + "restaurant" + ], + "layout": { + "icon-image": "{maki}-12", + "symbol-placement": "point" + }, + "paint": { + "icon-opacity": 1 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/symbol-sort-key/icon-expression/expected.png b/metrics/integration/render-tests/symbol-sort-key/icon-expression/expected.png new file mode 100644 index 00000000000..6b17890462d Binary files /dev/null and b/metrics/integration/render-tests/symbol-sort-key/icon-expression/expected.png differ diff --git a/metrics/integration/render-tests/symbol-sort-key/icon-expression/style.json b/metrics/integration/render-tests/symbol-sort-key/icon-expression/style.json new file mode 100644 index 00000000000..90eb8aa20c1 --- /dev/null +++ b/metrics/integration/render-tests/symbol-sort-key/icon-expression/style.json @@ -0,0 +1,76 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 64, + "width": 64 + } + }, + "center": [0, 30], + "zoom": 1, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "sort-key": 0, + "image": "bank-12" + }, + "geometry": { + "type": "Point", + "coordinates": [ + 1, + 34 + ] + } + }, + { + "type": "Feature", + "properties": { + "sort-key": 2, + "image": "bank-12" + }, + "geometry": { + "type": "Point", + "coordinates": [ + 1, + 30 + ] + } + }, + { + "type": "Feature", + "properties": { + "sort-key": 1, + "image": "fav-campsite-18" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -1, + 32 + ] + } + } + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "icon", + "type": "symbol", + "source": "geojson", + "layout": { + "symbol-sort-key": ["get", "sort-key"], + "icon-allow-overlap": true, + "icon-image": ["get", "image"] + } + } + ] +} diff --git a/metrics/integration/render-tests/symbol-sort-key/placement-tile-boundary-left-then-right/expected.png b/metrics/integration/render-tests/symbol-sort-key/placement-tile-boundary-left-then-right/expected.png new file mode 100644 index 00000000000..a452d65d9d1 Binary files /dev/null and b/metrics/integration/render-tests/symbol-sort-key/placement-tile-boundary-left-then-right/expected.png differ diff --git a/metrics/integration/render-tests/symbol-sort-key/placement-tile-boundary-left-then-right/style.json b/metrics/integration/render-tests/symbol-sort-key/placement-tile-boundary-left-then-right/style.json new file mode 100644 index 00000000000..b87ab32bc9a --- /dev/null +++ b/metrics/integration/render-tests/symbol-sort-key/placement-tile-boundary-left-then-right/style.json @@ -0,0 +1,75 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 64, + "width": 64 + } + }, + "center": [0, 30], + "zoom": 1, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "sort-key": 0, + "image": "bank-12" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -1, + 34 + ] + } + }, + { + "type": "Feature", + "properties": { + "sort-key": 2, + "image": "bank-12" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -1, + 30 + ] + } + }, + { + "type": "Feature", + "properties": { + "sort-key": 1, + "image": "fav-campsite-18" + }, + "geometry": { + "type": "Point", + "coordinates": [ + 1, + 32 + ] + } + } + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "icon", + "type": "symbol", + "source": "geojson", + "layout": { + "symbol-sort-key": ["get", "sort-key"], + "icon-image": ["get", "image"] + } + } + ] +} diff --git a/metrics/integration/render-tests/symbol-sort-key/placement-tile-boundary-right-then-left/expected.png b/metrics/integration/render-tests/symbol-sort-key/placement-tile-boundary-right-then-left/expected.png new file mode 100644 index 00000000000..d1e4899a146 Binary files /dev/null and b/metrics/integration/render-tests/symbol-sort-key/placement-tile-boundary-right-then-left/expected.png differ diff --git a/metrics/integration/render-tests/symbol-sort-key/placement-tile-boundary-right-then-left/style.json b/metrics/integration/render-tests/symbol-sort-key/placement-tile-boundary-right-then-left/style.json new file mode 100644 index 00000000000..d739f41a9e5 --- /dev/null +++ b/metrics/integration/render-tests/symbol-sort-key/placement-tile-boundary-right-then-left/style.json @@ -0,0 +1,75 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 64, + "width": 64 + } + }, + "center": [0, 30], + "zoom": 1, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "sort-key": 0, + "image": "bank-12" + }, + "geometry": { + "type": "Point", + "coordinates": [ + 1, + 34 + ] + } + }, + { + "type": "Feature", + "properties": { + "sort-key": 2, + "image": "bank-12" + }, + "geometry": { + "type": "Point", + "coordinates": [ + 1, + 30 + ] + } + }, + { + "type": "Feature", + "properties": { + "sort-key": 1, + "image": "fav-campsite-18" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -1, + 32 + ] + } + } + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "icon", + "type": "symbol", + "source": "geojson", + "layout": { + "symbol-sort-key": ["get", "sort-key"], + "icon-image": ["get", "image"] + } + } + ] +} diff --git a/metrics/integration/render-tests/symbol-sort-key/text-expression/expected.png b/metrics/integration/render-tests/symbol-sort-key/text-expression/expected.png new file mode 100644 index 00000000000..af38ed8c665 Binary files /dev/null and b/metrics/integration/render-tests/symbol-sort-key/text-expression/expected.png differ diff --git a/metrics/integration/render-tests/symbol-sort-key/text-expression/style.json b/metrics/integration/render-tests/symbol-sort-key/text-expression/style.json new file mode 100644 index 00000000000..773f0912acc --- /dev/null +++ b/metrics/integration/render-tests/symbol-sort-key/text-expression/style.json @@ -0,0 +1,87 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 64, + "width": 64 + } + }, + "center": [0, 30], + "zoom": 1, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "color": "red", + "sort-key": 0, + "image": "bank-12" + }, + "geometry": { + "type": "Point", + "coordinates": [ + 1, + 34 + ] + } + }, + { + "type": "Feature", + "properties": { + "color": "red", + "sort-key": 2, + "image": "bank-12" + }, + "geometry": { + "type": "Point", + "coordinates": [ + 1, + 30 + ] + } + }, + { + "type": "Feature", + "properties": { + "color": "blue", + "sort-key": 1, + "image": "fav-campsite-18" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -1, + 32 + ] + } + } + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "icon", + "type": "symbol", + "source": "geojson", + "layout": { + "text-allow-overlap": true, + "symbol-sort-key": ["get", "sort-key"], + "text-field": ["get", "sort-key"], + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + }, + "paint": { + "text-halo-width": 5, + "text-halo-color": ["get", "color"] + } + } + ] +} diff --git a/metrics/integration/render-tests/symbol-sort-key/text-ignore-placement/expected.png b/metrics/integration/render-tests/symbol-sort-key/text-ignore-placement/expected.png new file mode 100644 index 00000000000..0b357404898 Binary files /dev/null and b/metrics/integration/render-tests/symbol-sort-key/text-ignore-placement/expected.png differ diff --git a/metrics/integration/render-tests/symbol-sort-key/text-ignore-placement/style.json b/metrics/integration/render-tests/symbol-sort-key/text-ignore-placement/style.json new file mode 100644 index 00000000000..b274a15c47b --- /dev/null +++ b/metrics/integration/render-tests/symbol-sort-key/text-ignore-placement/style.json @@ -0,0 +1,107 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 64, + "width": 64 + } + }, + "center": [0, 32], + "zoom": 1, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "color": "red", + "sort-key": 1, + "image": "interstate_2" + }, + "geometry": { + "type": "Point", + "coordinates": [ + 6, + 35 + ] + } + }, + { + "type": "Feature", + "properties": { + "color": "green", + "sort-key": 0, + "image": "interstate_2" + }, + "geometry": { + "type": "Point", + "coordinates": [ + 6, + 29 + ] + } + }, { + "type": "Feature", + "properties": { + "color": "red", + "sort-key": 1, + "image": "interstate_2" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -6, + 35 + ] + } + }, + { + "type": "Feature", + "properties": { + "color": "green", + "sort-key": 0, + "image": "interstate_2" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -6, + 29 + ] + } + } + ] + } + } + }, + "sprite": "local://sprites/emerald", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "icon", + "type": "symbol", + "source": "geojson", + "layout": { + "symbol-sort-key": ["get", "sort-key"], + "icon-image": ["get", "image"], + "icon-allow-overlap": true, + "icon-ignore-placement": true, + "text-allow-overlap": true, + "text-ignore-placement": true, + "text-field": ["get", "sort-key"], + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + }, + "paint": { + "text-color": "rgb(255,255,255)", + "text-halo-width": 1, + "text-halo-color": ["get", "color"] + } + } + ] +} diff --git a/metrics/integration/render-tests/symbol-sort-key/text-placement/expected.png b/metrics/integration/render-tests/symbol-sort-key/text-placement/expected.png new file mode 100644 index 00000000000..7ce1c08d003 Binary files /dev/null and b/metrics/integration/render-tests/symbol-sort-key/text-placement/expected.png differ diff --git a/metrics/integration/render-tests/symbol-sort-key/text-placement/style.json b/metrics/integration/render-tests/symbol-sort-key/text-placement/style.json new file mode 100644 index 00000000000..60a2136dfe1 --- /dev/null +++ b/metrics/integration/render-tests/symbol-sort-key/text-placement/style.json @@ -0,0 +1,71 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 64, + "width": 64 + } + }, + "center": [0, 30], + "zoom": 1, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "color": "red", + "sort-key": 1, + "image": "bank-12" + }, + "geometry": { + "type": "Point", + "coordinates": [ + 1, + 34 + ] + } + }, + { + "type": "Feature", + "properties": { + "color": "green", + "sort-key": 0, + "image": "bank-12" + }, + "geometry": { + "type": "Point", + "coordinates": [ + 1, + 30 + ] + } + } + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "icon", + "type": "symbol", + "source": "geojson", + "layout": { + "symbol-sort-key": ["get", "sort-key"], + "text-field": ["get", "sort-key"], + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + }, + "paint": { + "text-halo-width": 5, + "text-halo-color": ["get", "color"] + } + } + ] +} diff --git a/metrics/integration/render-tests/symbol-spacing/line-close/expected.png b/metrics/integration/render-tests/symbol-spacing/line-close/expected.png new file mode 100644 index 00000000000..bef46885ded Binary files /dev/null and b/metrics/integration/render-tests/symbol-spacing/line-close/expected.png differ diff --git a/metrics/integration/render-tests/symbol-spacing/line-close/style.json b/metrics/integration/render-tests/symbol-spacing/line-close/style.json new file mode 100644 index 00000000000..2686b619707 --- /dev/null +++ b/metrics/integration/render-tests/symbol-spacing/line-close/style.json @@ -0,0 +1,106 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "point-close", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "filter": [ + "==", + "maki", + "restaurant" + ], + "layout": { + "icon-image": "{maki}-12", + "icon-allow-overlap": true, + "icon-ignore-placement": true, + "symbol-placement": "point", + "symbol-spacing": 20 + }, + "paint": { + "icon-opacity": 0 + } + }, + { + "id": "point-far", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "filter": [ + "==", + "maki", + "restaurant" + ], + "layout": { + "icon-image": "{maki}-12", + "icon-allow-overlap": true, + "icon-ignore-placement": true, + "symbol-placement": "point", + "symbol-spacing": 50 + }, + "paint": { + "icon-opacity": 0 + } + }, + { + "id": "line-close", + "type": "symbol", + "source": "mapbox", + "source-layer": "road", + "layout": { + "icon-image": "triangle-stroked-12", + "icon-allow-overlap": true, + "icon-ignore-placement": true, + "symbol-placement": "line", + "symbol-spacing": 20 + }, + "paint": { + "icon-opacity": 1 + } + }, + { + "id": "line-far", + "type": "symbol", + "source": "mapbox", + "source-layer": "road", + "layout": { + "icon-image": "triangle-stroked-12", + "icon-allow-overlap": true, + "icon-ignore-placement": true, + "symbol-placement": "line", + "symbol-spacing": 50 + }, + "paint": { + "icon-opacity": 0 + } + } + ] +} diff --git a/metrics/integration/render-tests/symbol-spacing/line-far/expected.png b/metrics/integration/render-tests/symbol-spacing/line-far/expected.png new file mode 100644 index 00000000000..1a8116864ba Binary files /dev/null and b/metrics/integration/render-tests/symbol-spacing/line-far/expected.png differ diff --git a/metrics/integration/render-tests/symbol-spacing/line-far/style.json b/metrics/integration/render-tests/symbol-spacing/line-far/style.json new file mode 100644 index 00000000000..cce1cf6cb30 --- /dev/null +++ b/metrics/integration/render-tests/symbol-spacing/line-far/style.json @@ -0,0 +1,106 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "point-close", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "filter": [ + "==", + "maki", + "restaurant" + ], + "layout": { + "icon-image": "{maki}-12", + "icon-allow-overlap": true, + "icon-ignore-placement": true, + "symbol-placement": "point", + "symbol-spacing": 20 + }, + "paint": { + "icon-opacity": 0 + } + }, + { + "id": "point-far", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "filter": [ + "==", + "maki", + "restaurant" + ], + "layout": { + "icon-image": "{maki}-12", + "icon-allow-overlap": true, + "icon-ignore-placement": true, + "symbol-placement": "point", + "symbol-spacing": 50 + }, + "paint": { + "icon-opacity": 0 + } + }, + { + "id": "line-close", + "type": "symbol", + "source": "mapbox", + "source-layer": "road", + "layout": { + "icon-image": "triangle-stroked-12", + "icon-allow-overlap": true, + "icon-ignore-placement": true, + "symbol-placement": "line", + "symbol-spacing": 20 + }, + "paint": { + "icon-opacity": 0 + } + }, + { + "id": "line-far", + "type": "symbol", + "source": "mapbox", + "source-layer": "road", + "layout": { + "icon-image": "triangle-stroked-12", + "icon-allow-overlap": true, + "icon-ignore-placement": true, + "symbol-placement": "line", + "symbol-spacing": 50 + }, + "paint": { + "icon-opacity": 1 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/symbol-spacing/line-overscaled/expected.png b/metrics/integration/render-tests/symbol-spacing/line-overscaled/expected.png new file mode 100644 index 00000000000..1691850a693 Binary files /dev/null and b/metrics/integration/render-tests/symbol-spacing/line-overscaled/expected.png differ diff --git a/metrics/integration/render-tests/symbol-spacing/line-overscaled/style.json b/metrics/integration/render-tests/symbol-spacing/line-overscaled/style.json new file mode 100644 index 00000000000..b6a4e65d7c1 --- /dev/null +++ b/metrics/integration/render-tests/symbol-spacing/line-overscaled/style.json @@ -0,0 +1,106 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 17, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "point-close", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "filter": [ + "==", + "maki", + "restaurant" + ], + "layout": { + "icon-image": "{maki}-12", + "icon-allow-overlap": true, + "icon-ignore-placement": true, + "symbol-placement": "point", + "symbol-spacing": 20 + }, + "paint": { + "icon-opacity": 0 + } + }, + { + "id": "point-far", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "filter": [ + "==", + "maki", + "restaurant" + ], + "layout": { + "icon-image": "{maki}-12", + "icon-allow-overlap": true, + "icon-ignore-placement": true, + "symbol-placement": "point", + "symbol-spacing": 50 + }, + "paint": { + "icon-opacity": 0 + } + }, + { + "id": "line-close", + "type": "symbol", + "source": "mapbox", + "source-layer": "road", + "layout": { + "icon-image": "triangle-stroked-12", + "icon-allow-overlap": true, + "icon-ignore-placement": true, + "symbol-placement": "line", + "symbol-spacing": 20 + }, + "paint": { + "icon-opacity": 1 + } + }, + { + "id": "line-far", + "type": "symbol", + "source": "mapbox", + "source-layer": "road", + "layout": { + "icon-image": "triangle-stroked-12", + "icon-allow-overlap": true, + "icon-ignore-placement": true, + "symbol-placement": "line", + "symbol-spacing": 50 + }, + "paint": { + "icon-opacity": 0 + } + } + ] +} diff --git a/metrics/integration/render-tests/symbol-spacing/point-close/expected.png b/metrics/integration/render-tests/symbol-spacing/point-close/expected.png new file mode 100644 index 00000000000..21812ce379a Binary files /dev/null and b/metrics/integration/render-tests/symbol-spacing/point-close/expected.png differ diff --git a/metrics/integration/render-tests/symbol-spacing/point-close/style.json b/metrics/integration/render-tests/symbol-spacing/point-close/style.json new file mode 100644 index 00000000000..40fafaad184 --- /dev/null +++ b/metrics/integration/render-tests/symbol-spacing/point-close/style.json @@ -0,0 +1,106 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "point-close", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "filter": [ + "==", + "maki", + "restaurant" + ], + "layout": { + "icon-image": "{maki}-12", + "icon-allow-overlap": true, + "icon-ignore-placement": true, + "symbol-placement": "point", + "symbol-spacing": 20 + }, + "paint": { + "icon-opacity": 1 + } + }, + { + "id": "point-far", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "filter": [ + "==", + "maki", + "restaurant" + ], + "layout": { + "icon-image": "{maki}-12", + "icon-allow-overlap": true, + "icon-ignore-placement": true, + "symbol-placement": "point", + "symbol-spacing": 50 + }, + "paint": { + "icon-opacity": 0 + } + }, + { + "id": "line-close", + "type": "symbol", + "source": "mapbox", + "source-layer": "road", + "layout": { + "icon-image": "triangle-stroked-12", + "icon-allow-overlap": true, + "icon-ignore-placement": true, + "symbol-placement": "line", + "symbol-spacing": 20 + }, + "paint": { + "icon-opacity": 0 + } + }, + { + "id": "line-far", + "type": "symbol", + "source": "mapbox", + "source-layer": "road", + "layout": { + "icon-image": "triangle-stroked-12", + "icon-allow-overlap": true, + "icon-ignore-placement": true, + "symbol-placement": "line", + "symbol-spacing": 50 + }, + "paint": { + "icon-opacity": 0 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/symbol-spacing/point-far/expected.png b/metrics/integration/render-tests/symbol-spacing/point-far/expected.png new file mode 100644 index 00000000000..21812ce379a Binary files /dev/null and b/metrics/integration/render-tests/symbol-spacing/point-far/expected.png differ diff --git a/metrics/integration/render-tests/symbol-spacing/point-far/style.json b/metrics/integration/render-tests/symbol-spacing/point-far/style.json new file mode 100644 index 00000000000..35a47964343 --- /dev/null +++ b/metrics/integration/render-tests/symbol-spacing/point-far/style.json @@ -0,0 +1,106 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "point-close", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "filter": [ + "==", + "maki", + "restaurant" + ], + "layout": { + "icon-image": "{maki}-12", + "icon-allow-overlap": true, + "icon-ignore-placement": true, + "symbol-placement": "point", + "symbol-spacing": 20 + }, + "paint": { + "icon-opacity": 0 + } + }, + { + "id": "point-far", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "filter": [ + "==", + "maki", + "restaurant" + ], + "layout": { + "icon-image": "{maki}-12", + "icon-allow-overlap": true, + "icon-ignore-placement": true, + "symbol-placement": "point", + "symbol-spacing": 50 + }, + "paint": { + "icon-opacity": 1 + } + }, + { + "id": "line-close", + "type": "symbol", + "source": "mapbox", + "source-layer": "road", + "layout": { + "icon-image": "triangle-stroked-12", + "icon-allow-overlap": true, + "icon-ignore-placement": true, + "symbol-placement": "line", + "symbol-spacing": 20 + }, + "paint": { + "icon-opacity": 0 + } + }, + { + "id": "line-far", + "type": "symbol", + "source": "mapbox", + "source-layer": "road", + "layout": { + "icon-image": "triangle-stroked-12", + "icon-allow-overlap": true, + "icon-ignore-placement": true, + "symbol-placement": "line", + "symbol-spacing": 50 + }, + "paint": { + "icon-opacity": 0 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/symbol-visibility/none/expected.png b/metrics/integration/render-tests/symbol-visibility/none/expected.png new file mode 100644 index 00000000000..5308b74aacb Binary files /dev/null and b/metrics/integration/render-tests/symbol-visibility/none/expected.png differ diff --git a/metrics/integration/render-tests/symbol-visibility/none/style.json b/metrics/integration/render-tests/symbol-visibility/none/style.json new file mode 100644 index 00000000000..c1676dd7c6c --- /dev/null +++ b/metrics/integration/render-tests/symbol-visibility/none/style.json @@ -0,0 +1,44 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "icon", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "filter": ["has", "maki"], + "layout": { + "icon-image": "{maki}-12", + "symbol-placement": "point", + "visibility": "none" + } + } + ] +} diff --git a/metrics/integration/render-tests/symbol-visibility/visible/expected.png b/metrics/integration/render-tests/symbol-visibility/visible/expected.png new file mode 100644 index 00000000000..fcb921de3de Binary files /dev/null and b/metrics/integration/render-tests/symbol-visibility/visible/expected.png differ diff --git a/metrics/integration/render-tests/symbol-visibility/visible/style.json b/metrics/integration/render-tests/symbol-visibility/visible/style.json new file mode 100644 index 00000000000..4cbee730187 --- /dev/null +++ b/metrics/integration/render-tests/symbol-visibility/visible/style.json @@ -0,0 +1,43 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "icon", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "filter": ["has", "maki"], + "layout": { + "icon-image": "{maki}-12", + "symbol-placement": "point" + } + } + ] +} diff --git a/metrics/integration/render-tests/symbol-z-order/default/expected.png b/metrics/integration/render-tests/symbol-z-order/default/expected.png new file mode 100644 index 00000000000..62fd023d96c Binary files /dev/null and b/metrics/integration/render-tests/symbol-z-order/default/expected.png differ diff --git a/metrics/integration/render-tests/symbol-z-order/default/style.json b/metrics/integration/render-tests/symbol-z-order/default/style.json new file mode 100644 index 00000000000..93529ae86c1 --- /dev/null +++ b/metrics/integration/render-tests/symbol-z-order/default/style.json @@ -0,0 +1,75 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 128, + "width": 128 + } + }, + "center": [ + 0, + 0 + ], + "zoom": 0, + "sources": { + "icon-source": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ + 7, + 7 + ] + }, + "properties": { + "icon": "building" + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ + 14, + 14 + ] + }, + "properties": { + "icon": "restaurant" + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + }, + "properties": { + "icon": "school" + } + } + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "icons", + "type": "symbol", + "source": "icon-source", + "layout": { + "icon-image": "{icon}-12", + "icon-allow-overlap": true + } + } + ] +} diff --git a/metrics/integration/render-tests/symbol-z-order/disabled/expected.png b/metrics/integration/render-tests/symbol-z-order/disabled/expected.png new file mode 100644 index 00000000000..6b9610f0a97 Binary files /dev/null and b/metrics/integration/render-tests/symbol-z-order/disabled/expected.png differ diff --git a/metrics/integration/render-tests/symbol-z-order/disabled/style.json b/metrics/integration/render-tests/symbol-z-order/disabled/style.json new file mode 100644 index 00000000000..5049905fa8d --- /dev/null +++ b/metrics/integration/render-tests/symbol-z-order/disabled/style.json @@ -0,0 +1,76 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 128, + "width": 128 + } + }, + "center": [ + 0, + 0 + ], + "zoom": 0, + "sources": { + "icon-source": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ + 7, + 7 + ] + }, + "properties": { + "icon": "building" + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ + 14, + 14 + ] + }, + "properties": { + "icon": "restaurant" + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + }, + "properties": { + "icon": "school" + } + } + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "icons", + "type": "symbol", + "source": "icon-source", + "layout": { + "icon-image": "{icon}-12", + "icon-allow-overlap": true, + "symbol-z-order": "source" + } + } + ] +} diff --git a/metrics/integration/render-tests/symbol-z-order/icon-with-text/expected.png b/metrics/integration/render-tests/symbol-z-order/icon-with-text/expected.png new file mode 100644 index 00000000000..7949950573d Binary files /dev/null and b/metrics/integration/render-tests/symbol-z-order/icon-with-text/expected.png differ diff --git a/metrics/integration/render-tests/symbol-z-order/icon-with-text/style.json b/metrics/integration/render-tests/symbol-z-order/icon-with-text/style.json new file mode 100644 index 00000000000..e4bbfbae7f8 --- /dev/null +++ b/metrics/integration/render-tests/symbol-z-order/icon-with-text/style.json @@ -0,0 +1,89 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 128, + "width": 128 + } + }, + "center": [ + 0, + 0 + ], + "zoom": 0, + "pitch": 60, + "sources": { + "icon-source": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ + 7, + 7 + ] + }, + "properties": { + "icon": "building", + "title": "building" + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ + 14, + 14 + ] + }, + "properties": { + "icon": "restaurant", + "title": "restaurant" + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + }, + "properties": { + "icon": "school", + "title": "school" + } + } + ] + } + } + }, + "sprite": "local://sprites/sprite", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "icons", + "type": "symbol", + "source": "icon-source", + "layout": { + "symbol-z-order": "source", + "icon-image": "{icon}-12", + "icon-allow-overlap": true, + "text-allow-overlap": true, + "text-field": "{title}", + "text-font": ["Open Sans Semibold", "Arial Unicode MS Bold"], + "text-offset": [0, 0.6], + "text-anchor": "top" + }, + "paint": { + "text-color": "#ffffff" + } + } + ] +} diff --git a/metrics/integration/render-tests/symbol-z-order/pitched/expected.png b/metrics/integration/render-tests/symbol-z-order/pitched/expected.png new file mode 100644 index 00000000000..1eb86b35359 Binary files /dev/null and b/metrics/integration/render-tests/symbol-z-order/pitched/expected.png differ diff --git a/metrics/integration/render-tests/symbol-z-order/pitched/style.json b/metrics/integration/render-tests/symbol-z-order/pitched/style.json new file mode 100644 index 00000000000..1ce3560c56a --- /dev/null +++ b/metrics/integration/render-tests/symbol-z-order/pitched/style.json @@ -0,0 +1,77 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 128, + "width": 128 + } + }, + "center": [ + 0, + 0 + ], + "zoom": 0, + "pitch": 45, + "sources": { + "icon-source": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ + 7, + 7 + ] + }, + "properties": { + "icon": "building" + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ + 14, + 14 + ] + }, + "properties": { + "icon": "restaurant" + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + }, + "properties": { + "icon": "school" + } + } + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "icons", + "type": "symbol", + "source": "icon-source", + "layout": { + "icon-image": "{icon}-12", + "icon-allow-overlap": true, + "symbol-z-order": "source" + } + } + ] +} diff --git a/metrics/integration/render-tests/symbol-z-order/viewport-y/expected.png b/metrics/integration/render-tests/symbol-z-order/viewport-y/expected.png new file mode 100644 index 00000000000..3a5bf1ea918 Binary files /dev/null and b/metrics/integration/render-tests/symbol-z-order/viewport-y/expected.png differ diff --git a/metrics/integration/render-tests/symbol-z-order/viewport-y/style.json b/metrics/integration/render-tests/symbol-z-order/viewport-y/style.json new file mode 100644 index 00000000000..314838987c5 --- /dev/null +++ b/metrics/integration/render-tests/symbol-z-order/viewport-y/style.json @@ -0,0 +1,90 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 128, + "width": 128 + } + }, + "center": [ + 0, + 0 + ], + "zoom": 0, + "pitch": 0, + "sources": { + "icon-source": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ + 7, + 7 + ] + }, + "properties": { + "icon": "building", + "title": "building" + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ + 14, + 14 + ] + }, + "properties": { + "icon": "restaurant", + "title": "restaurant" + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + }, + "properties": { + "icon": "school", + "title": "school" + } + } + ] + } + } + }, + "sprite": "local://sprites/sprite", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "icons", + "type": "symbol", + "source": "icon-source", + "layout": { + "symbol-z-order": "viewport-y", + "icon-image": "{icon}-12", + "icon-allow-overlap": true, + "icon-ignore-placement": true, + "text-optional": true, + "text-field": "{title}", + "text-font": ["Open Sans Semibold", "Arial Unicode MS Bold"], + "text-offset": [0, 0.6], + "text-anchor": "top" + }, + "paint": { + "text-color": "black" + } + } + ] +} diff --git a/metrics/integration/render-tests/text-anchor/bottom-left/expected.png b/metrics/integration/render-tests/text-anchor/bottom-left/expected.png new file mode 100644 index 00000000000..e363bafbf1f Binary files /dev/null and b/metrics/integration/render-tests/text-anchor/bottom-left/expected.png differ diff --git a/metrics/integration/render-tests/text-anchor/bottom-left/style.json b/metrics/integration/render-tests/text-anchor/bottom-left/style.json new file mode 100644 index 00000000000..95382741667 --- /dev/null +++ b/metrics/integration/render-tests/text-anchor/bottom-left/style.json @@ -0,0 +1,63 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "sprite": "local://sprites/sprite", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "bottom-left", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "filter": [ + "==", + "maki", + "restaurant" + ], + "layout": { + "symbol-placement": "point", + "icon-allow-overlap": true, + "icon-ignore-placement": true, + "icon-image": "dot.sdf", + "text-allow-overlap": true, + "text-ignore-placement": true, + "text-field": "Test Test Test", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-max-width": 5, + "text-anchor": "bottom-left" + }, + "paint": { + "icon-opacity": 1, + "text-opacity": 1 + } + } + ] +} diff --git a/metrics/integration/render-tests/text-anchor/bottom-right/expected.png b/metrics/integration/render-tests/text-anchor/bottom-right/expected.png new file mode 100644 index 00000000000..e6b4d45d900 Binary files /dev/null and b/metrics/integration/render-tests/text-anchor/bottom-right/expected.png differ diff --git a/metrics/integration/render-tests/text-anchor/bottom-right/style.json b/metrics/integration/render-tests/text-anchor/bottom-right/style.json new file mode 100644 index 00000000000..651bd45bfd8 --- /dev/null +++ b/metrics/integration/render-tests/text-anchor/bottom-right/style.json @@ -0,0 +1,63 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "sprite": "local://sprites/sprite", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "bottom-right", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "filter": [ + "==", + "maki", + "restaurant" + ], + "layout": { + "symbol-placement": "point", + "icon-allow-overlap": true, + "icon-ignore-placement": true, + "icon-image": "dot.sdf", + "text-allow-overlap": true, + "text-ignore-placement": true, + "text-field": "Test Test Test", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-max-width": 5, + "text-anchor": "bottom-right" + }, + "paint": { + "icon-opacity": 1, + "text-opacity": 1 + } + } + ] +} diff --git a/metrics/integration/render-tests/text-anchor/bottom/expected.png b/metrics/integration/render-tests/text-anchor/bottom/expected.png new file mode 100644 index 00000000000..6975dbe9449 Binary files /dev/null and b/metrics/integration/render-tests/text-anchor/bottom/expected.png differ diff --git a/metrics/integration/render-tests/text-anchor/bottom/style.json b/metrics/integration/render-tests/text-anchor/bottom/style.json new file mode 100644 index 00000000000..6d34a8addf8 --- /dev/null +++ b/metrics/integration/render-tests/text-anchor/bottom/style.json @@ -0,0 +1,63 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "sprite": "local://sprites/sprite", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "bottom", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "filter": [ + "==", + "maki", + "restaurant" + ], + "layout": { + "symbol-placement": "point", + "icon-allow-overlap": true, + "icon-ignore-placement": true, + "icon-image": "dot.sdf", + "text-allow-overlap": true, + "text-ignore-placement": true, + "text-field": "Test Test Test", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-max-width": 5, + "text-anchor": "bottom" + }, + "paint": { + "icon-opacity": 1, + "text-opacity": 1 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/text-anchor/center/expected.png b/metrics/integration/render-tests/text-anchor/center/expected.png new file mode 100644 index 00000000000..b7defc13875 Binary files /dev/null and b/metrics/integration/render-tests/text-anchor/center/expected.png differ diff --git a/metrics/integration/render-tests/text-anchor/center/style.json b/metrics/integration/render-tests/text-anchor/center/style.json new file mode 100644 index 00000000000..2d444a4ad29 --- /dev/null +++ b/metrics/integration/render-tests/text-anchor/center/style.json @@ -0,0 +1,63 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "sprite": "local://sprites/sprite", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "center", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "filter": [ + "==", + "maki", + "restaurant" + ], + "layout": { + "symbol-placement": "point", + "icon-allow-overlap": true, + "icon-ignore-placement": true, + "icon-image": "dot.sdf", + "text-allow-overlap": true, + "text-ignore-placement": true, + "text-field": "Test Test Test", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-max-width": 5, + "text-anchor": "center" + }, + "paint": { + "icon-opacity": 1, + "text-opacity": 1 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/text-anchor/left/expected.png b/metrics/integration/render-tests/text-anchor/left/expected.png new file mode 100644 index 00000000000..2dc6dac3998 Binary files /dev/null and b/metrics/integration/render-tests/text-anchor/left/expected.png differ diff --git a/metrics/integration/render-tests/text-anchor/left/style.json b/metrics/integration/render-tests/text-anchor/left/style.json new file mode 100644 index 00000000000..78d52d9c67a --- /dev/null +++ b/metrics/integration/render-tests/text-anchor/left/style.json @@ -0,0 +1,63 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "sprite": "local://sprites/sprite", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "left", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "filter": [ + "==", + "maki", + "restaurant" + ], + "layout": { + "symbol-placement": "point", + "icon-allow-overlap": true, + "icon-ignore-placement": true, + "icon-image": "dot.sdf", + "text-allow-overlap": true, + "text-ignore-placement": true, + "text-field": "Test Test Test", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-max-width": 5, + "text-anchor": "left" + }, + "paint": { + "icon-opacity": 1, + "text-opacity": 1 + } + } + ] +} diff --git a/metrics/integration/render-tests/text-anchor/property-function/expected.png b/metrics/integration/render-tests/text-anchor/property-function/expected.png new file mode 100644 index 00000000000..879ca161f3f Binary files /dev/null and b/metrics/integration/render-tests/text-anchor/property-function/expected.png differ diff --git a/metrics/integration/render-tests/text-anchor/property-function/style.json b/metrics/integration/render-tests/text-anchor/property-function/style.json new file mode 100644 index 00000000000..08d0351ca73 --- /dev/null +++ b/metrics/integration/render-tests/text-anchor/property-function/style.json @@ -0,0 +1,114 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256, + "width": 256 + } + }, + "center": [ 0, 0 ], + "zoom": 0, + "sources": { + "point": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { "x": "bottom-right" }, + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + }, + { + "type": "Feature", + "properties": { "x": "bottom" }, + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + }, + { + "type": "Feature", + "properties": { "x": "bottom-left" }, + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + }, + { + "type": "Feature", + "properties": { "x": "right" }, + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + }, + { + "type": "Feature", + "properties": { "x": "center" }, + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + }, + { + "type": "Feature", + "properties": { "x": "left" }, + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + }, + { + "type": "Feature", + "properties": { "x": "top-right" }, + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + }, + { + "type": "Feature", + "properties": { "x": "top" }, + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + }, + { + "type": "Feature", + "properties": { "x": "top-left" }, + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + } + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "text", + "type": "symbol", + "source": "point", + "layout": { + "text-field": "x", + "text-size": 40, + "text-anchor": { + "type": "identity", + "property": "x" + }, + "text-allow-overlap": true, + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + } + } + ] +} diff --git a/metrics/integration/render-tests/text-anchor/right/expected.png b/metrics/integration/render-tests/text-anchor/right/expected.png new file mode 100644 index 00000000000..58eb3074b0f Binary files /dev/null and b/metrics/integration/render-tests/text-anchor/right/expected.png differ diff --git a/metrics/integration/render-tests/text-anchor/right/style.json b/metrics/integration/render-tests/text-anchor/right/style.json new file mode 100644 index 00000000000..bef465ebcb1 --- /dev/null +++ b/metrics/integration/render-tests/text-anchor/right/style.json @@ -0,0 +1,63 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "sprite": "local://sprites/sprite", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "right", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "filter": [ + "==", + "maki", + "restaurant" + ], + "layout": { + "symbol-placement": "point", + "icon-allow-overlap": true, + "icon-ignore-placement": true, + "icon-image": "dot.sdf", + "text-allow-overlap": true, + "text-ignore-placement": true, + "text-field": "Test Test Test", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-max-width": 5, + "text-anchor": "right" + }, + "paint": { + "icon-opacity": 1, + "text-opacity": 1 + } + } + ] +} diff --git a/metrics/integration/render-tests/text-anchor/top-left/expected.png b/metrics/integration/render-tests/text-anchor/top-left/expected.png new file mode 100644 index 00000000000..4a56ac43ded Binary files /dev/null and b/metrics/integration/render-tests/text-anchor/top-left/expected.png differ diff --git a/metrics/integration/render-tests/text-anchor/top-left/style.json b/metrics/integration/render-tests/text-anchor/top-left/style.json new file mode 100644 index 00000000000..118e9aad9b6 --- /dev/null +++ b/metrics/integration/render-tests/text-anchor/top-left/style.json @@ -0,0 +1,63 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "sprite": "local://sprites/sprite", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "top-left", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "filter": [ + "==", + "maki", + "restaurant" + ], + "layout": { + "symbol-placement": "point", + "icon-allow-overlap": true, + "icon-ignore-placement": true, + "icon-image": "dot.sdf", + "text-allow-overlap": true, + "text-ignore-placement": true, + "text-field": "Test Test Test", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-max-width": 5, + "text-anchor": "top-left" + }, + "paint": { + "icon-opacity": 1, + "text-opacity": 1 + } + } + ] +} diff --git a/metrics/integration/render-tests/text-anchor/top-right/expected.png b/metrics/integration/render-tests/text-anchor/top-right/expected.png new file mode 100644 index 00000000000..69e086962b9 Binary files /dev/null and b/metrics/integration/render-tests/text-anchor/top-right/expected.png differ diff --git a/metrics/integration/render-tests/text-anchor/top-right/style.json b/metrics/integration/render-tests/text-anchor/top-right/style.json new file mode 100644 index 00000000000..8a0797f8172 --- /dev/null +++ b/metrics/integration/render-tests/text-anchor/top-right/style.json @@ -0,0 +1,63 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "sprite": "local://sprites/sprite", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "top-right", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "filter": [ + "==", + "maki", + "restaurant" + ], + "layout": { + "symbol-placement": "point", + "icon-allow-overlap": true, + "icon-ignore-placement": true, + "icon-image": "dot.sdf", + "text-allow-overlap": true, + "text-ignore-placement": true, + "text-field": "Test Test Test", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-max-width": 5, + "text-anchor": "top-right" + }, + "paint": { + "icon-opacity": 1, + "text-opacity": 1 + } + } + ] +} diff --git a/metrics/integration/render-tests/text-anchor/top/expected.png b/metrics/integration/render-tests/text-anchor/top/expected.png new file mode 100644 index 00000000000..ec0554cac8f Binary files /dev/null and b/metrics/integration/render-tests/text-anchor/top/expected.png differ diff --git a/metrics/integration/render-tests/text-anchor/top/style.json b/metrics/integration/render-tests/text-anchor/top/style.json new file mode 100644 index 00000000000..88cc8c17bbe --- /dev/null +++ b/metrics/integration/render-tests/text-anchor/top/style.json @@ -0,0 +1,63 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "sprite": "local://sprites/sprite", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "top", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "filter": [ + "==", + "maki", + "restaurant" + ], + "layout": { + "symbol-placement": "point", + "icon-allow-overlap": true, + "icon-ignore-placement": true, + "icon-image": "dot.sdf", + "text-allow-overlap": true, + "text-ignore-placement": true, + "text-field": "Test Test Test", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-max-width": 5, + "text-anchor": "top" + }, + "paint": { + "icon-opacity": 1, + "text-opacity": 1 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/text-arabic/letter-spacing/expected.png b/metrics/integration/render-tests/text-arabic/letter-spacing/expected.png new file mode 100644 index 00000000000..6b19853f2c3 Binary files /dev/null and b/metrics/integration/render-tests/text-arabic/letter-spacing/expected.png differ diff --git a/metrics/integration/render-tests/text-arabic/letter-spacing/style.json b/metrics/integration/render-tests/text-arabic/letter-spacing/style.json new file mode 100644 index 00000000000..fb56e6df843 --- /dev/null +++ b/metrics/integration/render-tests/text-arabic/letter-spacing/style.json @@ -0,0 +1,56 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 256, + "height": 256 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { "name": "مجتمع آپارتمانهای مرتفع Not spaced" }, + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + }, + { + "type": "Feature", + "properties": { "name": "Spaced" }, + "geometry": { + "type": "Point", + "coordinates": [ 0, 30 ] + } + } + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "symbol-placement": "point", + "symbol-spacing": 20, + "text-allow-overlap": true, + "text-letter-spacing": 1, + "text-rotation-alignment": "auto", + "text-max-width": 5, + "text-field": "{name}", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + } + } + ] +} diff --git a/metrics/integration/render-tests/text-arabic/line-break-mixed/expected.png b/metrics/integration/render-tests/text-arabic/line-break-mixed/expected.png new file mode 100644 index 00000000000..15712ff2d4d Binary files /dev/null and b/metrics/integration/render-tests/text-arabic/line-break-mixed/expected.png differ diff --git a/metrics/integration/render-tests/text-arabic/line-break-mixed/style.json b/metrics/integration/render-tests/text-arabic/line-break-mixed/style.json new file mode 100644 index 00000000000..d7a22f989c0 --- /dev/null +++ b/metrics/integration/render-tests/text-arabic/line-break-mixed/style.json @@ -0,0 +1,43 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 256, + "height": 256 + } + }, + "bearing": 45, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": + [ + 0, + 0 + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "symbol-placement": "point", + "symbol-spacing": 20, + "text-allow-overlap": true, + "text-rotation-alignment": "auto", + "text-max-width": 5, + "text-field": "مكتبة الإسكندرية‎‎ Maktabat al-Iskandarīyah", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + } + } + ] +} diff --git a/metrics/integration/render-tests/text-arabic/line-break/expected.png b/metrics/integration/render-tests/text-arabic/line-break/expected.png new file mode 100644 index 00000000000..a6dfc81243e Binary files /dev/null and b/metrics/integration/render-tests/text-arabic/line-break/expected.png differ diff --git a/metrics/integration/render-tests/text-arabic/line-break/style.json b/metrics/integration/render-tests/text-arabic/line-break/style.json new file mode 100644 index 00000000000..12c88297327 --- /dev/null +++ b/metrics/integration/render-tests/text-arabic/line-break/style.json @@ -0,0 +1,43 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 128, + "height": 128 + } + }, + "bearing": 45, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": + [ + 0, + 0 + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "symbol-placement": "point", + "symbol-spacing": 20, + "text-allow-overlap": true, + "text-rotation-alignment": "auto", + "text-max-width": 5, + "text-field": "مجتمع آپارتمانهای مرتفع", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + } + } + ] +} diff --git a/metrics/integration/render-tests/text-arabic/mixed-numeric/expected.png b/metrics/integration/render-tests/text-arabic/mixed-numeric/expected.png new file mode 100644 index 00000000000..802488872d7 Binary files /dev/null and b/metrics/integration/render-tests/text-arabic/mixed-numeric/expected.png differ diff --git a/metrics/integration/render-tests/text-arabic/mixed-numeric/style.json b/metrics/integration/render-tests/text-arabic/mixed-numeric/style.json new file mode 100644 index 00000000000..b0ca0c2e978 --- /dev/null +++ b/metrics/integration/render-tests/text-arabic/mixed-numeric/style.json @@ -0,0 +1,47 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 128, + "height": 128 + } + }, + "bearing": 45, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "LineString", + "coordinates": [ + [ + -40, + 0 + ], + [ + 40, + 0 + ] + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "symbol-placement": "line", + "symbol-spacing": 20, + "text-allow-overlap": true, + "text-rotation-alignment": "auto", + "text-field": "سلام۳۹", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + } + } + ] +} diff --git a/metrics/integration/render-tests/text-arabic/multi-paragraph/expected.png b/metrics/integration/render-tests/text-arabic/multi-paragraph/expected.png new file mode 100644 index 00000000000..97bb81418f7 Binary files /dev/null and b/metrics/integration/render-tests/text-arabic/multi-paragraph/expected.png differ diff --git a/metrics/integration/render-tests/text-arabic/multi-paragraph/style.json b/metrics/integration/render-tests/text-arabic/multi-paragraph/style.json new file mode 100644 index 00000000000..a27359d603a --- /dev/null +++ b/metrics/integration/render-tests/text-arabic/multi-paragraph/style.json @@ -0,0 +1,43 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 256, + "height": 256 + } + }, + "bearing": 45, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": + [ + 0, + 0 + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "symbol-placement": "point", + "symbol-spacing": 20, + "text-allow-overlap": true, + "text-rotation-alignment": "auto", + "text-max-width": 5, + "text-field": "مكتبة الإسكندرية‎‎ Maktabat\u001c al-Iskandarīyah\n\nSome\nnew\nمكتبة lines", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + } + } + ] +} diff --git a/metrics/integration/render-tests/text-color/default/expected.png b/metrics/integration/render-tests/text-color/default/expected.png new file mode 100644 index 00000000000..147ff7a0de9 Binary files /dev/null and b/metrics/integration/render-tests/text-color/default/expected.png differ diff --git a/metrics/integration/render-tests/text-color/default/style.json b/metrics/integration/render-tests/text-color/default/style.json new file mode 100644 index 00000000000..a63ad2856f5 --- /dev/null +++ b/metrics/integration/render-tests/text-color/default/style.json @@ -0,0 +1,54 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "text", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "filter": [ + "==", + "maki", + "restaurant" + ], + "layout": { + "symbol-placement": "point", + "text-allow-overlap": true, + "text-ignore-placement": true, + "text-field": "Test", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + }, + "paint": {} + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/text-color/function/expected.png b/metrics/integration/render-tests/text-color/function/expected.png new file mode 100644 index 00000000000..f88815487a8 Binary files /dev/null and b/metrics/integration/render-tests/text-color/function/expected.png differ diff --git a/metrics/integration/render-tests/text-color/function/style.json b/metrics/integration/render-tests/text-color/function/style.json new file mode 100644 index 00000000000..3ec1f6fb646 --- /dev/null +++ b/metrics/integration/render-tests/text-color/function/style.json @@ -0,0 +1,67 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "text", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "filter": [ + "==", + "maki", + "restaurant" + ], + "layout": { + "symbol-placement": "point", + "text-allow-overlap": true, + "text-ignore-placement": true, + "text-field": "Test", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + }, + "paint": { + "text-color": { + "stops": [ + [ + 16, + "red" + ], + [ + 17, + "blue" + ] + ] + } + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/text-color/literal/expected.png b/metrics/integration/render-tests/text-color/literal/expected.png new file mode 100644 index 00000000000..1217157587b Binary files /dev/null and b/metrics/integration/render-tests/text-color/literal/expected.png differ diff --git a/metrics/integration/render-tests/text-color/literal/style.json b/metrics/integration/render-tests/text-color/literal/style.json new file mode 100644 index 00000000000..506e16854e6 --- /dev/null +++ b/metrics/integration/render-tests/text-color/literal/style.json @@ -0,0 +1,56 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "text", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "filter": [ + "==", + "maki", + "restaurant" + ], + "layout": { + "symbol-placement": "point", + "text-allow-overlap": true, + "text-ignore-placement": true, + "text-field": "Test", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + }, + "paint": { + "text-color": "blue" + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/text-color/property-function/expected.png b/metrics/integration/render-tests/text-color/property-function/expected.png new file mode 100644 index 00000000000..252c901aa15 Binary files /dev/null and b/metrics/integration/render-tests/text-color/property-function/expected.png differ diff --git a/metrics/integration/render-tests/text-color/property-function/style.json b/metrics/integration/render-tests/text-color/property-function/style.json new file mode 100644 index 00000000000..a4cdf7453df --- /dev/null +++ b/metrics/integration/render-tests/text-color/property-function/style.json @@ -0,0 +1,74 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 64, + "width": 64 + } + }, + "center": [ 0, 0 ], + "zoom": 0, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { "x": 0 }, + "geometry": { + "type": "Point", + "coordinates": [ + 0, + -10 + ] + } + }, + { + "type": "Feature", + "properties": { "x": 1 }, + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 10 + ] + } + } + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "text", + "type": "symbol", + "source": "geojson", + "layout": { + "text-allow-overlap": true, + "text-field": "Test", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + }, + "paint": { + "text-color": { + "property": "x", + "stops": [ + [ + 0, + "red" + ], + [ + 1, + "blue" + ] + ] + } + } + } + ] +} diff --git a/metrics/integration/render-tests/text-field/formatted-arabic/expected.png b/metrics/integration/render-tests/text-field/formatted-arabic/expected.png new file mode 100644 index 00000000000..cbb7afa2252 Binary files /dev/null and b/metrics/integration/render-tests/text-field/formatted-arabic/expected.png differ diff --git a/metrics/integration/render-tests/text-field/formatted-arabic/style.json b/metrics/integration/render-tests/text-field/formatted-arabic/style.json new file mode 100644 index 00000000000..3e694e5464a --- /dev/null +++ b/metrics/integration/render-tests/text-field/formatted-arabic/style.json @@ -0,0 +1,61 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256, + "width": 256 + } + }, + "center": [ 0, 0 ], + "zoom": 0, + "sources": { + "point": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "name": "بغداد", + "name_en": "Baghdad" + }, + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + } + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "text", + "type": "symbol", + "source": "point", + "layout": { + "text-field": ["format", + ["get", "name"], { "font-scale": 1.5 }, + " ", {}, + ["get", "name_en"], { "font-scale": 0.5, "text-font": ["literal", [ "NotoCJK" ]] }, + " ", {}, + ["get", "name"], { "font-scale": 1.5 }, + " ", {}, + ["get", "name_en"], { "font-scale": 0.5, "text-font": ["literal", [ "NotoCJK" ]] }, + " ", {}, + ["get", "name"], { "font-scale": 1.5 }, + " ", {}, + ["get", "name_en"], { "font-scale": 0.5, "text-font": ["literal", [ "NotoCJK" ]] } + ], + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-size": 24, + "text-max-width": 10 + } + } + ] +} diff --git a/metrics/integration/render-tests/text-field/formatted-images-constant-size/expected.png b/metrics/integration/render-tests/text-field/formatted-images-constant-size/expected.png new file mode 100644 index 00000000000..cc27f0bcdce Binary files /dev/null and b/metrics/integration/render-tests/text-field/formatted-images-constant-size/expected.png differ diff --git a/metrics/integration/render-tests/text-field/formatted-images-constant-size/style.json b/metrics/integration/render-tests/text-field/formatted-images-constant-size/style.json new file mode 100644 index 00000000000..64be0e32c3d --- /dev/null +++ b/metrics/integration/render-tests/text-field/formatted-images-constant-size/style.json @@ -0,0 +1,59 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 128, + "width": 128 + } + }, + "center": [ 0, 0 ], + "zoom": 0, + "sources": { + "point": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ 0, 20 ] + } + } + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "sprite": "local://sprites/emerald@2x", + "layers": [ + { + "id": "text", + "type": "symbol", + "source": "point", + "layout": { + "text-offset": [0.1, 0], + "text-field": ["format", "Square ", ["image", "default_1"]], + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + } + }, + { + "id": "images", + "type": "symbol", + "source": "point", + "layout": { + "text-offset": [0, 1.2], + "text-size": 30, + "text-field": ["format", "Square ", ["image", "default_1"]], + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + } + } + ] +} diff --git a/metrics/integration/render-tests/text-field/formatted-images-line/expected.png b/metrics/integration/render-tests/text-field/formatted-images-line/expected.png new file mode 100644 index 00000000000..5fefdc0490e Binary files /dev/null and b/metrics/integration/render-tests/text-field/formatted-images-line/expected.png differ diff --git a/metrics/integration/render-tests/text-field/formatted-images-line/style.json b/metrics/integration/render-tests/text-field/formatted-images-line/style.json new file mode 100644 index 00000000000..2b5ad09a887 --- /dev/null +++ b/metrics/integration/render-tests/text-field/formatted-images-line/style.json @@ -0,0 +1,82 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 160, + "width": 100 + } + }, + "center": [ -0.0055, 0.0065 ], + "zoom": 14, + "bearing": 60, + "sources": { + "line": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "geometry": { + "coordinates": [ + [ + -0.008778156849501784, + 0.004124676107977621 + ], + [ + -0.00581685092268458, + 0.007085982020228698 + ], + [ + -0.0037016324048408933, + 0.0072975038696938554 + ], + [ + -0.0007403264791605579, + 0.006239894618133235 + ], + [ + 0.0009518483364558961, + 0.004336197959602828 + ] + ], + "type": "LineString" + }, + "type": "Feature", + "properties": {} + } + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "sprite": "local://sprites/emerald", + "layers": [ + { + "id": "line", + "type": "symbol", + "source": "line", + "layout": { + "symbol-placement": "line", + "symbol-spacing": 100, + "text-field": ["format", "London", + ["image", "london-overground"], + ["image", "london-underground"], + ["image", "national-rail"], + ["image", "dlr"] + ], + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + } + }, + { + "id": "outline", + "type": "line", + "source": "line", + "paint": { + "line-opacity": 0.2 + } + } + ] +} diff --git a/metrics/integration/render-tests/text-field/formatted-images-multiline/expected.png b/metrics/integration/render-tests/text-field/formatted-images-multiline/expected.png new file mode 100644 index 00000000000..1d2c7701d60 Binary files /dev/null and b/metrics/integration/render-tests/text-field/formatted-images-multiline/expected.png differ diff --git a/metrics/integration/render-tests/text-field/formatted-images-multiline/style.json b/metrics/integration/render-tests/text-field/formatted-images-multiline/style.json new file mode 100644 index 00000000000..7f71170e9b0 --- /dev/null +++ b/metrics/integration/render-tests/text-field/formatted-images-multiline/style.json @@ -0,0 +1,75 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 128, + "width": 128 + } + }, + "center": [ 0, 0 ], + "zoom": 0, + "sources": { + "multiline": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ 0, 30 ] + } + } + ] + } + }, + "multiline_with_scale": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ 0, -18 ] + } + } + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "sprite": "local://sprites/emerald", + "layers": [ + { + "id": "multiline", + "type": "symbol", + "source": "multiline", + "layout": { + "text-max-width": 4, + "text-field": ["format", "London", ["image", "london-underground.national-rail"], + "Berlin", ["image", "s-bahn.u-bahn"]], + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + } + }, + { + "id": "multiline_with_scale", + "type": "symbol", + "source": "multiline_with_scale", + "layout": { + "text-max-width": 8, + "text-field": ["format", "Paris", ["image", "rer.transilien"], + "USA", ["image", "interstate_1"]], + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + } + } + ] +} diff --git a/metrics/integration/render-tests/text-field/formatted-images-variable-anchors-justification/expected.png b/metrics/integration/render-tests/text-field/formatted-images-variable-anchors-justification/expected.png new file mode 100644 index 00000000000..18696d91b95 Binary files /dev/null and b/metrics/integration/render-tests/text-field/formatted-images-variable-anchors-justification/expected.png differ diff --git a/metrics/integration/render-tests/text-field/formatted-images-variable-anchors-justification/style.json b/metrics/integration/render-tests/text-field/formatted-images-variable-anchors-justification/style.json new file mode 100644 index 00000000000..9db78cb894c --- /dev/null +++ b/metrics/integration/render-tests/text-field/formatted-images-variable-anchors-justification/style.json @@ -0,0 +1,103 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 160, + "width": 200 + } + }, + "center": [ 0.1, 0 ], + "zoom": 0, + "sources": { + "point": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + } + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "sprite": "local://sprites/emerald@2x", + "layers": [ + { + "id": "text", + "type": "symbol", + "source": "point", + "layout": { + "text-justify": "auto", + "text-radial-offset": 2.55, + "text-variable-anchor": ["center", "left", "right", "top", "bottom", "top-left", "top-right", "bottom-left", "bottom-right"], + "text-field": ["format", "Square", "\n", ["image", "default_1"]], + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + } + } + ] +} diff --git a/metrics/integration/render-tests/text-field/formatted-images-vertical/expected.png b/metrics/integration/render-tests/text-field/formatted-images-vertical/expected.png new file mode 100644 index 00000000000..db1901df9e2 Binary files /dev/null and b/metrics/integration/render-tests/text-field/formatted-images-vertical/expected.png differ diff --git a/metrics/integration/render-tests/text-field/formatted-images-vertical/style.json b/metrics/integration/render-tests/text-field/formatted-images-vertical/style.json new file mode 100644 index 00000000000..7b8e34555a9 --- /dev/null +++ b/metrics/integration/render-tests/text-field/formatted-images-vertical/style.json @@ -0,0 +1,46 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 168, + "width": 128 + } + }, + "center": [ 0, 0 ], + "zoom": 0, + "sources": { + "vertical": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + } + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "sprite": "local://sprites/emerald", + "layers": [ + { + "id": "vertical", + "type": "symbol", + "source": "vertical", + "layout": { + "text-writing-mode": ["vertical"], + "text-field": ["format", "London", ["image", "london-overground.london-underground.national-rail"], + "IH", ["image", "interstate_1"], ["image", "government_icon"], "ッ",{"font-scale": 1.8}], + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + } + } + ] +} diff --git a/metrics/integration/render-tests/text-field/formatted-images-zoom-dependent-size/expected.png b/metrics/integration/render-tests/text-field/formatted-images-zoom-dependent-size/expected.png new file mode 100644 index 00000000000..69caad5f216 Binary files /dev/null and b/metrics/integration/render-tests/text-field/formatted-images-zoom-dependent-size/expected.png differ diff --git a/metrics/integration/render-tests/text-field/formatted-images-zoom-dependent-size/style.json b/metrics/integration/render-tests/text-field/formatted-images-zoom-dependent-size/style.json new file mode 100644 index 00000000000..343c4e05fa9 --- /dev/null +++ b/metrics/integration/render-tests/text-field/formatted-images-zoom-dependent-size/style.json @@ -0,0 +1,69 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 128, + "width": 128, + "allowed": 0.014 + } + }, + "center": [ 0, 0 ], + "zoom": 12, + "sources": { + "point": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + } + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "sprite": "local://sprites/emerald@2x", + "layers": [ + { + "id": "text_zoom_constant", + "type": "symbol", + "source": "point", + "layout": { + "text-offset": [0, -1], + "text-size": [ + "interpolate", + ["linear"], + ["zoom"], + 11, + 8, + 13, + 34 + ], + "text-field": ["format", "Zoom", ["image", "rer"]], + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + } + }, + { + "id": "text_zoom_dependent", + "type": "symbol", + "source": "point", + "layout": { + "text-offset": [0, 1], + "text-size": 21, + "text-field": ["format", "Zoom", ["image", "rer"]], + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + } + } + ] +} diff --git a/metrics/integration/render-tests/text-field/formatted-images/expected.png b/metrics/integration/render-tests/text-field/formatted-images/expected.png new file mode 100644 index 00000000000..dd6707b6877 Binary files /dev/null and b/metrics/integration/render-tests/text-field/formatted-images/expected.png differ diff --git a/metrics/integration/render-tests/text-field/formatted-images/style.json b/metrics/integration/render-tests/text-field/formatted-images/style.json new file mode 100644 index 00000000000..bcae63e6548 --- /dev/null +++ b/metrics/integration/render-tests/text-field/formatted-images/style.json @@ -0,0 +1,64 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 128, + "width": 128 + } + }, + "center": [ 0, 0 ], + "zoom": 0, + "sources": { + "point": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ 0, 20 ] + } + } + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "sprite": "local://sprites/emerald@2x", + "layers": [ + { + "id": "text", + "type": "symbol", + "source": "point", + "layout": { + "icon-image": ["image", "london-overground"], + "icon-offset": [0, -20], + "text-field": ["format", "London", ["image", "london-underground"]], + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + } + }, + { + "id": "images", + "type": "symbol", + "source": "point", + "layout": { + "text-offset": [0, 2], + "text-size": 20, + "text-field": ["format", ["image", "london-overground"], + ["image", "london-underground"], + ["image", "dlr"], + ["image", "u-bahn"] + ], + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + } + } + ] +} diff --git a/metrics/integration/render-tests/text-field/formatted-line/expected.png b/metrics/integration/render-tests/text-field/formatted-line/expected.png new file mode 100644 index 00000000000..a5c6a684a08 Binary files /dev/null and b/metrics/integration/render-tests/text-field/formatted-line/expected.png differ diff --git a/metrics/integration/render-tests/text-field/formatted-line/style.json b/metrics/integration/render-tests/text-field/formatted-line/style.json new file mode 100644 index 00000000000..cd8e99a5f1e --- /dev/null +++ b/metrics/integration/render-tests/text-field/formatted-line/style.json @@ -0,0 +1,56 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "literal", + "type": "symbol", + "source": "mapbox", + "source-layer": "road_label", + "layout": { + "symbol-placement": "line", + "text-allow-overlap": true, + "text-ignore-placement": true, + "text-field": ["format", + ["get", "name"], { "font-scale": 1.2 }, + " - ", {}, + ["get", "class"], { "font-scale": 0.8, "text-font": ["literal", [ "NotoCJK" ]] } + ], + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-size": 10 + }, + "paint": { + "text-opacity": 1 + } + } + ] +} diff --git a/metrics/integration/render-tests/text-field/formatted-text-color-overrides-nested-expression/expected.png b/metrics/integration/render-tests/text-field/formatted-text-color-overrides-nested-expression/expected.png new file mode 100644 index 00000000000..43a2bb54add Binary files /dev/null and b/metrics/integration/render-tests/text-field/formatted-text-color-overrides-nested-expression/expected.png differ diff --git a/metrics/integration/render-tests/text-field/formatted-text-color-overrides-nested-expression/style.json b/metrics/integration/render-tests/text-field/formatted-text-color-overrides-nested-expression/style.json new file mode 100644 index 00000000000..7825f9b797e --- /dev/null +++ b/metrics/integration/render-tests/text-field/formatted-text-color-overrides-nested-expression/style.json @@ -0,0 +1,82 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 64, + "width": 64 + } + }, + "center": [ 0, 0 ], + "zoom": 0, + "sources": { + "point": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "case": "one" + }, + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + } + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "text", + "type": "symbol", + "source": "point", + "layout": { + "text-field": [ + "match", ["get", "case"], + "false", "error", + "one", ["format", "Green", { "text-color": "green" }, "\n", {}, "Turquoise", {}], + "default" + ], + "text-offset": [0, -1.4], + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-size": 12 + }, + "paint": { + "text-color": "turquoise" + } + }, + { + "id": "text-case", + "type": "symbol", + "source": "point", + "layout": { + "text-size": 12, + "text-offset": [0, 1.4], + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-field": [ + "case", ["!=", ["get", "case"], "one"], + [ + "case", ["==", ["get", "case"], "one"], + "", + ["format", "Should", { "text-color": "red" }, "Not", {}, "See", {}] + ], + [ + "case", ["==", ["get", "case"], "two"], + "", + ["format", "Red", { "text-color": "red" }, "\n", {}, "Black", {}] + ] + ] + } + } + ] +} diff --git a/metrics/integration/render-tests/text-field/formatted-text-color-overrides/expected.png b/metrics/integration/render-tests/text-field/formatted-text-color-overrides/expected.png new file mode 100644 index 00000000000..a38c2d1a070 Binary files /dev/null and b/metrics/integration/render-tests/text-field/formatted-text-color-overrides/expected.png differ diff --git a/metrics/integration/render-tests/text-field/formatted-text-color-overrides/style.json b/metrics/integration/render-tests/text-field/formatted-text-color-overrides/style.json new file mode 100644 index 00000000000..7c9b5a5c802 --- /dev/null +++ b/metrics/integration/render-tests/text-field/formatted-text-color-overrides/style.json @@ -0,0 +1,51 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 64, + "width": 64 + } + }, + "center": [ 0, 0 ], + "zoom": 0, + "sources": { + "point": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + } + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "text", + "type": "symbol", + "source": "point", + "layout": { + "text-field": ["format", + "Color", { "text-color": "black" }, + "\n", {}, + "Turquoise", {} + ], + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-size": 12 + }, + "paint": { + "text-color": "turquoise" + } + } + ] +} diff --git a/metrics/integration/render-tests/text-field/formatted-text-color/expected.png b/metrics/integration/render-tests/text-field/formatted-text-color/expected.png new file mode 100644 index 00000000000..03a96d89cde Binary files /dev/null and b/metrics/integration/render-tests/text-field/formatted-text-color/expected.png differ diff --git a/metrics/integration/render-tests/text-field/formatted-text-color/style.json b/metrics/integration/render-tests/text-field/formatted-text-color/style.json new file mode 100644 index 00000000000..38cd74424f7 --- /dev/null +++ b/metrics/integration/render-tests/text-field/formatted-text-color/style.json @@ -0,0 +1,55 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 128, + "width": 128 + } + }, + "center": [ 0, 0 ], + "zoom": 0, + "sources": { + "point": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "name": "Napoli", + "name_en": "Naples", + "name_color": "blue" + }, + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + } + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "text", + "type": "symbol", + "source": "point", + "layout": { + "text-field": ["format", + ["get", "name_en"], { "font-scale": 1.5, "text-color": "#009246" }, + "Italy", { "font-scale": 0.5, "text-color": "#ce2b37"} , + "\n", {}, + ["get", "name"], { "font-scale": 0.5, "text-color": ["get", "name_color"], "text-font": ["literal", [ "NotoCJK" ]] }, + "Italia", {} + ], + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-size": 20 + } + } + ] +} diff --git a/metrics/integration/render-tests/text-field/formatted/expected.png b/metrics/integration/render-tests/text-field/formatted/expected.png new file mode 100644 index 00000000000..c120b5a0662 Binary files /dev/null and b/metrics/integration/render-tests/text-field/formatted/expected.png differ diff --git a/metrics/integration/render-tests/text-field/formatted/style.json b/metrics/integration/render-tests/text-field/formatted/style.json new file mode 100644 index 00000000000..5fdaa3c4178 --- /dev/null +++ b/metrics/integration/render-tests/text-field/formatted/style.json @@ -0,0 +1,53 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256, + "width": 256 + } + }, + "center": [ 0, 0 ], + "zoom": 0, + "sources": { + "point": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "name": "Napoli", + "name_en": "Naples" + }, + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + } + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "text", + "type": "symbol", + "source": "point", + "layout": { + "text-field": ["format", + ["get", "name_en"], { "font-scale": 1.5 }, + "Italy", { "font-scale": 0.5} , + "\n", {}, + ["get", "name"], { "font-scale": 0.5, "text-font": ["literal", [ "NotoCJK" ]] } + ], + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-size": 32 + } + } + ] +} diff --git a/metrics/integration/render-tests/text-field/literal/expected.png b/metrics/integration/render-tests/text-field/literal/expected.png new file mode 100644 index 00000000000..2e8583d0719 Binary files /dev/null and b/metrics/integration/render-tests/text-field/literal/expected.png differ diff --git a/metrics/integration/render-tests/text-field/literal/style.json b/metrics/integration/render-tests/text-field/literal/style.json new file mode 100644 index 00000000000..5e8f6dd27ba --- /dev/null +++ b/metrics/integration/render-tests/text-field/literal/style.json @@ -0,0 +1,44 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 64, + "width": 64 + } + }, + "center": [ 0, 0 ], + "zoom": 0, + "sources": { + "point": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + } + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "text", + "type": "symbol", + "source": "point", + "layout": { + "text-field": "Test", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + } + } + ] +} diff --git a/metrics/integration/render-tests/text-field/property-function/expected.png b/metrics/integration/render-tests/text-field/property-function/expected.png new file mode 100644 index 00000000000..4f2b867fad6 Binary files /dev/null and b/metrics/integration/render-tests/text-field/property-function/expected.png differ diff --git a/metrics/integration/render-tests/text-field/property-function/style.json b/metrics/integration/render-tests/text-field/property-function/style.json new file mode 100644 index 00000000000..f61c0cf3c71 --- /dev/null +++ b/metrics/integration/render-tests/text-field/property-function/style.json @@ -0,0 +1,59 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 64, + "width": 64 + } + }, + "center": [ 0, 0 ], + "zoom": 0, + "sources": { + "point": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { "x": 1 }, + "geometry": { + "type": "Point", + "coordinates": [ 0, -10 ] + } + }, + { + "type": "Feature", + "properties": { "x": 0 }, + "geometry": { + "type": "Point", + "coordinates": [ 0, 10 ] + } + } + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "text", + "type": "symbol", + "source": "point", + "layout": { + "text-field": { + "type": "categorical", + "property": "x", + "stops": [ + [0, "Zero"], + [1, "One"] + ] + }, + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + } + } + ] +} diff --git a/metrics/integration/render-tests/text-field/token/expected.png b/metrics/integration/render-tests/text-field/token/expected.png new file mode 100644 index 00000000000..dd56c0f4aca Binary files /dev/null and b/metrics/integration/render-tests/text-field/token/expected.png differ diff --git a/metrics/integration/render-tests/text-field/token/style.json b/metrics/integration/render-tests/text-field/token/style.json new file mode 100644 index 00000000000..74871a10f2a --- /dev/null +++ b/metrics/integration/render-tests/text-field/token/style.json @@ -0,0 +1,52 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 64, + "width": 64 + } + }, + "center": [ 0, 0 ], + "zoom": 0, + "sources": { + "point": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { "x": 1 }, + "geometry": { + "type": "Point", + "coordinates": [ 0, -10 ] + } + }, + { + "type": "Feature", + "properties": { "x": 0 }, + "geometry": { + "type": "Point", + "coordinates": [ 0, 10 ] + } + } + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "text", + "type": "symbol", + "source": "point", + "layout": { + "text-field": "Test {x}", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + } + } + ] +} diff --git a/metrics/integration/render-tests/text-font/camera-function/expected.png b/metrics/integration/render-tests/text-font/camera-function/expected.png new file mode 100644 index 00000000000..cbb2c6e7c9d Binary files /dev/null and b/metrics/integration/render-tests/text-font/camera-function/expected.png differ diff --git a/metrics/integration/render-tests/text-font/camera-function/style.json b/metrics/integration/render-tests/text-font/camera-function/style.json new file mode 100644 index 00000000000..5ac3962a1e7 --- /dev/null +++ b/metrics/integration/render-tests/text-font/camera-function/style.json @@ -0,0 +1,54 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 64, + "width": 64 + } + }, + "center": [ + 90, + 45 + ], + "zoom": 1, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Point", + "coordinates": [90, 45] + } + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "text-field": "Test", + "text-font": [ + "step", ["zoom"], + [ "literal", [ "Open Sans Semibold", "Arial Unicode MS Bold" ]], + 1, + ["literal", [ "Open Sans Semibold", "Arial Unicode MS Bold" ]] + ] + }, + "paint": { + "text-opacity": 1 + } + } + ] +} diff --git a/metrics/integration/render-tests/text-font/chinese/expected.png b/metrics/integration/render-tests/text-font/chinese/expected.png new file mode 100644 index 00000000000..af5407b3ae2 Binary files /dev/null and b/metrics/integration/render-tests/text-font/chinese/expected.png differ diff --git a/metrics/integration/render-tests/text-font/chinese/style.json b/metrics/integration/render-tests/text-font/chinese/style.json new file mode 100644 index 00000000000..456481fc99d --- /dev/null +++ b/metrics/integration/render-tests/text-font/chinese/style.json @@ -0,0 +1,44 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 512, + "height": 512, + "allowed": 0.0003 + } + }, + "center": [ + -70.752954126, + 43.39004898677380 + ], + "zoom": 11, + "sources": { + "geojson": { + "type": "geojson", + "data": "local://data/chinese.geojson" + } + }, + "sprite": "local://sprites/sprite", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "icon", + "type": "symbol", + "source": "geojson", + "layout": { + "text-field": "{name}", + "text-font": [ + "NotoCJK" + ], + "symbol-placement": "point" + } + } + ] +} diff --git a/metrics/integration/render-tests/text-font/data-expression/expected.png b/metrics/integration/render-tests/text-font/data-expression/expected.png new file mode 100644 index 00000000000..ae92a7271d8 Binary files /dev/null and b/metrics/integration/render-tests/text-font/data-expression/expected.png differ diff --git a/metrics/integration/render-tests/text-font/data-expression/style.json b/metrics/integration/render-tests/text-font/data-expression/style.json new file mode 100644 index 00000000000..1e5ff8838d6 --- /dev/null +++ b/metrics/integration/render-tests/text-font/data-expression/style.json @@ -0,0 +1,73 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 64, + "width": 64 + } + }, + "center": [ 0, 0 ], + "zoom": 0, + "sources": { + "point": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "text-font": "default" + }, + "geometry": { + "type": "Point", + "coordinates": [ 0, -10 ] + } + }, + { + "type": "Feature", + "properties": { + "text-font": "noto" + }, + "geometry": { + "type": "Point", + "coordinates": [ 0, 10 ] + } + } + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "text", + "type": "symbol", + "source": "point", + "layout": { + "text-field": "A", + "text-font": [ + "match", + [ + "get", + "text-font" + ], + "noto", + [ + "literal", + [ + "NotoCJK" + ] + ], + [ + "literal", + [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + ] + ] + } + } + ] +} diff --git a/metrics/integration/render-tests/text-font/literal/expected.png b/metrics/integration/render-tests/text-font/literal/expected.png new file mode 100644 index 00000000000..147ff7a0de9 Binary files /dev/null and b/metrics/integration/render-tests/text-font/literal/expected.png differ diff --git a/metrics/integration/render-tests/text-font/literal/style.json b/metrics/integration/render-tests/text-font/literal/style.json new file mode 100644 index 00000000000..288bc40ed05 --- /dev/null +++ b/metrics/integration/render-tests/text-font/literal/style.json @@ -0,0 +1,56 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "literal", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "filter": [ + "==", + "maki", + "restaurant" + ], + "layout": { + "symbol-placement": "point", + "text-allow-overlap": true, + "text-ignore-placement": true, + "text-field": "Test", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + }, + "paint": { + "text-opacity": 1 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/text-halo-blur/default/expected.png b/metrics/integration/render-tests/text-halo-blur/default/expected.png new file mode 100644 index 00000000000..746e8f6beeb Binary files /dev/null and b/metrics/integration/render-tests/text-halo-blur/default/expected.png differ diff --git a/metrics/integration/render-tests/text-halo-blur/default/style.json b/metrics/integration/render-tests/text-halo-blur/default/style.json new file mode 100644 index 00000000000..36d958b7dc0 --- /dev/null +++ b/metrics/integration/render-tests/text-halo-blur/default/style.json @@ -0,0 +1,40 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "text-field": "ABC", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + }, + "paint": { + "text-halo-color": "red", + "text-halo-width": 2 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/text-halo-blur/function/expected.png b/metrics/integration/render-tests/text-halo-blur/function/expected.png new file mode 100644 index 00000000000..766ca745891 Binary files /dev/null and b/metrics/integration/render-tests/text-halo-blur/function/expected.png differ diff --git a/metrics/integration/render-tests/text-halo-blur/function/style.json b/metrics/integration/render-tests/text-halo-blur/function/style.json new file mode 100644 index 00000000000..cd6895344ac --- /dev/null +++ b/metrics/integration/render-tests/text-halo-blur/function/style.json @@ -0,0 +1,52 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "text-field": "ABC", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + }, + "paint": { + "text-halo-color": "red", + "text-halo-width": 2, + "text-halo-blur": { + "stops": [ + [ + 16, + 4 + ], + [ + 17, + 5 + ] + ] + } + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/text-halo-blur/literal/expected.png b/metrics/integration/render-tests/text-halo-blur/literal/expected.png new file mode 100644 index 00000000000..1902fd6754c Binary files /dev/null and b/metrics/integration/render-tests/text-halo-blur/literal/expected.png differ diff --git a/metrics/integration/render-tests/text-halo-blur/literal/style.json b/metrics/integration/render-tests/text-halo-blur/literal/style.json new file mode 100644 index 00000000000..941e89e8e3d --- /dev/null +++ b/metrics/integration/render-tests/text-halo-blur/literal/style.json @@ -0,0 +1,41 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "text-field": "ABC", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + }, + "paint": { + "text-halo-color": "red", + "text-halo-width": 2, + "text-halo-blur": 2 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/text-halo-blur/property-function/expected.png b/metrics/integration/render-tests/text-halo-blur/property-function/expected.png new file mode 100644 index 00000000000..487e970cecd Binary files /dev/null and b/metrics/integration/render-tests/text-halo-blur/property-function/expected.png differ diff --git a/metrics/integration/render-tests/text-halo-blur/property-function/style.json b/metrics/integration/render-tests/text-halo-blur/property-function/style.json new file mode 100644 index 00000000000..96506bd8f12 --- /dev/null +++ b/metrics/integration/render-tests/text-halo-blur/property-function/style.json @@ -0,0 +1,72 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { "x": 0 }, + "geometry": { + "type": "Point", + "coordinates": [ + 0, + -10 + ] + } + }, { + "type": "Feature", + "properties": { "x": 1 }, + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 10 + ] + } + } + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "text-field": "ABC", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + }, + "paint": { + "text-halo-width": 2, + "text-halo-color": "blue", + "text-halo-blur": { + "property": "x", + "stops": [ + [ + 0, + 1 + ], + [ + 1, + 3 + ] + ] + } + } + } + ] +} diff --git a/metrics/integration/render-tests/text-halo-color/default/expected.png b/metrics/integration/render-tests/text-halo-color/default/expected.png new file mode 100644 index 00000000000..d27ef2f5c97 Binary files /dev/null and b/metrics/integration/render-tests/text-halo-color/default/expected.png differ diff --git a/metrics/integration/render-tests/text-halo-color/default/style.json b/metrics/integration/render-tests/text-halo-color/default/style.json new file mode 100644 index 00000000000..dbd677e2002 --- /dev/null +++ b/metrics/integration/render-tests/text-halo-color/default/style.json @@ -0,0 +1,39 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "text-field": "ABC", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + }, + "paint": { + "text-halo-width": 2 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/text-halo-color/function/expected.png b/metrics/integration/render-tests/text-halo-color/function/expected.png new file mode 100644 index 00000000000..746e8f6beeb Binary files /dev/null and b/metrics/integration/render-tests/text-halo-color/function/expected.png differ diff --git a/metrics/integration/render-tests/text-halo-color/function/style.json b/metrics/integration/render-tests/text-halo-color/function/style.json new file mode 100644 index 00000000000..1418f1be1a5 --- /dev/null +++ b/metrics/integration/render-tests/text-halo-color/function/style.json @@ -0,0 +1,51 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "text-field": "ABC", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + }, + "paint": { + "text-halo-width": 2, + "text-halo-color": { + "stops": [ + [ + 16, + "red" + ], + [ + 17, + "blue" + ] + ] + } + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/text-halo-color/literal/expected.png b/metrics/integration/render-tests/text-halo-color/literal/expected.png new file mode 100644 index 00000000000..b6662446bfa Binary files /dev/null and b/metrics/integration/render-tests/text-halo-color/literal/expected.png differ diff --git a/metrics/integration/render-tests/text-halo-color/literal/style.json b/metrics/integration/render-tests/text-halo-color/literal/style.json new file mode 100644 index 00000000000..91afd869ce3 --- /dev/null +++ b/metrics/integration/render-tests/text-halo-color/literal/style.json @@ -0,0 +1,40 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "text-field": "ABC", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + }, + "paint": { + "text-halo-width": 2, + "text-halo-color": "blue" + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/text-halo-color/property-function/expected.png b/metrics/integration/render-tests/text-halo-color/property-function/expected.png new file mode 100644 index 00000000000..115adb4c010 Binary files /dev/null and b/metrics/integration/render-tests/text-halo-color/property-function/expected.png differ diff --git a/metrics/integration/render-tests/text-halo-color/property-function/style.json b/metrics/integration/render-tests/text-halo-color/property-function/style.json new file mode 100644 index 00000000000..73e6b6df802 --- /dev/null +++ b/metrics/integration/render-tests/text-halo-color/property-function/style.json @@ -0,0 +1,71 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { "x": 0 }, + "geometry": { + "type": "Point", + "coordinates": [ + 0, + -10 + ] + } + }, { + "type": "Feature", + "properties": { "x": 1 }, + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 10 + ] + } + } + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "text-field": "ABC", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + }, + "paint": { + "text-halo-width": 2, + "text-halo-color": { + "property": "x", + "stops": [ + [ + 0, + "red" + ], + [ + 1, + "blue" + ] + ] + } + } + } + ] +} diff --git a/metrics/integration/render-tests/text-halo-width/default/expected.png b/metrics/integration/render-tests/text-halo-width/default/expected.png new file mode 100644 index 00000000000..d27ef2f5c97 Binary files /dev/null and b/metrics/integration/render-tests/text-halo-width/default/expected.png differ diff --git a/metrics/integration/render-tests/text-halo-width/default/style.json b/metrics/integration/render-tests/text-halo-width/default/style.json new file mode 100644 index 00000000000..0e60589a3bb --- /dev/null +++ b/metrics/integration/render-tests/text-halo-width/default/style.json @@ -0,0 +1,39 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "text-field": "ABC", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + }, + "paint": { + "text-halo-color": "red" + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/text-halo-width/function/expected.png b/metrics/integration/render-tests/text-halo-width/function/expected.png new file mode 100644 index 00000000000..42b46a83e4f Binary files /dev/null and b/metrics/integration/render-tests/text-halo-width/function/expected.png differ diff --git a/metrics/integration/render-tests/text-halo-width/function/style.json b/metrics/integration/render-tests/text-halo-width/function/style.json new file mode 100644 index 00000000000..cb39f85d95b --- /dev/null +++ b/metrics/integration/render-tests/text-halo-width/function/style.json @@ -0,0 +1,51 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "text-field": "ABC", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + }, + "paint": { + "text-halo-color": "red", + "text-halo-width": { + "stops": [ + [ + 16, + 4 + ], + [ + 17, + 5 + ] + ] + } + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/text-halo-width/literal/expected.png b/metrics/integration/render-tests/text-halo-width/literal/expected.png new file mode 100644 index 00000000000..746e8f6beeb Binary files /dev/null and b/metrics/integration/render-tests/text-halo-width/literal/expected.png differ diff --git a/metrics/integration/render-tests/text-halo-width/literal/style.json b/metrics/integration/render-tests/text-halo-width/literal/style.json new file mode 100644 index 00000000000..36d958b7dc0 --- /dev/null +++ b/metrics/integration/render-tests/text-halo-width/literal/style.json @@ -0,0 +1,40 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "text-field": "ABC", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + }, + "paint": { + "text-halo-color": "red", + "text-halo-width": 2 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/text-halo-width/property-function/expected.png b/metrics/integration/render-tests/text-halo-width/property-function/expected.png new file mode 100644 index 00000000000..414d98f2ccc Binary files /dev/null and b/metrics/integration/render-tests/text-halo-width/property-function/expected.png differ diff --git a/metrics/integration/render-tests/text-halo-width/property-function/style.json b/metrics/integration/render-tests/text-halo-width/property-function/style.json new file mode 100644 index 00000000000..333ec49da11 --- /dev/null +++ b/metrics/integration/render-tests/text-halo-width/property-function/style.json @@ -0,0 +1,71 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { "x": 0 }, + "geometry": { + "type": "Point", + "coordinates": [ + 0, + -10 + ] + } + }, { + "type": "Feature", + "properties": { "x": 1 }, + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 10 + ] + } + } + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "text-field": "ABC", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + }, + "paint": { + "text-halo-color": "orange", + "text-halo-width": { + "property": "x", + "stops": [ + [ + 0, + 1 + ], + [ + 1, + 3 + ] + ] + } + } + } + ] +} diff --git a/metrics/integration/render-tests/text-justify/auto/expected.png b/metrics/integration/render-tests/text-justify/auto/expected.png new file mode 100644 index 00000000000..a973bb9cfd7 Binary files /dev/null and b/metrics/integration/render-tests/text-justify/auto/expected.png differ diff --git a/metrics/integration/render-tests/text-justify/auto/style.json b/metrics/integration/render-tests/text-justify/auto/style.json new file mode 100644 index 00000000000..c35d4270497 --- /dev/null +++ b/metrics/integration/render-tests/text-justify/auto/style.json @@ -0,0 +1,115 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256, + "width": 256 + } + }, + "center": [ 0, 0 ], + "zoom": 2, + "sources": { + "point": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { "x": "bottom-right" }, + "geometry": { + "type": "Point", + "coordinates": [ -10, 10 ] + } + }, + { + "type": "Feature", + "properties": { "x": "bottom" }, + "geometry": { + "type": "Point", + "coordinates": [ 0, 10 ] + } + }, + { + "type": "Feature", + "properties": { "x": "bottom-left" }, + "geometry": { + "type": "Point", + "coordinates": [ 10, 10 ] + } + }, + { + "type": "Feature", + "properties": { "x": "right" }, + "geometry": { + "type": "Point", + "coordinates": [ -10, 0 ] + } + }, + { + "type": "Feature", + "properties": { "x": "center" }, + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + }, + { + "type": "Feature", + "properties": { "x": "left" }, + "geometry": { + "type": "Point", + "coordinates": [ 10, 0 ] + } + }, + { + "type": "Feature", + "properties": { "x": "top-right" }, + "geometry": { + "type": "Point", + "coordinates": [ -10, -10 ] + } + }, + { + "type": "Feature", + "properties": { "x": "top" }, + "geometry": { + "type": "Point", + "coordinates": [ 0, -10 ] + } + }, + { + "type": "Feature", + "properties": { "x": "top-left" }, + "geometry": { + "type": "Point", + "coordinates": [ 10, -10 ] + } + } + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "text", + "type": "symbol", + "source": "point", + "layout": { + "text-field": "Justified Text", + "text-max-width": 5, + "text-anchor": { + "type": "identity", + "property": "x" + }, + "text-justify": "auto", + "text-allow-overlap": true, + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + } + } + ] +} diff --git a/metrics/integration/render-tests/text-justify/left/expected.png b/metrics/integration/render-tests/text-justify/left/expected.png new file mode 100644 index 00000000000..1ff51cd07e1 Binary files /dev/null and b/metrics/integration/render-tests/text-justify/left/expected.png differ diff --git a/metrics/integration/render-tests/text-justify/left/style.json b/metrics/integration/render-tests/text-justify/left/style.json new file mode 100644 index 00000000000..4ddf91ccab6 --- /dev/null +++ b/metrics/integration/render-tests/text-justify/left/style.json @@ -0,0 +1,58 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "left", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "filter": [ + "==", + "maki", + "restaurant" + ], + "layout": { + "symbol-placement": "point", + "text-allow-overlap": true, + "text-ignore-placement": true, + "text-field": "Test Test Test", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-max-width": 5, + "text-justify": "left" + }, + "paint": { + "text-opacity": 1 + } + } + ] +} diff --git a/metrics/integration/render-tests/text-justify/property-function/expected.png b/metrics/integration/render-tests/text-justify/property-function/expected.png new file mode 100644 index 00000000000..a9901858633 Binary files /dev/null and b/metrics/integration/render-tests/text-justify/property-function/expected.png differ diff --git a/metrics/integration/render-tests/text-justify/property-function/style.json b/metrics/integration/render-tests/text-justify/property-function/style.json new file mode 100644 index 00000000000..eea89606379 --- /dev/null +++ b/metrics/integration/render-tests/text-justify/property-function/style.json @@ -0,0 +1,65 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 128, + "width": 512 + } + }, + "center": [ 0, 0 ], + "zoom": 0, + "sources": { + "point": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { "x": "right" }, + "geometry": { + "type": "Point", + "coordinates": [ -100, 0 ] + } + }, + { + "type": "Feature", + "properties": { "x": "center" }, + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + }, + { + "type": "Feature", + "properties": { "x": "left" }, + "geometry": { + "type": "Point", + "coordinates": [ 100, 0 ] + } + } + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "text", + "type": "symbol", + "source": "point", + "layout": { + "text-field": "A very very long \n line label", + "text-justify": { + "type": "identity", + "property": "x" + }, + "text-allow-overlap": true, + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + } + } + ] +} diff --git a/metrics/integration/render-tests/text-justify/right/expected.png b/metrics/integration/render-tests/text-justify/right/expected.png new file mode 100644 index 00000000000..476eeb11d9e Binary files /dev/null and b/metrics/integration/render-tests/text-justify/right/expected.png differ diff --git a/metrics/integration/render-tests/text-justify/right/style.json b/metrics/integration/render-tests/text-justify/right/style.json new file mode 100644 index 00000000000..264779b3170 --- /dev/null +++ b/metrics/integration/render-tests/text-justify/right/style.json @@ -0,0 +1,58 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "right", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "filter": [ + "==", + "maki", + "restaurant" + ], + "layout": { + "symbol-placement": "point", + "text-allow-overlap": true, + "text-ignore-placement": true, + "text-field": "Test Test Test", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-max-width": 5, + "text-justify": "right" + }, + "paint": { + "text-opacity": 1 + } + } + ] +} diff --git a/metrics/integration/render-tests/text-keep-upright/line-placement-false/expected.png b/metrics/integration/render-tests/text-keep-upright/line-placement-false/expected.png new file mode 100644 index 00000000000..490894a8c0a Binary files /dev/null and b/metrics/integration/render-tests/text-keep-upright/line-placement-false/expected.png differ diff --git a/metrics/integration/render-tests/text-keep-upright/line-placement-false/style.json b/metrics/integration/render-tests/text-keep-upright/line-placement-false/style.json new file mode 100644 index 00000000000..592f7171bba --- /dev/null +++ b/metrics/integration/render-tests/text-keep-upright/line-placement-false/style.json @@ -0,0 +1,52 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "line-placement-false", + "type": "symbol", + "source": "mapbox", + "source-layer": "road", + "layout": { + "symbol-placement": "line", + "text-allow-overlap": true, + "text-ignore-placement": true, + "text-field": "{class} {class}", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-keep-upright": false + }, + "paint": { + "text-opacity": 1 + } + } + ] +} diff --git a/metrics/integration/render-tests/text-keep-upright/line-placement-true-offset/expected.png b/metrics/integration/render-tests/text-keep-upright/line-placement-true-offset/expected.png new file mode 100644 index 00000000000..3d933c59092 Binary files /dev/null and b/metrics/integration/render-tests/text-keep-upright/line-placement-true-offset/expected.png differ diff --git a/metrics/integration/render-tests/text-keep-upright/line-placement-true-offset/style.json b/metrics/integration/render-tests/text-keep-upright/line-placement-true-offset/style.json new file mode 100644 index 00000000000..22d890d58af --- /dev/null +++ b/metrics/integration/render-tests/text-keep-upright/line-placement-true-offset/style.json @@ -0,0 +1,81 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 64, + "operations": [ + [ + "setBearing", + 20 + ], + [ + "wait" + ] + ] + } + }, + "center": [ + 0, + 0 + ], + "zoom": 0, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -20, + -20 + ], + [ + 20, + -20 + ], + [ + 20, + 20 + ], + [ + -20, + 20 + ] + ] + } + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "guid", + "type": "line", + "source": "geojson" + }, + { + "id": "text", + "type": "symbol", + "source": "geojson", + "layout": { + "symbol-placement": "line", + "symbol-spacing": 3, + "text-allow-overlap": true, + "text-ignore-placement": true, + "text-field": "A", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-keep-upright": true, + "text-offset": [ + 0.2, + -1 + ] + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/text-keep-upright/line-placement-true-pitched/expected.png b/metrics/integration/render-tests/text-keep-upright/line-placement-true-pitched/expected.png new file mode 100644 index 00000000000..3b9d23158e9 Binary files /dev/null and b/metrics/integration/render-tests/text-keep-upright/line-placement-true-pitched/expected.png differ diff --git a/metrics/integration/render-tests/text-keep-upright/line-placement-true-pitched/style.json b/metrics/integration/render-tests/text-keep-upright/line-placement-true-pitched/style.json new file mode 100644 index 00000000000..14c0f0cfd91 --- /dev/null +++ b/metrics/integration/render-tests/text-keep-upright/line-placement-true-pitched/style.json @@ -0,0 +1,53 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "pitch": 35, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "line-placement-true", + "type": "symbol", + "source": "mapbox", + "source-layer": "road", + "layout": { + "symbol-placement": "line", + "text-allow-overlap": true, + "text-ignore-placement": true, + "text-field": "{class} {class}", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-keep-upright": true + }, + "paint": { + "text-opacity": 1 + } + } + ] +} diff --git a/metrics/integration/render-tests/text-keep-upright/line-placement-true-rotated/expected.png b/metrics/integration/render-tests/text-keep-upright/line-placement-true-rotated/expected.png new file mode 100644 index 00000000000..db0c4f27469 Binary files /dev/null and b/metrics/integration/render-tests/text-keep-upright/line-placement-true-rotated/expected.png differ diff --git a/metrics/integration/render-tests/text-keep-upright/line-placement-true-rotated/style.json b/metrics/integration/render-tests/text-keep-upright/line-placement-true-rotated/style.json new file mode 100644 index 00000000000..195384220f7 --- /dev/null +++ b/metrics/integration/render-tests/text-keep-upright/line-placement-true-rotated/style.json @@ -0,0 +1,56 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256, + "operations": [ + [ "setBearing", 180 ], + [ "wait" ] + ] + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "line-placement-true", + "type": "symbol", + "source": "mapbox", + "source-layer": "road", + "layout": { + "symbol-placement": "line", + "text-allow-overlap": true, + "text-ignore-placement": true, + "text-field": "{class} {class}", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-keep-upright": true + }, + "paint": { + "text-opacity": 1 + } + } + ] +} diff --git a/metrics/integration/render-tests/text-keep-upright/line-placement-true-text-anchor/expected.png b/metrics/integration/render-tests/text-keep-upright/line-placement-true-text-anchor/expected.png new file mode 100644 index 00000000000..816a2e440ae Binary files /dev/null and b/metrics/integration/render-tests/text-keep-upright/line-placement-true-text-anchor/expected.png differ diff --git a/metrics/integration/render-tests/text-keep-upright/line-placement-true-text-anchor/style.json b/metrics/integration/render-tests/text-keep-upright/line-placement-true-text-anchor/style.json new file mode 100644 index 00000000000..7db2bbf2867 --- /dev/null +++ b/metrics/integration/render-tests/text-keep-upright/line-placement-true-text-anchor/style.json @@ -0,0 +1,128 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 64, + "operations": [ + [ "setBearing", 20 ], + [ "wait" ] + ] + } + }, + "center": [ 0, 0 ], + "zoom": 0, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "LineString", + "coordinates": [ + [-10, -10], + [10, -10], + [10, 10], + [-10, 10] + ] + } + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "guid", + "type": "line", + "source": "geojson" + }, + { + "id": "left", + "type": "symbol", + "source": "geojson", + "layout": { + "symbol-placement": "line", + "symbol-spacing": 50, + "text-size": 10, + "text-allow-overlap": true, + "text-ignore-placement": true, + "text-field": "A", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-keep-upright": true, + "text-anchor": "left" + }, + "paint": { + "text-color": "red" + } + }, + { + "id": "right", + "type": "symbol", + "source": "geojson", + "layout": { + "symbol-placement": "line", + "symbol-spacing": 50, + "text-size": 10, + "text-allow-overlap": true, + "text-ignore-placement": true, + "text-field": "A", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-keep-upright": true, + "text-anchor": "right" + }, + "paint": { + "text-color": "blue" + } + }, + { + "id": "top", + "type": "symbol", + "source": "geojson", + "layout": { + "symbol-placement": "line", + "symbol-spacing": 50, + "text-size": 10, + "text-allow-overlap": true, + "text-ignore-placement": true, + "text-field": "A", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-keep-upright": true, + "text-anchor": "top" + }, + "paint": { + "text-color": "green" + } + }, + { + "id": "bottom", + "type": "symbol", + "source": "geojson", + "layout": { + "symbol-placement": "line", + "symbol-spacing": 50, + "text-size": 10, + "text-allow-overlap": true, + "text-ignore-placement": true, + "text-field": "A", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-keep-upright": true, + "text-anchor": "bottom" + }, + "paint": { + "text-color": "black" + } + } + ] +} diff --git a/metrics/integration/render-tests/text-keep-upright/line-placement-true/expected.png b/metrics/integration/render-tests/text-keep-upright/line-placement-true/expected.png new file mode 100644 index 00000000000..fbc1213a49e Binary files /dev/null and b/metrics/integration/render-tests/text-keep-upright/line-placement-true/expected.png differ diff --git a/metrics/integration/render-tests/text-keep-upright/line-placement-true/style.json b/metrics/integration/render-tests/text-keep-upright/line-placement-true/style.json new file mode 100644 index 00000000000..2d3806102fa --- /dev/null +++ b/metrics/integration/render-tests/text-keep-upright/line-placement-true/style.json @@ -0,0 +1,52 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "line-placement-true", + "type": "symbol", + "source": "mapbox", + "source-layer": "road", + "layout": { + "symbol-placement": "line", + "text-allow-overlap": true, + "text-ignore-placement": true, + "text-field": "{class} {class}", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-keep-upright": true + }, + "paint": { + "text-opacity": 1 + } + } + ] +} diff --git a/metrics/integration/render-tests/text-keep-upright/point-placement-align-map-false/expected.png b/metrics/integration/render-tests/text-keep-upright/point-placement-align-map-false/expected.png new file mode 100644 index 00000000000..c0c8ff1d041 Binary files /dev/null and b/metrics/integration/render-tests/text-keep-upright/point-placement-align-map-false/expected.png differ diff --git a/metrics/integration/render-tests/text-keep-upright/point-placement-align-map-false/style.json b/metrics/integration/render-tests/text-keep-upright/point-placement-align-map-false/style.json new file mode 100644 index 00000000000..d7a1d004a51 --- /dev/null +++ b/metrics/integration/render-tests/text-keep-upright/point-placement-align-map-false/style.json @@ -0,0 +1,53 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "bearing": 180, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "point-placement-align-map-false", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "layout": { + "symbol-placement": "point", + "text-allow-overlap": true, + "text-field": "point point point", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-rotation-alignment": "map", + "text-keep-upright": false + }, + "paint": { + "text-opacity": 1 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/text-keep-upright/point-placement-align-map-true/expected.png b/metrics/integration/render-tests/text-keep-upright/point-placement-align-map-true/expected.png new file mode 100644 index 00000000000..c0c8ff1d041 Binary files /dev/null and b/metrics/integration/render-tests/text-keep-upright/point-placement-align-map-true/expected.png differ diff --git a/metrics/integration/render-tests/text-keep-upright/point-placement-align-map-true/style.json b/metrics/integration/render-tests/text-keep-upright/point-placement-align-map-true/style.json new file mode 100644 index 00000000000..334c6c39aec --- /dev/null +++ b/metrics/integration/render-tests/text-keep-upright/point-placement-align-map-true/style.json @@ -0,0 +1,53 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "bearing": 180, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "point-placement-align-map-true", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "layout": { + "symbol-placement": "point", + "text-allow-overlap": true, + "text-field": "point point point", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-rotation-alignment": "map", + "text-keep-upright": true + }, + "paint": { + "text-opacity": 1 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/text-keep-upright/point-placement-align-viewport-false/expected.png b/metrics/integration/render-tests/text-keep-upright/point-placement-align-viewport-false/expected.png new file mode 100644 index 00000000000..0ce84a7b6c8 Binary files /dev/null and b/metrics/integration/render-tests/text-keep-upright/point-placement-align-viewport-false/expected.png differ diff --git a/metrics/integration/render-tests/text-keep-upright/point-placement-align-viewport-false/style.json b/metrics/integration/render-tests/text-keep-upright/point-placement-align-viewport-false/style.json new file mode 100644 index 00000000000..265b05e07c2 --- /dev/null +++ b/metrics/integration/render-tests/text-keep-upright/point-placement-align-viewport-false/style.json @@ -0,0 +1,53 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "point-placement-align-viewport-false", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "layout": { + "symbol-placement": "point", + "text-allow-overlap": true, + "text-field": "point point point", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-rotation-alignment": "viewport", + "text-keep-upright": false, + "text-rotate": 180 + }, + "paint": { + "text-opacity": 1 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/text-keep-upright/point-placement-align-viewport-true/expected.png b/metrics/integration/render-tests/text-keep-upright/point-placement-align-viewport-true/expected.png new file mode 100644 index 00000000000..0ce84a7b6c8 Binary files /dev/null and b/metrics/integration/render-tests/text-keep-upright/point-placement-align-viewport-true/expected.png differ diff --git a/metrics/integration/render-tests/text-keep-upright/point-placement-align-viewport-true/style.json b/metrics/integration/render-tests/text-keep-upright/point-placement-align-viewport-true/style.json new file mode 100644 index 00000000000..d0a470a975a --- /dev/null +++ b/metrics/integration/render-tests/text-keep-upright/point-placement-align-viewport-true/style.json @@ -0,0 +1,53 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "point-placement-align-viewport-true", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "layout": { + "symbol-placement": "point", + "text-allow-overlap": true, + "text-field": "point point point", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-rotation-alignment": "viewport", + "text-keep-upright": true, + "text-rotate": 180 + }, + "paint": { + "text-opacity": 1 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/text-letter-spacing/function-close/expected.png b/metrics/integration/render-tests/text-letter-spacing/function-close/expected.png new file mode 100644 index 00000000000..5375d1878fd Binary files /dev/null and b/metrics/integration/render-tests/text-letter-spacing/function-close/expected.png differ diff --git a/metrics/integration/render-tests/text-letter-spacing/function-close/style.json b/metrics/integration/render-tests/text-letter-spacing/function-close/style.json new file mode 100644 index 00000000000..785aff8bfc5 --- /dev/null +++ b/metrics/integration/render-tests/text-letter-spacing/function-close/style.json @@ -0,0 +1,68 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "functions", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "filter": [ + "==", + "maki", + "restaurant" + ], + "layout": { + "symbol-placement": "point", + "text-allow-overlap": true, + "text-ignore-placement": true, + "text-field": "Test", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-letter-spacing": { + "stops": [ + [ + 14, + -4 + ], + [ + 15, + 4 + ] + ] + } + }, + "paint": { + "text-opacity": 1 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/text-letter-spacing/function-far/expected.png b/metrics/integration/render-tests/text-letter-spacing/function-far/expected.png new file mode 100644 index 00000000000..5375d1878fd Binary files /dev/null and b/metrics/integration/render-tests/text-letter-spacing/function-far/expected.png differ diff --git a/metrics/integration/render-tests/text-letter-spacing/function-far/style.json b/metrics/integration/render-tests/text-letter-spacing/function-far/style.json new file mode 100644 index 00000000000..785aff8bfc5 --- /dev/null +++ b/metrics/integration/render-tests/text-letter-spacing/function-far/style.json @@ -0,0 +1,68 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "functions", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "filter": [ + "==", + "maki", + "restaurant" + ], + "layout": { + "symbol-placement": "point", + "text-allow-overlap": true, + "text-ignore-placement": true, + "text-field": "Test", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-letter-spacing": { + "stops": [ + [ + 14, + -4 + ], + [ + 15, + 4 + ] + ] + } + }, + "paint": { + "text-opacity": 1 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/text-letter-spacing/literal/expected.png b/metrics/integration/render-tests/text-letter-spacing/literal/expected.png new file mode 100644 index 00000000000..c396e129379 Binary files /dev/null and b/metrics/integration/render-tests/text-letter-spacing/literal/expected.png differ diff --git a/metrics/integration/render-tests/text-letter-spacing/literal/style.json b/metrics/integration/render-tests/text-letter-spacing/literal/style.json new file mode 100644 index 00000000000..8c7d2f38c6a --- /dev/null +++ b/metrics/integration/render-tests/text-letter-spacing/literal/style.json @@ -0,0 +1,57 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "literal", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "filter": [ + "==", + "maki", + "restaurant" + ], + "layout": { + "symbol-placement": "point", + "text-allow-overlap": true, + "text-ignore-placement": true, + "text-field": "Test", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-letter-spacing": 0.3 + }, + "paint": { + "text-opacity": 1 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/text-letter-spacing/property-function/expected.png b/metrics/integration/render-tests/text-letter-spacing/property-function/expected.png new file mode 100644 index 00000000000..e68b2e8e296 Binary files /dev/null and b/metrics/integration/render-tests/text-letter-spacing/property-function/expected.png differ 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 new file mode 100644 index 00000000000..6cc52cc79aa --- /dev/null +++ b/metrics/integration/render-tests/text-letter-spacing/property-function/style.json @@ -0,0 +1,63 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 128, + "width": 512 + } + }, + "center": [ 0, 0 ], + "zoom": 0, + "sources": { + "point": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { "spacing": -0.15, "text": "Very tight letter spacing" }, + "geometry": { + "type": "Point", + "coordinates": [ -100, 0 ] + } + }, + { + "type": "Feature", + "properties": { "spacing": 2, "text": "Very loose letter spacing" }, + "geometry": { + "type": "Point", + "coordinates": [ 75, 0 ] + } + } + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "text", + "type": "symbol", + "source": "point", + "layout": { + "text-field": "{text}", + "text-letter-spacing": { + "type": "identity", + "property": "spacing" + }, + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + } + } + ] +} diff --git a/metrics/integration/render-tests/text-letter-spacing/zoom-and-property-function/expected.png b/metrics/integration/render-tests/text-letter-spacing/zoom-and-property-function/expected.png new file mode 100644 index 00000000000..b6dad784bf4 Binary files /dev/null and b/metrics/integration/render-tests/text-letter-spacing/zoom-and-property-function/expected.png differ diff --git a/metrics/integration/render-tests/text-letter-spacing/zoom-and-property-function/style.json b/metrics/integration/render-tests/text-letter-spacing/zoom-and-property-function/style.json new file mode 100644 index 00000000000..ead382d1b74 --- /dev/null +++ b/metrics/integration/render-tests/text-letter-spacing/zoom-and-property-function/style.json @@ -0,0 +1,69 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256, + "width": 256 + } + }, + "center": [ 35, 0 ], + "zoom": 1.5, + "sources": { + "point": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { "spacing": "varying" }, + "geometry": { + "type": "Point", + "coordinates": [ 35, 15 ] + } + }, + { + "type": "Feature", + "properties": { "spacing": "fixed" }, + "geometry": { + "type": "Point", + "coordinates": [ 35, -15 ] + } + } + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "text", + "type": "symbol", + "source": "point", + "layout": { + "text-field": "These lines have the same letter spacing", + "text-letter-spacing": { + "type": "categorical", + "property": "spacing", + "stops": [ + [{"zoom": 0, "value": "varying"}, 0], + [{"zoom": 0, "value": "fixed"}, 0.8], + [{"zoom": 2, "value": "varying"}, 1.6], + [{"zoom": 2, "value": "fixed"}, 0.8] + ] + }, + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + } + } + ] +} diff --git a/metrics/integration/render-tests/text-line-height/literal/expected.png b/metrics/integration/render-tests/text-line-height/literal/expected.png new file mode 100644 index 00000000000..52e45ba8e63 Binary files /dev/null and b/metrics/integration/render-tests/text-line-height/literal/expected.png differ diff --git a/metrics/integration/render-tests/text-line-height/literal/style.json b/metrics/integration/render-tests/text-line-height/literal/style.json new file mode 100644 index 00000000000..b3d31465a47 --- /dev/null +++ b/metrics/integration/render-tests/text-line-height/literal/style.json @@ -0,0 +1,58 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "literal", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "filter": [ + "==", + "maki", + "restaurant" + ], + "layout": { + "symbol-placement": "point", + "text-allow-overlap": true, + "text-ignore-placement": true, + "text-field": "Test Test Test", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-max-width": 5, + "text-line-height": 1.3 + }, + "paint": { + "text-opacity": 1 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/text-max-angle/line-center/expected.png b/metrics/integration/render-tests/text-max-angle/line-center/expected.png new file mode 100644 index 00000000000..875128d4f6b Binary files /dev/null and b/metrics/integration/render-tests/text-max-angle/line-center/expected.png differ diff --git a/metrics/integration/render-tests/text-max-angle/line-center/style.json b/metrics/integration/render-tests/text-max-angle/line-center/style.json new file mode 100644 index 00000000000..f0a5ea43471 --- /dev/null +++ b/metrics/integration/render-tests/text-max-angle/line-center/style.json @@ -0,0 +1,52 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "literal", + "type": "symbol", + "source": "mapbox", + "source-layer": "road", + "layout": { + "symbol-placement": "line-center", + "text-allow-overlap": true, + "text-ignore-placement": true, + "text-field": "{class} {class}", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-max-angle": 15 + }, + "paint": { + "text-opacity": 1 + } + } + ] +} diff --git a/metrics/integration/render-tests/text-max-angle/literal/expected.png b/metrics/integration/render-tests/text-max-angle/literal/expected.png new file mode 100644 index 00000000000..36a05a2fb85 Binary files /dev/null and b/metrics/integration/render-tests/text-max-angle/literal/expected.png differ diff --git a/metrics/integration/render-tests/text-max-angle/literal/style.json b/metrics/integration/render-tests/text-max-angle/literal/style.json new file mode 100644 index 00000000000..3a0fd08d547 --- /dev/null +++ b/metrics/integration/render-tests/text-max-angle/literal/style.json @@ -0,0 +1,52 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "literal", + "type": "symbol", + "source": "mapbox", + "source-layer": "road", + "layout": { + "symbol-placement": "line", + "text-allow-overlap": true, + "text-ignore-placement": true, + "text-field": "{class} {class}", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-max-angle": 60 + }, + "paint": { + "text-opacity": 1 + } + } + ] +} diff --git a/metrics/integration/render-tests/text-max-width/force-double-newline/expected.png b/metrics/integration/render-tests/text-max-width/force-double-newline/expected.png new file mode 100644 index 00000000000..b7fa9097347 Binary files /dev/null and b/metrics/integration/render-tests/text-max-width/force-double-newline/expected.png differ diff --git a/metrics/integration/render-tests/text-max-width/force-double-newline/style.json b/metrics/integration/render-tests/text-max-width/force-double-newline/style.json new file mode 100644 index 00000000000..6ec69c8ee15 --- /dev/null +++ b/metrics/integration/render-tests/text-max-width/force-double-newline/style.json @@ -0,0 +1,52 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "sources": { + "mapbox": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "literal", + "type": "symbol", + "source": "mapbox", + "layout": { + "text-field": "abcde\n\nabcde", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-max-width": 50 + } + } + ] +} diff --git a/metrics/integration/render-tests/text-max-width/force-newline/expected.png b/metrics/integration/render-tests/text-max-width/force-newline/expected.png new file mode 100644 index 00000000000..cfc7574535a Binary files /dev/null and b/metrics/integration/render-tests/text-max-width/force-newline/expected.png differ diff --git a/metrics/integration/render-tests/text-max-width/force-newline/style.json b/metrics/integration/render-tests/text-max-width/force-newline/style.json new file mode 100644 index 00000000000..3d04fb8c38e --- /dev/null +++ b/metrics/integration/render-tests/text-max-width/force-newline/style.json @@ -0,0 +1,52 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "sources": { + "mapbox": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "literal", + "type": "symbol", + "source": "mapbox", + "layout": { + "text-field": "abcde\nabcde", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-max-width": 50 + } + } + ] +} diff --git a/metrics/integration/render-tests/text-max-width/ideographic-breaking/expected.png b/metrics/integration/render-tests/text-max-width/ideographic-breaking/expected.png new file mode 100644 index 00000000000..2a4dae9bc85 Binary files /dev/null and b/metrics/integration/render-tests/text-max-width/ideographic-breaking/expected.png differ diff --git a/metrics/integration/render-tests/text-max-width/ideographic-breaking/style.json b/metrics/integration/render-tests/text-max-width/ideographic-breaking/style.json new file mode 100644 index 00000000000..e412c016f14 --- /dev/null +++ b/metrics/integration/render-tests/text-max-width/ideographic-breaking/style.json @@ -0,0 +1,157 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 512 + } + }, + "sources": { + "mapbox": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "name": "技指計代式灣文人觀觀人之之易" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -1.0546875, + 30.14512718337613 + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "技指計代式灣文人觀觀人之之" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -5.625, + 71.85622888185527 + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "技指計代式灣文人觀觀人之" + }, + "geometry": { + "type": "Point", + "coordinates": [ + 1.40625, + -40.44694705960048 + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "技指計代式灣文人觀觀人" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -106.5234375, + 72.18180355624855 + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "技指計代式灣文人觀觀" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -113.5546875, + 32.54681317351514 + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "技指計代式灣文人觀" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -114.60937499999999, + -43.83452678223682 + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "技指計代式灣文人" + }, + "geometry": { + "type": "Point", + "coordinates": [ + 92.8125, + 72.39570570653261 + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "Jingleheimerschmidt" + }, + "geometry": { + "type": "Point", + "coordinates": [ + 94.21875, + 34.30714385628804 + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "mixed 技指計代式灣文人觀觀" + }, + "geometry": { + "type": "Point", + "coordinates": [ + 97.03125, + -44.087585028245165 + ] + } + } + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "literal", + "type": "symbol", + "source": "mapbox", + "layout": { + "text-field": "{name}", + "text-font": [ + "NotoCJK" + ], + "text-max-width": 5 + } + } + ] +} diff --git a/metrics/integration/render-tests/text-max-width/ideographic-punctuation-breaking/expected.png b/metrics/integration/render-tests/text-max-width/ideographic-punctuation-breaking/expected.png new file mode 100644 index 00000000000..ee370c26ca9 Binary files /dev/null and b/metrics/integration/render-tests/text-max-width/ideographic-punctuation-breaking/expected.png differ diff --git a/metrics/integration/render-tests/text-max-width/ideographic-punctuation-breaking/style.json b/metrics/integration/render-tests/text-max-width/ideographic-punctuation-breaking/style.json new file mode 100644 index 00000000000..156f657605a --- /dev/null +++ b/metrics/integration/render-tests/text-max-width/ideographic-punctuation-breaking/style.json @@ -0,0 +1,157 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 512 + } + }, + "sources": { + "mapbox": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "name": "技指計代‧式灣文人觀觀人之之易" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -1.0546875, + 30.14512718337613 + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "黄岩岛\n(民主礁)" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -5.625, + 71.85622888185527 + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "技指計代(式灣文人)觀觀人之" + }, + "geometry": { + "type": "Point", + "coordinates": [ + 1.40625, + -40.44694705960048 + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "(技指計)代式灣‧文人觀觀人" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -106.5234375, + 72.18180355624855 + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "技指‧計代式灣文;人觀觀" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -113.5546875, + 32.54681317351514 + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "技指計 代式灣灣灣文人-觀" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -114.60937499999999, + -43.83452678223682 + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "技指計代式‧灣文人" + }, + "geometry": { + "type": "Point", + "coordinates": [ + 92.8125, + 72.39570570653261 + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "Jingleheimer‧schmidt" + }, + "geometry": { + "type": "Point", + "coordinates": [ + 94.21875, + 34.30714385628804 + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "mixed 技指計‧代式灣文人觀觀" + }, + "geometry": { + "type": "Point", + "coordinates": [ + 97.03125, + -44.087585028245165 + ] + } + } + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "literal", + "type": "symbol", + "source": "mapbox", + "layout": { + "text-field": "{name}", + "text-font": [ + "NotoCJK" + ], + "text-max-width": 5 + } + } + ] +} diff --git a/metrics/integration/render-tests/text-max-width/literal/expected.png b/metrics/integration/render-tests/text-max-width/literal/expected.png new file mode 100644 index 00000000000..cd6b53b0852 Binary files /dev/null and b/metrics/integration/render-tests/text-max-width/literal/expected.png differ diff --git a/metrics/integration/render-tests/text-max-width/literal/style.json b/metrics/integration/render-tests/text-max-width/literal/style.json new file mode 100644 index 00000000000..df6305eafde --- /dev/null +++ b/metrics/integration/render-tests/text-max-width/literal/style.json @@ -0,0 +1,52 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "sources": { + "mapbox": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "literal", + "type": "symbol", + "source": "mapbox", + "layout": { + "text-field": "For every fact there is an infinity of hypotheses.", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-max-width": 7 + } + } + ] +} diff --git a/metrics/integration/render-tests/text-max-width/property-function/expected.png b/metrics/integration/render-tests/text-max-width/property-function/expected.png new file mode 100644 index 00000000000..fdac90f3a2f Binary files /dev/null and b/metrics/integration/render-tests/text-max-width/property-function/expected.png differ 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 new file mode 100644 index 00000000000..8b7b950b696 --- /dev/null +++ b/metrics/integration/render-tests/text-max-width/property-function/style.json @@ -0,0 +1,63 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 128, + "width": 512 + } + }, + "center": [ 0, 0 ], + "zoom": 0, + "sources": { + "point": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { "width": 12, "text": "Longer lines = fewer line wraps" }, + "geometry": { + "type": "Point", + "coordinates": [ -50, 0 ] + } + }, + { + "type": "Feature", + "properties": { "width": 2, "text": "Shorter lines = more line wraps" }, + "geometry": { + "type": "Point", + "coordinates": [ 75, 0 ] + } + } + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "text", + "type": "symbol", + "source": "point", + "layout": { + "text-field": "{text}", + "text-max-width": { + "type": "identity", + "property": "width" + }, + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + } + } + ] +} diff --git a/metrics/integration/render-tests/text-max-width/zero-width-point-placement/expected.png b/metrics/integration/render-tests/text-max-width/zero-width-point-placement/expected.png new file mode 100644 index 00000000000..953f78a2dbc Binary files /dev/null and b/metrics/integration/render-tests/text-max-width/zero-width-point-placement/expected.png differ diff --git a/metrics/integration/render-tests/text-max-width/zero-width-point-placement/style.json b/metrics/integration/render-tests/text-max-width/zero-width-point-placement/style.json new file mode 100644 index 00000000000..bea1403e570 --- /dev/null +++ b/metrics/integration/render-tests/text-max-width/zero-width-point-placement/style.json @@ -0,0 +1,55 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 128, + "width": 512 + } + }, + "zoom": 1, + "sources": { + "mapbox": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Point", + "coordinates": [ + -80, + 0 + ] + } + } + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "literal", + "type": "symbol", + "source": "mapbox", + "layout": { + "text-field": "Lorem ipsum dolor sit amet, consectetur adipiscing elit.", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-max-width": 0, + "text-anchor": "left" + } + } + ] +} diff --git a/metrics/integration/render-tests/text-max-width/zoom-and-property-function/expected.png b/metrics/integration/render-tests/text-max-width/zoom-and-property-function/expected.png new file mode 100644 index 00000000000..0ea29870aaa Binary files /dev/null and b/metrics/integration/render-tests/text-max-width/zoom-and-property-function/expected.png differ 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 new file mode 100644 index 00000000000..c6409a5bef9 --- /dev/null +++ b/metrics/integration/render-tests/text-max-width/zoom-and-property-function/style.json @@ -0,0 +1,75 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 128, + "width": 512 + } + }, + "center": [ 0, -15 ], + "zoom": 1.5, + "sources": { + "point": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "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" + }, + "geometry": { + "type": "Point", + "coordinates": [ -25, -15 ] + } + }, + { + "type": "Feature", + "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" + }, + "geometry": { + "type": "Point", + "coordinates": [ 25, -15 ] + } + } + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "text", + "type": "symbol", + "source": "point", + "layout": { + "text-field": "{text}", + "text-max-width": { + "type": "categorical", + "property": "width", + "stops": [ + [{"zoom": 0, "value": "varying"}, 1], + [{"zoom": 0, "value": "fixed"}, 7], + [{"zoom": 2, "value": "varying"}, 13], + [{"zoom": 2, "value": "fixed"}, 7] + ] + }, + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + } + } + ] +} diff --git a/metrics/integration/render-tests/text-no-cross-source-collision/default/expected.png b/metrics/integration/render-tests/text-no-cross-source-collision/default/expected.png new file mode 100644 index 00000000000..84fe9793f47 Binary files /dev/null and b/metrics/integration/render-tests/text-no-cross-source-collision/default/expected.png differ diff --git a/metrics/integration/render-tests/text-no-cross-source-collision/default/style.json b/metrics/integration/render-tests/text-no-cross-source-collision/default/style.json new file mode 100644 index 00000000000..2a3db9fd462 --- /dev/null +++ b/metrics/integration/render-tests/text-no-cross-source-collision/default/style.json @@ -0,0 +1,217 @@ +{ + "version": 8, + "metadata": { + "test": { + "crossSourceCollisions": false, + "height": 128, + "width": 256, + "description": "Three collision groups of two layers each. Each group should show one label (overlapping with labels from other groups)" + } + }, + "center": [ + 0, + 0 + ], + "zoom": 0, + "sources": { + "source1": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "name": "A" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -20, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "B" + }, + "geometry": { + "type": "Point", + "coordinates": [ + 20, + 0 + ] + } + } + ] + } + }, + "source2": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "name": "A" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -20, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "B" + }, + "geometry": { + "type": "Point", + "coordinates": [ + 20, + 0 + ] + } + } + ] + } + }, + "source3": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "name": "A" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -20, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "B" + }, + "geometry": { + "type": "Point", + "coordinates": [ + 20, + 0 + ] + } + } + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "source1Group1", + "type": "symbol", + "source": "source1", + "layout": { + "text-field": "Source1 Group {name}", + "text-max-width": 30, + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + } + }, + { + "id": "source1Group2", + "type": "symbol", + "source": "source1", + "layout": { + "text-field": "2nd Layer Source1 Group {name}", + "text-max-width": 30, + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + } + }, + { + "id": "source2Group1", + "type": "symbol", + "source": "source2", + "layout": { + "text-field": "Source2 Group {name}", + "text-max-width": 30, + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-offset": [ + 0, + 0.5 + ] + } + }, + { + "id": "source2Group2", + "type": "symbol", + "source": "source2", + "layout": { + "text-field": "2nd Layer Source2 Group {name}", + "text-max-width": 30, + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-offset": [ + 0, + 0.5 + ] + } + }, + { + "id": "source3Group1", + "type": "symbol", + "source": "source3", + "layout": { + "text-field": "Source3 Group {name}", + "text-max-width": 30, + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-offset": [ + 0, + 1 + ] + } + }, + { + "id": "ssource3Group2", + "type": "symbol", + "source": "source3", + "layout": { + "text-field": "2nd Layer Source3 Group {name}", + "text-max-width": 30, + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-offset": [ + 0, + 1 + ] + } + } + ] +} diff --git a/metrics/integration/render-tests/text-offset/literal-multiline-anchorcenter-justifycenter-offsetnegative/expected.png b/metrics/integration/render-tests/text-offset/literal-multiline-anchorcenter-justifycenter-offsetnegative/expected.png new file mode 100644 index 00000000000..0fcd57bf302 Binary files /dev/null and b/metrics/integration/render-tests/text-offset/literal-multiline-anchorcenter-justifycenter-offsetnegative/expected.png differ diff --git a/metrics/integration/render-tests/text-offset/literal-multiline-anchorcenter-justifycenter-offsetnegative/style.json b/metrics/integration/render-tests/text-offset/literal-multiline-anchorcenter-justifycenter-offsetnegative/style.json new file mode 100644 index 00000000000..81a7b831111 --- /dev/null +++ b/metrics/integration/render-tests/text-offset/literal-multiline-anchorcenter-justifycenter-offsetnegative/style.json @@ -0,0 +1,68 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "sprite": "local://sprites/sprite", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "literal", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "filter": [ + "==", + "maki", + "restaurant" + ], + "layout": { + "symbol-placement": "point", + "icon-allow-overlap": true, + "icon-ignore-placement": true, + "icon-image": "dot.sdf", + "text-allow-overlap": true, + "text-ignore-placement": true, + "text-field": "Test multiline", + "text-max-width": 5, + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-offset": [ + -3, + 0 + ], + "text-justify": "center", + "text-anchor": "center" + }, + "paint": { + "icon-opacity": 1, + "text-opacity": 1 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/text-offset/literal-multiline-anchorcenter-justifycenter-offsetpositive/expected.png b/metrics/integration/render-tests/text-offset/literal-multiline-anchorcenter-justifycenter-offsetpositive/expected.png new file mode 100644 index 00000000000..7b4cd11e4ca Binary files /dev/null and b/metrics/integration/render-tests/text-offset/literal-multiline-anchorcenter-justifycenter-offsetpositive/expected.png differ diff --git a/metrics/integration/render-tests/text-offset/literal-multiline-anchorcenter-justifycenter-offsetpositive/style.json b/metrics/integration/render-tests/text-offset/literal-multiline-anchorcenter-justifycenter-offsetpositive/style.json new file mode 100644 index 00000000000..7ddf09f4b5c --- /dev/null +++ b/metrics/integration/render-tests/text-offset/literal-multiline-anchorcenter-justifycenter-offsetpositive/style.json @@ -0,0 +1,68 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "sprite": "local://sprites/sprite", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "literal", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "filter": [ + "==", + "maki", + "restaurant" + ], + "layout": { + "symbol-placement": "point", + "icon-allow-overlap": true, + "icon-ignore-placement": true, + "icon-image": "dot.sdf", + "text-allow-overlap": true, + "text-ignore-placement": true, + "text-field": "Test multiline", + "text-max-width": 5, + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-offset": [ + 3, + 0 + ], + "text-justify": "center", + "text-anchor": "center" + }, + "paint": { + "icon-opacity": 1, + "text-opacity": 1 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/text-offset/literal-multiline-anchorcenter-justifyleft-offsetnegative/expected.png b/metrics/integration/render-tests/text-offset/literal-multiline-anchorcenter-justifyleft-offsetnegative/expected.png new file mode 100644 index 00000000000..77349d19517 Binary files /dev/null and b/metrics/integration/render-tests/text-offset/literal-multiline-anchorcenter-justifyleft-offsetnegative/expected.png differ diff --git a/metrics/integration/render-tests/text-offset/literal-multiline-anchorcenter-justifyleft-offsetnegative/style.json b/metrics/integration/render-tests/text-offset/literal-multiline-anchorcenter-justifyleft-offsetnegative/style.json new file mode 100644 index 00000000000..4de2a836220 --- /dev/null +++ b/metrics/integration/render-tests/text-offset/literal-multiline-anchorcenter-justifyleft-offsetnegative/style.json @@ -0,0 +1,68 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "sprite": "local://sprites/sprite", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "literal", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "filter": [ + "==", + "maki", + "restaurant" + ], + "layout": { + "symbol-placement": "point", + "icon-allow-overlap": true, + "icon-ignore-placement": true, + "icon-image": "dot.sdf", + "text-allow-overlap": true, + "text-ignore-placement": true, + "text-field": "Test multiline", + "text-max-width": 5, + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-offset": [ + -3, + 0 + ], + "text-justify": "left", + "text-anchor": "center" + }, + "paint": { + "icon-opacity": 1, + "text-opacity": 1 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/text-offset/literal-multiline-anchorcenter-justifyleft-offsetpositive/expected.png b/metrics/integration/render-tests/text-offset/literal-multiline-anchorcenter-justifyleft-offsetpositive/expected.png new file mode 100644 index 00000000000..77e58cbd9e0 Binary files /dev/null and b/metrics/integration/render-tests/text-offset/literal-multiline-anchorcenter-justifyleft-offsetpositive/expected.png differ diff --git a/metrics/integration/render-tests/text-offset/literal-multiline-anchorcenter-justifyleft-offsetpositive/style.json b/metrics/integration/render-tests/text-offset/literal-multiline-anchorcenter-justifyleft-offsetpositive/style.json new file mode 100644 index 00000000000..6120e3dbc00 --- /dev/null +++ b/metrics/integration/render-tests/text-offset/literal-multiline-anchorcenter-justifyleft-offsetpositive/style.json @@ -0,0 +1,68 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "sprite": "local://sprites/sprite", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "literal", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "filter": [ + "==", + "maki", + "restaurant" + ], + "layout": { + "symbol-placement": "point", + "icon-allow-overlap": true, + "icon-ignore-placement": true, + "icon-image": "dot.sdf", + "text-allow-overlap": true, + "text-ignore-placement": true, + "text-field": "Test multiline", + "text-max-width": 5, + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-offset": [ + 3, + 0 + ], + "text-justify": "left", + "text-anchor": "center" + }, + "paint": { + "icon-opacity": 1, + "text-opacity": 1 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/text-offset/literal-multiline-anchorcenter-justifyright-offsetnegative/expected.png b/metrics/integration/render-tests/text-offset/literal-multiline-anchorcenter-justifyright-offsetnegative/expected.png new file mode 100644 index 00000000000..719b1f9328e Binary files /dev/null and b/metrics/integration/render-tests/text-offset/literal-multiline-anchorcenter-justifyright-offsetnegative/expected.png differ diff --git a/metrics/integration/render-tests/text-offset/literal-multiline-anchorcenter-justifyright-offsetnegative/style.json b/metrics/integration/render-tests/text-offset/literal-multiline-anchorcenter-justifyright-offsetnegative/style.json new file mode 100644 index 00000000000..287b6bf7e4a --- /dev/null +++ b/metrics/integration/render-tests/text-offset/literal-multiline-anchorcenter-justifyright-offsetnegative/style.json @@ -0,0 +1,68 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "sprite": "local://sprites/sprite", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "literal", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "filter": [ + "==", + "maki", + "restaurant" + ], + "layout": { + "symbol-placement": "point", + "icon-allow-overlap": true, + "icon-ignore-placement": true, + "icon-image": "dot.sdf", + "text-allow-overlap": true, + "text-ignore-placement": true, + "text-field": "Test multiline", + "text-max-width": 5, + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-offset": [ + -3, + 0 + ], + "text-justify": "right", + "text-anchor": "center" + }, + "paint": { + "icon-opacity": 1, + "text-opacity": 1 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/text-offset/literal-multiline-anchorcenter-justifyright-offsetpositive/expected.png b/metrics/integration/render-tests/text-offset/literal-multiline-anchorcenter-justifyright-offsetpositive/expected.png new file mode 100644 index 00000000000..9c1b1fac219 Binary files /dev/null and b/metrics/integration/render-tests/text-offset/literal-multiline-anchorcenter-justifyright-offsetpositive/expected.png differ diff --git a/metrics/integration/render-tests/text-offset/literal-multiline-anchorcenter-justifyright-offsetpositive/style.json b/metrics/integration/render-tests/text-offset/literal-multiline-anchorcenter-justifyright-offsetpositive/style.json new file mode 100644 index 00000000000..53623d54170 --- /dev/null +++ b/metrics/integration/render-tests/text-offset/literal-multiline-anchorcenter-justifyright-offsetpositive/style.json @@ -0,0 +1,68 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "sprite": "local://sprites/sprite", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "literal", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "filter": [ + "==", + "maki", + "restaurant" + ], + "layout": { + "symbol-placement": "point", + "icon-allow-overlap": true, + "icon-ignore-placement": true, + "icon-image": "dot.sdf", + "text-allow-overlap": true, + "text-ignore-placement": true, + "text-field": "Test multiline", + "text-max-width": 5, + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-offset": [ + 3, + 0 + ], + "text-justify": "right", + "text-anchor": "center" + }, + "paint": { + "icon-opacity": 1, + "text-opacity": 1 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/text-offset/literal-multiline-anchorleft-justifycenter-offsetnegative/expected.png b/metrics/integration/render-tests/text-offset/literal-multiline-anchorleft-justifycenter-offsetnegative/expected.png new file mode 100644 index 00000000000..a451b0afb68 Binary files /dev/null and b/metrics/integration/render-tests/text-offset/literal-multiline-anchorleft-justifycenter-offsetnegative/expected.png differ diff --git a/metrics/integration/render-tests/text-offset/literal-multiline-anchorleft-justifycenter-offsetnegative/style.json b/metrics/integration/render-tests/text-offset/literal-multiline-anchorleft-justifycenter-offsetnegative/style.json new file mode 100644 index 00000000000..69063706741 --- /dev/null +++ b/metrics/integration/render-tests/text-offset/literal-multiline-anchorleft-justifycenter-offsetnegative/style.json @@ -0,0 +1,68 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "sprite": "local://sprites/sprite", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "literal", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "filter": [ + "==", + "maki", + "restaurant" + ], + "layout": { + "symbol-placement": "point", + "icon-allow-overlap": true, + "icon-ignore-placement": true, + "icon-image": "dot.sdf", + "text-allow-overlap": true, + "text-ignore-placement": true, + "text-field": "Test multiline", + "text-max-width": 5, + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-offset": [ + -3, + 0 + ], + "text-justify": "center", + "text-anchor": "left" + }, + "paint": { + "icon-opacity": 1, + "text-opacity": 1 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/text-offset/literal-multiline-anchorleft-justifycenter-offsetpositive/expected.png b/metrics/integration/render-tests/text-offset/literal-multiline-anchorleft-justifycenter-offsetpositive/expected.png new file mode 100644 index 00000000000..921823b3af5 Binary files /dev/null and b/metrics/integration/render-tests/text-offset/literal-multiline-anchorleft-justifycenter-offsetpositive/expected.png differ diff --git a/metrics/integration/render-tests/text-offset/literal-multiline-anchorleft-justifycenter-offsetpositive/style.json b/metrics/integration/render-tests/text-offset/literal-multiline-anchorleft-justifycenter-offsetpositive/style.json new file mode 100644 index 00000000000..94081605b5e --- /dev/null +++ b/metrics/integration/render-tests/text-offset/literal-multiline-anchorleft-justifycenter-offsetpositive/style.json @@ -0,0 +1,68 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "sprite": "local://sprites/sprite", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "literal", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "filter": [ + "==", + "maki", + "restaurant" + ], + "layout": { + "symbol-placement": "point", + "icon-allow-overlap": true, + "icon-ignore-placement": true, + "icon-image": "dot.sdf", + "text-allow-overlap": true, + "text-ignore-placement": true, + "text-field": "Test multiline", + "text-max-width": 5, + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-offset": [ + 3, + 0 + ], + "text-justify": "center", + "text-anchor": "left" + }, + "paint": { + "icon-opacity": 1, + "text-opacity": 1 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/text-offset/literal-multiline-anchorleft-justifyleft-offsetnegative/expected.png b/metrics/integration/render-tests/text-offset/literal-multiline-anchorleft-justifyleft-offsetnegative/expected.png new file mode 100644 index 00000000000..ac38abe1c4d Binary files /dev/null and b/metrics/integration/render-tests/text-offset/literal-multiline-anchorleft-justifyleft-offsetnegative/expected.png differ diff --git a/metrics/integration/render-tests/text-offset/literal-multiline-anchorleft-justifyleft-offsetnegative/style.json b/metrics/integration/render-tests/text-offset/literal-multiline-anchorleft-justifyleft-offsetnegative/style.json new file mode 100644 index 00000000000..ac4edc4356b --- /dev/null +++ b/metrics/integration/render-tests/text-offset/literal-multiline-anchorleft-justifyleft-offsetnegative/style.json @@ -0,0 +1,68 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "sprite": "local://sprites/sprite", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "literal", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "filter": [ + "==", + "maki", + "restaurant" + ], + "layout": { + "symbol-placement": "point", + "icon-allow-overlap": true, + "icon-ignore-placement": true, + "icon-image": "dot.sdf", + "text-allow-overlap": true, + "text-ignore-placement": true, + "text-field": "Test multiline", + "text-max-width": 5, + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-offset": [ + -3, + 0 + ], + "text-justify": "left", + "text-anchor": "left" + }, + "paint": { + "icon-opacity": 1, + "text-opacity": 1 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/text-offset/literal-multiline-anchorleft-justifyleft-offsetpositive/expected.png b/metrics/integration/render-tests/text-offset/literal-multiline-anchorleft-justifyleft-offsetpositive/expected.png new file mode 100644 index 00000000000..92d3351e896 Binary files /dev/null and b/metrics/integration/render-tests/text-offset/literal-multiline-anchorleft-justifyleft-offsetpositive/expected.png differ diff --git a/metrics/integration/render-tests/text-offset/literal-multiline-anchorleft-justifyleft-offsetpositive/style.json b/metrics/integration/render-tests/text-offset/literal-multiline-anchorleft-justifyleft-offsetpositive/style.json new file mode 100644 index 00000000000..b574c298ccc --- /dev/null +++ b/metrics/integration/render-tests/text-offset/literal-multiline-anchorleft-justifyleft-offsetpositive/style.json @@ -0,0 +1,68 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "sprite": "local://sprites/sprite", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "literal", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "filter": [ + "==", + "maki", + "restaurant" + ], + "layout": { + "symbol-placement": "point", + "icon-allow-overlap": true, + "icon-ignore-placement": true, + "icon-image": "dot.sdf", + "text-allow-overlap": true, + "text-ignore-placement": true, + "text-field": "Test multiline", + "text-max-width": 5, + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-offset": [ + 3, + 0 + ], + "text-justify": "left", + "text-anchor": "left" + }, + "paint": { + "icon-opacity": 1, + "text-opacity": 1 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/text-offset/literal-multiline-anchorleft-justifyright-offsetnegative/expected.png b/metrics/integration/render-tests/text-offset/literal-multiline-anchorleft-justifyright-offsetnegative/expected.png new file mode 100644 index 00000000000..9683628a49d Binary files /dev/null and b/metrics/integration/render-tests/text-offset/literal-multiline-anchorleft-justifyright-offsetnegative/expected.png differ diff --git a/metrics/integration/render-tests/text-offset/literal-multiline-anchorleft-justifyright-offsetnegative/style.json b/metrics/integration/render-tests/text-offset/literal-multiline-anchorleft-justifyright-offsetnegative/style.json new file mode 100644 index 00000000000..f6d168ce778 --- /dev/null +++ b/metrics/integration/render-tests/text-offset/literal-multiline-anchorleft-justifyright-offsetnegative/style.json @@ -0,0 +1,68 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "sprite": "local://sprites/sprite", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "literal", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "filter": [ + "==", + "maki", + "restaurant" + ], + "layout": { + "symbol-placement": "point", + "icon-allow-overlap": true, + "icon-ignore-placement": true, + "icon-image": "dot.sdf", + "text-allow-overlap": true, + "text-ignore-placement": true, + "text-field": "Test multiline", + "text-max-width": 5, + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-offset": [ + -3, + 0 + ], + "text-justify": "right", + "text-anchor": "left" + }, + "paint": { + "icon-opacity": 1, + "text-opacity": 1 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/text-offset/literal-multiline-anchorleft-justifyright-offsetpositive/expected.png b/metrics/integration/render-tests/text-offset/literal-multiline-anchorleft-justifyright-offsetpositive/expected.png new file mode 100644 index 00000000000..2dee29b1ff9 Binary files /dev/null and b/metrics/integration/render-tests/text-offset/literal-multiline-anchorleft-justifyright-offsetpositive/expected.png differ diff --git a/metrics/integration/render-tests/text-offset/literal-multiline-anchorleft-justifyright-offsetpositive/style.json b/metrics/integration/render-tests/text-offset/literal-multiline-anchorleft-justifyright-offsetpositive/style.json new file mode 100644 index 00000000000..92e9399dd29 --- /dev/null +++ b/metrics/integration/render-tests/text-offset/literal-multiline-anchorleft-justifyright-offsetpositive/style.json @@ -0,0 +1,68 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "sprite": "local://sprites/sprite", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "literal", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "filter": [ + "==", + "maki", + "restaurant" + ], + "layout": { + "symbol-placement": "point", + "icon-allow-overlap": true, + "icon-ignore-placement": true, + "icon-image": "dot.sdf", + "text-allow-overlap": true, + "text-ignore-placement": true, + "text-field": "Test multiline", + "text-max-width": 5, + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-offset": [ + 3, + 0 + ], + "text-justify": "right", + "text-anchor": "left" + }, + "paint": { + "icon-opacity": 1, + "text-opacity": 1 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/text-offset/literal-multiline-anchorright-justifycenter-offsetnegative/expected.png b/metrics/integration/render-tests/text-offset/literal-multiline-anchorright-justifycenter-offsetnegative/expected.png new file mode 100644 index 00000000000..9b96a1042c2 Binary files /dev/null and b/metrics/integration/render-tests/text-offset/literal-multiline-anchorright-justifycenter-offsetnegative/expected.png differ diff --git a/metrics/integration/render-tests/text-offset/literal-multiline-anchorright-justifycenter-offsetnegative/style.json b/metrics/integration/render-tests/text-offset/literal-multiline-anchorright-justifycenter-offsetnegative/style.json new file mode 100644 index 00000000000..ff112efd6fc --- /dev/null +++ b/metrics/integration/render-tests/text-offset/literal-multiline-anchorright-justifycenter-offsetnegative/style.json @@ -0,0 +1,68 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "sprite": "local://sprites/sprite", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "literal", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "filter": [ + "==", + "maki", + "restaurant" + ], + "layout": { + "symbol-placement": "point", + "icon-allow-overlap": true, + "icon-ignore-placement": true, + "icon-image": "dot.sdf", + "text-allow-overlap": true, + "text-ignore-placement": true, + "text-field": "Test multiline", + "text-max-width": 5, + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-offset": [ + -3, + 0 + ], + "text-justify": "center", + "text-anchor": "right" + }, + "paint": { + "icon-opacity": 1, + "text-opacity": 1 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/text-offset/literal-multiline-anchorright-justifycenter-offsetpositive/expected.png b/metrics/integration/render-tests/text-offset/literal-multiline-anchorright-justifycenter-offsetpositive/expected.png new file mode 100644 index 00000000000..c5e7b50c471 Binary files /dev/null and b/metrics/integration/render-tests/text-offset/literal-multiline-anchorright-justifycenter-offsetpositive/expected.png differ diff --git a/metrics/integration/render-tests/text-offset/literal-multiline-anchorright-justifycenter-offsetpositive/style.json b/metrics/integration/render-tests/text-offset/literal-multiline-anchorright-justifycenter-offsetpositive/style.json new file mode 100644 index 00000000000..4e7cd52baa9 --- /dev/null +++ b/metrics/integration/render-tests/text-offset/literal-multiline-anchorright-justifycenter-offsetpositive/style.json @@ -0,0 +1,68 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "sprite": "local://sprites/sprite", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "literal", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "filter": [ + "==", + "maki", + "restaurant" + ], + "layout": { + "symbol-placement": "point", + "icon-allow-overlap": true, + "icon-ignore-placement": true, + "icon-image": "dot.sdf", + "text-allow-overlap": true, + "text-ignore-placement": true, + "text-field": "Test multiline", + "text-max-width": 5, + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-offset": [ + 3, + 0 + ], + "text-justify": "center", + "text-anchor": "right" + }, + "paint": { + "icon-opacity": 1, + "text-opacity": 1 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/text-offset/literal-multiline-anchorright-justifyleft-offsetnegative/expected.png b/metrics/integration/render-tests/text-offset/literal-multiline-anchorright-justifyleft-offsetnegative/expected.png new file mode 100644 index 00000000000..5fe7150aaf5 Binary files /dev/null and b/metrics/integration/render-tests/text-offset/literal-multiline-anchorright-justifyleft-offsetnegative/expected.png differ diff --git a/metrics/integration/render-tests/text-offset/literal-multiline-anchorright-justifyleft-offsetnegative/style.json b/metrics/integration/render-tests/text-offset/literal-multiline-anchorright-justifyleft-offsetnegative/style.json new file mode 100644 index 00000000000..b94bed2a388 --- /dev/null +++ b/metrics/integration/render-tests/text-offset/literal-multiline-anchorright-justifyleft-offsetnegative/style.json @@ -0,0 +1,68 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "sprite": "local://sprites/sprite", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "literal", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "filter": [ + "==", + "maki", + "restaurant" + ], + "layout": { + "symbol-placement": "point", + "icon-allow-overlap": true, + "icon-ignore-placement": true, + "icon-image": "dot.sdf", + "text-allow-overlap": true, + "text-ignore-placement": true, + "text-field": "Test multiline", + "text-max-width": 5, + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-offset": [ + -3, + 0 + ], + "text-justify": "left", + "text-anchor": "right" + }, + "paint": { + "icon-opacity": 1, + "text-opacity": 1 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/text-offset/literal-multiline-anchorright-justifyleft-offsetpositive/expected.png b/metrics/integration/render-tests/text-offset/literal-multiline-anchorright-justifyleft-offsetpositive/expected.png new file mode 100644 index 00000000000..8853c77913c Binary files /dev/null and b/metrics/integration/render-tests/text-offset/literal-multiline-anchorright-justifyleft-offsetpositive/expected.png differ diff --git a/metrics/integration/render-tests/text-offset/literal-multiline-anchorright-justifyleft-offsetpositive/style.json b/metrics/integration/render-tests/text-offset/literal-multiline-anchorright-justifyleft-offsetpositive/style.json new file mode 100644 index 00000000000..2794f9801e8 --- /dev/null +++ b/metrics/integration/render-tests/text-offset/literal-multiline-anchorright-justifyleft-offsetpositive/style.json @@ -0,0 +1,68 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "sprite": "local://sprites/sprite", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "literal", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "filter": [ + "==", + "maki", + "restaurant" + ], + "layout": { + "symbol-placement": "point", + "icon-allow-overlap": true, + "icon-ignore-placement": true, + "icon-image": "dot.sdf", + "text-allow-overlap": true, + "text-ignore-placement": true, + "text-field": "Test multiline", + "text-max-width": 5, + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-offset": [ + 3, + 0 + ], + "text-justify": "left", + "text-anchor": "right" + }, + "paint": { + "icon-opacity": 1, + "text-opacity": 1 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/text-offset/literal-multiline-anchorright-justifyright-offsetnegative/expected.png b/metrics/integration/render-tests/text-offset/literal-multiline-anchorright-justifyright-offsetnegative/expected.png new file mode 100644 index 00000000000..37ce202773c Binary files /dev/null and b/metrics/integration/render-tests/text-offset/literal-multiline-anchorright-justifyright-offsetnegative/expected.png differ diff --git a/metrics/integration/render-tests/text-offset/literal-multiline-anchorright-justifyright-offsetnegative/style.json b/metrics/integration/render-tests/text-offset/literal-multiline-anchorright-justifyright-offsetnegative/style.json new file mode 100644 index 00000000000..59645ffb92d --- /dev/null +++ b/metrics/integration/render-tests/text-offset/literal-multiline-anchorright-justifyright-offsetnegative/style.json @@ -0,0 +1,68 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "sprite": "local://sprites/sprite", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "literal", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "filter": [ + "==", + "maki", + "restaurant" + ], + "layout": { + "symbol-placement": "point", + "icon-allow-overlap": true, + "icon-ignore-placement": true, + "icon-image": "dot.sdf", + "text-allow-overlap": true, + "text-ignore-placement": true, + "text-field": "Test multiline", + "text-max-width": 5, + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-offset": [ + -3, + 0 + ], + "text-justify": "right", + "text-anchor": "right" + }, + "paint": { + "icon-opacity": 1, + "text-opacity": 1 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/text-offset/literal-multiline-anchorright-justifyright-offsetpositive/expected.png b/metrics/integration/render-tests/text-offset/literal-multiline-anchorright-justifyright-offsetpositive/expected.png new file mode 100644 index 00000000000..73a543c513f Binary files /dev/null and b/metrics/integration/render-tests/text-offset/literal-multiline-anchorright-justifyright-offsetpositive/expected.png differ diff --git a/metrics/integration/render-tests/text-offset/literal-multiline-anchorright-justifyright-offsetpositive/style.json b/metrics/integration/render-tests/text-offset/literal-multiline-anchorright-justifyright-offsetpositive/style.json new file mode 100644 index 00000000000..fa6b298cefe --- /dev/null +++ b/metrics/integration/render-tests/text-offset/literal-multiline-anchorright-justifyright-offsetpositive/style.json @@ -0,0 +1,68 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "sprite": "local://sprites/sprite", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "literal", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "filter": [ + "==", + "maki", + "restaurant" + ], + "layout": { + "symbol-placement": "point", + "icon-allow-overlap": true, + "icon-ignore-placement": true, + "icon-image": "dot.sdf", + "text-allow-overlap": true, + "text-ignore-placement": true, + "text-field": "Test multiline", + "text-max-width": 5, + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-offset": [ + 3, + 0 + ], + "text-justify": "right", + "text-anchor": "right" + }, + "paint": { + "icon-opacity": 1, + "text-opacity": 1 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/text-offset/literal/expected.png b/metrics/integration/render-tests/text-offset/literal/expected.png new file mode 100644 index 00000000000..b69bbe99949 Binary files /dev/null and b/metrics/integration/render-tests/text-offset/literal/expected.png differ diff --git a/metrics/integration/render-tests/text-offset/literal/style.json b/metrics/integration/render-tests/text-offset/literal/style.json new file mode 100644 index 00000000000..c3132299298 --- /dev/null +++ b/metrics/integration/render-tests/text-offset/literal/style.json @@ -0,0 +1,60 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "literal", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "filter": [ + "==", + "maki", + "restaurant" + ], + "layout": { + "symbol-placement": "point", + "text-allow-overlap": true, + "text-ignore-placement": true, + "text-field": "Test", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-offset": [ + 1, + 1 + ] + }, + "paint": { + "text-opacity": 1 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/text-offset/property-function/expected.png b/metrics/integration/render-tests/text-offset/property-function/expected.png new file mode 100644 index 00000000000..8baa1f6451e Binary files /dev/null and b/metrics/integration/render-tests/text-offset/property-function/expected.png differ diff --git a/metrics/integration/render-tests/text-offset/property-function/style.json b/metrics/integration/render-tests/text-offset/property-function/style.json new file mode 100644 index 00000000000..7b8594d3728 --- /dev/null +++ b/metrics/integration/render-tests/text-offset/property-function/style.json @@ -0,0 +1,70 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 100, + "height": 100 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "offset": [0,1] + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + "offset": [1,-1] + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "text-field": "hello", + "icon-image": "oneway", + "text-offset": { + "type": "identity", + "property": "offset" + }, + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-size": 10 + }, + "paint": { + "text-color": "black" + } + } + ] +} diff --git a/metrics/integration/render-tests/text-opacity/default/expected.png b/metrics/integration/render-tests/text-opacity/default/expected.png new file mode 100644 index 00000000000..147ff7a0de9 Binary files /dev/null and b/metrics/integration/render-tests/text-opacity/default/expected.png differ diff --git a/metrics/integration/render-tests/text-opacity/default/style.json b/metrics/integration/render-tests/text-opacity/default/style.json new file mode 100644 index 00000000000..a63ad2856f5 --- /dev/null +++ b/metrics/integration/render-tests/text-opacity/default/style.json @@ -0,0 +1,54 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "text", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "filter": [ + "==", + "maki", + "restaurant" + ], + "layout": { + "symbol-placement": "point", + "text-allow-overlap": true, + "text-ignore-placement": true, + "text-field": "Test", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + }, + "paint": {} + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/text-opacity/function/expected.png b/metrics/integration/render-tests/text-opacity/function/expected.png new file mode 100644 index 00000000000..a7c760b9d90 Binary files /dev/null and b/metrics/integration/render-tests/text-opacity/function/expected.png differ diff --git a/metrics/integration/render-tests/text-opacity/function/style.json b/metrics/integration/render-tests/text-opacity/function/style.json new file mode 100644 index 00000000000..d9cb6ae3509 --- /dev/null +++ b/metrics/integration/render-tests/text-opacity/function/style.json @@ -0,0 +1,67 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "text", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "filter": [ + "==", + "maki", + "restaurant" + ], + "layout": { + "symbol-placement": "point", + "text-allow-overlap": true, + "text-ignore-placement": true, + "text-field": "Test", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + }, + "paint": { + "text-opacity": { + "stops": [ + [ + 16, + 0.5 + ], + [ + 17, + 0.6 + ] + ] + } + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/text-opacity/literal/expected.png b/metrics/integration/render-tests/text-opacity/literal/expected.png new file mode 100644 index 00000000000..ff0babb63a6 Binary files /dev/null and b/metrics/integration/render-tests/text-opacity/literal/expected.png differ diff --git a/metrics/integration/render-tests/text-opacity/literal/style.json b/metrics/integration/render-tests/text-opacity/literal/style.json new file mode 100644 index 00000000000..9835cacb4dc --- /dev/null +++ b/metrics/integration/render-tests/text-opacity/literal/style.json @@ -0,0 +1,56 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "text", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "filter": [ + "==", + "maki", + "restaurant" + ], + "layout": { + "symbol-placement": "point", + "text-allow-overlap": true, + "text-ignore-placement": true, + "text-field": "Test", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + }, + "paint": { + "text-opacity": 0.3 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/text-opacity/property-function/expected.png b/metrics/integration/render-tests/text-opacity/property-function/expected.png new file mode 100644 index 00000000000..7da76ead45a Binary files /dev/null and b/metrics/integration/render-tests/text-opacity/property-function/expected.png differ diff --git a/metrics/integration/render-tests/text-opacity/property-function/style.json b/metrics/integration/render-tests/text-opacity/property-function/style.json new file mode 100644 index 00000000000..f9914db9a20 --- /dev/null +++ b/metrics/integration/render-tests/text-opacity/property-function/style.json @@ -0,0 +1,74 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 64, + "width": 64 + } + }, + "center": [ 0, 0 ], + "zoom": 0, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { "x": 25 }, + "geometry": { + "type": "Point", + "coordinates": [ + -5, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { "x": 75 }, + "geometry": { + "type": "Point", + "coordinates": [ + 5, + 0 + ] + } + } + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "text", + "type": "symbol", + "source": "geojson", + "layout": { + "text-allow-overlap": true, + "text-field": "Test", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + }, + "paint": { + "text-opacity": { + "property": "x", + "stops": [ + [ + 0, + 0 + ], + [ + 100, + 1 + ] + ] + } + } + } + ] +} diff --git a/metrics/integration/render-tests/text-pitch-alignment/auto-text-rotation-alignment-map/expected.png b/metrics/integration/render-tests/text-pitch-alignment/auto-text-rotation-alignment-map/expected.png new file mode 100644 index 00000000000..124e31a9bcc Binary files /dev/null and b/metrics/integration/render-tests/text-pitch-alignment/auto-text-rotation-alignment-map/expected.png differ diff --git a/metrics/integration/render-tests/text-pitch-alignment/auto-text-rotation-alignment-map/style.json b/metrics/integration/render-tests/text-pitch-alignment/auto-text-rotation-alignment-map/style.json new file mode 100644 index 00000000000..6f355251615 --- /dev/null +++ b/metrics/integration/render-tests/text-pitch-alignment/auto-text-rotation-alignment-map/style.json @@ -0,0 +1,63 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 16, + "pitch": 30, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "road", + "type": "line", + "source": "mapbox", + "source-layer": "road", + "paint": { + "line-color": "#888", + "line-width": 1 + } + }, + { + "id": "text", + "type": "symbol", + "source": "mapbox", + "source-layer": "road_label", + "layout": { + "symbol-placement": "line", + "symbol-spacing": 60, + "text-rotation-alignment": "map", + "text-pitch-alignment": "auto", + "text-field": "{class}", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + }, + "paint": { + "text-opacity": 1 + } + } + ] +} diff --git a/metrics/integration/render-tests/text-pitch-alignment/auto-text-rotation-alignment-viewport/expected.png b/metrics/integration/render-tests/text-pitch-alignment/auto-text-rotation-alignment-viewport/expected.png new file mode 100644 index 00000000000..0583e90bae5 Binary files /dev/null and b/metrics/integration/render-tests/text-pitch-alignment/auto-text-rotation-alignment-viewport/expected.png differ diff --git a/metrics/integration/render-tests/text-pitch-alignment/auto-text-rotation-alignment-viewport/style.json b/metrics/integration/render-tests/text-pitch-alignment/auto-text-rotation-alignment-viewport/style.json new file mode 100644 index 00000000000..823a987737e --- /dev/null +++ b/metrics/integration/render-tests/text-pitch-alignment/auto-text-rotation-alignment-viewport/style.json @@ -0,0 +1,63 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 16, + "pitch": 30, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "road", + "type": "line", + "source": "mapbox", + "source-layer": "road", + "paint": { + "line-color": "#888", + "line-width": 1 + } + }, + { + "id": "text", + "type": "symbol", + "source": "mapbox", + "source-layer": "road_label", + "layout": { + "symbol-placement": "line", + "symbol-spacing": 60, + "text-rotation-alignment": "viewport", + "text-pitch-alignment": "auto", + "text-field": "{class}", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + }, + "paint": { + "text-opacity": 1 + } + } + ] +} diff --git a/metrics/integration/render-tests/text-pitch-alignment/map-text-depthtest/expected.png b/metrics/integration/render-tests/text-pitch-alignment/map-text-depthtest/expected.png new file mode 100644 index 00000000000..dd94084b486 Binary files /dev/null and b/metrics/integration/render-tests/text-pitch-alignment/map-text-depthtest/expected.png differ diff --git a/metrics/integration/render-tests/text-pitch-alignment/map-text-depthtest/style.json b/metrics/integration/render-tests/text-pitch-alignment/map-text-depthtest/style.json new file mode 100644 index 00000000000..17c38af2b62 --- /dev/null +++ b/metrics/integration/render-tests/text-pitch-alignment/map-text-depthtest/style.json @@ -0,0 +1,165 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256, + "allowed": 0.00025 + } + }, + "center": [ + 0, + 0 + ], + "zoom": 0, + "pitch": 45, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "text": "Hello World" + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + 0, + -40 + ], + [ + 10, + 20 + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "order": "below" + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -180, + -60 + ], + [ + -180, + 60 + ], + [ + 180, + 60 + ], + [ + 180, + -60 + ], + [ + -180, + -60 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "order": "above" + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -180, + -60 + ], + [ + 170, + 60 + ], + [ + 180, + 60 + ], + [ + -170, + -60 + ], + [ + -180, + -60 + ] + ] + ] + } + } + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "poly-below-text", + "type": "fill", + "source": "geojson", + "paint": { + "fill-color": "#888" + }, + "filter": [ + "==", + "order", + "below" + ] + }, + { + "id": "text", + "type": "symbol", + "source": "geojson", + "layout": { + "symbol-placement": "line", + "symbol-spacing": 60, + "text-rotation-alignment": "map", + "text-pitch-alignment": "map", + "text-field": "{text}", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + }, + "paint": { + "text-opacity": 1 + } + }, + { + "id": "poly-above-text", + "type": "fill", + "source": "geojson", + "paint": { + "fill-color": "#f00" + }, + "filter": [ + "==", + "order", + "above" + ] + } + ] +} diff --git a/metrics/integration/render-tests/text-pitch-alignment/map-text-rotation-alignment-map/expected.png b/metrics/integration/render-tests/text-pitch-alignment/map-text-rotation-alignment-map/expected.png new file mode 100644 index 00000000000..124e31a9bcc Binary files /dev/null and b/metrics/integration/render-tests/text-pitch-alignment/map-text-rotation-alignment-map/expected.png differ diff --git a/metrics/integration/render-tests/text-pitch-alignment/map-text-rotation-alignment-map/style.json b/metrics/integration/render-tests/text-pitch-alignment/map-text-rotation-alignment-map/style.json new file mode 100644 index 00000000000..822e094449e --- /dev/null +++ b/metrics/integration/render-tests/text-pitch-alignment/map-text-rotation-alignment-map/style.json @@ -0,0 +1,63 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 16, + "pitch": 30, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "road", + "type": "line", + "source": "mapbox", + "source-layer": "road", + "paint": { + "line-color": "#888", + "line-width": 1 + } + }, + { + "id": "text", + "type": "symbol", + "source": "mapbox", + "source-layer": "road_label", + "layout": { + "symbol-placement": "line", + "symbol-spacing": 60, + "text-rotation-alignment": "map", + "text-pitch-alignment": "map", + "text-field": "{class}", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + }, + "paint": { + "text-opacity": 1 + } + } + ] +} diff --git a/metrics/integration/render-tests/text-pitch-alignment/map-text-rotation-alignment-viewport/expected.png b/metrics/integration/render-tests/text-pitch-alignment/map-text-rotation-alignment-viewport/expected.png new file mode 100644 index 00000000000..293d6c27f5c Binary files /dev/null and b/metrics/integration/render-tests/text-pitch-alignment/map-text-rotation-alignment-viewport/expected.png differ diff --git a/metrics/integration/render-tests/text-pitch-alignment/map-text-rotation-alignment-viewport/style.json b/metrics/integration/render-tests/text-pitch-alignment/map-text-rotation-alignment-viewport/style.json new file mode 100644 index 00000000000..07eb0a834dc --- /dev/null +++ b/metrics/integration/render-tests/text-pitch-alignment/map-text-rotation-alignment-viewport/style.json @@ -0,0 +1,63 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 16, + "pitch": 30, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "road", + "type": "line", + "source": "mapbox", + "source-layer": "road", + "paint": { + "line-color": "#888", + "line-width": 1 + } + }, + { + "id": "text", + "type": "symbol", + "source": "mapbox", + "source-layer": "road_label", + "layout": { + "symbol-placement": "line", + "symbol-spacing": 60, + "text-rotation-alignment": "viewport", + "text-pitch-alignment": "map", + "text-field": "{class}", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + }, + "paint": { + "text-opacity": 1 + } + } + ] +} diff --git a/metrics/integration/render-tests/text-pitch-alignment/viewport-overzoomed-single-glyph/expected.png b/metrics/integration/render-tests/text-pitch-alignment/viewport-overzoomed-single-glyph/expected.png new file mode 100644 index 00000000000..9b363a0d009 Binary files /dev/null and b/metrics/integration/render-tests/text-pitch-alignment/viewport-overzoomed-single-glyph/expected.png differ diff --git a/metrics/integration/render-tests/text-pitch-alignment/viewport-overzoomed-single-glyph/style.json b/metrics/integration/render-tests/text-pitch-alignment/viewport-overzoomed-single-glyph/style.json new file mode 100644 index 00000000000..e12c4b361ac --- /dev/null +++ b/metrics/integration/render-tests/text-pitch-alignment/viewport-overzoomed-single-glyph/style.json @@ -0,0 +1,56 @@ +{ + "version": 8, + "center": [ + -118.28162, + 33.86852 + ], + "zoom": 21, + "pitch": 60, + "bearing": 161.5, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 16, + "tiles": [ + "local://tiles/mapbox.mapbox-streets-v7/16-11235-26208.mvt" + ] + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "road-label-large", + "type": "symbol", + "source": "mapbox", + "source-layer": "road_label", + "layout": { + "text-size": { "base": 1, "stops": [ [ 9, 10 ], [ 20, 16 ] ] }, + "text-max-angle": 30, + "symbol-spacing": 250, + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "symbol-placement": "line", + "text-padding": 1, + "text-rotation-alignment": "map", + "text-pitch-alignment": "viewport", + "text-field": "C", + "text-letter-spacing": 0.01 + }, + "paint": { + "text-color": "hsl(0, 0%, 0%)", + "text-halo-color": "hsla(0, 0%, 100%, 0.75)", + "text-halo-width": 1, + "text-halo-blur": 1 + } + } + ] +} diff --git a/metrics/integration/render-tests/text-pitch-alignment/viewport-overzoomed/expected.png b/metrics/integration/render-tests/text-pitch-alignment/viewport-overzoomed/expected.png new file mode 100644 index 00000000000..f2b0fe8404e Binary files /dev/null and b/metrics/integration/render-tests/text-pitch-alignment/viewport-overzoomed/expected.png differ diff --git a/metrics/integration/render-tests/text-pitch-alignment/viewport-overzoomed/style.json b/metrics/integration/render-tests/text-pitch-alignment/viewport-overzoomed/style.json new file mode 100644 index 00000000000..2f68454b9b5 --- /dev/null +++ b/metrics/integration/render-tests/text-pitch-alignment/viewport-overzoomed/style.json @@ -0,0 +1,56 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 1024 + } + }, + "center": [ + 50, + 0 + ], + "zoom": 18, + "pitch": 60, + "sources": { + "geojson": { + "type": "geojson", + "maxzoom": 16, + "data": { + "type": "LineString", + "coordinates": [ + [ 50, -90 ], + [ 50, 90 ] + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "text", + "type": "symbol", + "source": "geojson", + "layout": { + "symbol-placement": "line", + "symbol-spacing": 10, + "text-rotation-alignment": "map", + "text-pitch-alignment": "viewport", + "text-field": "Figueroa St.", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + }, + "paint": { + "text-opacity": 1 + } + } + ] +} diff --git a/metrics/integration/render-tests/text-pitch-alignment/viewport-text-depthtest/expected.png b/metrics/integration/render-tests/text-pitch-alignment/viewport-text-depthtest/expected.png new file mode 100644 index 00000000000..591f7922ffa Binary files /dev/null and b/metrics/integration/render-tests/text-pitch-alignment/viewport-text-depthtest/expected.png differ diff --git a/metrics/integration/render-tests/text-pitch-alignment/viewport-text-depthtest/style.json b/metrics/integration/render-tests/text-pitch-alignment/viewport-text-depthtest/style.json new file mode 100644 index 00000000000..5cec21940cb --- /dev/null +++ b/metrics/integration/render-tests/text-pitch-alignment/viewport-text-depthtest/style.json @@ -0,0 +1,165 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256, + "allowed": 0.00025 + } + }, + "center": [ + 0, + 0 + ], + "zoom": 0, + "pitch": 45, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "text": "Hello World" + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -20, + -40 + ], + [ + 20, + 20 + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "order": "below" + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -180, + -60 + ], + [ + -180, + 60 + ], + [ + 180, + 60 + ], + [ + 180, + -60 + ], + [ + -180, + -60 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "order": "above" + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -180, + -60 + ], + [ + 170, + 60 + ], + [ + 180, + 60 + ], + [ + -170, + -60 + ], + [ + -180, + -60 + ] + ] + ] + } + } + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "poly-below-text", + "type": "fill", + "source": "geojson", + "paint": { + "fill-color": "#888" + }, + "filter": [ + "==", + "order", + "below" + ] + }, + { + "id": "text", + "type": "symbol", + "source": "geojson", + "layout": { + "symbol-placement": "line", + "symbol-spacing": 60, + "text-rotation-alignment": "map", + "text-pitch-alignment": "viewport", + "text-field": "{text}", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + }, + "paint": { + "text-opacity": 1 + } + }, + { + "id": "poly-above-text", + "type": "fill", + "source": "geojson", + "paint": { + "fill-color": "#f00" + }, + "filter": [ + "==", + "order", + "above" + ] + } + ] +} diff --git a/metrics/integration/render-tests/text-pitch-alignment/viewport-text-rotation-alignment-map/expected.png b/metrics/integration/render-tests/text-pitch-alignment/viewport-text-rotation-alignment-map/expected.png new file mode 100644 index 00000000000..88dc99f3dd6 Binary files /dev/null and b/metrics/integration/render-tests/text-pitch-alignment/viewport-text-rotation-alignment-map/expected.png differ diff --git a/metrics/integration/render-tests/text-pitch-alignment/viewport-text-rotation-alignment-map/style.json b/metrics/integration/render-tests/text-pitch-alignment/viewport-text-rotation-alignment-map/style.json new file mode 100644 index 00000000000..af17a8f4b33 --- /dev/null +++ b/metrics/integration/render-tests/text-pitch-alignment/viewport-text-rotation-alignment-map/style.json @@ -0,0 +1,63 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 16, + "pitch": 30, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "road", + "type": "line", + "source": "mapbox", + "source-layer": "road", + "paint": { + "line-color": "#888", + "line-width": 1 + } + }, + { + "id": "text", + "type": "symbol", + "source": "mapbox", + "source-layer": "road_label", + "layout": { + "symbol-placement": "line", + "symbol-spacing": 60, + "text-rotation-alignment": "map", + "text-pitch-alignment": "viewport", + "text-field": "{class}", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + }, + "paint": { + "text-opacity": 1 + } + } + ] +} diff --git a/metrics/integration/render-tests/text-pitch-alignment/viewport-text-rotation-alignment-viewport/expected.png b/metrics/integration/render-tests/text-pitch-alignment/viewport-text-rotation-alignment-viewport/expected.png new file mode 100644 index 00000000000..0583e90bae5 Binary files /dev/null and b/metrics/integration/render-tests/text-pitch-alignment/viewport-text-rotation-alignment-viewport/expected.png differ diff --git a/metrics/integration/render-tests/text-pitch-alignment/viewport-text-rotation-alignment-viewport/style.json b/metrics/integration/render-tests/text-pitch-alignment/viewport-text-rotation-alignment-viewport/style.json new file mode 100644 index 00000000000..83edda06336 --- /dev/null +++ b/metrics/integration/render-tests/text-pitch-alignment/viewport-text-rotation-alignment-viewport/style.json @@ -0,0 +1,63 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 16, + "pitch": 30, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "road", + "type": "line", + "source": "mapbox", + "source-layer": "road", + "paint": { + "line-color": "#888", + "line-width": 1 + } + }, + { + "id": "text", + "type": "symbol", + "source": "mapbox", + "source-layer": "road_label", + "layout": { + "symbol-placement": "line", + "symbol-spacing": 60, + "text-rotation-alignment": "viewport", + "text-pitch-alignment": "viewport", + "text-field": "{class}", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + }, + "paint": { + "text-opacity": 1 + } + } + ] +} diff --git a/metrics/integration/render-tests/text-pitch-scaling/line-half/expected.png b/metrics/integration/render-tests/text-pitch-scaling/line-half/expected.png new file mode 100644 index 00000000000..9e703607656 Binary files /dev/null and b/metrics/integration/render-tests/text-pitch-scaling/line-half/expected.png differ 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 new file mode 100644 index 00000000000..875b012aa74 --- /dev/null +++ b/metrics/integration/render-tests/text-pitch-scaling/line-half/style.json @@ -0,0 +1,63 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 512 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 16, + "pitch": 30, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "road", + "type": "line", + "source": "mapbox", + "source-layer": "road", + "paint": { + "line-color": "#888", + "line-width": 1 + } + }, + { + "id": "text", + "type": "symbol", + "source": "mapbox", + "source-layer": "road_label", + "layout": { + "symbol-placement": "line", + "symbol-spacing": 60, + "text-rotation-alignment": "map", + "text-pitch-alignment": "auto", + "text-field": "{class}", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + }, + "paint": { + "text-opacity": 1 + } + } + ] +} diff --git a/metrics/integration/render-tests/text-radial-offset/basic/expected.png b/metrics/integration/render-tests/text-radial-offset/basic/expected.png new file mode 100644 index 00000000000..2eea3af04c3 Binary files /dev/null and b/metrics/integration/render-tests/text-radial-offset/basic/expected.png differ diff --git a/metrics/integration/render-tests/text-radial-offset/basic/style.json b/metrics/integration/render-tests/text-radial-offset/basic/style.json new file mode 100644 index 00000000000..2e762ebe3f0 --- /dev/null +++ b/metrics/integration/render-tests/text-radial-offset/basic/style.json @@ -0,0 +1,134 @@ +{ + "version": 8, + "metadata": { + "test": { + "description": "For radial offsets, we try to make the distance from the anchor to the first pixels of the text even in all positions. But we don't actually know where the pixels in the glyph are, so we approximate based on where we think the baseline of the glyph is. The circle in this test is a way to check that our approximation works visually.", + "height": 256, + "width": 256 + } + }, + "center": [ 0, 0 ], + "zoom": 0, + "sources": { + "point": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { "x": "bottom-right" }, + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + }, + { + "type": "Feature", + "properties": { "x": "bottom" }, + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + }, + { + "type": "Feature", + "properties": { "x": "bottom-left" }, + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + }, + { + "type": "Feature", + "properties": { "x": "right" }, + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + }, + { + "type": "Feature", + "properties": { "x": "center" }, + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + }, + { + "type": "Feature", + "properties": { "x": "left" }, + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + }, + { + "type": "Feature", + "properties": { "x": "top-right" }, + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + }, + { + "type": "Feature", + "properties": { "x": "top" }, + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + }, + { + "type": "Feature", + "properties": { "x": "top-left" }, + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + } + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "circle", + "type": "circle", + "source": "point", + "paint": { + "circle-radius": 40, + "circle-color": "aqua", + "circle-translate": [0, 4] + } + }, + { + "id": "text", + "type": "symbol", + "source": "point", + "layout": { + "text-field": "x", + "text-size": 40, + "text-anchor": { + "type": "identity", + "property": "x" + }, + "text-radial-offset": 1, + "text-allow-overlap": true, + "text-padding": 0, + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + } + } + ] +} diff --git a/metrics/integration/render-tests/text-rotate/anchor-bottom/expected.png b/metrics/integration/render-tests/text-rotate/anchor-bottom/expected.png new file mode 100644 index 00000000000..0550c56724b Binary files /dev/null and b/metrics/integration/render-tests/text-rotate/anchor-bottom/expected.png differ diff --git a/metrics/integration/render-tests/text-rotate/anchor-bottom/style.json b/metrics/integration/render-tests/text-rotate/anchor-bottom/style.json new file mode 100644 index 00000000000..0c014a6cf38 --- /dev/null +++ b/metrics/integration/render-tests/text-rotate/anchor-bottom/style.json @@ -0,0 +1,40 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "sprite": "local://sprites/sprite", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "dot.sdf", + "text-field": "Test", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-rotate": 45, + "text-anchor": "bottom" + } + } + ] +} diff --git a/metrics/integration/render-tests/text-rotate/anchor-left/expected.png b/metrics/integration/render-tests/text-rotate/anchor-left/expected.png new file mode 100644 index 00000000000..6bf6474c678 Binary files /dev/null and b/metrics/integration/render-tests/text-rotate/anchor-left/expected.png differ diff --git a/metrics/integration/render-tests/text-rotate/anchor-left/style.json b/metrics/integration/render-tests/text-rotate/anchor-left/style.json new file mode 100644 index 00000000000..733bae0fabd --- /dev/null +++ b/metrics/integration/render-tests/text-rotate/anchor-left/style.json @@ -0,0 +1,40 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "sprite": "local://sprites/sprite", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "dot.sdf", + "text-field": "Test", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-rotate": 45, + "text-anchor": "left" + } + } + ] +} diff --git a/metrics/integration/render-tests/text-rotate/anchor-right/expected.png b/metrics/integration/render-tests/text-rotate/anchor-right/expected.png new file mode 100644 index 00000000000..70f448ec42c Binary files /dev/null and b/metrics/integration/render-tests/text-rotate/anchor-right/expected.png differ diff --git a/metrics/integration/render-tests/text-rotate/anchor-right/style.json b/metrics/integration/render-tests/text-rotate/anchor-right/style.json new file mode 100644 index 00000000000..c290c6dddb0 --- /dev/null +++ b/metrics/integration/render-tests/text-rotate/anchor-right/style.json @@ -0,0 +1,40 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "sprite": "local://sprites/sprite", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "dot.sdf", + "text-field": "Test", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-rotate": 45, + "text-anchor": "right" + } + } + ] +} diff --git a/metrics/integration/render-tests/text-rotate/anchor-top/expected.png b/metrics/integration/render-tests/text-rotate/anchor-top/expected.png new file mode 100644 index 00000000000..72bdc10a3ea Binary files /dev/null and b/metrics/integration/render-tests/text-rotate/anchor-top/expected.png differ diff --git a/metrics/integration/render-tests/text-rotate/anchor-top/style.json b/metrics/integration/render-tests/text-rotate/anchor-top/style.json new file mode 100644 index 00000000000..0d296759da0 --- /dev/null +++ b/metrics/integration/render-tests/text-rotate/anchor-top/style.json @@ -0,0 +1,40 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "sprite": "local://sprites/sprite", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "dot.sdf", + "text-field": "Test", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-rotate": 45, + "text-anchor": "top" + } + } + ] +} diff --git a/metrics/integration/render-tests/text-rotate/function/expected.png b/metrics/integration/render-tests/text-rotate/function/expected.png new file mode 100644 index 00000000000..7cabf987c1b Binary files /dev/null and b/metrics/integration/render-tests/text-rotate/function/expected.png differ diff --git a/metrics/integration/render-tests/text-rotate/function/style.json b/metrics/integration/render-tests/text-rotate/function/style.json new file mode 100644 index 00000000000..e932e52be71 --- /dev/null +++ b/metrics/integration/render-tests/text-rotate/function/style.json @@ -0,0 +1,49 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "zoom": 0.5, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "text-field": "Test", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-rotate": { + "stops": [ + [ + 0, + 90 + ], + [ + 1, + 180 + ] + ] + } + } + } + ] +} diff --git a/metrics/integration/render-tests/text-rotate/literal/expected.png b/metrics/integration/render-tests/text-rotate/literal/expected.png new file mode 100644 index 00000000000..607534c3d2d Binary files /dev/null and b/metrics/integration/render-tests/text-rotate/literal/expected.png differ diff --git a/metrics/integration/render-tests/text-rotate/literal/style.json b/metrics/integration/render-tests/text-rotate/literal/style.json new file mode 100644 index 00000000000..558b00839f2 --- /dev/null +++ b/metrics/integration/render-tests/text-rotate/literal/style.json @@ -0,0 +1,37 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "text-field": "Test", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-rotate": 180 + } + } + ] +} diff --git a/metrics/integration/render-tests/text-rotate/property-function/expected.png b/metrics/integration/render-tests/text-rotate/property-function/expected.png new file mode 100644 index 00000000000..6c3d9ed8956 Binary files /dev/null and b/metrics/integration/render-tests/text-rotate/property-function/expected.png differ diff --git a/metrics/integration/render-tests/text-rotate/property-function/style.json b/metrics/integration/render-tests/text-rotate/property-function/style.json new file mode 100644 index 00000000000..97d500db4cc --- /dev/null +++ b/metrics/integration/render-tests/text-rotate/property-function/style.json @@ -0,0 +1,64 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "rotate": 45 + }, + "geometry": { + "type": "Point", + "coordinates": [ + -10, + 0 + ] + } + }, + { + "type": "Feature", + "properties": { + "rotate": 90 + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "text-field": "T", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-rotate": { + "type": "identity", + "property": "rotate" + } + } + } + ] +} diff --git a/metrics/integration/render-tests/text-rotate/with-offset/expected.png b/metrics/integration/render-tests/text-rotate/with-offset/expected.png new file mode 100644 index 00000000000..c27be9e099a Binary files /dev/null and b/metrics/integration/render-tests/text-rotate/with-offset/expected.png differ diff --git a/metrics/integration/render-tests/text-rotate/with-offset/style.json b/metrics/integration/render-tests/text-rotate/with-offset/style.json new file mode 100644 index 00000000000..8c281360c5c --- /dev/null +++ b/metrics/integration/render-tests/text-rotate/with-offset/style.json @@ -0,0 +1,49 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 128, + "height": 256, + "collisionDebug": true + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "text-field": "Test", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-rotate": 45, + "text-offset": [ + 3, + 6 + ] + } + } + ] +} diff --git a/metrics/integration/render-tests/text-rotation-alignment/auto-symbol-placement-line/expected.png b/metrics/integration/render-tests/text-rotation-alignment/auto-symbol-placement-line/expected.png new file mode 100644 index 00000000000..131832bbffb Binary files /dev/null and b/metrics/integration/render-tests/text-rotation-alignment/auto-symbol-placement-line/expected.png differ diff --git a/metrics/integration/render-tests/text-rotation-alignment/auto-symbol-placement-line/style.json b/metrics/integration/render-tests/text-rotation-alignment/auto-symbol-placement-line/style.json new file mode 100644 index 00000000000..6625763b8c2 --- /dev/null +++ b/metrics/integration/render-tests/text-rotation-alignment/auto-symbol-placement-line/style.json @@ -0,0 +1,47 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 128, + "height": 128 + } + }, + "bearing": 45, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "LineString", + "coordinates": [ + [ + -40, + 0 + ], + [ + 40, + 0 + ] + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "symbol-placement": "line", + "symbol-spacing": 20, + "text-allow-overlap": true, + "text-rotation-alignment": "auto", + "text-field": "-->", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + } + } + ] +} diff --git a/metrics/integration/render-tests/text-rotation-alignment/auto-symbol-placement-point/expected.png b/metrics/integration/render-tests/text-rotation-alignment/auto-symbol-placement-point/expected.png new file mode 100644 index 00000000000..b9e732c1bb0 Binary files /dev/null and b/metrics/integration/render-tests/text-rotation-alignment/auto-symbol-placement-point/expected.png differ diff --git a/metrics/integration/render-tests/text-rotation-alignment/auto-symbol-placement-point/style.json b/metrics/integration/render-tests/text-rotation-alignment/auto-symbol-placement-point/style.json new file mode 100644 index 00000000000..eff2d74155d --- /dev/null +++ b/metrics/integration/render-tests/text-rotation-alignment/auto-symbol-placement-point/style.json @@ -0,0 +1,39 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 128, + "height": 128 + } + }, + "bearing": 45, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "symbol-placement": "point", + "text-rotation-alignment": "auto", + "text-field": "-->", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/text-rotation-alignment/map-symbol-placement-line/expected.png b/metrics/integration/render-tests/text-rotation-alignment/map-symbol-placement-line/expected.png new file mode 100644 index 00000000000..131832bbffb Binary files /dev/null and b/metrics/integration/render-tests/text-rotation-alignment/map-symbol-placement-line/expected.png differ diff --git a/metrics/integration/render-tests/text-rotation-alignment/map-symbol-placement-line/style.json b/metrics/integration/render-tests/text-rotation-alignment/map-symbol-placement-line/style.json new file mode 100644 index 00000000000..4ce56e1af0b --- /dev/null +++ b/metrics/integration/render-tests/text-rotation-alignment/map-symbol-placement-line/style.json @@ -0,0 +1,47 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 128, + "height": 128 + } + }, + "bearing": 45, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "LineString", + "coordinates": [ + [ + -40, + 0 + ], + [ + 40, + 0 + ] + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "symbol-placement": "line", + "symbol-spacing": 20, + "text-allow-overlap": true, + "text-rotation-alignment": "map", + "text-field": "-->", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/text-rotation-alignment/map-symbol-placement-point/expected.png b/metrics/integration/render-tests/text-rotation-alignment/map-symbol-placement-point/expected.png new file mode 100644 index 00000000000..a95f047f919 Binary files /dev/null and b/metrics/integration/render-tests/text-rotation-alignment/map-symbol-placement-point/expected.png differ diff --git a/metrics/integration/render-tests/text-rotation-alignment/map-symbol-placement-point/style.json b/metrics/integration/render-tests/text-rotation-alignment/map-symbol-placement-point/style.json new file mode 100644 index 00000000000..84e2e3e6d25 --- /dev/null +++ b/metrics/integration/render-tests/text-rotation-alignment/map-symbol-placement-point/style.json @@ -0,0 +1,39 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 128, + "height": 128 + } + }, + "bearing": 45, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "symbol-placement": "point", + "text-rotation-alignment": "map", + "text-field": "-->", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/text-rotation-alignment/viewport-symbol-placement-line/expected.png b/metrics/integration/render-tests/text-rotation-alignment/viewport-symbol-placement-line/expected.png new file mode 100644 index 00000000000..3602942a560 Binary files /dev/null and b/metrics/integration/render-tests/text-rotation-alignment/viewport-symbol-placement-line/expected.png differ diff --git a/metrics/integration/render-tests/text-rotation-alignment/viewport-symbol-placement-line/style.json b/metrics/integration/render-tests/text-rotation-alignment/viewport-symbol-placement-line/style.json new file mode 100644 index 00000000000..da4bd1a9237 --- /dev/null +++ b/metrics/integration/render-tests/text-rotation-alignment/viewport-symbol-placement-line/style.json @@ -0,0 +1,47 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 128, + "height": 128 + } + }, + "bearing": 45, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "LineString", + "coordinates": [ + [ + -40, + 0 + ], + [ + 40, + 0 + ] + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "symbol-placement": "line", + "symbol-spacing": 20, + "text-allow-overlap": true, + "text-rotation-alignment": "viewport", + "text-field": "-->", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/text-rotation-alignment/viewport-symbol-placement-point/expected.png b/metrics/integration/render-tests/text-rotation-alignment/viewport-symbol-placement-point/expected.png new file mode 100644 index 00000000000..b9e732c1bb0 Binary files /dev/null and b/metrics/integration/render-tests/text-rotation-alignment/viewport-symbol-placement-point/expected.png differ diff --git a/metrics/integration/render-tests/text-rotation-alignment/viewport-symbol-placement-point/style.json b/metrics/integration/render-tests/text-rotation-alignment/viewport-symbol-placement-point/style.json new file mode 100644 index 00000000000..5953001fd21 --- /dev/null +++ b/metrics/integration/render-tests/text-rotation-alignment/viewport-symbol-placement-point/style.json @@ -0,0 +1,39 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 128, + "height": 128 + } + }, + "bearing": 45, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "symbol-placement": "point", + "text-rotation-alignment": "viewport", + "text-field": "-->", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/text-size/camera-function-high-base/expected.png b/metrics/integration/render-tests/text-size/camera-function-high-base/expected.png new file mode 100644 index 00000000000..f77f87b2df3 Binary files /dev/null and b/metrics/integration/render-tests/text-size/camera-function-high-base/expected.png differ diff --git a/metrics/integration/render-tests/text-size/camera-function-high-base/style.json b/metrics/integration/render-tests/text-size/camera-function-high-base/style.json new file mode 100644 index 00000000000..019ef120bef --- /dev/null +++ b/metrics/integration/render-tests/text-size/camera-function-high-base/style.json @@ -0,0 +1,58 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "zoom": 0.5, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Point", + "coordinates": [ -10, 0 ] + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Point", + "coordinates": [ 10, 0 ] + } + } + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "text-field": "A", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-size": { + "base": 99, + "stops": [ + [ 0, 7 ], + [ 1, 29 ] + ] + } + } + } + ] +} diff --git a/metrics/integration/render-tests/text-size/camera-function-interval/expected.png b/metrics/integration/render-tests/text-size/camera-function-interval/expected.png new file mode 100644 index 00000000000..aba8e806a61 Binary files /dev/null and b/metrics/integration/render-tests/text-size/camera-function-interval/expected.png differ diff --git a/metrics/integration/render-tests/text-size/camera-function-interval/style.json b/metrics/integration/render-tests/text-size/camera-function-interval/style.json new file mode 100644 index 00000000000..2573c9d9d9a --- /dev/null +++ b/metrics/integration/render-tests/text-size/camera-function-interval/style.json @@ -0,0 +1,44 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "zoom": 0.5, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "text-field": "ABC", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-size": { + "type": "interval", + "stops": [ + [0, 24], + [1, 36] + ] + } + } + } + ] +} diff --git a/metrics/integration/render-tests/text-size/composite-expression/expected.png b/metrics/integration/render-tests/text-size/composite-expression/expected.png new file mode 100644 index 00000000000..9634c56a1e1 Binary files /dev/null and b/metrics/integration/render-tests/text-size/composite-expression/expected.png differ diff --git a/metrics/integration/render-tests/text-size/composite-expression/style.json b/metrics/integration/render-tests/text-size/composite-expression/style.json new file mode 100644 index 00000000000..55ea38f5607 --- /dev/null +++ b/metrics/integration/render-tests/text-size/composite-expression/style.json @@ -0,0 +1,81 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "zoom": 0.5, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { "x": 0 }, + "geometry": { + "type": "Point", + "coordinates": [ -10, 0 ] + } + }, + { + "type": "Feature", + "properties": { "x": 5 }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "reference", + "type": "symbol", + "source": "geojson", + "layout": { + "text-field": "A", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-size": ["match", ["number", ["get", "x"]], 5, 24, 12], + "text-ignore-placement": true, + "text-allow-overlap": true + } + }, + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "text-field": "A", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-size": [ + "interpolate", + ["cubic-bezier", 0, 0.9, 0.1, 1], + ["zoom"], + 0, + 2, + 1, + [ "match", ["number", ["get", "x"]], 5, 24, 12] + ], + "text-offset": [0, 1], + "text-ignore-placement": true, + "text-allow-overlap": true + } + } + ] +} diff --git a/metrics/integration/render-tests/text-size/composite-function-line-placement/expected.png b/metrics/integration/render-tests/text-size/composite-function-line-placement/expected.png new file mode 100644 index 00000000000..5a35d4d451a Binary files /dev/null and b/metrics/integration/render-tests/text-size/composite-function-line-placement/expected.png differ diff --git a/metrics/integration/render-tests/text-size/composite-function-line-placement/style.json b/metrics/integration/render-tests/text-size/composite-function-line-placement/style.json new file mode 100644 index 00000000000..d0a797a43fb --- /dev/null +++ b/metrics/integration/render-tests/text-size/composite-function-line-placement/style.json @@ -0,0 +1,62 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "zoom": 2.75, + "center": [-20, -10], + "sources": { + "geojson": { + "type":"geojson", + "data":{ + "type":"FeatureCollection", + "features": [{ + "type":"Feature", + "properties":{"x":0}, + "geometry":{ + "type":"LineString","coordinates":[ + [-10,-1], [-20,-10], [-30,-1], [-40,-10]] + } + }] + } + } + }, + "layers":[ + { + "id": "symbol-camera", + "type": "symbol", + "source": "geojson", + "layout": { + "symbol-placement": "line", + "symbol-spacing": 1, + "text-anchor": "left", + "text-allow-overlap": true, + "text-ignore-placement": true, + "text-max-angle": 180, + "text-field": "abcdefghijklmnopqrstuvwxyz", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-size": { + "property": "x", + "stops": [ + [ {"value": 0, "zoom": 0}, 2 ], + [ {"value": 0, "zoom": 1}, 4 ], + [ {"value": 0, "zoom": 2}, 6 ], + [ {"value": 0, "zoom": 3}, 12 ], + [ {"value": 0, "zoom": 10}, 12 ] + ] + } + }, + "paint": { + "text-color": "red", + "text-opacity": 0.5 + } + } + ], + "glyphs": "local://glyphs/{fontstack}/{range}.pbf" +} diff --git a/metrics/integration/render-tests/text-size/composite-function/expected.png b/metrics/integration/render-tests/text-size/composite-function/expected.png new file mode 100644 index 00000000000..8cdfd768141 Binary files /dev/null and b/metrics/integration/render-tests/text-size/composite-function/expected.png differ diff --git a/metrics/integration/render-tests/text-size/composite-function/style.json b/metrics/integration/render-tests/text-size/composite-function/style.json new file mode 100644 index 00000000000..1185d149f41 --- /dev/null +++ b/metrics/integration/render-tests/text-size/composite-function/style.json @@ -0,0 +1,63 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "zoom": 0.5, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { "x": 0 }, + "geometry": { + "type": "Point", + "coordinates": [ -10, 0 ] + } + }, + { + "type": "Feature", + "properties": { "x": 5 }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "text-field": "A", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-size": { + "property": "x", + "stops": [ + [ {"value": 0, "zoom": 0}, 10 ], + [ {"value": 10, "zoom": 0}, 20 ], + [ {"value": 0, "zoom": 1}, 14 ], + [ {"value": 10, "zoom": 1}, 28 ] + ] + } + } + } + ] +} diff --git a/metrics/integration/render-tests/text-size/default/expected.png b/metrics/integration/render-tests/text-size/default/expected.png new file mode 100644 index 00000000000..d27ef2f5c97 Binary files /dev/null and b/metrics/integration/render-tests/text-size/default/expected.png differ diff --git a/metrics/integration/render-tests/text-size/default/style.json b/metrics/integration/render-tests/text-size/default/style.json new file mode 100644 index 00000000000..834beb75aae --- /dev/null +++ b/metrics/integration/render-tests/text-size/default/style.json @@ -0,0 +1,36 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "text-field": "ABC", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + } + } + ] +} diff --git a/metrics/integration/render-tests/text-size/function/expected.png b/metrics/integration/render-tests/text-size/function/expected.png new file mode 100644 index 00000000000..5df868f5e23 Binary files /dev/null and b/metrics/integration/render-tests/text-size/function/expected.png differ diff --git a/metrics/integration/render-tests/text-size/function/style.json b/metrics/integration/render-tests/text-size/function/style.json new file mode 100644 index 00000000000..996d79dbef3 --- /dev/null +++ b/metrics/integration/render-tests/text-size/function/style.json @@ -0,0 +1,49 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "zoom": 0.5, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "text-field": "ABC", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-size": { + "stops": [ + [ + 0, + 12 + ], + [ + 1, + 24 + ] + ] + } + } + } + ] +} diff --git a/metrics/integration/render-tests/text-size/literal/expected.png b/metrics/integration/render-tests/text-size/literal/expected.png new file mode 100644 index 00000000000..aba8e806a61 Binary files /dev/null and b/metrics/integration/render-tests/text-size/literal/expected.png differ diff --git a/metrics/integration/render-tests/text-size/literal/style.json b/metrics/integration/render-tests/text-size/literal/style.json new file mode 100644 index 00000000000..f743eb6f8e9 --- /dev/null +++ b/metrics/integration/render-tests/text-size/literal/style.json @@ -0,0 +1,37 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "text-field": "ABC", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-size": 24 + } + } + ] +} diff --git a/metrics/integration/render-tests/text-size/nan/expected.png b/metrics/integration/render-tests/text-size/nan/expected.png new file mode 100644 index 00000000000..d27ef2f5c97 Binary files /dev/null and b/metrics/integration/render-tests/text-size/nan/expected.png differ diff --git a/metrics/integration/render-tests/text-size/nan/style.json b/metrics/integration/render-tests/text-size/nan/style.json new file mode 100644 index 00000000000..ca4ffb6c311 --- /dev/null +++ b/metrics/integration/render-tests/text-size/nan/style.json @@ -0,0 +1,37 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "text-size": ["sqrt", -1], + "text-field": "ABC", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + } + } + ] +} diff --git a/metrics/integration/render-tests/text-size/property-function/expected.png b/metrics/integration/render-tests/text-size/property-function/expected.png new file mode 100644 index 00000000000..822fbb21767 Binary files /dev/null and b/metrics/integration/render-tests/text-size/property-function/expected.png differ diff --git a/metrics/integration/render-tests/text-size/property-function/style.json b/metrics/integration/render-tests/text-size/property-function/style.json new file mode 100644 index 00000000000..91e96fc4dc1 --- /dev/null +++ b/metrics/integration/render-tests/text-size/property-function/style.json @@ -0,0 +1,66 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { "x": 0 }, + "geometry": { + "type": "Point", + "coordinates": [ -10, 0 ] + } + }, + { + "type": "Feature", + "properties": { "x": 5 }, + "geometry": { + "type": "Point", + "coordinates": [ + 10, + 0 + ] + } + } + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "text-field": "A", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-size": { + "property": "x", + "stops": [ + [ + 0, + 12 + ], + [ + 10, + 24 + ] + ] + } + } + } + ] +} diff --git a/metrics/integration/render-tests/text-size/zero/expected.png b/metrics/integration/render-tests/text-size/zero/expected.png new file mode 100644 index 00000000000..e1aea4e90d6 Binary files /dev/null and b/metrics/integration/render-tests/text-size/zero/expected.png differ diff --git a/metrics/integration/render-tests/text-size/zero/style.json b/metrics/integration/render-tests/text-size/zero/style.json new file mode 100644 index 00000000000..125e3465045 --- /dev/null +++ b/metrics/integration/render-tests/text-size/zero/style.json @@ -0,0 +1,43 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "description": "Tests that zero text-size values are properly handled.", + "operations": [ + ["wait"], + ["setZoom", 18] + ] + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "zoom": 17, + "layers": [ + { + "id": "symbol", + "type": "symbol", + "source": "geojson", + "layout": { + "text-size": ["interpolate",["linear"],["zoom"],17.0,0.0,18.0,10.0,22.0,12.5], + "text-field": "ABC", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + } + } + ] +} diff --git a/metrics/integration/render-tests/text-tile-edge-clipping/default/expected.png b/metrics/integration/render-tests/text-tile-edge-clipping/default/expected.png new file mode 100644 index 00000000000..bcacd2afecc Binary files /dev/null and b/metrics/integration/render-tests/text-tile-edge-clipping/default/expected.png differ diff --git a/metrics/integration/render-tests/text-tile-edge-clipping/default/style.json b/metrics/integration/render-tests/text-tile-edge-clipping/default/style.json new file mode 100644 index 00000000000..f9d19188faa --- /dev/null +++ b/metrics/integration/render-tests/text-tile-edge-clipping/default/style.json @@ -0,0 +1,64 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 500, + "width": 500 + } + }, + "center": [ + 13.4365, + 52.5028 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "sprite": "local://sprites/sprite", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "top", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "filter": [ + "==", + "maki", + "restaurant" + ], + "layout": { + "symbol-placement": "point", + "icon-allow-overlap": true, + "icon-ignore-placement": true, + "icon-image": "dot.sdf", + "text-allow-overlap": true, + "text-ignore-placement": true, + "text-field": "Test Test Test", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-max-width": 100, + "text-anchor": "top" + }, + "paint": { + "icon-opacity": 1, + "text-opacity": 1 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/text-transform/lowercase/expected.png b/metrics/integration/render-tests/text-transform/lowercase/expected.png new file mode 100644 index 00000000000..b812b70723c Binary files /dev/null and b/metrics/integration/render-tests/text-transform/lowercase/expected.png differ diff --git a/metrics/integration/render-tests/text-transform/lowercase/style.json b/metrics/integration/render-tests/text-transform/lowercase/style.json new file mode 100644 index 00000000000..f4fe824b6d1 --- /dev/null +++ b/metrics/integration/render-tests/text-transform/lowercase/style.json @@ -0,0 +1,58 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "lowercase", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "filter": [ + "==", + "maki", + "restaurant" + ], + "layout": { + "symbol-placement": "point", + "text-allow-overlap": true, + "text-ignore-placement": true, + "text-field": "Test Test Test", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-max-width": 5, + "text-transform": "lowercase" + }, + "paint": { + "text-opacity": 1 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/text-transform/property-function/expected.png b/metrics/integration/render-tests/text-transform/property-function/expected.png new file mode 100644 index 00000000000..c2ee850c3f5 Binary files /dev/null and b/metrics/integration/render-tests/text-transform/property-function/expected.png differ diff --git a/metrics/integration/render-tests/text-transform/property-function/style.json b/metrics/integration/render-tests/text-transform/property-function/style.json new file mode 100644 index 00000000000..909c098d6f5 --- /dev/null +++ b/metrics/integration/render-tests/text-transform/property-function/style.json @@ -0,0 +1,56 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 64, + "width": 64 + } + }, + "center": [ 0, 0 ], + "zoom": 0, + "sources": { + "point": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { "x": "uppercase" }, + "geometry": { + "type": "Point", + "coordinates": [ 0, -10 ] + } + }, + { + "type": "Feature", + "properties": { "x": "lowercase" }, + "geometry": { + "type": "Point", + "coordinates": [ 0, 10 ] + } + } + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "text", + "type": "symbol", + "source": "point", + "layout": { + "text-field": "hello", + "text-transform": { + "type": "identity", + "property": "x" + }, + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + } + } + ] +} diff --git a/metrics/integration/render-tests/text-transform/uppercase/expected.png b/metrics/integration/render-tests/text-transform/uppercase/expected.png new file mode 100644 index 00000000000..f4fa28609ed Binary files /dev/null and b/metrics/integration/render-tests/text-transform/uppercase/expected.png differ diff --git a/metrics/integration/render-tests/text-transform/uppercase/style.json b/metrics/integration/render-tests/text-transform/uppercase/style.json new file mode 100644 index 00000000000..f1d46a2790f --- /dev/null +++ b/metrics/integration/render-tests/text-transform/uppercase/style.json @@ -0,0 +1,58 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "uppercase", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "filter": [ + "==", + "maki", + "restaurant" + ], + "layout": { + "symbol-placement": "point", + "text-allow-overlap": true, + "text-ignore-placement": true, + "text-field": "Test Test Test", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-max-width": 5, + "text-transform": "uppercase" + }, + "paint": { + "text-opacity": 1 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/text-translate-anchor/map/expected.png b/metrics/integration/render-tests/text-translate-anchor/map/expected.png new file mode 100644 index 00000000000..fc91cc14a3c Binary files /dev/null and b/metrics/integration/render-tests/text-translate-anchor/map/expected.png differ diff --git a/metrics/integration/render-tests/text-translate-anchor/map/style.json b/metrics/integration/render-tests/text-translate-anchor/map/style.json new file mode 100644 index 00000000000..bca39984827 --- /dev/null +++ b/metrics/integration/render-tests/text-translate-anchor/map/style.json @@ -0,0 +1,61 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "bearing": 90, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "text", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "filter": [ + "==", + "maki", + "restaurant" + ], + "layout": { + "symbol-placement": "point", + "text-allow-overlap": true, + "text-ignore-placement": true, + "text-field": "Test", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + }, + "paint": { + "text-translate": [ + 10, + 10 + ], + "text-translate-anchor": "map" + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/text-translate-anchor/viewport/expected.png b/metrics/integration/render-tests/text-translate-anchor/viewport/expected.png new file mode 100644 index 00000000000..a1d66c1a259 Binary files /dev/null and b/metrics/integration/render-tests/text-translate-anchor/viewport/expected.png differ diff --git a/metrics/integration/render-tests/text-translate-anchor/viewport/style.json b/metrics/integration/render-tests/text-translate-anchor/viewport/style.json new file mode 100644 index 00000000000..3045f9035b2 --- /dev/null +++ b/metrics/integration/render-tests/text-translate-anchor/viewport/style.json @@ -0,0 +1,61 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "bearing": 90, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "text", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "filter": [ + "==", + "maki", + "restaurant" + ], + "layout": { + "symbol-placement": "point", + "text-allow-overlap": true, + "text-ignore-placement": true, + "text-field": "Test", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + }, + "paint": { + "text-translate": [ + 10, + 10 + ], + "text-translate-anchor": "viewport" + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/text-translate/default/expected.png b/metrics/integration/render-tests/text-translate/default/expected.png new file mode 100644 index 00000000000..147ff7a0de9 Binary files /dev/null and b/metrics/integration/render-tests/text-translate/default/expected.png differ diff --git a/metrics/integration/render-tests/text-translate/default/style.json b/metrics/integration/render-tests/text-translate/default/style.json new file mode 100644 index 00000000000..a63ad2856f5 --- /dev/null +++ b/metrics/integration/render-tests/text-translate/default/style.json @@ -0,0 +1,54 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "text", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "filter": [ + "==", + "maki", + "restaurant" + ], + "layout": { + "symbol-placement": "point", + "text-allow-overlap": true, + "text-ignore-placement": true, + "text-field": "Test", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + }, + "paint": {} + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/text-translate/function/expected.png b/metrics/integration/render-tests/text-translate/function/expected.png new file mode 100644 index 00000000000..9c42127b30a Binary files /dev/null and b/metrics/integration/render-tests/text-translate/function/expected.png differ diff --git a/metrics/integration/render-tests/text-translate/function/style.json b/metrics/integration/render-tests/text-translate/function/style.json new file mode 100644 index 00000000000..f88e5f4634b --- /dev/null +++ b/metrics/integration/render-tests/text-translate/function/style.json @@ -0,0 +1,73 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "text", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "filter": [ + "==", + "maki", + "restaurant" + ], + "layout": { + "symbol-placement": "point", + "text-allow-overlap": true, + "text-ignore-placement": true, + "text-field": "Test", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + }, + "paint": { + "text-translate": { + "stops": [ + [ + 16, + [ + 15, + 15 + ] + ], + [ + 17, + [ + 20, + 20 + ] + ] + ] + } + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/text-translate/literal/expected.png b/metrics/integration/render-tests/text-translate/literal/expected.png new file mode 100644 index 00000000000..4356e26d462 Binary files /dev/null and b/metrics/integration/render-tests/text-translate/literal/expected.png differ diff --git a/metrics/integration/render-tests/text-translate/literal/style.json b/metrics/integration/render-tests/text-translate/literal/style.json new file mode 100644 index 00000000000..1ea337bbf58 --- /dev/null +++ b/metrics/integration/render-tests/text-translate/literal/style.json @@ -0,0 +1,59 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "text", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "filter": [ + "==", + "maki", + "restaurant" + ], + "layout": { + "symbol-placement": "point", + "text-allow-overlap": true, + "text-ignore-placement": true, + "text-field": "Test", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + }, + "paint": { + "text-translate": [ + 5, + 5 + ] + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/text-variable-anchor/all-anchors-icon-text-fit/expected.png b/metrics/integration/render-tests/text-variable-anchor/all-anchors-icon-text-fit/expected.png new file mode 100644 index 00000000000..3d000a12eb0 Binary files /dev/null and b/metrics/integration/render-tests/text-variable-anchor/all-anchors-icon-text-fit/expected.png differ diff --git a/metrics/integration/render-tests/text-variable-anchor/all-anchors-icon-text-fit/style.json b/metrics/integration/render-tests/text-variable-anchor/all-anchors-icon-text-fit/style.json new file mode 100644 index 00000000000..91c342c0363 --- /dev/null +++ b/metrics/integration/render-tests/text-variable-anchor/all-anchors-icon-text-fit/style.json @@ -0,0 +1,66 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "sprite": "local://sprites/sprite", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "top", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "filter": [ + "==", + "maki", + "restaurant" + ], + "layout": { + "icon-image": "motorway_lg_6", + "icon-text-fit": "both", + "icon-text-fit-padding": [5, 5, 5, 5], + "text-field": "Test Test Test", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-max-width": 5, + "text-justify": "auto", + "text-variable-anchor": [ + "center", + "top", + "bottom", + "left", + "right", + "top-left", + "top-right", + "bottom-left", + "bottom-right" + ] + } + }] +} diff --git a/metrics/integration/render-tests/text-variable-anchor/all-anchors-offset-zero/expected.png b/metrics/integration/render-tests/text-variable-anchor/all-anchors-offset-zero/expected.png new file mode 100644 index 00000000000..bed8c64a7aa Binary files /dev/null and b/metrics/integration/render-tests/text-variable-anchor/all-anchors-offset-zero/expected.png differ diff --git a/metrics/integration/render-tests/text-variable-anchor/all-anchors-offset-zero/style.json b/metrics/integration/render-tests/text-variable-anchor/all-anchors-offset-zero/style.json new file mode 100644 index 00000000000..73fd84ade25 --- /dev/null +++ b/metrics/integration/render-tests/text-variable-anchor/all-anchors-offset-zero/style.json @@ -0,0 +1,122 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 128, + "width": 128 + } + }, + "center": [ 0, 0 ], + "zoom": 0, + "sources": { + "point": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + } + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "text", + "type": "symbol", + "source": "point", + "layout": { + "text-field": "x", + "text-size": 20, + "text-justify": "auto", + "text-variable-anchor": [ + "center", + "top", + "bottom", + "left", + "right", + "top-left", + "top-right", + "bottom-left", + "bottom-right" + ], + "text-radial-offset": 0, + "text-offset": [2, 2], + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + } + }, + { + "id": "anchor", + "type": "circle", + "source": "point", + "paint" :{ + "circle-radius": 2 + } + } + ] +} diff --git a/metrics/integration/render-tests/text-variable-anchor/all-anchors-offset/expected.png b/metrics/integration/render-tests/text-variable-anchor/all-anchors-offset/expected.png new file mode 100644 index 00000000000..784d063b996 Binary files /dev/null and b/metrics/integration/render-tests/text-variable-anchor/all-anchors-offset/expected.png differ diff --git a/metrics/integration/render-tests/text-variable-anchor/all-anchors-offset/style.json b/metrics/integration/render-tests/text-variable-anchor/all-anchors-offset/style.json new file mode 100644 index 00000000000..95d193fe95b --- /dev/null +++ b/metrics/integration/render-tests/text-variable-anchor/all-anchors-offset/style.json @@ -0,0 +1,121 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 128, + "width": 128 + } + }, + "center": [ 0, 0 ], + "zoom": 0, + "sources": { + "point": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + } + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "text", + "type": "symbol", + "source": "point", + "layout": { + "text-field": "x", + "text-size": 20, + "text-justify": "auto", + "text-variable-anchor": [ + "center", + "top", + "bottom", + "left", + "right", + "top-left", + "top-right", + "bottom-left", + "bottom-right" + ], + "text-radial-offset": 1.5, + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + } + }, + { + "id": "anchor", + "type": "circle", + "source": "point", + "paint" :{ + "circle-radius": 2 + } + } + ] +} diff --git a/metrics/integration/render-tests/text-variable-anchor/all-anchors-radial-offset-zero/expected.png b/metrics/integration/render-tests/text-variable-anchor/all-anchors-radial-offset-zero/expected.png new file mode 100644 index 00000000000..31a3a20875c Binary files /dev/null and b/metrics/integration/render-tests/text-variable-anchor/all-anchors-radial-offset-zero/expected.png differ diff --git a/metrics/integration/render-tests/text-variable-anchor/all-anchors-radial-offset-zero/style.json b/metrics/integration/render-tests/text-variable-anchor/all-anchors-radial-offset-zero/style.json new file mode 100644 index 00000000000..4817d45a2c4 --- /dev/null +++ b/metrics/integration/render-tests/text-variable-anchor/all-anchors-radial-offset-zero/style.json @@ -0,0 +1,121 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 128, + "width": 128 + } + }, + "center": [ 0, 0 ], + "zoom": 0, + "sources": { + "point": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + } + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "text", + "type": "symbol", + "source": "point", + "layout": { + "text-field": "x", + "text-size": 20, + "text-justify": "auto", + "text-variable-anchor": [ + "center", + "top", + "bottom", + "left", + "right", + "top-left", + "top-right", + "bottom-left", + "bottom-right" + ], + "text-offset": [2, 1.5], + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + } + }, + { + "id": "anchor", + "type": "circle", + "source": "point", + "paint" :{ + "circle-radius": 2 + } + } + ] +} diff --git a/metrics/integration/render-tests/text-variable-anchor/all-anchors-text-allow-overlap/expected.png b/metrics/integration/render-tests/text-variable-anchor/all-anchors-text-allow-overlap/expected.png new file mode 100644 index 00000000000..99a7e015358 Binary files /dev/null and b/metrics/integration/render-tests/text-variable-anchor/all-anchors-text-allow-overlap/expected.png differ diff --git a/metrics/integration/render-tests/text-variable-anchor/all-anchors-text-allow-overlap/style.json b/metrics/integration/render-tests/text-variable-anchor/all-anchors-text-allow-overlap/style.json new file mode 100644 index 00000000000..f30d5cb54b6 --- /dev/null +++ b/metrics/integration/render-tests/text-variable-anchor/all-anchors-text-allow-overlap/style.json @@ -0,0 +1,66 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256, + "allowed": 0.003 + } + }, + "center": [ + 13.418056, + 52.501000 + ], + "zoom": 16, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "sprite": "local://sprites/sprite", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "top", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "filter": [ + "==", + "maki", + "restaurant" + ], + "layout": { + "text-field": "Test Test", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-max-width": 5, + "text-justify": "auto", + "text-allow-overlap": true, + "text-variable-anchor": [ + "center", + "top", + "bottom", + "left", + "right", + "top-left", + "top-right", + "bottom-left", + "bottom-right" + ], + "text-radial-offset": 1 + } + }] +} diff --git a/metrics/integration/render-tests/text-variable-anchor/all-anchors-tile-map-mode/expected.png b/metrics/integration/render-tests/text-variable-anchor/all-anchors-tile-map-mode/expected.png new file mode 100644 index 00000000000..ef5e7864e78 Binary files /dev/null and b/metrics/integration/render-tests/text-variable-anchor/all-anchors-tile-map-mode/expected.png differ diff --git a/metrics/integration/render-tests/text-variable-anchor/all-anchors-tile-map-mode/style.json b/metrics/integration/render-tests/text-variable-anchor/all-anchors-tile-map-mode/style.json new file mode 100644 index 00000000000..6acc08a573c --- /dev/null +++ b/metrics/integration/render-tests/text-variable-anchor/all-anchors-tile-map-mode/style.json @@ -0,0 +1,65 @@ +{ + "version": 8, + "metadata": { + "test": { + "debug": true, + "mapMode": "tile", + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "sprite": "local://sprites/sprite", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "top", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "filter": [ + "==", + "maki", + "restaurant" + ], + "layout": { + "text-field": "Test Test Test", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-max-width": 5, + "text-justify": "auto", + "text-variable-anchor": [ + "center", + "top", + "bottom", + "left", + "right", + "top-left", + "top-right", + "bottom-left", + "bottom-right" + ] + } + }] +} diff --git a/metrics/integration/render-tests/text-variable-anchor/all-anchors-two-dimentional-offset-negative/expected.png b/metrics/integration/render-tests/text-variable-anchor/all-anchors-two-dimentional-offset-negative/expected.png new file mode 100644 index 00000000000..8b9cb4b8894 Binary files /dev/null and b/metrics/integration/render-tests/text-variable-anchor/all-anchors-two-dimentional-offset-negative/expected.png differ diff --git a/metrics/integration/render-tests/text-variable-anchor/all-anchors-two-dimentional-offset-negative/style.json b/metrics/integration/render-tests/text-variable-anchor/all-anchors-two-dimentional-offset-negative/style.json new file mode 100644 index 00000000000..5d8de72a017 --- /dev/null +++ b/metrics/integration/render-tests/text-variable-anchor/all-anchors-two-dimentional-offset-negative/style.json @@ -0,0 +1,121 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 128, + "width": 128 + } + }, + "center": [ 0, 0 ], + "zoom": 0, + "sources": { + "point": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + } + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "text", + "type": "symbol", + "source": "point", + "layout": { + "text-field": "x", + "text-size": 20, + "text-justify": "auto", + "text-variable-anchor": [ + "center", + "top", + "bottom", + "left", + "right", + "top-left", + "top-right", + "bottom-left", + "bottom-right" + ], + "text-offset": [2, -1], + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + } + }, + { + "id": "anchor", + "type": "circle", + "source": "point", + "paint" :{ + "circle-radius": 2 + } + } + ] +} diff --git a/metrics/integration/render-tests/text-variable-anchor/all-anchors-two-dimentional-offset-zero/expected.png b/metrics/integration/render-tests/text-variable-anchor/all-anchors-two-dimentional-offset-zero/expected.png new file mode 100644 index 00000000000..9e71ac16b38 Binary files /dev/null and b/metrics/integration/render-tests/text-variable-anchor/all-anchors-two-dimentional-offset-zero/expected.png differ diff --git a/metrics/integration/render-tests/text-variable-anchor/all-anchors-two-dimentional-offset-zero/style.json b/metrics/integration/render-tests/text-variable-anchor/all-anchors-two-dimentional-offset-zero/style.json new file mode 100644 index 00000000000..e9e2988e1e1 --- /dev/null +++ b/metrics/integration/render-tests/text-variable-anchor/all-anchors-two-dimentional-offset-zero/style.json @@ -0,0 +1,121 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 128, + "width": 128 + } + }, + "center": [ 0, 0 ], + "zoom": 0, + "sources": { + "point": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + } + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "text", + "type": "symbol", + "source": "point", + "layout": { + "text-field": "x", + "text-size": 20, + "text-justify": "auto", + "text-variable-anchor": [ + "center", + "top", + "bottom", + "left", + "right", + "top-left", + "top-right", + "bottom-left", + "bottom-right" + ], + "text-offset": [2, 0], + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + } + }, + { + "id": "anchor", + "type": "circle", + "source": "point", + "paint" :{ + "circle-radius": 2 + } + } + ] +} diff --git a/metrics/integration/render-tests/text-variable-anchor/all-anchors-two-dimentional-offset/expected.png b/metrics/integration/render-tests/text-variable-anchor/all-anchors-two-dimentional-offset/expected.png new file mode 100644 index 00000000000..31a3a20875c Binary files /dev/null and b/metrics/integration/render-tests/text-variable-anchor/all-anchors-two-dimentional-offset/expected.png differ diff --git a/metrics/integration/render-tests/text-variable-anchor/all-anchors-two-dimentional-offset/style.json b/metrics/integration/render-tests/text-variable-anchor/all-anchors-two-dimentional-offset/style.json new file mode 100644 index 00000000000..4817d45a2c4 --- /dev/null +++ b/metrics/integration/render-tests/text-variable-anchor/all-anchors-two-dimentional-offset/style.json @@ -0,0 +1,121 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 128, + "width": 128 + } + }, + "center": [ 0, 0 ], + "zoom": 0, + "sources": { + "point": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + } + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "text", + "type": "symbol", + "source": "point", + "layout": { + "text-field": "x", + "text-size": 20, + "text-justify": "auto", + "text-variable-anchor": [ + "center", + "top", + "bottom", + "left", + "right", + "top-left", + "top-right", + "bottom-left", + "bottom-right" + ], + "text-offset": [2, 1.5], + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + } + }, + { + "id": "anchor", + "type": "circle", + "source": "point", + "paint" :{ + "circle-radius": 2 + } + } + ] +} diff --git a/metrics/integration/render-tests/text-variable-anchor/all-anchors/expected.png b/metrics/integration/render-tests/text-variable-anchor/all-anchors/expected.png new file mode 100644 index 00000000000..ff745f4b6ab Binary files /dev/null and b/metrics/integration/render-tests/text-variable-anchor/all-anchors/expected.png differ diff --git a/metrics/integration/render-tests/text-variable-anchor/all-anchors/style.json b/metrics/integration/render-tests/text-variable-anchor/all-anchors/style.json new file mode 100644 index 00000000000..1b59ab11477 --- /dev/null +++ b/metrics/integration/render-tests/text-variable-anchor/all-anchors/style.json @@ -0,0 +1,63 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "sprite": "local://sprites/sprite", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "top", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "filter": [ + "==", + "maki", + "restaurant" + ], + "layout": { + "text-field": "Test Test Test", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-max-width": 5, + "text-justify": "auto", + "text-variable-anchor": [ + "center", + "top", + "bottom", + "left", + "right", + "top-left", + "top-right", + "bottom-left", + "bottom-right" + ] + } + }] +} diff --git a/metrics/integration/render-tests/text-variable-anchor/icon-image-all-anchors/expected.png b/metrics/integration/render-tests/text-variable-anchor/icon-image-all-anchors/expected.png new file mode 100644 index 00000000000..d34b633c084 Binary files /dev/null and b/metrics/integration/render-tests/text-variable-anchor/icon-image-all-anchors/expected.png differ diff --git a/metrics/integration/render-tests/text-variable-anchor/icon-image-all-anchors/style.json b/metrics/integration/render-tests/text-variable-anchor/icon-image-all-anchors/style.json new file mode 100644 index 00000000000..ad9f14b2cc7 --- /dev/null +++ b/metrics/integration/render-tests/text-variable-anchor/icon-image-all-anchors/style.json @@ -0,0 +1,74 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 128, + "width": 128 + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "image": "bank-12" + }, + "geometry": { + "type": "Point", + "coordinates": [ + 0, + -10 + ] + } + }, + { + "type": "Feature", + "properties": { + "image": "bakery-12" + }, + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 10 + ] + } + } + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "text", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": ["get", "image"], + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-justify": "auto", + "text-variable-anchor" : [ + "top", + "bottom", + "left", + "right", + "top-left", + "top-right", + "bottom-left", + "bottom-right" + ], + "text-radial-offset": 0.5, + "text-field": ["get", "image"] + } + } + ] +} diff --git a/metrics/integration/render-tests/text-variable-anchor/icon-image/expected.png b/metrics/integration/render-tests/text-variable-anchor/icon-image/expected.png new file mode 100644 index 00000000000..6838e331d53 Binary files /dev/null and b/metrics/integration/render-tests/text-variable-anchor/icon-image/expected.png differ diff --git a/metrics/integration/render-tests/text-variable-anchor/icon-image/style.json b/metrics/integration/render-tests/text-variable-anchor/icon-image/style.json new file mode 100644 index 00000000000..453f579a7b9 --- /dev/null +++ b/metrics/integration/render-tests/text-variable-anchor/icon-image/style.json @@ -0,0 +1,65 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 128, + "width": 128 + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "image": "bank-12" + }, + "geometry": { + "type": "Point", + "coordinates": [ + 0, + -10 + ] + } + }, + { + "type": "Feature", + "properties": { + "image": "bakery-12" + }, + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 10 + ] + } + } + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "text", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": ["get", "image"], + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-justify": "auto", + "text-variable-anchor" : ["top-left", "bottom-right"], + "text-radial-offset": 0.5, + "text-field": ["get", "image"] + } + } + ] +} diff --git a/metrics/integration/render-tests/text-variable-anchor/icon-text-fit-collision-box/expected.png b/metrics/integration/render-tests/text-variable-anchor/icon-text-fit-collision-box/expected.png new file mode 100644 index 00000000000..deb6c2b27ba Binary files /dev/null and b/metrics/integration/render-tests/text-variable-anchor/icon-text-fit-collision-box/expected.png differ diff --git a/metrics/integration/render-tests/text-variable-anchor/icon-text-fit-collision-box/style.json b/metrics/integration/render-tests/text-variable-anchor/icon-text-fit-collision-box/style.json new file mode 100644 index 00000000000..7b9b16d09c8 --- /dev/null +++ b/metrics/integration/render-tests/text-variable-anchor/icon-text-fit-collision-box/style.json @@ -0,0 +1,69 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 128, + "width": 128, + "allowed": 0.0075, + "collisionDebug": true + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "image": "motorway_lg_4" + }, + "geometry": { + "type": "Point", + "coordinates": [ + 0, + -10 + ] + } + }, + { + "type": "Feature", + "properties": { + "image": "motorway_lg_6" + }, + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 10 + ] + } + } + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "text", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": ["get", "image"], + "icon-text-fit": "both", + "icon-text-fit-padding": [8, 8, 8, 8], + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-justify": "auto", + "text-variable-anchor" : ["top-left", "bottom-right"], + "text-radial-offset": 0.5, + "text-field": ["get", "image"] + } + } + ] +} diff --git a/metrics/integration/render-tests/text-variable-anchor/left-top-right-bottom-offset-tile-map-mode/expected.png b/metrics/integration/render-tests/text-variable-anchor/left-top-right-bottom-offset-tile-map-mode/expected.png new file mode 100644 index 00000000000..2dad19da2ab Binary files /dev/null and b/metrics/integration/render-tests/text-variable-anchor/left-top-right-bottom-offset-tile-map-mode/expected.png differ diff --git a/metrics/integration/render-tests/text-variable-anchor/left-top-right-bottom-offset-tile-map-mode/style.json b/metrics/integration/render-tests/text-variable-anchor/left-top-right-bottom-offset-tile-map-mode/style.json new file mode 100644 index 00000000000..f6f75e66053 --- /dev/null +++ b/metrics/integration/render-tests/text-variable-anchor/left-top-right-bottom-offset-tile-map-mode/style.json @@ -0,0 +1,61 @@ +{ + "version": 8, + "metadata": { + "test": { + "debug": true, + "mapMode": "tile", + "allowed": 0.0005 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "sprite": "local://sprites/sprite", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "top", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "filter": [ + "==", + "maki", + "restaurant" + ], + "layout": { + "text-field": "{name}", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "icon-image": "bank-12", + "text-justify": "auto", + "text-radial-offset": 0.7, + "text-variable-anchor": [ + "left", + "top", + "right", + "bottom" + ] + } + }] +} diff --git a/metrics/integration/render-tests/text-variable-anchor/no-animate-zoom/expected.png b/metrics/integration/render-tests/text-variable-anchor/no-animate-zoom/expected.png new file mode 100644 index 00000000000..510aedcc7b8 Binary files /dev/null and b/metrics/integration/render-tests/text-variable-anchor/no-animate-zoom/expected.png differ diff --git a/metrics/integration/render-tests/text-variable-anchor/no-animate-zoom/style.json b/metrics/integration/render-tests/text-variable-anchor/no-animate-zoom/style.json new file mode 100644 index 00000000000..8c2e9f85513 --- /dev/null +++ b/metrics/integration/render-tests/text-variable-anchor/no-animate-zoom/style.json @@ -0,0 +1,90 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256, + "width": 256, + "fadeDuration": 100, + "description": "Start with space for two labels. Zoom out so that second has to switch anchors. Render after half a fade duration, but verify that label has moved the whole way.", + "operations": [ + ["wait", 100], + ["wait", 100], + ["setZoom", 0.5], + ["wait"], + ["wait", 100], + [ + "wait", + 50 + ] + ] + } + }, + "center": [ 0, 0 ], + "zoom": 1.5, + "sources": { + "point": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "name": "First" + }, + "geometry": { + "type": "Point", + "coordinates": [ 10, 0 ] + } + }, + { + "type": "Feature", + "properties": { + "name": "Second" + }, + "geometry": { + "type": "Point", + "coordinates": [ -10, 0 ] + } + }] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "text", + "type": "symbol", + "source": "point", + "layout": { + "text-field": ["get", "name"], + "text-size": 20, + "text-justify": "auto", + "text-variable-anchor": [ + "left", + "right" + ], + "text-radial-offset": 0.5, + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + } + }, + { + "id": "anchor", + "type": "circle", + "source": "point", + "paint" :{ + "circle-radius": 2 + } + } + ] +} diff --git a/metrics/integration/render-tests/text-variable-anchor/pitched-offset/expected.png b/metrics/integration/render-tests/text-variable-anchor/pitched-offset/expected.png new file mode 100644 index 00000000000..3e604dfa069 Binary files /dev/null and b/metrics/integration/render-tests/text-variable-anchor/pitched-offset/expected.png differ diff --git a/metrics/integration/render-tests/text-variable-anchor/pitched-offset/style.json b/metrics/integration/render-tests/text-variable-anchor/pitched-offset/style.json new file mode 100644 index 00000000000..1a703237465 --- /dev/null +++ b/metrics/integration/render-tests/text-variable-anchor/pitched-offset/style.json @@ -0,0 +1,65 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "pitch": 60, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "sprite": "local://sprites/sprite", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "top", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "filter": [ + "==", + "maki", + "restaurant" + ], + "layout": { + "text-field": "Test Test Test", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-max-width": 5, + "text-justify": "auto", + "text-variable-anchor": [ + "center", + "top", + "bottom", + "left", + "right", + "top-left", + "top-right", + "bottom-left", + "bottom-right" + ], + "text-radial-offset": 5 + } + }] +} diff --git a/metrics/integration/render-tests/text-variable-anchor/pitched-rotated-debug/expected.png b/metrics/integration/render-tests/text-variable-anchor/pitched-rotated-debug/expected.png new file mode 100644 index 00000000000..56bcdfc2ff1 Binary files /dev/null and b/metrics/integration/render-tests/text-variable-anchor/pitched-rotated-debug/expected.png differ diff --git a/metrics/integration/render-tests/text-variable-anchor/pitched-rotated-debug/style.json b/metrics/integration/render-tests/text-variable-anchor/pitched-rotated-debug/style.json new file mode 100644 index 00000000000..defbcbd35ff --- /dev/null +++ b/metrics/integration/render-tests/text-variable-anchor/pitched-rotated-debug/style.json @@ -0,0 +1,66 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256, + "collisionDebug": true + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "pitch": 60, + "bearing": 90, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "sprite": "local://sprites/sprite", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "top", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "filter": [ + "==", + "maki", + "restaurant" + ], + "layout": { + "text-field": "Test Test Test", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-max-width": 5, + "text-justify": "auto", + "text-variable-anchor": [ + "center", + "top", + "bottom", + "left", + "right", + "top-left", + "top-right", + "bottom-left", + "bottom-right" + ] + } + }] +} diff --git a/metrics/integration/render-tests/text-variable-anchor/pitched-with-map/expected.png b/metrics/integration/render-tests/text-variable-anchor/pitched-with-map/expected.png new file mode 100644 index 00000000000..8b0da17d945 Binary files /dev/null and b/metrics/integration/render-tests/text-variable-anchor/pitched-with-map/expected.png differ diff --git a/metrics/integration/render-tests/text-variable-anchor/pitched-with-map/style.json b/metrics/integration/render-tests/text-variable-anchor/pitched-with-map/style.json new file mode 100644 index 00000000000..b3ba095fffe --- /dev/null +++ b/metrics/integration/render-tests/text-variable-anchor/pitched-with-map/style.json @@ -0,0 +1,65 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "pitch": 60, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "sprite": "local://sprites/sprite", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "top", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "filter": [ + "==", + "maki", + "restaurant" + ], + "layout": { + "text-field": "Test Test Test", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-max-width": 5, + "text-justify": "auto", + "text-pitch-alignment": "map", + "text-variable-anchor": [ + "center", + "top", + "bottom", + "left", + "right", + "top-left", + "top-right", + "bottom-left", + "bottom-right" + ] + } + }] +} diff --git a/metrics/integration/render-tests/text-variable-anchor/pitched/expected.png b/metrics/integration/render-tests/text-variable-anchor/pitched/expected.png new file mode 100644 index 00000000000..e3fe46e38a5 Binary files /dev/null and b/metrics/integration/render-tests/text-variable-anchor/pitched/expected.png differ diff --git a/metrics/integration/render-tests/text-variable-anchor/pitched/style.json b/metrics/integration/render-tests/text-variable-anchor/pitched/style.json new file mode 100644 index 00000000000..f8fb7342720 --- /dev/null +++ b/metrics/integration/render-tests/text-variable-anchor/pitched/style.json @@ -0,0 +1,64 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "pitch": 60, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "sprite": "local://sprites/sprite", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "top", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "filter": [ + "==", + "maki", + "restaurant" + ], + "layout": { + "text-field": "Test Test Test", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-max-width": 5, + "text-justify": "auto", + "text-variable-anchor": [ + "center", + "top", + "bottom", + "left", + "right", + "top-left", + "top-right", + "bottom-left", + "bottom-right" + ] + } + }] +} diff --git a/metrics/integration/render-tests/text-variable-anchor/remember-last-placement/expected.png b/metrics/integration/render-tests/text-variable-anchor/remember-last-placement/expected.png new file mode 100644 index 00000000000..cec609f73f7 Binary files /dev/null and b/metrics/integration/render-tests/text-variable-anchor/remember-last-placement/expected.png differ diff --git a/metrics/integration/render-tests/text-variable-anchor/remember-last-placement/style.json b/metrics/integration/render-tests/text-variable-anchor/remember-last-placement/style.json new file mode 100644 index 00000000000..644c8c366c6 --- /dev/null +++ b/metrics/integration/render-tests/text-variable-anchor/remember-last-placement/style.json @@ -0,0 +1,95 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256, + "width": 256, + "fadeDuration": 100, + "description": "Start with space for both labels to show with left anchor. Zoom out so that second has to switch to top anchor. Zoom out further so that second is forced to collide out. Zoom all the way back in so that the second label _could_ show in original position, but instead uses the last successfully placed one.", + "operations": [ + ["wait", 100], + ["wait", 100], + ["setZoom", 0.6], + ["wait"], + ["wait", 100], + ["wait", 100], + ["setZoom", 0], + ["wait"], + ["wait", 100], + ["wait", 100], + ["setZoom", 1.7], + ["wait"], + ["wait", 100], + ["wait", 100] + ] + } + }, + "center": [ 0, 0 ], + "zoom": 1.5, + "sources": { + "point": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "name": "First" + }, + "geometry": { + "type": "Point", + "coordinates": [ -10, 0 ] + } + }, + { + "type": "Feature", + "properties": { + "name": "Second" + }, + "geometry": { + "type": "Point", + "coordinates": [ 10, -7 ] + } + }] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "text", + "type": "symbol", + "source": "point", + "layout": { + "text-field": ["get", "name"], + "text-size": 20, + "text-justify": "auto", + "text-variable-anchor": [ + "left", + "top" + ], + "text-radial-offset": 0.3, + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + } + }, + { + "id": "anchor", + "type": "circle", + "source": "point", + "paint" :{ + "circle-radius": 2 + } + } + ] +} diff --git a/metrics/integration/render-tests/text-variable-anchor/rotated-offset/expected.png b/metrics/integration/render-tests/text-variable-anchor/rotated-offset/expected.png new file mode 100644 index 00000000000..d056626fe08 Binary files /dev/null and b/metrics/integration/render-tests/text-variable-anchor/rotated-offset/expected.png differ diff --git a/metrics/integration/render-tests/text-variable-anchor/rotated-offset/style.json b/metrics/integration/render-tests/text-variable-anchor/rotated-offset/style.json new file mode 100644 index 00000000000..8d7446a43ca --- /dev/null +++ b/metrics/integration/render-tests/text-variable-anchor/rotated-offset/style.json @@ -0,0 +1,65 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "bearing": 90, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "sprite": "local://sprites/sprite", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "top", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "filter": [ + "==", + "maki", + "restaurant" + ], + "layout": { + "text-field": "Test Test Test", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-max-width": 5, + "text-justify": "auto", + "text-variable-anchor": [ + "center", + "top", + "bottom", + "left", + "right", + "top-left", + "top-right", + "bottom-left", + "bottom-right" + ], + "text-radial-offset": 5 + } + }] +} diff --git a/metrics/integration/render-tests/text-variable-anchor/rotated-with-map/expected.png b/metrics/integration/render-tests/text-variable-anchor/rotated-with-map/expected.png new file mode 100644 index 00000000000..a7598d9d6fd Binary files /dev/null and b/metrics/integration/render-tests/text-variable-anchor/rotated-with-map/expected.png differ diff --git a/metrics/integration/render-tests/text-variable-anchor/rotated-with-map/style.json b/metrics/integration/render-tests/text-variable-anchor/rotated-with-map/style.json new file mode 100644 index 00000000000..93a25a04953 --- /dev/null +++ b/metrics/integration/render-tests/text-variable-anchor/rotated-with-map/style.json @@ -0,0 +1,66 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256, + "description": "Note that there are collisions in this example. This is because of the limitation that collision boxes don't rotate; however, their position should still be correct." + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "bearing": 90, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "sprite": "local://sprites/sprite", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "top", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "filter": [ + "==", + "maki", + "restaurant" + ], + "layout": { + "text-field": "Test Test Test", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-max-width": 5, + "text-justify": "auto", + "text-rotation-alignment": "map", + "text-variable-anchor": [ + "center", + "top", + "bottom", + "left", + "right", + "top-left", + "top-right", + "bottom-left", + "bottom-right" + ] + } + }] +} diff --git a/metrics/integration/render-tests/text-variable-anchor/rotated/expected.png b/metrics/integration/render-tests/text-variable-anchor/rotated/expected.png new file mode 100644 index 00000000000..63403973742 Binary files /dev/null and b/metrics/integration/render-tests/text-variable-anchor/rotated/expected.png differ diff --git a/metrics/integration/render-tests/text-variable-anchor/rotated/style.json b/metrics/integration/render-tests/text-variable-anchor/rotated/style.json new file mode 100644 index 00000000000..a537687788a --- /dev/null +++ b/metrics/integration/render-tests/text-variable-anchor/rotated/style.json @@ -0,0 +1,64 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "bearing": 90, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "sprite": "local://sprites/sprite", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "top", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "filter": [ + "==", + "maki", + "restaurant" + ], + "layout": { + "text-field": "Test Test Test", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-max-width": 5, + "text-justify": "auto", + "text-variable-anchor": [ + "center", + "top", + "bottom", + "left", + "right", + "top-left", + "top-right", + "bottom-left", + "bottom-right" + ] + } + }] +} diff --git a/metrics/integration/render-tests/text-variable-anchor/single-justification/expected.png b/metrics/integration/render-tests/text-variable-anchor/single-justification/expected.png new file mode 100644 index 00000000000..69134ba5af1 Binary files /dev/null and b/metrics/integration/render-tests/text-variable-anchor/single-justification/expected.png differ diff --git a/metrics/integration/render-tests/text-variable-anchor/single-justification/style.json b/metrics/integration/render-tests/text-variable-anchor/single-justification/style.json new file mode 100644 index 00000000000..c2483ae8211 --- /dev/null +++ b/metrics/integration/render-tests/text-variable-anchor/single-justification/style.json @@ -0,0 +1,63 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "sprite": "local://sprites/sprite", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "top", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "filter": [ + "==", + "maki", + "restaurant" + ], + "layout": { + "text-field": "Test Test Test", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-max-width": 5, + "text-justify": "left", + "text-variable-anchor": [ + "center", + "top", + "bottom", + "left", + "right", + "top-left", + "top-right", + "bottom-left", + "bottom-right" + ] + } + }] +} diff --git a/metrics/integration/render-tests/text-variable-anchor/single-line/expected.png b/metrics/integration/render-tests/text-variable-anchor/single-line/expected.png new file mode 100644 index 00000000000..d1fc7c117ad Binary files /dev/null and b/metrics/integration/render-tests/text-variable-anchor/single-line/expected.png differ diff --git a/metrics/integration/render-tests/text-variable-anchor/single-line/style.json b/metrics/integration/render-tests/text-variable-anchor/single-line/style.json new file mode 100644 index 00000000000..2c9c085b376 --- /dev/null +++ b/metrics/integration/render-tests/text-variable-anchor/single-line/style.json @@ -0,0 +1,64 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256, + "description": "Single line labels render differently because they use the same glyphs for all justifications." + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "sprite": "local://sprites/sprite", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "top", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "filter": [ + "==", + "maki", + "restaurant" + ], + "layout": { + "text-field": "Test", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-max-width": 5, + "text-justify": "auto", + "text-variable-anchor": [ + "center", + "top", + "bottom", + "left", + "right", + "top-left", + "top-right", + "bottom-left", + "bottom-right" + ] + } + }] +} diff --git a/metrics/integration/render-tests/text-variable-anchor/text-allow-overlap/expected.png b/metrics/integration/render-tests/text-variable-anchor/text-allow-overlap/expected.png new file mode 100644 index 00000000000..418206d25ac Binary files /dev/null and b/metrics/integration/render-tests/text-variable-anchor/text-allow-overlap/expected.png differ diff --git a/metrics/integration/render-tests/text-variable-anchor/text-allow-overlap/style.json b/metrics/integration/render-tests/text-variable-anchor/text-allow-overlap/style.json new file mode 100644 index 00000000000..ac5402a1d56 --- /dev/null +++ b/metrics/integration/render-tests/text-variable-anchor/text-allow-overlap/style.json @@ -0,0 +1,77 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 128, + "width": 128 + } + }, + "center": [ 0, 0 ], + "zoom": 0, + "sources": { + "point": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + } + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "text", + "type": "symbol", + "source": "point", + "layout": { + "text-field": "x", + "text-size": 20, + "text-justify": "auto", + "text-allow-overlap": true, + "text-variable-anchor": ["left", "right", "top", "bottom"], + "text-radial-offset": 0.7, + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + } + }, + { + "id": "anchor", + "type": "circle", + "source": "point", + "paint" :{ + "circle-radius": 2 + } + } + ] +} diff --git a/metrics/integration/render-tests/text-variable-anchor/top-bottom-left-right/expected.png b/metrics/integration/render-tests/text-variable-anchor/top-bottom-left-right/expected.png new file mode 100644 index 00000000000..a8d622d10ee Binary files /dev/null and b/metrics/integration/render-tests/text-variable-anchor/top-bottom-left-right/expected.png differ diff --git a/metrics/integration/render-tests/text-variable-anchor/top-bottom-left-right/style.json b/metrics/integration/render-tests/text-variable-anchor/top-bottom-left-right/style.json new file mode 100644 index 00000000000..97a90905a0c --- /dev/null +++ b/metrics/integration/render-tests/text-variable-anchor/top-bottom-left-right/style.json @@ -0,0 +1,69 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14.5, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "sprite": "local://sprites/sprite", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "top", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "filter": ["all", [ + "==", + "maki", + "restaurant" + ] + ], + "layout": { + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-field": ["get", "name"], + "text-size": 12, + "text-justify": "auto", + "text-variable-anchor": ["top", "bottom", "left", "right" ] + } + }, + { + "id": "circles", + "type": "circle", + "source": "mapbox", + "source-layer": "poi_label", + "filter": [ + "==", + "maki", + "restaurant" + ], + "paint": { + "circle-radius": 2 + } + } + ] +} diff --git a/metrics/integration/render-tests/text-visibility/none/expected.png b/metrics/integration/render-tests/text-visibility/none/expected.png new file mode 100644 index 00000000000..5308b74aacb Binary files /dev/null and b/metrics/integration/render-tests/text-visibility/none/expected.png differ diff --git a/metrics/integration/render-tests/text-visibility/none/style.json b/metrics/integration/render-tests/text-visibility/none/style.json new file mode 100644 index 00000000000..f5396c1af75 --- /dev/null +++ b/metrics/integration/render-tests/text-visibility/none/style.json @@ -0,0 +1,47 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "icon", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "layout": { + "text-field": "Test", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "symbol-placement": "point", + "visibility": "none" + } + } + ] +} diff --git a/metrics/integration/render-tests/text-visibility/visible/expected.png b/metrics/integration/render-tests/text-visibility/visible/expected.png new file mode 100644 index 00000000000..cc8d406556a Binary files /dev/null and b/metrics/integration/render-tests/text-visibility/visible/expected.png differ diff --git a/metrics/integration/render-tests/text-visibility/visible/style.json b/metrics/integration/render-tests/text-visibility/visible/style.json new file mode 100644 index 00000000000..dafc36e38ca --- /dev/null +++ b/metrics/integration/render-tests/text-visibility/visible/style.json @@ -0,0 +1,46 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "icon", + "type": "symbol", + "source": "mapbox", + "source-layer": "poi_label", + "layout": { + "text-field": "Test", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "symbol-placement": "point" + } + } + ] +} diff --git a/metrics/integration/render-tests/text-writing-mode/line_label/chinese-punctuation/expected.png b/metrics/integration/render-tests/text-writing-mode/line_label/chinese-punctuation/expected.png new file mode 100644 index 00000000000..74bea29b802 Binary files /dev/null and b/metrics/integration/render-tests/text-writing-mode/line_label/chinese-punctuation/expected.png differ diff --git a/metrics/integration/render-tests/text-writing-mode/line_label/chinese-punctuation/style.json b/metrics/integration/render-tests/text-writing-mode/line_label/chinese-punctuation/style.json new file mode 100644 index 00000000000..882f7b245fb --- /dev/null +++ b/metrics/integration/render-tests/text-writing-mode/line_label/chinese-punctuation/style.json @@ -0,0 +1,201 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 512, + "width": 512 + } + }, + "zoom": 0, + "center": [0, 0], + "sources": { + "mapbox": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "name": "氣—到–身_什…戰.只。" + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -119, + 85 + ], + [ + -119, + 10 + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "(氣)到(身)(什)" + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -32.453124999999964, + 85 + ], + [ + -32.453124999999964, + 10 + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "“氣”到“身”“白”" + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + 52.04687500000002, + 85 + ], + [ + 52.04687500000002, + 10 + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "—氣—到—a—a—" + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + 128.703125, + 85 + ], + [ + 128.703125, + 10 + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "氣—到–身_什…戰.只。" + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -150, + -17 + ], + [ + -10, + -17 + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "(氣)到(身)(什)" + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -150, + -58 + ], + [ + -10, + -58 + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "“氣”到“身”“白”" + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + 10, + -17 + ], + [ + 130, + -17 + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "—氣—到—a—a—" + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + 10, + -58 + ], + [ + 130, + -58 + ] + ] + } + } + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "lines-symbol", + "type": "symbol", + "source": "mapbox", + "layout": { + "text-field": "{name}", + "symbol-placement": "line", + "text-allow-overlap": true, + "text-font": [ "NotoCJK" ] + } + }, { + "id": "lines", + "type": "line", + "source": "mapbox", + "paint": { + "line-opacity": 0.25 + } + } + ] +} diff --git a/metrics/integration/render-tests/text-writing-mode/line_label/chinese/expected.png b/metrics/integration/render-tests/text-writing-mode/line_label/chinese/expected.png new file mode 100644 index 00000000000..249041857fc Binary files /dev/null and b/metrics/integration/render-tests/text-writing-mode/line_label/chinese/expected.png differ diff --git a/metrics/integration/render-tests/text-writing-mode/line_label/chinese/style.json b/metrics/integration/render-tests/text-writing-mode/line_label/chinese/style.json new file mode 100644 index 00000000000..62b778a1b8a --- /dev/null +++ b/metrics/integration/render-tests/text-writing-mode/line_label/chinese/style.json @@ -0,0 +1,202 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 512, + "width": 512 + } + }, + "zoom": 2, + "center": [-14.41400, 39.09187], + "sources": { + "mapbox": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "name": "氣到身什戰只白質位歡" + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -14.4195556640625, + 39.091699613104595 + ], + [ + 102.3046875, + 39.36827914916014 + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "電局今情再夜面造" + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -14.403076171875, + 39.10022600175347 + ], + [ + 103.35937499999999, + 65.80277639340238 + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "有究往極他生血通育" + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -14.414062499999998, + 39.091699613104595 + ], + [ + -14.765625, + 82.21421714106776 + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "不示有電親界因來終" + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -14.408569335937498, + 39.091699613104595 + ], + [ + -130.78125, + 39.095962936305476 + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "後再學全看素力來:不車" + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -14.414062499999998, + 39.095962936305476 + ], + [ + -16.5234375, + -58.81374171570779 + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "有下人費也家了清,黨光她保過每心" + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -14.4195556640625, + 39.10022600175347 + ], + [ + -130.4296875, + 64.47279382008166 + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "醫公藝說就公和有" + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -14.4195556640625, + 39.0831721934762 + ], + [ + 33.75, + 81.87364125482827 + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "光中輪的態指那差車" + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -14.447021484374998, + 39.104488809440475 + ], + [ + -66.4453125, + 82.26169873683153 + ] + ] + } + } + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "lines-symbol", + "type": "symbol", + "source": "mapbox", + "layout": { + "text-field": "{name}", + "symbol-placement": "line", + "symbol-spacing": 100, + "text-allow-overlap": true, + "text-font": [ "NotoCJK" ] + } + }, { + "id": "lines", + "type": "line", + "source": "mapbox", + "paint": { + "line-opacity": 0.25 + } + } + ] +} diff --git a/metrics/integration/render-tests/text-writing-mode/line_label/latin/expected.png b/metrics/integration/render-tests/text-writing-mode/line_label/latin/expected.png new file mode 100644 index 00000000000..28ec5b652fe Binary files /dev/null and b/metrics/integration/render-tests/text-writing-mode/line_label/latin/expected.png differ diff --git a/metrics/integration/render-tests/text-writing-mode/line_label/latin/style.json b/metrics/integration/render-tests/text-writing-mode/line_label/latin/style.json new file mode 100644 index 00000000000..bbcd86090db --- /dev/null +++ b/metrics/integration/render-tests/text-writing-mode/line_label/latin/style.json @@ -0,0 +1,202 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 512, + "width": 512 + } + }, + "zoom": 2, + "center": [-14.41400, 39.09187], + "sources": { + "mapbox": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "name": "one" + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -14.4195556640625, + 39.091699613104595 + ], + [ + 102.3046875, + 39.36827914916014 + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "two" + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -14.403076171875, + 39.10022600175347 + ], + [ + 103.35937499999999, + 65.80277639340238 + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "three" + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -14.414062499999998, + 39.091699613104595 + ], + [ + -14.765625, + 82.21421714106776 + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "four" + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -14.408569335937498, + 39.091699613104595 + ], + [ + -130.78125, + 39.095962936305476 + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "five" + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -14.414062499999998, + 39.095962936305476 + ], + [ + -16.5234375, + -58.81374171570779 + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "six" + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -14.4195556640625, + 39.10022600175347 + ], + [ + -130.4296875, + 64.47279382008166 + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "seven" + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -14.4195556640625, + 39.0831721934762 + ], + [ + 33.75, + 81.87364125482827 + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "eight" + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -14.447021484374998, + 39.104488809440475 + ], + [ + -66.4453125, + 82.26169873683153 + ] + ] + } + } + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "lines-symbol", + "type": "symbol", + "source": "mapbox", + "layout": { + "text-field": "{name}", + "symbol-placement": "line", + "symbol-spacing": 100, + "text-allow-overlap": true, + "text-font": [ "NotoCJK" ] + } + }, { + "id": "lines", + "type": "line", + "source": "mapbox", + "paint": { + "line-opacity": 0.25 + } + } + ] +} diff --git a/metrics/integration/render-tests/text-writing-mode/line_label/mixed/expected.png b/metrics/integration/render-tests/text-writing-mode/line_label/mixed/expected.png new file mode 100644 index 00000000000..ea816c34b9c Binary files /dev/null and b/metrics/integration/render-tests/text-writing-mode/line_label/mixed/expected.png differ diff --git a/metrics/integration/render-tests/text-writing-mode/line_label/mixed/style.json b/metrics/integration/render-tests/text-writing-mode/line_label/mixed/style.json new file mode 100644 index 00000000000..263798b73bf --- /dev/null +++ b/metrics/integration/render-tests/text-writing-mode/line_label/mixed/style.json @@ -0,0 +1,202 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 512, + "width": 512 + } + }, + "zoom": 2, + "center": [-14.41400, 39.09187], + "sources": { + "mapbox": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "name": "身什戰 1" + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -14.4195556640625, + 39.091699613104595 + ], + [ + 102.3046875, + 39.36827914916014 + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "two 身什戰" + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -14.403076171875, + 39.10022600175347 + ], + [ + 103.35937499999999, + 65.80277639340238 + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "身什戰33" + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -14.414062499999998, + 39.091699613104595 + ], + [ + -14.765625, + 82.21421714106776 + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "身什戰" + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -14.408569335937498, + 39.091699613104595 + ], + [ + -130.78125, + 39.095962936305476 + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "身什戰 five" + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -14.414062499999998, + 39.095962936305476 + ], + [ + -16.5234375, + -58.81374171570779 + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "six 身什戰" + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -14.4195556640625, + 39.10022600175347 + ], + [ + -130.4296875, + 64.47279382008166 + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "身什戰 seven" + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -14.4195556640625, + 39.0831721934762 + ], + [ + 33.75, + 81.87364125482827 + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "eight 身什戰" + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -14.447021484374998, + 39.104488809440475 + ], + [ + -66.4453125, + 82.26169873683153 + ] + ] + } + } + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "lines-symbol", + "type": "symbol", + "source": "mapbox", + "layout": { + "text-field": "{name}", + "symbol-placement": "line", + "symbol-spacing": 150, + "text-allow-overlap": true, + "text-font": [ "NotoCJK" ] + } + }, { + "id": "lines", + "type": "line", + "source": "mapbox", + "paint": { + "line-opacity": 0.25 + } + } + ] +} diff --git a/metrics/integration/render-tests/text-writing-mode/point_label/cjk-arabic-vertical-mode/expected.png b/metrics/integration/render-tests/text-writing-mode/point_label/cjk-arabic-vertical-mode/expected.png new file mode 100644 index 00000000000..b2d3a24d59b Binary files /dev/null and b/metrics/integration/render-tests/text-writing-mode/point_label/cjk-arabic-vertical-mode/expected.png differ diff --git a/metrics/integration/render-tests/text-writing-mode/point_label/cjk-arabic-vertical-mode/style.json b/metrics/integration/render-tests/text-writing-mode/point_label/cjk-arabic-vertical-mode/style.json new file mode 100644 index 00000000000..003974de573 --- /dev/null +++ b/metrics/integration/render-tests/text-writing-mode/point_label/cjk-arabic-vertical-mode/style.json @@ -0,0 +1,68 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 150, + "width": 150 + } + }, + "center": [ 0, 0 ], + "zoom": 0, + "sources": { + "point": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "name_cjk": "نشاط التدويل ボックス" + }, + "geometry": { + "type": "Point", + "coordinates": [ -30, 0 ] + } + }, + { + "type": "Feature", + "properties": { + "name_cjk": "マップボックス نشاط التدويل" + }, + "geometry": { + "type": "Point", + "coordinates": [ 0, 0] + } + }, + { + "type": "Feature", + "properties": { + "name_cjk": "マップボックス نشاط التدويل ボックス" + }, + "geometry": { + "type": "Point", + "coordinates": [ 30, 0 ] + } + } + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "text", + "type": "symbol", + "source": "point", + "layout": { + "text-field": "{name_cjk}", + "text-writing-mode": ["vertical"], + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-size": 14 + } + } + ] +} diff --git a/metrics/integration/render-tests/text-writing-mode/point_label/cjk-horizontal-vertical-mode/expected.png b/metrics/integration/render-tests/text-writing-mode/point_label/cjk-horizontal-vertical-mode/expected.png new file mode 100644 index 00000000000..ca20330459a Binary files /dev/null and b/metrics/integration/render-tests/text-writing-mode/point_label/cjk-horizontal-vertical-mode/expected.png differ diff --git a/metrics/integration/render-tests/text-writing-mode/point_label/cjk-horizontal-vertical-mode/style.json b/metrics/integration/render-tests/text-writing-mode/point_label/cjk-horizontal-vertical-mode/style.json new file mode 100644 index 00000000000..cd90cadaf3c --- /dev/null +++ b/metrics/integration/render-tests/text-writing-mode/point_label/cjk-horizontal-vertical-mode/style.json @@ -0,0 +1,68 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 128, + "width": 128 + } + }, + "center": [ 0, 0 ], + "zoom": 0, + "sources": { + "point": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "name_jp": "マップボックス" + }, + "geometry": { + "type": "Point", + "coordinates": [ -10, 10 ] + } + }, + { + "type": "Feature", + "properties": { + "name_jp": "マップボックス" + }, + "geometry": { + "type": "Point", + "coordinates": [ 34, 0 ] + } + }, + { + "type": "Feature", + "properties": { + "name_jp": "マップボックス" + }, + "geometry": { + "type": "Point", + "coordinates": [ -10, -10 ] + } + } + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "text", + "type": "symbol", + "source": "point", + "layout": { + "text-field": "{name_jp}", + "text-writing-mode": ["horizontal", "vertical"], + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-size": 14 + } + } + ] +} diff --git a/metrics/integration/render-tests/text-writing-mode/point_label/cjk-multiline-vertical-horizontal-mode/expected.png b/metrics/integration/render-tests/text-writing-mode/point_label/cjk-multiline-vertical-horizontal-mode/expected.png new file mode 100644 index 00000000000..4e4a10c5dfa Binary files /dev/null and b/metrics/integration/render-tests/text-writing-mode/point_label/cjk-multiline-vertical-horizontal-mode/expected.png differ diff --git a/metrics/integration/render-tests/text-writing-mode/point_label/cjk-multiline-vertical-horizontal-mode/style.json b/metrics/integration/render-tests/text-writing-mode/point_label/cjk-multiline-vertical-horizontal-mode/style.json new file mode 100644 index 00000000000..134da23622d --- /dev/null +++ b/metrics/integration/render-tests/text-writing-mode/point_label/cjk-multiline-vertical-horizontal-mode/style.json @@ -0,0 +1,58 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 128, + "width": 128 + } + }, + "center": [ 0, 0 ], + "zoom": 0, + "sources": { + "point": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "name_jp": "マップボックス\nボックス" + }, + "geometry": { + "type": "Point", + "coordinates": [ 0, 14 ] + } + }, + { + "type": "Feature", + "properties": { + "name_jp": "マップボックス\nボックス" + }, + "geometry": { + "type": "Point", + "coordinates": [ 0, -28 ] + } + } + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "text", + "type": "symbol", + "source": "point", + "layout": { + "text-field": "{name_jp}", + "text-writing-mode": ["vertical", "horizontal"], + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-size": 12 + } + } + ] +} diff --git a/metrics/integration/render-tests/text-writing-mode/point_label/cjk-punctuation-vertical-mode/expected.png b/metrics/integration/render-tests/text-writing-mode/point_label/cjk-punctuation-vertical-mode/expected.png new file mode 100644 index 00000000000..5714c413f5b Binary files /dev/null and b/metrics/integration/render-tests/text-writing-mode/point_label/cjk-punctuation-vertical-mode/expected.png differ diff --git a/metrics/integration/render-tests/text-writing-mode/point_label/cjk-punctuation-vertical-mode/style.json b/metrics/integration/render-tests/text-writing-mode/point_label/cjk-punctuation-vertical-mode/style.json new file mode 100644 index 00000000000..21df85e4f5c --- /dev/null +++ b/metrics/integration/render-tests/text-writing-mode/point_label/cjk-punctuation-vertical-mode/style.json @@ -0,0 +1,65 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 128, + "width": 128 + } + }, + "center": [ 0, 0 ], + "zoom": 0, + "sources": { + "point": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "name_cjk": "氣—到–身_什…戰.只。" + }, + "geometry": { + "type": "Point", + "coordinates": [ -30, 0 ] + } + }, + { + "type": "Feature", + "properties": { + "name_cjk": "(氣)到(身)(什)" + }, + "geometry": { + "type": "Point", + "coordinates": [ 0, 0] + } + }, + { + "type": "Feature", + "properties": { + "name_cjk": "“氣”到“身”“白”" + }, + "geometry": { + "type": "Point", + "coordinates": [ 30, 0 ] + } + } + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "text", + "type": "symbol", + "source": "point", + "layout": { + "text-field": "{name_cjk}", + "text-writing-mode": ["vertical"], + "text-font": [ "NotoCJK" ], + "text-size": 14 + } + } + ] +} diff --git a/metrics/integration/render-tests/text-writing-mode/point_label/cjk-variable-anchors-vertical-horizontal-mode-icon-text-fit/expected.png b/metrics/integration/render-tests/text-writing-mode/point_label/cjk-variable-anchors-vertical-horizontal-mode-icon-text-fit/expected.png new file mode 100644 index 00000000000..3e3ce112ba2 Binary files /dev/null and b/metrics/integration/render-tests/text-writing-mode/point_label/cjk-variable-anchors-vertical-horizontal-mode-icon-text-fit/expected.png differ diff --git a/metrics/integration/render-tests/text-writing-mode/point_label/cjk-variable-anchors-vertical-horizontal-mode-icon-text-fit/style.json b/metrics/integration/render-tests/text-writing-mode/point_label/cjk-variable-anchors-vertical-horizontal-mode-icon-text-fit/style.json new file mode 100644 index 00000000000..718556c6b58 --- /dev/null +++ b/metrics/integration/render-tests/text-writing-mode/point_label/cjk-variable-anchors-vertical-horizontal-mode-icon-text-fit/style.json @@ -0,0 +1,85 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 128, + "width": 128 + } + }, + "center": [ 0, 0 ], + "zoom": 0, + "sources": { + "point": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "name_jp": "マップLineボックス" + }, + "geometry": { + "type": "Point", + "coordinates": [ 0, 14 ] + } + }, + { + "type": "Feature", + "properties": { + "name_jp": "マップボNewックス" + }, + "geometry": { + "type": "Point", + "coordinates": [ 0, 14 ] + } + }, + { + "type": "Feature", + "properties": { + "name_jp": "マップボックス" + }, + "geometry": { + "type": "Point", + "coordinates": [ 0, 14 ] + } + }, + { + "type": "Feature", + "properties": { + "name_jp": "マップボNewックス" + }, + "geometry": { + "type": "Point", + "coordinates": [ 0, -32 ] + } + } + ] + } + } + }, + "sprite": "local://sprites/sprite", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "text", + "type": "symbol", + "source": "point", + "layout": { + "icon-image": "motorway_lg_6", + "icon-text-fit": "both", + "icon-text-fit-padding": [5, 5, 5, 5], + "text-field": "{name_jp}", + "text-writing-mode": ["vertical", "horizontal"], + "text-radial-offset": 3, + "text-variable-anchor": ["center", "left", "right", "bottom"], + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-size": 10, + "text-max-width": 8 + } + } + ] +} diff --git a/metrics/integration/render-tests/text-writing-mode/point_label/cjk-variable-anchors-vertical-horizontal-mode/expected.png b/metrics/integration/render-tests/text-writing-mode/point_label/cjk-variable-anchors-vertical-horizontal-mode/expected.png new file mode 100644 index 00000000000..f1ef07dea79 Binary files /dev/null and b/metrics/integration/render-tests/text-writing-mode/point_label/cjk-variable-anchors-vertical-horizontal-mode/expected.png differ diff --git a/metrics/integration/render-tests/text-writing-mode/point_label/cjk-variable-anchors-vertical-horizontal-mode/style.json b/metrics/integration/render-tests/text-writing-mode/point_label/cjk-variable-anchors-vertical-horizontal-mode/style.json new file mode 100644 index 00000000000..25d953c108d --- /dev/null +++ b/metrics/integration/render-tests/text-writing-mode/point_label/cjk-variable-anchors-vertical-horizontal-mode/style.json @@ -0,0 +1,80 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 128, + "width": 128 + } + }, + "center": [ 0, 0 ], + "zoom": 0, + "sources": { + "point": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "name_jp": "マップボックス" + }, + "geometry": { + "type": "Point", + "coordinates": [ 0, 8 ] + } + }, + { + "type": "Feature", + "properties": { + "name_jp": "マップボックス" + }, + "geometry": { + "type": "Point", + "coordinates": [ 0, 8 ] + } + }, + { + "type": "Feature", + "properties": { + "name_jp": "マップボックス" + }, + "geometry": { + "type": "Point", + "coordinates": [ 0, 8 ] + } + }, + { + "type": "Feature", + "properties": { + "name_jp": "マップ" + }, + "geometry": { + "type": "Point", + "coordinates": [ 0, -34 ] + } + } + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "text", + "type": "symbol", + "source": "point", + "layout": { + "text-field": "{name_jp}", + "text-writing-mode": ["vertical", "horizontal"], + "text-radial-offset": 1, + "text-variable-anchor": ["center", "left", "right", "bottom"], + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-size": 14 + } + } + ] +} diff --git a/metrics/integration/render-tests/text-writing-mode/point_label/cjk-variable-anchors-vertical-mode/expected.png b/metrics/integration/render-tests/text-writing-mode/point_label/cjk-variable-anchors-vertical-mode/expected.png new file mode 100644 index 00000000000..402d88f3c76 Binary files /dev/null and b/metrics/integration/render-tests/text-writing-mode/point_label/cjk-variable-anchors-vertical-mode/expected.png differ diff --git a/metrics/integration/render-tests/text-writing-mode/point_label/cjk-variable-anchors-vertical-mode/style.json b/metrics/integration/render-tests/text-writing-mode/point_label/cjk-variable-anchors-vertical-mode/style.json new file mode 100644 index 00000000000..dd0dbb6d3d5 --- /dev/null +++ b/metrics/integration/render-tests/text-writing-mode/point_label/cjk-variable-anchors-vertical-mode/style.json @@ -0,0 +1,70 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 128, + "width": 128 + } + }, + "center": [ 0, 0 ], + "zoom": 0, + "sources": { + "point": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "name_jp": "マップボックス" + }, + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + }, + { + "type": "Feature", + "properties": { + "name_jp": "マップボックス" + }, + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + }, + { + "type": "Feature", + "properties": { + "name_jp": "マップボックス" + }, + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + } + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "text", + "type": "symbol", + "source": "point", + "layout": { + "text-field": "{name_jp}", + "text-writing-mode": ["vertical"], + "text-radial-offset": 1, + "text-variable-anchor": ["left", "right", "center"], + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-size": 14 + } + } + ] +} diff --git a/metrics/integration/render-tests/text-writing-mode/point_label/cjk-vertical-horizontal-mode/expected.png b/metrics/integration/render-tests/text-writing-mode/point_label/cjk-vertical-horizontal-mode/expected.png new file mode 100644 index 00000000000..504173962fb Binary files /dev/null and b/metrics/integration/render-tests/text-writing-mode/point_label/cjk-vertical-horizontal-mode/expected.png differ diff --git a/metrics/integration/render-tests/text-writing-mode/point_label/cjk-vertical-horizontal-mode/style.json b/metrics/integration/render-tests/text-writing-mode/point_label/cjk-vertical-horizontal-mode/style.json new file mode 100644 index 00000000000..a84a132044f --- /dev/null +++ b/metrics/integration/render-tests/text-writing-mode/point_label/cjk-vertical-horizontal-mode/style.json @@ -0,0 +1,68 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 128, + "width": 128 + } + }, + "center": [ 0, 0 ], + "zoom": 0, + "sources": { + "point": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "name_jp": "マップボックス" + }, + "geometry": { + "type": "Point", + "coordinates": [ -10, 8 ] + } + }, + { + "type": "Feature", + "properties": { + "name_jp": "マップボックス" + }, + "geometry": { + "type": "Point", + "coordinates": [ 10, 8 ] + } + }, + { + "type": "Feature", + "properties": { + "name_jp": "マップボックス" + }, + "geometry": { + "type": "Point", + "coordinates": [ 0, -34 ] + } + } + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "text", + "type": "symbol", + "source": "point", + "layout": { + "text-field": "{name_jp}", + "text-writing-mode": ["vertical", "horizontal"], + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-size": 14 + } + } + ] +} diff --git a/metrics/integration/render-tests/text-writing-mode/point_label/cjk-vertical-mode/expected.png b/metrics/integration/render-tests/text-writing-mode/point_label/cjk-vertical-mode/expected.png new file mode 100644 index 00000000000..43b2d37adf8 Binary files /dev/null and b/metrics/integration/render-tests/text-writing-mode/point_label/cjk-vertical-mode/expected.png differ diff --git a/metrics/integration/render-tests/text-writing-mode/point_label/cjk-vertical-mode/style.json b/metrics/integration/render-tests/text-writing-mode/point_label/cjk-vertical-mode/style.json new file mode 100644 index 00000000000..ed20e4e7ee0 --- /dev/null +++ b/metrics/integration/render-tests/text-writing-mode/point_label/cjk-vertical-mode/style.json @@ -0,0 +1,68 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 128, + "width": 128 + } + }, + "center": [ 0, 0 ], + "zoom": 0, + "sources": { + "point": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "name_jp": "マップボックス" + }, + "geometry": { + "type": "Point", + "coordinates": [ -10, 8 ] + } + }, + { + "type": "Feature", + "properties": { + "name_jp": "マップボックス" + }, + "geometry": { + "type": "Point", + "coordinates": [ 10, 8 ] + } + }, + { + "type": "Feature", + "properties": { + "name_jp": "マップボックス" + }, + "geometry": { + "type": "Point", + "coordinates": [ 0, -34 ] + } + } + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "text", + "type": "symbol", + "source": "point", + "layout": { + "text-field": "{name_jp}", + "text-writing-mode": ["vertical"], + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-size": 14 + } + } + ] +} diff --git a/metrics/integration/render-tests/text-writing-mode/point_label/latin-vertical-mode/expected.png b/metrics/integration/render-tests/text-writing-mode/point_label/latin-vertical-mode/expected.png new file mode 100644 index 00000000000..51677d33fc8 Binary files /dev/null and b/metrics/integration/render-tests/text-writing-mode/point_label/latin-vertical-mode/expected.png differ diff --git a/metrics/integration/render-tests/text-writing-mode/point_label/latin-vertical-mode/style.json b/metrics/integration/render-tests/text-writing-mode/point_label/latin-vertical-mode/style.json new file mode 100644 index 00000000000..4f8b723c4b0 --- /dev/null +++ b/metrics/integration/render-tests/text-writing-mode/point_label/latin-vertical-mode/style.json @@ -0,0 +1,48 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 64, + "width": 64 + } + }, + "center": [ 0, 0 ], + "zoom": 0, + "sources": { + "point": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "name_en": "Mapbox" + }, + "geometry": { + "type": "Point", + "coordinates": [ 0, 0 ] + } + } + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "text", + "type": "symbol", + "source": "point", + "layout": { + "text-field": "{name_en}", + "text-writing-mode": ["vertical"], + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-size": 14 + } + } + ] +} diff --git a/metrics/integration/render-tests/text-writing-mode/point_label/mixed-multiline-vertical-horizontal-mode-icon-text-fit/expected.png b/metrics/integration/render-tests/text-writing-mode/point_label/mixed-multiline-vertical-horizontal-mode-icon-text-fit/expected.png new file mode 100644 index 00000000000..374bd2ad0a8 Binary files /dev/null and b/metrics/integration/render-tests/text-writing-mode/point_label/mixed-multiline-vertical-horizontal-mode-icon-text-fit/expected.png differ diff --git a/metrics/integration/render-tests/text-writing-mode/point_label/mixed-multiline-vertical-horizontal-mode-icon-text-fit/style.json b/metrics/integration/render-tests/text-writing-mode/point_label/mixed-multiline-vertical-horizontal-mode-icon-text-fit/style.json new file mode 100644 index 00000000000..b1ac643172f --- /dev/null +++ b/metrics/integration/render-tests/text-writing-mode/point_label/mixed-multiline-vertical-horizontal-mode-icon-text-fit/style.json @@ -0,0 +1,63 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 128, + "width": 128, + "allowed": 0.0005 + } + }, + "center": [ 0, 0 ], + "zoom": 0, + "sources": { + "point": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "name_jp": "マップボックス\nabc123\na1ボックス" + }, + "geometry": { + "type": "Point", + "coordinates": [ 0, 15 ] + } + }, + { + "type": "Feature", + "properties": { + "name_jp": "aマップボックス\nボックスabc123" + }, + "geometry": { + "type": "Point", + "coordinates": [ 0, -30 ] + } + } + ] + } + } + }, + "sprite": "local://sprites/sprite", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "text", + "type": "symbol", + "source": "point", + "layout": { + "icon-image": "motorway_lg_6", + "icon-text-fit-padding": [7, 7, 7, 7], + "icon-text-fit": "both", + "text-field": "{name_jp}", + "text-writing-mode": ["vertical", "horizontal"], + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-size": 10 + } + } + ] +} diff --git a/metrics/integration/render-tests/text-writing-mode/point_label/mixed-multiline-vertical-horizontal-mode/expected.png b/metrics/integration/render-tests/text-writing-mode/point_label/mixed-multiline-vertical-horizontal-mode/expected.png new file mode 100644 index 00000000000..6894f4c3b4e Binary files /dev/null and b/metrics/integration/render-tests/text-writing-mode/point_label/mixed-multiline-vertical-horizontal-mode/expected.png differ diff --git a/metrics/integration/render-tests/text-writing-mode/point_label/mixed-multiline-vertical-horizontal-mode/style.json b/metrics/integration/render-tests/text-writing-mode/point_label/mixed-multiline-vertical-horizontal-mode/style.json new file mode 100644 index 00000000000..8431de2c512 --- /dev/null +++ b/metrics/integration/render-tests/text-writing-mode/point_label/mixed-multiline-vertical-horizontal-mode/style.json @@ -0,0 +1,58 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 128, + "width": 128 + } + }, + "center": [ 0, 0 ], + "zoom": 0, + "sources": { + "point": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "name_jp": "マップボックス\nabc123\na1ボックス" + }, + "geometry": { + "type": "Point", + "coordinates": [ 0, 14 ] + } + }, + { + "type": "Feature", + "properties": { + "name_jp": "aマップボックス\nボックスabc123" + }, + "geometry": { + "type": "Point", + "coordinates": [ 0, -28 ] + } + } + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "text", + "type": "symbol", + "source": "point", + "layout": { + "text-field": "{name_jp}", + "text-writing-mode": ["vertical", "horizontal"], + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-size": 12 + } + } + ] +} diff --git a/metrics/integration/render-tests/tile-mode/streets-v11/expected.png b/metrics/integration/render-tests/tile-mode/streets-v11/expected.png new file mode 100644 index 00000000000..7e377ab7324 Binary files /dev/null and b/metrics/integration/render-tests/tile-mode/streets-v11/expected.png differ diff --git a/metrics/integration/render-tests/tile-mode/streets-v11/style.json b/metrics/integration/render-tests/tile-mode/streets-v11/style.json new file mode 100644 index 00000000000..5eadb4b040f --- /dev/null +++ b/metrics/integration/render-tests/tile-mode/streets-v11/style.json @@ -0,0 +1,16 @@ +{ + "version": 8, + "metadata": { + "test": { + "mapMode":"tile", + "debug": "true", + "allowed": 0.0005, + "operations": [ + [ "setStyle", "mapbox://styles/mapbox/streets-v11"] + ], + "pixelRatio": 2 + } + }, + "center": [-73.9959, 40.7106], + "zoom": 13 +} diff --git a/metrics/integration/render-tests/tilejson-bounds/default/expected.png b/metrics/integration/render-tests/tilejson-bounds/default/expected.png new file mode 100644 index 00000000000..49bdc006300 Binary files /dev/null and b/metrics/integration/render-tests/tilejson-bounds/default/expected.png differ diff --git a/metrics/integration/render-tests/tilejson-bounds/default/style.json b/metrics/integration/render-tests/tilejson-bounds/default/style.json new file mode 100644 index 00000000000..a7dabf92da9 --- /dev/null +++ b/metrics/integration/render-tests/tilejson-bounds/default/style.json @@ -0,0 +1,43 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 64, + "width":64 + } + }, + "center": [ + 13.425247606101294, 52.5033795378269 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ], + "bounds":[13.4043671, 52.4959407, 13.425247606101294, 52.5033795378269] + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "road", + "type": "line", + "source": "mapbox", + "source-layer": "road", + "paint": { + "line-width": 2, + "line-color": "#000" + } + } + ] + } + \ No newline at end of file diff --git a/metrics/integration/render-tests/tilejson-bounds/overwrite-bounds/expected.png b/metrics/integration/render-tests/tilejson-bounds/overwrite-bounds/expected.png new file mode 100644 index 00000000000..49bdc006300 Binary files /dev/null and b/metrics/integration/render-tests/tilejson-bounds/overwrite-bounds/expected.png differ diff --git a/metrics/integration/render-tests/tilejson-bounds/overwrite-bounds/style.json b/metrics/integration/render-tests/tilejson-bounds/overwrite-bounds/style.json new file mode 100644 index 00000000000..c19bafe6c9a --- /dev/null +++ b/metrics/integration/render-tests/tilejson-bounds/overwrite-bounds/style.json @@ -0,0 +1,41 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 64, + "width":64 + } + }, + "center": [ + 13.425247606101294, 52.5033795378269 + ], + "zoom": 14, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "url": "local://tilesets/vector.json", + "bounds":[13.4043671, 52.4959407, 13.425247606101294, 52.5033795378269] + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "road", + "type": "line", + "source": "mapbox", + "source-layer": "road", + "paint": { + "line-width": 2, + "line-color": "#000" + } + } + ] + } + \ No newline at end of file diff --git a/metrics/integration/render-tests/tms/tms/expected.png b/metrics/integration/render-tests/tms/tms/expected.png new file mode 100644 index 00000000000..e9310339de4 Binary files /dev/null and b/metrics/integration/render-tests/tms/tms/expected.png differ diff --git a/metrics/integration/render-tests/tms/tms/style.json b/metrics/integration/render-tests/tms/tms/style.json new file mode 100644 index 00000000000..ce8b45d4272 --- /dev/null +++ b/metrics/integration/render-tests/tms/tms/style.json @@ -0,0 +1,35 @@ +{ + "version": 8, + "metadata": { + "test": {} + }, + "zoom": 2, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "scheme": "tms", + "tiles": [ + "local://tiles/{z}-{x}-{y}.tms.mvt" + ] + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "land", + "type": "fill", + "source": "mapbox", + "source-layer": "water", + "paint": { + "fill-color": "blue" + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/video/default/expected.png b/metrics/integration/render-tests/video/default/expected.png new file mode 100644 index 00000000000..69a214b8970 Binary files /dev/null and b/metrics/integration/render-tests/video/default/expected.png differ diff --git a/metrics/integration/render-tests/video/default/style.json b/metrics/integration/render-tests/video/default/style.json new file mode 100644 index 00000000000..53cca09964f --- /dev/null +++ b/metrics/integration/render-tests/video/default/style.json @@ -0,0 +1,51 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 512, + "height": 512 + } + }, + "center": [ + -122.514426, + 37.562984 + ], + "zoom": 17, + "bearing": -96, + "sources": { + "video": { + "type": "video", + "coordinates": [ + [ + -122.51596391201019, + 37.56238816766053 + ], + [ + -122.51467645168304, + 37.56410183312965 + ], + [ + -122.51309394836426, + 37.563391708549425 + ], + [ + -122.51423120498657, + 37.56161849366671 + ] + ], + "urls": [ + "local://video/0.png" + ] + } + }, + "layers": [ + { + "id": "video", + "type": "raster", + "source": "video", + "paint": { + "raster-fade-duration": 0 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/within/filter-with-inlined-geojson/expected.png b/metrics/integration/render-tests/within/filter-with-inlined-geojson/expected.png new file mode 100644 index 00000000000..61b6f1796b7 Binary files /dev/null and b/metrics/integration/render-tests/within/filter-with-inlined-geojson/expected.png differ 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 new file mode 100644 index 00000000000..19b184eec78 --- /dev/null +++ b/metrics/integration/render-tests/within/filter-with-inlined-geojson/style.json @@ -0,0 +1,100 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "zoom": 3, + "center": [3, 3], + "sources": { + "points": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + }, + "geometry": { + "type": "Point", + "coordinates": [ + 1.9775390625, + 2.3284603685731593 + ] + } + }, + { + "type": "Feature", + "properties": { + }, + "geometry": { + "type": "Point", + "coordinates": [ + 1.7138671875, + -1.7136116598836224 + ] + } + } + ] + } + }, + "polygon": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Polygon", + "coordinates": [ + [[0, 0], + [0, 5], + [5, 5], + [5, 0], + [0, 0]] + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "border", + "type": "fill", + "source": "polygon", + "paint": { + "fill-color": "black", + "fill-opacity": 0.5 + } + }, + { + "id": "circle", + "type": "circle", + "source": "points", + "filter": ["within", { + "type": "Polygon", + "coordinates": [ + [ + [0, 0], + [0, 5], + [5, 5], + [5, 0], + [0, 0] + ] + ] + } + ], + "paint": { + "circle-radius": 5, + "circle-color": "red" + } + } + ] +} diff --git a/metrics/integration/render-tests/within/layout-text/expected.png b/metrics/integration/render-tests/within/layout-text/expected.png new file mode 100644 index 00000000000..1fdeb343485 Binary files /dev/null and b/metrics/integration/render-tests/within/layout-text/expected.png differ diff --git a/metrics/integration/render-tests/within/layout-text/style.json b/metrics/integration/render-tests/within/layout-text/style.json new file mode 100644 index 00000000000..f12044e5fdc --- /dev/null +++ b/metrics/integration/render-tests/within/layout-text/style.json @@ -0,0 +1,111 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "zoom": 2, + "center": [3.5, 3.5], + "sources": { + "points": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + }, + "geometry": { + "type": "Point", + "coordinates": [ + 1.9775390625, + 2.3284603685731593 + ] + } + }, + { + "type": "Feature", + "properties": { + }, + "geometry": { + "type": "Point", + "coordinates": [ + 2.021484375, + 7.798078531355303 + ] + } + } + ] + } + }, + "polygon": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [0, 0], + [0, 5], + [5, 5], + [5, 0], + [0, 0] + ] + ] + } + } + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "border", + "type": "fill", + "source": "polygon", + "paint": { + "fill-color": "black", + "fill-opacity": 0.5 + } + }, + { + "id": "symbol", + "type": "symbol", + "source": "points", + "layout": { + "icon-image": "", + "text-field": ["case", ["within", { + "type": "Polygon", + "coordinates": [ + [ + [0, 0], + [0, 5], + [5, 5], + [5, 0], + [0, 0] + ] + ] + }], "In", "Out"], + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-size": 10 + }, + "paint" : { + "text-color": "red" + } + + } + ] + } + \ No newline at end of file diff --git a/metrics/integration/render-tests/within/paint-circle/expected.png b/metrics/integration/render-tests/within/paint-circle/expected.png new file mode 100644 index 00000000000..2be9f737ca4 Binary files /dev/null and b/metrics/integration/render-tests/within/paint-circle/expected.png differ diff --git a/metrics/integration/render-tests/within/paint-circle/style.json b/metrics/integration/render-tests/within/paint-circle/style.json new file mode 100644 index 00000000000..e393ce0032f --- /dev/null +++ b/metrics/integration/render-tests/within/paint-circle/style.json @@ -0,0 +1,101 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "zoom": 2, + "center": [3.5, 3.5], + "sources": { + "points": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + }, + "geometry": { + "type": "Point", + "coordinates": [ + 1.9775390625, + 2.3284603685731593 + ] + } + }, + { + "type": "Feature", + "properties": { + }, + "geometry": { + "type": "Point", + "coordinates": [ + 2.021484375, + 7.798078531355303 + ] + } + } + ] + } + }, + "polygon": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [0, 0], + [0, 5], + [5, 5], + [5, 0], + [0, 0] + ] + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "boarder", + "type": "fill", + "source": "polygon", + "paint": { + "fill-color": "black", + "fill-opacity": 0.5 + } + }, + { + "id": "circle", + "type": "circle", + "source": "points", + "paint": { + "circle-radius": 5, + "circle-color": ["case", ["within", { + "type": "Polygon", + "coordinates": [ + [ + [0, 0], + [0, 5], + [5, 5], + [5, 0], + [0, 0] + ] + ] + } + ], "red", "blue"] + } + } + ] +} diff --git a/metrics/integration/render-tests/within/paint-icon/expected.png b/metrics/integration/render-tests/within/paint-icon/expected.png new file mode 100644 index 00000000000..f24c546a9a8 Binary files /dev/null and b/metrics/integration/render-tests/within/paint-icon/expected.png differ diff --git a/metrics/integration/render-tests/within/paint-icon/style.json b/metrics/integration/render-tests/within/paint-icon/style.json new file mode 100644 index 00000000000..ca58a1f59cf --- /dev/null +++ b/metrics/integration/render-tests/within/paint-icon/style.json @@ -0,0 +1,104 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "zoom": 2, + "center": [3.5, 3.5], + "sources": { + "points": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + }, + "geometry": { + "type": "Point", + "coordinates": [ + 1.9775390625, + 2.3284603685731593 + ] + } + }, + { + "type": "Feature", + "properties": { + }, + "geometry": { + "type": "Point", + "coordinates": [ + 2.021484375, + 7.798078531355303 + ] + } + } + ] + } + }, + "polygon": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [0, 0], + [0, 5], + [5, 5], + [5, 0], + [0, 0] + ] + ] + } + } + ] + } + } + }, + "sprite": "local://sprites/sprite", + "layers": [ + { + "id": "boarder", + "type": "fill", + "source": "polygon", + "paint": { + "fill-color": "black", + "fill-opacity": 0.5 + } + }, + { + "id": "symbol", + "type": "symbol", + "source": "points", + "layout": { + "icon-image": "dot.sdf" + }, + "paint" : { + "icon-color": ["case", ["within", { + "type": "Polygon", + "coordinates": [ + [ + [0, 0], + [0, 5], + [5, 5], + [5, 0], + [0, 0] + ] + ] + } + ], "red", "blue"] + } + } + ] +} diff --git a/metrics/integration/render-tests/within/paint-line/expected.png b/metrics/integration/render-tests/within/paint-line/expected.png new file mode 100644 index 00000000000..3aaf75a74bf Binary files /dev/null and b/metrics/integration/render-tests/within/paint-line/expected.png differ diff --git a/metrics/integration/render-tests/within/paint-line/style.json b/metrics/integration/render-tests/within/paint-line/style.json new file mode 100644 index 00000000000..405b892218c --- /dev/null +++ b/metrics/integration/render-tests/within/paint-line/style.json @@ -0,0 +1,199 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 125, + "height": 125 + } + }, + "zoom": 2, + "center": [ + -24, + -32 + ], + "sources": { + "line": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -30.805664062500004, + -31.84023266790935 + ], + [ + -20.56640625, + -32.026706293336126 + ] + ] + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -30.629882812499996, + -28.420391085674304 + ], + [ + -18.544921875, + -28.92163128242129 + ], + [ + -18.369140624999996, + -36.49197347059368 + ], + [ + -27.24609375, + -36.77409249464194 + ] + ] + } + } + ] + } + }, + "polygon": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -31.9921875, + -27.137368359795584 + ], + [ + -32.255859375, + -35.49645605658415 + ], + [ + -22.9833984375, + -35.7465122599185 + ], + [ + -22.5, + -30.67571540416773 + ], + [ + -29.003906249999996, + -30.29701788337204 + ], + [ + -28.9599609375, + -37.64903402157864 + ], + [ + -16.1279296875, + -37.89219554724435 + ], + [ + -16.5673828125, + -26.82407078047018 + ], + [ + -31.9921875, + -27.137368359795584 + ] + ] + ] + } + } + ] + } + } + }, + "layers": [ + { + "id": "border", + "type": "fill", + "source": "polygon", + "paint": { + "fill-color": "black", + "fill-opacity": 0.5 + } + }, + { + "id": "draw", + "type": "line", + "source": "line", + "paint": { + "line-color": [ + "case", + [ + "within", + { + "type": "Polygon", + "coordinates": [ + [ + [ + -31.9921875, + -27.137368359795584 + ], + [ + -32.255859375, + -35.49645605658415 + ], + [ + -22.9833984375, + -35.7465122599185 + ], + [ + -22.5, + -30.67571540416773 + ], + [ + -29.003906249999996, + -30.29701788337204 + ], + [ + -28.9599609375, + -37.64903402157864 + ], + [ + -16.1279296875, + -37.89219554724435 + ], + [ + -16.5673828125, + -26.82407078047018 + ], + [ + -31.9921875, + -27.137368359795584 + ] + ] + ] + } + ], + "red", + "blue" + ] + } + }, + { + "id": "circle", + "type": "circle", + "source": "line", + "paint": { + "circle-color": "yellow", + "circle-radius": 2 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/within/paint-text/expected.png b/metrics/integration/render-tests/within/paint-text/expected.png new file mode 100644 index 00000000000..c44aed8ae61 Binary files /dev/null and b/metrics/integration/render-tests/within/paint-text/expected.png differ diff --git a/metrics/integration/render-tests/within/paint-text/style.json b/metrics/integration/render-tests/within/paint-text/style.json new file mode 100644 index 00000000000..8749edb1721 --- /dev/null +++ b/metrics/integration/render-tests/within/paint-text/style.json @@ -0,0 +1,109 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "zoom": 2, + "center": [3.5, 3.5], + "sources": { + "points": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + }, + "geometry": { + "type": "Point", + "coordinates": [ + 1.9775390625, + 2.3284603685731593 + ] + } + }, + { + "type": "Feature", + "properties": { + }, + "geometry": { + "type": "Point", + "coordinates": [ + 2.021484375, + 7.798078531355303 + ] + } + } + ] + } + }, + "border": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [0, 0], + [0, 5], + [5, 5], + [5, 0], + [0, 0] + ] + ] + } + } + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "border", + "type": "fill", + "source": "border", + "paint": { + "fill-color": "black", + "fill-opacity": 0.5 + } + }, + { + "id": "symbol", + "type": "symbol", + "source": "points", + "layout": { + "text-field": "Text", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-size": 10 + }, + "paint": { + "text-color": ["case", ["within", { + "type": "Polygon", + "coordinates": [ + [ + [0, 0], + [0, 5], + [5, 5], + [5, 0], + [0, 0] + ] + ] + } + ], "red", "blue"] + } + } + ] +} diff --git a/metrics/integration/render-tests/zoom-history/in/expected.png b/metrics/integration/render-tests/zoom-history/in/expected.png new file mode 100644 index 00000000000..75f03b85c5b Binary files /dev/null and b/metrics/integration/render-tests/zoom-history/in/expected.png differ diff --git a/metrics/integration/render-tests/zoom-history/in/style.json b/metrics/integration/render-tests/zoom-history/in/style.json new file mode 100644 index 00000000000..8dd0f487bfe --- /dev/null +++ b/metrics/integration/render-tests/zoom-history/in/style.json @@ -0,0 +1,80 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 256, + "height": 256, + "allowed": 0.00025, + "operations": [ + [ + "wait" + ], + [ + "setZoom", + 0 + ], + [ + "wait" + ], + [ + "setZoom", + 0.5 + ], + [ + "wait" + ] + ] + } + }, + "zoom": 1, + "sources": { + "source": { + "type": "geojson", + "data": { + "type": "LineString", + "coordinates": [ + [ + 45, + -45 + ], + [ + -45, + 45 + ] + ] + } + } + }, + "layers": [ + { + "id": "layer-1", + "type": "line", + "source": "source", + "paint": { + "line-width": { + "stops": [ + [0, 8], + [1, 16] + ] + }, + "line-dasharray": [1, 1], + "line-color": "black" + } + }, + { + "id": "layer-2", + "type": "line", + "source": "source", + "paint": { + "line-width": { + "stops": [ + [0, 4], + [1, 8] + ] + }, + "line-dasharray": [2, 2], + "line-color": "red" + } + } + ] +} diff --git a/metrics/integration/render-tests/zoom-history/out/expected.png b/metrics/integration/render-tests/zoom-history/out/expected.png new file mode 100644 index 00000000000..75f03b85c5b Binary files /dev/null and b/metrics/integration/render-tests/zoom-history/out/expected.png differ diff --git a/metrics/integration/render-tests/zoom-history/out/style.json b/metrics/integration/render-tests/zoom-history/out/style.json new file mode 100644 index 00000000000..4e402da75ff --- /dev/null +++ b/metrics/integration/render-tests/zoom-history/out/style.json @@ -0,0 +1,91 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 256, + "height": 256, + "allowed": 0.00025, + "operations": [ + [ + "wait" + ], + [ + "setZoom", + 0 + ], + [ + "wait" + ], + [ + "setZoom", + 0.5 + ], + [ + "wait" + ], + [ + "setZoom", + 1 + ], + [ + "setZoom", + 0.5 + ], + [ + "wait" + ] + ] + } + }, + "zoom": 1, + "sources": { + "source": { + "type": "geojson", + "data": { + "type": "LineString", + "coordinates": [ + [ + 45, + -45 + ], + [ + -45, + 45 + ] + ] + } + } + }, + "layers": [ + { + "id": "layer-1", + "type": "line", + "source": "source", + "paint": { + "line-width": { + "stops": [ + [0, 8], + [1, 16] + ] + }, + "line-dasharray": [1, 1], + "line-color": "black" + } + }, + { + "id": "layer-2", + "type": "line", + "source": "source", + "paint": { + "line-width": { + "stops": [ + [0, 4], + [1, 8] + ] + }, + "line-dasharray": [2, 2], + "line-color": "red" + } + } + ] +} diff --git a/metrics/integration/render-tests/zoom-visibility/above/expected.png b/metrics/integration/render-tests/zoom-visibility/above/expected.png new file mode 100644 index 00000000000..724d17cd7d3 Binary files /dev/null and b/metrics/integration/render-tests/zoom-visibility/above/expected.png differ diff --git a/metrics/integration/render-tests/zoom-visibility/above/style.json b/metrics/integration/render-tests/zoom-visibility/above/style.json new file mode 100644 index 00000000000..1e0b84950fe --- /dev/null +++ b/metrics/integration/render-tests/zoom-visibility/above/style.json @@ -0,0 +1,46 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setZoom", + 2.1 + ], + [ + "wait" + ], + [ + "setLayerZoomRange", + "circle", + 1, + 2 + ], + [ + "wait" + ] + ] + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson" + } + ] +} diff --git a/metrics/integration/render-tests/zoom-visibility/below/expected.png b/metrics/integration/render-tests/zoom-visibility/below/expected.png new file mode 100644 index 00000000000..724d17cd7d3 Binary files /dev/null and b/metrics/integration/render-tests/zoom-visibility/below/expected.png differ diff --git a/metrics/integration/render-tests/zoom-visibility/below/style.json b/metrics/integration/render-tests/zoom-visibility/below/style.json new file mode 100644 index 00000000000..877cb9b50cc --- /dev/null +++ b/metrics/integration/render-tests/zoom-visibility/below/style.json @@ -0,0 +1,46 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setZoom", + 0.9 + ], + [ + "wait" + ], + [ + "setLayerZoomRange", + "circle", + 1, + 2 + ], + [ + "wait" + ] + ] + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson" + } + ] +} diff --git a/metrics/integration/render-tests/zoom-visibility/in-range/expected.png b/metrics/integration/render-tests/zoom-visibility/in-range/expected.png new file mode 100644 index 00000000000..4cb77303dde Binary files /dev/null and b/metrics/integration/render-tests/zoom-visibility/in-range/expected.png differ diff --git a/metrics/integration/render-tests/zoom-visibility/in-range/style.json b/metrics/integration/render-tests/zoom-visibility/in-range/style.json new file mode 100644 index 00000000000..373060a0c5c --- /dev/null +++ b/metrics/integration/render-tests/zoom-visibility/in-range/style.json @@ -0,0 +1,53 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setZoom", + 2.1 + ], + [ + "wait" + ], + [ + "setLayerZoomRange", + "circle", + 1, + 2 + ], + [ + "wait" + ], + [ + "setZoom", + 1.5 + ], + [ + "wait" + ] + ] + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson" + } + ] +} diff --git a/metrics/integration/render-tests/zoom-visibility/out-of-range/expected.png b/metrics/integration/render-tests/zoom-visibility/out-of-range/expected.png new file mode 100644 index 00000000000..724d17cd7d3 Binary files /dev/null and b/metrics/integration/render-tests/zoom-visibility/out-of-range/expected.png differ diff --git a/metrics/integration/render-tests/zoom-visibility/out-of-range/style.json b/metrics/integration/render-tests/zoom-visibility/out-of-range/style.json new file mode 100644 index 00000000000..76985c945b0 --- /dev/null +++ b/metrics/integration/render-tests/zoom-visibility/out-of-range/style.json @@ -0,0 +1,53 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setZoom", + 1.5 + ], + [ + "wait" + ], + [ + "setLayerZoomRange", + "circle", + 1, + 2 + ], + [ + "wait" + ], + [ + "setZoom", + 2.1 + ], + [ + "wait" + ] + ] + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson" + } + ] +} diff --git a/metrics/integration/render-tests/zoom-visibility/was-above/expected.png b/metrics/integration/render-tests/zoom-visibility/was-above/expected.png new file mode 100644 index 00000000000..4cb77303dde Binary files /dev/null and b/metrics/integration/render-tests/zoom-visibility/was-above/expected.png differ diff --git a/metrics/integration/render-tests/zoom-visibility/was-above/style.json b/metrics/integration/render-tests/zoom-visibility/was-above/style.json new file mode 100644 index 00000000000..29f837d1d1d --- /dev/null +++ b/metrics/integration/render-tests/zoom-visibility/was-above/style.json @@ -0,0 +1,48 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setZoom", + 2.1 + ], + [ + "wait" + ], + [ + "setLayerZoomRange", + "circle", + 1, + 3 + ], + [ + "wait" + ] + ] + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson", + "minzoom": 1, + "maxzoom": 2 + } + ] +} diff --git a/metrics/integration/render-tests/zoom-visibility/was-below/expected.png b/metrics/integration/render-tests/zoom-visibility/was-below/expected.png new file mode 100644 index 00000000000..4cb77303dde Binary files /dev/null and b/metrics/integration/render-tests/zoom-visibility/was-below/expected.png differ diff --git a/metrics/integration/render-tests/zoom-visibility/was-below/style.json b/metrics/integration/render-tests/zoom-visibility/was-below/style.json new file mode 100644 index 00000000000..fc718950825 --- /dev/null +++ b/metrics/integration/render-tests/zoom-visibility/was-below/style.json @@ -0,0 +1,48 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setZoom", + 0.9 + ], + [ + "wait" + ], + [ + "setLayerZoomRange", + "circle", + 0, + 2 + ], + [ + "wait" + ] + ] + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson", + "minzoom": 1, + "maxzoom": 2 + } + ] +} diff --git a/metrics/integration/render-tests/zoomed-fill/default/expected.png b/metrics/integration/render-tests/zoomed-fill/default/expected.png new file mode 100644 index 00000000000..078c8590489 Binary files /dev/null and b/metrics/integration/render-tests/zoomed-fill/default/expected.png differ diff --git a/metrics/integration/render-tests/zoomed-fill/default/style.json b/metrics/integration/render-tests/zoomed-fill/default/style.json new file mode 100644 index 00000000000..ed361c4f2b3 --- /dev/null +++ b/metrics/integration/render-tests/zoomed-fill/default/style.json @@ -0,0 +1,40 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 16, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "fill", + "type": "fill", + "source": "mapbox", + "source-layer": "building", + "paint": { + "fill-color": "black" + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/zoomed-fill/negative-zoom/expected.png b/metrics/integration/render-tests/zoomed-fill/negative-zoom/expected.png new file mode 100644 index 00000000000..93fd1c7b186 Binary files /dev/null and b/metrics/integration/render-tests/zoomed-fill/negative-zoom/expected.png differ diff --git a/metrics/integration/render-tests/zoomed-fill/negative-zoom/style.json b/metrics/integration/render-tests/zoomed-fill/negative-zoom/style.json new file mode 100644 index 00000000000..e197e225241 --- /dev/null +++ b/metrics/integration/render-tests/zoomed-fill/negative-zoom/style.json @@ -0,0 +1,42 @@ +{ + "version": 8, + "metadata": { + "test": { + "allowed": 0.0002, + "width": 256, + "height": 256 + } + }, + "center": [ + 0, + 0 + ], + "zoom": -1, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/{z}-{x}-{y}.mvt" + ] + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "fill", + "type": "fill", + "source": "mapbox", + "source-layer": "water", + "paint": { + "fill-color": "black" + } + } + ] +} diff --git a/metrics/integration/render-tests/zoomed-raster/fractional/expected.png b/metrics/integration/render-tests/zoomed-raster/fractional/expected.png new file mode 100644 index 00000000000..25da775385f Binary files /dev/null and b/metrics/integration/render-tests/zoomed-raster/fractional/expected.png differ diff --git a/metrics/integration/render-tests/zoomed-raster/fractional/style.json b/metrics/integration/render-tests/zoomed-raster/fractional/style.json new file mode 100644 index 00000000000..76bc9e4d076 --- /dev/null +++ b/metrics/integration/render-tests/zoomed-raster/fractional/style.json @@ -0,0 +1,34 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 16.1, + "sources": { + "satellite": { + "type": "raster", + "tiles": [ + "local://tiles/{z}-{x}-{y}.satellite.png" + ], + "minzoom": 17, + "maxzoom": 17, + "tileSize": 256 + } + }, + "layers": [ + { + "id": "raster", + "type": "raster", + "source": "satellite", + "paint": { + "raster-fade-duration": 0 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/zoomed-raster/overzoom/expected.png b/metrics/integration/render-tests/zoomed-raster/overzoom/expected.png new file mode 100644 index 00000000000..c4b113234ba Binary files /dev/null and b/metrics/integration/render-tests/zoomed-raster/overzoom/expected.png differ diff --git a/metrics/integration/render-tests/zoomed-raster/overzoom/style.json b/metrics/integration/render-tests/zoomed-raster/overzoom/style.json new file mode 100644 index 00000000000..3ef6ad93b73 --- /dev/null +++ b/metrics/integration/render-tests/zoomed-raster/overzoom/style.json @@ -0,0 +1,34 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 17, + "sources": { + "satellite": { + "type": "raster", + "tiles": [ + "local://tiles/{z}-{x}-{y}.satellite.png" + ], + "minzoom": 17, + "maxzoom": 17, + "tileSize": 256 + } + }, + "layers": [ + { + "id": "raster", + "type": "raster", + "source": "satellite", + "paint": { + "raster-fade-duration": 0 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/render-tests/zoomed-raster/underzoom/expected.png b/metrics/integration/render-tests/zoomed-raster/underzoom/expected.png new file mode 100644 index 00000000000..2c804bd2eb1 Binary files /dev/null and b/metrics/integration/render-tests/zoomed-raster/underzoom/expected.png differ diff --git a/metrics/integration/render-tests/zoomed-raster/underzoom/style.json b/metrics/integration/render-tests/zoomed-raster/underzoom/style.json new file mode 100644 index 00000000000..9e892781049 --- /dev/null +++ b/metrics/integration/render-tests/zoomed-raster/underzoom/style.json @@ -0,0 +1,34 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 13.418056, + 52.499167 + ], + "zoom": 15, + "sources": { + "satellite": { + "type": "raster", + "tiles": [ + "local://tiles/{z}-{x}-{y}.satellite.png" + ], + "minzoom": 17, + "maxzoom": 17, + "tileSize": 256 + } + }, + "layers": [ + { + "id": "raster", + "type": "raster", + "source": "satellite", + "paint": { + "raster-fade-duration": 0 + } + } + ] +} \ No newline at end of file diff --git a/metrics/integration/results.html.tmpl b/metrics/integration/results.html.tmpl new file mode 100644 index 00000000000..37432be176a --- /dev/null +++ b/metrics/integration/results.html.tmpl @@ -0,0 +1,73 @@ + + +<% if (unsuccessful.length) { %> +

+ <%- unsuccessful.length %> tests failed. +<% } else { %> +

+ All tests passed! +<% } %> + + + +

+ +

<%- Object.keys(stats).map(status => stats[status] + ' ' + status).join(', ') + '.' %>

+ +
+ <% if (unsuccessful.length) { %> +

Failed tests: + <% for (const r of unsuccessful) { %><%- r.id %> <% } %>

+ <% } %> + +

Test sequence: + <% for (const s of tests) { %><%- s.id %> <% } %>

+ + <% if (shuffle) { %>

Shuffle seed: <%- seed %>

<% } %> +
+ + + +
+ +
diff --git a/metrics/integration/rollup.config.test.js b/metrics/integration/rollup.config.test.js new file mode 100644 index 00000000000..f8e347cea28 --- /dev/null +++ b/metrics/integration/rollup.config.test.js @@ -0,0 +1,14 @@ +import {plugins} from '../../build/rollup_plugins'; + +export default { + input: 'test/integration/lib/query-browser.js', + output: { + name: 'queryTests', + format: 'iife', + sourcemap: 'inline', + indent: false, + file: 'test/integration/dist/query-test.js' + }, + plugins: plugins(false, false), + external: [ 'tape', 'mapboxgl' ] +}; diff --git a/metrics/integration/sprites/1.5x.png b/metrics/integration/sprites/1.5x.png new file mode 100644 index 00000000000..75607750d6c Binary files /dev/null and b/metrics/integration/sprites/1.5x.png differ diff --git a/metrics/integration/sprites/1x.json b/metrics/integration/sprites/1x.json new file mode 100644 index 00000000000..123abb40d4a --- /dev/null +++ b/metrics/integration/sprites/1x.json @@ -0,0 +1,9 @@ +{ + "icon": { + "width": 20, + "height": 56, + "x": 0, + "y": 0, + "pixelRatio": 1 + } +} \ No newline at end of file diff --git a/metrics/integration/sprites/1x.png b/metrics/integration/sprites/1x.png new file mode 100644 index 00000000000..b112096c180 Binary files /dev/null and b/metrics/integration/sprites/1x.png differ diff --git a/metrics/integration/sprites/1x@2x.json b/metrics/integration/sprites/1x@2x.json new file mode 100644 index 00000000000..123abb40d4a --- /dev/null +++ b/metrics/integration/sprites/1x@2x.json @@ -0,0 +1,9 @@ +{ + "icon": { + "width": 20, + "height": 56, + "x": 0, + "y": 0, + "pixelRatio": 1 + } +} \ No newline at end of file diff --git a/metrics/integration/sprites/1x@2x.png b/metrics/integration/sprites/1x@2x.png new file mode 100644 index 00000000000..b112096c180 Binary files /dev/null and b/metrics/integration/sprites/1x@2x.png differ diff --git a/metrics/integration/sprites/2x.json b/metrics/integration/sprites/2x.json new file mode 100644 index 00000000000..8d246d04d6f --- /dev/null +++ b/metrics/integration/sprites/2x.json @@ -0,0 +1,9 @@ +{ + "icon": { + "width": 40, + "height": 112, + "x": 0, + "y": 0, + "pixelRatio": 2 + } +} \ No newline at end of file diff --git a/metrics/integration/sprites/2x.png b/metrics/integration/sprites/2x.png new file mode 100644 index 00000000000..d05c82bfe28 Binary files /dev/null and b/metrics/integration/sprites/2x.png differ diff --git a/metrics/integration/sprites/2x@2x.json b/metrics/integration/sprites/2x@2x.json new file mode 100644 index 00000000000..8d246d04d6f --- /dev/null +++ b/metrics/integration/sprites/2x@2x.json @@ -0,0 +1,9 @@ +{ + "icon": { + "width": 40, + "height": 112, + "x": 0, + "y": 0, + "pixelRatio": 2 + } +} \ No newline at end of file diff --git a/metrics/integration/sprites/2x@2x.png b/metrics/integration/sprites/2x@2x.png new file mode 100644 index 00000000000..d05c82bfe28 Binary files /dev/null and b/metrics/integration/sprites/2x@2x.png differ diff --git a/metrics/integration/sprites/3x.png b/metrics/integration/sprites/3x.png new file mode 100644 index 00000000000..703b172c154 Binary files /dev/null and b/metrics/integration/sprites/3x.png differ diff --git a/metrics/integration/sprites/dark.json b/metrics/integration/sprites/dark.json new file mode 100644 index 00000000000..24a5e0498db --- /dev/null +++ b/metrics/integration/sprites/dark.json @@ -0,0 +1,9 @@ +{ + "marker": { + "width": 12, + "height": 12, + "x": 0, + "y": 0, + "pixelRatio": 1 + } +} diff --git a/metrics/integration/sprites/dark.png b/metrics/integration/sprites/dark.png new file mode 100644 index 00000000000..81d90332d4b Binary files /dev/null and b/metrics/integration/sprites/dark.png differ diff --git a/metrics/integration/sprites/emerald.json b/metrics/integration/sprites/emerald.json new file mode 100644 index 00000000000..fcc09e77a38 --- /dev/null +++ b/metrics/integration/sprites/emerald.json @@ -0,0 +1,492 @@ +{ + "sand_noise": { + "width": 50, + "height": 50, + "x": 0, + "y": 0, + "pixelRatio": 1 + }, + "grass_noise": { + "width": 50, + "height": 50, + "x": 50, + "y": 0, + "pixelRatio": 1 + }, + "interstate_3": { + "width": 50, + "height": 43, + "x": 0, + "y": 50, + "pixelRatio": 1 + }, + "interstate_2": { + "width": 46, + "height": 44, + "x": 100, + "y": 0, + "pixelRatio": 1 + }, + "interstate_1": { + "width": 40, + "height": 42, + "x": 100, + "y": 44, + "pixelRatio": 1 + }, + "dlr.london-overground.london-underground.national-rail": { + "width": 72, + "height": 16, + "x": 0, + "y": 93, + "pixelRatio": 1 + }, + "us_highway_3": { + "width": 37, + "height": 30, + "x": 50, + "y": 50, + "pixelRatio": 1 + }, + "us_highway_2": { + "width": 34, + "height": 30, + "x": 0, + "y": 109, + "pixelRatio": 1 + }, + "us_state_3": { + "width": 37, + "height": 27, + "x": 34, + "y": 109, + "pixelRatio": 1 + }, + "london-overground.london-underground.national-rail": { + "width": 54, + "height": 16, + "x": 72, + "y": 93, + "pixelRatio": 1 + }, + "dlr.london-underground.national-rail": { + "width": 54, + "height": 16, + "x": 71, + "y": 109, + "pixelRatio": 1 + }, + "us_state_1": { + "width": 30, + "height": 27, + "x": 146, + "y": 0, + "pixelRatio": 1 + }, + "us_state_2": { + "width": 30, + "height": 27, + "x": 146, + "y": 27, + "pixelRatio": 1 + }, + "rer.transilien": { + "width": 40, + "height": 20, + "x": 0, + "y": 139, + "pixelRatio": 1 + }, + "us_highway_1": { + "width": 26, + "height": 29, + "x": 146, + "y": 54, + "pixelRatio": 1 + }, + "default_6": { + "width": 42, + "height": 16, + "x": 40, + "y": 139, + "pixelRatio": 1 + }, + "s-bahn.u-bahn": { + "width": 36, + "height": 18, + "x": 176, + "y": 0, + "pixelRatio": 1 + }, + "metro.rer": { + "width": 34, + "height": 18, + "x": 176, + "y": 18, + "pixelRatio": 1 + }, + "default_5": { + "width": 37, + "height": 16, + "x": 82, + "y": 139, + "pixelRatio": 1 + }, + "dlr.london-underground": { + "width": 36, + "height": 16, + "x": 176, + "y": 36, + "pixelRatio": 1 + }, + "london-overground.national-rail": { + "width": 36, + "height": 16, + "x": 176, + "y": 52, + "pixelRatio": 1 + }, + "london-underground.national-rail": { + "width": 36, + "height": 16, + "x": 176, + "y": 68, + "pixelRatio": 1 + }, + "london-overground.london-underground": { + "width": 36, + "height": 16, + "x": 176, + "y": 84, + "pixelRatio": 1 + }, + "dlr.national-rail": { + "width": 36, + "height": 16, + "x": 176, + "y": 100, + "pixelRatio": 1 + }, + "default_4": { + "width": 32, + "height": 16, + "x": 176, + "y": 116, + "pixelRatio": 1 + }, + "default_3": { + "width": 27, + "height": 16, + "x": 176, + "y": 132, + "pixelRatio": 1 + }, + "dot": { + "width": 20, + "height": 20, + "x": 146, + "y": 83, + "pixelRatio": 1 + }, + "moscow-metro": { + "width": 21, + "height": 18, + "x": 146, + "y": 103, + "pixelRatio": 1 + }, + "default_2": { + "width": 22, + "height": 16, + "x": 146, + "y": 121, + "pixelRatio": 1 + }, + "post_icon": { + "width": 18, + "height": 18, + "x": 0, + "y": 159, + "pixelRatio": 1 + }, + "police_icon": { + "width": 18, + "height": 18, + "x": 18, + "y": 159, + "pixelRatio": 1 + }, + "cemetery_icon": { + "width": 18, + "height": 18, + "x": 36, + "y": 159, + "pixelRatio": 1 + }, + "embassy_icon": { + "width": 18, + "height": 18, + "x": 54, + "y": 159, + "pixelRatio": 1 + }, + "golf_icon": { + "width": 18, + "height": 18, + "x": 72, + "y": 159, + "pixelRatio": 1 + }, + "religious-jewish_icon": { + "width": 18, + "height": 18, + "x": 90, + "y": 159, + "pixelRatio": 1 + }, + "government_icon": { + "width": 18, + "height": 18, + "x": 108, + "y": 159, + "pixelRatio": 1 + }, + "s-bahn": { + "width": 18, + "height": 18, + "x": 126, + "y": 159, + "pixelRatio": 1 + }, + "school_icon": { + "width": 18, + "height": 18, + "x": 144, + "y": 159, + "pixelRatio": 1 + }, + "fire-station_icon": { + "width": 18, + "height": 18, + "x": 162, + "y": 159, + "pixelRatio": 1 + }, + "generic_metro": { + "width": 18, + "height": 18, + "x": 180, + "y": 159, + "pixelRatio": 1 + }, + "hospital_icon": { + "width": 18, + "height": 18, + "x": 0, + "y": 177, + "pixelRatio": 1 + }, + "zoo_icon": { + "width": 18, + "height": 18, + "x": 18, + "y": 177, + "pixelRatio": 1 + }, + "generic_rail": { + "width": 18, + "height": 18, + "x": 36, + "y": 177, + "pixelRatio": 1 + }, + "harbor_icon": { + "width": 18, + "height": 18, + "x": 54, + "y": 177, + "pixelRatio": 1 + }, + "library_icon": { + "width": 18, + "height": 18, + "x": 72, + "y": 177, + "pixelRatio": 1 + }, + "monument_icon": { + "width": 18, + "height": 18, + "x": 90, + "y": 177, + "pixelRatio": 1 + }, + "washington-metro": { + "width": 18, + "height": 18, + "x": 108, + "y": 177, + "pixelRatio": 1 + }, + "airport_icon": { + "width": 18, + "height": 18, + "x": 126, + "y": 177, + "pixelRatio": 1 + }, + "park_icon": { + "width": 18, + "height": 18, + "x": 144, + "y": 177, + "pixelRatio": 1 + }, + "generic_icon": { + "width": 18, + "height": 18, + "x": 162, + "y": 177, + "pixelRatio": 1 + }, + "wiener-linien": { + "width": 18, + "height": 18, + "x": 180, + "y": 177, + "pixelRatio": 1 + }, + "college_icon": { + "width": 18, + "height": 18, + "x": 212, + "y": 0, + "pixelRatio": 1 + }, + "religious-muslim_icon": { + "width": 18, + "height": 18, + "x": 212, + "y": 18, + "pixelRatio": 1 + }, + "marker_icon": { + "width": 18, + "height": 18, + "x": 212, + "y": 36, + "pixelRatio": 1 + }, + "rer": { + "width": 18, + "height": 18, + "x": 212, + "y": 54, + "pixelRatio": 1 + }, + "u-bahn": { + "width": 18, + "height": 18, + "x": 212, + "y": 72, + "pixelRatio": 1 + }, + "prison_icon": { + "width": 18, + "height": 18, + "x": 212, + "y": 90, + "pixelRatio": 1 + }, + "airfield_icon": { + "width": 18, + "height": 18, + "x": 212, + "y": 108, + "pixelRatio": 1 + }, + "metro": { + "width": 18, + "height": 18, + "x": 212, + "y": 126, + "pixelRatio": 1 + }, + "religious-christian_icon": { + "width": 18, + "height": 18, + "x": 212, + "y": 144, + "pixelRatio": 1 + }, + "museum_icon": { + "width": 18, + "height": 18, + "x": 212, + "y": 162, + "pixelRatio": 1 + }, + "national-rail": { + "width": 18, + "height": 16, + "x": 126, + "y": 93, + "pixelRatio": 1 + }, + "london-overground": { + "width": 18, + "height": 16, + "x": 125, + "y": 109, + "pixelRatio": 1 + }, + "london-underground": { + "width": 18, + "height": 16, + "x": 119, + "y": 139, + "pixelRatio": 1 + }, + "dlr": { + "width": 18, + "height": 16, + "x": 137, + "y": 139, + "pixelRatio": 1 + }, + "default_1": { + "width": 17, + "height": 16, + "x": 155, + "y": 139, + "pixelRatio": 1 + }, + "oneway_motorway": { + "width": 20, + "height": 9, + "x": 176, + "y": 148, + "pixelRatio": 1 + }, + "oneway_road": { + "width": 20, + "height": 9, + "x": 50, + "y": 80, + "pixelRatio": 1 + }, + "school_striped": { + "width": 6, + "height": 6, + "x": 212, + "y": 180, + "pixelRatio": 1 + }, + "hospital_striped": { + "width": 6, + "height": 6, + "x": 218, + "y": 180, + "pixelRatio": 1 + } +} \ No newline at end of file diff --git a/metrics/integration/sprites/emerald.png b/metrics/integration/sprites/emerald.png new file mode 100644 index 00000000000..04b2bf508ab Binary files /dev/null and b/metrics/integration/sprites/emerald.png differ diff --git a/metrics/integration/sprites/emerald@2x.json b/metrics/integration/sprites/emerald@2x.json new file mode 100644 index 00000000000..7ef71ce5c3a --- /dev/null +++ b/metrics/integration/sprites/emerald@2x.json @@ -0,0 +1,492 @@ +{ + "sand_noise": { + "width": 100, + "height": 100, + "x": 0, + "y": 0, + "pixelRatio": 2 + }, + "grass_noise": { + "width": 100, + "height": 100, + "x": 100, + "y": 0, + "pixelRatio": 2 + }, + "interstate_3": { + "width": 100, + "height": 86, + "x": 0, + "y": 100, + "pixelRatio": 2 + }, + "interstate_2": { + "width": 92, + "height": 88, + "x": 200, + "y": 0, + "pixelRatio": 2 + }, + "interstate_1": { + "width": 80, + "height": 84, + "x": 200, + "y": 88, + "pixelRatio": 2 + }, + "dlr.london-overground.london-underground.national-rail": { + "width": 144, + "height": 32, + "x": 0, + "y": 186, + "pixelRatio": 2 + }, + "us_highway_3": { + "width": 74, + "height": 60, + "x": 100, + "y": 100, + "pixelRatio": 2 + }, + "us_highway_2": { + "width": 68, + "height": 60, + "x": 0, + "y": 218, + "pixelRatio": 2 + }, + "us_state_3": { + "width": 74, + "height": 54, + "x": 68, + "y": 218, + "pixelRatio": 2 + }, + "london-overground.london-underground.national-rail": { + "width": 108, + "height": 32, + "x": 144, + "y": 186, + "pixelRatio": 2 + }, + "dlr.london-underground.national-rail": { + "width": 108, + "height": 32, + "x": 142, + "y": 218, + "pixelRatio": 2 + }, + "us_state_1": { + "width": 60, + "height": 54, + "x": 292, + "y": 0, + "pixelRatio": 2 + }, + "us_state_2": { + "width": 60, + "height": 54, + "x": 292, + "y": 54, + "pixelRatio": 2 + }, + "rer.transilien": { + "width": 80, + "height": 40, + "x": 0, + "y": 278, + "pixelRatio": 2 + }, + "us_highway_1": { + "width": 52, + "height": 58, + "x": 292, + "y": 108, + "pixelRatio": 2 + }, + "default_6": { + "width": 84, + "height": 32, + "x": 80, + "y": 278, + "pixelRatio": 2 + }, + "s-bahn.u-bahn": { + "width": 72, + "height": 36, + "x": 352, + "y": 0, + "pixelRatio": 2 + }, + "metro.rer": { + "width": 68, + "height": 36, + "x": 352, + "y": 36, + "pixelRatio": 2 + }, + "default_5": { + "width": 74, + "height": 32, + "x": 164, + "y": 278, + "pixelRatio": 2 + }, + "dlr.london-underground": { + "width": 72, + "height": 32, + "x": 352, + "y": 72, + "pixelRatio": 2 + }, + "london-overground.national-rail": { + "width": 72, + "height": 32, + "x": 352, + "y": 104, + "pixelRatio": 2 + }, + "london-underground.national-rail": { + "width": 72, + "height": 32, + "x": 352, + "y": 136, + "pixelRatio": 2 + }, + "london-overground.london-underground": { + "width": 72, + "height": 32, + "x": 352, + "y": 168, + "pixelRatio": 2 + }, + "dlr.national-rail": { + "width": 72, + "height": 32, + "x": 352, + "y": 200, + "pixelRatio": 2 + }, + "default_4": { + "width": 64, + "height": 32, + "x": 352, + "y": 232, + "pixelRatio": 2 + }, + "default_3": { + "width": 54, + "height": 32, + "x": 352, + "y": 264, + "pixelRatio": 2 + }, + "dot": { + "width": 40, + "height": 40, + "x": 292, + "y": 166, + "pixelRatio": 2 + }, + "moscow-metro": { + "width": 42, + "height": 36, + "x": 292, + "y": 206, + "pixelRatio": 2 + }, + "default_2": { + "width": 44, + "height": 32, + "x": 292, + "y": 242, + "pixelRatio": 2 + }, + "post_icon": { + "width": 36, + "height": 36, + "x": 0, + "y": 318, + "pixelRatio": 2 + }, + "police_icon": { + "width": 36, + "height": 36, + "x": 36, + "y": 318, + "pixelRatio": 2 + }, + "cemetery_icon": { + "width": 36, + "height": 36, + "x": 72, + "y": 318, + "pixelRatio": 2 + }, + "embassy_icon": { + "width": 36, + "height": 36, + "x": 108, + "y": 318, + "pixelRatio": 2 + }, + "golf_icon": { + "width": 36, + "height": 36, + "x": 144, + "y": 318, + "pixelRatio": 2 + }, + "religious-jewish_icon": { + "width": 36, + "height": 36, + "x": 180, + "y": 318, + "pixelRatio": 2 + }, + "government_icon": { + "width": 36, + "height": 36, + "x": 216, + "y": 318, + "pixelRatio": 2 + }, + "s-bahn": { + "width": 36, + "height": 36, + "x": 252, + "y": 318, + "pixelRatio": 2 + }, + "school_icon": { + "width": 36, + "height": 36, + "x": 288, + "y": 318, + "pixelRatio": 2 + }, + "fire-station_icon": { + "width": 36, + "height": 36, + "x": 324, + "y": 318, + "pixelRatio": 2 + }, + "generic_metro": { + "width": 36, + "height": 36, + "x": 360, + "y": 318, + "pixelRatio": 2 + }, + "hospital_icon": { + "width": 36, + "height": 36, + "x": 0, + "y": 354, + "pixelRatio": 2 + }, + "zoo_icon": { + "width": 36, + "height": 36, + "x": 36, + "y": 354, + "pixelRatio": 2 + }, + "generic_rail": { + "width": 36, + "height": 36, + "x": 72, + "y": 354, + "pixelRatio": 2 + }, + "harbor_icon": { + "width": 36, + "height": 36, + "x": 108, + "y": 354, + "pixelRatio": 2 + }, + "library_icon": { + "width": 36, + "height": 36, + "x": 144, + "y": 354, + "pixelRatio": 2 + }, + "monument_icon": { + "width": 36, + "height": 36, + "x": 180, + "y": 354, + "pixelRatio": 2 + }, + "washington-metro": { + "width": 36, + "height": 36, + "x": 216, + "y": 354, + "pixelRatio": 2 + }, + "airport_icon": { + "width": 36, + "height": 36, + "x": 252, + "y": 354, + "pixelRatio": 2 + }, + "park_icon": { + "width": 36, + "height": 36, + "x": 288, + "y": 354, + "pixelRatio": 2 + }, + "generic_icon": { + "width": 36, + "height": 36, + "x": 324, + "y": 354, + "pixelRatio": 2 + }, + "wiener-linien": { + "width": 36, + "height": 36, + "x": 360, + "y": 354, + "pixelRatio": 2 + }, + "college_icon": { + "width": 36, + "height": 36, + "x": 424, + "y": 0, + "pixelRatio": 2 + }, + "religious-muslim_icon": { + "width": 36, + "height": 36, + "x": 424, + "y": 36, + "pixelRatio": 2 + }, + "marker_icon": { + "width": 36, + "height": 36, + "x": 424, + "y": 72, + "pixelRatio": 2 + }, + "rer": { + "width": 36, + "height": 36, + "x": 424, + "y": 108, + "pixelRatio": 2 + }, + "u-bahn": { + "width": 36, + "height": 36, + "x": 424, + "y": 144, + "pixelRatio": 2 + }, + "prison_icon": { + "width": 36, + "height": 36, + "x": 424, + "y": 180, + "pixelRatio": 2 + }, + "airfield_icon": { + "width": 36, + "height": 36, + "x": 424, + "y": 216, + "pixelRatio": 2 + }, + "metro": { + "width": 36, + "height": 36, + "x": 424, + "y": 252, + "pixelRatio": 2 + }, + "religious-christian_icon": { + "width": 36, + "height": 36, + "x": 424, + "y": 288, + "pixelRatio": 2 + }, + "museum_icon": { + "width": 36, + "height": 36, + "x": 424, + "y": 324, + "pixelRatio": 2 + }, + "national-rail": { + "width": 36, + "height": 32, + "x": 252, + "y": 186, + "pixelRatio": 2 + }, + "london-overground": { + "width": 36, + "height": 32, + "x": 250, + "y": 218, + "pixelRatio": 2 + }, + "london-underground": { + "width": 36, + "height": 32, + "x": 238, + "y": 278, + "pixelRatio": 2 + }, + "dlr": { + "width": 36, + "height": 32, + "x": 274, + "y": 278, + "pixelRatio": 2 + }, + "default_1": { + "width": 34, + "height": 32, + "x": 310, + "y": 278, + "pixelRatio": 2 + }, + "oneway_motorway": { + "width": 40, + "height": 18, + "x": 352, + "y": 296, + "pixelRatio": 2 + }, + "oneway_road": { + "width": 40, + "height": 18, + "x": 100, + "y": 160, + "pixelRatio": 2 + }, + "school_striped": { + "width": 12, + "height": 12, + "x": 424, + "y": 360, + "pixelRatio": 2 + }, + "hospital_striped": { + "width": 12, + "height": 12, + "x": 436, + "y": 360, + "pixelRatio": 2 + } +} \ No newline at end of file diff --git a/metrics/integration/sprites/emerald@2x.png b/metrics/integration/sprites/emerald@2x.png new file mode 100644 index 00000000000..be85594b752 Binary files /dev/null and b/metrics/integration/sprites/emerald@2x.png differ diff --git a/metrics/integration/sprites/icon-text-fit-1x@2x.json b/metrics/integration/sprites/icon-text-fit-1x@2x.json new file mode 120000 index 00000000000..db5790782a6 --- /dev/null +++ b/metrics/integration/sprites/icon-text-fit-1x@2x.json @@ -0,0 +1 @@ +icon-text-fit.json \ No newline at end of file diff --git a/metrics/integration/sprites/icon-text-fit-1x@2x.png b/metrics/integration/sprites/icon-text-fit-1x@2x.png new file mode 120000 index 00000000000..061acc5577a --- /dev/null +++ b/metrics/integration/sprites/icon-text-fit-1x@2x.png @@ -0,0 +1 @@ +icon-text-fit.png \ No newline at end of file diff --git a/metrics/integration/sprites/icon-text-fit-2x.json b/metrics/integration/sprites/icon-text-fit-2x.json new file mode 120000 index 00000000000..718350fa8a0 --- /dev/null +++ b/metrics/integration/sprites/icon-text-fit-2x.json @@ -0,0 +1 @@ +icon-text-fit@2x.json \ No newline at end of file diff --git a/metrics/integration/sprites/icon-text-fit-2x.png b/metrics/integration/sprites/icon-text-fit-2x.png new file mode 120000 index 00000000000..d551ece5d84 --- /dev/null +++ b/metrics/integration/sprites/icon-text-fit-2x.png @@ -0,0 +1 @@ +icon-text-fit@2x.png \ No newline at end of file diff --git a/metrics/integration/sprites/icon-text-fit.json b/metrics/integration/sprites/icon-text-fit.json new file mode 100644 index 00000000000..4668f96c82a --- /dev/null +++ b/metrics/integration/sprites/icon-text-fit.json @@ -0,0 +1,26 @@ +{ + "label": { + "x": 0, + "y": 0, + "width": 76, + "height": 38, + "pixelRatio": 1, + "sdf": false + }, + "small-box": { + "x": 76, + "y": 0, + "width": 18, + "height": 10, + "pixelRatio": 1, + "sdf": false + }, + "tall-box": { + "x": 76, + "y": 10, + "width": 18, + "height": 28, + "pixelRatio": 1, + "sdf": false + } +} diff --git a/metrics/integration/sprites/icon-text-fit.png b/metrics/integration/sprites/icon-text-fit.png new file mode 100644 index 00000000000..1d77af78428 Binary files /dev/null and b/metrics/integration/sprites/icon-text-fit.png differ diff --git a/metrics/integration/sprites/icon-text-fit.svg b/metrics/integration/sprites/icon-text-fit.svg new file mode 100644 index 00000000000..88f78c6cebc --- /dev/null +++ b/metrics/integration/sprites/icon-text-fit.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/metrics/integration/sprites/icon-text-fit@2x.json b/metrics/integration/sprites/icon-text-fit@2x.json new file mode 100644 index 00000000000..fb63fa138c9 --- /dev/null +++ b/metrics/integration/sprites/icon-text-fit@2x.json @@ -0,0 +1,26 @@ +{ + "label": { + "x": 0, + "y": 0, + "width": 152, + "height": 76, + "pixelRatio": 2, + "sdf": false + }, + "small-box": { + "x": 152, + "y": 0, + "width": 36, + "height": 20, + "pixelRatio": 2, + "sdf": false + }, + "tall-box": { + "x": 152, + "y": 20, + "width": 36, + "height": 56, + "pixelRatio": 2, + "sdf": false + } +} diff --git a/metrics/integration/sprites/icon-text-fit@2x.png b/metrics/integration/sprites/icon-text-fit@2x.png new file mode 100644 index 00000000000..52bc078f35e Binary files /dev/null and b/metrics/integration/sprites/icon-text-fit@2x.png differ diff --git a/metrics/integration/sprites/light.json b/metrics/integration/sprites/light.json new file mode 100644 index 00000000000..24a5e0498db --- /dev/null +++ b/metrics/integration/sprites/light.json @@ -0,0 +1,9 @@ +{ + "marker": { + "width": 12, + "height": 12, + "x": 0, + "y": 0, + "pixelRatio": 1 + } +} diff --git a/metrics/integration/sprites/light.png b/metrics/integration/sprites/light.png new file mode 100644 index 00000000000..2bdae3f0f13 Binary files /dev/null and b/metrics/integration/sprites/light.png differ diff --git a/metrics/integration/sprites/mapbox/basic-v9.json b/metrics/integration/sprites/mapbox/basic-v9.json new file mode 100644 index 00000000000..04c29b4402a --- /dev/null +++ b/metrics/integration/sprites/mapbox/basic-v9.json @@ -0,0 +1 @@ +{"airfield-15":{"width":21,"height":21,"x":0,"y":0,"pixelRatio":1,"visible":true},"airport-15":{"width":21,"height":21,"x":21,"y":0,"pixelRatio":1,"visible":true},"alcohol-shop-15":{"width":21,"height":21,"x":0,"y":21,"pixelRatio":1,"visible":true},"amusement-park-15":{"width":21,"height":21,"x":21,"y":21,"pixelRatio":1,"visible":true},"aquarium-15":{"width":21,"height":21,"x":42,"y":0,"pixelRatio":1,"visible":true},"art-gallery-15":{"width":21,"height":21,"x":63,"y":0,"pixelRatio":1,"visible":true},"attraction-15":{"width":21,"height":21,"x":42,"y":21,"pixelRatio":1,"visible":true},"bakery-15":{"width":21,"height":21,"x":63,"y":21,"pixelRatio":1,"visible":true},"bank-15":{"width":21,"height":21,"x":0,"y":42,"pixelRatio":1,"visible":true},"bar-15":{"width":21,"height":21,"x":21,"y":42,"pixelRatio":1,"visible":true},"beer-15":{"width":21,"height":21,"x":42,"y":42,"pixelRatio":1,"visible":true},"bicycle-15":{"width":21,"height":21,"x":63,"y":42,"pixelRatio":1,"visible":true},"bicycle-share-15":{"width":21,"height":21,"x":0,"y":63,"pixelRatio":1,"visible":true},"bus-15":{"width":21,"height":21,"x":21,"y":63,"pixelRatio":1,"visible":true},"cafe-15":{"width":21,"height":21,"x":42,"y":63,"pixelRatio":1,"visible":true},"campsite-15":{"width":21,"height":21,"x":63,"y":63,"pixelRatio":1,"visible":true},"car-15":{"width":21,"height":21,"x":84,"y":0,"pixelRatio":1,"visible":true},"castle-15":{"width":21,"height":21,"x":105,"y":0,"pixelRatio":1,"visible":true},"cemetery-15":{"width":21,"height":21,"x":126,"y":0,"pixelRatio":1,"visible":true},"cinema-15":{"width":21,"height":21,"x":147,"y":0,"pixelRatio":1,"visible":true},"circle-15":{"width":21,"height":21,"x":84,"y":21,"pixelRatio":1,"visible":true},"circle-stroked-15":{"width":21,"height":21,"x":105,"y":21,"pixelRatio":1,"visible":true},"clothing-store-15":{"width":21,"height":21,"x":126,"y":21,"pixelRatio":1,"visible":true},"college-15":{"width":21,"height":21,"x":147,"y":21,"pixelRatio":1,"visible":true},"dentist-15":{"width":21,"height":21,"x":84,"y":42,"pixelRatio":1,"visible":true},"doctor-15":{"width":21,"height":21,"x":105,"y":42,"pixelRatio":1,"visible":true},"dog-park-15":{"width":21,"height":21,"x":126,"y":42,"pixelRatio":1,"visible":true},"drinking-water-15":{"width":21,"height":21,"x":147,"y":42,"pixelRatio":1,"visible":true},"embassy-15":{"width":21,"height":21,"x":84,"y":63,"pixelRatio":1,"visible":true},"entrance-15":{"width":21,"height":21,"x":105,"y":63,"pixelRatio":1,"visible":true},"fast-food-15":{"width":21,"height":21,"x":126,"y":63,"pixelRatio":1,"visible":true},"ferry-15":{"width":21,"height":21,"x":147,"y":63,"pixelRatio":1,"visible":true},"fire-station-15":{"width":21,"height":21,"x":0,"y":84,"pixelRatio":1,"visible":true},"fuel-15":{"width":21,"height":21,"x":21,"y":84,"pixelRatio":1,"visible":true},"garden-15":{"width":21,"height":21,"x":42,"y":84,"pixelRatio":1,"visible":true},"golf-15":{"width":21,"height":21,"x":63,"y":84,"pixelRatio":1,"visible":true},"grocery-15":{"width":21,"height":21,"x":84,"y":84,"pixelRatio":1,"visible":true},"harbor-15":{"width":21,"height":21,"x":105,"y":84,"pixelRatio":1,"visible":true},"heliport-15":{"width":21,"height":21,"x":126,"y":84,"pixelRatio":1,"visible":true},"hospital-15":{"width":21,"height":21,"x":147,"y":84,"pixelRatio":1,"visible":true},"ice-cream-15":{"width":21,"height":21,"x":0,"y":105,"pixelRatio":1,"visible":true},"information-15":{"width":21,"height":21,"x":21,"y":105,"pixelRatio":1,"visible":true},"laundry-15":{"width":21,"height":21,"x":42,"y":105,"pixelRatio":1,"visible":true},"library-15":{"width":21,"height":21,"x":63,"y":105,"pixelRatio":1,"visible":true},"lodging-15":{"width":21,"height":21,"x":84,"y":105,"pixelRatio":1,"visible":true},"marker-15":{"width":21,"height":21,"x":105,"y":105,"pixelRatio":1,"visible":true},"monument-15":{"width":21,"height":21,"x":126,"y":105,"pixelRatio":1,"visible":true},"mountain-15":{"width":21,"height":21,"x":147,"y":105,"pixelRatio":1,"visible":true},"museum-15":{"width":21,"height":21,"x":0,"y":126,"pixelRatio":1,"visible":true},"music-15":{"width":21,"height":21,"x":21,"y":126,"pixelRatio":1,"visible":true},"park-15":{"width":21,"height":21,"x":42,"y":126,"pixelRatio":1,"visible":true},"pharmacy-15":{"width":21,"height":21,"x":63,"y":126,"pixelRatio":1,"visible":true},"picnic-site-15":{"width":21,"height":21,"x":84,"y":126,"pixelRatio":1,"visible":true},"place-of-worship-15":{"width":21,"height":21,"x":105,"y":126,"pixelRatio":1,"visible":true},"playground-15":{"width":21,"height":21,"x":126,"y":126,"pixelRatio":1,"visible":true},"police-15":{"width":21,"height":21,"x":147,"y":126,"pixelRatio":1,"visible":true},"post-15":{"width":21,"height":21,"x":0,"y":147,"pixelRatio":1,"visible":true},"prison-15":{"width":21,"height":21,"x":21,"y":147,"pixelRatio":1,"visible":true},"rail-15":{"width":21,"height":21,"x":42,"y":147,"pixelRatio":1,"visible":true},"rail-light-15":{"width":21,"height":21,"x":63,"y":147,"pixelRatio":1,"visible":true},"rail-metro-15":{"width":21,"height":21,"x":84,"y":147,"pixelRatio":1,"visible":true},"religious-christian-15":{"width":21,"height":21,"x":105,"y":147,"pixelRatio":1,"visible":true},"religious-jewish-15":{"width":21,"height":21,"x":126,"y":147,"pixelRatio":1,"visible":true},"religious-muslim-15":{"width":21,"height":21,"x":147,"y":147,"pixelRatio":1,"visible":true},"restaurant-15":{"width":21,"height":21,"x":168,"y":0,"pixelRatio":1,"visible":true},"rocket-15":{"width":21,"height":21,"x":189,"y":0,"pixelRatio":1,"visible":true},"school-15":{"width":21,"height":21,"x":210,"y":0,"pixelRatio":1,"visible":true},"shop-15":{"width":21,"height":21,"x":231,"y":0,"pixelRatio":1,"visible":true},"stadium-15":{"width":21,"height":21,"x":252,"y":0,"pixelRatio":1,"visible":true},"star-15":{"width":21,"height":21,"x":273,"y":0,"pixelRatio":1,"visible":true},"suitcase-15":{"width":21,"height":21,"x":294,"y":0,"pixelRatio":1,"visible":true},"swimming-15":{"width":21,"height":21,"x":315,"y":0,"pixelRatio":1,"visible":true},"theatre-15":{"width":21,"height":21,"x":168,"y":21,"pixelRatio":1,"visible":true},"toilet-15":{"width":21,"height":21,"x":189,"y":21,"pixelRatio":1,"visible":true},"town-hall-15":{"width":21,"height":21,"x":210,"y":21,"pixelRatio":1,"visible":true},"triangle-15":{"width":21,"height":21,"x":231,"y":21,"pixelRatio":1,"visible":true},"triangle-stroked-15":{"width":21,"height":21,"x":252,"y":21,"pixelRatio":1,"visible":true},"veterinary-15":{"width":21,"height":21,"x":273,"y":21,"pixelRatio":1,"visible":true},"volcano-15":{"width":21,"height":21,"x":294,"y":21,"pixelRatio":1,"visible":true},"zoo-15":{"width":21,"height":21,"x":315,"y":21,"pixelRatio":1,"visible":true},"airfield-11":{"width":17,"height":17,"x":168,"y":42,"pixelRatio":1,"visible":true},"airport-11":{"width":17,"height":17,"x":185,"y":42,"pixelRatio":1,"visible":true},"alcohol-shop-11":{"width":17,"height":17,"x":202,"y":42,"pixelRatio":1,"visible":true},"amusement-park-11":{"width":17,"height":17,"x":219,"y":42,"pixelRatio":1,"visible":true},"aquarium-11":{"width":17,"height":17,"x":236,"y":42,"pixelRatio":1,"visible":true},"art-gallery-11":{"width":17,"height":17,"x":253,"y":42,"pixelRatio":1,"visible":true},"attraction-11":{"width":17,"height":17,"x":270,"y":42,"pixelRatio":1,"visible":true},"bakery-11":{"width":17,"height":17,"x":287,"y":42,"pixelRatio":1,"visible":true},"bank-11":{"width":17,"height":17,"x":304,"y":42,"pixelRatio":1,"visible":true},"bar-11":{"width":17,"height":17,"x":168,"y":63,"pixelRatio":1,"visible":true},"beer-11":{"width":17,"height":17,"x":185,"y":63,"pixelRatio":1,"visible":true},"bicycle-11":{"width":17,"height":17,"x":202,"y":63,"pixelRatio":1,"visible":true},"bicycle-share-11":{"width":17,"height":17,"x":219,"y":63,"pixelRatio":1,"visible":true},"bus-11":{"width":17,"height":17,"x":236,"y":63,"pixelRatio":1,"visible":true},"cafe-11":{"width":17,"height":17,"x":253,"y":63,"pixelRatio":1,"visible":true},"campsite-11":{"width":17,"height":17,"x":270,"y":63,"pixelRatio":1,"visible":true},"car-11":{"width":17,"height":17,"x":287,"y":63,"pixelRatio":1,"visible":true},"castle-11":{"width":17,"height":17,"x":304,"y":63,"pixelRatio":1,"visible":true},"cemetery-11":{"width":17,"height":17,"x":168,"y":84,"pixelRatio":1,"visible":true},"cinema-11":{"width":17,"height":17,"x":185,"y":84,"pixelRatio":1,"visible":true},"circle-11":{"width":17,"height":17,"x":202,"y":84,"pixelRatio":1,"visible":true},"circle-stroked-11":{"width":17,"height":17,"x":219,"y":84,"pixelRatio":1,"visible":true},"clothing-store-11":{"width":17,"height":17,"x":236,"y":84,"pixelRatio":1,"visible":true},"college-11":{"width":17,"height":17,"x":253,"y":84,"pixelRatio":1,"visible":true},"dentist-11":{"width":17,"height":17,"x":270,"y":84,"pixelRatio":1,"visible":true},"doctor-11":{"width":17,"height":17,"x":287,"y":84,"pixelRatio":1,"visible":true},"dog-park-11":{"width":17,"height":17,"x":304,"y":84,"pixelRatio":1,"visible":true},"drinking-water-11":{"width":17,"height":17,"x":168,"y":105,"pixelRatio":1,"visible":true},"embassy-11":{"width":17,"height":17,"x":185,"y":105,"pixelRatio":1,"visible":true},"entrance-11":{"width":17,"height":17,"x":202,"y":105,"pixelRatio":1,"visible":true},"fast-food-11":{"width":17,"height":17,"x":219,"y":105,"pixelRatio":1,"visible":true},"ferry-11":{"width":17,"height":17,"x":236,"y":105,"pixelRatio":1,"visible":true},"fire-station-11":{"width":17,"height":17,"x":253,"y":105,"pixelRatio":1,"visible":true},"fuel-11":{"width":17,"height":17,"x":270,"y":105,"pixelRatio":1,"visible":true},"garden-11":{"width":17,"height":17,"x":287,"y":105,"pixelRatio":1,"visible":true},"golf-11":{"width":17,"height":17,"x":304,"y":105,"pixelRatio":1,"visible":true},"grocery-11":{"width":17,"height":17,"x":168,"y":126,"pixelRatio":1,"visible":true},"harbor-11":{"width":17,"height":17,"x":185,"y":126,"pixelRatio":1,"visible":true},"heliport-11":{"width":17,"height":17,"x":202,"y":126,"pixelRatio":1,"visible":true},"hospital-11":{"width":17,"height":17,"x":219,"y":126,"pixelRatio":1,"visible":true},"ice-cream-11":{"width":17,"height":17,"x":236,"y":126,"pixelRatio":1,"visible":true},"information-11":{"width":17,"height":17,"x":253,"y":126,"pixelRatio":1,"visible":true},"laundry-11":{"width":17,"height":17,"x":270,"y":126,"pixelRatio":1,"visible":true},"library-11":{"width":17,"height":17,"x":287,"y":126,"pixelRatio":1,"visible":true},"lodging-11":{"width":17,"height":17,"x":304,"y":126,"pixelRatio":1,"visible":true},"marker-11":{"width":17,"height":17,"x":168,"y":147,"pixelRatio":1,"visible":true},"monument-11":{"width":17,"height":17,"x":185,"y":147,"pixelRatio":1,"visible":true},"mountain-11":{"width":17,"height":17,"x":202,"y":147,"pixelRatio":1,"visible":true},"museum-11":{"width":17,"height":17,"x":219,"y":147,"pixelRatio":1,"visible":true},"music-11":{"width":17,"height":17,"x":236,"y":147,"pixelRatio":1,"visible":true},"park-11":{"width":17,"height":17,"x":253,"y":147,"pixelRatio":1,"visible":true},"pharmacy-11":{"width":17,"height":17,"x":270,"y":147,"pixelRatio":1,"visible":true},"picnic-site-11":{"width":17,"height":17,"x":287,"y":147,"pixelRatio":1,"visible":true},"place-of-worship-11":{"width":17,"height":17,"x":304,"y":147,"pixelRatio":1,"visible":true},"playground-11":{"width":17,"height":17,"x":0,"y":168,"pixelRatio":1,"visible":true},"police-11":{"width":17,"height":17,"x":17,"y":168,"pixelRatio":1,"visible":true},"post-11":{"width":17,"height":17,"x":34,"y":168,"pixelRatio":1,"visible":true},"prison-11":{"width":17,"height":17,"x":51,"y":168,"pixelRatio":1,"visible":true},"rail-11":{"width":17,"height":17,"x":68,"y":168,"pixelRatio":1,"visible":true},"rail-light-11":{"width":17,"height":17,"x":85,"y":168,"pixelRatio":1,"visible":true},"rail-metro-11":{"width":17,"height":17,"x":102,"y":168,"pixelRatio":1,"visible":true},"religious-christian-11":{"width":17,"height":17,"x":119,"y":168,"pixelRatio":1,"visible":true},"religious-jewish-11":{"width":17,"height":17,"x":136,"y":168,"pixelRatio":1,"visible":true},"religious-muslim-11":{"width":17,"height":17,"x":153,"y":168,"pixelRatio":1,"visible":true},"restaurant-11":{"width":17,"height":17,"x":170,"y":168,"pixelRatio":1,"visible":true},"rocket-11":{"width":17,"height":17,"x":187,"y":168,"pixelRatio":1,"visible":true},"school-11":{"width":17,"height":17,"x":204,"y":168,"pixelRatio":1,"visible":true},"shop-11":{"width":17,"height":17,"x":221,"y":168,"pixelRatio":1,"visible":true},"stadium-11":{"width":17,"height":17,"x":238,"y":168,"pixelRatio":1,"visible":true},"star-11":{"width":17,"height":17,"x":255,"y":168,"pixelRatio":1,"visible":true},"suitcase-11":{"width":17,"height":17,"x":272,"y":168,"pixelRatio":1,"visible":true},"swimming-11":{"width":17,"height":17,"x":289,"y":168,"pixelRatio":1,"visible":true},"theatre-11":{"width":17,"height":17,"x":306,"y":168,"pixelRatio":1,"visible":true},"toilet-11":{"width":17,"height":17,"x":0,"y":185,"pixelRatio":1,"visible":true},"town-hall-11":{"width":17,"height":17,"x":17,"y":185,"pixelRatio":1,"visible":true},"triangle-11":{"width":17,"height":17,"x":34,"y":185,"pixelRatio":1,"visible":true},"triangle-stroked-11":{"width":17,"height":17,"x":51,"y":185,"pixelRatio":1,"visible":true},"veterinary-11":{"width":17,"height":17,"x":68,"y":185,"pixelRatio":1,"visible":true},"volcano-11":{"width":17,"height":17,"x":85,"y":185,"pixelRatio":1,"visible":true},"zoo-11":{"width":17,"height":17,"x":102,"y":185,"pixelRatio":1,"visible":true}} \ No newline at end of file diff --git a/metrics/integration/sprites/mapbox/basic-v9.png b/metrics/integration/sprites/mapbox/basic-v9.png new file mode 100644 index 00000000000..531eae3de5f Binary files /dev/null and b/metrics/integration/sprites/mapbox/basic-v9.png differ diff --git a/metrics/integration/sprites/mapbox/bright-v9.json b/metrics/integration/sprites/mapbox/bright-v9.json new file mode 100644 index 00000000000..aee4b3990d5 --- /dev/null +++ b/metrics/integration/sprites/mapbox/bright-v9.json @@ -0,0 +1 @@ +{"airfield-15":{"width":21,"height":21,"x":0,"y":0,"pixelRatio":1,"visible":true},"airport-15":{"width":21,"height":21,"x":21,"y":0,"pixelRatio":1,"visible":true},"alcohol-shop-15":{"width":21,"height":21,"x":0,"y":21,"pixelRatio":1,"visible":true},"amusement-park-15":{"width":21,"height":21,"x":21,"y":21,"pixelRatio":1,"visible":true},"aquarium-15":{"width":21,"height":21,"x":42,"y":0,"pixelRatio":1,"visible":true},"art-gallery-15":{"width":21,"height":21,"x":63,"y":0,"pixelRatio":1,"visible":true},"attraction-15":{"width":21,"height":21,"x":42,"y":21,"pixelRatio":1,"visible":true},"bakery-15":{"width":21,"height":21,"x":63,"y":21,"pixelRatio":1,"visible":true},"bank-15":{"width":21,"height":21,"x":0,"y":42,"pixelRatio":1,"visible":true},"bar-15":{"width":21,"height":21,"x":21,"y":42,"pixelRatio":1,"visible":true},"beer-15":{"width":21,"height":21,"x":42,"y":42,"pixelRatio":1,"visible":true},"bicycle-15":{"width":21,"height":21,"x":63,"y":42,"pixelRatio":1,"visible":true},"bicycle-share-15":{"width":21,"height":21,"x":0,"y":63,"pixelRatio":1,"visible":true},"bus-15":{"width":21,"height":21,"x":21,"y":63,"pixelRatio":1,"visible":true},"cafe-15":{"width":21,"height":21,"x":42,"y":63,"pixelRatio":1,"visible":true},"campsite-15":{"width":21,"height":21,"x":63,"y":63,"pixelRatio":1,"visible":true},"car-15":{"width":21,"height":21,"x":84,"y":0,"pixelRatio":1,"visible":true},"castle-15":{"width":21,"height":21,"x":105,"y":0,"pixelRatio":1,"visible":true},"cemetery-15":{"width":21,"height":21,"x":126,"y":0,"pixelRatio":1,"visible":true},"cinema-15":{"width":21,"height":21,"x":147,"y":0,"pixelRatio":1,"visible":true},"circle-15":{"width":21,"height":21,"x":84,"y":21,"pixelRatio":1,"visible":true},"circle-stroked-15":{"width":21,"height":21,"x":105,"y":21,"pixelRatio":1,"visible":true},"clothing-store-15":{"width":21,"height":21,"x":126,"y":21,"pixelRatio":1,"visible":true},"college-15":{"width":21,"height":21,"x":147,"y":21,"pixelRatio":1,"visible":true},"dentist-15":{"width":21,"height":21,"x":84,"y":42,"pixelRatio":1,"visible":true},"doctor-15":{"width":21,"height":21,"x":105,"y":42,"pixelRatio":1,"visible":true},"dog-park-15":{"width":21,"height":21,"x":126,"y":42,"pixelRatio":1,"visible":true},"drinking-water-15":{"width":21,"height":21,"x":147,"y":42,"pixelRatio":1,"visible":true},"embassy-15":{"width":21,"height":21,"x":84,"y":63,"pixelRatio":1,"visible":true},"entrance-15":{"width":21,"height":21,"x":105,"y":63,"pixelRatio":1,"visible":true},"fast-food-15":{"width":21,"height":21,"x":126,"y":63,"pixelRatio":1,"visible":true},"ferry-15":{"width":21,"height":21,"x":147,"y":63,"pixelRatio":1,"visible":true},"fire-station-15":{"width":21,"height":21,"x":0,"y":84,"pixelRatio":1,"visible":true},"fuel-15":{"width":21,"height":21,"x":21,"y":84,"pixelRatio":1,"visible":true},"garden-15":{"width":21,"height":21,"x":42,"y":84,"pixelRatio":1,"visible":true},"golf-15":{"width":21,"height":21,"x":63,"y":84,"pixelRatio":1,"visible":true},"grocery-15":{"width":21,"height":21,"x":84,"y":84,"pixelRatio":1,"visible":true},"harbor-15":{"width":21,"height":21,"x":105,"y":84,"pixelRatio":1,"visible":true},"heliport-15":{"width":21,"height":21,"x":126,"y":84,"pixelRatio":1,"visible":true},"hospital-15":{"width":21,"height":21,"x":147,"y":84,"pixelRatio":1,"visible":true},"ice-cream-15":{"width":21,"height":21,"x":0,"y":105,"pixelRatio":1,"visible":true},"information-15":{"width":21,"height":21,"x":21,"y":105,"pixelRatio":1,"visible":true},"laundry-15":{"width":21,"height":21,"x":42,"y":105,"pixelRatio":1,"visible":true},"library-15":{"width":21,"height":21,"x":63,"y":105,"pixelRatio":1,"visible":true},"lodging-15":{"width":21,"height":21,"x":84,"y":105,"pixelRatio":1,"visible":true},"marker-15":{"width":21,"height":21,"x":105,"y":105,"pixelRatio":1,"visible":true},"monument-15":{"width":21,"height":21,"x":126,"y":105,"pixelRatio":1,"visible":true},"mountain-15":{"width":21,"height":21,"x":147,"y":105,"pixelRatio":1,"visible":true},"museum-15":{"width":21,"height":21,"x":0,"y":126,"pixelRatio":1,"visible":true},"music-15":{"width":21,"height":21,"x":21,"y":126,"pixelRatio":1,"visible":true},"park-15":{"width":21,"height":21,"x":42,"y":126,"pixelRatio":1,"visible":true},"pharmacy-15":{"width":21,"height":21,"x":63,"y":126,"pixelRatio":1,"visible":true},"picnic-site-15":{"width":21,"height":21,"x":84,"y":126,"pixelRatio":1,"visible":true},"place-of-worship-15":{"width":21,"height":21,"x":105,"y":126,"pixelRatio":1,"visible":true},"playground-15":{"width":21,"height":21,"x":126,"y":126,"pixelRatio":1,"visible":true},"police-15":{"width":21,"height":21,"x":147,"y":126,"pixelRatio":1,"visible":true},"post-15":{"width":21,"height":21,"x":0,"y":147,"pixelRatio":1,"visible":true},"prison-15":{"width":21,"height":21,"x":21,"y":147,"pixelRatio":1,"visible":true},"rail-15":{"width":21,"height":21,"x":42,"y":147,"pixelRatio":1,"visible":true},"rail-light-15":{"width":21,"height":21,"x":63,"y":147,"pixelRatio":1,"visible":true},"rail-metro-15":{"width":21,"height":21,"x":84,"y":147,"pixelRatio":1,"visible":true},"religious-christian-15":{"width":21,"height":21,"x":105,"y":147,"pixelRatio":1,"visible":true},"religious-jewish-15":{"width":21,"height":21,"x":126,"y":147,"pixelRatio":1,"visible":true},"religious-muslim-15":{"width":21,"height":21,"x":147,"y":147,"pixelRatio":1,"visible":true},"restaurant-15":{"width":21,"height":21,"x":168,"y":0,"pixelRatio":1,"visible":true},"rocket-15":{"width":21,"height":21,"x":189,"y":0,"pixelRatio":1,"visible":true},"school-15":{"width":21,"height":21,"x":210,"y":0,"pixelRatio":1,"visible":true},"shop-15":{"width":21,"height":21,"x":231,"y":0,"pixelRatio":1,"visible":true},"stadium-15":{"width":21,"height":21,"x":252,"y":0,"pixelRatio":1,"visible":true},"star-15":{"width":21,"height":21,"x":273,"y":0,"pixelRatio":1,"visible":true},"suitcase-15":{"width":21,"height":21,"x":294,"y":0,"pixelRatio":1,"visible":true},"swimming-15":{"width":21,"height":21,"x":315,"y":0,"pixelRatio":1,"visible":true},"theatre-15":{"width":21,"height":21,"x":168,"y":21,"pixelRatio":1,"visible":true},"toilet-15":{"width":21,"height":21,"x":189,"y":21,"pixelRatio":1,"visible":true},"town-hall-15":{"width":21,"height":21,"x":210,"y":21,"pixelRatio":1,"visible":true},"triangle-15":{"width":21,"height":21,"x":231,"y":21,"pixelRatio":1,"visible":true},"triangle-stroked-15":{"width":21,"height":21,"x":252,"y":21,"pixelRatio":1,"visible":true},"veterinary-15":{"width":21,"height":21,"x":273,"y":21,"pixelRatio":1,"visible":true},"volcano-15":{"width":21,"height":21,"x":294,"y":21,"pixelRatio":1,"visible":true},"zoo-15":{"width":21,"height":21,"x":315,"y":21,"pixelRatio":1,"visible":true},"motorway_1":{"width":18,"height":18,"x":168,"y":42,"pixelRatio":1,"visible":true},"motorway_2":{"width":25,"height":18,"x":186,"y":42,"pixelRatio":1,"visible":true},"motorway_3":{"width":32,"height":18,"x":211,"y":42,"pixelRatio":1,"visible":true},"motorway_4":{"width":39,"height":18,"x":243,"y":42,"pixelRatio":1,"visible":true},"motorway_5":{"width":45,"height":18,"x":282,"y":42,"pixelRatio":1,"visible":true},"motorway_6":{"width":50,"height":18,"x":168,"y":63,"pixelRatio":1,"visible":true},"airfield-11":{"width":17,"height":17,"x":218,"y":63,"pixelRatio":1,"visible":true},"airport-11":{"width":17,"height":17,"x":235,"y":63,"pixelRatio":1,"visible":true},"alcohol-shop-11":{"width":17,"height":17,"x":252,"y":63,"pixelRatio":1,"visible":true},"amusement-park-11":{"width":17,"height":17,"x":269,"y":63,"pixelRatio":1,"visible":true},"aquarium-11":{"width":17,"height":17,"x":286,"y":63,"pixelRatio":1,"visible":true},"art-gallery-11":{"width":17,"height":17,"x":303,"y":63,"pixelRatio":1,"visible":true},"attraction-11":{"width":17,"height":17,"x":168,"y":84,"pixelRatio":1,"visible":true},"bakery-11":{"width":17,"height":17,"x":185,"y":84,"pixelRatio":1,"visible":true},"bank-11":{"width":17,"height":17,"x":202,"y":84,"pixelRatio":1,"visible":true},"bar-11":{"width":17,"height":17,"x":219,"y":84,"pixelRatio":1,"visible":true},"beer-11":{"width":17,"height":17,"x":236,"y":84,"pixelRatio":1,"visible":true},"bicycle-11":{"width":17,"height":17,"x":253,"y":84,"pixelRatio":1,"visible":true},"bicycle-share-11":{"width":17,"height":17,"x":270,"y":84,"pixelRatio":1,"visible":true},"bus-11":{"width":17,"height":17,"x":287,"y":84,"pixelRatio":1,"visible":true},"cafe-11":{"width":17,"height":17,"x":304,"y":84,"pixelRatio":1,"visible":true},"campsite-11":{"width":17,"height":17,"x":168,"y":105,"pixelRatio":1,"visible":true},"car-11":{"width":17,"height":17,"x":185,"y":105,"pixelRatio":1,"visible":true},"castle-11":{"width":17,"height":17,"x":202,"y":105,"pixelRatio":1,"visible":true},"cemetery-11":{"width":17,"height":17,"x":219,"y":105,"pixelRatio":1,"visible":true},"cinema-11":{"width":17,"height":17,"x":236,"y":105,"pixelRatio":1,"visible":true},"circle-11":{"width":17,"height":17,"x":253,"y":105,"pixelRatio":1,"visible":true},"circle-stroked-11":{"width":17,"height":17,"x":270,"y":105,"pixelRatio":1,"visible":true},"clothing-store-11":{"width":17,"height":17,"x":287,"y":105,"pixelRatio":1,"visible":true},"college-11":{"width":17,"height":17,"x":304,"y":105,"pixelRatio":1,"visible":true},"dentist-11":{"width":17,"height":17,"x":168,"y":126,"pixelRatio":1,"visible":true},"doctor-11":{"width":17,"height":17,"x":185,"y":126,"pixelRatio":1,"visible":true},"dog-park-11":{"width":17,"height":17,"x":202,"y":126,"pixelRatio":1,"visible":true},"drinking-water-11":{"width":17,"height":17,"x":219,"y":126,"pixelRatio":1,"visible":true},"embassy-11":{"width":17,"height":17,"x":236,"y":126,"pixelRatio":1,"visible":true},"entrance-11":{"width":17,"height":17,"x":253,"y":126,"pixelRatio":1,"visible":true},"fast-food-11":{"width":17,"height":17,"x":270,"y":126,"pixelRatio":1,"visible":true},"ferry-11":{"width":17,"height":17,"x":287,"y":126,"pixelRatio":1,"visible":true},"fire-station-11":{"width":17,"height":17,"x":304,"y":126,"pixelRatio":1,"visible":true},"fuel-11":{"width":17,"height":17,"x":168,"y":147,"pixelRatio":1,"visible":true},"garden-11":{"width":17,"height":17,"x":185,"y":147,"pixelRatio":1,"visible":true},"golf-11":{"width":17,"height":17,"x":202,"y":147,"pixelRatio":1,"visible":true},"grocery-11":{"width":17,"height":17,"x":219,"y":147,"pixelRatio":1,"visible":true},"harbor-11":{"width":17,"height":17,"x":236,"y":147,"pixelRatio":1,"visible":true},"heliport-11":{"width":17,"height":17,"x":253,"y":147,"pixelRatio":1,"visible":true},"hospital-11":{"width":17,"height":17,"x":270,"y":147,"pixelRatio":1,"visible":true},"ice-cream-11":{"width":17,"height":17,"x":287,"y":147,"pixelRatio":1,"visible":true},"information-11":{"width":17,"height":17,"x":304,"y":147,"pixelRatio":1,"visible":true},"laundry-11":{"width":17,"height":17,"x":0,"y":168,"pixelRatio":1,"visible":true},"library-11":{"width":17,"height":17,"x":17,"y":168,"pixelRatio":1,"visible":true},"lodging-11":{"width":17,"height":17,"x":34,"y":168,"pixelRatio":1,"visible":true},"marker-11":{"width":17,"height":17,"x":51,"y":168,"pixelRatio":1,"visible":true},"monument-11":{"width":17,"height":17,"x":68,"y":168,"pixelRatio":1,"visible":true},"mountain-11":{"width":17,"height":17,"x":85,"y":168,"pixelRatio":1,"visible":true},"museum-11":{"width":17,"height":17,"x":102,"y":168,"pixelRatio":1,"visible":true},"music-11":{"width":17,"height":17,"x":119,"y":168,"pixelRatio":1,"visible":true},"park-11":{"width":17,"height":17,"x":136,"y":168,"pixelRatio":1,"visible":true},"pharmacy-11":{"width":17,"height":17,"x":153,"y":168,"pixelRatio":1,"visible":true},"picnic-site-11":{"width":17,"height":17,"x":170,"y":168,"pixelRatio":1,"visible":true},"place-of-worship-11":{"width":17,"height":17,"x":187,"y":168,"pixelRatio":1,"visible":true},"playground-11":{"width":17,"height":17,"x":204,"y":168,"pixelRatio":1,"visible":true},"police-11":{"width":17,"height":17,"x":221,"y":168,"pixelRatio":1,"visible":true},"post-11":{"width":17,"height":17,"x":238,"y":168,"pixelRatio":1,"visible":true},"prison-11":{"width":17,"height":17,"x":255,"y":168,"pixelRatio":1,"visible":true},"rail-11":{"width":17,"height":17,"x":272,"y":168,"pixelRatio":1,"visible":true},"rail-light-11":{"width":17,"height":17,"x":289,"y":168,"pixelRatio":1,"visible":true},"rail-metro-11":{"width":17,"height":17,"x":306,"y":168,"pixelRatio":1,"visible":true},"religious-christian-11":{"width":17,"height":17,"x":0,"y":185,"pixelRatio":1,"visible":true},"religious-jewish-11":{"width":17,"height":17,"x":17,"y":185,"pixelRatio":1,"visible":true},"religious-muslim-11":{"width":17,"height":17,"x":34,"y":185,"pixelRatio":1,"visible":true},"restaurant-11":{"width":17,"height":17,"x":51,"y":185,"pixelRatio":1,"visible":true},"rocket-11":{"width":17,"height":17,"x":68,"y":185,"pixelRatio":1,"visible":true},"school-11":{"width":17,"height":17,"x":85,"y":185,"pixelRatio":1,"visible":true},"shop-11":{"width":17,"height":17,"x":102,"y":185,"pixelRatio":1,"visible":true},"stadium-11":{"width":17,"height":17,"x":119,"y":185,"pixelRatio":1,"visible":true},"star-11":{"width":17,"height":17,"x":136,"y":185,"pixelRatio":1,"visible":true},"suitcase-11":{"width":17,"height":17,"x":153,"y":185,"pixelRatio":1,"visible":true},"swimming-11":{"width":17,"height":17,"x":170,"y":185,"pixelRatio":1,"visible":true},"theatre-11":{"width":17,"height":17,"x":187,"y":185,"pixelRatio":1,"visible":true},"toilet-11":{"width":17,"height":17,"x":204,"y":185,"pixelRatio":1,"visible":true},"town-hall-11":{"width":17,"height":17,"x":221,"y":185,"pixelRatio":1,"visible":true},"triangle-11":{"width":17,"height":17,"x":238,"y":185,"pixelRatio":1,"visible":true},"triangle-stroked-11":{"width":17,"height":17,"x":255,"y":185,"pixelRatio":1,"visible":true},"veterinary-11":{"width":17,"height":17,"x":272,"y":185,"pixelRatio":1,"visible":true},"volcano-11":{"width":17,"height":17,"x":289,"y":185,"pixelRatio":1,"visible":true},"zoo-11":{"width":17,"height":17,"x":306,"y":185,"pixelRatio":1,"visible":true},"wave":{"width":16,"height":8,"x":320,"y":63,"pixelRatio":1,"visible":true}} \ No newline at end of file diff --git a/metrics/integration/sprites/mapbox/bright-v9.png b/metrics/integration/sprites/mapbox/bright-v9.png new file mode 100644 index 00000000000..04660096671 Binary files /dev/null and b/metrics/integration/sprites/mapbox/bright-v9.png differ diff --git a/metrics/integration/sprites/mapbox/satellite-v9.json b/metrics/integration/sprites/mapbox/satellite-v9.json new file mode 100644 index 00000000000..fee6ff02e34 --- /dev/null +++ b/metrics/integration/sprites/mapbox/satellite-v9.json @@ -0,0 +1 @@ +{"alcohol-shop-15":{"width":23,"height":23,"x":0,"y":0,"pixelRatio":1,"visible":true},"amusement-park-15":{"width":23,"height":23,"x":23,"y":0,"pixelRatio":1,"visible":true},"aquarium-15":{"width":23,"height":23,"x":0,"y":23,"pixelRatio":1,"visible":true},"art-gallery-15":{"width":23,"height":23,"x":23,"y":23,"pixelRatio":1,"visible":true},"attraction-15":{"width":23,"height":23,"x":46,"y":0,"pixelRatio":1,"visible":true},"bank-15":{"width":23,"height":23,"x":69,"y":0,"pixelRatio":1,"visible":true},"bicycle-15":{"width":23,"height":23,"x":46,"y":23,"pixelRatio":1,"visible":true},"bicycle-share-15":{"width":23,"height":23,"x":69,"y":23,"pixelRatio":1,"visible":true},"car-15":{"width":23,"height":23,"x":0,"y":46,"pixelRatio":1,"visible":true},"castle-15":{"width":23,"height":23,"x":23,"y":46,"pixelRatio":1,"visible":true},"cinema-15":{"width":23,"height":23,"x":46,"y":46,"pixelRatio":1,"visible":true},"circle-15":{"width":23,"height":23,"x":69,"y":46,"pixelRatio":1,"visible":true},"circle-stroked-15":{"width":23,"height":23,"x":0,"y":69,"pixelRatio":1,"visible":true},"clothing-store-15":{"width":23,"height":23,"x":23,"y":69,"pixelRatio":1,"visible":true},"drinking-water-15":{"width":23,"height":23,"x":46,"y":69,"pixelRatio":1,"visible":true},"embassy-15":{"width":23,"height":23,"x":69,"y":69,"pixelRatio":1,"visible":true},"fire-station-15":{"width":23,"height":23,"x":92,"y":0,"pixelRatio":1,"visible":true},"fuel-15":{"width":23,"height":23,"x":115,"y":0,"pixelRatio":1,"visible":true},"grocery-15":{"width":23,"height":23,"x":138,"y":0,"pixelRatio":1,"visible":true},"harbor-15":{"width":23,"height":23,"x":161,"y":0,"pixelRatio":1,"visible":true},"information-15":{"width":23,"height":23,"x":92,"y":23,"pixelRatio":1,"visible":true},"laundry-15":{"width":23,"height":23,"x":115,"y":23,"pixelRatio":1,"visible":true},"library-15":{"width":23,"height":23,"x":138,"y":23,"pixelRatio":1,"visible":true},"lodging-15":{"width":23,"height":23,"x":161,"y":23,"pixelRatio":1,"visible":true},"monument-15":{"width":23,"height":23,"x":92,"y":46,"pixelRatio":1,"visible":true},"museum-15":{"width":23,"height":23,"x":115,"y":46,"pixelRatio":1,"visible":true},"music-15":{"width":23,"height":23,"x":138,"y":46,"pixelRatio":1,"visible":true},"place-of-worship-15":{"width":23,"height":23,"x":161,"y":46,"pixelRatio":1,"visible":true},"police-15":{"width":23,"height":23,"x":92,"y":69,"pixelRatio":1,"visible":true},"post-15":{"width":23,"height":23,"x":115,"y":69,"pixelRatio":1,"visible":true},"prison-15":{"width":23,"height":23,"x":138,"y":69,"pixelRatio":1,"visible":true},"religious-christian-15":{"width":23,"height":23,"x":161,"y":69,"pixelRatio":1,"visible":true},"religious-jewish-15":{"width":23,"height":23,"x":0,"y":92,"pixelRatio":1,"visible":true},"religious-muslim-15":{"width":23,"height":23,"x":23,"y":92,"pixelRatio":1,"visible":true},"shop-15":{"width":23,"height":23,"x":46,"y":92,"pixelRatio":1,"visible":true},"stadium-15":{"width":23,"height":23,"x":69,"y":92,"pixelRatio":1,"visible":true},"star-15":{"width":23,"height":23,"x":92,"y":92,"pixelRatio":1,"visible":true},"suitcase-15":{"width":23,"height":23,"x":115,"y":92,"pixelRatio":1,"visible":true},"swimming-15":{"width":23,"height":23,"x":138,"y":92,"pixelRatio":1,"visible":true},"theatre-15":{"width":23,"height":23,"x":161,"y":92,"pixelRatio":1,"visible":true},"toilet-15":{"width":23,"height":23,"x":0,"y":115,"pixelRatio":1,"visible":true},"town-hall-15":{"width":23,"height":23,"x":23,"y":115,"pixelRatio":1,"visible":true},"triangle-15":{"width":23,"height":23,"x":46,"y":115,"pixelRatio":1,"visible":true},"triangle-stroked-15":{"width":23,"height":23,"x":69,"y":115,"pixelRatio":1,"visible":true},"veterinary-15":{"width":23,"height":23,"x":92,"y":115,"pixelRatio":1,"visible":true},"airfield-15":{"width":21,"height":21,"x":115,"y":115,"pixelRatio":1,"visible":true},"airport-15":{"width":21,"height":21,"x":136,"y":115,"pixelRatio":1,"visible":true},"bus-15":{"width":21,"height":21,"x":157,"y":115,"pixelRatio":1,"visible":true},"entrance-15":{"width":21,"height":21,"x":0,"y":138,"pixelRatio":1,"visible":true},"ferry-15":{"width":21,"height":21,"x":21,"y":138,"pixelRatio":1,"visible":true},"heliport-15":{"width":21,"height":21,"x":42,"y":138,"pixelRatio":1,"visible":true},"rail-15":{"width":21,"height":21,"x":63,"y":138,"pixelRatio":1,"visible":true},"rail-light-15":{"width":21,"height":21,"x":84,"y":138,"pixelRatio":1,"visible":true},"rail-metro-15":{"width":21,"height":21,"x":105,"y":138,"pixelRatio":1,"visible":true},"rocket-15":{"width":21,"height":21,"x":126,"y":138,"pixelRatio":1,"visible":true},"alcohol-shop-11":{"width":19,"height":19,"x":147,"y":138,"pixelRatio":1,"visible":true},"amusement-park-11":{"width":19,"height":19,"x":0,"y":159,"pixelRatio":1,"visible":true},"aquarium-11":{"width":19,"height":19,"x":19,"y":159,"pixelRatio":1,"visible":true},"art-gallery-11":{"width":19,"height":19,"x":38,"y":159,"pixelRatio":1,"visible":true},"attraction-11":{"width":19,"height":19,"x":57,"y":159,"pixelRatio":1,"visible":true},"bakery-15":{"width":19,"height":19,"x":76,"y":159,"pixelRatio":1,"visible":true},"bank-11":{"width":19,"height":19,"x":95,"y":159,"pixelRatio":1,"visible":true},"bar-15":{"width":19,"height":19,"x":114,"y":159,"pixelRatio":1,"visible":true},"beer-15":{"width":19,"height":19,"x":133,"y":159,"pixelRatio":1,"visible":true},"bicycle-11":{"width":19,"height":19,"x":152,"y":159,"pixelRatio":1,"visible":true},"bicycle-share-11":{"width":19,"height":19,"x":171,"y":159,"pixelRatio":1,"visible":true},"cafe-15":{"width":19,"height":19,"x":190,"y":159,"pixelRatio":1,"visible":true},"campsite-15":{"width":19,"height":19,"x":209,"y":159,"pixelRatio":1,"visible":true},"car-11":{"width":19,"height":19,"x":228,"y":159,"pixelRatio":1,"visible":true},"castle-11":{"width":19,"height":19,"x":247,"y":159,"pixelRatio":1,"visible":true},"cemetery-15":{"width":19,"height":19,"x":266,"y":159,"pixelRatio":1,"visible":true},"cinema-11":{"width":19,"height":19,"x":285,"y":159,"pixelRatio":1,"visible":true},"circle-11":{"width":19,"height":19,"x":304,"y":159,"pixelRatio":1,"visible":true},"circle-stroked-11":{"width":19,"height":19,"x":323,"y":159,"pixelRatio":1,"visible":true},"clothing-store-11":{"width":19,"height":19,"x":342,"y":159,"pixelRatio":1,"visible":true},"college-15":{"width":19,"height":19,"x":166,"y":138,"pixelRatio":1,"visible":true},"dentist-15":{"width":19,"height":19,"x":185,"y":138,"pixelRatio":1,"visible":true},"doctor-15":{"width":19,"height":19,"x":204,"y":138,"pixelRatio":1,"visible":true},"dog-park-15":{"width":19,"height":19,"x":223,"y":138,"pixelRatio":1,"visible":true},"drinking-water-11":{"width":19,"height":19,"x":242,"y":138,"pixelRatio":1,"visible":true},"embassy-11":{"width":19,"height":19,"x":261,"y":138,"pixelRatio":1,"visible":true},"fast-food-15":{"width":19,"height":19,"x":280,"y":138,"pixelRatio":1,"visible":true},"fire-station-11":{"width":19,"height":19,"x":299,"y":138,"pixelRatio":1,"visible":true},"fuel-11":{"width":19,"height":19,"x":318,"y":138,"pixelRatio":1,"visible":true},"garden-15":{"width":19,"height":19,"x":337,"y":138,"pixelRatio":1,"visible":true},"golf-15":{"width":19,"height":19,"x":184,"y":0,"pixelRatio":1,"visible":true},"grocery-11":{"width":19,"height":19,"x":203,"y":0,"pixelRatio":1,"visible":true},"harbor-11":{"width":19,"height":19,"x":222,"y":0,"pixelRatio":1,"visible":true},"hospital-15":{"width":19,"height":19,"x":241,"y":0,"pixelRatio":1,"visible":true},"ice-cream-15":{"width":19,"height":19,"x":260,"y":0,"pixelRatio":1,"visible":true},"information-11":{"width":19,"height":19,"x":279,"y":0,"pixelRatio":1,"visible":true},"laundry-11":{"width":19,"height":19,"x":298,"y":0,"pixelRatio":1,"visible":true},"library-11":{"width":19,"height":19,"x":317,"y":0,"pixelRatio":1,"visible":true},"lodging-11":{"width":19,"height":19,"x":336,"y":0,"pixelRatio":1,"visible":true},"monument-11":{"width":19,"height":19,"x":184,"y":23,"pixelRatio":1,"visible":true},"mountain-15":{"width":19,"height":19,"x":203,"y":23,"pixelRatio":1,"visible":true},"museum-11":{"width":19,"height":19,"x":222,"y":23,"pixelRatio":1,"visible":true},"music-11":{"width":19,"height":19,"x":241,"y":23,"pixelRatio":1,"visible":true},"park-15":{"width":19,"height":19,"x":260,"y":23,"pixelRatio":1,"visible":true},"pharmacy-15":{"width":19,"height":19,"x":279,"y":23,"pixelRatio":1,"visible":true},"picnic-site-15":{"width":19,"height":19,"x":298,"y":23,"pixelRatio":1,"visible":true},"place-of-worship-11":{"width":19,"height":19,"x":317,"y":23,"pixelRatio":1,"visible":true},"playground-15":{"width":19,"height":19,"x":336,"y":23,"pixelRatio":1,"visible":true},"police-11":{"width":19,"height":19,"x":184,"y":46,"pixelRatio":1,"visible":true},"post-11":{"width":19,"height":19,"x":203,"y":46,"pixelRatio":1,"visible":true},"prison-11":{"width":19,"height":19,"x":222,"y":46,"pixelRatio":1,"visible":true},"religious-christian-11":{"width":19,"height":19,"x":241,"y":46,"pixelRatio":1,"visible":true},"religious-jewish-11":{"width":19,"height":19,"x":260,"y":46,"pixelRatio":1,"visible":true},"religious-muslim-11":{"width":19,"height":19,"x":279,"y":46,"pixelRatio":1,"visible":true},"restaurant-15":{"width":19,"height":19,"x":298,"y":46,"pixelRatio":1,"visible":true},"school-15":{"width":19,"height":19,"x":317,"y":46,"pixelRatio":1,"visible":true},"shop-11":{"width":19,"height":19,"x":336,"y":46,"pixelRatio":1,"visible":true},"stadium-11":{"width":19,"height":19,"x":184,"y":69,"pixelRatio":1,"visible":true},"star-11":{"width":19,"height":19,"x":203,"y":69,"pixelRatio":1,"visible":true},"suitcase-11":{"width":19,"height":19,"x":222,"y":69,"pixelRatio":1,"visible":true},"swimming-11":{"width":19,"height":19,"x":241,"y":69,"pixelRatio":1,"visible":true},"theatre-11":{"width":19,"height":19,"x":260,"y":69,"pixelRatio":1,"visible":true},"toilet-11":{"width":19,"height":19,"x":279,"y":69,"pixelRatio":1,"visible":true},"town-hall-11":{"width":19,"height":19,"x":298,"y":69,"pixelRatio":1,"visible":true},"triangle-11":{"width":19,"height":19,"x":317,"y":69,"pixelRatio":1,"visible":true},"triangle-stroked-11":{"width":19,"height":19,"x":336,"y":69,"pixelRatio":1,"visible":true},"veterinary-11":{"width":19,"height":19,"x":184,"y":92,"pixelRatio":1,"visible":true},"volcano-15":{"width":19,"height":19,"x":203,"y":92,"pixelRatio":1,"visible":true},"zoo-15":{"width":19,"height":19,"x":222,"y":92,"pixelRatio":1,"visible":true},"airfield-11":{"width":17,"height":17,"x":241,"y":92,"pixelRatio":1,"visible":true},"airport-11":{"width":17,"height":17,"x":258,"y":92,"pixelRatio":1,"visible":true},"bus-11":{"width":17,"height":17,"x":275,"y":92,"pixelRatio":1,"visible":true},"entrance-11":{"width":17,"height":17,"x":292,"y":92,"pixelRatio":1,"visible":true},"ferry-11":{"width":17,"height":17,"x":309,"y":92,"pixelRatio":1,"visible":true},"heliport-11":{"width":17,"height":17,"x":326,"y":92,"pixelRatio":1,"visible":true},"rail-11":{"width":17,"height":17,"x":343,"y":92,"pixelRatio":1,"visible":true},"rail-light-11":{"width":17,"height":17,"x":178,"y":115,"pixelRatio":1,"visible":true},"rail-metro-11":{"width":17,"height":17,"x":195,"y":115,"pixelRatio":1,"visible":true},"rocket-11":{"width":17,"height":17,"x":212,"y":115,"pixelRatio":1,"visible":true},"bakery-11":{"width":15,"height":15,"x":229,"y":115,"pixelRatio":1,"visible":true},"bar-11":{"width":15,"height":15,"x":244,"y":115,"pixelRatio":1,"visible":true},"beer-11":{"width":15,"height":15,"x":259,"y":115,"pixelRatio":1,"visible":true},"cafe-11":{"width":15,"height":15,"x":274,"y":115,"pixelRatio":1,"visible":true},"campsite-11":{"width":15,"height":15,"x":289,"y":115,"pixelRatio":1,"visible":true},"cemetery-11":{"width":15,"height":15,"x":304,"y":115,"pixelRatio":1,"visible":true},"college-11":{"width":15,"height":15,"x":319,"y":115,"pixelRatio":1,"visible":true},"dentist-11":{"width":15,"height":15,"x":334,"y":115,"pixelRatio":1,"visible":true},"doctor-11":{"width":15,"height":15,"x":349,"y":115,"pixelRatio":1,"visible":true},"dog-park-11":{"width":15,"height":15,"x":0,"y":178,"pixelRatio":1,"visible":true},"fast-food-11":{"width":15,"height":15,"x":15,"y":178,"pixelRatio":1,"visible":true},"garden-11":{"width":15,"height":15,"x":30,"y":178,"pixelRatio":1,"visible":true},"golf-11":{"width":15,"height":15,"x":45,"y":178,"pixelRatio":1,"visible":true},"hospital-11":{"width":15,"height":15,"x":60,"y":178,"pixelRatio":1,"visible":true},"ice-cream-11":{"width":15,"height":15,"x":75,"y":178,"pixelRatio":1,"visible":true},"mountain-11":{"width":15,"height":15,"x":90,"y":178,"pixelRatio":1,"visible":true},"park-11":{"width":15,"height":15,"x":105,"y":178,"pixelRatio":1,"visible":true},"pharmacy-11":{"width":15,"height":15,"x":120,"y":178,"pixelRatio":1,"visible":true},"picnic-site-11":{"width":15,"height":15,"x":135,"y":178,"pixelRatio":1,"visible":true},"playground-11":{"width":15,"height":15,"x":150,"y":178,"pixelRatio":1,"visible":true},"restaurant-11":{"width":15,"height":15,"x":165,"y":178,"pixelRatio":1,"visible":true},"school-11":{"width":15,"height":15,"x":180,"y":178,"pixelRatio":1,"visible":true},"volcano-11":{"width":15,"height":15,"x":195,"y":178,"pixelRatio":1,"visible":true},"zoo-11":{"width":15,"height":15,"x":210,"y":178,"pixelRatio":1,"visible":true}} \ No newline at end of file diff --git a/metrics/integration/sprites/mapbox/satellite-v9.png b/metrics/integration/sprites/mapbox/satellite-v9.png new file mode 100644 index 00000000000..8146ffad46b Binary files /dev/null and b/metrics/integration/sprites/mapbox/satellite-v9.png differ diff --git a/metrics/integration/sprites/solid-black.json b/metrics/integration/sprites/solid-black.json new file mode 100644 index 00000000000..61199f85b97 --- /dev/null +++ b/metrics/integration/sprites/solid-black.json @@ -0,0 +1,9 @@ +{ + "black": { + "width": 20, + "height": 56, + "x": 0, + "y": 0, + "pixelRatio": 1 + } +} \ No newline at end of file diff --git a/metrics/integration/sprites/solid-black.png b/metrics/integration/sprites/solid-black.png new file mode 100644 index 00000000000..a8a3b8fd989 Binary files /dev/null and b/metrics/integration/sprites/solid-black.png differ diff --git a/metrics/integration/sprites/sprite.json b/metrics/integration/sprites/sprite.json new file mode 100644 index 00000000000..e80b4daad68 --- /dev/null +++ b/metrics/integration/sprites/sprite.json @@ -0,0 +1,2994 @@ +{ + "wetland-17": { + "x": 0, + "y": 0, + "width": 256, + "height": 256, + "pixelRatio": 1, + "sdf": false + }, + "wetland-noveg-17": { + "x": 258, + "y": 0, + "width": 256, + "height": 256, + "pixelRatio": 1, + "sdf": false + }, + "wetland-noveg-16": { + "x": 0, + "y": 258, + "width": 128, + "height": 128, + "pixelRatio": 1, + "sdf": false + }, + "wetland-16": { + "x": 130, + "y": 258, + "width": 128, + "height": 128, + "pixelRatio": 1, + "sdf": false + }, + "park": { + "x": 260, + "y": 258, + "width": 64, + "height": 64, + "pixelRatio": 1, + "sdf": false + }, + "wetland-noveg-15": { + "x": 326, + "y": 258, + "width": 64, + "height": 64, + "pixelRatio": 1, + "sdf": false + }, + "park-z15": { + "x": 392, + "y": 258, + "width": 64, + "height": 64, + "pixelRatio": 1, + "sdf": false + }, + "wetland-15": { + "x": 0, + "y": 388, + "width": 64, + "height": 64, + "pixelRatio": 1, + "sdf": false + }, + "wetland-14": { + "x": 458, + "y": 258, + "width": 32, + "height": 32, + "pixelRatio": 1, + "sdf": false + }, + "wetland-noveg-14": { + "x": 260, + "y": 324, + "width": 32, + "height": 32, + "pixelRatio": 1, + "sdf": false + }, + "sand": { + "x": 294, + "y": 324, + "width": 32, + "height": 32, + "pixelRatio": 1, + "sdf": false + }, + "fav-bank-18": { + "x": 458, + "y": 292, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-bar-18": { + "x": 328, + "y": 324, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-baseball-18": { + "x": 358, + "y": 324, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-basketball-18": { + "x": 388, + "y": 324, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-beer-18": { + "x": 418, + "y": 324, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-bicycle-18": { + "x": 448, + "y": 324, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-building-18": { + "x": 478, + "y": 324, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-bus-18": { + "x": 260, + "y": 358, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-cafe-18": { + "x": 290, + "y": 358, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-camera-18": { + "x": 320, + "y": 358, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-campsite-18": { + "x": 350, + "y": 358, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-car-18": { + "x": 380, + "y": 358, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-cemetery-18": { + "x": 410, + "y": 358, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-chemist-18": { + "x": 440, + "y": 358, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-cinema-18": { + "x": 470, + "y": 358, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-circle-18": { + "x": 66, + "y": 388, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-circle-stroked-18": { + "x": 96, + "y": 388, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-city-18": { + "x": 126, + "y": 388, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-clothing-store-18": { + "x": 156, + "y": 388, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-college-18": { + "x": 186, + "y": 388, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-commercial-18": { + "x": 216, + "y": 388, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-cricket-18": { + "x": 246, + "y": 388, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-cross-18": { + "x": 276, + "y": 388, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-dam-18": { + "x": 306, + "y": 388, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-danger-18": { + "x": 336, + "y": 388, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-disability-18": { + "x": 366, + "y": 388, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-dog-park-18": { + "x": 396, + "y": 388, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-embassy-18": { + "x": 426, + "y": 388, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-emergency-telephone-18": { + "x": 456, + "y": 388, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-entrance-18": { + "x": 486, + "y": 388, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-farm-18": { + "x": 66, + "y": 418, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-fast-food-18": { + "x": 96, + "y": 418, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-ferry-18": { + "x": 126, + "y": 418, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-fire-station-18": { + "x": 156, + "y": 418, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-fuel-18": { + "x": 186, + "y": 418, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-garden-18": { + "x": 216, + "y": 418, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-golf-18": { + "x": 246, + "y": 418, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-grocery-18": { + "x": 276, + "y": 418, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-hairdresser-18": { + "x": 306, + "y": 418, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-harbor-18": { + "x": 336, + "y": 418, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-heart-18": { + "x": 366, + "y": 418, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-heliport-18": { + "x": 396, + "y": 418, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-hospital-18": { + "x": 426, + "y": 418, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-industrial-18": { + "x": 456, + "y": 418, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-land-use-18": { + "x": 486, + "y": 418, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "squares-18": { + "x": 0, + "y": 454, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-library-18": { + "x": 30, + "y": 454, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-lighthouse-18": { + "x": 60, + "y": 454, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-lodging-18": { + "x": 90, + "y": 454, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-logging-18": { + "x": 120, + "y": 454, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-london-underground-18": { + "x": 150, + "y": 454, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-marker-18": { + "x": 180, + "y": 454, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-marker-stroked-18": { + "x": 210, + "y": 454, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-minefield-18": { + "x": 240, + "y": 454, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-mobilephone-18": { + "x": 270, + "y": 454, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-monument-18": { + "x": 300, + "y": 454, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-museum-18": { + "x": 330, + "y": 454, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-music-18": { + "x": 360, + "y": 454, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-oil-well-18": { + "x": 390, + "y": 454, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-park-18": { + "x": 420, + "y": 454, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-park2-18": { + "x": 450, + "y": 454, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-parking-18": { + "x": 480, + "y": 454, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-parking-garage-18": { + "x": 0, + "y": 484, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-pharmacy-18": { + "x": 30, + "y": 484, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-pitch-18": { + "x": 60, + "y": 484, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-place-of-worship-18": { + "x": 90, + "y": 484, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-playground-18": { + "x": 120, + "y": 484, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-police-18": { + "x": 150, + "y": 484, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-polling-place-18": { + "x": 180, + "y": 484, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-post-18": { + "x": 210, + "y": 484, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-prison-18": { + "x": 240, + "y": 484, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-rail-18": { + "x": 270, + "y": 484, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-rail-above-18": { + "x": 300, + "y": 484, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-rail-light-18": { + "x": 330, + "y": 484, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-rail-metro-18": { + "x": 360, + "y": 484, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-rail-underground-18": { + "x": 390, + "y": 484, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-religious-christian-18": { + "x": 420, + "y": 484, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-religious-jewish-18": { + "x": 450, + "y": 484, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-religious-muslim-18": { + "x": 480, + "y": 484, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-restaurant-18": { + "x": 516, + "y": 0, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-roadblock-18": { + "x": 516, + "y": 30, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-rocket-18": { + "x": 516, + "y": 60, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-school-18": { + "x": 516, + "y": 90, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-scooter-18": { + "x": 516, + "y": 120, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-shop-18": { + "x": 516, + "y": 150, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-skiing-18": { + "x": 516, + "y": 180, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-slaughterhouse-18": { + "x": 516, + "y": 210, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-soccer-18": { + "x": 516, + "y": 240, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-square-18": { + "x": 516, + "y": 270, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-square-stroked-18": { + "x": 516, + "y": 300, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-star-18": { + "x": 516, + "y": 330, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-star-stroked-18": { + "x": 516, + "y": 360, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-suitcase-18": { + "x": 516, + "y": 390, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-swimming-18": { + "x": 516, + "y": 420, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-telephone-18": { + "x": 516, + "y": 450, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-tennis-18": { + "x": 516, + "y": 480, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-theatre-18": { + "x": 0, + "y": 514, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-toilets-18": { + "x": 30, + "y": 514, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-town-18": { + "x": 60, + "y": 514, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-town-hall-18": { + "x": 90, + "y": 514, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-triangle-18": { + "x": 120, + "y": 514, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-triangle-stroked-18": { + "x": 150, + "y": 514, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-village-18": { + "x": 180, + "y": 514, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-warehouse-18": { + "x": 210, + "y": 514, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-waste-basket-18": { + "x": 240, + "y": 514, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-water-18": { + "x": 270, + "y": 514, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-wetland-18": { + "x": 300, + "y": 514, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-zoo-18": { + "x": 330, + "y": 514, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-airfield-18": { + "x": 360, + "y": 514, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-airport-18": { + "x": 390, + "y": 514, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-alcohol-shop-18": { + "x": 420, + "y": 514, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-america-football-18": { + "x": 450, + "y": 514, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-art-gallery-18": { + "x": 480, + "y": 514, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "fav-bakery-18": { + "x": 510, + "y": 514, + "width": 28, + "height": 28, + "pixelRatio": 1, + "sdf": false + }, + "airfield-12": { + "x": 492, + "y": 258, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "camera-12": { + "x": 488, + "y": 292, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "campsite-12": { + "x": 546, + "y": 0, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "car-12": { + "x": 546, + "y": 24, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "cemetery-12": { + "x": 546, + "y": 48, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "chemist-12": { + "x": 546, + "y": 72, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "cinema-12": { + "x": 546, + "y": 96, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "circle-12": { + "x": 546, + "y": 120, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "circle-stroked-12": { + "x": 546, + "y": 144, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "city-12": { + "x": 546, + "y": 168, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "zoo-12": { + "x": 546, + "y": 192, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "alcohol-shop-12": { + "x": 546, + "y": 216, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "america-football-12": { + "x": 546, + "y": 240, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "clothing-store-12": { + "x": 546, + "y": 264, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "college-12": { + "x": 546, + "y": 288, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "commercial-12": { + "x": 546, + "y": 312, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "cricket-12": { + "x": 546, + "y": 336, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "cross-12": { + "x": 546, + "y": 360, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "dam-12": { + "x": 546, + "y": 384, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "danger-12": { + "x": 546, + "y": 408, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "disability-12": { + "x": 546, + "y": 432, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "dog-park-12": { + "x": 546, + "y": 456, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "art-gallery-12": { + "x": 546, + "y": 480, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "embassy-12": { + "x": 546, + "y": 504, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "emergency-telephone-12": { + "x": 0, + "y": 544, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "entrance-12": { + "x": 24, + "y": 544, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "farm-12": { + "x": 48, + "y": 544, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "fast-food-12": { + "x": 72, + "y": 544, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "bakery-12": { + "x": 96, + "y": 544, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "bank-12": { + "x": 120, + "y": 544, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "bar-12": { + "x": 144, + "y": 544, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "ferry-12": { + "x": 168, + "y": 544, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "fire-station-12": { + "x": 192, + "y": 544, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "fuel-12": { + "x": 216, + "y": 544, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "garden-12": { + "x": 240, + "y": 544, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "golf-12": { + "x": 264, + "y": 544, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "grocery-12": { + "x": 288, + "y": 544, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "hairdresser-12": { + "x": 312, + "y": 544, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "harbor-12": { + "x": 336, + "y": 544, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "heart-12": { + "x": 360, + "y": 544, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "heliport-12": { + "x": 384, + "y": 544, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "hospital-12": { + "x": 408, + "y": 544, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "industrial-12": { + "x": 432, + "y": 544, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "land-use-12": { + "x": 456, + "y": 544, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "laundry-12": { + "x": 480, + "y": 544, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "library-12": { + "x": 504, + "y": 544, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "lighthouse-12": { + "x": 528, + "y": 544, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "lodging-12": { + "x": 570, + "y": 0, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "logging-12": { + "x": 570, + "y": 24, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "london-underground-12": { + "x": 570, + "y": 48, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "marker-12": { + "x": 570, + "y": 72, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "marker-stroked-12": { + "x": 570, + "y": 96, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "minefield-12": { + "x": 570, + "y": 120, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "mobilephone-12": { + "x": 570, + "y": 144, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "monument-12": { + "x": 570, + "y": 168, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "baseball-12": { + "x": 570, + "y": 192, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "basketball-12": { + "x": 570, + "y": 216, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "beer-12": { + "x": 570, + "y": 240, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "bicycle-12": { + "x": 570, + "y": 264, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "wetland-12": { + "x": 570, + "y": 288, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "water-12": { + "x": 570, + "y": 312, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "waste-basket-12": { + "x": 570, + "y": 336, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "airport-12": { + "x": 570, + "y": 360, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "warehouse-12": { + "x": 570, + "y": 384, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "village-12": { + "x": 570, + "y": 408, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "triangle-stroked-12": { + "x": 570, + "y": 432, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "triangle-12": { + "x": 570, + "y": 456, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "museum-12": { + "x": 570, + "y": 480, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "music-12": { + "x": 570, + "y": 504, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-airfield-12": { + "x": 570, + "y": 528, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-airport-12": { + "x": 0, + "y": 568, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-alcohol-shop-12": { + "x": 24, + "y": 568, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-america-football-12": { + "x": 48, + "y": 568, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-art-gallery-12": { + "x": 72, + "y": 568, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-bakery-12": { + "x": 96, + "y": 568, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-bank-12": { + "x": 120, + "y": 568, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-bar-12": { + "x": 144, + "y": 568, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-baseball-12": { + "x": 168, + "y": 568, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-basketball-12": { + "x": 192, + "y": 568, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-beer-12": { + "x": 216, + "y": 568, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-bicycle-12": { + "x": 240, + "y": 568, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-building-12": { + "x": 264, + "y": 568, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-bus-12": { + "x": 288, + "y": 568, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-cafe-12": { + "x": 312, + "y": 568, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-camera-12": { + "x": 336, + "y": 568, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-campsite-12": { + "x": 360, + "y": 568, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-car-12": { + "x": 384, + "y": 568, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-cemetery-12": { + "x": 408, + "y": 568, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-chemist-12": { + "x": 432, + "y": 568, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-cinema-12": { + "x": 456, + "y": 568, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-circle-12": { + "x": 480, + "y": 568, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-circle-stroked-12": { + "x": 504, + "y": 568, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-city-12": { + "x": 528, + "y": 568, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-clothing-store-12": { + "x": 552, + "y": 568, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-college-12": { + "x": 594, + "y": 0, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-commercial-12": { + "x": 594, + "y": 24, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-cricket-12": { + "x": 594, + "y": 48, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-cross-12": { + "x": 594, + "y": 72, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-dam-12": { + "x": 594, + "y": 96, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-danger-12": { + "x": 594, + "y": 120, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-disability-12": { + "x": 594, + "y": 144, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-dog-park-12": { + "x": 594, + "y": 168, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-embassy-12": { + "x": 594, + "y": 192, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-emergency-telephone-12": { + "x": 594, + "y": 216, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-entrance-12": { + "x": 594, + "y": 240, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-farm-12": { + "x": 594, + "y": 264, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-fast-food-12": { + "x": 594, + "y": 288, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-ferry-12": { + "x": 594, + "y": 312, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-fire-station-12": { + "x": 594, + "y": 336, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-fuel-12": { + "x": 594, + "y": 360, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-garden-12": { + "x": 594, + "y": 384, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-golf-12": { + "x": 594, + "y": 408, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-grocery-12": { + "x": 594, + "y": 432, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-hairdresser-12": { + "x": 594, + "y": 456, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-harbor-12": { + "x": 594, + "y": 480, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-heart-12": { + "x": 594, + "y": 504, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-heliport-12": { + "x": 594, + "y": 528, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-hospital-12": { + "x": 594, + "y": 552, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-industrial-12": { + "x": 0, + "y": 592, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-land-use-12": { + "x": 24, + "y": 592, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-laundry-12": { + "x": 48, + "y": 592, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-library-12": { + "x": 72, + "y": 592, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-lighthouse-12": { + "x": 96, + "y": 592, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-lodging-12": { + "x": 120, + "y": 592, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-logging-12": { + "x": 144, + "y": 592, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-london-underground-12": { + "x": 168, + "y": 592, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-marker-12": { + "x": 192, + "y": 592, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-marker-stroked-12": { + "x": 216, + "y": 592, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-minefield-12": { + "x": 240, + "y": 592, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-mobilephone-12": { + "x": 264, + "y": 592, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-monument-12": { + "x": 288, + "y": 592, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-museum-12": { + "x": 312, + "y": 592, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-music-12": { + "x": 336, + "y": 592, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-oil-well-12": { + "x": 360, + "y": 592, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-park-12": { + "x": 384, + "y": 592, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-park2-12": { + "x": 408, + "y": 592, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-parking-12": { + "x": 432, + "y": 592, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-parking-garage-12": { + "x": 456, + "y": 592, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-pharmacy-12": { + "x": 480, + "y": 592, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-pitch-12": { + "x": 504, + "y": 592, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-place-of-worship-12": { + "x": 528, + "y": 592, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-playground-12": { + "x": 552, + "y": 592, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-police-12": { + "x": 576, + "y": 592, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-polling-place-12": { + "x": 618, + "y": 0, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-post-12": { + "x": 618, + "y": 24, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-prison-12": { + "x": 618, + "y": 48, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-rail-12": { + "x": 618, + "y": 72, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-rail-above-12": { + "x": 618, + "y": 96, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-rail-light-12": { + "x": 618, + "y": 120, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-rail-metro-12": { + "x": 618, + "y": 144, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-rail-underground-12": { + "x": 618, + "y": 168, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-religious-christian-12": { + "x": 618, + "y": 192, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-religious-jewish-12": { + "x": 618, + "y": 216, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-religious-muslim-12": { + "x": 618, + "y": 240, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-restaurant-12": { + "x": 618, + "y": 264, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-roadblock-12": { + "x": 618, + "y": 288, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-rocket-12": { + "x": 618, + "y": 312, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-school-12": { + "x": 618, + "y": 336, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-scooter-12": { + "x": 618, + "y": 360, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-shop-12": { + "x": 618, + "y": 384, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-skiing-12": { + "x": 618, + "y": 408, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-slaughterhouse-12": { + "x": 618, + "y": 432, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-soccer-12": { + "x": 618, + "y": 456, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-square-12": { + "x": 618, + "y": 480, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-square-stroked-12": { + "x": 618, + "y": 504, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-star-12": { + "x": 618, + "y": 528, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-star-stroked-12": { + "x": 618, + "y": 552, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-suitcase-12": { + "x": 618, + "y": 576, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-swimming-12": { + "x": 0, + "y": 616, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-telephone-12": { + "x": 24, + "y": 616, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-tennis-12": { + "x": 48, + "y": 616, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-theatre-12": { + "x": 72, + "y": 616, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-toilets-12": { + "x": 96, + "y": 616, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-town-12": { + "x": 120, + "y": 616, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-town-hall-12": { + "x": 144, + "y": 616, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-triangle-12": { + "x": 168, + "y": 616, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-triangle-stroked-12": { + "x": 192, + "y": 616, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-village-12": { + "x": 216, + "y": 616, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-warehouse-12": { + "x": 240, + "y": 616, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-waste-basket-12": { + "x": 264, + "y": 616, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-water-12": { + "x": 288, + "y": 616, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-wetland-12": { + "x": 312, + "y": 616, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "night-zoo-12": { + "x": 336, + "y": 616, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "oil-well-12": { + "x": 360, + "y": 616, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "town-hall-12": { + "x": 384, + "y": 616, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "park-12": { + "x": 408, + "y": 616, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "building-12": { + "x": 432, + "y": 616, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "bus-12": { + "x": 456, + "y": 616, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "park2-12": { + "x": 480, + "y": 616, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "parking-12": { + "x": 504, + "y": 616, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "parking-garage-12": { + "x": 528, + "y": 616, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "pharmacy-12": { + "x": 552, + "y": 616, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "pitch-12": { + "x": 576, + "y": 616, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "place-of-worship-12": { + "x": 600, + "y": 616, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "playground-12": { + "x": 642, + "y": 0, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "police-12": { + "x": 642, + "y": 24, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "polling-place-12": { + "x": 642, + "y": 48, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "post-12": { + "x": 642, + "y": 72, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "prison-12": { + "x": 642, + "y": 96, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "rail-12": { + "x": 642, + "y": 120, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "rail-above-12": { + "x": 642, + "y": 144, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "rail-light-12": { + "x": 642, + "y": 168, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "rail-metro-12": { + "x": 642, + "y": 192, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "rail-underground-12": { + "x": 642, + "y": 216, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "religious-christian-12": { + "x": 642, + "y": 240, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "religious-jewish-12": { + "x": 642, + "y": 264, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "religious-muslim-12": { + "x": 642, + "y": 288, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "restaurant-12": { + "x": 642, + "y": 312, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "roadblock-12": { + "x": 642, + "y": 336, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "rocket-12": { + "x": 642, + "y": 360, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "cafe-12": { + "x": 642, + "y": 384, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "school-12": { + "x": 642, + "y": 408, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "scooter-12": { + "x": 642, + "y": 432, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "shop-12": { + "x": 642, + "y": 456, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "skiing-12": { + "x": 642, + "y": 480, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "slaughterhouse-12": { + "x": 642, + "y": 504, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "soccer-12": { + "x": 642, + "y": 528, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "square-12": { + "x": 642, + "y": 552, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "square-stroked-12": { + "x": 642, + "y": 576, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "star-12": { + "x": 642, + "y": 600, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "star-stroked-12": { + "x": 0, + "y": 640, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "suitcase-12": { + "x": 24, + "y": 640, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "swimming-12": { + "x": 48, + "y": 640, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "telephone-12": { + "x": 72, + "y": 640, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "tennis-12": { + "x": 96, + "y": 640, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "theatre-12": { + "x": 120, + "y": 640, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "toilets-12": { + "x": 144, + "y": 640, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "town-12": { + "x": 168, + "y": 640, + "width": 22, + "height": 22, + "pixelRatio": 1, + "sdf": false + }, + "dot.sdf": { + "x": 192, + "y": 640, + "width": 19, + "height": 20, + "pixelRatio": 1, + "sdf": true + }, + "motorway_lg_4": { + "x": 213, + "y": 640, + "width": 32, + "height": 16, + "pixelRatio": 1, + "sdf": false + }, + "motorway_lg_6": { + "x": 247, + "y": 640, + "width": 42, + "height": 16, + "pixelRatio": 1, + "sdf": false + }, + "water": { + "x": 291, + "y": 640, + "width": 64, + "height": 16, + "pixelRatio": 1, + "sdf": false + }, + "motorway_lg_5": { + "x": 357, + "y": 640, + "width": 37, + "height": 16, + "pixelRatio": 1, + "sdf": false + }, + "wetland-13": { + "x": 552, + "y": 544, + "width": 16, + "height": 16, + "pixelRatio": 1, + "sdf": false + }, + "motorway_lg_3": { + "x": 396, + "y": 640, + "width": 27, + "height": 16, + "pixelRatio": 1, + "sdf": false + }, + "motorway_lg_2": { + "x": 425, + "y": 640, + "width": 22, + "height": 16, + "pixelRatio": 1, + "sdf": false + }, + "motorway_lg_1": { + "x": 449, + "y": 640, + "width": 17, + "height": 16, + "pixelRatio": 1, + "sdf": false + }, + "wetland-noveg-13": { + "x": 576, + "y": 568, + "width": 16, + "height": 16, + "pixelRatio": 1, + "sdf": false + }, + "motorway_sm_6": { + "x": 468, + "y": 640, + "width": 40, + "height": 13, + "pixelRatio": 1, + "sdf": false + }, + "motorway_sm_1": { + "x": 642, + "y": 624, + "width": 15, + "height": 13, + "pixelRatio": 1, + "sdf": false + }, + "motorway_sm_2": { + "x": 618, + "y": 600, + "width": 20, + "height": 13, + "pixelRatio": 1, + "sdf": false + }, + "motorway_sm_5": { + "x": 510, + "y": 640, + "width": 35, + "height": 13, + "pixelRatio": 1, + "sdf": false + }, + "cliff-lg": { + "x": 594, + "y": 576, + "width": 10, + "height": 13, + "pixelRatio": 1, + "sdf": false + }, + "motorway_sm_4": { + "x": 547, + "y": 640, + "width": 30, + "height": 13, + "pixelRatio": 1, + "sdf": false + }, + "motorway_sm_3": { + "x": 579, + "y": 640, + "width": 25, + "height": 13, + "pixelRatio": 1, + "sdf": false + }, + "wetland-noveg-12": { + "x": 570, + "y": 552, + "width": 12, + "height": 12, + "pixelRatio": 1, + "sdf": false + }, + "cliff-md": { + "x": 606, + "y": 576, + "width": 8, + "height": 7, + "pixelRatio": 1, + "sdf": false + }, + "cliff-sm": { + "x": 584, + "y": 552, + "width": 6, + "height": 5, + "pixelRatio": 1, + "sdf": false + }, + "oneway": { + "x": 546, + "y": 528, + "width": 18, + "height": 6, + "pixelRatio": 1, + "sdf": false + } +} \ No newline at end of file diff --git a/metrics/integration/sprites/sprite.png b/metrics/integration/sprites/sprite.png new file mode 100644 index 00000000000..8c27324fda0 Binary files /dev/null and b/metrics/integration/sprites/sprite.png differ diff --git a/metrics/integration/sprites/stretch.json b/metrics/integration/sprites/stretch.json new file mode 100644 index 00000000000..35b03bec863 --- /dev/null +++ b/metrics/integration/sprites/stretch.json @@ -0,0 +1,61 @@ +{ + "nine-part": { + "x": 0, + "y": 0, + "width": 40, + "height": 40, + "pixelRatio": 1, + "stretchX": [[10, 30]], + "stretchY": [[10, 30]], + "sdf": false + }, + "nine-part-content": { + "x": 0, + "y": 0, + "width": 40, + "height": 40, + "pixelRatio": 2, + "stretchX": [[10, 30]], + "stretchY": [[10, 30]], + "sdf": false, + "content": [10, 10, 30, 30] + }, + "fifteen-part": { + "x": 50, + "y": 0, + "width": 70, + "height": 40, + "pixelRatio": 1, + "stretchX": [[10, 30], [40, 60]], + "stretchY": [[10, 30]], + "sdf": false + }, + "three-part": { + "x": 150, + "y": 0, + "width": 60, + "height": 10, + "pixelRatio": 1, + "stretchX": [[20, 40]], + "sdf": false + }, + "two-part": { + "x": 250, + "y": 0, + "width": 30, + "height": 10, + "pixelRatio": 1, + "stretchX": [[10, 20]], + "sdf": false + }, + "nine-part-@2x": { + "x": 300, + "y": 0, + "width": 80, + "height": 80, + "pixelRatio": 2, + "stretchX": [[20, 60]], + "stretchY": [[20, 60]], + "sdf": false + } +} diff --git a/metrics/integration/sprites/stretch.png b/metrics/integration/sprites/stretch.png new file mode 100644 index 00000000000..36685591c28 Binary files /dev/null and b/metrics/integration/sprites/stretch.png differ diff --git a/metrics/integration/styles/bangkok.json b/metrics/integration/styles/bangkok.json new file mode 100644 index 00000000000..b91c10a1053 --- /dev/null +++ b/metrics/integration/styles/bangkok.json @@ -0,0 +1,976 @@ +{ + "version": 8, + "name": "Basic", + "metadata": { + "mapbox:autocomposite": true, + "mapbox:type": "template" + }, + "sources": { + "mapbox": { + "type": "vector", + "tiles": [ "local://mvt-fixtures/real-world/bangkok/{z}-{x}-{y}.mvt" ] + } + }, + "sprite": "mapbox://sprites/mapbox/basic-v9", + "glyphs": "mapbox://fonts/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "#dedede" + }, + "interactive": true + }, + { + "id": "landuse_overlay_national_park", + "type": "fill", + "source": "mapbox", + "source-layer": "landuse_overlay", + "filter": [ + "==", + "class", + "national_park" + ], + "paint": { + "fill-color": "#d2edae", + "fill-opacity": 0.75 + }, + "interactive": true + }, + { + "id": "landuse_park", + "type": "fill", + "source": "mapbox", + "source-layer": "landuse", + "filter": [ + "==", + "class", + "park" + ], + "paint": { + "fill-color": "#d2edae" + }, + "interactive": true + }, + { + "id": "waterway", + "type": "line", + "source": "mapbox", + "source-layer": "waterway", + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "in", + "class", + "river", + "canal" + ] + ], + "paint": { + "line-color": "#a0cfdf", + "line-width": { + "base": 1.4, + "stops": [ + [ + 8, + 0.5 + ], + [ + 20, + 15 + ] + ] + } + }, + "interactive": true + }, + { + "id": "water", + "type": "fill", + "source": "mapbox", + "source-layer": "water", + "paint": { + "fill-color": "#a0cfdf" + }, + "interactive": true + }, + { + "id": "building", + "type": "fill", + "source": "mapbox", + "source-layer": "building", + "paint": { + "fill-color": "#d6d6d6" + }, + "interactive": true + }, + { + "interactive": true, + "layout": { + "line-cap": "butt", + "line-join": "miter" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "in", + "class", + "motorway_link", + "street", + "street_limited", + "service", + "track", + "pedestrian", + "path", + "link" + ], + [ + "==", + "structure", + "tunnel" + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "tunnel_minor", + "paint": { + "line-color": "#efefef", + "line-width": { + "base": 1.55, + "stops": [ + [ + 4, + 0.25 + ], + [ + 20, + 30 + ] + ] + }, + "line-dasharray": [ + 0.36, + 0.18 + ] + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-cap": "butt", + "line-join": "miter" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "in", + "class", + "motorway", + "primary", + "secondary", + "tertiary", + "trunk" + ], + [ + "==", + "structure", + "tunnel" + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "tunnel_major", + "paint": { + "line-color": "#fff", + "line-width": { + "base": 1.4, + "stops": [ + [ + 6, + 0.5 + ], + [ + 20, + 30 + ] + ] + }, + "line-dasharray": [ + 0.28, + 0.14 + ] + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-cap": "round", + "line-join": "round" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "in", + "class", + "motorway_link", + "street", + "street_limited", + "service", + "track", + "pedestrian", + "path", + "link" + ], + [ + "in", + "structure", + "none", + "ford" + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "road_minor", + "paint": { + "line-color": "#efefef", + "line-width": { + "base": 1.55, + "stops": [ + [ + 4, + 0.25 + ], + [ + 20, + 30 + ] + ] + } + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-cap": "round", + "line-join": "round" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "in", + "class", + "motorway", + "primary", + "secondary", + "tertiary", + "trunk" + ], + [ + "in", + "structure", + "none", + "ford" + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "road_major", + "paint": { + "line-color": "#fff", + "line-width": { + "base": 1.4, + "stops": [ + [ + 6, + 0.5 + ], + [ + 20, + 30 + ] + ] + } + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-cap": "butt", + "line-join": "miter" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "in", + "class", + "motorway_link", + "street", + "street_limited", + "service", + "track", + "pedestrian", + "path", + "link" + ], + [ + "==", + "structure", + "bridge" + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "bridge_minor case", + "paint": { + "line-color": "#dedede", + "line-width": { + "base": 1.6, + "stops": [ + [ + 12, + 0.5 + ], + [ + 20, + 10 + ] + ] + }, + "line-gap-width": { + "base": 1.55, + "stops": [ + [ + 4, + 0.25 + ], + [ + 20, + 30 + ] + ] + } + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-cap": "butt", + "line-join": "miter" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "in", + "class", + "motorway", + "primary", + "secondary", + "tertiary", + "trunk" + ], + [ + "==", + "structure", + "bridge" + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "bridge_major case", + "paint": { + "line-color": "#dedede", + "line-width": { + "base": 1.6, + "stops": [ + [ + 12, + 0.5 + ], + [ + 20, + 10 + ] + ] + }, + "line-gap-width": { + "base": 1.55, + "stops": [ + [ + 4, + 0.25 + ], + [ + 20, + 30 + ] + ] + } + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-cap": "round", + "line-join": "round" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "in", + "class", + "motorway_link", + "street", + "street_limited", + "service", + "track", + "pedestrian", + "path", + "link" + ], + [ + "==", + "structure", + "bridge" + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "bridge_minor", + "paint": { + "line-color": "#efefef", + "line-width": { + "base": 1.55, + "stops": [ + [ + 4, + 0.25 + ], + [ + 20, + 30 + ] + ] + } + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-cap": "round", + "line-join": "round" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "in", + "class", + "motorway", + "primary", + "secondary", + "tertiary", + "trunk" + ], + [ + "==", + "structure", + "bridge" + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "bridge_major", + "paint": { + "line-color": "#fff", + "line-width": { + "base": 1.4, + "stops": [ + [ + 6, + 0.5 + ], + [ + 20, + 30 + ] + ] + } + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-cap": "round", + "line-join": "round" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "<=", + "admin_level", + 2 + ], + [ + "==", + "maritime", + 0 + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "admin_country", + "paint": { + "line-color": "#8b8a8a", + "line-width": { + "base": 1.3, + "stops": [ + [ + 3, + 0.5 + ], + [ + 22, + 15 + ] + ] + } + }, + "source-layer": "admin" + }, + { + "interactive": true, + "minzoom": 5, + "layout": { + "icon-image": "{maki}-11", + "text-offset": [ + 0, + 0.5 + ], + "text-field": "{name_en}", + "text-font": [ + "NotoCJK" + ], + "text-max-width": 8, + "text-anchor": "top", + "text-size": 11, + "icon-size": 1 + }, + "filter": [ + "all", + [ + "==", + "$type", + "Point" + ], + [ + "all", + [ + "==", + "scalerank", + 1 + ], + [ + "==", + "localrank", + 1 + ] + ] + ], + "type": "symbol", + "source": "mapbox", + "id": "poi_label", + "paint": { + "text-color": "#666", + "text-halo-width": 1, + "text-halo-color": "rgba(255,255,255,0.75)", + "text-halo-blur": 1 + }, + "source-layer": "poi_label" + }, + { + "interactive": true, + "layout": { + "symbol-placement": "line", + "text-field": "{name_en}", + "text-font": [ + "NotoCJK" + ], + "text-transform": "uppercase", + "text-letter-spacing": 0.1, + "text-size": { + "base": 1.4, + "stops": [ + [ + 10, + 8 + ], + [ + 20, + 14 + ] + ] + } + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "in", + "class", + "motorway", + "primary", + "secondary", + "tertiary", + "trunk" + ] + ], + "type": "symbol", + "source": "mapbox", + "id": "road_major_label", + "paint": { + "text-color": "#666", + "text-halo-color": "rgba(255,255,255,0.75)", + "text-halo-width": 2 + }, + "source-layer": "road_label" + }, + { + "interactive": true, + "minzoom": 8, + "layout": { + "text-field": "{name_en}", + "text-font": [ + "NotoCJK" + ], + "text-max-width": 6, + "text-size": { + "stops": [ + [ + 6, + 12 + ], + [ + 12, + 16 + ] + ] + } + }, + "filter": [ + "all", + [ + "==", + "$type", + "Point" + ], + [ + "in", + "type", + "town", + "village", + "hamlet", + "suburb", + "neighbourhood", + "island" + ] + ], + "type": "symbol", + "source": "mapbox", + "id": "place_label_other", + "paint": { + "text-color": "#666", + "text-halo-color": "rgba(255,255,255,0.75)", + "text-halo-width": 1, + "text-halo-blur": 1 + }, + "source-layer": "place_label" + }, + { + "interactive": true, + "layout": { + "text-field": "{name_en}", + "text-font": [ + "NotoCJK" + ], + "text-max-width": 10, + "text-size": { + "stops": [ + [ + 3, + 12 + ], + [ + 8, + 16 + ] + ] + } + }, + "maxzoom": 16, + "filter": [ + "all", + [ + "==", + "$type", + "Point" + ], + [ + "==", + "type", + "city" + ] + ], + "type": "symbol", + "source": "mapbox", + "id": "place_label_city", + "paint": { + "text-color": "#666", + "text-halo-color": "rgba(255,255,255,0.75)", + "text-halo-width": 1, + "text-halo-blur": 1 + }, + "source-layer": "place_label" + }, + { + "interactive": true, + "layout": { + "text-field": "{name_en}", + "text-font": [ + "NotoCJK" + ], + "text-max-width": 10, + "text-size": { + "stops": [ + [ + 3, + 14 + ], + [ + 8, + 22 + ] + ] + } + }, + "maxzoom": 12, + "filter": [ + "==", + "$type", + "Point" + ], + "type": "symbol", + "source": "mapbox", + "id": "country_label", + "paint": { + "text-color": "#666", + "text-halo-color": "rgba(255,255,255,0.75)", + "text-halo-width": 1, + "text-halo-blur": 1 + }, + "source-layer": "country_label" + }, + { + "id": "contour-line", + "type": "line", + "source": "mapbox", + "source-layer": "contour", + "minzoom": 11, + "filter": [ + "!in", + "index", + 10, + 5 + ], + "layout": {}, + "paint": { + "line-opacity": { + "base": 1, + "stops": [ + [ + 11, + 0.15 + ], + [ + 12, + 0.3 + ] + ] + }, + "line-color": "hsl(100, 100%, 20%)", + "line-width": { + "base": 1, + "stops": [ + [ + 13, + 0.5 + ], + [ + 16, + 0.8 + ] + ] + }, + "line-offset": { + "base": 1, + "stops": [ + [ + 13, + 1 + ], + [ + 16, + 1.6 + ] + ] + } + }, + "interactive": true + }, + { + "id": "contour-line-index", + "type": "line", + "source": "mapbox", + "source-layer": "contour", + "minzoom": 11, + "filter": [ + "in", + "index", + 10, + 5 + ], + "layout": {}, + "paint": { + "line-opacity": { + "base": 1, + "stops": [ + [ + 11, + 0.25 + ], + [ + 12, + 0.5 + ] + ] + }, + "line-color": "hsl(100, 100%, 20%)", + "line-width": { + "base": 1, + "stops": [ + [ + 13, + 0.6 + ], + [ + 16, + 1.2 + ] + ] + }, + "line-offset": { + "base": 1, + "stops": [ + [ + 13, + 0.6 + ], + [ + 16, + 1.2 + ] + ] + } + }, + "interactive": true + } + ] +} diff --git a/metrics/integration/styles/chicago.json b/metrics/integration/styles/chicago.json new file mode 100644 index 00000000000..45571246e72 --- /dev/null +++ b/metrics/integration/styles/chicago.json @@ -0,0 +1,867 @@ +{ + "version": 8, + "name": "Basic", + "metadata": { + "mapbox:autocomposite": true, + "mapbox:type": "template" + }, + "sources": { + "mapbox": { + "type": "vector", + "tiles": [ "local://mvt-fixtures/real-world/chicago/{z}-{x}-{y}.mvt" ] + } + }, + "sprite": "mapbox://sprites/mapbox/basic-v9", + "glyphs": "mapbox://fonts/mapbox/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "#dedede" + }, + "interactive": true + }, + { + "id": "landuse_overlay_national_park", + "type": "fill", + "source": "mapbox", + "source-layer": "landuse_overlay", + "filter": [ + "==", + "class", + "national_park" + ], + "paint": { + "fill-color": "#d2edae", + "fill-opacity": 0.75 + }, + "interactive": true + }, + { + "id": "landuse_park", + "type": "fill", + "source": "mapbox", + "source-layer": "landuse", + "filter": [ + "==", + "class", + "park" + ], + "paint": { + "fill-color": "#d2edae" + }, + "interactive": true + }, + { + "id": "waterway", + "type": "line", + "source": "mapbox", + "source-layer": "waterway", + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "in", + "class", + "river", + "canal" + ] + ], + "paint": { + "line-color": "#a0cfdf", + "line-width": { + "base": 1.4, + "stops": [ + [ + 8, + 0.5 + ], + [ + 20, + 15 + ] + ] + } + }, + "interactive": true + }, + { + "id": "water", + "type": "fill", + "source": "mapbox", + "source-layer": "water", + "paint": { + "fill-color": "#a0cfdf" + }, + "interactive": true + }, + { + "id": "building", + "type": "fill", + "source": "mapbox", + "source-layer": "building", + "paint": { + "fill-color": "#d6d6d6" + }, + "interactive": true + }, + { + "interactive": true, + "layout": { + "line-cap": "butt", + "line-join": "miter" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "in", + "class", + "motorway_link", + "street", + "street_limited", + "service", + "track", + "pedestrian", + "path", + "link" + ], + [ + "==", + "structure", + "tunnel" + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "tunnel_minor", + "paint": { + "line-color": "#efefef", + "line-width": { + "base": 1.55, + "stops": [ + [ + 4, + 0.25 + ], + [ + 20, + 30 + ] + ] + }, + "line-dasharray": [ + 0.36, + 0.18 + ] + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-cap": "butt", + "line-join": "miter" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "in", + "class", + "motorway", + "primary", + "secondary", + "tertiary", + "trunk" + ], + [ + "==", + "structure", + "tunnel" + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "tunnel_major", + "paint": { + "line-color": "#fff", + "line-width": { + "base": 1.4, + "stops": [ + [ + 6, + 0.5 + ], + [ + 20, + 30 + ] + ] + }, + "line-dasharray": [ + 0.28, + 0.14 + ] + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-cap": "round", + "line-join": "round" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "in", + "class", + "motorway_link", + "street", + "street_limited", + "service", + "track", + "pedestrian", + "path", + "link" + ], + [ + "in", + "structure", + "none", + "ford" + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "road_minor", + "paint": { + "line-color": "#efefef", + "line-width": { + "base": 1.55, + "stops": [ + [ + 4, + 0.25 + ], + [ + 20, + 30 + ] + ] + } + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-cap": "round", + "line-join": "round" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "in", + "class", + "motorway", + "primary", + "secondary", + "tertiary", + "trunk" + ], + [ + "in", + "structure", + "none", + "ford" + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "road_major", + "paint": { + "line-color": "#fff", + "line-width": { + "base": 1.4, + "stops": [ + [ + 6, + 0.5 + ], + [ + 20, + 30 + ] + ] + } + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-cap": "butt", + "line-join": "miter" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "in", + "class", + "motorway_link", + "street", + "street_limited", + "service", + "track", + "pedestrian", + "path", + "link" + ], + [ + "==", + "structure", + "bridge" + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "bridge_minor case", + "paint": { + "line-color": "#dedede", + "line-width": { + "base": 1.6, + "stops": [ + [ + 12, + 0.5 + ], + [ + 20, + 10 + ] + ] + }, + "line-gap-width": { + "base": 1.55, + "stops": [ + [ + 4, + 0.25 + ], + [ + 20, + 30 + ] + ] + } + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-cap": "butt", + "line-join": "miter" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "in", + "class", + "motorway", + "primary", + "secondary", + "tertiary", + "trunk" + ], + [ + "==", + "structure", + "bridge" + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "bridge_major case", + "paint": { + "line-color": "#dedede", + "line-width": { + "base": 1.6, + "stops": [ + [ + 12, + 0.5 + ], + [ + 20, + 10 + ] + ] + }, + "line-gap-width": { + "base": 1.55, + "stops": [ + [ + 4, + 0.25 + ], + [ + 20, + 30 + ] + ] + } + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-cap": "round", + "line-join": "round" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "in", + "class", + "motorway_link", + "street", + "street_limited", + "service", + "track", + "pedestrian", + "path", + "link" + ], + [ + "==", + "structure", + "bridge" + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "bridge_minor", + "paint": { + "line-color": "#efefef", + "line-width": { + "base": 1.55, + "stops": [ + [ + 4, + 0.25 + ], + [ + 20, + 30 + ] + ] + } + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-cap": "round", + "line-join": "round" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "in", + "class", + "motorway", + "primary", + "secondary", + "tertiary", + "trunk" + ], + [ + "==", + "structure", + "bridge" + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "bridge_major", + "paint": { + "line-color": "#fff", + "line-width": { + "base": 1.4, + "stops": [ + [ + 6, + 0.5 + ], + [ + 20, + 30 + ] + ] + } + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-cap": "round", + "line-join": "round" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "<=", + "admin_level", + 2 + ], + [ + "==", + "maritime", + 0 + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "admin_country", + "paint": { + "line-color": "#8b8a8a", + "line-width": { + "base": 1.3, + "stops": [ + [ + 3, + 0.5 + ], + [ + 22, + 15 + ] + ] + } + }, + "source-layer": "admin" + }, + { + "interactive": true, + "minzoom": 5, + "layout": { + "icon-image": "{maki}-11", + "text-offset": [ + 0, + 0.5 + ], + "text-field": "{name_en}", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-max-width": 8, + "text-anchor": "top", + "text-size": 11, + "icon-size": 1 + }, + "filter": [ + "all", + [ + "==", + "$type", + "Point" + ], + [ + "all", + [ + "==", + "scalerank", + 1 + ], + [ + "==", + "localrank", + 1 + ] + ] + ], + "type": "symbol", + "source": "mapbox", + "id": "poi_label", + "paint": { + "text-color": "#666", + "text-halo-width": 1, + "text-halo-color": "rgba(255,255,255,0.75)", + "text-halo-blur": 1 + }, + "source-layer": "poi_label" + }, + { + "interactive": true, + "layout": { + "symbol-placement": "line", + "text-field": "{name_en}", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-transform": "uppercase", + "text-letter-spacing": 0.1, + "text-size": { + "base": 1.4, + "stops": [ + [ + 10, + 8 + ], + [ + 20, + 14 + ] + ] + } + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "in", + "class", + "motorway", + "primary", + "secondary", + "tertiary", + "trunk" + ] + ], + "type": "symbol", + "source": "mapbox", + "id": "road_major_label", + "paint": { + "text-color": "#666", + "text-halo-color": "rgba(255,255,255,0.75)", + "text-halo-width": 2 + }, + "source-layer": "road_label" + }, + { + "interactive": true, + "minzoom": 8, + "layout": { + "text-field": "{name_en}", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-max-width": 6, + "text-size": { + "stops": [ + [ + 6, + 12 + ], + [ + 12, + 16 + ] + ] + } + }, + "filter": [ + "all", + [ + "==", + "$type", + "Point" + ], + [ + "in", + "type", + "town", + "village", + "hamlet", + "suburb", + "neighbourhood", + "island" + ] + ], + "type": "symbol", + "source": "mapbox", + "id": "place_label_other", + "paint": { + "text-color": "#666", + "text-halo-color": "rgba(255,255,255,0.75)", + "text-halo-width": 1, + "text-halo-blur": 1 + }, + "source-layer": "place_label" + }, + { + "interactive": true, + "layout": { + "text-field": "{name_en}", + "text-font": [ + "Open Sans Bold", + "Arial Unicode MS Bold" + ], + "text-max-width": 10, + "text-size": { + "stops": [ + [ + 3, + 12 + ], + [ + 8, + 16 + ] + ] + } + }, + "maxzoom": 16, + "filter": [ + "all", + [ + "==", + "$type", + "Point" + ], + [ + "==", + "type", + "city" + ] + ], + "type": "symbol", + "source": "mapbox", + "id": "place_label_city", + "paint": { + "text-color": "#666", + "text-halo-color": "rgba(255,255,255,0.75)", + "text-halo-width": 1, + "text-halo-blur": 1 + }, + "source-layer": "place_label" + }, + { + "interactive": true, + "layout": { + "text-field": "{name_en}", + "text-font": [ + "Open Sans Regular", + "Arial Unicode MS Regular" + ], + "text-max-width": 10, + "text-size": { + "stops": [ + [ + 3, + 14 + ], + [ + 8, + 22 + ] + ] + } + }, + "maxzoom": 12, + "filter": [ + "==", + "$type", + "Point" + ], + "type": "symbol", + "source": "mapbox", + "id": "country_label", + "paint": { + "text-color": "#666", + "text-halo-color": "rgba(255,255,255,0.75)", + "text-halo-width": 1, + "text-halo-blur": 1 + }, + "source-layer": "country_label" + } + ] +} diff --git a/metrics/integration/styles/nepal.json b/metrics/integration/styles/nepal.json new file mode 100644 index 00000000000..0631f2d4cce --- /dev/null +++ b/metrics/integration/styles/nepal.json @@ -0,0 +1,981 @@ +{ + "version": 8, + "name": "Basic", + "metadata": { + "mapbox:autocomposite": true, + "mapbox:type": "template" + }, + "sources": { + "mapbox": { + "type": "vector", + "tiles": [ "local://mvt-fixtures/real-world/nepal/{z}-{x}-{y}.mvt" ] + } + }, + "sprite": "mapbox://sprites/mapbox/basic-v9", + "glyphs": "mapbox://fonts/mapbox/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "#dedede" + }, + "interactive": true + }, + { + "id": "landuse_overlay_national_park", + "type": "fill", + "source": "mapbox", + "source-layer": "landuse_overlay", + "filter": [ + "==", + "class", + "national_park" + ], + "paint": { + "fill-color": "#d2edae", + "fill-opacity": 0.75 + }, + "interactive": true + }, + { + "id": "landuse_park", + "type": "fill", + "source": "mapbox", + "source-layer": "landuse", + "filter": [ + "==", + "class", + "park" + ], + "paint": { + "fill-color": "#d2edae" + }, + "interactive": true + }, + { + "id": "waterway", + "type": "line", + "source": "mapbox", + "source-layer": "waterway", + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "in", + "class", + "river", + "canal" + ] + ], + "paint": { + "line-color": "#a0cfdf", + "line-width": { + "base": 1.4, + "stops": [ + [ + 8, + 0.5 + ], + [ + 20, + 15 + ] + ] + } + }, + "interactive": true + }, + { + "id": "water", + "type": "fill", + "source": "mapbox", + "source-layer": "water", + "paint": { + "fill-color": "#a0cfdf" + }, + "interactive": true + }, + { + "id": "building", + "type": "fill", + "source": "mapbox", + "source-layer": "building", + "paint": { + "fill-color": "#d6d6d6" + }, + "interactive": true + }, + { + "interactive": true, + "layout": { + "line-cap": "butt", + "line-join": "miter" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "in", + "class", + "motorway_link", + "street", + "street_limited", + "service", + "track", + "pedestrian", + "path", + "link" + ], + [ + "==", + "structure", + "tunnel" + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "tunnel_minor", + "paint": { + "line-color": "#efefef", + "line-width": { + "base": 1.55, + "stops": [ + [ + 4, + 0.25 + ], + [ + 20, + 30 + ] + ] + }, + "line-dasharray": [ + 0.36, + 0.18 + ] + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-cap": "butt", + "line-join": "miter" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "in", + "class", + "motorway", + "primary", + "secondary", + "tertiary", + "trunk" + ], + [ + "==", + "structure", + "tunnel" + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "tunnel_major", + "paint": { + "line-color": "#fff", + "line-width": { + "base": 1.4, + "stops": [ + [ + 6, + 0.5 + ], + [ + 20, + 30 + ] + ] + }, + "line-dasharray": [ + 0.28, + 0.14 + ] + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-cap": "round", + "line-join": "round" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "in", + "class", + "motorway_link", + "street", + "street_limited", + "service", + "track", + "pedestrian", + "path", + "link" + ], + [ + "in", + "structure", + "none", + "ford" + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "road_minor", + "paint": { + "line-color": "#efefef", + "line-width": { + "base": 1.55, + "stops": [ + [ + 4, + 0.25 + ], + [ + 20, + 30 + ] + ] + } + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-cap": "round", + "line-join": "round" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "in", + "class", + "motorway", + "primary", + "secondary", + "tertiary", + "trunk" + ], + [ + "in", + "structure", + "none", + "ford" + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "road_major", + "paint": { + "line-color": "#fff", + "line-width": { + "base": 1.4, + "stops": [ + [ + 6, + 0.5 + ], + [ + 20, + 30 + ] + ] + } + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-cap": "butt", + "line-join": "miter" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "in", + "class", + "motorway_link", + "street", + "street_limited", + "service", + "track", + "pedestrian", + "path", + "link" + ], + [ + "==", + "structure", + "bridge" + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "bridge_minor case", + "paint": { + "line-color": "#dedede", + "line-width": { + "base": 1.6, + "stops": [ + [ + 12, + 0.5 + ], + [ + 20, + 10 + ] + ] + }, + "line-gap-width": { + "base": 1.55, + "stops": [ + [ + 4, + 0.25 + ], + [ + 20, + 30 + ] + ] + } + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-cap": "butt", + "line-join": "miter" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "in", + "class", + "motorway", + "primary", + "secondary", + "tertiary", + "trunk" + ], + [ + "==", + "structure", + "bridge" + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "bridge_major case", + "paint": { + "line-color": "#dedede", + "line-width": { + "base": 1.6, + "stops": [ + [ + 12, + 0.5 + ], + [ + 20, + 10 + ] + ] + }, + "line-gap-width": { + "base": 1.55, + "stops": [ + [ + 4, + 0.25 + ], + [ + 20, + 30 + ] + ] + } + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-cap": "round", + "line-join": "round" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "in", + "class", + "motorway_link", + "street", + "street_limited", + "service", + "track", + "pedestrian", + "path", + "link" + ], + [ + "==", + "structure", + "bridge" + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "bridge_minor", + "paint": { + "line-color": "#efefef", + "line-width": { + "base": 1.55, + "stops": [ + [ + 4, + 0.25 + ], + [ + 20, + 30 + ] + ] + } + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-cap": "round", + "line-join": "round" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "in", + "class", + "motorway", + "primary", + "secondary", + "tertiary", + "trunk" + ], + [ + "==", + "structure", + "bridge" + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "bridge_major", + "paint": { + "line-color": "#fff", + "line-width": { + "base": 1.4, + "stops": [ + [ + 6, + 0.5 + ], + [ + 20, + 30 + ] + ] + } + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-cap": "round", + "line-join": "round" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "<=", + "admin_level", + 2 + ], + [ + "==", + "maritime", + 0 + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "admin_country", + "paint": { + "line-color": "#8b8a8a", + "line-width": { + "base": 1.3, + "stops": [ + [ + 3, + 0.5 + ], + [ + 22, + 15 + ] + ] + } + }, + "source-layer": "admin" + }, + { + "interactive": true, + "minzoom": 5, + "layout": { + "icon-image": "{maki}-11", + "text-offset": [ + 0, + 0.5 + ], + "text-field": "{name_en}", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-max-width": 8, + "text-anchor": "top", + "text-size": 11, + "icon-size": 1 + }, + "filter": [ + "all", + [ + "==", + "$type", + "Point" + ], + [ + "all", + [ + "==", + "scalerank", + 1 + ], + [ + "==", + "localrank", + 1 + ] + ] + ], + "type": "symbol", + "source": "mapbox", + "id": "poi_label", + "paint": { + "text-color": "#666", + "text-halo-width": 1, + "text-halo-color": "rgba(255,255,255,0.75)", + "text-halo-blur": 1 + }, + "source-layer": "poi_label" + }, + { + "interactive": true, + "layout": { + "symbol-placement": "line", + "text-field": "{name_en}", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-transform": "uppercase", + "text-letter-spacing": 0.1, + "text-size": { + "base": 1.4, + "stops": [ + [ + 10, + 8 + ], + [ + 20, + 14 + ] + ] + } + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "in", + "class", + "motorway", + "primary", + "secondary", + "tertiary", + "trunk" + ] + ], + "type": "symbol", + "source": "mapbox", + "id": "road_major_label", + "paint": { + "text-color": "#666", + "text-halo-color": "rgba(255,255,255,0.75)", + "text-halo-width": 2 + }, + "source-layer": "road_label" + }, + { + "interactive": true, + "minzoom": 8, + "layout": { + "text-field": "{name_en}", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-max-width": 6, + "text-size": { + "stops": [ + [ + 6, + 12 + ], + [ + 12, + 16 + ] + ] + } + }, + "filter": [ + "all", + [ + "==", + "$type", + "Point" + ], + [ + "in", + "type", + "town", + "village", + "hamlet", + "suburb", + "neighbourhood", + "island" + ] + ], + "type": "symbol", + "source": "mapbox", + "id": "place_label_other", + "paint": { + "text-color": "#666", + "text-halo-color": "rgba(255,255,255,0.75)", + "text-halo-width": 1, + "text-halo-blur": 1 + }, + "source-layer": "place_label" + }, + { + "interactive": true, + "layout": { + "text-field": "{name_en}", + "text-font": [ + "Open Sans Bold", + "Arial Unicode MS Bold" + ], + "text-max-width": 10, + "text-size": { + "stops": [ + [ + 3, + 12 + ], + [ + 8, + 16 + ] + ] + } + }, + "maxzoom": 16, + "filter": [ + "all", + [ + "==", + "$type", + "Point" + ], + [ + "==", + "type", + "city" + ] + ], + "type": "symbol", + "source": "mapbox", + "id": "place_label_city", + "paint": { + "text-color": "#666", + "text-halo-color": "rgba(255,255,255,0.75)", + "text-halo-width": 1, + "text-halo-blur": 1 + }, + "source-layer": "place_label" + }, + { + "interactive": true, + "layout": { + "text-field": "{name_en}", + "text-font": [ + "Open Sans Regular", + "Arial Unicode MS Regular" + ], + "text-max-width": 10, + "text-size": { + "stops": [ + [ + 3, + 14 + ], + [ + 8, + 22 + ] + ] + } + }, + "maxzoom": 12, + "filter": [ + "==", + "$type", + "Point" + ], + "type": "symbol", + "source": "mapbox", + "id": "country_label", + "paint": { + "text-color": "#666", + "text-halo-color": "rgba(255,255,255,0.75)", + "text-halo-width": 1, + "text-halo-blur": 1 + }, + "source-layer": "country_label" + }, + { + "id": "contour-line", + "type": "line", + "source": "mapbox", + "source-layer": "contour", + "minzoom": 11, + "filter": [ + "!in", + "index", + 10, + 5 + ], + "layout": {}, + "paint": { + "line-opacity": { + "base": 1, + "stops": [ + [ + 11, + 0.15 + ], + [ + 12, + 0.3 + ] + ] + }, + "line-color": "hsl(100, 100%, 20%)", + "line-width": { + "base": 1, + "stops": [ + [ + 13, + 0.5 + ], + [ + 16, + 0.8 + ] + ] + }, + "line-offset": { + "base": 1, + "stops": [ + [ + 13, + 1 + ], + [ + 16, + 1.6 + ] + ] + } + }, + "interactive": true + }, + { + "id": "contour-line-index", + "type": "line", + "source": "mapbox", + "source-layer": "contour", + "minzoom": 11, + "filter": [ + "in", + "index", + 10, + 5 + ], + "layout": {}, + "paint": { + "line-opacity": { + "base": 1, + "stops": [ + [ + 11, + 0.25 + ], + [ + 12, + 0.5 + ] + ] + }, + "line-color": "hsl(100, 100%, 20%)", + "line-width": { + "base": 1, + "stops": [ + [ + 13, + 0.6 + ], + [ + 16, + 1.2 + ] + ] + }, + "line-offset": { + "base": 1, + "stops": [ + [ + 13, + 0.6 + ], + [ + 16, + 1.2 + ] + ] + } + }, + "interactive": true + } + ] +} diff --git a/metrics/integration/styles/norway.json b/metrics/integration/styles/norway.json new file mode 100644 index 00000000000..ad9bddd92ad --- /dev/null +++ b/metrics/integration/styles/norway.json @@ -0,0 +1,981 @@ +{ + "version": 8, + "name": "Basic", + "metadata": { + "mapbox:autocomposite": true, + "mapbox:type": "template" + }, + "sources": { + "mapbox": { + "type": "vector", + "tiles": [ "local://mvt-fixtures/real-world/norway/{z}-{x}-{y}.mvt" ] + } + }, + "sprite": "mapbox://sprites/mapbox/basic-v9", + "glyphs": "mapbox://fonts/mapbox/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "#dedede" + }, + "interactive": true + }, + { + "id": "landuse_overlay_national_park", + "type": "fill", + "source": "mapbox", + "source-layer": "landuse_overlay", + "filter": [ + "==", + "class", + "national_park" + ], + "paint": { + "fill-color": "#d2edae", + "fill-opacity": 0.75 + }, + "interactive": true + }, + { + "id": "landuse_park", + "type": "fill", + "source": "mapbox", + "source-layer": "landuse", + "filter": [ + "==", + "class", + "park" + ], + "paint": { + "fill-color": "#d2edae" + }, + "interactive": true + }, + { + "id": "waterway", + "type": "line", + "source": "mapbox", + "source-layer": "waterway", + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "in", + "class", + "river", + "canal" + ] + ], + "paint": { + "line-color": "#a0cfdf", + "line-width": { + "base": 1.4, + "stops": [ + [ + 8, + 0.5 + ], + [ + 20, + 15 + ] + ] + } + }, + "interactive": true + }, + { + "id": "water", + "type": "fill", + "source": "mapbox", + "source-layer": "water", + "paint": { + "fill-color": "#a0cfdf" + }, + "interactive": true + }, + { + "id": "building", + "type": "fill", + "source": "mapbox", + "source-layer": "building", + "paint": { + "fill-color": "#d6d6d6" + }, + "interactive": true + }, + { + "interactive": true, + "layout": { + "line-cap": "butt", + "line-join": "miter" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "in", + "class", + "motorway_link", + "street", + "street_limited", + "service", + "track", + "pedestrian", + "path", + "link" + ], + [ + "==", + "structure", + "tunnel" + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "tunnel_minor", + "paint": { + "line-color": "#efefef", + "line-width": { + "base": 1.55, + "stops": [ + [ + 4, + 0.25 + ], + [ + 20, + 30 + ] + ] + }, + "line-dasharray": [ + 0.36, + 0.18 + ] + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-cap": "butt", + "line-join": "miter" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "in", + "class", + "motorway", + "primary", + "secondary", + "tertiary", + "trunk" + ], + [ + "==", + "structure", + "tunnel" + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "tunnel_major", + "paint": { + "line-color": "#fff", + "line-width": { + "base": 1.4, + "stops": [ + [ + 6, + 0.5 + ], + [ + 20, + 30 + ] + ] + }, + "line-dasharray": [ + 0.28, + 0.14 + ] + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-cap": "round", + "line-join": "round" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "in", + "class", + "motorway_link", + "street", + "street_limited", + "service", + "track", + "pedestrian", + "path", + "link" + ], + [ + "in", + "structure", + "none", + "ford" + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "road_minor", + "paint": { + "line-color": "#efefef", + "line-width": { + "base": 1.55, + "stops": [ + [ + 4, + 0.25 + ], + [ + 20, + 30 + ] + ] + } + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-cap": "round", + "line-join": "round" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "in", + "class", + "motorway", + "primary", + "secondary", + "tertiary", + "trunk" + ], + [ + "in", + "structure", + "none", + "ford" + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "road_major", + "paint": { + "line-color": "#fff", + "line-width": { + "base": 1.4, + "stops": [ + [ + 6, + 0.5 + ], + [ + 20, + 30 + ] + ] + } + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-cap": "butt", + "line-join": "miter" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "in", + "class", + "motorway_link", + "street", + "street_limited", + "service", + "track", + "pedestrian", + "path", + "link" + ], + [ + "==", + "structure", + "bridge" + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "bridge_minor case", + "paint": { + "line-color": "#dedede", + "line-width": { + "base": 1.6, + "stops": [ + [ + 12, + 0.5 + ], + [ + 20, + 10 + ] + ] + }, + "line-gap-width": { + "base": 1.55, + "stops": [ + [ + 4, + 0.25 + ], + [ + 20, + 30 + ] + ] + } + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-cap": "butt", + "line-join": "miter" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "in", + "class", + "motorway", + "primary", + "secondary", + "tertiary", + "trunk" + ], + [ + "==", + "structure", + "bridge" + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "bridge_major case", + "paint": { + "line-color": "#dedede", + "line-width": { + "base": 1.6, + "stops": [ + [ + 12, + 0.5 + ], + [ + 20, + 10 + ] + ] + }, + "line-gap-width": { + "base": 1.55, + "stops": [ + [ + 4, + 0.25 + ], + [ + 20, + 30 + ] + ] + } + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-cap": "round", + "line-join": "round" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "in", + "class", + "motorway_link", + "street", + "street_limited", + "service", + "track", + "pedestrian", + "path", + "link" + ], + [ + "==", + "structure", + "bridge" + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "bridge_minor", + "paint": { + "line-color": "#efefef", + "line-width": { + "base": 1.55, + "stops": [ + [ + 4, + 0.25 + ], + [ + 20, + 30 + ] + ] + } + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-cap": "round", + "line-join": "round" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "in", + "class", + "motorway", + "primary", + "secondary", + "tertiary", + "trunk" + ], + [ + "==", + "structure", + "bridge" + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "bridge_major", + "paint": { + "line-color": "#fff", + "line-width": { + "base": 1.4, + "stops": [ + [ + 6, + 0.5 + ], + [ + 20, + 30 + ] + ] + } + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-cap": "round", + "line-join": "round" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "<=", + "admin_level", + 2 + ], + [ + "==", + "maritime", + 0 + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "admin_country", + "paint": { + "line-color": "#8b8a8a", + "line-width": { + "base": 1.3, + "stops": [ + [ + 3, + 0.5 + ], + [ + 22, + 15 + ] + ] + } + }, + "source-layer": "admin" + }, + { + "interactive": true, + "minzoom": 5, + "layout": { + "icon-image": "{maki}-11", + "text-offset": [ + 0, + 0.5 + ], + "text-field": "{name_en}", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-max-width": 8, + "text-anchor": "top", + "text-size": 11, + "icon-size": 1 + }, + "filter": [ + "all", + [ + "==", + "$type", + "Point" + ], + [ + "all", + [ + "==", + "scalerank", + 1 + ], + [ + "==", + "localrank", + 1 + ] + ] + ], + "type": "symbol", + "source": "mapbox", + "id": "poi_label", + "paint": { + "text-color": "#666", + "text-halo-width": 1, + "text-halo-color": "rgba(255,255,255,0.75)", + "text-halo-blur": 1 + }, + "source-layer": "poi_label" + }, + { + "interactive": true, + "layout": { + "symbol-placement": "line", + "text-field": "{name_en}", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-transform": "uppercase", + "text-letter-spacing": 0.1, + "text-size": { + "base": 1.4, + "stops": [ + [ + 10, + 8 + ], + [ + 20, + 14 + ] + ] + } + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "in", + "class", + "motorway", + "primary", + "secondary", + "tertiary", + "trunk" + ] + ], + "type": "symbol", + "source": "mapbox", + "id": "road_major_label", + "paint": { + "text-color": "#666", + "text-halo-color": "rgba(255,255,255,0.75)", + "text-halo-width": 2 + }, + "source-layer": "road_label" + }, + { + "interactive": true, + "minzoom": 8, + "layout": { + "text-field": "{name_en}", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-max-width": 6, + "text-size": { + "stops": [ + [ + 6, + 12 + ], + [ + 12, + 16 + ] + ] + } + }, + "filter": [ + "all", + [ + "==", + "$type", + "Point" + ], + [ + "in", + "type", + "town", + "village", + "hamlet", + "suburb", + "neighbourhood", + "island" + ] + ], + "type": "symbol", + "source": "mapbox", + "id": "place_label_other", + "paint": { + "text-color": "#666", + "text-halo-color": "rgba(255,255,255,0.75)", + "text-halo-width": 1, + "text-halo-blur": 1 + }, + "source-layer": "place_label" + }, + { + "interactive": true, + "layout": { + "text-field": "{name_en}", + "text-font": [ + "Open Sans Bold", + "Arial Unicode MS Bold" + ], + "text-max-width": 10, + "text-size": { + "stops": [ + [ + 3, + 12 + ], + [ + 8, + 16 + ] + ] + } + }, + "maxzoom": 16, + "filter": [ + "all", + [ + "==", + "$type", + "Point" + ], + [ + "==", + "type", + "city" + ] + ], + "type": "symbol", + "source": "mapbox", + "id": "place_label_city", + "paint": { + "text-color": "#666", + "text-halo-color": "rgba(255,255,255,0.75)", + "text-halo-width": 1, + "text-halo-blur": 1 + }, + "source-layer": "place_label" + }, + { + "interactive": true, + "layout": { + "text-field": "{name_en}", + "text-font": [ + "Open Sans Regular", + "Arial Unicode MS Regular" + ], + "text-max-width": 10, + "text-size": { + "stops": [ + [ + 3, + 14 + ], + [ + 8, + 22 + ] + ] + } + }, + "maxzoom": 12, + "filter": [ + "==", + "$type", + "Point" + ], + "type": "symbol", + "source": "mapbox", + "id": "country_label", + "paint": { + "text-color": "#666", + "text-halo-color": "rgba(255,255,255,0.75)", + "text-halo-width": 1, + "text-halo-blur": 1 + }, + "source-layer": "country_label" + }, + { + "id": "contour-line", + "type": "line", + "source": "mapbox", + "source-layer": "contour", + "minzoom": 11, + "filter": [ + "!in", + "index", + 10, + 5 + ], + "layout": {}, + "paint": { + "line-opacity": { + "base": 1, + "stops": [ + [ + 11, + 0.15 + ], + [ + 12, + 0.3 + ] + ] + }, + "line-color": "hsl(100, 100%, 20%)", + "line-width": { + "base": 1, + "stops": [ + [ + 13, + 0.5 + ], + [ + 16, + 0.8 + ] + ] + }, + "line-offset": { + "base": 1, + "stops": [ + [ + 13, + 1 + ], + [ + 16, + 1.6 + ] + ] + } + }, + "interactive": true + }, + { + "id": "contour-line-index", + "type": "line", + "source": "mapbox", + "source-layer": "contour", + "minzoom": 11, + "filter": [ + "in", + "index", + 10, + 5 + ], + "layout": {}, + "paint": { + "line-opacity": { + "base": 1, + "stops": [ + [ + 11, + 0.25 + ], + [ + 12, + 0.5 + ] + ] + }, + "line-color": "hsl(100, 100%, 20%)", + "line-width": { + "base": 1, + "stops": [ + [ + 13, + 0.6 + ], + [ + 16, + 1.2 + ] + ] + }, + "line-offset": { + "base": 1, + "stops": [ + [ + 13, + 0.6 + ], + [ + 16, + 1.2 + ] + ] + } + }, + "interactive": true + } + ] +} diff --git a/metrics/integration/styles/sanfrancisco.json b/metrics/integration/styles/sanfrancisco.json new file mode 100644 index 00000000000..8a4e64e38aa --- /dev/null +++ b/metrics/integration/styles/sanfrancisco.json @@ -0,0 +1,981 @@ +{ + "version": 8, + "name": "Basic", + "metadata": { + "mapbox:autocomposite": true, + "mapbox:type": "template" + }, + "sources": { + "mapbox": { + "type": "vector", + "tiles": [ "local://mvt-fixtures/real-world/sanfrancisco/{z}-{x}-{y}.mvt" ] + } + }, + "sprite": "mapbox://sprites/mapbox/basic-v9", + "glyphs": "mapbox://fonts/mapbox/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "#dedede" + }, + "interactive": true + }, + { + "id": "landuse_overlay_national_park", + "type": "fill", + "source": "mapbox", + "source-layer": "landuse_overlay", + "filter": [ + "==", + "class", + "national_park" + ], + "paint": { + "fill-color": "#d2edae", + "fill-opacity": 0.75 + }, + "interactive": true + }, + { + "id": "landuse_park", + "type": "fill", + "source": "mapbox", + "source-layer": "landuse", + "filter": [ + "==", + "class", + "park" + ], + "paint": { + "fill-color": "#d2edae" + }, + "interactive": true + }, + { + "id": "waterway", + "type": "line", + "source": "mapbox", + "source-layer": "waterway", + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "in", + "class", + "river", + "canal" + ] + ], + "paint": { + "line-color": "#a0cfdf", + "line-width": { + "base": 1.4, + "stops": [ + [ + 8, + 0.5 + ], + [ + 20, + 15 + ] + ] + } + }, + "interactive": true + }, + { + "id": "water", + "type": "fill", + "source": "mapbox", + "source-layer": "water", + "paint": { + "fill-color": "#a0cfdf" + }, + "interactive": true + }, + { + "id": "building", + "type": "fill", + "source": "mapbox", + "source-layer": "building", + "paint": { + "fill-color": "#d6d6d6" + }, + "interactive": true + }, + { + "interactive": true, + "layout": { + "line-cap": "butt", + "line-join": "miter" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "in", + "class", + "motorway_link", + "street", + "street_limited", + "service", + "track", + "pedestrian", + "path", + "link" + ], + [ + "==", + "structure", + "tunnel" + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "tunnel_minor", + "paint": { + "line-color": "#efefef", + "line-width": { + "base": 1.55, + "stops": [ + [ + 4, + 0.25 + ], + [ + 20, + 30 + ] + ] + }, + "line-dasharray": [ + 0.36, + 0.18 + ] + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-cap": "butt", + "line-join": "miter" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "in", + "class", + "motorway", + "primary", + "secondary", + "tertiary", + "trunk" + ], + [ + "==", + "structure", + "tunnel" + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "tunnel_major", + "paint": { + "line-color": "#fff", + "line-width": { + "base": 1.4, + "stops": [ + [ + 6, + 0.5 + ], + [ + 20, + 30 + ] + ] + }, + "line-dasharray": [ + 0.28, + 0.14 + ] + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-cap": "round", + "line-join": "round" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "in", + "class", + "motorway_link", + "street", + "street_limited", + "service", + "track", + "pedestrian", + "path", + "link" + ], + [ + "in", + "structure", + "none", + "ford" + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "road_minor", + "paint": { + "line-color": "#efefef", + "line-width": { + "base": 1.55, + "stops": [ + [ + 4, + 0.25 + ], + [ + 20, + 30 + ] + ] + } + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-cap": "round", + "line-join": "round" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "in", + "class", + "motorway", + "primary", + "secondary", + "tertiary", + "trunk" + ], + [ + "in", + "structure", + "none", + "ford" + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "road_major", + "paint": { + "line-color": "#fff", + "line-width": { + "base": 1.4, + "stops": [ + [ + 6, + 0.5 + ], + [ + 20, + 30 + ] + ] + } + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-cap": "butt", + "line-join": "miter" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "in", + "class", + "motorway_link", + "street", + "street_limited", + "service", + "track", + "pedestrian", + "path", + "link" + ], + [ + "==", + "structure", + "bridge" + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "bridge_minor case", + "paint": { + "line-color": "#dedede", + "line-width": { + "base": 1.6, + "stops": [ + [ + 12, + 0.5 + ], + [ + 20, + 10 + ] + ] + }, + "line-gap-width": { + "base": 1.55, + "stops": [ + [ + 4, + 0.25 + ], + [ + 20, + 30 + ] + ] + } + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-cap": "butt", + "line-join": "miter" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "in", + "class", + "motorway", + "primary", + "secondary", + "tertiary", + "trunk" + ], + [ + "==", + "structure", + "bridge" + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "bridge_major case", + "paint": { + "line-color": "#dedede", + "line-width": { + "base": 1.6, + "stops": [ + [ + 12, + 0.5 + ], + [ + 20, + 10 + ] + ] + }, + "line-gap-width": { + "base": 1.55, + "stops": [ + [ + 4, + 0.25 + ], + [ + 20, + 30 + ] + ] + } + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-cap": "round", + "line-join": "round" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "in", + "class", + "motorway_link", + "street", + "street_limited", + "service", + "track", + "pedestrian", + "path", + "link" + ], + [ + "==", + "structure", + "bridge" + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "bridge_minor", + "paint": { + "line-color": "#efefef", + "line-width": { + "base": 1.55, + "stops": [ + [ + 4, + 0.25 + ], + [ + 20, + 30 + ] + ] + } + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-cap": "round", + "line-join": "round" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "in", + "class", + "motorway", + "primary", + "secondary", + "tertiary", + "trunk" + ], + [ + "==", + "structure", + "bridge" + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "bridge_major", + "paint": { + "line-color": "#fff", + "line-width": { + "base": 1.4, + "stops": [ + [ + 6, + 0.5 + ], + [ + 20, + 30 + ] + ] + } + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-cap": "round", + "line-join": "round" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "<=", + "admin_level", + 2 + ], + [ + "==", + "maritime", + 0 + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "admin_country", + "paint": { + "line-color": "#8b8a8a", + "line-width": { + "base": 1.3, + "stops": [ + [ + 3, + 0.5 + ], + [ + 22, + 15 + ] + ] + } + }, + "source-layer": "admin" + }, + { + "interactive": true, + "minzoom": 5, + "layout": { + "icon-image": "{maki}-11", + "text-offset": [ + 0, + 0.5 + ], + "text-field": "{name_en}", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-max-width": 8, + "text-anchor": "top", + "text-size": 11, + "icon-size": 1 + }, + "filter": [ + "all", + [ + "==", + "$type", + "Point" + ], + [ + "all", + [ + "==", + "scalerank", + 1 + ], + [ + "==", + "localrank", + 1 + ] + ] + ], + "type": "symbol", + "source": "mapbox", + "id": "poi_label", + "paint": { + "text-color": "#666", + "text-halo-width": 1, + "text-halo-color": "rgba(255,255,255,0.75)", + "text-halo-blur": 1 + }, + "source-layer": "poi_label" + }, + { + "interactive": true, + "layout": { + "symbol-placement": "line", + "text-field": "{name_en}", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-transform": "uppercase", + "text-letter-spacing": 0.1, + "text-size": { + "base": 1.4, + "stops": [ + [ + 10, + 8 + ], + [ + 20, + 14 + ] + ] + } + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "in", + "class", + "motorway", + "primary", + "secondary", + "tertiary", + "trunk" + ] + ], + "type": "symbol", + "source": "mapbox", + "id": "road_major_label", + "paint": { + "text-color": "#666", + "text-halo-color": "rgba(255,255,255,0.75)", + "text-halo-width": 2 + }, + "source-layer": "road_label" + }, + { + "interactive": true, + "minzoom": 8, + "layout": { + "text-field": "{name_en}", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-max-width": 6, + "text-size": { + "stops": [ + [ + 6, + 12 + ], + [ + 12, + 16 + ] + ] + } + }, + "filter": [ + "all", + [ + "==", + "$type", + "Point" + ], + [ + "in", + "type", + "town", + "village", + "hamlet", + "suburb", + "neighbourhood", + "island" + ] + ], + "type": "symbol", + "source": "mapbox", + "id": "place_label_other", + "paint": { + "text-color": "#666", + "text-halo-color": "rgba(255,255,255,0.75)", + "text-halo-width": 1, + "text-halo-blur": 1 + }, + "source-layer": "place_label" + }, + { + "interactive": true, + "layout": { + "text-field": "{name_en}", + "text-font": [ + "Open Sans Bold", + "Arial Unicode MS Bold" + ], + "text-max-width": 10, + "text-size": { + "stops": [ + [ + 3, + 12 + ], + [ + 8, + 16 + ] + ] + } + }, + "maxzoom": 16, + "filter": [ + "all", + [ + "==", + "$type", + "Point" + ], + [ + "==", + "type", + "city" + ] + ], + "type": "symbol", + "source": "mapbox", + "id": "place_label_city", + "paint": { + "text-color": "#666", + "text-halo-color": "rgba(255,255,255,0.75)", + "text-halo-width": 1, + "text-halo-blur": 1 + }, + "source-layer": "place_label" + }, + { + "interactive": true, + "layout": { + "text-field": "{name_en}", + "text-font": [ + "Open Sans Regular", + "Arial Unicode MS Regular" + ], + "text-max-width": 10, + "text-size": { + "stops": [ + [ + 3, + 14 + ], + [ + 8, + 22 + ] + ] + } + }, + "maxzoom": 12, + "filter": [ + "==", + "$type", + "Point" + ], + "type": "symbol", + "source": "mapbox", + "id": "country_label", + "paint": { + "text-color": "#666", + "text-halo-color": "rgba(255,255,255,0.75)", + "text-halo-width": 1, + "text-halo-blur": 1 + }, + "source-layer": "country_label" + }, + { + "id": "contour-line", + "type": "line", + "source": "mapbox", + "source-layer": "contour", + "minzoom": 11, + "filter": [ + "!in", + "index", + 10, + 5 + ], + "layout": {}, + "paint": { + "line-opacity": { + "base": 1, + "stops": [ + [ + 11, + 0.15 + ], + [ + 12, + 0.3 + ] + ] + }, + "line-color": "hsl(100, 100%, 20%)", + "line-width": { + "base": 1, + "stops": [ + [ + 13, + 0.5 + ], + [ + 16, + 0.8 + ] + ] + }, + "line-offset": { + "base": 1, + "stops": [ + [ + 13, + 1 + ], + [ + 16, + 1.6 + ] + ] + } + }, + "interactive": true + }, + { + "id": "contour-line-index", + "type": "line", + "source": "mapbox", + "source-layer": "contour", + "minzoom": 11, + "filter": [ + "in", + "index", + 10, + 5 + ], + "layout": {}, + "paint": { + "line-opacity": { + "base": 1, + "stops": [ + [ + 11, + 0.25 + ], + [ + 12, + 0.5 + ] + ] + }, + "line-color": "hsl(100, 100%, 20%)", + "line-width": { + "base": 1, + "stops": [ + [ + 13, + 0.6 + ], + [ + 16, + 1.2 + ] + ] + }, + "line-offset": { + "base": 1, + "stops": [ + [ + 13, + 0.6 + ], + [ + 16, + 1.2 + ] + ] + } + }, + "interactive": true + } + ] +} diff --git a/metrics/integration/styles/uruguay.json b/metrics/integration/styles/uruguay.json new file mode 100644 index 00000000000..b6407fbf775 --- /dev/null +++ b/metrics/integration/styles/uruguay.json @@ -0,0 +1,981 @@ +{ + "version": 8, + "name": "Basic", + "metadata": { + "mapbox:autocomposite": true, + "mapbox:type": "template" + }, + "sources": { + "mapbox": { + "type": "vector", + "tiles": [ "local://mvt-fixtures/real-world/uruguay/{z}-{x}-{y}.mvt" ] + } + }, + "sprite": "mapbox://sprites/mapbox/basic-v9", + "glyphs": "mapbox://fonts/mapbox/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "#dedede" + }, + "interactive": true + }, + { + "id": "landuse_overlay_national_park", + "type": "fill", + "source": "mapbox", + "source-layer": "landuse_overlay", + "filter": [ + "==", + "class", + "national_park" + ], + "paint": { + "fill-color": "#d2edae", + "fill-opacity": 0.75 + }, + "interactive": true + }, + { + "id": "landuse_park", + "type": "fill", + "source": "mapbox", + "source-layer": "landuse", + "filter": [ + "==", + "class", + "park" + ], + "paint": { + "fill-color": "#d2edae" + }, + "interactive": true + }, + { + "id": "waterway", + "type": "line", + "source": "mapbox", + "source-layer": "waterway", + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "in", + "class", + "river", + "canal" + ] + ], + "paint": { + "line-color": "#a0cfdf", + "line-width": { + "base": 1.4, + "stops": [ + [ + 8, + 0.5 + ], + [ + 20, + 15 + ] + ] + } + }, + "interactive": true + }, + { + "id": "water", + "type": "fill", + "source": "mapbox", + "source-layer": "water", + "paint": { + "fill-color": "#a0cfdf" + }, + "interactive": true + }, + { + "id": "building", + "type": "fill", + "source": "mapbox", + "source-layer": "building", + "paint": { + "fill-color": "#d6d6d6" + }, + "interactive": true + }, + { + "interactive": true, + "layout": { + "line-cap": "butt", + "line-join": "miter" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "in", + "class", + "motorway_link", + "street", + "street_limited", + "service", + "track", + "pedestrian", + "path", + "link" + ], + [ + "==", + "structure", + "tunnel" + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "tunnel_minor", + "paint": { + "line-color": "#efefef", + "line-width": { + "base": 1.55, + "stops": [ + [ + 4, + 0.25 + ], + [ + 20, + 30 + ] + ] + }, + "line-dasharray": [ + 0.36, + 0.18 + ] + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-cap": "butt", + "line-join": "miter" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "in", + "class", + "motorway", + "primary", + "secondary", + "tertiary", + "trunk" + ], + [ + "==", + "structure", + "tunnel" + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "tunnel_major", + "paint": { + "line-color": "#fff", + "line-width": { + "base": 1.4, + "stops": [ + [ + 6, + 0.5 + ], + [ + 20, + 30 + ] + ] + }, + "line-dasharray": [ + 0.28, + 0.14 + ] + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-cap": "round", + "line-join": "round" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "in", + "class", + "motorway_link", + "street", + "street_limited", + "service", + "track", + "pedestrian", + "path", + "link" + ], + [ + "in", + "structure", + "none", + "ford" + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "road_minor", + "paint": { + "line-color": "#efefef", + "line-width": { + "base": 1.55, + "stops": [ + [ + 4, + 0.25 + ], + [ + 20, + 30 + ] + ] + } + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-cap": "round", + "line-join": "round" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "in", + "class", + "motorway", + "primary", + "secondary", + "tertiary", + "trunk" + ], + [ + "in", + "structure", + "none", + "ford" + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "road_major", + "paint": { + "line-color": "#fff", + "line-width": { + "base": 1.4, + "stops": [ + [ + 6, + 0.5 + ], + [ + 20, + 30 + ] + ] + } + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-cap": "butt", + "line-join": "miter" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "in", + "class", + "motorway_link", + "street", + "street_limited", + "service", + "track", + "pedestrian", + "path", + "link" + ], + [ + "==", + "structure", + "bridge" + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "bridge_minor case", + "paint": { + "line-color": "#dedede", + "line-width": { + "base": 1.6, + "stops": [ + [ + 12, + 0.5 + ], + [ + 20, + 10 + ] + ] + }, + "line-gap-width": { + "base": 1.55, + "stops": [ + [ + 4, + 0.25 + ], + [ + 20, + 30 + ] + ] + } + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-cap": "butt", + "line-join": "miter" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "in", + "class", + "motorway", + "primary", + "secondary", + "tertiary", + "trunk" + ], + [ + "==", + "structure", + "bridge" + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "bridge_major case", + "paint": { + "line-color": "#dedede", + "line-width": { + "base": 1.6, + "stops": [ + [ + 12, + 0.5 + ], + [ + 20, + 10 + ] + ] + }, + "line-gap-width": { + "base": 1.55, + "stops": [ + [ + 4, + 0.25 + ], + [ + 20, + 30 + ] + ] + } + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-cap": "round", + "line-join": "round" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "in", + "class", + "motorway_link", + "street", + "street_limited", + "service", + "track", + "pedestrian", + "path", + "link" + ], + [ + "==", + "structure", + "bridge" + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "bridge_minor", + "paint": { + "line-color": "#efefef", + "line-width": { + "base": 1.55, + "stops": [ + [ + 4, + 0.25 + ], + [ + 20, + 30 + ] + ] + } + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-cap": "round", + "line-join": "round" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "in", + "class", + "motorway", + "primary", + "secondary", + "tertiary", + "trunk" + ], + [ + "==", + "structure", + "bridge" + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "bridge_major", + "paint": { + "line-color": "#fff", + "line-width": { + "base": 1.4, + "stops": [ + [ + 6, + 0.5 + ], + [ + 20, + 30 + ] + ] + } + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-cap": "round", + "line-join": "round" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "<=", + "admin_level", + 2 + ], + [ + "==", + "maritime", + 0 + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "admin_country", + "paint": { + "line-color": "#8b8a8a", + "line-width": { + "base": 1.3, + "stops": [ + [ + 3, + 0.5 + ], + [ + 22, + 15 + ] + ] + } + }, + "source-layer": "admin" + }, + { + "interactive": true, + "minzoom": 5, + "layout": { + "icon-image": "{maki}-11", + "text-offset": [ + 0, + 0.5 + ], + "text-field": "{name_en}", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-max-width": 8, + "text-anchor": "top", + "text-size": 11, + "icon-size": 1 + }, + "filter": [ + "all", + [ + "==", + "$type", + "Point" + ], + [ + "all", + [ + "==", + "scalerank", + 1 + ], + [ + "==", + "localrank", + 1 + ] + ] + ], + "type": "symbol", + "source": "mapbox", + "id": "poi_label", + "paint": { + "text-color": "#666", + "text-halo-width": 1, + "text-halo-color": "rgba(255,255,255,0.75)", + "text-halo-blur": 1 + }, + "source-layer": "poi_label" + }, + { + "interactive": true, + "layout": { + "symbol-placement": "line", + "text-field": "{name_en}", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-transform": "uppercase", + "text-letter-spacing": 0.1, + "text-size": { + "base": 1.4, + "stops": [ + [ + 10, + 8 + ], + [ + 20, + 14 + ] + ] + } + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "in", + "class", + "motorway", + "primary", + "secondary", + "tertiary", + "trunk" + ] + ], + "type": "symbol", + "source": "mapbox", + "id": "road_major_label", + "paint": { + "text-color": "#666", + "text-halo-color": "rgba(255,255,255,0.75)", + "text-halo-width": 2 + }, + "source-layer": "road_label" + }, + { + "interactive": true, + "minzoom": 8, + "layout": { + "text-field": "{name_en}", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-max-width": 6, + "text-size": { + "stops": [ + [ + 6, + 12 + ], + [ + 12, + 16 + ] + ] + } + }, + "filter": [ + "all", + [ + "==", + "$type", + "Point" + ], + [ + "in", + "type", + "town", + "village", + "hamlet", + "suburb", + "neighbourhood", + "island" + ] + ], + "type": "symbol", + "source": "mapbox", + "id": "place_label_other", + "paint": { + "text-color": "#666", + "text-halo-color": "rgba(255,255,255,0.75)", + "text-halo-width": 1, + "text-halo-blur": 1 + }, + "source-layer": "place_label" + }, + { + "interactive": true, + "layout": { + "text-field": "{name_en}", + "text-font": [ + "Open Sans Bold", + "Arial Unicode MS Bold" + ], + "text-max-width": 10, + "text-size": { + "stops": [ + [ + 3, + 12 + ], + [ + 8, + 16 + ] + ] + } + }, + "maxzoom": 16, + "filter": [ + "all", + [ + "==", + "$type", + "Point" + ], + [ + "==", + "type", + "city" + ] + ], + "type": "symbol", + "source": "mapbox", + "id": "place_label_city", + "paint": { + "text-color": "#666", + "text-halo-color": "rgba(255,255,255,0.75)", + "text-halo-width": 1, + "text-halo-blur": 1 + }, + "source-layer": "place_label" + }, + { + "interactive": true, + "layout": { + "text-field": "{name_en}", + "text-font": [ + "Open Sans Regular", + "Arial Unicode MS Regular" + ], + "text-max-width": 10, + "text-size": { + "stops": [ + [ + 3, + 14 + ], + [ + 8, + 22 + ] + ] + } + }, + "maxzoom": 12, + "filter": [ + "==", + "$type", + "Point" + ], + "type": "symbol", + "source": "mapbox", + "id": "country_label", + "paint": { + "text-color": "#666", + "text-halo-color": "rgba(255,255,255,0.75)", + "text-halo-width": 1, + "text-halo-blur": 1 + }, + "source-layer": "country_label" + }, + { + "id": "contour-line", + "type": "line", + "source": "mapbox", + "source-layer": "contour", + "minzoom": 11, + "filter": [ + "!in", + "index", + 10, + 5 + ], + "layout": {}, + "paint": { + "line-opacity": { + "base": 1, + "stops": [ + [ + 11, + 0.15 + ], + [ + 12, + 0.3 + ] + ] + }, + "line-color": "hsl(100, 100%, 20%)", + "line-width": { + "base": 1, + "stops": [ + [ + 13, + 0.5 + ], + [ + 16, + 0.8 + ] + ] + }, + "line-offset": { + "base": 1, + "stops": [ + [ + 13, + 1 + ], + [ + 16, + 1.6 + ] + ] + } + }, + "interactive": true + }, + { + "id": "contour-line-index", + "type": "line", + "source": "mapbox", + "source-layer": "contour", + "minzoom": 11, + "filter": [ + "in", + "index", + 10, + 5 + ], + "layout": {}, + "paint": { + "line-opacity": { + "base": 1, + "stops": [ + [ + 11, + 0.25 + ], + [ + 12, + 0.5 + ] + ] + }, + "line-color": "hsl(100, 100%, 20%)", + "line-width": { + "base": 1, + "stops": [ + [ + 13, + 0.6 + ], + [ + 16, + 1.2 + ] + ] + }, + "line-offset": { + "base": 1, + "stops": [ + [ + 13, + 0.6 + ], + [ + 16, + 1.2 + ] + ] + } + }, + "interactive": true + } + ] +} diff --git a/metrics/integration/testem.js b/metrics/integration/testem.js new file mode 100644 index 00000000000..ec262ff7b0d --- /dev/null +++ b/metrics/integration/testem.js @@ -0,0 +1,169 @@ +/* eslint-disable no-global-assign */ +/* eslint-disable import/no-commonjs */ +/* eslint-disable flowtype/require-valid-file-annotation */ +require = require("esm")(module); +const {generateFixtureJson, getAllFixtureGlobs} = require('./lib/generate-fixture-json'); +const createServer = require('./lib/server'); +const buildTape = require('../../build/test/build-tape'); +const runAll = require('npm-run-all'); +const chokidar = require('chokidar'); +const rollup = require('rollup'); +const notifier = require('node-notifier'); +const rollupDevConfig = require('../../rollup.config').default; +const rollupTestConfig = require('./rollup.config.test').default; + +const rootFixturePath = 'test/integration/'; +const suitePath = 'query-tests'; +const fixtureBuildInterval = 2000; + +let beforeHookInvoked = false; +let server; + +let fixtureWatcher; +const rollupWatchers = {}; + +module.exports = { + "test_page": "test/integration/testem_page.html", + "src_files": [ + "dist/mapbox-gl-dev.js", + "test/integration/dist/query-test.js" + ], + "launch_in_dev": [], + "launch_in_ci": [ "Chrome" ], + "browser_args": { + "Chrome": { + "mode": "ci", + "args": [ "--headless", "--disable-gpu", "--remote-debugging-port=9222" ] + } + }, + "proxies": { + "/tiles":{ + "target": "http://localhost:2900" + }, + "/glyphs":{ + "target": "http://localhost:2900" + }, + "/tilesets":{ + "target": "http://localhost:2900" + }, + "/sprites":{ + "target": "http://localhost:2900" + }, + "/data":{ + "target": "http://localhost:2900" + }, + "/write-file":{ + "target": "http://localhost:2900" + } + }, + "before_tests"(config, data, callback) { + if (!beforeHookInvoked) { + server = createServer(); + const buildPromise = config.appMode === 'ci' ? buildArtifactsCi() : buildArtifactsDev(); + buildPromise.then(() => { + server.listen(callback); + }).catch((e) => { + callback(e); + }); + + beforeHookInvoked = true; + } + }, + "after_tests"(config, data, callback) { + if (config.appMode === 'ci') { + server.close(callback); + } + } +}; + +// helper method that builds test artifacts when in CI mode. +// Retuns a promise that resolves when all artifacts are built +function buildArtifactsCi() { + //1. Compile fixture data into a json file, so it can be bundled + generateFixtureJson(rootFixturePath, suitePath); + //2. Build tape + const tapePromise = buildTape(); + //3. Build test artifacts in parallel + const rollupPromise = runAll(['build-query-suite', 'build-dev'], {parallel: true}); + + return Promise.all([tapePromise, rollupPromise]); +} + +// helper method that starts a bunch of build-watchers and returns a promise +// that resolves when all of them have had their first run. +function buildArtifactsDev() { + return buildTape().then(() => { + // A promise that resolves on the first build of fixtures.json + return new Promise((resolve, reject) => { + fixtureWatcher = chokidar.watch(getAllFixtureGlobs(rootFixturePath, suitePath)); + let needsRebuild = false; + fixtureWatcher.on('ready', () => { + generateFixtureJson(rootFixturePath, suitePath); + + //Throttle calls to `generateFixtureJson` to run every 2s + setInterval(() => { + if (needsRebuild) { + generateFixtureJson(rootFixturePath, suitePath); + needsRebuild = false; + } + }, fixtureBuildInterval); + + //Flag needs rebuild when anything changes + fixtureWatcher.on('all', () => { + needsRebuild = true; + }); + // Resolve promise once chokidar has finished first scan of fixtures + resolve(); + }); + + fixtureWatcher.on('error', (e) => reject(e)); + }); + }).then(() => { + //Helper function that starts a rollup watcher + //returns a promise that resolves when the first bundle has finished + function startRollupWatcher(name, config) { + return new Promise((resolve, reject) => { + const watcher = rollup.watch(silenceWarnings(config)); + rollupWatchers[name] = watcher; + + watcher.on('event', (e) => { + if (e.code === 'START') { + notify('Query Tests', `${name} bundle started`); + } + if (e.code === 'END') { + notify('Query Tests', `${name} bundle finished`); + resolve(); + } + if (e.code === 'FATAL') { + reject(e); + } + }); + + }); + } + + return Promise.all([ + startRollupWatcher('mapbox-gl', rollupDevConfig), + startRollupWatcher('query-suite', rollupTestConfig), + ]); + }); +} + +function silenceWarnings(config) { + function addEmptyWarningHandler(configObj) { + configObj["onwarn"] = function() {}; + return configObj; + } + + if (Array.isArray(config)) { + return config.map(addEmptyWarningHandler); + } else { + return addEmptyWarningHandler(config); + } +} + +function notify(title, message) { + if (!process.env.DISABLE_BUILD_NOTIFICATIONS) { + notifier.notify({title, message}); + } +} diff --git a/metrics/integration/testem_page.html b/metrics/integration/testem_page.html new file mode 100644 index 00000000000..7cdc390cfa0 --- /dev/null +++ b/metrics/integration/testem_page.html @@ -0,0 +1,14 @@ + + + + Mapbox GL JS Integration Tests + + + + + + + + + + \ No newline at end of file diff --git a/metrics/integration/tiles/0-0-0.mvt b/metrics/integration/tiles/0-0-0.mvt new file mode 100644 index 00000000000..39bcebd0127 Binary files /dev/null and b/metrics/integration/tiles/0-0-0.mvt differ diff --git a/metrics/integration/tiles/0-0-0.png b/metrics/integration/tiles/0-0-0.png new file mode 100644 index 00000000000..9031ca53971 Binary files /dev/null and b/metrics/integration/tiles/0-0-0.png differ diff --git a/metrics/integration/tiles/1-0-0.cross-fade.png b/metrics/integration/tiles/1-0-0.cross-fade.png new file mode 100644 index 00000000000..407e67edc69 Binary files /dev/null and b/metrics/integration/tiles/1-0-0.cross-fade.png differ diff --git a/metrics/integration/tiles/1-0-0.satellite.png b/metrics/integration/tiles/1-0-0.satellite.png new file mode 100644 index 00000000000..8752a1f5645 Binary files /dev/null and b/metrics/integration/tiles/1-0-0.satellite.png differ diff --git a/metrics/integration/tiles/1-0-1.cross-fade.png b/metrics/integration/tiles/1-0-1.cross-fade.png new file mode 100644 index 00000000000..407e67edc69 Binary files /dev/null and b/metrics/integration/tiles/1-0-1.cross-fade.png differ diff --git a/metrics/integration/tiles/1-0-1.satellite.png b/metrics/integration/tiles/1-0-1.satellite.png new file mode 100644 index 00000000000..26e2b475f27 Binary files /dev/null and b/metrics/integration/tiles/1-0-1.satellite.png differ diff --git a/metrics/integration/tiles/1-1-0.cross-fade.png b/metrics/integration/tiles/1-1-0.cross-fade.png new file mode 100644 index 00000000000..407e67edc69 Binary files /dev/null and b/metrics/integration/tiles/1-1-0.cross-fade.png differ diff --git a/metrics/integration/tiles/1-1-0.satellite.png b/metrics/integration/tiles/1-1-0.satellite.png new file mode 100644 index 00000000000..102cd024d21 Binary files /dev/null and b/metrics/integration/tiles/1-1-0.satellite.png differ diff --git a/metrics/integration/tiles/1-1-1.cross-fade.png b/metrics/integration/tiles/1-1-1.cross-fade.png new file mode 100644 index 00000000000..407e67edc69 Binary files /dev/null and b/metrics/integration/tiles/1-1-1.cross-fade.png differ diff --git a/metrics/integration/tiles/1-1-1.satellite.png b/metrics/integration/tiles/1-1-1.satellite.png new file mode 100644 index 00000000000..adc14c8d2b4 Binary files /dev/null and b/metrics/integration/tiles/1-1-1.satellite.png differ diff --git a/metrics/integration/tiles/11-327-791.contour.png b/metrics/integration/tiles/11-327-791.contour.png new file mode 100644 index 00000000000..6ef1ced5dd6 Binary files /dev/null and b/metrics/integration/tiles/11-327-791.contour.png differ diff --git a/metrics/integration/tiles/12-758-1608.satellite.png b/metrics/integration/tiles/12-758-1608.satellite.png new file mode 100644 index 00000000000..41273a92742 Binary files /dev/null and b/metrics/integration/tiles/12-758-1608.satellite.png differ diff --git a/metrics/integration/tiles/12-758-1608.terrain.png b/metrics/integration/tiles/12-758-1608.terrain.png new file mode 100644 index 00000000000..cf11901c3c2 Binary files /dev/null and b/metrics/integration/tiles/12-758-1608.terrain.png differ diff --git a/metrics/integration/tiles/12-758-1609.satellite.png b/metrics/integration/tiles/12-758-1609.satellite.png new file mode 100644 index 00000000000..93a28fc4883 Binary files /dev/null and b/metrics/integration/tiles/12-758-1609.satellite.png differ diff --git a/metrics/integration/tiles/12-758-1609.terrain.png b/metrics/integration/tiles/12-758-1609.terrain.png new file mode 100644 index 00000000000..b29e3df602d Binary files /dev/null and b/metrics/integration/tiles/12-758-1609.terrain.png differ diff --git a/metrics/integration/tiles/12-759-1608.satellite.png b/metrics/integration/tiles/12-759-1608.satellite.png new file mode 100644 index 00000000000..3300c60d8be Binary files /dev/null and b/metrics/integration/tiles/12-759-1608.satellite.png differ diff --git a/metrics/integration/tiles/12-759-1608.terrain.png b/metrics/integration/tiles/12-759-1608.terrain.png new file mode 100644 index 00000000000..db1a0be2770 Binary files /dev/null and b/metrics/integration/tiles/12-759-1608.terrain.png differ diff --git a/metrics/integration/tiles/12-759-1608.terrarium.png b/metrics/integration/tiles/12-759-1608.terrarium.png new file mode 100644 index 00000000000..8587a6663d1 Binary files /dev/null and b/metrics/integration/tiles/12-759-1608.terrarium.png differ diff --git a/metrics/integration/tiles/12-759-1609.satellite.png b/metrics/integration/tiles/12-759-1609.satellite.png new file mode 100644 index 00000000000..d466c718ac1 Binary files /dev/null and b/metrics/integration/tiles/12-759-1609.satellite.png differ diff --git a/metrics/integration/tiles/12-759-1609.terrain.png b/metrics/integration/tiles/12-759-1609.terrain.png new file mode 100644 index 00000000000..4910c8d494b Binary files /dev/null and b/metrics/integration/tiles/12-759-1609.terrain.png differ diff --git a/metrics/integration/tiles/13-1308-3164.contour.png b/metrics/integration/tiles/13-1308-3164.contour.png new file mode 100644 index 00000000000..b653682b68c Binary files /dev/null and b/metrics/integration/tiles/13-1308-3164.contour.png differ diff --git a/metrics/integration/tiles/14-2617-6329.contour.png b/metrics/integration/tiles/14-2617-6329.contour.png new file mode 100644 index 00000000000..8a06d5619a3 Binary files /dev/null and b/metrics/integration/tiles/14-2617-6329.contour.png differ diff --git a/metrics/integration/tiles/14-4357-6245.mvt b/metrics/integration/tiles/14-4357-6245.mvt new file mode 100644 index 00000000000..64604eb496a Binary files /dev/null and b/metrics/integration/tiles/14-4357-6245.mvt differ diff --git a/metrics/integration/tiles/14-8802-5374.mvt b/metrics/integration/tiles/14-8802-5374.mvt new file mode 100644 index 00000000000..bbda53d2a36 Binary files /dev/null and b/metrics/integration/tiles/14-8802-5374.mvt differ diff --git a/metrics/integration/tiles/14-8802-5375.mvt b/metrics/integration/tiles/14-8802-5375.mvt new file mode 100644 index 00000000000..0cbc8867ab8 Binary files /dev/null and b/metrics/integration/tiles/14-8802-5375.mvt differ diff --git a/metrics/integration/tiles/14-8803-5374.mvt b/metrics/integration/tiles/14-8803-5374.mvt new file mode 100644 index 00000000000..9fec68c05b6 Binary files /dev/null and b/metrics/integration/tiles/14-8803-5374.mvt differ diff --git a/metrics/integration/tiles/14-8803-5375.mvt b/metrics/integration/tiles/14-8803-5375.mvt new file mode 100644 index 00000000000..de58b8b1856 Binary files /dev/null and b/metrics/integration/tiles/14-8803-5375.mvt differ diff --git a/metrics/integration/tiles/15-5235-12658.contour.png b/metrics/integration/tiles/15-5235-12658.contour.png new file mode 100644 index 00000000000..ca2222ca48c Binary files /dev/null and b/metrics/integration/tiles/15-5235-12658.contour.png differ diff --git a/metrics/integration/tiles/17-70420-42997.satellite.png b/metrics/integration/tiles/17-70420-42997.satellite.png new file mode 100644 index 00000000000..9623468af46 Binary files /dev/null and b/metrics/integration/tiles/17-70420-42997.satellite.png differ diff --git a/metrics/integration/tiles/17-70420-42998.satellite.png b/metrics/integration/tiles/17-70420-42998.satellite.png new file mode 100644 index 00000000000..dfd6b9caf87 Binary files /dev/null and b/metrics/integration/tiles/17-70420-42998.satellite.png differ diff --git a/metrics/integration/tiles/17-70421-42997.satellite.png b/metrics/integration/tiles/17-70421-42997.satellite.png new file mode 100644 index 00000000000..568ec57ebac Binary files /dev/null and b/metrics/integration/tiles/17-70421-42997.satellite.png differ diff --git a/metrics/integration/tiles/17-70421-42998.satellite.png b/metrics/integration/tiles/17-70421-42998.satellite.png new file mode 100644 index 00000000000..e90cd693cb4 Binary files /dev/null and b/metrics/integration/tiles/17-70421-42998.satellite.png differ diff --git a/metrics/integration/tiles/17-70422-42997.satellite.png b/metrics/integration/tiles/17-70422-42997.satellite.png new file mode 100644 index 00000000000..642969d7142 Binary files /dev/null and b/metrics/integration/tiles/17-70422-42997.satellite.png differ diff --git a/metrics/integration/tiles/17-70422-42998.satellite.png b/metrics/integration/tiles/17-70422-42998.satellite.png new file mode 100644 index 00000000000..ab124975736 Binary files /dev/null and b/metrics/integration/tiles/17-70422-42998.satellite.png differ diff --git a/metrics/integration/tiles/2-1-1.cross-fade.png b/metrics/integration/tiles/2-1-1.cross-fade.png new file mode 100644 index 00000000000..a898a55b270 Binary files /dev/null and b/metrics/integration/tiles/2-1-1.cross-fade.png differ diff --git a/metrics/integration/tiles/2-1-1.mvt b/metrics/integration/tiles/2-1-1.mvt new file mode 100644 index 00000000000..8db68f19ab1 Binary files /dev/null and b/metrics/integration/tiles/2-1-1.mvt differ diff --git a/metrics/integration/tiles/2-1-1.tms.mvt b/metrics/integration/tiles/2-1-1.tms.mvt new file mode 100644 index 00000000000..bf6f3d275c8 Binary files /dev/null and b/metrics/integration/tiles/2-1-1.tms.mvt differ diff --git a/metrics/integration/tiles/2-1-2.cross-fade.png b/metrics/integration/tiles/2-1-2.cross-fade.png new file mode 100644 index 00000000000..a898a55b270 Binary files /dev/null and b/metrics/integration/tiles/2-1-2.cross-fade.png differ diff --git a/metrics/integration/tiles/2-1-2.mvt b/metrics/integration/tiles/2-1-2.mvt new file mode 100644 index 00000000000..bf6f3d275c8 Binary files /dev/null and b/metrics/integration/tiles/2-1-2.mvt differ diff --git a/metrics/integration/tiles/2-1-2.tms.mvt b/metrics/integration/tiles/2-1-2.tms.mvt new file mode 100644 index 00000000000..8db68f19ab1 Binary files /dev/null and b/metrics/integration/tiles/2-1-2.tms.mvt differ diff --git a/metrics/integration/tiles/2-2-1.cross-fade.png b/metrics/integration/tiles/2-2-1.cross-fade.png new file mode 100644 index 00000000000..a898a55b270 Binary files /dev/null and b/metrics/integration/tiles/2-2-1.cross-fade.png differ diff --git a/metrics/integration/tiles/2-2-1.mvt b/metrics/integration/tiles/2-2-1.mvt new file mode 100644 index 00000000000..3eee546d842 Binary files /dev/null and b/metrics/integration/tiles/2-2-1.mvt differ diff --git a/metrics/integration/tiles/2-2-1.tms.mvt b/metrics/integration/tiles/2-2-1.tms.mvt new file mode 100644 index 00000000000..45341c5a355 Binary files /dev/null and b/metrics/integration/tiles/2-2-1.tms.mvt differ diff --git a/metrics/integration/tiles/2-2-2.cross-fade.png b/metrics/integration/tiles/2-2-2.cross-fade.png new file mode 100644 index 00000000000..a898a55b270 Binary files /dev/null and b/metrics/integration/tiles/2-2-2.cross-fade.png differ diff --git a/metrics/integration/tiles/2-2-2.mvt b/metrics/integration/tiles/2-2-2.mvt new file mode 100644 index 00000000000..45341c5a355 Binary files /dev/null and b/metrics/integration/tiles/2-2-2.mvt differ diff --git a/metrics/integration/tiles/2-2-2.tms.mvt b/metrics/integration/tiles/2-2-2.tms.mvt new file mode 100644 index 00000000000..3eee546d842 Binary files /dev/null and b/metrics/integration/tiles/2-2-2.tms.mvt differ diff --git a/metrics/integration/tiles/alpha.png b/metrics/integration/tiles/alpha.png new file mode 100644 index 00000000000..8877f3131ee Binary files /dev/null and b/metrics/integration/tiles/alpha.png differ diff --git a/metrics/integration/tiles/counties-7-37-48.mvt b/metrics/integration/tiles/counties-7-37-48.mvt new file mode 100644 index 00000000000..fde87ea04c6 Binary files /dev/null and b/metrics/integration/tiles/counties-7-37-48.mvt differ diff --git a/metrics/integration/tiles/extent-1024.mvt b/metrics/integration/tiles/extent-1024.mvt new file mode 100644 index 00000000000..ddd99c0379e Binary files /dev/null and b/metrics/integration/tiles/extent-1024.mvt differ diff --git a/metrics/integration/tiles/extent1024-0-0-0.mvt b/metrics/integration/tiles/extent1024-0-0-0.mvt new file mode 100644 index 00000000000..39bcebd0127 Binary files /dev/null and b/metrics/integration/tiles/extent1024-0-0-0.mvt differ diff --git a/metrics/integration/tiles/extent1024-14-8802-5374.mvt b/metrics/integration/tiles/extent1024-14-8802-5374.mvt new file mode 100644 index 00000000000..bbda53d2a36 Binary files /dev/null and b/metrics/integration/tiles/extent1024-14-8802-5374.mvt differ diff --git a/metrics/integration/tiles/mapbox.mapbox-streets-v7/0-0-0.mvt b/metrics/integration/tiles/mapbox.mapbox-streets-v7/0-0-0.mvt new file mode 100644 index 00000000000..6cf3d29de93 Binary files /dev/null and b/metrics/integration/tiles/mapbox.mapbox-streets-v7/0-0-0.mvt differ diff --git a/metrics/integration/tiles/mapbox.mapbox-streets-v7/10-175-409.mvt b/metrics/integration/tiles/mapbox.mapbox-streets-v7/10-175-409.mvt new file mode 100644 index 00000000000..90d4416f3cf Binary files /dev/null and b/metrics/integration/tiles/mapbox.mapbox-streets-v7/10-175-409.mvt differ diff --git a/metrics/integration/tiles/mapbox.mapbox-streets-v7/11-351-818.mvt b/metrics/integration/tiles/mapbox.mapbox-streets-v7/11-351-818.mvt new file mode 100644 index 00000000000..ed31ed97636 Binary files /dev/null and b/metrics/integration/tiles/mapbox.mapbox-streets-v7/11-351-818.mvt differ diff --git a/metrics/integration/tiles/mapbox.mapbox-streets-v7/16-11235-26208.mvt b/metrics/integration/tiles/mapbox.mapbox-streets-v7/16-11235-26208.mvt new file mode 100644 index 00000000000..2d27c088316 Binary files /dev/null and b/metrics/integration/tiles/mapbox.mapbox-streets-v7/16-11235-26208.mvt differ diff --git a/metrics/integration/tiles/mapbox.mapbox-streets-v7/4-4-7.mvt b/metrics/integration/tiles/mapbox.mapbox-streets-v7/4-4-7.mvt new file mode 100644 index 00000000000..165933a01e7 Binary files /dev/null and b/metrics/integration/tiles/mapbox.mapbox-streets-v7/4-4-7.mvt differ diff --git a/metrics/integration/tiles/mapbox.mapbox-streets-v7/4-5-7.mvt b/metrics/integration/tiles/mapbox.mapbox-streets-v7/4-5-7.mvt new file mode 100644 index 00000000000..c95286ad0d7 Binary files /dev/null and b/metrics/integration/tiles/mapbox.mapbox-streets-v7/4-5-7.mvt differ diff --git a/metrics/integration/tiles/mapbox.satellite/1-0-0.png b/metrics/integration/tiles/mapbox.satellite/1-0-0.png new file mode 100644 index 00000000000..8752a1f5645 Binary files /dev/null and b/metrics/integration/tiles/mapbox.satellite/1-0-0.png differ diff --git a/metrics/integration/tiles/mapbox.satellite/1-0-1.png b/metrics/integration/tiles/mapbox.satellite/1-0-1.png new file mode 100644 index 00000000000..26e2b475f27 Binary files /dev/null and b/metrics/integration/tiles/mapbox.satellite/1-0-1.png differ diff --git a/metrics/integration/tiles/mapbox.satellite/1-1-0.png b/metrics/integration/tiles/mapbox.satellite/1-1-0.png new file mode 100644 index 00000000000..102cd024d21 Binary files /dev/null and b/metrics/integration/tiles/mapbox.satellite/1-1-0.png differ diff --git a/metrics/integration/tiles/mapbox.satellite/1-1-1.png b/metrics/integration/tiles/mapbox.satellite/1-1-1.png new file mode 100644 index 00000000000..adc14c8d2b4 Binary files /dev/null and b/metrics/integration/tiles/mapbox.satellite/1-1-1.png differ diff --git a/metrics/integration/tiles/package.json b/metrics/integration/tiles/package.json new file mode 100644 index 00000000000..2512409a4b0 --- /dev/null +++ b/metrics/integration/tiles/package.json @@ -0,0 +1,5 @@ +{ + "dependencies": { + "mapnik": "~3.6.2" + } +} diff --git a/metrics/integration/tiles/sparse/0-0-0.mvt b/metrics/integration/tiles/sparse/0-0-0.mvt new file mode 100644 index 00000000000..6cf3d29de93 Binary files /dev/null and b/metrics/integration/tiles/sparse/0-0-0.mvt differ diff --git a/metrics/integration/tiles/upgrade.js b/metrics/integration/tiles/upgrade.js new file mode 100644 index 00000000000..5a096b99b45 --- /dev/null +++ b/metrics/integration/tiles/upgrade.js @@ -0,0 +1,46 @@ +/* eslint-disable import/unambiguous, import/no-commonjs */ + +const mapnik = require('mapnik'); +const fs = require('fs'); +const queue = require('d3').queue; + +function upgrade(z, x, y, path, callback) { + console.log('Updating ', path); + const buffer = fs.readFileSync(path); + const vt = new mapnik.VectorTile(z, x, y); + vt.addData(buffer, {upgrade: true, validate: true}, (err) => { + if (err) throw err; + fs.writeFileSync(path, vt.getDataSync()); + callback(); + }); +} + +function createExtent1024(callback) { + console.log('Creating extent1024'); + const buffer = fs.readFileSync('14-8802-5374.mvt'); + const vt = new mapnik.VectorTile(14, 8802, 5374, {tileSize: 1024}); + vt.addData(buffer, {validate: true}, (err) => { + if (err) throw err; + fs.writeFileSync('extent1024-14-8802-5374.mvt', vt.getDataSync()); + callback(); + }); +} + +const q = queue(1); + +q.defer(upgrade, 0, 0, 0, '0-0-0.mvt'); +q.defer(upgrade, 14, 8802, 5374, '14-8802-5374.mvt'); +q.defer(upgrade, 14, 8802, 5375, '14-8802-5375.mvt'); +q.defer(upgrade, 14, 8803, 5374, '14-8803-5374.mvt'); +q.defer(upgrade, 14, 8803, 5375, '14-8803-5375.mvt'); +q.defer(upgrade, 2, 1, 1, '2-1-1.mvt'); +q.defer(upgrade, 2, 1, 2, '2-1-2.mvt'); +q.defer(upgrade, 2, 2, 1, '2-2-1.mvt'); +q.defer(upgrade, 2, 2, 2, '2-2-2.mvt'); +q.defer(upgrade, 7, 37, 48, 'counties-7-37-48.mvt'); +q.defer(createExtent1024); + +q.await((err) => { + if (err) throw err; + console.log('Done.'); +}); diff --git a/metrics/integration/tilesets/mapbox.mapbox-streets-v7 b/metrics/integration/tilesets/mapbox.mapbox-streets-v7 new file mode 100644 index 00000000000..a8aeb2567b9 --- /dev/null +++ b/metrics/integration/tilesets/mapbox.mapbox-streets-v7 @@ -0,0 +1,5 @@ +{ + "tiles": [ + "http://localhost:2900/tiles/mapbox.mapbox-streets-v7/{z}-{x}-{y}.mvt" + ] +} diff --git a/metrics/integration/tilesets/mapbox.satellite b/metrics/integration/tilesets/mapbox.satellite new file mode 100644 index 00000000000..0494642259f --- /dev/null +++ b/metrics/integration/tilesets/mapbox.satellite @@ -0,0 +1,5 @@ +{ + "tiles": [ + "http://localhost:2900/tiles/mapbox.satellite/{z}-{x}-{y}.png" + ] +} diff --git a/metrics/integration/tilesets/raster.json b/metrics/integration/tilesets/raster.json new file mode 100644 index 00000000000..f1aa8b06361 --- /dev/null +++ b/metrics/integration/tilesets/raster.json @@ -0,0 +1,5 @@ +{ + "tiles": [ + "http://localhost:2900/tiles/{z}-{x}-{y}.satellite.png" + ] +} diff --git a/metrics/integration/tilesets/vector.json b/metrics/integration/tilesets/vector.json new file mode 100644 index 00000000000..6fd75103680 --- /dev/null +++ b/metrics/integration/tilesets/vector.json @@ -0,0 +1,5 @@ +{ + "tiles": [ + "http://localhost:2900/tiles/{z}-{x}-{y}.mvt" + ] +} diff --git a/metrics/integration/video/0.png b/metrics/integration/video/0.png new file mode 100644 index 00000000000..15db2edd536 Binary files /dev/null and b/metrics/integration/video/0.png differ diff --git a/metrics/linux-clang8-release-style.json b/metrics/linux-clang8-release-style.json index 8e3c90f4747..d67e62e670a 100644 --- a/metrics/linux-clang8-release-style.json +++ b/metrics/linux-clang8-release-style.json @@ -1,5 +1,5 @@ { - "base_test_path": "../maplibre-gl-js/test/integration", + "base_test_path": "integration", "cache_path": "cache-style.db", "expectation_paths": [ "expectations/platform-all" diff --git a/metrics/linux-gcc8-debug-coverage-style.json b/metrics/linux-gcc8-debug-coverage-style.json index 09eafcc9649..d5e2f28dc37 100644 --- a/metrics/linux-gcc8-debug-coverage-style.json +++ b/metrics/linux-gcc8-debug-coverage-style.json @@ -1,5 +1,5 @@ { - "base_test_path": "../maplibre-gl-js/test/integration", + "base_test_path": "integration", "cache_path": "cache-style.db", "expectation_paths": [ "expectations/platform-all" diff --git a/metrics/linux-gcc8-release-style.json b/metrics/linux-gcc8-release-style.json index accfaf30073..8869ee8a481 100644 --- a/metrics/linux-gcc8-release-style.json +++ b/metrics/linux-gcc8-release-style.json @@ -1,5 +1,5 @@ { - "base_test_path": "../maplibre-gl-js/test/integration", + "base_test_path": "integration", "cache_path": "cache-style.db", "expectation_paths": [ "expectations/platform-all" diff --git a/metrics/linux-tsan-style.json b/metrics/linux-tsan-style.json index 09eafcc9649..d5e2f28dc37 100644 --- a/metrics/linux-tsan-style.json +++ b/metrics/linux-tsan-style.json @@ -1,5 +1,5 @@ { - "base_test_path": "../maplibre-gl-js/test/integration", + "base_test_path": "integration", "cache_path": "cache-style.db", "expectation_paths": [ "expectations/platform-all" diff --git a/metrics/linux-ubsan-style.json b/metrics/linux-ubsan-style.json index 09eafcc9649..d5e2f28dc37 100644 --- a/metrics/linux-ubsan-style.json +++ b/metrics/linux-ubsan-style.json @@ -1,5 +1,5 @@ { - "base_test_path": "../maplibre-gl-js/test/integration", + "base_test_path": "integration", "cache_path": "cache-style.db", "expectation_paths": [ "expectations/platform-all" diff --git a/metrics/macos-xcode11-debug-style.json b/metrics/macos-xcode11-debug-style.json index 40f339dc9a9..a531fcf3d12 100644 --- a/metrics/macos-xcode11-debug-style.json +++ b/metrics/macos-xcode11-debug-style.json @@ -1,5 +1,5 @@ { - "base_test_path": "../maplibre-gl-js/test/integration", + "base_test_path": "integration", "cache_path": "cache-style.db", "expectation_paths": [ "expectations/platform-all" diff --git a/metrics/macos-xcode11-release-style.json b/metrics/macos-xcode11-release-style.json index bfde0ec0447..dc8916ae2ae 100644 --- a/metrics/macos-xcode11-release-style.json +++ b/metrics/macos-xcode11-release-style.json @@ -1,5 +1,5 @@ { - "base_test_path": "../maplibre-gl-js/test/integration", + "base_test_path": "integration", "cache_path": "cache-style.db", "expectation_paths": [ "expectations/platform-all" diff --git a/platform/android/Makefile b/platform/android/Makefile index da8af816163..fd108eba1be 100644 --- a/platform/android/Makefile +++ b/platform/android/Makefile @@ -86,13 +86,13 @@ android-core-test-$1: android-test-lib-$1 run-android-core-test-$1-%: android-core-test-$1 # Ensure clean state on the device - adb shell "rm -Rf $(MBGL_ANDROID_LOCAL_WORK_DIR) && mkdir -p $(MBGL_ANDROID_LOCAL_WORK_DIR)/test && mkdir -p $(MBGL_ANDROID_LOCAL_WORK_DIR)/maplibre-gl-js/src/style-spec/reference" + adb shell "rm -Rf $(MBGL_ANDROID_LOCAL_WORK_DIR) && mkdir -p $(MBGL_ANDROID_LOCAL_WORK_DIR)/test && mkdir -p $(MBGL_ANDROID_LOCAL_WORK_DIR)/scripts/style-spec-reference" # Push all needed files to the device adb push $(MBGL_ANDROID_CORE_TEST_DIR)/classes.dex $(MBGL_ANDROID_LOCAL_WORK_DIR) > /dev/null 2>&1 adb push MapboxGLAndroidSDK/build/intermediates/intermediate-jars/$(buildtype)/jni/$2/libmapbox-gl.so $(MBGL_ANDROID_LOCAL_WORK_DIR) > /dev/null 2>&1 adb push test/fixtures $(MBGL_ANDROID_LOCAL_WORK_DIR)/test > /dev/null 2>&1 - adb push maplibre-gl-js/src/style-spec/reference/v8.json $(MBGL_ANDROID_LOCAL_WORK_DIR)/maplibre-gl-js/src/style-spec/reference > /dev/null 2>&1 + adb push scripts/style-spec-reference/v8.json $(MBGL_ANDROID_LOCAL_WORK_DIR)/scripts/style-spec-reference > /dev/null 2>&1 adb push MapboxGLAndroidSDK/build/intermediates/cmake/$(buildtype)/obj/$2/mbgl-test $(MBGL_ANDROID_LOCAL_WORK_DIR) > /dev/null 2>&1 # Create gtest filter for skipped tests. @@ -171,7 +171,7 @@ run-android-render-test-$1: $(BUILD_DEPS) rm -rf build/render-test/mapbox/ # copy test definitions & ignore file to test app assets folder, clear old ones first rm -rf MapboxGLAndroidSDKTestApp/src/main/assets/integration - cp -r maplibre-gl-js/test/integration MapboxGLAndroidSDKTestApp/src/main/assets + cp -r metrics/integration MapboxGLAndroidSDKTestApp/src/main/assets cp platform/node/test/ignores.json MapboxGLAndroidSDKTestApp/src/main/assets/integration/ignores.json # run RenderTest.java to generate static map images $(MBGL_ANDROID_GRADLE) -Pmapbox.abis=$2 :MapboxGLAndroidSDKTestApp:connectedAndroidTest -Pandroid.testInstrumentationRunnerArguments.class="com.mapbox.mapboxsdk.testapp.render.RenderTest" diff --git a/platform/android/scripts/run-render-test.py b/platform/android/scripts/run-render-test.py index afc041ca907..5f984e46feb 100644 --- a/platform/android/scripts/run-render-test.py +++ b/platform/android/scripts/run-render-test.py @@ -9,7 +9,7 @@ for cat in os.listdir(catPath): testPath = catPath + cat + "/" for test in os.listdir(testPath): - inputPath = os.getcwd() + "../../../maplibre-gl-js/test/integration/render-tests/" + cat + "/" + test + inputPath = os.getcwd() + "../../../metrics/integration/render-tests/" + cat + "/" + test outputPath = testPath + test expected = outputPath + "/expected.png" diff --git a/platform/ios/ios-test-runners.cmake b/platform/ios/ios-test-runners.cmake index 3d68a76eecd..6e94d25d6a5 100644 --- a/platform/ios/ios-test-runners.cmake +++ b/platform/ios/ios-test-runners.cmake @@ -91,8 +91,8 @@ if(MBGL_IOS_UNIT_TEST) execute_process(COMMAND ditto ${PROJECT_SOURCE_DIR}/test/fixtures ${CMAKE_CURRENT_BINARY_DIR}/test-data/test/fixtures) execute_process( COMMAND - ditto ${PROJECT_SOURCE_DIR}/maplibre-gl-js/src/style-spec/reference - ${CMAKE_CURRENT_BINARY_DIR}/test-data/maplibre-gl-js/src/style-spec/reference + ditto ${PROJECT_SOURCE_DIR}/scripts/style-spec-reference + ${CMAKE_CURRENT_BINARY_DIR}/test-data/scripts/style-spec-reference ) set(RESOURCES ${PROJECT_SOURCE_DIR}/platform/ios/test/common/Main.storyboard diff --git a/platform/ios/scripts/style-spec.js b/platform/ios/scripts/style-spec.js index 499340e5f76..cca70ce6ead 100644 --- a/platform/ios/scripts/style-spec.js +++ b/platform/ios/scripts/style-spec.js @@ -1 +1 @@ -module.exports = require('../../../maplibre-gl-js/src/style-spec/reference/v8'); +module.exports = require('../../..//scripts/style-spec-reference/v8'); diff --git a/platform/node/test/expression.test.js b/platform/node/test/expression.test.js index 531d2a6ade0..559fa79de42 100644 --- a/platform/node/test/expression.test.js +++ b/platform/node/test/expression.test.js @@ -1,4 +1,4 @@ -const {run} = require('../../../maplibre-gl-js/test/integration/lib/expression'); +const {run} = require('../../../metrics/integration/lib/expression'); const mbgl = require('../index'); const ignores = require('./ignores.json'); diff --git a/platform/node/test/query.test.js b/platform/node/test/query.test.js index 982e0274d63..2e626c30ba1 100644 --- a/platform/node/test/query.test.js +++ b/platform/node/test/query.test.js @@ -1,4 +1,4 @@ -import {run} from '../../../maplibre-gl-js/test/integration/lib/query'; +import {run} from '../../../metrics/integration/lib/query'; import implementation from './suite_implementation'; import ignores from './ignores.json'; diff --git a/platform/node/test/render.test.js b/platform/node/test/render.test.js index aeec0e87661..a58d80d8634 100644 --- a/platform/node/test/render.test.js +++ b/platform/node/test/render.test.js @@ -1,4 +1,4 @@ -import {run} from '../../../maplibre-gl-js/test/integration/lib/render'; +import {run} from '../../../metrics/integration/lib/render'; import implementation from './suite_implementation'; import ignores from './ignores.json'; diff --git a/platform/node/test/suite_implementation.js b/platform/node/test/suite_implementation.js index dd713dd491c..8c7d0544b9e 100644 --- a/platform/node/test/suite_implementation.js +++ b/platform/node/test/suite_implementation.js @@ -104,7 +104,7 @@ export default function (style, options, callback) { applyOperations(operations.slice(1), callback); }, operation[1]); } else if (operation[0] === 'addImage' || operation[0] === 'updateImage') { - const img = PNG.sync.read(fs.readFileSync(path.join(__dirname, '../../../maplibre-gl-js/test/integration', operation[2]))); + const img = PNG.sync.read(fs.readFileSync(path.join(__dirname, '../../../metrics/integration', operation[2]))); const testOpts = (operation.length > 3) ? operation[3] : {}; const options = { diff --git a/render-test/android/app/src/main/assets/to_zip.txt b/render-test/android/app/src/main/assets/to_zip.txt index b2cf8df31dc..20726c44e3b 100644 --- a/render-test/android/app/src/main/assets/to_zip.txt +++ b/render-test/android/app/src/main/assets/to_zip.txt @@ -1,5 +1,5 @@ -maplibre-gl-js/test/integration/render-tests/ -maplibre-gl-js/test/integration/query-tests/ +metrics/integration/render-tests/ +metrics/integration/query-tests/ metrics/expectations/ metrics/ignores/ metrics/tests/ diff --git a/render-test/ios/setup_test_data.sh b/render-test/ios/setup_test_data.sh index 48cb761052b..6c6c20e3dd1 100755 --- a/render-test/ios/setup_test_data.sh +++ b/render-test/ios/setup_test_data.sh @@ -12,8 +12,8 @@ rm -rf $BASE_DIR/test-data/ mkdir -p $BASE_DIR/test-data/integration/ mkdir -p $BASE_DIR/test-data/baselines/ -cp -r maplibre-gl-js/test/integration/render-tests $BASE_DIR/test-data/integration/ -cp -r maplibre-gl-js/test/integration/query-tests $BASE_DIR/test-data/integration/ +cp -r metrics/integration/render-tests $BASE_DIR/test-data/integration/ +cp -r metrics/integration/query-tests $BASE_DIR/test-data/integration/ cp -r metrics/expectations $BASE_DIR/test-data/ cp -r metrics/ignores $BASE_DIR/test-data/ cp -r metrics/tests $BASE_DIR/test-data/ diff --git a/scripts/generate-shaders.js b/scripts/generate-shaders.js index 6212fcd136d..baf3e51b144 100755 --- a/scripts/generate-shaders.js +++ b/scripts/generate-shaders.js @@ -7,7 +7,7 @@ const outputPath = 'src/mbgl/programs'; const zlib = require('zlib'); const crypto = require('crypto'); -var shaders = require('../maplibre-gl-js/src/shaders'); +var shaders = require('../shaders'); require('./style-code'); diff --git a/scripts/style-spec-reference/latest.js b/scripts/style-spec-reference/latest.js new file mode 100644 index 00000000000..ab337fd3976 --- /dev/null +++ b/scripts/style-spec-reference/latest.js @@ -0,0 +1,3 @@ + +import spec from './v8.json'; +export default spec; diff --git a/scripts/style-spec-reference/v8.json b/scripts/style-spec-reference/v8.json new file mode 100644 index 00000000000..525700a109c --- /dev/null +++ b/scripts/style-spec-reference/v8.json @@ -0,0 +1,5798 @@ +{ + "$version": 8, + "$root": { + "version": { + "required": true, + "type": "enum", + "values": [ + 8 + ], + "doc": "Style specification version number. Must be 8.", + "example": 8 + }, + "name": { + "type": "string", + "doc": "A human-readable name for the style.", + "example": "Bright" + }, + "metadata": { + "type": "*", + "doc": "Arbitrary properties useful to track with the stylesheet, but do not influence rendering. Properties should be prefixed to avoid collisions, like 'mapbox:'." + }, + "center": { + "type": "array", + "value": "number", + "doc": "Default map center in longitude and latitude. The style center will be used only if the map has not been positioned by other means (e.g. map options or user interaction).", + "example": [ + -73.9749, + 40.7736 + ] + }, + "zoom": { + "type": "number", + "doc": "Default zoom level. The style zoom will be used only if the map has not been positioned by other means (e.g. map options or user interaction).", + "example": 12.5 + }, + "bearing": { + "type": "number", + "default": 0, + "period": 360, + "units": "degrees", + "doc": "Default bearing, in degrees. The bearing is the compass direction that is \"up\"; for example, a bearing of 90° orients the map so that east is up. This value will be used only if the map has not been positioned by other means (e.g. map options or user interaction).", + "example": 29 + }, + "pitch": { + "type": "number", + "default": 0, + "units": "degrees", + "doc": "Default pitch, in degrees. Zero is perpendicular to the surface, for a look straight down at the map, while a greater value like 60 looks ahead towards the horizon. The style pitch will be used only if the map has not been positioned by other means (e.g. map options or user interaction).", + "example": 50 + }, + "light": { + "type": "light", + "doc": "The global light source.", + "example": { + "anchor": "viewport", + "color": "white", + "intensity": 0.4 + } + }, + "sources": { + "required": true, + "type": "sources", + "doc": "Data source specifications.", + "example": { + "mapbox-streets": { + "type": "vector", + "url": "mapbox://mapbox.mapbox-streets-v6" + } + } + }, + "sprite": { + "type": "string", + "doc": "A base URL for retrieving the sprite image and metadata. The extensions `.png`, `.json` and scale factor `@2x.png` will be automatically appended. This property is required if any layer uses the `background-pattern`, `fill-pattern`, `line-pattern`, `fill-extrusion-pattern`, or `icon-image` properties. The URL must be absolute, containing the [scheme, authority and path components](https://en.wikipedia.org/wiki/URL#Syntax).", + "example": "mapbox://sprites/mapbox/bright-v8" + }, + "glyphs": { + "type": "string", + "doc": "A URL template for loading signed-distance-field glyph sets in PBF format. The URL must include `{fontstack}` and `{range}` tokens. This property is required if any layer uses the `text-field` layout property. The URL must be absolute, containing the [scheme, authority and path components](https://en.wikipedia.org/wiki/URL#Syntax).", + "example": "mapbox://fonts/mapbox/{fontstack}/{range}.pbf" + }, + "transition": { + "type": "transition", + "doc": "A global transition definition to use as a default across properties, to be used for timing transitions between one value and the next when no property-specific transition is set. Collision-based symbol fading is controlled independently of the style's `transition` property.", + "example": { + "duration": 300, + "delay": 0 + } + }, + "layers": { + "required": true, + "type": "array", + "value": "layer", + "doc": "Layers will be drawn in the order of this array.", + "example": [ + { + "id": "water", + "source": "mapbox-streets", + "source-layer": "water", + "type": "fill", + "paint": { + "fill-color": "#00ffff" + } + } + ] + } + }, + "sources": { + "*": { + "type": "source", + "doc": "Specification of a data source. For vector and raster sources, either TileJSON or a URL to a TileJSON must be provided. For image and video sources, a URL must be provided. For GeoJSON sources, a URL or inline GeoJSON must be provided." + } + }, + "source": [ + "source_vector", + "source_raster", + "source_raster_dem", + "source_geojson", + "source_video", + "source_image" + ], + "source_vector": { + "type": { + "required": true, + "type": "enum", + "values": { + "vector": { + "doc": "A vector tile source." + } + }, + "doc": "The type of the source." + }, + "url": { + "type": "string", + "doc": "A URL to a TileJSON resource. Supported protocols are `http:`, `https:`, and `mapbox://`." + }, + "tiles": { + "type": "array", + "value": "string", + "doc": "An array of one or more tile source URLs, as in the TileJSON spec." + }, + "bounds": { + "type": "array", + "value": "number", + "length": 4, + "default": [ + -180, + -85.051129, + 180, + 85.051129 + ], + "doc": "An array containing the longitude and latitude of the southwest and northeast corners of the source's bounding box in the following order: `[sw.lng, sw.lat, ne.lng, ne.lat]`. When this property is included in a source, no tiles outside of the given bounds are requested by Mapbox GL." + }, + "scheme": { + "type": "enum", + "values": { + "xyz": { + "doc": "Slippy map tilenames scheme." + }, + "tms": { + "doc": "OSGeo spec scheme." + } + }, + "default": "xyz", + "doc": "Influences the y direction of the tile coordinates. The global-mercator (aka Spherical Mercator) profile is assumed." + }, + "minzoom": { + "type": "number", + "default": 0, + "doc": "Minimum zoom level for which tiles are available, as in the TileJSON spec." + }, + "maxzoom": { + "type": "number", + "default": 22, + "doc": "Maximum zoom level for which tiles are available, as in the TileJSON spec. Data from tiles at the maxzoom are used when displaying the map at higher zoom levels." + }, + "attribution": { + "type": "string", + "doc": "Contains an attribution to be displayed when the map is shown to a user." + }, + "promoteId": { + "type": "promoteId", + "doc": "A property to use as a feature id (for feature state). Either a property name, or an object of the form `{: }`. If specified as a string for a vector tile source, the same property is used across all its source layers." + }, + "*": { + "type": "*", + "doc": "Other keys to configure the data source." + } + }, + "source_raster": { + "type": { + "required": true, + "type": "enum", + "values": { + "raster": { + "doc": "A raster tile source." + } + }, + "doc": "The type of the source." + }, + "url": { + "type": "string", + "doc": "A URL to a TileJSON resource. Supported protocols are `http:`, `https:`, and `mapbox://`." + }, + "tiles": { + "type": "array", + "value": "string", + "doc": "An array of one or more tile source URLs, as in the TileJSON spec." + }, + "bounds": { + "type": "array", + "value": "number", + "length": 4, + "default": [ + -180, + -85.051129, + 180, + 85.051129 + ], + "doc": "An array containing the longitude and latitude of the southwest and northeast corners of the source's bounding box in the following order: `[sw.lng, sw.lat, ne.lng, ne.lat]`. When this property is included in a source, no tiles outside of the given bounds are requested by Mapbox GL." + }, + "minzoom": { + "type": "number", + "default": 0, + "doc": "Minimum zoom level for which tiles are available, as in the TileJSON spec." + }, + "maxzoom": { + "type": "number", + "default": 22, + "doc": "Maximum zoom level for which tiles are available, as in the TileJSON spec. Data from tiles at the maxzoom are used when displaying the map at higher zoom levels." + }, + "tileSize": { + "type": "number", + "default": 512, + "units": "pixels", + "doc": "The minimum visual size to display tiles for this layer. Only configurable for raster layers." + }, + "scheme": { + "type": "enum", + "values": { + "xyz": { + "doc": "Slippy map tilenames scheme." + }, + "tms": { + "doc": "OSGeo spec scheme." + } + }, + "default": "xyz", + "doc": "Influences the y direction of the tile coordinates. The global-mercator (aka Spherical Mercator) profile is assumed." + }, + "attribution": { + "type": "string", + "doc": "Contains an attribution to be displayed when the map is shown to a user." + }, + "*": { + "type": "*", + "doc": "Other keys to configure the data source." + } + }, + "source_raster_dem": { + "type": { + "required": true, + "type": "enum", + "values": { + "raster-dem": { + "doc": "A RGB-encoded raster DEM source" + } + }, + "doc": "The type of the source." + }, + "url": { + "type": "string", + "doc": "A URL to a TileJSON resource. Supported protocols are `http:`, `https:`, and `mapbox://`." + }, + "tiles": { + "type": "array", + "value": "string", + "doc": "An array of one or more tile source URLs, as in the TileJSON spec." + }, + "bounds": { + "type": "array", + "value": "number", + "length": 4, + "default": [ + -180, + -85.051129, + 180, + 85.051129 + ], + "doc": "An array containing the longitude and latitude of the southwest and northeast corners of the source's bounding box in the following order: `[sw.lng, sw.lat, ne.lng, ne.lat]`. When this property is included in a source, no tiles outside of the given bounds are requested by Mapbox GL." + }, + "minzoom": { + "type": "number", + "default": 0, + "doc": "Minimum zoom level for which tiles are available, as in the TileJSON spec." + }, + "maxzoom": { + "type": "number", + "default": 22, + "doc": "Maximum zoom level for which tiles are available, as in the TileJSON spec. Data from tiles at the maxzoom are used when displaying the map at higher zoom levels." + }, + "tileSize": { + "type": "number", + "default": 512, + "units": "pixels", + "doc": "The minimum visual size to display tiles for this layer. Only configurable for raster layers." + }, + "attribution": { + "type": "string", + "doc": "Contains an attribution to be displayed when the map is shown to a user." + }, + "encoding": { + "type": "enum", + "values": { + "terrarium": { + "doc": "Terrarium format PNG tiles. See https://aws.amazon.com/es/public-datasets/terrain/ for more info." + }, + "mapbox": { + "doc": "Mapbox Terrain RGB tiles. See https://www.mapbox.com/help/access-elevation-data/#mapbox-terrain-rgb for more info." + } + }, + "default": "mapbox", + "doc": "The encoding used by this source. Mapbox Terrain RGB is used by default" + }, + "*": { + "type": "*", + "doc": "Other keys to configure the data source." + } + }, + "source_geojson": { + "type": { + "required": true, + "type": "enum", + "values": { + "geojson": { + "doc": "A GeoJSON data source." + } + }, + "doc": "The data type of the GeoJSON source." + }, + "data": { + "type": "*", + "doc": "A URL to a GeoJSON file, or inline GeoJSON." + }, + "maxzoom": { + "type": "number", + "default": 18, + "doc": "Maximum zoom level at which to create vector tiles (higher means greater detail at high zoom levels)." + }, + "attribution": { + "type": "string", + "doc": "Contains an attribution to be displayed when the map is shown to a user." + }, + "buffer": { + "type": "number", + "default": 128, + "maximum": 512, + "minimum": 0, + "doc": "Size of the tile buffer on each side. A value of 0 produces no buffer. A value of 512 produces a buffer as wide as the tile itself. Larger values produce fewer rendering artifacts near tile edges and slower performance." + }, + "tolerance": { + "type": "number", + "default": 0.375, + "doc": "Douglas-Peucker simplification tolerance (higher means simpler geometries and faster performance)." + }, + "cluster": { + "type": "boolean", + "default": false, + "doc": "If the data is a collection of point features, setting this to true clusters the points by radius into groups. Cluster groups become new `Point` features in the source with additional properties:\n * `cluster` Is `true` if the point is a cluster \n * `cluster_id` A unqiue id for the cluster to be used in conjunction with the [cluster inspection methods](https://www.mapbox.com/mapbox-gl-js/api/#geojsonsource#getclusterexpansionzoom)\n * `point_count` Number of original points grouped into this cluster\n * `point_count_abbreviated` An abbreviated point count" + }, + "clusterRadius": { + "type": "number", + "default": 50, + "minimum": 0, + "doc": "Radius of each cluster if clustering is enabled. A value of 512 indicates a radius equal to the width of a tile." + }, + "clusterMaxZoom": { + "type": "number", + "doc": "Max zoom on which to cluster points if clustering is enabled. Defaults to one zoom less than maxzoom (so that last zoom features are not clustered)." + }, + "clusterProperties": { + "type": "*", + "doc": "An object defining custom properties on the generated clusters if clustering is enabled, aggregating values from clustered points. Has the form `{\"property_name\": [operator, map_expression]}`. `operator` is any expression function that accepts at least 2 operands (e.g. `\"+\"` or `\"max\"`) — it accumulates the property value from clusters/points the cluster contains; `map_expression` produces the value of a single point.\n\nExample: `{\"sum\": [\"+\", [\"get\", \"scalerank\"]]}`.\n\nFor more advanced use cases, in place of `operator`, you can use a custom reduce expression that references a special `[\"accumulated\"]` value, e.g.:\n`{\"sum\": [[\"+\", [\"accumulated\"], [\"get\", \"sum\"]], [\"get\", \"scalerank\"]]}`" + }, + "lineMetrics": { + "type": "boolean", + "default": false, + "doc": "Whether to calculate line distance metrics. This is required for line layers that specify `line-gradient` values." + }, + "generateId": { + "type": "boolean", + "default": false, + "doc": "Whether to generate ids for the geojson features. When enabled, the `feature.id` property will be auto assigned based on its index in the `features` array, over-writing any previous values." + }, + "promoteId": { + "type": "promoteId", + "doc": "A property to use as a feature id (for feature state). Either a property name, or an object of the form `{: }`." + } + }, + "source_video": { + "type": { + "required": true, + "type": "enum", + "values": { + "video": { + "doc": "A video data source." + } + }, + "doc": "The data type of the video source." + }, + "urls": { + "required": true, + "type": "array", + "value": "string", + "doc": "URLs to video content in order of preferred format." + }, + "coordinates": { + "required": true, + "doc": "Corners of video specified in longitude, latitude pairs.", + "type": "array", + "length": 4, + "value": { + "type": "array", + "length": 2, + "value": "number", + "doc": "A single longitude, latitude pair." + } + } + }, + "source_image": { + "type": { + "required": true, + "type": "enum", + "values": { + "image": { + "doc": "An image data source." + } + }, + "doc": "The data type of the image source." + }, + "url": { + "required": true, + "type": "string", + "doc": "URL that points to an image." + }, + "coordinates": { + "required": true, + "doc": "Corners of image specified in longitude, latitude pairs.", + "type": "array", + "length": 4, + "value": { + "type": "array", + "length": 2, + "value": "number", + "doc": "A single longitude, latitude pair." + } + } + }, + "layer": { + "id": { + "type": "string", + "doc": "Unique layer name.", + "required": true + }, + "type": { + "type": "enum", + "values": { + "fill": { + "doc": "A filled polygon with an optional stroked border.", + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "android": "2.0.1", + "ios": "2.0.0", + "macos": "0.1.0" + } + } + }, + "line": { + "doc": "A stroked line.", + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "android": "2.0.1", + "ios": "2.0.0", + "macos": "0.1.0" + } + } + }, + "symbol": { + "doc": "An icon or a text label.", + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "android": "2.0.1", + "ios": "2.0.0", + "macos": "0.1.0" + } + } + }, + "circle": { + "doc": "A filled circle.", + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "android": "2.0.1", + "ios": "2.0.0", + "macos": "0.1.0" + } + } + }, + "heatmap": { + "doc": "A heatmap.", + "sdk-support": { + "basic functionality": { + "js": "0.41.0", + "android": "6.0.0", + "ios": "4.0.0", + "macos": "0.7.0" + } + } + }, + "fill-extrusion": { + "doc": "An extruded (3D) polygon.", + "sdk-support": { + "basic functionality": { + "js": "0.27.0", + "android": "5.1.0", + "ios": "3.6.0", + "macos": "0.5.0" + } + } + }, + "raster": { + "doc": "Raster map textures such as satellite imagery.", + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "android": "2.0.1", + "ios": "2.0.0", + "macos": "0.1.0" + } + } + }, + "hillshade": { + "doc": "Client-side hillshading visualization based on DEM data. Currently, the implementation only supports Mapbox Terrain RGB and Mapzen Terrarium tiles.", + "sdk-support": { + "basic functionality": { + "js": "0.43.0", + "android": "6.0.0", + "ios": "4.0.0", + "macos": "0.7.0" + } + } + }, + "background": { + "doc": "The background color or pattern of the map.", + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "android": "2.0.1", + "ios": "2.0.0", + "macos": "0.1.0" + } + } + } + }, + "doc": "Rendering type of this layer.", + "required": true + }, + "metadata": { + "type": "*", + "doc": "Arbitrary properties useful to track with the layer, but do not influence rendering. Properties should be prefixed to avoid collisions, like 'mapbox:'." + }, + "source": { + "type": "string", + "doc": "Name of a source description to be used for this layer. Required for all layer types except `background`." + }, + "source-layer": { + "type": "string", + "doc": "Layer to use from a vector tile source. Required for vector tile sources; prohibited for all other source types, including GeoJSON sources." + }, + "minzoom": { + "type": "number", + "minimum": 0, + "maximum": 24, + "doc": "The minimum zoom level for the layer. At zoom levels less than the minzoom, the layer will be hidden." + }, + "maxzoom": { + "type": "number", + "minimum": 0, + "maximum": 24, + "doc": "The maximum zoom level for the layer. At zoom levels equal to or greater than the maxzoom, the layer will be hidden." + }, + "filter": { + "type": "filter", + "doc": "A expression specifying conditions on source features. Only features that match the filter are displayed. Zoom expressions in filters are only evaluated at integer zoom levels. The `feature-state` expression is not supported in filter expressions." + }, + "layout": { + "type": "layout", + "doc": "Layout properties for the layer." + }, + "paint": { + "type": "paint", + "doc": "Default paint properties for this layer." + } + }, + "layout": [ + "layout_fill", + "layout_line", + "layout_circle", + "layout_heatmap", + "layout_fill-extrusion", + "layout_symbol", + "layout_raster", + "layout_hillshade", + "layout_background" + ], + "layout_background": { + "visibility": { + "type": "enum", + "values": { + "visible": { + "doc": "The layer is shown." + }, + "none": { + "doc": "The layer is not shown." + } + }, + "default": "visible", + "doc": "Whether this layer is displayed.", + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "android": "2.0.1", + "ios": "2.0.0", + "macos": "0.1.0" + } + }, + "property-type": "constant" + } + }, + "layout_fill": { + "fill-sort-key": { + "type": "number", + "doc": "Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.", + "sdk-support": { + "basic functionality": { + "js": "1.2.0" + }, + "data-driven styling": { + "js": "1.2.0" + } + }, + "expression": { + "interpolated": false, + "parameters": [ + "zoom", + "feature" + ] + }, + "property-type": "data-driven" + }, + "visibility": { + "type": "enum", + "values": { + "visible": { + "doc": "The layer is shown." + }, + "none": { + "doc": "The layer is not shown." + } + }, + "default": "visible", + "doc": "Whether this layer is displayed.", + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "android": "2.0.1", + "ios": "2.0.0", + "macos": "0.1.0" + } + }, + "property-type": "constant" + } + }, + "layout_circle": { + "circle-sort-key": { + "type": "number", + "doc": "Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.", + "sdk-support": { + "basic functionality": { + "js": "1.2.0" + }, + "data-driven styling": { + "js": "1.2.0" + } + }, + "expression": { + "interpolated": false, + "parameters": [ + "zoom", + "feature" + ] + }, + "property-type": "data-driven" + }, + "visibility": { + "type": "enum", + "values": { + "visible": { + "doc": "The layer is shown." + }, + "none": { + "doc": "The layer is not shown." + } + }, + "default": "visible", + "doc": "Whether this layer is displayed.", + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "android": "2.0.1", + "ios": "2.0.0", + "macos": "0.1.0" + } + }, + "property-type": "constant" + } + }, + "layout_heatmap": { + "visibility": { + "type": "enum", + "values": { + "visible": { + "doc": "The layer is shown." + }, + "none": { + "doc": "The layer is not shown." + } + }, + "default": "visible", + "doc": "Whether this layer is displayed.", + "sdk-support": { + "basic functionality": { + "js": "0.41.0", + "android": "6.0.0", + "ios": "4.0.0", + "macos": "0.7.0" + } + }, + "property-type": "constant" + } + }, + "layout_fill-extrusion": { + "visibility": { + "type": "enum", + "values": { + "visible": { + "doc": "The layer is shown." + }, + "none": { + "doc": "The layer is not shown." + } + }, + "default": "visible", + "doc": "Whether this layer is displayed.", + "sdk-support": { + "basic functionality": { + "js": "0.27.0", + "android": "5.1.0", + "ios": "3.6.0", + "macos": "0.5.0" + } + }, + "property-type": "constant" + } + }, + "layout_line": { + "line-cap": { + "type": "enum", + "values": { + "butt": { + "doc": "A cap with a squared-off end which is drawn to the exact endpoint of the line." + }, + "round": { + "doc": "A cap with a rounded end which is drawn beyond the endpoint of the line at a radius of one-half of the line's width and centered on the endpoint of the line." + }, + "square": { + "doc": "A cap with a squared-off end which is drawn beyond the endpoint of the line at a distance of one-half of the line's width." + } + }, + "default": "butt", + "doc": "The display of line endings.", + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "android": "2.0.1", + "ios": "2.0.0", + "macos": "0.1.0" + } + }, + "expression": { + "interpolated": false, + "parameters": [ + "zoom" + ] + }, + "property-type": "data-constant" + }, + "line-join": { + "type": "enum", + "values": { + "bevel": { + "doc": "A join with a squared-off end which is drawn beyond the endpoint of the line at a distance of one-half of the line's width." + }, + "round": { + "doc": "A join with a rounded end which is drawn beyond the endpoint of the line at a radius of one-half of the line's width and centered on the endpoint of the line." + }, + "miter": { + "doc": "A join with a sharp, angled corner which is drawn with the outer sides beyond the endpoint of the path until they meet." + } + }, + "default": "miter", + "doc": "The display of lines when joining.", + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "android": "2.0.1", + "ios": "2.0.0", + "macos": "0.1.0" + }, + "data-driven styling": { + "js": "0.40.0", + "android": "5.2.0", + "ios": "3.7.0", + "macos": "0.6.0" + } + }, + "expression": { + "interpolated": false, + "parameters": [ + "zoom", + "feature" + ] + }, + "property-type": "data-driven" + }, + "line-miter-limit": { + "type": "number", + "default": 2, + "doc": "Used to automatically convert miter joins to bevel joins for sharp angles.", + "requires": [ + { + "line-join": "miter" + } + ], + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "android": "2.0.1", + "ios": "2.0.0", + "macos": "0.1.0" + } + }, + "expression": { + "interpolated": true, + "parameters": [ + "zoom" + ] + }, + "property-type": "data-constant" + }, + "line-round-limit": { + "type": "number", + "default": 1.05, + "doc": "Used to automatically convert round joins to miter joins for shallow angles.", + "requires": [ + { + "line-join": "round" + } + ], + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "android": "2.0.1", + "ios": "2.0.0", + "macos": "0.1.0" + } + }, + "expression": { + "interpolated": true, + "parameters": [ + "zoom" + ] + }, + "property-type": "data-constant" + }, + "line-sort-key": { + "type": "number", + "doc": "Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.", + "sdk-support": { + "basic functionality": { + "js": "1.2.0" + }, + "data-driven styling": { + "js": "1.2.0" + } + }, + "expression": { + "interpolated": false, + "parameters": [ + "zoom", + "feature" + ] + }, + "property-type": "data-driven" + }, + "visibility": { + "type": "enum", + "values": { + "visible": { + "doc": "The layer is shown." + }, + "none": { + "doc": "The layer is not shown." + } + }, + "default": "visible", + "doc": "Whether this layer is displayed.", + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "android": "2.0.1", + "ios": "2.0.0", + "macos": "0.1.0" + } + }, + "property-type": "constant" + } + }, + "layout_symbol": { + "symbol-placement": { + "type": "enum", + "values": { + "point": { + "doc": "The label is placed at the point where the geometry is located." + }, + "line": { + "doc": "The label is placed along the line of the geometry. Can only be used on `LineString` and `Polygon` geometries." + }, + "line-center": { + "doc": "The label is placed at the center of the line of the geometry. Can only be used on `LineString` and `Polygon` geometries. Note that a single feature in a vector tile may contain multiple line geometries." + } + }, + "default": "point", + "doc": "Label placement relative to its geometry.", + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "android": "2.0.1", + "ios": "2.0.0", + "macos": "0.1.0" + }, + "`line-center` value": { + "js": "0.47.0", + "android": "6.4.0", + "ios": "4.3.0", + "macos": "0.10.0" + } + }, + "expression": { + "interpolated": false, + "parameters": [ + "zoom" + ] + }, + "property-type": "data-constant" + }, + "symbol-spacing": { + "type": "number", + "default": 250, + "minimum": 1, + "units": "pixels", + "doc": "Distance between two symbol anchors.", + "requires": [ + { + "symbol-placement": "line" + } + ], + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "android": "2.0.1", + "ios": "2.0.0", + "macos": "0.1.0" + } + }, + "expression": { + "interpolated": true, + "parameters": [ + "zoom" + ] + }, + "property-type": "data-constant" + }, + "symbol-avoid-edges": { + "type": "boolean", + "default": false, + "doc": "If true, the symbols will not cross tile edges to avoid mutual collisions. Recommended in layers that don't have enough padding in the vector tile to prevent collisions, or if it is a point symbol layer placed after a line symbol layer. When using a client that supports global collision detection, like Mapbox GL JS version 0.42.0 or greater, enabling this property is not needed to prevent clipped labels at tile boundaries.", + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "android": "2.0.1", + "ios": "2.0.0", + "macos": "0.1.0" + } + }, + "expression": { + "interpolated": false, + "parameters": [ + "zoom" + ] + }, + "property-type": "data-constant" + }, + "symbol-sort-key": { + "type": "number", + "doc": "Sorts features in ascending order based on this value. Features with lower sort keys are drawn and placed first. When `icon-allow-overlap` or `text-allow-overlap` is `false`, features with a lower sort key will have priority during placement. When `icon-allow-overlap` or `text-allow-overlap` is set to `true`, features with a higher sort key will overlap over features with a lower sort key.", + "sdk-support": { + "basic functionality": { + "js": "0.53.0", + "android": "7.4.0", + "ios": "4.11.0", + "macos": "0.14.0" + }, + "data-driven styling": { + "js": "0.53.0", + "android": "7.4.0", + "ios": "4.11.0", + "macos": "0.14.0" + } + }, + "expression": { + "interpolated": false, + "parameters": [ + "zoom", + "feature" + ] + }, + "property-type": "data-driven" + }, + "symbol-z-order": { + "type": "enum", + "values": { + "auto": { + "doc": "If `symbol-sort-key` is set, sort based on that. Otherwise sort symbols by their y-position relative to the viewport." + }, + "viewport-y": { + "doc": "Symbols will be sorted by their y-position relative to the viewport." + }, + "source": { + "doc": "Symbols will be rendered in the same order as the source data with no sorting applied." + } + }, + "default": "auto", + "doc": "Controls the order in which overlapping symbols in the same layer are rendered", + "sdk-support": { + "basic functionality": { + "js": "0.49.0", + "android": "6.6.0", + "ios": "4.5.0", + "macos": "0.12.0" + } + }, + "expression": { + "interpolated": false, + "parameters": [ + "zoom" + ] + }, + "property-type": "data-constant" + }, + "icon-allow-overlap": { + "type": "boolean", + "default": false, + "doc": "If true, the icon will be visible even if it collides with other previously drawn symbols.", + "requires": [ + "icon-image" + ], + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "android": "2.0.1", + "ios": "2.0.0", + "macos": "0.1.0" + } + }, + "expression": { + "interpolated": false, + "parameters": [ + "zoom" + ] + }, + "property-type": "data-constant" + }, + "icon-ignore-placement": { + "type": "boolean", + "default": false, + "doc": "If true, other symbols can be visible even if they collide with the icon.", + "requires": [ + "icon-image" + ], + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "android": "2.0.1", + "ios": "2.0.0", + "macos": "0.1.0" + } + }, + "expression": { + "interpolated": false, + "parameters": [ + "zoom" + ] + }, + "property-type": "data-constant" + }, + "icon-optional": { + "type": "boolean", + "default": false, + "doc": "If true, text will display without their corresponding icons when the icon collides with other symbols and the text does not.", + "requires": [ + "icon-image", + "text-field" + ], + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "android": "2.0.1", + "ios": "2.0.0", + "macos": "0.1.0" + } + }, + "expression": { + "interpolated": false, + "parameters": [ + "zoom" + ] + }, + "property-type": "data-constant" + }, + "icon-rotation-alignment": { + "type": "enum", + "values": { + "map": { + "doc": "When `symbol-placement` is set to `point`, aligns icons east-west. When `symbol-placement` is set to `line` or `line-center`, aligns icon x-axes with the line." + }, + "viewport": { + "doc": "Produces icons whose x-axes are aligned with the x-axis of the viewport, regardless of the value of `symbol-placement`." + }, + "auto": { + "doc": "When `symbol-placement` is set to `point`, this is equivalent to `viewport`. When `symbol-placement` is set to `line` or `line-center`, this is equivalent to `map`." + } + }, + "default": "auto", + "doc": "In combination with `symbol-placement`, determines the rotation behavior of icons.", + "requires": [ + "icon-image" + ], + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "android": "2.0.1", + "ios": "2.0.0", + "macos": "0.1.0" + }, + "`auto` value": { + "js": "0.25.0", + "android": "4.2.0", + "ios": "3.4.0", + "macos": "0.3.0" + } + }, + "expression": { + "interpolated": false, + "parameters": [ + "zoom" + ] + }, + "property-type": "data-constant" + }, + "icon-size": { + "type": "number", + "default": 1, + "minimum": 0, + "units": "factor of the original icon size", + "doc": "Scales the original size of the icon by the provided factor. The new pixel size of the image will be the original pixel size multiplied by `icon-size`. 1 is the original size; 3 triples the size of the image.", + "requires": [ + "icon-image" + ], + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "android": "2.0.1", + "ios": "2.0.0", + "macos": "0.1.0" + }, + "data-driven styling": { + "js": "0.35.0", + "android": "5.1.0", + "ios": "3.6.0", + "macos": "0.5.0" + } + }, + "expression": { + "interpolated": true, + "parameters": [ + "zoom", + "feature" + ] + }, + "property-type": "data-driven" + }, + "icon-text-fit": { + "type": "enum", + "values": { + "none": { + "doc": "The icon is displayed at its intrinsic aspect ratio." + }, + "width": { + "doc": "The icon is scaled in the x-dimension to fit the width of the text." + }, + "height": { + "doc": "The icon is scaled in the y-dimension to fit the height of the text." + }, + "both": { + "doc": "The icon is scaled in both x- and y-dimensions." + } + }, + "default": "none", + "doc": "Scales the icon to fit around the associated text.", + "requires": [ + "icon-image", + "text-field" + ], + "sdk-support": { + "basic functionality": { + "js": "0.21.0", + "android": "4.2.0", + "ios": "3.4.0", + "macos": "0.2.1" + } + }, + "expression": { + "interpolated": false, + "parameters": [ + "zoom" + ] + }, + "property-type": "data-constant" + }, + "icon-text-fit-padding": { + "type": "array", + "value": "number", + "length": 4, + "default": [ + 0, + 0, + 0, + 0 + ], + "units": "pixels", + "doc": "Size of the additional area added to dimensions determined by `icon-text-fit`, in clockwise order: top, right, bottom, left.", + "requires": [ + "icon-image", + "text-field", + { + "icon-text-fit": [ + "both", + "width", + "height" + ] + } + ], + "sdk-support": { + "basic functionality": { + "js": "0.21.0", + "android": "4.2.0", + "ios": "3.4.0", + "macos": "0.2.1" + } + }, + "expression": { + "interpolated": true, + "parameters": [ + "zoom" + ] + }, + "property-type": "data-constant" + }, + "icon-image": { + "type": "resolvedImage", + "doc": "Name of image in sprite to use for drawing an image background.", + "tokens": true, + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "android": "2.0.1", + "ios": "2.0.0", + "macos": "0.1.0" + }, + "data-driven styling": { + "js": "0.35.0", + "android": "5.1.0", + "ios": "3.6.0", + "macos": "0.5.0" + } + }, + "expression": { + "interpolated": false, + "parameters": [ + "zoom", + "feature" + ] + }, + "property-type": "data-driven" + }, + "icon-rotate": { + "type": "number", + "default": 0, + "period": 360, + "units": "degrees", + "doc": "Rotates the icon clockwise.", + "requires": [ + "icon-image" + ], + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "android": "2.0.1", + "ios": "2.0.0", + "macos": "0.1.0" + }, + "data-driven styling": { + "js": "0.21.0", + "android": "5.0.0", + "ios": "3.5.0", + "macos": "0.4.0" + } + }, + "expression": { + "interpolated": true, + "parameters": [ + "zoom", + "feature" + ] + }, + "property-type": "data-driven" + }, + "icon-padding": { + "type": "number", + "default": 2, + "minimum": 0, + "units": "pixels", + "doc": "Size of the additional area around the icon bounding box used for detecting symbol collisions.", + "requires": [ + "icon-image" + ], + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "android": "2.0.1", + "ios": "2.0.0", + "macos": "0.1.0" + } + }, + "expression": { + "interpolated": true, + "parameters": [ + "zoom" + ] + }, + "property-type": "data-constant" + }, + "icon-keep-upright": { + "type": "boolean", + "default": false, + "doc": "If true, the icon may be flipped to prevent it from being rendered upside-down.", + "requires": [ + "icon-image", + { + "icon-rotation-alignment": "map" + }, + { + "symbol-placement": [ + "line", + "line-center" + ] + } + ], + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "android": "2.0.1", + "ios": "2.0.0", + "macos": "0.1.0" + } + }, + "expression": { + "interpolated": false, + "parameters": [ + "zoom" + ] + }, + "property-type": "data-constant" + }, + "icon-offset": { + "type": "array", + "value": "number", + "length": 2, + "default": [ + 0, + 0 + ], + "doc": "Offset distance of icon from its anchor. Positive values indicate right and down, while negative values indicate left and up. Each component is multiplied by the value of `icon-size` to obtain the final offset in pixels. When combined with `icon-rotate` the offset will be as if the rotated direction was up.", + "requires": [ + "icon-image" + ], + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "android": "2.0.1", + "ios": "2.0.0", + "macos": "0.1.0" + }, + "data-driven styling": { + "js": "0.29.0", + "android": "5.0.0", + "ios": "3.5.0", + "macos": "0.4.0" + } + }, + "expression": { + "interpolated": true, + "parameters": [ + "zoom", + "feature" + ] + }, + "property-type": "data-driven" + }, + "icon-anchor": { + "type": "enum", + "values": { + "center": { + "doc": "The center of the icon is placed closest to the anchor." + }, + "left": { + "doc": "The left side of the icon is placed closest to the anchor." + }, + "right": { + "doc": "The right side of the icon is placed closest to the anchor." + }, + "top": { + "doc": "The top of the icon is placed closest to the anchor." + }, + "bottom": { + "doc": "The bottom of the icon is placed closest to the anchor." + }, + "top-left": { + "doc": "The top left corner of the icon is placed closest to the anchor." + }, + "top-right": { + "doc": "The top right corner of the icon is placed closest to the anchor." + }, + "bottom-left": { + "doc": "The bottom left corner of the icon is placed closest to the anchor." + }, + "bottom-right": { + "doc": "The bottom right corner of the icon is placed closest to the anchor." + } + }, + "default": "center", + "doc": "Part of the icon placed closest to the anchor.", + "requires": [ + "icon-image" + ], + "sdk-support": { + "basic functionality": { + "js": "0.40.0", + "android": "5.2.0", + "ios": "3.7.0", + "macos": "0.6.0" + }, + "data-driven styling": { + "js": "0.40.0", + "android": "5.2.0", + "ios": "3.7.0", + "macos": "0.6.0" + } + }, + "expression": { + "interpolated": false, + "parameters": [ + "zoom", + "feature" + ] + }, + "property-type": "data-driven" + }, + "icon-pitch-alignment": { + "type": "enum", + "values": { + "map": { + "doc": "The icon is aligned to the plane of the map." + }, + "viewport": { + "doc": "The icon is aligned to the plane of the viewport." + }, + "auto": { + "doc": "Automatically matches the value of `icon-rotation-alignment`." + } + }, + "default": "auto", + "doc": "Orientation of icon when map is pitched.", + "requires": [ + "icon-image" + ], + "sdk-support": { + "basic functionality": { + "js": "0.39.0", + "android": "5.2.0", + "ios": "3.7.0", + "macos": "0.6.0" + } + }, + "expression": { + "interpolated": false, + "parameters": [ + "zoom" + ] + }, + "property-type": "data-constant" + }, + "text-pitch-alignment": { + "type": "enum", + "values": { + "map": { + "doc": "The text is aligned to the plane of the map." + }, + "viewport": { + "doc": "The text is aligned to the plane of the viewport." + }, + "auto": { + "doc": "Automatically matches the value of `text-rotation-alignment`." + } + }, + "default": "auto", + "doc": "Orientation of text when map is pitched.", + "requires": [ + "text-field" + ], + "sdk-support": { + "basic functionality": { + "js": "0.21.0", + "android": "4.2.0", + "ios": "3.4.0", + "macos": "0.2.1" + }, + "`auto` value": { + "js": "0.25.0", + "android": "4.2.0", + "ios": "3.4.0", + "macos": "0.3.0" + } + }, + "expression": { + "interpolated": false, + "parameters": [ + "zoom" + ] + }, + "property-type": "data-constant" + }, + "text-rotation-alignment": { + "type": "enum", + "values": { + "map": { + "doc": "When `symbol-placement` is set to `point`, aligns text east-west. When `symbol-placement` is set to `line` or `line-center`, aligns text x-axes with the line." + }, + "viewport": { + "doc": "Produces glyphs whose x-axes are aligned with the x-axis of the viewport, regardless of the value of `symbol-placement`." + }, + "auto": { + "doc": "When `symbol-placement` is set to `point`, this is equivalent to `viewport`. When `symbol-placement` is set to `line` or `line-center`, this is equivalent to `map`." + } + }, + "default": "auto", + "doc": "In combination with `symbol-placement`, determines the rotation behavior of the individual glyphs forming the text.", + "requires": [ + "text-field" + ], + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "android": "2.0.1", + "ios": "2.0.0", + "macos": "0.1.0" + }, + "`auto` value": { + "js": "0.25.0", + "android": "4.2.0", + "ios": "3.4.0", + "macos": "0.3.0" + } + }, + "expression": { + "interpolated": false, + "parameters": [ + "zoom" + ] + }, + "property-type": "data-constant" + }, + "text-field": { + "type": "formatted", + "default": "", + "tokens": true, + "doc": "Value to use for a text label. If a plain `string` is provided, it will be treated as a `formatted` with default/inherited formatting options.", + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "android": "2.0.1", + "ios": "2.0.0", + "macos": "0.1.0" + }, + "data-driven styling": { + "js": "0.33.0", + "android": "5.0.0", + "ios": "3.5.0", + "macos": "0.4.0" + } + }, + "expression": { + "interpolated": false, + "parameters": [ + "zoom", + "feature" + ] + }, + "property-type": "data-driven" + }, + "text-font": { + "type": "array", + "value": "string", + "default": [ + "Open Sans Regular", + "Arial Unicode MS Regular" + ], + "doc": "Font stack to use for displaying text.", + "requires": [ + "text-field" + ], + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "android": "2.0.1", + "ios": "2.0.0", + "macos": "0.1.0" + }, + "data-driven styling": { + "js": "0.43.0", + "android": "6.0.0", + "ios": "4.0.0", + "macos": "0.7.0" + } + }, + "expression": { + "interpolated": false, + "parameters": [ + "zoom", + "feature" + ] + }, + "property-type": "data-driven" + }, + "text-size": { + "type": "number", + "default": 16, + "minimum": 0, + "units": "pixels", + "doc": "Font size.", + "requires": [ + "text-field" + ], + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "android": "2.0.1", + "ios": "2.0.0", + "macos": "0.1.0" + }, + "data-driven styling": { + "js": "0.35.0", + "android": "5.1.0", + "ios": "3.6.0", + "macos": "0.5.0" + } + }, + "expression": { + "interpolated": true, + "parameters": [ + "zoom", + "feature" + ] + }, + "property-type": "data-driven" + }, + "text-max-width": { + "type": "number", + "default": 10, + "minimum": 0, + "units": "ems", + "doc": "The maximum line width for text wrapping.", + "requires": [ + "text-field" + ], + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "android": "2.0.1", + "ios": "2.0.0", + "macos": "0.1.0" + }, + "data-driven styling": { + "js": "0.40.0", + "android": "5.2.0", + "ios": "3.7.0", + "macos": "0.6.0" + } + }, + "expression": { + "interpolated": true, + "parameters": [ + "zoom", + "feature" + ] + }, + "property-type": "data-driven" + }, + "text-line-height": { + "type": "number", + "default": 1.2, + "units": "ems", + "doc": "Text leading value for multi-line text.", + "requires": [ + "text-field" + ], + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "android": "2.0.1", + "ios": "2.0.0", + "macos": "0.1.0" + } + }, + "expression": { + "interpolated": true, + "parameters": [ + "zoom" + ] + }, + "property-type": "data-constant" + }, + "text-letter-spacing": { + "type": "number", + "default": 0, + "units": "ems", + "doc": "Text tracking amount.", + "requires": [ + "text-field" + ], + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "android": "2.0.1", + "ios": "2.0.0", + "macos": "0.1.0" + }, + "data-driven styling": { + "js": "0.40.0", + "android": "5.2.0", + "ios": "3.7.0", + "macos": "0.6.0" + } + }, + "expression": { + "interpolated": true, + "parameters": [ + "zoom", + "feature" + ] + }, + "property-type": "data-driven" + }, + "text-justify": { + "type": "enum", + "values": { + "auto": { + "doc": "The text is aligned towards the anchor position." + }, + "left": { + "doc": "The text is aligned to the left." + }, + "center": { + "doc": "The text is centered." + }, + "right": { + "doc": "The text is aligned to the right." + } + }, + "default": "center", + "doc": "Text justification options.", + "requires": [ + "text-field" + ], + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "android": "2.0.1", + "ios": "2.0.0", + "macos": "0.1.0" + }, + "data-driven styling": { + "js": "0.39.0", + "android": "5.2.0", + "ios": "3.7.0", + "macos": "0.6.0" + }, + "auto": { + "js": "0.54.0", + "android": "7.4.0", + "ios": "4.10.0", + "macos": "0.14.0" + } + }, + "expression": { + "interpolated": false, + "parameters": [ + "zoom", + "feature" + ] + }, + "property-type": "data-driven" + }, + "text-radial-offset": { + "type": "number", + "units": "ems", + "default": 0, + "doc": "Radial offset of text, in the direction of the symbol's anchor. Useful in combination with `text-variable-anchor`, which defaults to using the two-dimensional `text-offset` if present.", + "sdk-support": { + "basic functionality": { + "js": "0.54.0", + "android": "7.4.0", + "ios": "4.10.0", + "macos": "0.14.0" + }, + "data-driven styling": { + "js": "0.54.0", + "android": "7.4.0", + "ios": "4.10.0", + "macos": "0.14.0" + } + }, + "requires": [ + "text-field" + ], + "property-type": "data-driven", + "expression": { + "interpolated": true, + "parameters": [ + "zoom", + "feature" + ] + } + }, + "text-variable-anchor": { + "type": "array", + "value": "enum", + "values": { + "center": { + "doc": "The center of the text is placed closest to the anchor." + }, + "left": { + "doc": "The left side of the text is placed closest to the anchor." + }, + "right": { + "doc": "The right side of the text is placed closest to the anchor." + }, + "top": { + "doc": "The top of the text is placed closest to the anchor." + }, + "bottom": { + "doc": "The bottom of the text is placed closest to the anchor." + }, + "top-left": { + "doc": "The top left corner of the text is placed closest to the anchor." + }, + "top-right": { + "doc": "The top right corner of the text is placed closest to the anchor." + }, + "bottom-left": { + "doc": "The bottom left corner of the text is placed closest to the anchor." + }, + "bottom-right": { + "doc": "The bottom right corner of the text is placed closest to the anchor." + } + }, + "requires": [ + "text-field", + { + "symbol-placement": [ + "point" + ] + } + ], + "doc": "To increase the chance of placing high-priority labels on the map, you can provide an array of `text-anchor` locations: the renderer will attempt to place the label at each location, in order, before moving onto the next label. Use `text-justify: auto` to choose justification based on anchor position. To apply an offset, use the `text-radial-offset` or the two-dimensional `text-offset`.", + "sdk-support": { + "basic functionality": { + "js": "0.54.0", + "android": "7.4.0", + "ios": "4.10.0", + "macos": "0.14.0" + } + }, + "expression": { + "interpolated": false, + "parameters": [ + "zoom" + ] + }, + "property-type": "data-constant" + }, + "text-anchor": { + "type": "enum", + "values": { + "center": { + "doc": "The center of the text is placed closest to the anchor." + }, + "left": { + "doc": "The left side of the text is placed closest to the anchor." + }, + "right": { + "doc": "The right side of the text is placed closest to the anchor." + }, + "top": { + "doc": "The top of the text is placed closest to the anchor." + }, + "bottom": { + "doc": "The bottom of the text is placed closest to the anchor." + }, + "top-left": { + "doc": "The top left corner of the text is placed closest to the anchor." + }, + "top-right": { + "doc": "The top right corner of the text is placed closest to the anchor." + }, + "bottom-left": { + "doc": "The bottom left corner of the text is placed closest to the anchor." + }, + "bottom-right": { + "doc": "The bottom right corner of the text is placed closest to the anchor." + } + }, + "default": "center", + "doc": "Part of the text placed closest to the anchor.", + "requires": [ + "text-field", + { + "!": "text-variable-anchor" + } + ], + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "android": "2.0.1", + "ios": "2.0.0", + "macos": "0.1.0" + }, + "data-driven styling": { + "js": "0.39.0", + "android": "5.2.0", + "ios": "3.7.0", + "macos": "0.6.0" + } + }, + "expression": { + "interpolated": false, + "parameters": [ + "zoom", + "feature" + ] + }, + "property-type": "data-driven" + }, + "text-max-angle": { + "type": "number", + "default": 45, + "units": "degrees", + "doc": "Maximum angle change between adjacent characters.", + "requires": [ + "text-field", + { + "symbol-placement": [ + "line", + "line-center" + ] + } + ], + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "android": "2.0.1", + "ios": "2.0.0", + "macos": "0.1.0" + } + }, + "expression": { + "interpolated": true, + "parameters": [ + "zoom" + ] + }, + "property-type": "data-constant" + }, + "text-writing-mode": { + "type": "array", + "value": "enum", + "values": { + "horizontal": { + "doc": "If a text's language supports horizontal writing mode, symbols with point placement would be laid out horizontally." + }, + "vertical": { + "doc": "If a text's language supports vertical writing mode, symbols with point placement would be laid out vertically." + } + }, + "doc": "The property allows control over a symbol's orientation. Note that the property values act as a hint, so that a symbol whose language doesn’t support the provided orientation will be laid out in its natural orientation. Example: English point symbol will be rendered horizontally even if array value contains single 'vertical' enum value. The order of elements in an array define priority order for the placement of an orientation variant.", + "requires": [ + "text-field", + { + "symbol-placement": [ + "point" + ] + } + ], + "sdk-support": { + "basic functionality": { + "js": "1.3.0", + "android": "8.3.0", + "ios": "5.3.0", + "macos": "0.14.0" + } + }, + "expression": { + "interpolated": false, + "parameters": [ + "zoom" + ] + }, + "property-type": "data-constant" + }, + "text-rotate": { + "type": "number", + "default": 0, + "period": 360, + "units": "degrees", + "doc": "Rotates the text clockwise.", + "requires": [ + "text-field" + ], + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "android": "2.0.1", + "ios": "2.0.0", + "macos": "0.1.0" + }, + "data-driven styling": { + "js": "0.35.0", + "android": "5.1.0", + "ios": "3.6.0", + "macos": "0.5.0" + } + }, + "expression": { + "interpolated": true, + "parameters": [ + "zoom", + "feature" + ] + }, + "property-type": "data-driven" + }, + "text-padding": { + "type": "number", + "default": 2, + "minimum": 0, + "units": "pixels", + "doc": "Size of the additional area around the text bounding box used for detecting symbol collisions.", + "requires": [ + "text-field" + ], + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "android": "2.0.1", + "ios": "2.0.0", + "macos": "0.1.0" + } + }, + "expression": { + "interpolated": true, + "parameters": [ + "zoom" + ] + }, + "property-type": "data-constant" + }, + "text-keep-upright": { + "type": "boolean", + "default": true, + "doc": "If true, the text may be flipped vertically to prevent it from being rendered upside-down.", + "requires": [ + "text-field", + { + "text-rotation-alignment": "map" + }, + { + "symbol-placement": [ + "line", + "line-center" + ] + } + ], + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "android": "2.0.1", + "ios": "2.0.0", + "macos": "0.1.0" + } + }, + "expression": { + "interpolated": false, + "parameters": [ + "zoom" + ] + }, + "property-type": "data-constant" + }, + "text-transform": { + "type": "enum", + "values": { + "none": { + "doc": "The text is not altered." + }, + "uppercase": { + "doc": "Forces all letters to be displayed in uppercase." + }, + "lowercase": { + "doc": "Forces all letters to be displayed in lowercase." + } + }, + "default": "none", + "doc": "Specifies how to capitalize text, similar to the CSS `text-transform` property.", + "requires": [ + "text-field" + ], + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "android": "2.0.1", + "ios": "2.0.0", + "macos": "0.1.0" + }, + "data-driven styling": { + "js": "0.33.0", + "android": "5.0.0", + "ios": "3.5.0", + "macos": "0.4.0" + } + }, + "expression": { + "interpolated": false, + "parameters": [ + "zoom", + "feature" + ] + }, + "property-type": "data-driven" + }, + "text-offset": { + "type": "array", + "doc": "Offset distance of text from its anchor. Positive values indicate right and down, while negative values indicate left and up. If used with text-variable-anchor, input values will be taken as absolute values. Offsets along the x- and y-axis will be applied automatically based on the anchor position.", + "value": "number", + "units": "ems", + "length": 2, + "default": [ + 0, + 0 + ], + "requires": [ + "text-field", + { + "!": "text-radial-offset" + } + ], + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "android": "2.0.1", + "ios": "2.0.0", + "macos": "0.1.0" + }, + "data-driven styling": { + "js": "0.35.0", + "android": "5.1.0", + "ios": "3.6.0", + "macos": "0.5.0" + } + }, + "expression": { + "interpolated": true, + "parameters": [ + "zoom", + "feature" + ] + }, + "property-type": "data-driven" + }, + "text-allow-overlap": { + "type": "boolean", + "default": false, + "doc": "If true, the text will be visible even if it collides with other previously drawn symbols.", + "requires": [ + "text-field" + ], + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "android": "2.0.1", + "ios": "2.0.0", + "macos": "0.1.0" + } + }, + "expression": { + "interpolated": false, + "parameters": [ + "zoom" + ] + }, + "property-type": "data-constant" + }, + "text-ignore-placement": { + "type": "boolean", + "default": false, + "doc": "If true, other symbols can be visible even if they collide with the text.", + "requires": [ + "text-field" + ], + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "android": "2.0.1", + "ios": "2.0.0", + "macos": "0.1.0" + } + }, + "expression": { + "interpolated": false, + "parameters": [ + "zoom" + ] + }, + "property-type": "data-constant" + }, + "text-optional": { + "type": "boolean", + "default": false, + "doc": "If true, icons will display without their corresponding text when the text collides with other symbols and the icon does not.", + "requires": [ + "text-field", + "icon-image" + ], + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "android": "2.0.1", + "ios": "2.0.0", + "macos": "0.1.0" + } + }, + "expression": { + "interpolated": false, + "parameters": [ + "zoom" + ] + }, + "property-type": "data-constant" + }, + "visibility": { + "type": "enum", + "values": { + "visible": { + "doc": "The layer is shown." + }, + "none": { + "doc": "The layer is not shown." + } + }, + "default": "visible", + "doc": "Whether this layer is displayed.", + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "android": "2.0.1", + "ios": "2.0.0", + "macos": "0.1.0" + } + }, + "property-type": "constant" + } + }, + "layout_raster": { + "visibility": { + "type": "enum", + "values": { + "visible": { + "doc": "The layer is shown." + }, + "none": { + "doc": "The layer is not shown." + } + }, + "default": "visible", + "doc": "Whether this layer is displayed.", + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "android": "2.0.1", + "ios": "2.0.0", + "macos": "0.1.0" + } + }, + "property-type": "constant" + } + }, + "layout_hillshade": { + "visibility": { + "type": "enum", + "values": { + "visible": { + "doc": "The layer is shown." + }, + "none": { + "doc": "The layer is not shown." + } + }, + "default": "visible", + "doc": "Whether this layer is displayed.", + "sdk-support": { + "basic functionality": { + "js": "0.43.0", + "android": "6.0.0", + "ios": "4.0.0", + "macos": "0.7.0" + } + }, + "property-type": "constant" + } + }, + "filter": { + "type": "array", + "value": "*", + "doc": "A filter selects specific features from a layer." + }, + "filter_operator": { + "type": "enum", + "values": { + "==": { + "doc": "`[\"==\", key, value]` equality: `feature[key] = value`" + }, + "!=": { + "doc": "`[\"!=\", key, value]` inequality: `feature[key] ≠ value`" + }, + ">": { + "doc": "`[\">\", key, value]` greater than: `feature[key] > value`" + }, + ">=": { + "doc": "`[\">=\", key, value]` greater than or equal: `feature[key] ≥ value`" + }, + "<": { + "doc": "`[\"<\", key, value]` less than: `feature[key] < value`" + }, + "<=": { + "doc": "`[\"<=\", key, value]` less than or equal: `feature[key] ≤ value`" + }, + "in": { + "doc": "`[\"in\", key, v0, ..., vn]` set inclusion: `feature[key] ∈ {v0, ..., vn}`" + }, + "!in": { + "doc": "`[\"!in\", key, v0, ..., vn]` set exclusion: `feature[key] ∉ {v0, ..., vn}`" + }, + "all": { + "doc": "`[\"all\", f0, ..., fn]` logical `AND`: `f0 ∧ ... ∧ fn`" + }, + "any": { + "doc": "`[\"any\", f0, ..., fn]` logical `OR`: `f0 ∨ ... ∨ fn`" + }, + "none": { + "doc": "`[\"none\", f0, ..., fn]` logical `NOR`: `¬f0 ∧ ... ∧ ¬fn`" + }, + "has": { + "doc": "`[\"has\", key]` `feature[key]` exists" + }, + "!has": { + "doc": "`[\"!has\", key]` `feature[key]` does not exist" + } + }, + "doc": "The filter operator." + }, + "geometry_type": { + "type": "enum", + "values": { + "Point": { + "doc": "Filter to point geometries." + }, + "LineString": { + "doc": "Filter to line geometries." + }, + "Polygon": { + "doc": "Filter to polygon geometries." + } + }, + "doc": "The geometry type for the filter to select." + }, + "function": { + "expression": { + "type": "expression", + "doc": "An expression." + }, + "stops": { + "type": "array", + "doc": "An array of stops.", + "value": "function_stop" + }, + "base": { + "type": "number", + "default": 1, + "minimum": 0, + "doc": "The exponential base of the interpolation curve. It controls the rate at which the result increases. Higher values make the result increase more towards the high end of the range. With `1` the stops are interpolated linearly." + }, + "property": { + "type": "string", + "doc": "The name of a feature property to use as the function input.", + "default": "$zoom" + }, + "type": { + "type": "enum", + "values": { + "identity": { + "doc": "Return the input value as the output value." + }, + "exponential": { + "doc": "Generate an output by interpolating between stops just less than and just greater than the function input." + }, + "interval": { + "doc": "Return the output value of the stop just less than the function input." + }, + "categorical": { + "doc": "Return the output value of the stop equal to the function input." + } + }, + "doc": "The interpolation strategy to use in function evaluation.", + "default": "exponential" + }, + "colorSpace": { + "type": "enum", + "values": { + "rgb": { + "doc": "Use the RGB color space to interpolate color values" + }, + "lab": { + "doc": "Use the LAB color space to interpolate color values." + }, + "hcl": { + "doc": "Use the HCL color space to interpolate color values, interpolating the Hue, Chroma, and Luminance channels individually." + } + }, + "doc": "The color space in which colors interpolated. Interpolating colors in perceptual color spaces like LAB and HCL tend to produce color ramps that look more consistent and produce colors that can be differentiated more easily than those interpolated in RGB space.", + "default": "rgb" + }, + "default": { + "type": "*", + "required": false, + "doc": "A value to serve as a fallback function result when a value isn't otherwise available. It is used in the following circumstances:\n* In categorical functions, when the feature value does not match any of the stop domain values.\n* In property and zoom-and-property functions, when a feature does not contain a value for the specified property.\n* In identity functions, when the feature value is not valid for the style property (for example, if the function is being used for a `circle-color` property but the feature property value is not a string or not a valid color).\n* In interval or exponential property and zoom-and-property functions, when the feature value is not numeric.\nIf no default is provided, the style property's default is used in these circumstances." + } + }, + "function_stop": { + "type": "array", + "minimum": 0, + "maximum": 24, + "value": [ + "number", + "color" + ], + "length": 2, + "doc": "Zoom level and value pair." + }, + "expression": { + "type": "array", + "value": "*", + "minimum": 1, + "doc": "An expression defines a function that can be used for data-driven style properties or feature filters." + }, + "expression_name": { + "doc": "", + "type": "enum", + "values": { + "let": { + "doc": "Binds expressions to named variables, which can then be referenced in the result expression using [\"var\", \"variable_name\"].", + "group": "Variable binding", + "sdk-support": { + "basic functionality": { + "js": "0.41.0", + "android": "6.0.0", + "ios": "4.0.0", + "macos": "0.7.0" + } + } + }, + "var": { + "doc": "References variable bound using \"let\".", + "group": "Variable binding", + "sdk-support": { + "basic functionality": { + "js": "0.41.0", + "android": "6.0.0", + "ios": "4.0.0", + "macos": "0.7.0" + } + } + }, + "literal": { + "doc": "Provides a literal array or object value.", + "group": "Types", + "sdk-support": { + "basic functionality": { + "js": "0.41.0", + "android": "6.0.0", + "ios": "4.0.0", + "macos": "0.7.0" + } + } + }, + "array": { + "doc": "Asserts that the input is an array (optionally with a specific item type and length). If, when the input expression is evaluated, it is not of the asserted type, then this assertion will cause the whole expression to be aborted.", + "group": "Types", + "sdk-support": { + "basic functionality": { + "js": "0.41.0", + "android": "6.0.0", + "ios": "4.0.0", + "macos": "0.7.0" + } + } + }, + "at": { + "doc": "Retrieves an item from an array.", + "group": "Lookup", + "sdk-support": { + "basic functionality": { + "js": "0.41.0", + "android": "6.0.0", + "ios": "4.0.0", + "macos": "0.7.0" + } + } + }, + "in": { + "doc": "Determines whether an item exists in an array or a substring exists in a string.", + "group": "Lookup", + "sdk-support": { + "basic functionality": { + "js": "1.6.0" + } + } + }, + "case": { + "doc": "Selects the first output whose corresponding test condition evaluates to true, or the fallback value otherwise.", + "group": "Decision", + "sdk-support": { + "basic functionality": { + "js": "0.41.0", + "android": "6.0.0", + "ios": "4.0.0", + "macos": "0.7.0" + } + } + }, + "match": { + "doc": "Selects the output whose label value matches the input value, or the fallback value if no match is found. The input can be any expression (e.g. `[\"get\", \"building_type\"]`). Each label must be either:\n * a single literal value; or\n * an array of literal values, whose values must be all strings or all numbers (e.g. `[100, 101]` or `[\"c\", \"b\"]`). The input matches if any of the values in the array matches, similar to the `\"in\"` operator.\n\nEach label must be unique. If the input type does not match the type of the labels, the result will be the fallback value.", + "group": "Decision", + "sdk-support": { + "basic functionality": { + "js": "0.41.0", + "android": "6.0.0", + "ios": "4.0.0", + "macos": "0.7.0" + } + } + }, + "coalesce": { + "doc": "Evaluates each expression in turn until the first non-null value is obtained, and returns that value.", + "group": "Decision", + "sdk-support": { + "basic functionality": { + "js": "0.41.0", + "android": "6.0.0", + "ios": "4.0.0", + "macos": "0.7.0" + } + } + }, + "step": { + "doc": "Produces discrete, stepped results by evaluating a piecewise-constant function defined by pairs of input and output values (\"stops\"). The `input` may be any numeric expression (e.g., `[\"get\", \"population\"]`). Stop inputs must be numeric literals in strictly ascending order. Returns the output value of the stop just less than the input, or the first output if the input is less than the first stop.", + "group": "Ramps, scales, curves", + "sdk-support": { + "basic functionality": { + "js": "0.42.0", + "android": "6.0.0", + "ios": "4.0.0", + "macos": "0.7.0" + } + } + }, + "interpolate": { + "doc": "Produces continuous, smooth results by interpolating between pairs of input and output values (\"stops\"). The `input` may be any numeric expression (e.g., `[\"get\", \"population\"]`). Stop inputs must be numeric literals in strictly ascending order. The output type must be `number`, `array`, or `color`.\n\nInterpolation types:\n- `[\"linear\"]`: interpolates linearly between the pair of stops just less than and just greater than the input.\n- `[\"exponential\", base]`: interpolates exponentially between the stops just less than and just greater than the input. `base` controls the rate at which the output increases: higher values make the output increase more towards the high end of the range. With values close to 1 the output increases linearly.\n- `[\"cubic-bezier\", x1, y1, x2, y2]`: interpolates using the cubic bezier curve defined by the given control points.", + "group": "Ramps, scales, curves", + "sdk-support": { + "basic functionality": { + "js": "0.42.0", + "android": "6.0.0", + "ios": "4.0.0", + "macos": "0.7.0" + } + } + }, + "interpolate-hcl": { + "doc": "Produces continuous, smooth results by interpolating between pairs of input and output values (\"stops\"). Works like `interpolate`, but the output type must be `color`, and the interpolation is performed in the Hue-Chroma-Luminance color space.", + "group": "Ramps, scales, curves", + "sdk-support": { + "basic functionality": { + "js": "0.49.0" + } + } + }, + "interpolate-lab": { + "doc": "Produces continuous, smooth results by interpolating between pairs of input and output values (\"stops\"). Works like `interpolate`, but the output type must be `color`, and the interpolation is performed in the CIELAB color space.", + "group": "Ramps, scales, curves", + "sdk-support": { + "basic functionality": { + "js": "0.49.0" + } + } + }, + "ln2": { + "doc": "Returns mathematical constant ln(2).", + "group": "Math", + "sdk-support": { + "basic functionality": { + "js": "0.41.0", + "android": "6.0.0", + "ios": "4.0.0", + "macos": "0.7.0" + } + } + }, + "pi": { + "doc": "Returns the mathematical constant pi.", + "group": "Math", + "sdk-support": { + "basic functionality": { + "js": "0.41.0", + "android": "6.0.0", + "ios": "4.0.0", + "macos": "0.7.0" + } + } + }, + "e": { + "doc": "Returns the mathematical constant e.", + "group": "Math", + "sdk-support": { + "basic functionality": { + "js": "0.41.0", + "android": "6.0.0", + "ios": "4.0.0", + "macos": "0.7.0" + } + } + }, + "typeof": { + "doc": "Returns a string describing the type of the given value.", + "group": "Types", + "sdk-support": { + "basic functionality": { + "js": "0.41.0", + "android": "6.0.0", + "ios": "4.0.0", + "macos": "0.7.0" + } + } + }, + "string": { + "doc": "Asserts that the input value is a string. If multiple values are provided, each one is evaluated in order until a string is obtained. If none of the inputs are strings, the expression is an error.", + "group": "Types", + "sdk-support": { + "basic functionality": { + "js": "0.41.0", + "android": "6.0.0", + "ios": "4.0.0", + "macos": "0.7.0" + } + } + }, + "number": { + "doc": "Asserts that the input value is a number. If multiple values are provided, each one is evaluated in order until a number is obtained. If none of the inputs are numbers, the expression is an error.", + "group": "Types", + "sdk-support": { + "basic functionality": { + "js": "0.41.0", + "android": "6.0.0", + "ios": "4.0.0", + "macos": "0.7.0" + } + } + }, + "boolean": { + "doc": "Asserts that the input value is a boolean. If multiple values are provided, each one is evaluated in order until a boolean is obtained. If none of the inputs are booleans, the expression is an error.", + "group": "Types", + "sdk-support": { + "basic functionality": { + "js": "0.41.0", + "android": "6.0.0", + "ios": "4.0.0", + "macos": "0.7.0" + } + } + }, + "object": { + "doc": "Asserts that the input value is an object. If multiple values are provided, each one is evaluated in order until an object is obtained. If none of the inputs are objects, the expression is an error.", + "group": "Types", + "sdk-support": { + "basic functionality": { + "js": "0.41.0", + "android": "6.0.0", + "ios": "4.0.0", + "macos": "0.7.0" + } + } + }, + "collator": { + "doc": "Returns a `collator` for use in locale-dependent comparison operations. The `case-sensitive` and `diacritic-sensitive` options default to `false`. The `locale` argument specifies the IETF language tag of the locale to use. If none is provided, the default locale is used. If the requested locale is not available, the `collator` will use a system-defined fallback locale. Use `resolved-locale` to test the results of locale fallback behavior.", + "group": "Types", + "sdk-support": { + "basic functionality": { + "js": "0.45.0", + "android": "6.5.0", + "ios": "4.2.0", + "macos": "0.9.0" + } + } + }, + "format": { + "doc": "Returns `formatted` text containing annotations for use in mixed-format `text-field` entries. For a `text-field` entries of a string type, following option object's properties are supported: If set, the `text-font` value overrides the font specified by the root layout properties. If set, the `font-scale` value specifies a scaling factor relative to the `text-size` specified in the root layout properties. If set, the `text-color` value overrides the color specified by the root paint properties for this layer.", + "group": "Types", + "sdk-support": { + "basic functionality": { + "js": "0.48.0", + "android": "6.7.0", + "ios": "4.6.0", + "macos": "0.12.0" + }, + "text-font": { + "js": "0.48.0", + "android": "6.7.0", + "ios": "4.6.0", + "macos": "0.12.0" + }, + "font-scale": { + "js": "0.48.0", + "android": "6.7.0", + "ios": "4.6.0", + "macos": "0.12.0" + }, + "text-color": { + "js": "1.3.0", + "android": "7.3.0", + "ios": "4.10.0", + "macos": "0.14.0" + }, + "image": { + "js": "1.6.0" + } + } + }, + "image": { + "doc": "Returns an `image` type for use in `icon-image`, `*-pattern` entries and as a section in the `format` expression. If set, the `image` argument will check that the requested image exists in the style and will return either the resolved image name or `null`, depending on whether or not the image is currently in the style. This validation process is synchronous and requires the image to have been added to the style before requesting it in the `image` argument.", + "group": "Types", + "sdk-support": { + "basic functionality": { + "js": "1.4.0", + "android": "8.6.0", + "ios": "5.6.0" + } + } + }, + "number-format": { + "doc": "Converts the input number into a string representation using the providing formatting rules. If set, the `locale` argument specifies the locale to use, as a BCP 47 language tag. If set, the `currency` argument specifies an ISO 4217 code to use for currency-style formatting. If set, the `min-fraction-digits` and `max-fraction-digits` arguments specify the minimum and maximum number of fractional digits to include.", + "group": "Types", + "sdk-support": { + "basic functionality": { + "js": "0.54.0" + } + } + }, + "to-string": { + "doc": "Converts the input value to a string. If the input is `null`, the result is `\"\"`. If the input is a boolean, the result is `\"true\"` or `\"false\"`. If the input is a number, it is converted to a string as specified by the [\"NumberToString\" algorithm](https://tc39.github.io/ecma262/#sec-tostring-applied-to-the-number-type) of the ECMAScript Language Specification. If the input is a color, it is converted to a string of the form `\"rgba(r,g,b,a)\"`, where `r`, `g`, and `b` are numerals ranging from 0 to 255, and `a` ranges from 0 to 1. Otherwise, the input is converted to a string in the format specified by the [`JSON.stringify`](https://tc39.github.io/ecma262/#sec-json.stringify) function of the ECMAScript Language Specification.", + "group": "Types", + "sdk-support": { + "basic functionality": { + "js": "0.41.0", + "android": "6.0.0", + "ios": "4.0.0", + "macos": "0.7.0" + } + } + }, + "to-number": { + "doc": "Converts the input value to a number, if possible. If the input is `null` or `false`, the result is 0. If the input is `true`, the result is 1. If the input is a string, it is converted to a number as specified by the [\"ToNumber Applied to the String Type\" algorithm](https://tc39.github.io/ecma262/#sec-tonumber-applied-to-the-string-type) of the ECMAScript Language Specification. If multiple values are provided, each one is evaluated in order until the first successful conversion is obtained. If none of the inputs can be converted, the expression is an error.", + "group": "Types", + "sdk-support": { + "basic functionality": { + "js": "0.41.0", + "android": "6.0.0", + "ios": "4.0.0", + "macos": "0.7.0" + } + } + }, + "to-boolean": { + "doc": "Converts the input value to a boolean. The result is `false` when then input is an empty string, 0, `false`, `null`, or `NaN`; otherwise it is `true`.", + "group": "Types", + "sdk-support": { + "basic functionality": { + "js": "0.41.0", + "android": "6.0.0", + "ios": "4.0.0", + "macos": "0.7.0" + } + } + }, + "to-rgba": { + "doc": "Returns a four-element array containing the input color's red, green, blue, and alpha components, in that order.", + "group": "Color", + "sdk-support": { + "basic functionality": { + "js": "0.41.0", + "android": "6.0.0", + "ios": "4.0.0", + "macos": "0.7.0" + } + } + }, + "to-color": { + "doc": "Converts the input value to a color. If multiple values are provided, each one is evaluated in order until the first successful conversion is obtained. If none of the inputs can be converted, the expression is an error.", + "group": "Types", + "sdk-support": { + "basic functionality": { + "js": "0.41.0", + "android": "6.0.0", + "ios": "4.0.0", + "macos": "0.7.0" + } + } + }, + "rgb": { + "doc": "Creates a color value from red, green, and blue components, which must range between 0 and 255, and an alpha component of 1. If any component is out of range, the expression is an error.", + "group": "Color", + "sdk-support": { + "basic functionality": { + "js": "0.41.0", + "android": "6.0.0", + "ios": "4.0.0", + "macos": "0.7.0" + } + } + }, + "rgba": { + "doc": "Creates a color value from red, green, blue components, which must range between 0 and 255, and an alpha component which must range between 0 and 1. If any component is out of range, the expression is an error.", + "group": "Color", + "sdk-support": { + "basic functionality": { + "js": "0.41.0", + "android": "6.0.0", + "ios": "4.0.0", + "macos": "0.7.0" + } + } + }, + "get": { + "doc": "Retrieves a property value from the current feature's properties, or from another object if a second argument is provided. Returns null if the requested property is missing.", + "group": "Lookup", + "sdk-support": { + "basic functionality": { + "js": "0.41.0", + "android": "6.0.0", + "ios": "4.0.0", + "macos": "0.7.0" + } + } + }, + "has": { + "doc": "Tests for the presence of an property value in the current feature's properties, or from another object if a second argument is provided.", + "group": "Lookup", + "sdk-support": { + "basic functionality": { + "js": "0.41.0", + "android": "6.0.0", + "ios": "4.0.0", + "macos": "0.7.0" + } + } + }, + "length": { + "doc": "Gets the length of an array or string.", + "group": "Lookup", + "sdk-support": { + "basic functionality": { + "js": "0.41.0", + "android": "6.0.0", + "ios": "4.0.0", + "macos": "0.7.0" + } + } + }, + "properties": { + "doc": "Gets the feature properties object. Note that in some cases, it may be more efficient to use [\"get\", \"property_name\"] directly.", + "group": "Feature data", + "sdk-support": { + "basic functionality": { + "js": "0.41.0", + "android": "6.0.0", + "ios": "4.0.0", + "macos": "0.7.0" + } + } + }, + "feature-state": { + "doc": "Retrieves a property value from the current feature's state. Returns null if the requested property is not present on the feature's state. A feature's state is not part of the GeoJSON or vector tile data, and must be set programmatically on each feature. Features are identified by their `id` attribute, which must be an integer or a string that can be cast to an integer. Note that [\"feature-state\"] can only be used with paint properties that support data-driven styling.", + "group": "Feature data", + "sdk-support": { + "basic functionality": { + "js": "0.46.0" + } + } + }, + "geometry-type": { + "doc": "Gets the feature's geometry type: Point, MultiPoint, LineString, MultiLineString, Polygon, MultiPolygon.", + "group": "Feature data", + "sdk-support": { + "basic functionality": { + "js": "0.41.0", + "android": "6.0.0", + "ios": "4.0.0", + "macos": "0.7.0" + } + } + }, + "id": { + "doc": "Gets the feature's id, if it has one.", + "group": "Feature data", + "sdk-support": { + "basic functionality": { + "js": "0.41.0", + "android": "6.0.0", + "ios": "4.0.0", + "macos": "0.7.0" + } + } + }, + "zoom": { + "doc": "Gets the current zoom level. Note that in style layout and paint properties, [\"zoom\"] may only appear as the input to a top-level \"step\" or \"interpolate\" expression.", + "group": "Zoom", + "sdk-support": { + "basic functionality": { + "js": "0.41.0", + "android": "6.0.0", + "ios": "4.0.0", + "macos": "0.7.0" + } + } + }, + "heatmap-density": { + "doc": "Gets the kernel density estimation of a pixel in a heatmap layer, which is a relative measure of how many data points are crowded around a particular pixel. Can only be used in the `heatmap-color` property.", + "group": "Heatmap", + "sdk-support": { + "basic functionality": { + "js": "0.41.0", + "android": "6.0.0", + "ios": "4.0.0", + "macos": "0.7.0" + } + } + }, + "line-progress": { + "doc": "Gets the progress along a gradient line. Can only be used in the `line-gradient` property.", + "group": "Feature data", + "sdk-support": { + "basic functionality": { + "js": "0.45.0", + "android": "6.5.0", + "ios": "4.6.0", + "macos": "0.12.0" + } + } + }, + "accumulated": { + "doc": "Gets the value of a cluster property accumulated so far. Can only be used in the `clusterProperties` option of a clustered GeoJSON source.", + "group": "Feature data", + "sdk-support": { + "basic functionality": { + "js": "0.53.0" + } + } + }, + "+": { + "doc": "Returns the sum of the inputs.", + "group": "Math", + "sdk-support": { + "basic functionality": { + "js": "0.41.0", + "android": "6.0.0", + "ios": "4.0.0", + "macos": "0.7.0" + } + } + }, + "*": { + "doc": "Returns the product of the inputs.", + "group": "Math", + "sdk-support": { + "basic functionality": { + "js": "0.41.0", + "android": "6.0.0", + "ios": "4.0.0", + "macos": "0.7.0" + } + } + }, + "-": { + "doc": "For two inputs, returns the result of subtracting the second input from the first. For a single input, returns the result of subtracting it from 0.", + "group": "Math", + "sdk-support": { + "basic functionality": { + "js": "0.41.0", + "android": "6.0.0", + "ios": "4.0.0", + "macos": "0.7.0" + } + } + }, + "/": { + "doc": "Returns the result of floating point division of the first input by the second.", + "group": "Math", + "sdk-support": { + "basic functionality": { + "js": "0.41.0", + "android": "6.0.0", + "ios": "4.0.0", + "macos": "0.7.0" + } + } + }, + "%": { + "doc": "Returns the remainder after integer division of the first input by the second.", + "group": "Math", + "sdk-support": { + "basic functionality": { + "js": "0.41.0", + "android": "6.0.0", + "ios": "4.0.0", + "macos": "0.7.0" + } + } + }, + "^": { + "doc": "Returns the result of raising the first input to the power specified by the second.", + "group": "Math", + "sdk-support": { + "basic functionality": { + "js": "0.41.0", + "android": "6.0.0", + "ios": "4.0.0", + "macos": "0.7.0" + } + } + }, + "sqrt": { + "doc": "Returns the square root of the input.", + "group": "Math", + "sdk-support": { + "basic functionality": { + "js": "0.42.0", + "android": "6.0.0", + "ios": "4.0.0", + "macos": "0.7.0" + } + } + }, + "log10": { + "doc": "Returns the base-ten logarithm of the input.", + "group": "Math", + "sdk-support": { + "basic functionality": { + "js": "0.41.0", + "android": "6.0.0", + "ios": "4.0.0", + "macos": "0.7.0" + } + } + }, + "ln": { + "doc": "Returns the natural logarithm of the input.", + "group": "Math", + "sdk-support": { + "basic functionality": { + "js": "0.41.0", + "android": "6.0.0", + "ios": "4.0.0", + "macos": "0.7.0" + } + } + }, + "log2": { + "doc": "Returns the base-two logarithm of the input.", + "group": "Math", + "sdk-support": { + "basic functionality": { + "js": "0.41.0", + "android": "6.0.0", + "ios": "4.0.0", + "macos": "0.7.0" + } + } + }, + "sin": { + "doc": "Returns the sine of the input.", + "group": "Math", + "sdk-support": { + "basic functionality": { + "js": "0.41.0", + "android": "6.0.0", + "ios": "4.0.0", + "macos": "0.7.0" + } + } + }, + "cos": { + "doc": "Returns the cosine of the input.", + "group": "Math", + "sdk-support": { + "basic functionality": { + "js": "0.41.0", + "android": "6.0.0", + "ios": "4.0.0", + "macos": "0.7.0" + } + } + }, + "tan": { + "doc": "Returns the tangent of the input.", + "group": "Math", + "sdk-support": { + "basic functionality": { + "js": "0.41.0", + "android": "6.0.0", + "ios": "4.0.0", + "macos": "0.7.0" + } + } + }, + "asin": { + "doc": "Returns the arcsine of the input.", + "group": "Math", + "sdk-support": { + "basic functionality": { + "js": "0.41.0", + "android": "6.0.0", + "ios": "4.0.0", + "macos": "0.7.0" + } + } + }, + "acos": { + "doc": "Returns the arccosine of the input.", + "group": "Math", + "sdk-support": { + "basic functionality": { + "js": "0.41.0", + "android": "6.0.0", + "ios": "4.0.0", + "macos": "0.7.0" + } + } + }, + "atan": { + "doc": "Returns the arctangent of the input.", + "group": "Math", + "sdk-support": { + "basic functionality": { + "js": "0.41.0", + "android": "6.0.0", + "ios": "4.0.0", + "macos": "0.7.0" + } + } + }, + "min": { + "doc": "Returns the minimum value of the inputs.", + "group": "Math", + "sdk-support": { + "basic functionality": { + "js": "0.41.0", + "android": "6.0.0", + "ios": "4.0.0", + "macos": "0.7.0" + } + } + }, + "max": { + "doc": "Returns the maximum value of the inputs.", + "group": "Math", + "sdk-support": { + "basic functionality": { + "js": "0.41.0", + "android": "6.0.0", + "ios": "4.0.0", + "macos": "0.7.0" + } + } + }, + "round": { + "doc": "Rounds the input to the nearest integer. Halfway values are rounded away from zero. For example, `[\"round\", -1.5]` evaluates to -2.", + "group": "Math", + "sdk-support": { + "basic functionality": { + "js": "0.45.0", + "android": "6.0.0", + "ios": "4.0.0", + "macos": "0.7.0" + } + } + }, + "abs": { + "doc": "Returns the absolute value of the input.", + "group": "Math", + "sdk-support": { + "basic functionality": { + "js": "0.45.0", + "android": "6.0.0", + "ios": "4.0.0", + "macos": "0.7.0" + } + } + }, + "ceil": { + "doc": "Returns the smallest integer that is greater than or equal to the input.", + "group": "Math", + "sdk-support": { + "basic functionality": { + "js": "0.45.0", + "android": "6.0.0", + "ios": "4.0.0", + "macos": "0.7.0" + } + } + }, + "floor": { + "doc": "Returns the largest integer that is less than or equal to the input.", + "group": "Math", + "sdk-support": { + "basic functionality": { + "js": "0.45.0", + "android": "6.0.0", + "ios": "4.0.0", + "macos": "0.7.0" + } + } + }, + "==": { + "doc": "Returns `true` if the input values are equal, `false` otherwise. The comparison is strictly typed: values of different runtime types are always considered unequal. Cases where the types are known to be different at parse time are considered invalid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.", + "group": "Decision", + "sdk-support": { + "basic functionality": { + "js": "0.41.0", + "android": "6.0.0", + "ios": "4.0.0", + "macos": "0.7.0" + }, + "collator": { + "js": "0.45.0", + "android": "6.5.0", + "ios": "4.2.0", + "macos": "0.9.0" + } + } + }, + "!=": { + "doc": "Returns `true` if the input values are not equal, `false` otherwise. The comparison is strictly typed: values of different runtime types are always considered unequal. Cases where the types are known to be different at parse time are considered invalid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.", + "group": "Decision", + "sdk-support": { + "basic functionality": { + "js": "0.41.0", + "android": "6.0.0", + "ios": "4.0.0", + "macos": "0.7.0" + }, + "collator": { + "js": "0.45.0", + "android": "6.5.0", + "ios": "4.2.0", + "macos": "0.9.0" + } + } + }, + ">": { + "doc": "Returns `true` if the first input is strictly greater than the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.", + "group": "Decision", + "sdk-support": { + "basic functionality": { + "js": "0.41.0", + "android": "6.0.0", + "ios": "4.0.0", + "macos": "0.7.0" + }, + "collator": { + "js": "0.45.0", + "android": "6.5.0", + "ios": "4.2.0", + "macos": "0.9.0" + } + } + }, + "<": { + "doc": "Returns `true` if the first input is strictly less than the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.", + "group": "Decision", + "sdk-support": { + "basic functionality": { + "js": "0.41.0", + "android": "6.0.0", + "ios": "4.0.0", + "macos": "0.7.0" + }, + "collator": { + "js": "0.45.0", + "android": "6.5.0", + "ios": "4.2.0", + "macos": "0.9.0" + } + } + }, + ">=": { + "doc": "Returns `true` if the first input is greater than or equal to the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.", + "group": "Decision", + "sdk-support": { + "basic functionality": { + "js": "0.41.0", + "android": "6.0.0", + "ios": "4.0.0", + "macos": "0.7.0" + }, + "collator": { + "js": "0.45.0", + "android": "6.5.0", + "ios": "4.2.0", + "macos": "0.9.0" + } + } + }, + "<=": { + "doc": "Returns `true` if the first input is less than or equal to the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.", + "group": "Decision", + "sdk-support": { + "basic functionality": { + "js": "0.41.0", + "android": "6.0.0", + "ios": "4.0.0", + "macos": "0.7.0" + }, + "collator": { + "js": "0.45.0", + "android": "6.5.0", + "ios": "4.2.0", + "macos": "0.9.0" + } + } + }, + "all": { + "doc": "Returns `true` if all the inputs are `true`, `false` otherwise. The inputs are evaluated in order, and evaluation is short-circuiting: once an input expression evaluates to `false`, the result is `false` and no further input expressions are evaluated.", + "group": "Decision", + "sdk-support": { + "basic functionality": { + "js": "0.41.0", + "android": "6.0.0", + "ios": "4.0.0", + "macos": "0.7.0" + } + } + }, + "any": { + "doc": "Returns `true` if any of the inputs are `true`, `false` otherwise. The inputs are evaluated in order, and evaluation is short-circuiting: once an input expression evaluates to `true`, the result is `true` and no further input expressions are evaluated.", + "group": "Decision", + "sdk-support": { + "basic functionality": { + "js": "0.41.0", + "android": "6.0.0", + "ios": "4.0.0", + "macos": "0.7.0" + } + } + }, + "!": { + "doc": "Logical negation. Returns `true` if the input is `false`, and `false` if the input is `true`.", + "group": "Decision", + "sdk-support": { + "basic functionality": { + "js": "0.41.0", + "android": "6.0.0", + "ios": "4.0.0", + "macos": "0.7.0" + } + } + }, + "is-supported-script": { + "doc": "Returns `true` if the input string is expected to render legibly. Returns `false` if the input string contains sections that cannot be rendered without potential loss of meaning (e.g. Indic scripts that require complex text shaping, or right-to-left scripts if the the `mapbox-gl-rtl-text` plugin is not in use in Mapbox GL JS).", + "group": "String", + "sdk-support": { + "basic functionality": { + "js": "0.45.0", + "android": "6.6.0" + } + } + }, + "upcase": { + "doc": "Returns the input string converted to uppercase. Follows the Unicode Default Case Conversion algorithm and the locale-insensitive case mappings in the Unicode Character Database.", + "group": "String", + "sdk-support": { + "basic functionality": { + "js": "0.41.0", + "android": "6.0.0", + "ios": "4.0.0", + "macos": "0.7.0" + } + } + }, + "downcase": { + "doc": "Returns the input string converted to lowercase. Follows the Unicode Default Case Conversion algorithm and the locale-insensitive case mappings in the Unicode Character Database.", + "group": "String", + "sdk-support": { + "basic functionality": { + "js": "0.41.0", + "android": "6.0.0", + "ios": "4.0.0", + "macos": "0.7.0" + } + } + }, + "concat": { + "doc": "Returns a `string` consisting of the concatenation of the inputs. Each input is converted to a string as if by `to-string`.", + "group": "String", + "sdk-support": { + "basic functionality": { + "js": "0.41.0", + "android": "6.0.0", + "ios": "4.0.0", + "macos": "0.7.0" + } + } + }, + "resolved-locale": { + "doc": "Returns the IETF language tag of the locale being used by the provided `collator`. This can be used to determine the default system locale, or to determine if a requested locale was successfully loaded.", + "group": "String", + "sdk-support": { + "basic functionality": { + "js": "0.45.0", + "android": "6.5.0", + "ios": "4.2.0", + "macos": "0.9.0" + } + } + } + } + }, + "light": { + "anchor": { + "type": "enum", + "default": "viewport", + "values": { + "map": { + "doc": "The position of the light source is aligned to the rotation of the map." + }, + "viewport": { + "doc": "The position of the light source is aligned to the rotation of the viewport." + } + }, + "property-type": "data-constant", + "transition": false, + "expression": { + "interpolated": false, + "parameters": [ + "zoom" + ] + }, + "doc": "Whether extruded geometries are lit relative to the map or viewport.", + "example": "map", + "sdk-support": { + "basic functionality": { + "js": "0.27.0", + "android": "5.1.0", + "ios": "3.6.0", + "macos": "0.5.0" + } + } + }, + "position": { + "type": "array", + "default": [ + 1.15, + 210, + 30 + ], + "length": 3, + "value": "number", + "property-type": "data-constant", + "transition": true, + "expression": { + "interpolated": true, + "parameters": [ + "zoom" + ] + }, + "doc": "Position of the light source relative to lit (extruded) geometries, in [r radial coordinate, a azimuthal angle, p polar angle] where r indicates the distance from the center of the base of an object to its light, a indicates the position of the light relative to 0° (0° when `light.anchor` is set to `viewport` corresponds to the top of the viewport, or 0° when `light.anchor` is set to `map` corresponds to due north, and degrees proceed clockwise), and p indicates the height of the light (from 0°, directly above, to 180°, directly below).", + "example": [ + 1.5, + 90, + 80 + ], + "sdk-support": { + "basic functionality": { + "js": "0.27.0", + "android": "5.1.0", + "ios": "3.6.0", + "macos": "0.5.0" + } + } + }, + "color": { + "type": "color", + "property-type": "data-constant", + "default": "#ffffff", + "expression": { + "interpolated": true, + "parameters": [ + "zoom" + ] + }, + "transition": true, + "doc": "Color tint for lighting extruded geometries.", + "sdk-support": { + "basic functionality": { + "js": "0.27.0", + "android": "5.1.0", + "ios": "3.6.0", + "macos": "0.5.0" + } + } + }, + "intensity": { + "type": "number", + "property-type": "data-constant", + "default": 0.5, + "minimum": 0, + "maximum": 1, + "expression": { + "interpolated": true, + "parameters": [ + "zoom" + ] + }, + "transition": true, + "doc": "Intensity of lighting (on a scale from 0 to 1). Higher numbers will present as more extreme contrast.", + "sdk-support": { + "basic functionality": { + "js": "0.27.0", + "android": "5.1.0", + "ios": "3.6.0", + "macos": "0.5.0" + } + } + } + }, + "paint": [ + "paint_fill", + "paint_line", + "paint_circle", + "paint_heatmap", + "paint_fill-extrusion", + "paint_symbol", + "paint_raster", + "paint_hillshade", + "paint_background" + ], + "paint_fill": { + "fill-antialias": { + "type": "boolean", + "default": true, + "doc": "Whether or not the fill should be antialiased.", + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "android": "2.0.1", + "ios": "2.0.0", + "macos": "0.1.0" + } + }, + "expression": { + "interpolated": false, + "parameters": [ + "zoom" + ] + }, + "property-type": "data-constant" + }, + "fill-opacity": { + "type": "number", + "default": 1, + "minimum": 0, + "maximum": 1, + "doc": "The opacity of the entire fill layer. In contrast to the `fill-color`, this value will also affect the 1px stroke around the fill, if the stroke is used.", + "transition": true, + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "android": "2.0.1", + "ios": "2.0.0", + "macos": "0.1.0" + }, + "data-driven styling": { + "js": "0.21.0", + "android": "5.0.0", + "ios": "3.5.0", + "macos": "0.4.0" + } + }, + "expression": { + "interpolated": true, + "parameters": [ + "zoom", + "feature", + "feature-state" + ] + }, + "property-type": "data-driven" + }, + "fill-color": { + "type": "color", + "default": "#000000", + "doc": "The color of the filled part of this layer. This color can be specified as `rgba` with an alpha component and the color's opacity will not affect the opacity of the 1px stroke, if it is used.", + "transition": true, + "requires": [ + { + "!": "fill-pattern" + } + ], + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "android": "2.0.1", + "ios": "2.0.0", + "macos": "0.1.0" + }, + "data-driven styling": { + "js": "0.19.0", + "android": "5.0.0", + "ios": "3.5.0", + "macos": "0.4.0" + } + }, + "expression": { + "interpolated": true, + "parameters": [ + "zoom", + "feature", + "feature-state" + ] + }, + "property-type": "data-driven" + }, + "fill-outline-color": { + "type": "color", + "doc": "The outline color of the fill. Matches the value of `fill-color` if unspecified.", + "transition": true, + "requires": [ + { + "!": "fill-pattern" + }, + { + "fill-antialias": true + } + ], + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "android": "2.0.1", + "ios": "2.0.0", + "macos": "0.1.0" + }, + "data-driven styling": { + "js": "0.19.0", + "android": "5.0.0", + "ios": "3.5.0", + "macos": "0.4.0" + } + }, + "expression": { + "interpolated": true, + "parameters": [ + "zoom", + "feature", + "feature-state" + ] + }, + "property-type": "data-driven" + }, + "fill-translate": { + "type": "array", + "value": "number", + "length": 2, + "default": [ + 0, + 0 + ], + "transition": true, + "units": "pixels", + "doc": "The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.", + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "android": "2.0.1", + "ios": "2.0.0", + "macos": "0.1.0" + } + }, + "expression": { + "interpolated": true, + "parameters": [ + "zoom" + ] + }, + "property-type": "data-constant" + }, + "fill-translate-anchor": { + "type": "enum", + "values": { + "map": { + "doc": "The fill is translated relative to the map." + }, + "viewport": { + "doc": "The fill is translated relative to the viewport." + } + }, + "doc": "Controls the frame of reference for `fill-translate`.", + "default": "map", + "requires": [ + "fill-translate" + ], + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "android": "2.0.1", + "ios": "2.0.0", + "macos": "0.1.0" + } + }, + "expression": { + "interpolated": false, + "parameters": [ + "zoom" + ] + }, + "property-type": "data-constant" + }, + "fill-pattern": { + "type": "resolvedImage", + "transition": true, + "doc": "Name of image in sprite to use for drawing image fills. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.", + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "android": "2.0.1", + "ios": "2.0.0", + "macos": "0.1.0" + }, + "data-driven styling": { + "js": "0.49.0", + "android": "6.5.0", + "macos": "0.11.0", + "ios": "4.4.0" + } + }, + "expression": { + "interpolated": false, + "parameters": [ + "zoom", + "feature" + ] + }, + "property-type": "cross-faded-data-driven" + } + }, + "paint_fill-extrusion": { + "fill-extrusion-opacity": { + "type": "number", + "default": 1, + "minimum": 0, + "maximum": 1, + "doc": "The opacity of the entire fill extrusion layer. This is rendered on a per-layer, not per-feature, basis, and data-driven styling is not available.", + "transition": true, + "sdk-support": { + "basic functionality": { + "js": "0.27.0", + "android": "5.1.0", + "ios": "3.6.0", + "macos": "0.5.0" + } + }, + "expression": { + "interpolated": true, + "parameters": [ + "zoom" + ] + }, + "property-type": "data-constant" + }, + "fill-extrusion-color": { + "type": "color", + "default": "#000000", + "doc": "The base color of the extruded fill. The extrusion's surfaces will be shaded differently based on this color in combination with the root `light` settings. If this color is specified as `rgba` with an alpha component, the alpha component will be ignored; use `fill-extrusion-opacity` to set layer opacity.", + "transition": true, + "requires": [ + { + "!": "fill-extrusion-pattern" + } + ], + "sdk-support": { + "basic functionality": { + "js": "0.27.0", + "android": "5.1.0", + "ios": "3.6.0", + "macos": "0.5.0" + }, + "data-driven styling": { + "js": "0.27.0", + "android": "5.1.0", + "ios": "3.6.0", + "macos": "0.5.0" + } + }, + "expression": { + "interpolated": true, + "parameters": [ + "zoom", + "feature", + "feature-state" + ] + }, + "property-type": "data-driven" + }, + "fill-extrusion-translate": { + "type": "array", + "value": "number", + "length": 2, + "default": [ + 0, + 0 + ], + "transition": true, + "units": "pixels", + "doc": "The geometry's offset. Values are [x, y] where negatives indicate left and up (on the flat plane), respectively.", + "sdk-support": { + "basic functionality": { + "js": "0.27.0", + "android": "5.1.0", + "ios": "3.6.0", + "macos": "0.5.0" + } + }, + "expression": { + "interpolated": true, + "parameters": [ + "zoom" + ] + }, + "property-type": "data-constant" + }, + "fill-extrusion-translate-anchor": { + "type": "enum", + "values": { + "map": { + "doc": "The fill extrusion is translated relative to the map." + }, + "viewport": { + "doc": "The fill extrusion is translated relative to the viewport." + } + }, + "doc": "Controls the frame of reference for `fill-extrusion-translate`.", + "default": "map", + "requires": [ + "fill-extrusion-translate" + ], + "sdk-support": { + "basic functionality": { + "js": "0.27.0", + "android": "5.1.0", + "ios": "3.6.0", + "macos": "0.5.0" + } + }, + "expression": { + "interpolated": false, + "parameters": [ + "zoom" + ] + }, + "property-type": "data-constant" + }, + "fill-extrusion-pattern": { + "type": "resolvedImage", + "transition": true, + "doc": "Name of image in sprite to use for drawing images on extruded fills. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.", + "sdk-support": { + "basic functionality": { + "js": "0.27.0", + "android": "5.1.0", + "ios": "3.6.0", + "macos": "0.5.0" + }, + "data-driven styling": { + "js": "0.49.0", + "android": "6.5.0", + "macos": "0.11.0", + "ios": "4.4.0" + } + }, + "expression": { + "interpolated": false, + "parameters": [ + "zoom", + "feature" + ] + }, + "property-type": "cross-faded-data-driven" + }, + "fill-extrusion-height": { + "type": "number", + "default": 0, + "minimum": 0, + "units": "meters", + "doc": "The height with which to extrude this layer.", + "transition": true, + "sdk-support": { + "basic functionality": { + "js": "0.27.0", + "android": "5.1.0", + "ios": "3.6.0", + "macos": "0.5.0" + }, + "data-driven styling": { + "js": "0.27.0", + "android": "5.1.0", + "ios": "3.6.0", + "macos": "0.5.0" + } + }, + "expression": { + "interpolated": true, + "parameters": [ + "zoom", + "feature", + "feature-state" + ] + }, + "property-type": "data-driven" + }, + "fill-extrusion-base": { + "type": "number", + "default": 0, + "minimum": 0, + "units": "meters", + "doc": "The height with which to extrude the base of this layer. Must be less than or equal to `fill-extrusion-height`.", + "transition": true, + "requires": [ + "fill-extrusion-height" + ], + "sdk-support": { + "basic functionality": { + "js": "0.27.0", + "android": "5.1.0", + "ios": "3.6.0", + "macos": "0.5.0" + }, + "data-driven styling": { + "js": "0.27.0", + "android": "5.1.0", + "ios": "3.6.0", + "macos": "0.5.0" + } + }, + "expression": { + "interpolated": true, + "parameters": [ + "zoom", + "feature", + "feature-state" + ] + }, + "property-type": "data-driven" + }, + "fill-extrusion-vertical-gradient": { + "type": "boolean", + "default": true, + "doc": "Whether to apply a vertical gradient to the sides of a fill-extrusion layer. If true, sides will be shaded slightly darker farther down.", + "transition": false, + "sdk-support": { + "basic functionality": { + "js": "0.50.0", + "ios": "4.7.0", + "macos": "0.13.0" + } + }, + "expression": { + "interpolated": false, + "parameters": [ + "zoom" + ] + }, + "property-type": "data-constant" + } + }, + "paint_line": { + "line-opacity": { + "type": "number", + "doc": "The opacity at which the line will be drawn.", + "default": 1, + "minimum": 0, + "maximum": 1, + "transition": true, + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "android": "2.0.1", + "ios": "2.0.0", + "macos": "0.1.0" + }, + "data-driven styling": { + "js": "0.29.0", + "android": "5.0.0", + "ios": "3.5.0", + "macos": "0.4.0" + } + }, + "expression": { + "interpolated": true, + "parameters": [ + "zoom", + "feature", + "feature-state" + ] + }, + "property-type": "data-driven" + }, + "line-color": { + "type": "color", + "doc": "The color with which the line will be drawn.", + "default": "#000000", + "transition": true, + "requires": [ + { + "!": "line-pattern" + } + ], + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "android": "2.0.1", + "ios": "2.0.0", + "macos": "0.1.0" + }, + "data-driven styling": { + "js": "0.23.0", + "android": "5.0.0", + "ios": "3.5.0", + "macos": "0.4.0" + } + }, + "expression": { + "interpolated": true, + "parameters": [ + "zoom", + "feature", + "feature-state" + ] + }, + "property-type": "data-driven" + }, + "line-translate": { + "type": "array", + "value": "number", + "length": 2, + "default": [ + 0, + 0 + ], + "transition": true, + "units": "pixels", + "doc": "The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.", + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "android": "2.0.1", + "ios": "2.0.0", + "macos": "0.1.0" + } + }, + "expression": { + "interpolated": true, + "parameters": [ + "zoom" + ] + }, + "property-type": "data-constant" + }, + "line-translate-anchor": { + "type": "enum", + "values": { + "map": { + "doc": "The line is translated relative to the map." + }, + "viewport": { + "doc": "The line is translated relative to the viewport." + } + }, + "doc": "Controls the frame of reference for `line-translate`.", + "default": "map", + "requires": [ + "line-translate" + ], + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "android": "2.0.1", + "ios": "2.0.0", + "macos": "0.1.0" + } + }, + "expression": { + "interpolated": false, + "parameters": [ + "zoom" + ] + }, + "property-type": "data-constant" + }, + "line-width": { + "type": "number", + "default": 1, + "minimum": 0, + "transition": true, + "units": "pixels", + "doc": "Stroke thickness.", + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "android": "2.0.1", + "ios": "2.0.0", + "macos": "0.1.0" + }, + "data-driven styling": { + "js": "0.39.0", + "android": "5.2.0", + "ios": "3.7.0", + "macos": "0.6.0" + } + }, + "expression": { + "interpolated": true, + "parameters": [ + "zoom", + "feature", + "feature-state" + ] + }, + "property-type": "data-driven" + }, + "line-gap-width": { + "type": "number", + "default": 0, + "minimum": 0, + "doc": "Draws a line casing outside of a line's actual path. Value indicates the width of the inner gap.", + "transition": true, + "units": "pixels", + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "android": "2.0.1", + "ios": "2.0.0", + "macos": "0.1.0" + }, + "data-driven styling": { + "js": "0.29.0", + "android": "5.0.0", + "ios": "3.5.0", + "macos": "0.4.0" + } + }, + "expression": { + "interpolated": true, + "parameters": [ + "zoom", + "feature", + "feature-state" + ] + }, + "property-type": "data-driven" + }, + "line-offset": { + "type": "number", + "default": 0, + "doc": "The line's offset. For linear features, a positive value offsets the line to the right, relative to the direction of the line, and a negative value to the left. For polygon features, a positive value results in an inset, and a negative value results in an outset.", + "transition": true, + "units": "pixels", + "sdk-support": { + "basic functionality": { + "js": "0.12.1", + "android": "3.0.0", + "ios": "3.1.0", + "macos": "0.1.0" + }, + "data-driven styling": { + "js": "0.29.0", + "android": "5.0.0", + "ios": "3.5.0", + "macos": "0.4.0" + } + }, + "expression": { + "interpolated": true, + "parameters": [ + "zoom", + "feature", + "feature-state" + ] + }, + "property-type": "data-driven" + }, + "line-blur": { + "type": "number", + "default": 0, + "minimum": 0, + "transition": true, + "units": "pixels", + "doc": "Blur applied to the line, in pixels.", + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "android": "2.0.1", + "ios": "2.0.0", + "macos": "0.1.0" + }, + "data-driven styling": { + "js": "0.29.0", + "android": "5.0.0", + "ios": "3.5.0", + "macos": "0.4.0" + } + }, + "expression": { + "interpolated": true, + "parameters": [ + "zoom", + "feature", + "feature-state" + ] + }, + "property-type": "data-driven" + }, + "line-dasharray": { + "type": "array", + "value": "number", + "doc": "Specifies the lengths of the alternating dashes and gaps that form the dash pattern. The lengths are later scaled by the line width. To convert a dash length to pixels, multiply the length by the current line width. Note that GeoJSON sources with `lineMetrics: true` specified won't render dashed lines to the expected scale. Also note that zoom-dependent expressions will be evaluated only at integer zoom levels.", + "minimum": 0, + "transition": true, + "units": "line widths", + "requires": [ + { + "!": "line-pattern" + } + ], + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "android": "2.0.1", + "ios": "2.0.0", + "macos": "0.1.0" + }, + "data-driven styling": {} + }, + "expression": { + "interpolated": false, + "parameters": [ + "zoom" + ] + }, + "property-type": "cross-faded" + }, + "line-pattern": { + "type": "resolvedImage", + "transition": true, + "doc": "Name of image in sprite to use for drawing image lines. For seamless patterns, image width must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.", + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "android": "2.0.1", + "ios": "2.0.0", + "macos": "0.1.0" + }, + "data-driven styling": { + "js": "0.49.0", + "android": "6.5.0", + "macos": "0.11.0", + "ios": "4.4.0" + } + }, + "expression": { + "interpolated": false, + "parameters": [ + "zoom", + "feature" + ] + }, + "property-type": "cross-faded-data-driven" + }, + "line-gradient": { + "type": "color", + "doc": "Defines a gradient with which to color a line feature. Can only be used with GeoJSON sources that specify `\"lineMetrics\": true`.", + "transition": false, + "requires": [ + { + "!": "line-dasharray" + }, + { + "!": "line-pattern" + }, + { + "source": "geojson", + "has": { + "lineMetrics": true + } + } + ], + "sdk-support": { + "basic functionality": { + "js": "0.45.0", + "android": "6.5.0", + "ios": "4.4.0", + "macos": "0.11.0" + }, + "data-driven styling": {} + }, + "expression": { + "interpolated": true, + "parameters": [ + "line-progress" + ] + }, + "property-type": "color-ramp" + } + }, + "paint_circle": { + "circle-radius": { + "type": "number", + "default": 5, + "minimum": 0, + "transition": true, + "units": "pixels", + "doc": "Circle radius.", + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "android": "2.0.1", + "ios": "2.0.0", + "macos": "0.1.0" + }, + "data-driven styling": { + "js": "0.18.0", + "android": "5.0.0", + "ios": "3.5.0", + "macos": "0.4.0" + } + }, + "expression": { + "interpolated": true, + "parameters": [ + "zoom", + "feature", + "feature-state" + ] + }, + "property-type": "data-driven" + }, + "circle-color": { + "type": "color", + "default": "#000000", + "doc": "The fill color of the circle.", + "transition": true, + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "android": "2.0.1", + "ios": "2.0.0", + "macos": "0.1.0" + }, + "data-driven styling": { + "js": "0.18.0", + "android": "5.0.0", + "ios": "3.5.0", + "macos": "0.4.0" + } + }, + "expression": { + "interpolated": true, + "parameters": [ + "zoom", + "feature", + "feature-state" + ] + }, + "property-type": "data-driven" + }, + "circle-blur": { + "type": "number", + "default": 0, + "doc": "Amount to blur the circle. 1 blurs the circle such that only the centerpoint is full opacity.", + "transition": true, + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "android": "2.0.1", + "ios": "2.0.0", + "macos": "0.1.0" + }, + "data-driven styling": { + "js": "0.20.0", + "android": "5.0.0", + "ios": "3.5.0", + "macos": "0.4.0" + } + }, + "expression": { + "interpolated": true, + "parameters": [ + "zoom", + "feature", + "feature-state" + ] + }, + "property-type": "data-driven" + }, + "circle-opacity": { + "type": "number", + "doc": "The opacity at which the circle will be drawn.", + "default": 1, + "minimum": 0, + "maximum": 1, + "transition": true, + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "android": "2.0.1", + "ios": "2.0.0", + "macos": "0.1.0" + }, + "data-driven styling": { + "js": "0.20.0", + "android": "5.0.0", + "ios": "3.5.0", + "macos": "0.4.0" + } + }, + "expression": { + "interpolated": true, + "parameters": [ + "zoom", + "feature", + "feature-state" + ] + }, + "property-type": "data-driven" + }, + "circle-translate": { + "type": "array", + "value": "number", + "length": 2, + "default": [ + 0, + 0 + ], + "transition": true, + "units": "pixels", + "doc": "The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.", + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "android": "2.0.1", + "ios": "2.0.0", + "macos": "0.1.0" + } + }, + "expression": { + "interpolated": true, + "parameters": [ + "zoom" + ] + }, + "property-type": "data-constant" + }, + "circle-translate-anchor": { + "type": "enum", + "values": { + "map": { + "doc": "The circle is translated relative to the map." + }, + "viewport": { + "doc": "The circle is translated relative to the viewport." + } + }, + "doc": "Controls the frame of reference for `circle-translate`.", + "default": "map", + "requires": [ + "circle-translate" + ], + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "android": "2.0.1", + "ios": "2.0.0", + "macos": "0.1.0" + } + }, + "expression": { + "interpolated": false, + "parameters": [ + "zoom" + ] + }, + "property-type": "data-constant" + }, + "circle-pitch-scale": { + "type": "enum", + "values": { + "map": { + "doc": "Circles are scaled according to their apparent distance to the camera." + }, + "viewport": { + "doc": "Circles are not scaled." + } + }, + "default": "map", + "doc": "Controls the scaling behavior of the circle when the map is pitched.", + "sdk-support": { + "basic functionality": { + "js": "0.21.0", + "android": "4.2.0", + "ios": "3.4.0", + "macos": "0.2.1" + } + }, + "expression": { + "interpolated": false, + "parameters": [ + "zoom" + ] + }, + "property-type": "data-constant" + }, + "circle-pitch-alignment": { + "type": "enum", + "values": { + "map": { + "doc": "The circle is aligned to the plane of the map." + }, + "viewport": { + "doc": "The circle is aligned to the plane of the viewport." + } + }, + "default": "viewport", + "doc": "Orientation of circle when map is pitched.", + "sdk-support": { + "basic functionality": { + "js": "0.39.0", + "android": "5.2.0", + "ios": "3.7.0", + "macos": "0.6.0" + } + }, + "expression": { + "interpolated": false, + "parameters": [ + "zoom" + ] + }, + "property-type": "data-constant" + }, + "circle-stroke-width": { + "type": "number", + "default": 0, + "minimum": 0, + "transition": true, + "units": "pixels", + "doc": "The width of the circle's stroke. Strokes are placed outside of the `circle-radius`.", + "sdk-support": { + "basic functionality": { + "js": "0.29.0", + "android": "5.0.0", + "ios": "3.5.0", + "macos": "0.4.0" + }, + "data-driven styling": { + "js": "0.29.0", + "android": "5.0.0", + "ios": "3.5.0", + "macos": "0.4.0" + } + }, + "expression": { + "interpolated": true, + "parameters": [ + "zoom", + "feature", + "feature-state" + ] + }, + "property-type": "data-driven" + }, + "circle-stroke-color": { + "type": "color", + "default": "#000000", + "doc": "The stroke color of the circle.", + "transition": true, + "sdk-support": { + "basic functionality": { + "js": "0.29.0", + "android": "5.0.0", + "ios": "3.5.0", + "macos": "0.4.0" + }, + "data-driven styling": { + "js": "0.29.0", + "android": "5.0.0", + "ios": "3.5.0", + "macos": "0.4.0" + } + }, + "expression": { + "interpolated": true, + "parameters": [ + "zoom", + "feature", + "feature-state" + ] + }, + "property-type": "data-driven" + }, + "circle-stroke-opacity": { + "type": "number", + "doc": "The opacity of the circle's stroke.", + "default": 1, + "minimum": 0, + "maximum": 1, + "transition": true, + "sdk-support": { + "basic functionality": { + "js": "0.29.0", + "android": "5.0.0", + "ios": "3.5.0", + "macos": "0.4.0" + }, + "data-driven styling": { + "js": "0.29.0", + "android": "5.0.0", + "ios": "3.5.0", + "macos": "0.4.0" + } + }, + "expression": { + "interpolated": true, + "parameters": [ + "zoom", + "feature", + "feature-state" + ] + }, + "property-type": "data-driven" + } + }, + "paint_heatmap": { + "heatmap-radius": { + "type": "number", + "default": 30, + "minimum": 1, + "transition": true, + "units": "pixels", + "doc": "Radius of influence of one heatmap point in pixels. Increasing the value makes the heatmap smoother, but less detailed.", + "sdk-support": { + "basic functionality": { + "js": "0.41.0", + "android": "6.0.0", + "ios": "4.0.0", + "macos": "0.7.0" + }, + "data-driven styling": { + "js": "0.43.0", + "android": "6.0.0", + "ios": "4.0.0", + "macos": "0.7.0" + } + }, + "expression": { + "interpolated": true, + "parameters": [ + "zoom", + "feature", + "feature-state" + ] + }, + "property-type": "data-driven" + }, + "heatmap-weight": { + "type": "number", + "default": 1, + "minimum": 0, + "transition": false, + "doc": "A measure of how much an individual point contributes to the heatmap. A value of 10 would be equivalent to having 10 points of weight 1 in the same spot. Especially useful when combined with clustering.", + "sdk-support": { + "basic functionality": { + "js": "0.41.0", + "android": "6.0.0", + "ios": "4.0.0", + "macos": "0.7.0" + }, + "data-driven styling": { + "js": "0.41.0", + "android": "6.0.0", + "ios": "4.0.0", + "macos": "0.7.0" + } + }, + "expression": { + "interpolated": true, + "parameters": [ + "zoom", + "feature", + "feature-state" + ] + }, + "property-type": "data-driven" + }, + "heatmap-intensity": { + "type": "number", + "default": 1, + "minimum": 0, + "transition": true, + "doc": "Similar to `heatmap-weight` but controls the intensity of the heatmap globally. Primarily used for adjusting the heatmap based on zoom level.", + "sdk-support": { + "basic functionality": { + "js": "0.41.0", + "android": "6.0.0", + "ios": "4.0.0", + "macos": "0.7.0" + } + }, + "expression": { + "interpolated": true, + "parameters": [ + "zoom" + ] + }, + "property-type": "data-constant" + }, + "heatmap-color": { + "type": "color", + "default": [ + "interpolate", + [ + "linear" + ], + [ + "heatmap-density" + ], + 0, + "rgba(0, 0, 255, 0)", + 0.1, + "royalblue", + 0.3, + "cyan", + 0.5, + "lime", + 0.7, + "yellow", + 1, + "red" + ], + "doc": "Defines the color of each pixel based on its density value in a heatmap. Should be an expression that uses `[\"heatmap-density\"]` as input.", + "transition": false, + "sdk-support": { + "basic functionality": { + "js": "0.41.0", + "android": "6.0.0", + "ios": "4.0.0", + "macos": "0.7.0" + }, + "data-driven styling": {} + }, + "expression": { + "interpolated": true, + "parameters": [ + "heatmap-density" + ] + }, + "property-type": "color-ramp" + }, + "heatmap-opacity": { + "type": "number", + "doc": "The global opacity at which the heatmap layer will be drawn.", + "default": 1, + "minimum": 0, + "maximum": 1, + "transition": true, + "sdk-support": { + "basic functionality": { + "js": "0.41.0", + "android": "6.0.0", + "ios": "4.0.0", + "macos": "0.7.0" + } + }, + "expression": { + "interpolated": true, + "parameters": [ + "zoom" + ] + }, + "property-type": "data-constant" + } + }, + "paint_symbol": { + "icon-opacity": { + "doc": "The opacity at which the icon will be drawn.", + "type": "number", + "default": 1, + "minimum": 0, + "maximum": 1, + "transition": true, + "requires": [ + "icon-image" + ], + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "android": "2.0.1", + "ios": "2.0.0", + "macos": "0.1.0" + }, + "data-driven styling": { + "js": "0.33.0", + "android": "5.0.0", + "ios": "3.5.0", + "macos": "0.4.0" + } + }, + "expression": { + "interpolated": true, + "parameters": [ + "zoom", + "feature", + "feature-state" + ] + }, + "property-type": "data-driven" + }, + "icon-color": { + "type": "color", + "default": "#000000", + "transition": true, + "doc": "The color of the icon. This can only be used with sdf icons.", + "requires": [ + "icon-image" + ], + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "android": "2.0.1", + "ios": "2.0.0", + "macos": "0.1.0" + }, + "data-driven styling": { + "js": "0.33.0", + "android": "5.0.0", + "ios": "3.5.0", + "macos": "0.4.0" + } + }, + "expression": { + "interpolated": true, + "parameters": [ + "zoom", + "feature", + "feature-state" + ] + }, + "property-type": "data-driven" + }, + "icon-halo-color": { + "type": "color", + "default": "rgba(0, 0, 0, 0)", + "transition": true, + "doc": "The color of the icon's halo. Icon halos can only be used with SDF icons.", + "requires": [ + "icon-image" + ], + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "android": "2.0.1", + "ios": "2.0.0", + "macos": "0.1.0" + }, + "data-driven styling": { + "js": "0.33.0", + "android": "5.0.0", + "ios": "3.5.0", + "macos": "0.4.0" + } + }, + "expression": { + "interpolated": true, + "parameters": [ + "zoom", + "feature", + "feature-state" + ] + }, + "property-type": "data-driven" + }, + "icon-halo-width": { + "type": "number", + "default": 0, + "minimum": 0, + "transition": true, + "units": "pixels", + "doc": "Distance of halo to the icon outline.", + "requires": [ + "icon-image" + ], + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "android": "2.0.1", + "ios": "2.0.0", + "macos": "0.1.0" + }, + "data-driven styling": { + "js": "0.33.0", + "android": "5.0.0", + "ios": "3.5.0", + "macos": "0.4.0" + } + }, + "expression": { + "interpolated": true, + "parameters": [ + "zoom", + "feature", + "feature-state" + ] + }, + "property-type": "data-driven" + }, + "icon-halo-blur": { + "type": "number", + "default": 0, + "minimum": 0, + "transition": true, + "units": "pixels", + "doc": "Fade out the halo towards the outside.", + "requires": [ + "icon-image" + ], + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "android": "2.0.1", + "ios": "2.0.0", + "macos": "0.1.0" + }, + "data-driven styling": { + "js": "0.33.0", + "android": "5.0.0", + "ios": "3.5.0", + "macos": "0.4.0" + } + }, + "expression": { + "interpolated": true, + "parameters": [ + "zoom", + "feature", + "feature-state" + ] + }, + "property-type": "data-driven" + }, + "icon-translate": { + "type": "array", + "value": "number", + "length": 2, + "default": [ + 0, + 0 + ], + "transition": true, + "units": "pixels", + "doc": "Distance that the icon's anchor is moved from its original placement. Positive values indicate right and down, while negative values indicate left and up.", + "requires": [ + "icon-image" + ], + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "android": "2.0.1", + "ios": "2.0.0", + "macos": "0.1.0" + } + }, + "expression": { + "interpolated": true, + "parameters": [ + "zoom" + ] + }, + "property-type": "data-constant" + }, + "icon-translate-anchor": { + "type": "enum", + "values": { + "map": { + "doc": "Icons are translated relative to the map." + }, + "viewport": { + "doc": "Icons are translated relative to the viewport." + } + }, + "doc": "Controls the frame of reference for `icon-translate`.", + "default": "map", + "requires": [ + "icon-image", + "icon-translate" + ], + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "android": "2.0.1", + "ios": "2.0.0", + "macos": "0.1.0" + } + }, + "expression": { + "interpolated": false, + "parameters": [ + "zoom" + ] + }, + "property-type": "data-constant" + }, + "text-opacity": { + "type": "number", + "doc": "The opacity at which the text will be drawn.", + "default": 1, + "minimum": 0, + "maximum": 1, + "transition": true, + "requires": [ + "text-field" + ], + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "android": "2.0.1", + "ios": "2.0.0", + "macos": "0.1.0" + }, + "data-driven styling": { + "js": "0.33.0", + "android": "5.0.0", + "ios": "3.5.0", + "macos": "0.4.0" + } + }, + "expression": { + "interpolated": true, + "parameters": [ + "zoom", + "feature", + "feature-state" + ] + }, + "property-type": "data-driven" + }, + "text-color": { + "type": "color", + "doc": "The color with which the text will be drawn.", + "default": "#000000", + "transition": true, + "overridable": true, + "requires": [ + "text-field" + ], + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "android": "2.0.1", + "ios": "2.0.0", + "macos": "0.1.0" + }, + "data-driven styling": { + "js": "0.33.0", + "android": "5.0.0", + "ios": "3.5.0", + "macos": "0.4.0" + } + }, + "expression": { + "interpolated": true, + "parameters": [ + "zoom", + "feature", + "feature-state" + ] + }, + "property-type": "data-driven" + }, + "text-halo-color": { + "type": "color", + "default": "rgba(0, 0, 0, 0)", + "transition": true, + "doc": "The color of the text's halo, which helps it stand out from backgrounds.", + "requires": [ + "text-field" + ], + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "android": "2.0.1", + "ios": "2.0.0", + "macos": "0.1.0" + }, + "data-driven styling": { + "js": "0.33.0", + "android": "5.0.0", + "ios": "3.5.0", + "macos": "0.4.0" + } + }, + "expression": { + "interpolated": true, + "parameters": [ + "zoom", + "feature", + "feature-state" + ] + }, + "property-type": "data-driven" + }, + "text-halo-width": { + "type": "number", + "default": 0, + "minimum": 0, + "transition": true, + "units": "pixels", + "doc": "Distance of halo to the font outline. Max text halo width is 1/4 of the font-size.", + "requires": [ + "text-field" + ], + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "android": "2.0.1", + "ios": "2.0.0", + "macos": "0.1.0" + }, + "data-driven styling": { + "js": "0.33.0", + "android": "5.0.0", + "ios": "3.5.0", + "macos": "0.4.0" + } + }, + "expression": { + "interpolated": true, + "parameters": [ + "zoom", + "feature", + "feature-state" + ] + }, + "property-type": "data-driven" + }, + "text-halo-blur": { + "type": "number", + "default": 0, + "minimum": 0, + "transition": true, + "units": "pixels", + "doc": "The halo's fadeout distance towards the outside.", + "requires": [ + "text-field" + ], + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "android": "2.0.1", + "ios": "2.0.0", + "macos": "0.1.0" + }, + "data-driven styling": { + "js": "0.33.0", + "android": "5.0.0", + "ios": "3.5.0", + "macos": "0.4.0" + } + }, + "expression": { + "interpolated": true, + "parameters": [ + "zoom", + "feature", + "feature-state" + ] + }, + "property-type": "data-driven" + }, + "text-translate": { + "type": "array", + "value": "number", + "length": 2, + "default": [ + 0, + 0 + ], + "transition": true, + "units": "pixels", + "doc": "Distance that the text's anchor is moved from its original placement. Positive values indicate right and down, while negative values indicate left and up.", + "requires": [ + "text-field" + ], + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "android": "2.0.1", + "ios": "2.0.0", + "macos": "0.1.0" + } + }, + "expression": { + "interpolated": true, + "parameters": [ + "zoom" + ] + }, + "property-type": "data-constant" + }, + "text-translate-anchor": { + "type": "enum", + "values": { + "map": { + "doc": "The text is translated relative to the map." + }, + "viewport": { + "doc": "The text is translated relative to the viewport." + } + }, + "doc": "Controls the frame of reference for `text-translate`.", + "default": "map", + "requires": [ + "text-field", + "text-translate" + ], + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "android": "2.0.1", + "ios": "2.0.0", + "macos": "0.1.0" + } + }, + "expression": { + "interpolated": false, + "parameters": [ + "zoom" + ] + }, + "property-type": "data-constant" + } + }, + "paint_raster": { + "raster-opacity": { + "type": "number", + "doc": "The opacity at which the image will be drawn.", + "default": 1, + "minimum": 0, + "maximum": 1, + "transition": true, + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "android": "2.0.1", + "ios": "2.0.0", + "macos": "0.1.0" + } + }, + "expression": { + "interpolated": true, + "parameters": [ + "zoom" + ] + }, + "property-type": "data-constant" + }, + "raster-hue-rotate": { + "type": "number", + "default": 0, + "period": 360, + "transition": true, + "units": "degrees", + "doc": "Rotates hues around the color wheel.", + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "android": "2.0.1", + "ios": "2.0.0", + "macos": "0.1.0" + } + }, + "expression": { + "interpolated": true, + "parameters": [ + "zoom" + ] + }, + "property-type": "data-constant" + }, + "raster-brightness-min": { + "type": "number", + "doc": "Increase or reduce the brightness of the image. The value is the minimum brightness.", + "default": 0, + "minimum": 0, + "maximum": 1, + "transition": true, + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "android": "2.0.1", + "ios": "2.0.0", + "macos": "0.1.0" + } + }, + "expression": { + "interpolated": true, + "parameters": [ + "zoom" + ] + }, + "property-type": "data-constant" + }, + "raster-brightness-max": { + "type": "number", + "doc": "Increase or reduce the brightness of the image. The value is the maximum brightness.", + "default": 1, + "minimum": 0, + "maximum": 1, + "transition": true, + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "android": "2.0.1", + "ios": "2.0.0", + "macos": "0.1.0" + } + }, + "expression": { + "interpolated": true, + "parameters": [ + "zoom" + ] + }, + "property-type": "data-constant" + }, + "raster-saturation": { + "type": "number", + "doc": "Increase or reduce the saturation of the image.", + "default": 0, + "minimum": -1, + "maximum": 1, + "transition": true, + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "android": "2.0.1", + "ios": "2.0.0", + "macos": "0.1.0" + } + }, + "expression": { + "interpolated": true, + "parameters": [ + "zoom" + ] + }, + "property-type": "data-constant" + }, + "raster-contrast": { + "type": "number", + "doc": "Increase or reduce the contrast of the image.", + "default": 0, + "minimum": -1, + "maximum": 1, + "transition": true, + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "android": "2.0.1", + "ios": "2.0.0", + "macos": "0.1.0" + } + }, + "expression": { + "interpolated": true, + "parameters": [ + "zoom" + ] + }, + "property-type": "data-constant" + }, + "raster-resampling": { + "type": "enum", + "doc": "The resampling/interpolation method to use for overscaling, also known as texture magnification filter", + "values": { + "linear": { + "doc": "(Bi)linear filtering interpolates pixel values using the weighted average of the four closest original source pixels creating a smooth but blurry look when overscaled" + }, + "nearest": { + "doc": "Nearest neighbor filtering interpolates pixel values using the nearest original source pixel creating a sharp but pixelated look when overscaled" + } + }, + "default": "linear", + "sdk-support": { + "basic functionality": { + "js": "0.47.0", + "android": "6.3.0", + "ios": "4.2.0", + "macos": "0.9.0" + } + }, + "expression": { + "interpolated": false, + "parameters": [ + "zoom" + ] + }, + "property-type": "data-constant" + }, + "raster-fade-duration": { + "type": "number", + "default": 300, + "minimum": 0, + "transition": false, + "units": "milliseconds", + "doc": "Fade duration when a new tile is added.", + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "android": "2.0.1", + "ios": "2.0.0", + "macos": "0.1.0" + } + }, + "expression": { + "interpolated": true, + "parameters": [ + "zoom" + ] + }, + "property-type": "data-constant" + } + }, + "paint_hillshade": { + "hillshade-illumination-direction": { + "type": "number", + "default": 335, + "minimum": 0, + "maximum": 359, + "doc": "The direction of the light source used to generate the hillshading with 0 as the top of the viewport if `hillshade-illumination-anchor` is set to `viewport` and due north if `hillshade-illumination-anchor` is set to `map`.", + "transition": false, + "sdk-support": { + "basic functionality": { + "js": "0.43.0", + "android": "6.0.0", + "ios": "4.0.0", + "macos": "0.7.0" + } + }, + "expression": { + "interpolated": true, + "parameters": [ + "zoom" + ] + }, + "property-type": "data-constant" + }, + "hillshade-illumination-anchor": { + "type": "enum", + "values": { + "map": { + "doc": "The hillshade illumination is relative to the north direction." + }, + "viewport": { + "doc": "The hillshade illumination is relative to the top of the viewport." + } + }, + "default": "viewport", + "doc": "Direction of light source when map is rotated.", + "sdk-support": { + "basic functionality": { + "js": "0.43.0", + "android": "6.0.0", + "ios": "4.0.0", + "macos": "0.7.0" + } + }, + "expression": { + "interpolated": false, + "parameters": [ + "zoom" + ] + }, + "property-type": "data-constant" + }, + "hillshade-exaggeration": { + "type": "number", + "doc": "Intensity of the hillshade", + "default": 0.5, + "minimum": 0, + "maximum": 1, + "transition": true, + "sdk-support": { + "basic functionality": { + "js": "0.43.0", + "android": "6.0.0", + "ios": "4.0.0", + "macos": "0.7.0" + } + }, + "expression": { + "interpolated": true, + "parameters": [ + "zoom" + ] + }, + "property-type": "data-constant" + }, + "hillshade-shadow-color": { + "type": "color", + "default": "#000000", + "doc": "The shading color of areas that face away from the light source.", + "transition": true, + "sdk-support": { + "basic functionality": { + "js": "0.43.0", + "android": "6.0.0", + "ios": "4.0.0", + "macos": "0.7.0" + } + }, + "expression": { + "interpolated": true, + "parameters": [ + "zoom" + ] + }, + "property-type": "data-constant" + }, + "hillshade-highlight-color": { + "type": "color", + "default": "#FFFFFF", + "doc": "The shading color of areas that faces towards the light source.", + "transition": true, + "sdk-support": { + "basic functionality": { + "js": "0.43.0", + "android": "6.0.0", + "ios": "4.0.0", + "macos": "0.7.0" + } + }, + "expression": { + "interpolated": true, + "parameters": [ + "zoom" + ] + }, + "property-type": "data-constant" + }, + "hillshade-accent-color": { + "type": "color", + "default": "#000000", + "doc": "The shading color used to accentuate rugged terrain like sharp cliffs and gorges.", + "transition": true, + "sdk-support": { + "basic functionality": { + "js": "0.43.0", + "android": "6.0.0", + "ios": "4.0.0", + "macos": "0.7.0" + } + }, + "expression": { + "interpolated": true, + "parameters": [ + "zoom" + ] + }, + "property-type": "data-constant" + } + }, + "paint_background": { + "background-color": { + "type": "color", + "default": "#000000", + "doc": "The color with which the background will be drawn.", + "transition": true, + "requires": [ + { + "!": "background-pattern" + } + ], + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "android": "2.0.1", + "ios": "2.0.0", + "macos": "0.1.0" + } + }, + "expression": { + "interpolated": true, + "parameters": [ + "zoom" + ] + }, + "property-type": "data-constant" + }, + "background-pattern": { + "type": "resolvedImage", + "transition": true, + "doc": "Name of image in sprite to use for drawing an image background. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.", + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "android": "2.0.1", + "ios": "2.0.0", + "macos": "0.1.0" + }, + "data-driven styling": {} + }, + "expression": { + "interpolated": false, + "parameters": [ + "zoom" + ] + }, + "property-type": "cross-faded" + }, + "background-opacity": { + "type": "number", + "default": 1, + "minimum": 0, + "maximum": 1, + "doc": "The opacity at which the background will be drawn.", + "transition": true, + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "android": "2.0.1", + "ios": "2.0.0", + "macos": "0.1.0" + } + }, + "expression": { + "interpolated": true, + "parameters": [ + "zoom" + ] + }, + "property-type": "data-constant" + } + }, + "transition": { + "duration": { + "type": "number", + "default": 300, + "minimum": 0, + "units": "milliseconds", + "doc": "Time allotted for transitions to complete." + }, + "delay": { + "type": "number", + "default": 0, + "minimum": 0, + "units": "milliseconds", + "doc": "Length of time before a transition begins." + } + }, + "property-type": { + "data-driven": { + "type": "property-type", + "doc": "Property is interpolable and can be represented using a property expression." + }, + "cross-faded": { + "type": "property-type", + "doc": "Property is non-interpolable; rather, its values will be cross-faded to smoothly transition between integer zooms." + }, + "cross-faded-data-driven": { + "type": "property-type", + "doc": "Property is non-interpolable; rather, its values will be cross-faded to smoothly transition between integer zooms. It can be represented using a property expression." + }, + "color-ramp": { + "type": "property-type", + "doc": "Property should be specified using a color ramp from which the output color can be sampled based on a property calculation." + }, + "data-constant": { + "type": "property-type", + "doc": "Property is interpolable but cannot be represented using a property expression." + }, + "constant": { + "type": "property-type", + "doc": "Property is constant across all zoom levels and property values." + } + }, + "promoteId": { + "*": { + "type": "string", + "doc": "A name of a feature property to use as ID for feature state." + } + } +} diff --git a/scripts/style-spec.js b/scripts/style-spec.js index 909412b1d8c..48c8b144b19 100644 --- a/scripts/style-spec.js +++ b/scripts/style-spec.js @@ -1,4 +1,4 @@ -const referenceSpec = require('../maplibre-gl-js/src/style-spec/reference/v8'); +const referenceSpec = require('../scripts/style-spec-reference/v8'); referenceSpec.layer.type.values["location-indicator"] = {}; referenceSpec["layout_location-indicator"] = { diff --git a/shaders/README.md b/shaders/README.md new file mode 100644 index 00000000000..3da88d3e7d1 --- /dev/null +++ b/shaders/README.md @@ -0,0 +1,42 @@ +# Mapbox GL Shaders + +This repository contains GL shaders which are shared by [Mapbox GL JS](https://github.com/mapbox/mapbox-gl-js) and [Mapbox GL Native](https://github.com/mapbox/mapbox-gl-native). + +## Pragmas + +Some variables change type depending on their context: + + - if the variable is the same for all features, we declare it as a `uniform` + - if the variable is different for each feature, we declare it as an `attribute` (in the vertex shader) and an accompanying `varying` (in both the vertex and fragment shaders). + - if the variable is different for each feature and a function of zoom, we declare several `attributes` and `uniforms` then calculate the value using interpolation + +We abstract over this functionality using pragmas. + +```glsl +#pragma mapbox: define highp vec4 color + +main() { + #pragma mapbox: initialize highp vec4 color + ... + gl_FragColor = color; +} +``` + +This program defines a variable within `main` called `color`, initialize the value of `color`, then sets `gl_FragColor` to the value of `color`. + +Pragmas take the following form. + +```glsl +#pragma mapbox: (define|initialize) (lowp|mediump|highp) (float|vec2|vec3|vec4) {name} +``` + +When using pragmas, the following requirements apply. + + - all pragma-defined variables must have both `define` and `initialize` pragmas + - `define` pragmas must be in file scope + - `initialize` pragmas must be in function scope + - all pragma-defined variables defined and initialized in the fragment shader must also be defined and initialized in the vertex shader because `attribute`s are not accessible from the fragment shader + +## Prelude + +The `_prelude.fragment.glsl` and `_prelude.vertex.glsl` files are automatically included in all shaders by the compiler. diff --git a/shaders/_prelude.fragment.glsl b/shaders/_prelude.fragment.glsl new file mode 100644 index 00000000000..e98fb22d587 --- /dev/null +++ b/shaders/_prelude.fragment.glsl @@ -0,0 +1,17 @@ +#ifdef GL_ES +precision mediump float; +#else + +#if !defined(lowp) +#define lowp +#endif + +#if !defined(mediump) +#define mediump +#endif + +#if !defined(highp) +#define highp +#endif + +#endif diff --git a/shaders/_prelude.vertex.glsl b/shaders/_prelude.vertex.glsl new file mode 100644 index 00000000000..9cd030e4eb9 --- /dev/null +++ b/shaders/_prelude.vertex.glsl @@ -0,0 +1,73 @@ +#ifdef GL_ES +precision highp float; +#else + +#if !defined(lowp) +#define lowp +#endif + +#if !defined(mediump) +#define mediump +#endif + +#if !defined(highp) +#define highp +#endif + +#endif + +// Unpack a pair of values that have been packed into a single float. +// The packed values are assumed to be 8-bit unsigned integers, and are +// packed like so: +// packedValue = floor(input[0]) * 256 + input[1], +vec2 unpack_float(const float packedValue) { + int packedIntValue = int(packedValue); + int v0 = packedIntValue / 256; + return vec2(v0, packedIntValue - v0 * 256); +} + +vec2 unpack_opacity(const float packedOpacity) { + int intOpacity = int(packedOpacity) / 2; + return vec2(float(intOpacity) / 127.0, mod(packedOpacity, 2.0)); +} + +// To minimize the number of attributes needed, we encode a 4-component +// color into a pair of floats (i.e. a vec2) as follows: +// [ floor(color.r * 255) * 256 + color.g * 255, +// floor(color.b * 255) * 256 + color.g * 255 ] +vec4 decode_color(const vec2 encodedColor) { + return vec4( + unpack_float(encodedColor[0]) / 255.0, + unpack_float(encodedColor[1]) / 255.0 + ); +} + +// Unpack a pair of paint values and interpolate between them. +float unpack_mix_vec2(const vec2 packedValue, const float t) { + return mix(packedValue[0], packedValue[1], t); +} + +// Unpack a pair of paint values and interpolate between them. +vec4 unpack_mix_color(const vec4 packedColors, const float t) { + vec4 minColor = decode_color(vec2(packedColors[0], packedColors[1])); + vec4 maxColor = decode_color(vec2(packedColors[2], packedColors[3])); + return mix(minColor, maxColor, t); +} + +// The offset depends on how many pixels are between the world origin and the edge of the tile: +// vec2 offset = mod(pixel_coord, size) +// +// At high zoom levels there are a ton of pixels between the world origin and the edge of the tile. +// The glsl spec only guarantees 16 bits of precision for highp floats. We need more than that. +// +// The pixel_coord is passed in as two 16 bit values: +// pixel_coord_upper = floor(pixel_coord / 2^16) +// pixel_coord_lower = mod(pixel_coord, 2^16) +// +// The offset is calculated in a series of steps that should preserve this precision: +vec2 get_pattern_pos(const vec2 pixel_coord_upper, const vec2 pixel_coord_lower, + const vec2 pattern_size, const float tile_units_to_pixels, const vec2 pos) { + + vec2 offset = mod(mod(mod(pixel_coord_upper, pattern_size) * 256.0, pattern_size) * 256.0 + pixel_coord_lower, pattern_size); + return (tile_units_to_pixels * pos + offset) / pattern_size; +} diff --git a/shaders/background.fragment.glsl b/shaders/background.fragment.glsl new file mode 100644 index 00000000000..01e10bf6c2b --- /dev/null +++ b/shaders/background.fragment.glsl @@ -0,0 +1,10 @@ +uniform vec4 u_color; +uniform float u_opacity; + +void main() { + gl_FragColor = u_color * u_opacity; + +#ifdef OVERDRAW_INSPECTOR + gl_FragColor = vec4(1.0); +#endif +} diff --git a/shaders/background.vertex.glsl b/shaders/background.vertex.glsl new file mode 100644 index 00000000000..866c3cd2f39 --- /dev/null +++ b/shaders/background.vertex.glsl @@ -0,0 +1,7 @@ +attribute vec2 a_pos; + +uniform mat4 u_matrix; + +void main() { + gl_Position = u_matrix * vec4(a_pos, 0, 1); +} diff --git a/shaders/background_pattern.fragment.glsl b/shaders/background_pattern.fragment.glsl new file mode 100644 index 00000000000..4f9d1c34b05 --- /dev/null +++ b/shaders/background_pattern.fragment.glsl @@ -0,0 +1,28 @@ +uniform vec2 u_pattern_tl_a; +uniform vec2 u_pattern_br_a; +uniform vec2 u_pattern_tl_b; +uniform vec2 u_pattern_br_b; +uniform vec2 u_texsize; +uniform float u_mix; +uniform float u_opacity; + +uniform sampler2D u_image; + +varying vec2 v_pos_a; +varying vec2 v_pos_b; + +void main() { + vec2 imagecoord = mod(v_pos_a, 1.0); + vec2 pos = mix(u_pattern_tl_a / u_texsize, u_pattern_br_a / u_texsize, imagecoord); + vec4 color1 = texture2D(u_image, pos); + + vec2 imagecoord_b = mod(v_pos_b, 1.0); + vec2 pos2 = mix(u_pattern_tl_b / u_texsize, u_pattern_br_b / u_texsize, imagecoord_b); + vec4 color2 = texture2D(u_image, pos2); + + gl_FragColor = mix(color1, color2, u_mix) * u_opacity; + +#ifdef OVERDRAW_INSPECTOR + gl_FragColor = vec4(1.0); +#endif +} diff --git a/shaders/background_pattern.vertex.glsl b/shaders/background_pattern.vertex.glsl new file mode 100644 index 00000000000..e8935a06270 --- /dev/null +++ b/shaders/background_pattern.vertex.glsl @@ -0,0 +1,20 @@ +uniform mat4 u_matrix; +uniform vec2 u_pattern_size_a; +uniform vec2 u_pattern_size_b; +uniform vec2 u_pixel_coord_upper; +uniform vec2 u_pixel_coord_lower; +uniform float u_scale_a; +uniform float u_scale_b; +uniform float u_tile_units_to_pixels; + +attribute vec2 a_pos; + +varying vec2 v_pos_a; +varying vec2 v_pos_b; + +void main() { + gl_Position = u_matrix * vec4(a_pos, 0, 1); + + v_pos_a = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_a * u_pattern_size_a, u_tile_units_to_pixels, a_pos); + v_pos_b = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_b * u_pattern_size_b, u_tile_units_to_pixels, a_pos); +} diff --git a/shaders/circle.fragment.glsl b/shaders/circle.fragment.glsl new file mode 100644 index 00000000000..14081450b09 --- /dev/null +++ b/shaders/circle.fragment.glsl @@ -0,0 +1,39 @@ +varying vec3 v_data; + +#pragma mapbox: define highp vec4 color +#pragma mapbox: define mediump float radius +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +#pragma mapbox: define highp vec4 stroke_color +#pragma mapbox: define mediump float stroke_width +#pragma mapbox: define lowp float stroke_opacity + +void main() { + #pragma mapbox: initialize highp vec4 color + #pragma mapbox: initialize mediump float radius + #pragma mapbox: initialize lowp float blur + #pragma mapbox: initialize lowp float opacity + #pragma mapbox: initialize highp vec4 stroke_color + #pragma mapbox: initialize mediump float stroke_width + #pragma mapbox: initialize lowp float stroke_opacity + + vec2 extrude = v_data.xy; + float extrude_length = length(extrude); + + lowp float antialiasblur = v_data.z; + float antialiased_blur = -max(blur, antialiasblur); + + float opacity_t = smoothstep(0.0, antialiased_blur, extrude_length - 1.0); + + float color_t = stroke_width < 0.01 ? 0.0 : smoothstep( + antialiased_blur, + 0.0, + extrude_length - radius / (radius + stroke_width) + ); + + gl_FragColor = opacity_t * mix(color * opacity, stroke_color * stroke_opacity, color_t); + +#ifdef OVERDRAW_INSPECTOR + gl_FragColor = vec4(1.0); +#endif +} diff --git a/shaders/circle.vertex.glsl b/shaders/circle.vertex.glsl new file mode 100644 index 00000000000..1f084104174 --- /dev/null +++ b/shaders/circle.vertex.glsl @@ -0,0 +1,64 @@ +uniform mat4 u_matrix; +uniform bool u_scale_with_map; +uniform bool u_pitch_with_map; +uniform vec2 u_extrude_scale; +uniform lowp float u_device_pixel_ratio; +uniform highp float u_camera_to_center_distance; + +attribute vec2 a_pos; + +varying vec3 v_data; + +#pragma mapbox: define highp vec4 color +#pragma mapbox: define mediump float radius +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +#pragma mapbox: define highp vec4 stroke_color +#pragma mapbox: define mediump float stroke_width +#pragma mapbox: define lowp float stroke_opacity + +void main(void) { + #pragma mapbox: initialize highp vec4 color + #pragma mapbox: initialize mediump float radius + #pragma mapbox: initialize lowp float blur + #pragma mapbox: initialize lowp float opacity + #pragma mapbox: initialize highp vec4 stroke_color + #pragma mapbox: initialize mediump float stroke_width + #pragma mapbox: initialize lowp float stroke_opacity + + // unencode the extrusion vector that we snuck into the a_pos vector + vec2 extrude = vec2(mod(a_pos, 2.0) * 2.0 - 1.0); + + // multiply a_pos by 0.5, since we had it * 2 in order to sneak + // in extrusion data + vec2 circle_center = floor(a_pos * 0.5); + if (u_pitch_with_map) { + vec2 corner_position = circle_center; + if (u_scale_with_map) { + corner_position += extrude * (radius + stroke_width) * u_extrude_scale; + } else { + // Pitching the circle with the map effectively scales it with the map + // To counteract the effect for pitch-scale: viewport, we rescale the + // whole circle based on the pitch scaling effect at its central point + vec4 projected_center = u_matrix * vec4(circle_center, 0, 1); + corner_position += extrude * (radius + stroke_width) * u_extrude_scale * (projected_center.w / u_camera_to_center_distance); + } + + gl_Position = u_matrix * vec4(corner_position, 0, 1); + } else { + gl_Position = u_matrix * vec4(circle_center, 0, 1); + + if (u_scale_with_map) { + gl_Position.xy += extrude * (radius + stroke_width) * u_extrude_scale * u_camera_to_center_distance; + } else { + gl_Position.xy += extrude * (radius + stroke_width) * u_extrude_scale * gl_Position.w; + } + } + + // This is a minimum blur distance that serves as a faux-antialiasing for + // the circle. since blur is a ratio of the circle's size and the intent is + // to keep the blur at roughly 1px, the two are inversely related. + lowp float antialiasblur = 1.0 / u_device_pixel_ratio / (radius + stroke_width); + + v_data = vec3(extrude.x, extrude.y, antialiasblur); +} diff --git a/shaders/clipping_mask.fragment.glsl b/shaders/clipping_mask.fragment.glsl new file mode 100644 index 00000000000..fdd1a9285a6 --- /dev/null +++ b/shaders/clipping_mask.fragment.glsl @@ -0,0 +1,3 @@ +void main() { + gl_FragColor = vec4(1.0); +} diff --git a/shaders/clipping_mask.vertex.glsl b/shaders/clipping_mask.vertex.glsl new file mode 100644 index 00000000000..866c3cd2f39 --- /dev/null +++ b/shaders/clipping_mask.vertex.glsl @@ -0,0 +1,7 @@ +attribute vec2 a_pos; + +uniform mat4 u_matrix; + +void main() { + gl_Position = u_matrix * vec4(a_pos, 0, 1); +} diff --git a/shaders/collision_box.fragment.glsl b/shaders/collision_box.fragment.glsl new file mode 100644 index 00000000000..751c412ded9 --- /dev/null +++ b/shaders/collision_box.fragment.glsl @@ -0,0 +1,21 @@ + +varying float v_placed; +varying float v_notUsed; + +void main() { + + float alpha = 0.5; + + // Red = collision, hide label + gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0) * alpha; + + // Blue = no collision, label is showing + if (v_placed > 0.5) { + gl_FragColor = vec4(0.0, 0.0, 1.0, 0.5) * alpha; + } + + if (v_notUsed > 0.5) { + // This box not used, fade it out + gl_FragColor *= .1; + } +} \ No newline at end of file diff --git a/shaders/collision_box.vertex.glsl b/shaders/collision_box.vertex.glsl new file mode 100644 index 00000000000..8fa4bfc025d --- /dev/null +++ b/shaders/collision_box.vertex.glsl @@ -0,0 +1,27 @@ +attribute vec2 a_pos; +attribute vec2 a_anchor_pos; +attribute vec2 a_extrude; +attribute vec2 a_placed; +attribute vec2 a_shift; + +uniform mat4 u_matrix; +uniform vec2 u_extrude_scale; +uniform float u_camera_to_center_distance; + +varying float v_placed; +varying float v_notUsed; + +void main() { + vec4 projectedPoint = u_matrix * vec4(a_anchor_pos, 0, 1); + highp float camera_to_anchor_distance = projectedPoint.w; + highp float collision_perspective_ratio = clamp( + 0.5 + 0.5 * (u_camera_to_center_distance / camera_to_anchor_distance), + 0.0, // Prevents oversized near-field boxes in pitched/overzoomed tiles + 4.0); + + gl_Position = u_matrix * vec4(a_pos, 0.0, 1.0); + gl_Position.xy += (a_extrude + a_shift) * u_extrude_scale * gl_Position.w * collision_perspective_ratio; + + v_placed = a_placed.x; + v_notUsed = a_placed.y; +} diff --git a/shaders/collision_circle.fragment.glsl b/shaders/collision_circle.fragment.glsl new file mode 100644 index 00000000000..e7eedb19e34 --- /dev/null +++ b/shaders/collision_circle.fragment.glsl @@ -0,0 +1,34 @@ +uniform float u_overscale_factor; + +varying float v_placed; +varying float v_notUsed; +varying float v_radius; +varying vec2 v_extrude; +varying vec2 v_extrude_scale; + +void main() { + float alpha = 0.5; + + // Red = collision, hide label + vec4 color = vec4(1.0, 0.0, 0.0, 1.0) * alpha; + + // Blue = no collision, label is showing + if (v_placed > 0.5) { + color = vec4(0.0, 0.0, 1.0, 0.5) * alpha; + } + + if (v_notUsed > 0.5) { + // This box not used, fade it out + color *= .2; + } + + float extrude_scale_length = length(v_extrude_scale); + float extrude_length = length(v_extrude) * extrude_scale_length; + float stroke_width = 15.0 * extrude_scale_length / u_overscale_factor; + float radius = v_radius * extrude_scale_length; + + float distance_to_edge = abs(extrude_length - radius); + float opacity_t = smoothstep(-stroke_width, 0.0, -distance_to_edge); + + gl_FragColor = opacity_t * color; +} diff --git a/shaders/collision_circle.vertex.glsl b/shaders/collision_circle.vertex.glsl new file mode 100644 index 00000000000..24e06ed1c17 --- /dev/null +++ b/shaders/collision_circle.vertex.glsl @@ -0,0 +1,36 @@ +attribute vec2 a_pos; +attribute vec2 a_anchor_pos; +attribute vec2 a_extrude; +attribute vec2 a_placed; + +uniform mat4 u_matrix; +uniform vec2 u_extrude_scale; +uniform float u_camera_to_center_distance; + +varying float v_placed; +varying float v_notUsed; +varying float v_radius; + +varying vec2 v_extrude; +varying vec2 v_extrude_scale; + +void main() { + vec4 projectedPoint = u_matrix * vec4(a_anchor_pos, 0, 1); + highp float camera_to_anchor_distance = projectedPoint.w; + highp float collision_perspective_ratio = clamp( + 0.5 + 0.5 * (u_camera_to_center_distance / camera_to_anchor_distance), + 0.0, // Prevents oversized near-field circles in pitched/overzoomed tiles + 4.0); + + gl_Position = u_matrix * vec4(a_pos, 0.0, 1.0); + + highp float padding_factor = 1.2; // Pad the vertices slightly to make room for anti-alias blur + gl_Position.xy += a_extrude * u_extrude_scale * padding_factor * gl_Position.w * collision_perspective_ratio; + + v_placed = a_placed.x; + v_notUsed = a_placed.y; + v_radius = abs(a_extrude.y); // We don't pitch the circles, so both units of the extrusion vector are equal in magnitude to the radius + + v_extrude = a_extrude * padding_factor; + v_extrude_scale = u_extrude_scale * u_camera_to_center_distance * collision_perspective_ratio; +} diff --git a/shaders/debug.fragment.glsl b/shaders/debug.fragment.glsl new file mode 100644 index 00000000000..c15a694bd1b --- /dev/null +++ b/shaders/debug.fragment.glsl @@ -0,0 +1,9 @@ +uniform highp vec4 u_color; +uniform sampler2D u_overlay; + +varying vec2 v_uv; + +void main() { + vec4 overlay_color = texture2D(u_overlay, v_uv); + gl_FragColor = mix(u_color, overlay_color, overlay_color.a); +} diff --git a/shaders/debug.vertex.glsl b/shaders/debug.vertex.glsl new file mode 100644 index 00000000000..c872e7fa981 --- /dev/null +++ b/shaders/debug.vertex.glsl @@ -0,0 +1,12 @@ +attribute vec2 a_pos; +varying vec2 v_uv; + +uniform mat4 u_matrix; +uniform float u_overlay_scale; + +void main() { + // This vertex shader expects a EXTENT x EXTENT quad, + // The UV co-ordinates for the overlay texture can be calculated using that knowledge + v_uv = a_pos / 8192.0; + gl_Position = u_matrix * vec4(a_pos * u_overlay_scale, 0, 1); +} diff --git a/shaders/encode_attribute.js b/shaders/encode_attribute.js new file mode 100644 index 00000000000..7e09dd696d2 --- /dev/null +++ b/shaders/encode_attribute.js @@ -0,0 +1,17 @@ +// @flow + +import {clamp} from '../util/util'; + +/** + * Packs two numbers, interpreted as 8-bit unsigned integers, into a single + * float. Unpack them in the shader using the `unpack_float()` function, + * defined in _prelude.vertex.glsl + * + * @private + */ +export function packUint8ToFloat(a: number, b: number) { + // coerce a and b to 8-bit ints + a = clamp(Math.floor(a), 0, 255); + b = clamp(Math.floor(b), 0, 255); + return 256 * a + b; +} diff --git a/shaders/fill.fragment.glsl b/shaders/fill.fragment.glsl new file mode 100644 index 00000000000..a156d2c3c57 --- /dev/null +++ b/shaders/fill.fragment.glsl @@ -0,0 +1,13 @@ +#pragma mapbox: define highp vec4 color +#pragma mapbox: define lowp float opacity + +void main() { + #pragma mapbox: initialize highp vec4 color + #pragma mapbox: initialize lowp float opacity + + gl_FragColor = color * opacity; + +#ifdef OVERDRAW_INSPECTOR + gl_FragColor = vec4(1.0); +#endif +} diff --git a/shaders/fill.vertex.glsl b/shaders/fill.vertex.glsl new file mode 100644 index 00000000000..b4e8277fa19 --- /dev/null +++ b/shaders/fill.vertex.glsl @@ -0,0 +1,13 @@ +attribute vec2 a_pos; + +uniform mat4 u_matrix; + +#pragma mapbox: define highp vec4 color +#pragma mapbox: define lowp float opacity + +void main() { + #pragma mapbox: initialize highp vec4 color + #pragma mapbox: initialize lowp float opacity + + gl_Position = u_matrix * vec4(a_pos, 0, 1); +} diff --git a/shaders/fill_extrusion.fragment.glsl b/shaders/fill_extrusion.fragment.glsl new file mode 100644 index 00000000000..1c4cec51cc9 --- /dev/null +++ b/shaders/fill_extrusion.fragment.glsl @@ -0,0 +1,9 @@ +varying vec4 v_color; + +void main() { + gl_FragColor = v_color; + +#ifdef OVERDRAW_INSPECTOR + gl_FragColor = vec4(1.0); +#endif +} diff --git a/shaders/fill_extrusion.vertex.glsl b/shaders/fill_extrusion.vertex.glsl new file mode 100644 index 00000000000..7a771b6dc97 --- /dev/null +++ b/shaders/fill_extrusion.vertex.glsl @@ -0,0 +1,66 @@ +uniform mat4 u_matrix; +uniform vec3 u_lightcolor; +uniform lowp vec3 u_lightpos; +uniform lowp float u_lightintensity; +uniform float u_vertical_gradient; +uniform lowp float u_opacity; + +attribute vec2 a_pos; +attribute vec4 a_normal_ed; + +varying vec4 v_color; + +#pragma mapbox: define highp float base +#pragma mapbox: define highp float height + +#pragma mapbox: define highp vec4 color + +void main() { + #pragma mapbox: initialize highp float base + #pragma mapbox: initialize highp float height + #pragma mapbox: initialize highp vec4 color + + vec3 normal = a_normal_ed.xyz; + + base = max(0.0, base); + height = max(0.0, height); + + float t = mod(normal.x, 2.0); + + gl_Position = u_matrix * vec4(a_pos, t > 0.0 ? height : base, 1); + + // Relative luminance (how dark/bright is the surface color?) + float colorvalue = color.r * 0.2126 + color.g * 0.7152 + color.b * 0.0722; + + v_color = vec4(0.0, 0.0, 0.0, 1.0); + + // Add slight ambient lighting so no extrusions are totally black + vec4 ambientlight = vec4(0.03, 0.03, 0.03, 1.0); + color += ambientlight; + + // Calculate cos(theta), where theta is the angle between surface normal and diffuse light ray + float directional = clamp(dot(normal / 16384.0, u_lightpos), 0.0, 1.0); + + // Adjust directional so that + // the range of values for highlight/shading is narrower + // with lower light intensity + // and with lighter/brighter surface colors + directional = mix((1.0 - u_lightintensity), max((1.0 - colorvalue + u_lightintensity), 1.0), directional); + + // Add gradient along z axis of side surfaces + if (normal.y != 0.0) { + // This avoids another branching statement, but multiplies by a constant of 0.84 if no vertical gradient, + // and otherwise calculates the gradient based on base + height + directional *= ( + (1.0 - u_vertical_gradient) + + (u_vertical_gradient * clamp((t + base) * pow(height / 150.0, 0.5), mix(0.7, 0.98, 1.0 - u_lightintensity), 1.0))); + } + + // Assign final color based on surface + ambient light color, diffuse light directional, and light color + // with lower bounds adjusted to hue of light + // so that shading is tinted with the complementary (opposite) color to the light color + v_color.r += clamp(color.r * directional * u_lightcolor.r, mix(0.0, 0.3, 1.0 - u_lightcolor.r), 1.0); + v_color.g += clamp(color.g * directional * u_lightcolor.g, mix(0.0, 0.3, 1.0 - u_lightcolor.g), 1.0); + v_color.b += clamp(color.b * directional * u_lightcolor.b, mix(0.0, 0.3, 1.0 - u_lightcolor.b), 1.0); + v_color *= u_opacity; +} diff --git a/shaders/fill_extrusion_pattern.fragment.glsl b/shaders/fill_extrusion_pattern.fragment.glsl new file mode 100644 index 00000000000..f3243d74b71 --- /dev/null +++ b/shaders/fill_extrusion_pattern.fragment.glsl @@ -0,0 +1,41 @@ +uniform vec2 u_texsize; +uniform float u_fade; + +uniform sampler2D u_image; + +varying vec2 v_pos_a; +varying vec2 v_pos_b; +varying vec4 v_lighting; + +#pragma mapbox: define lowp float base +#pragma mapbox: define lowp float height +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to + +void main() { + #pragma mapbox: initialize lowp float base + #pragma mapbox: initialize lowp float height + #pragma mapbox: initialize mediump vec4 pattern_from + #pragma mapbox: initialize mediump vec4 pattern_to + + vec2 pattern_tl_a = pattern_from.xy; + vec2 pattern_br_a = pattern_from.zw; + vec2 pattern_tl_b = pattern_to.xy; + vec2 pattern_br_b = pattern_to.zw; + + vec2 imagecoord = mod(v_pos_a, 1.0); + vec2 pos = mix(pattern_tl_a / u_texsize, pattern_br_a / u_texsize, imagecoord); + vec4 color1 = texture2D(u_image, pos); + + vec2 imagecoord_b = mod(v_pos_b, 1.0); + vec2 pos2 = mix(pattern_tl_b / u_texsize, pattern_br_b / u_texsize, imagecoord_b); + vec4 color2 = texture2D(u_image, pos2); + + vec4 mixedColor = mix(color1, color2, u_fade); + + gl_FragColor = mixedColor * v_lighting; + +#ifdef OVERDRAW_INSPECTOR + gl_FragColor = vec4(1.0); +#endif +} diff --git a/shaders/fill_extrusion_pattern.vertex.glsl b/shaders/fill_extrusion_pattern.vertex.glsl new file mode 100644 index 00000000000..2761d56b6a9 --- /dev/null +++ b/shaders/fill_extrusion_pattern.vertex.glsl @@ -0,0 +1,76 @@ +uniform mat4 u_matrix; +uniform vec2 u_pixel_coord_upper; +uniform vec2 u_pixel_coord_lower; +uniform float u_height_factor; +uniform vec4 u_scale; +uniform float u_vertical_gradient; +uniform lowp float u_opacity; + +uniform vec3 u_lightcolor; +uniform lowp vec3 u_lightpos; +uniform lowp float u_lightintensity; + +attribute vec2 a_pos; +attribute vec4 a_normal_ed; + +varying vec2 v_pos_a; +varying vec2 v_pos_b; +varying vec4 v_lighting; + +#pragma mapbox: define lowp float base +#pragma mapbox: define lowp float height +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to + +void main() { + #pragma mapbox: initialize lowp float base + #pragma mapbox: initialize lowp float height + #pragma mapbox: initialize mediump vec4 pattern_from + #pragma mapbox: initialize mediump vec4 pattern_to + + vec2 pattern_tl_a = pattern_from.xy; + vec2 pattern_br_a = pattern_from.zw; + vec2 pattern_tl_b = pattern_to.xy; + vec2 pattern_br_b = pattern_to.zw; + + float pixelRatio = u_scale.x; + float tileRatio = u_scale.y; + float fromScale = u_scale.z; + float toScale = u_scale.w; + + vec3 normal = a_normal_ed.xyz; + float edgedistance = a_normal_ed.w; + + vec2 display_size_a = vec2((pattern_br_a.x - pattern_tl_a.x) / pixelRatio, (pattern_br_a.y - pattern_tl_a.y) / pixelRatio); + vec2 display_size_b = vec2((pattern_br_b.x - pattern_tl_b.x) / pixelRatio, (pattern_br_b.y - pattern_tl_b.y) / pixelRatio); + + base = max(0.0, base); + height = max(0.0, height); + + float t = mod(normal.x, 2.0); + float z = t > 0.0 ? height : base; + + gl_Position = u_matrix * vec4(a_pos, z, 1); + + vec2 pos = normal.x == 1.0 && normal.y == 0.0 && normal.z == 16384.0 + ? a_pos // extrusion top + : vec2(edgedistance, z * u_height_factor); // extrusion side + + v_pos_a = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, fromScale * display_size_a, tileRatio, pos); + v_pos_b = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, toScale * display_size_b, tileRatio, pos); + + v_lighting = vec4(0.0, 0.0, 0.0, 1.0); + float directional = clamp(dot(normal / 16383.0, u_lightpos), 0.0, 1.0); + directional = mix((1.0 - u_lightintensity), max((0.5 + u_lightintensity), 1.0), directional); + + if (normal.y != 0.0) { + // This avoids another branching statement, but multiplies by a constant of 0.84 if no vertical gradient, + // and otherwise calculates the gradient based on base + height + directional *= ( + (1.0 - u_vertical_gradient) + + (u_vertical_gradient * clamp((t + base) * pow(height / 150.0, 0.5), mix(0.7, 0.98, 1.0 - u_lightintensity), 1.0))); + } + + v_lighting.rgb += clamp(directional * u_lightcolor, mix(vec3(0.0), vec3(0.3), 1.0 - u_lightcolor), vec3(1.0)); + v_lighting *= u_opacity; +} diff --git a/shaders/fill_outline.fragment.glsl b/shaders/fill_outline.fragment.glsl new file mode 100644 index 00000000000..81e4934e178 --- /dev/null +++ b/shaders/fill_outline.fragment.glsl @@ -0,0 +1,17 @@ +varying vec2 v_pos; + +#pragma mapbox: define highp vec4 outline_color +#pragma mapbox: define lowp float opacity + +void main() { + #pragma mapbox: initialize highp vec4 outline_color + #pragma mapbox: initialize lowp float opacity + + float dist = length(v_pos - gl_FragCoord.xy); + float alpha = 1.0 - smoothstep(0.0, 1.0, dist); + gl_FragColor = outline_color * (alpha * opacity); + +#ifdef OVERDRAW_INSPECTOR + gl_FragColor = vec4(1.0); +#endif +} diff --git a/shaders/fill_outline.vertex.glsl b/shaders/fill_outline.vertex.glsl new file mode 100644 index 00000000000..2fd1f2d6912 --- /dev/null +++ b/shaders/fill_outline.vertex.glsl @@ -0,0 +1,17 @@ +attribute vec2 a_pos; + +uniform mat4 u_matrix; +uniform vec2 u_world; + +varying vec2 v_pos; + +#pragma mapbox: define highp vec4 outline_color +#pragma mapbox: define lowp float opacity + +void main() { + #pragma mapbox: initialize highp vec4 outline_color + #pragma mapbox: initialize lowp float opacity + + gl_Position = u_matrix * vec4(a_pos, 0, 1); + v_pos = (gl_Position.xy / gl_Position.w + 1.0) / 2.0 * u_world; +} diff --git a/shaders/fill_outline_pattern.fragment.glsl b/shaders/fill_outline_pattern.fragment.glsl new file mode 100644 index 00000000000..8d75cbbfe4d --- /dev/null +++ b/shaders/fill_outline_pattern.fragment.glsl @@ -0,0 +1,43 @@ + +uniform vec2 u_texsize; +uniform sampler2D u_image; +uniform float u_fade; + +varying vec2 v_pos_a; +varying vec2 v_pos_b; +varying vec2 v_pos; + +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to + +void main() { + #pragma mapbox: initialize lowp float opacity + #pragma mapbox: initialize mediump vec4 pattern_from + #pragma mapbox: initialize mediump vec4 pattern_to + + vec2 pattern_tl_a = pattern_from.xy; + vec2 pattern_br_a = pattern_from.zw; + vec2 pattern_tl_b = pattern_to.xy; + vec2 pattern_br_b = pattern_to.zw; + + vec2 imagecoord = mod(v_pos_a, 1.0); + vec2 pos = mix(pattern_tl_a / u_texsize, pattern_br_a / u_texsize, imagecoord); + vec4 color1 = texture2D(u_image, pos); + + vec2 imagecoord_b = mod(v_pos_b, 1.0); + vec2 pos2 = mix(pattern_tl_b / u_texsize, pattern_br_b / u_texsize, imagecoord_b); + vec4 color2 = texture2D(u_image, pos2); + + // find distance to outline for alpha interpolation + + float dist = length(v_pos - gl_FragCoord.xy); + float alpha = 1.0 - smoothstep(0.0, 1.0, dist); + + + gl_FragColor = mix(color1, color2, u_fade) * alpha * opacity; + +#ifdef OVERDRAW_INSPECTOR + gl_FragColor = vec4(1.0); +#endif +} diff --git a/shaders/fill_outline_pattern.vertex.glsl b/shaders/fill_outline_pattern.vertex.glsl new file mode 100644 index 00000000000..ac5ed0c423f --- /dev/null +++ b/shaders/fill_outline_pattern.vertex.glsl @@ -0,0 +1,41 @@ +uniform mat4 u_matrix; +uniform vec2 u_world; +uniform vec2 u_pixel_coord_upper; +uniform vec2 u_pixel_coord_lower; +uniform vec4 u_scale; + +attribute vec2 a_pos; + +varying vec2 v_pos_a; +varying vec2 v_pos_b; +varying vec2 v_pos; + +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to + +void main() { + #pragma mapbox: initialize lowp float opacity + #pragma mapbox: initialize mediump vec4 pattern_from + #pragma mapbox: initialize mediump vec4 pattern_to + + vec2 pattern_tl_a = pattern_from.xy; + vec2 pattern_br_a = pattern_from.zw; + vec2 pattern_tl_b = pattern_to.xy; + vec2 pattern_br_b = pattern_to.zw; + + float pixelRatio = u_scale.x; + float tileRatio = u_scale.y; + float fromScale = u_scale.z; + float toScale = u_scale.w; + + gl_Position = u_matrix * vec4(a_pos, 0, 1); + + vec2 display_size_a = vec2((pattern_br_a.x - pattern_tl_a.x) / pixelRatio, (pattern_br_a.y - pattern_tl_a.y) / pixelRatio); + vec2 display_size_b = vec2((pattern_br_b.x - pattern_tl_b.x) / pixelRatio, (pattern_br_b.y - pattern_tl_b.y) / pixelRatio); + + v_pos_a = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, fromScale * display_size_a, tileRatio, a_pos); + v_pos_b = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, toScale * display_size_b, tileRatio, a_pos); + + v_pos = (gl_Position.xy / gl_Position.w + 1.0) / 2.0 * u_world; +} diff --git a/shaders/fill_pattern.fragment.glsl b/shaders/fill_pattern.fragment.glsl new file mode 100644 index 00000000000..a588f2ecebd --- /dev/null +++ b/shaders/fill_pattern.fragment.glsl @@ -0,0 +1,36 @@ +uniform vec2 u_texsize; +uniform float u_fade; + +uniform sampler2D u_image; + +varying vec2 v_pos_a; +varying vec2 v_pos_b; + +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to + +void main() { + #pragma mapbox: initialize lowp float opacity + #pragma mapbox: initialize mediump vec4 pattern_from + #pragma mapbox: initialize mediump vec4 pattern_to + + vec2 pattern_tl_a = pattern_from.xy; + vec2 pattern_br_a = pattern_from.zw; + vec2 pattern_tl_b = pattern_to.xy; + vec2 pattern_br_b = pattern_to.zw; + + vec2 imagecoord = mod(v_pos_a, 1.0); + vec2 pos = mix(pattern_tl_a / u_texsize, pattern_br_a / u_texsize, imagecoord); + vec4 color1 = texture2D(u_image, pos); + + vec2 imagecoord_b = mod(v_pos_b, 1.0); + vec2 pos2 = mix(pattern_tl_b / u_texsize, pattern_br_b / u_texsize, imagecoord_b); + vec4 color2 = texture2D(u_image, pos2); + + gl_FragColor = mix(color1, color2, u_fade) * opacity; + +#ifdef OVERDRAW_INSPECTOR + gl_FragColor = vec4(1.0); +#endif +} diff --git a/shaders/fill_pattern.vertex.glsl b/shaders/fill_pattern.vertex.glsl new file mode 100644 index 00000000000..a3be3320186 --- /dev/null +++ b/shaders/fill_pattern.vertex.glsl @@ -0,0 +1,36 @@ +uniform mat4 u_matrix; +uniform vec2 u_pixel_coord_upper; +uniform vec2 u_pixel_coord_lower; +uniform vec4 u_scale; + +attribute vec2 a_pos; + +varying vec2 v_pos_a; +varying vec2 v_pos_b; + +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to + +void main() { + #pragma mapbox: initialize lowp float opacity + #pragma mapbox: initialize mediump vec4 pattern_from + #pragma mapbox: initialize mediump vec4 pattern_to + + vec2 pattern_tl_a = pattern_from.xy; + vec2 pattern_br_a = pattern_from.zw; + vec2 pattern_tl_b = pattern_to.xy; + vec2 pattern_br_b = pattern_to.zw; + + float pixelRatio = u_scale.x; + float tileZoomRatio = u_scale.y; + float fromScale = u_scale.z; + float toScale = u_scale.w; + + vec2 display_size_a = vec2((pattern_br_a.x - pattern_tl_a.x) / pixelRatio, (pattern_br_a.y - pattern_tl_a.y) / pixelRatio); + vec2 display_size_b = vec2((pattern_br_b.x - pattern_tl_b.x) / pixelRatio, (pattern_br_b.y - pattern_tl_b.y) / pixelRatio); + gl_Position = u_matrix * vec4(a_pos, 0, 1); + + v_pos_a = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, fromScale * display_size_a, tileZoomRatio, a_pos); + v_pos_b = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, toScale * display_size_b, tileZoomRatio, a_pos); +} diff --git a/shaders/heatmap.fragment.glsl b/shaders/heatmap.fragment.glsl new file mode 100644 index 00000000000..2550ab86927 --- /dev/null +++ b/shaders/heatmap.fragment.glsl @@ -0,0 +1,22 @@ +uniform highp float u_intensity; + +varying vec2 v_extrude; + +#pragma mapbox: define highp float weight + +// Gaussian kernel coefficient: 1 / sqrt(2 * PI) +#define GAUSS_COEF 0.3989422804014327 + +void main() { + #pragma mapbox: initialize highp float weight + + // Kernel density estimation with a Gaussian kernel of size 5x5 + float d = -0.5 * 3.0 * 3.0 * dot(v_extrude, v_extrude); + float val = weight * u_intensity * GAUSS_COEF * exp(d); + + gl_FragColor = vec4(val, 1.0, 1.0, 1.0); + +#ifdef OVERDRAW_INSPECTOR + gl_FragColor = vec4(1.0); +#endif +} diff --git a/shaders/heatmap.vertex.glsl b/shaders/heatmap.vertex.glsl new file mode 100644 index 00000000000..3712e4f2b0f --- /dev/null +++ b/shaders/heatmap.vertex.glsl @@ -0,0 +1,54 @@ + +uniform mat4 u_matrix; +uniform float u_extrude_scale; +uniform float u_opacity; +uniform float u_intensity; + +attribute vec2 a_pos; + +varying vec2 v_extrude; + +#pragma mapbox: define highp float weight +#pragma mapbox: define mediump float radius + +// Effective "0" in the kernel density texture to adjust the kernel size to; +// this empirically chosen number minimizes artifacts on overlapping kernels +// for typical heatmap cases (assuming clustered source) +const highp float ZERO = 1.0 / 255.0 / 16.0; + +// Gaussian kernel coefficient: 1 / sqrt(2 * PI) +#define GAUSS_COEF 0.3989422804014327 + +void main(void) { + #pragma mapbox: initialize highp float weight + #pragma mapbox: initialize mediump float radius + + // unencode the extrusion vector that we snuck into the a_pos vector + vec2 unscaled_extrude = vec2(mod(a_pos, 2.0) * 2.0 - 1.0); + + // This 'extrude' comes in ranging from [-1, -1], to [1, 1]. We'll use + // it to produce the vertices of a square mesh framing the point feature + // we're adding to the kernel density texture. We'll also pass it as + // a varying, so that the fragment shader can determine the distance of + // each fragment from the point feature. + // Before we do so, we need to scale it up sufficiently so that the + // kernel falls effectively to zero at the edge of the mesh. + // That is, we want to know S such that + // weight * u_intensity * GAUSS_COEF * exp(-0.5 * 3.0^2 * S^2) == ZERO + // Which solves to: + // S = sqrt(-2.0 * log(ZERO / (weight * u_intensity * GAUSS_COEF))) / 3.0 + float S = sqrt(-2.0 * log(ZERO / weight / u_intensity / GAUSS_COEF)) / 3.0; + + // Pass the varying in units of radius + v_extrude = S * unscaled_extrude; + + // Scale by radius and the zoom-based scale factor to produce actual + // mesh position + vec2 extrude = v_extrude * radius * u_extrude_scale; + + // multiply a_pos by 0.5, since we had it * 2 in order to sneak + // in extrusion data + vec4 pos = vec4(floor(a_pos * 0.5) + extrude, 0, 1); + + gl_Position = u_matrix * pos; +} diff --git a/shaders/heatmap_texture.fragment.glsl b/shaders/heatmap_texture.fragment.glsl new file mode 100644 index 00000000000..d21970d19a1 --- /dev/null +++ b/shaders/heatmap_texture.fragment.glsl @@ -0,0 +1,14 @@ +uniform sampler2D u_image; +uniform sampler2D u_color_ramp; +uniform float u_opacity; +varying vec2 v_pos; + +void main() { + float t = texture2D(u_image, v_pos).r; + vec4 color = texture2D(u_color_ramp, vec2(t, 0.5)); + gl_FragColor = color * u_opacity; + +#ifdef OVERDRAW_INSPECTOR + gl_FragColor = vec4(0.0); +#endif +} diff --git a/shaders/heatmap_texture.vertex.glsl b/shaders/heatmap_texture.vertex.glsl new file mode 100644 index 00000000000..0e57d0faaf7 --- /dev/null +++ b/shaders/heatmap_texture.vertex.glsl @@ -0,0 +1,11 @@ +uniform mat4 u_matrix; +uniform vec2 u_world; +attribute vec2 a_pos; +varying vec2 v_pos; + +void main() { + gl_Position = u_matrix * vec4(a_pos * u_world, 0, 1); + + v_pos.x = a_pos.x; + v_pos.y = 1.0 - a_pos.y; +} diff --git a/shaders/hillshade.fragment.glsl b/shaders/hillshade.fragment.glsl new file mode 100644 index 00000000000..7d761796e88 --- /dev/null +++ b/shaders/hillshade.fragment.glsl @@ -0,0 +1,52 @@ +uniform sampler2D u_image; +varying vec2 v_pos; + +uniform vec2 u_latrange; +uniform vec2 u_light; +uniform vec4 u_shadow; +uniform vec4 u_highlight; +uniform vec4 u_accent; + +#define PI 3.141592653589793 + +void main() { + vec4 pixel = texture2D(u_image, v_pos); + + vec2 deriv = ((pixel.rg * 2.0) - 1.0); + + // We divide the slope by a scale factor based on the cosin of the pixel's approximate latitude + // to account for mercator projection distortion. see #4807 for details + float scaleFactor = cos(radians((u_latrange[0] - u_latrange[1]) * (1.0 - v_pos.y) + u_latrange[1])); + // We also multiply the slope by an arbitrary z-factor of 1.25 + float slope = atan(1.25 * length(deriv) / scaleFactor); + float aspect = deriv.x != 0.0 ? atan(deriv.y, -deriv.x) : PI / 2.0 * (deriv.y > 0.0 ? 1.0 : -1.0); + + float intensity = u_light.x; + // We add PI to make this property match the global light object, which adds PI/2 to the light's azimuthal + // position property to account for 0deg corresponding to north/the top of the viewport in the style spec + // and the original shader was written to accept (-illuminationDirection - 90) as the azimuthal. + float azimuth = u_light.y + PI; + + // We scale the slope exponentially based on intensity, using a calculation similar to + // the exponential interpolation function in the style spec: + // https://github.com/mapbox/mapbox-gl-js/blob/master/src/style-spec/expression/definitions/interpolate.js#L217-L228 + // so that higher intensity values create more opaque hillshading. + float base = 1.875 - intensity * 1.75; + float maxValue = 0.5 * PI; + float scaledSlope = intensity != 0.5 ? ((pow(base, slope) - 1.0) / (pow(base, maxValue) - 1.0)) * maxValue : slope; + + // The accent color is calculated with the cosine of the slope while the shade color is calculated with the sine + // so that the accent color's rate of change eases in while the shade color's eases out. + float accent = cos(scaledSlope); + // We multiply both the accent and shade color by a clamped intensity value + // so that intensities >= 0.5 do not additionally affect the color values + // while intensity values < 0.5 make the overall color more transparent. + vec4 accent_color = (1.0 - accent) * u_accent * clamp(intensity * 2.0, 0.0, 1.0); + float shade = abs(mod((aspect + azimuth) / PI + 0.5, 2.0) - 1.0); + vec4 shade_color = mix(u_shadow, u_highlight, shade) * sin(scaledSlope) * clamp(intensity * 2.0, 0.0, 1.0); + gl_FragColor = accent_color * (1.0 - shade_color.a) + shade_color; + +#ifdef OVERDRAW_INSPECTOR + gl_FragColor = vec4(1.0); +#endif +} diff --git a/shaders/hillshade.vertex.glsl b/shaders/hillshade.vertex.glsl new file mode 100644 index 00000000000..c1737016e1a --- /dev/null +++ b/shaders/hillshade.vertex.glsl @@ -0,0 +1,11 @@ +uniform mat4 u_matrix; + +attribute vec2 a_pos; +attribute vec2 a_texture_pos; + +varying vec2 v_pos; + +void main() { + gl_Position = u_matrix * vec4(a_pos, 0, 1); + v_pos = a_texture_pos / 8192.0; +} diff --git a/shaders/hillshade_prepare.fragment.glsl b/shaders/hillshade_prepare.fragment.glsl new file mode 100644 index 00000000000..27de56d6532 --- /dev/null +++ b/shaders/hillshade_prepare.fragment.glsl @@ -0,0 +1,74 @@ +#ifdef GL_ES +precision highp float; +#endif + +uniform sampler2D u_image; +varying vec2 v_pos; +uniform vec2 u_dimension; +uniform float u_zoom; +uniform float u_maxzoom; +uniform vec4 u_unpack; + +float getElevation(vec2 coord, float bias) { + // Convert encoded elevation value to meters + vec4 data = texture2D(u_image, coord) * 255.0; + data.a = -1.0; + return dot(data, u_unpack) / 4.0; +} + +void main() { + vec2 epsilon = 1.0 / u_dimension; + + // queried pixels: + // +-----------+ + // | | | | + // | a | b | c | + // | | | | + // +-----------+ + // | | | | + // | d | e | f | + // | | | | + // +-----------+ + // | | | | + // | g | h | i | + // | | | | + // +-----------+ + + float a = getElevation(v_pos + vec2(-epsilon.x, -epsilon.y), 0.0); + float b = getElevation(v_pos + vec2(0, -epsilon.y), 0.0); + float c = getElevation(v_pos + vec2(epsilon.x, -epsilon.y), 0.0); + float d = getElevation(v_pos + vec2(-epsilon.x, 0), 0.0); + float e = getElevation(v_pos, 0.0); + float f = getElevation(v_pos + vec2(epsilon.x, 0), 0.0); + float g = getElevation(v_pos + vec2(-epsilon.x, epsilon.y), 0.0); + float h = getElevation(v_pos + vec2(0, epsilon.y), 0.0); + float i = getElevation(v_pos + vec2(epsilon.x, epsilon.y), 0.0); + + // here we divide the x and y slopes by 8 * pixel size + // where pixel size (aka meters/pixel) is: + // circumference of the world / (pixels per tile * number of tiles) + // which is equivalent to: 8 * 40075016.6855785 / (512 * pow(2, u_zoom)) + // which can be reduced to: pow(2, 19.25619978527 - u_zoom) + // we want to vertically exaggerate the hillshading though, because otherwise + // it is barely noticeable at low zooms. to do this, we multiply this by some + // scale factor pow(2, (u_zoom - u_maxzoom) * a) where a is an arbitrary value + // Here we use a=0.3 which works out to the expression below. see + // nickidlugash's awesome breakdown for more info + // https://github.com/mapbox/mapbox-gl-js/pull/5286#discussion_r148419556 + float exaggeration = u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3; + + vec2 deriv = vec2( + (c + f + f + i) - (a + d + d + g), + (g + h + h + i) - (a + b + b + c) + ) / pow(2.0, (u_zoom - u_maxzoom) * exaggeration + 19.2562 - u_zoom); + + gl_FragColor = clamp(vec4( + deriv.x / 2.0 + 0.5, + deriv.y / 2.0 + 0.5, + 1.0, + 1.0), 0.0, 1.0); + +#ifdef OVERDRAW_INSPECTOR + gl_FragColor = vec4(1.0); +#endif +} diff --git a/shaders/hillshade_prepare.vertex.glsl b/shaders/hillshade_prepare.vertex.glsl new file mode 100644 index 00000000000..582397d6df0 --- /dev/null +++ b/shaders/hillshade_prepare.vertex.glsl @@ -0,0 +1,15 @@ +uniform mat4 u_matrix; +uniform vec2 u_dimension; + +attribute vec2 a_pos; +attribute vec2 a_texture_pos; + +varying vec2 v_pos; + +void main() { + gl_Position = u_matrix * vec4(a_pos, 0, 1); + + highp vec2 epsilon = 1.0 / u_dimension; + float scale = (u_dimension.x - 2.0) / u_dimension.x; + v_pos = (a_texture_pos / 8192.0) * scale + epsilon; +} diff --git a/shaders/index.js b/shaders/index.js new file mode 100644 index 00000000000..3af8f6ae10f --- /dev/null +++ b/shaders/index.js @@ -0,0 +1,20 @@ +// This file is intended for use in the GL-JS test suite +// It provides the shaders entry point for Node (tests and GL Native) +// In a browser environment, this file is replaced with ./src/shaders/shaders.js +// when Rollup builds the main bundle. +// See https://github.com/mapbox/mapbox-gl-js/blob/master/package.json#L104-L108 + +/* eslint-disable import/unambiguous, import/no-commonjs, flowtype/require-valid-file-annotation, no-global-assign */ + +const fs = require('fs'); + +// enable ES Modules in Node +require = require("esm")(module); + +// enable requiring GLSL in Node +require.extensions['.glsl'] = function (module, filename) { + const content = fs.readFileSync(filename, 'utf8'); + module._compile(`module.exports = \`${content}\``, filename); +}; + +module.exports = require("./shaders.js"); diff --git a/shaders/line.fragment.glsl b/shaders/line.fragment.glsl new file mode 100644 index 00000000000..aa407f54f9a --- /dev/null +++ b/shaders/line.fragment.glsl @@ -0,0 +1,30 @@ +uniform lowp float u_device_pixel_ratio; + +varying vec2 v_width2; +varying vec2 v_normal; +varying float v_gamma_scale; + +#pragma mapbox: define highp vec4 color +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity + +void main() { + #pragma mapbox: initialize highp vec4 color + #pragma mapbox: initialize lowp float blur + #pragma mapbox: initialize lowp float opacity + + // Calculate the distance of the pixel from the line in pixels. + float dist = length(v_normal) * v_width2.s; + + // Calculate the antialiasing fade factor. This is either when fading in + // the line in case of an offset line (v_width2.t) or when fading out + // (v_width2.s) + float blur2 = (blur + 1.0 / u_device_pixel_ratio) * v_gamma_scale; + float alpha = clamp(min(dist - (v_width2.t - blur2), v_width2.s - dist) / blur2, 0.0, 1.0); + + gl_FragColor = color * (alpha * opacity); + +#ifdef OVERDRAW_INSPECTOR + gl_FragColor = vec4(1.0); +#endif +} diff --git a/shaders/line.vertex.glsl b/shaders/line.vertex.glsl new file mode 100644 index 00000000000..9334e2b72e1 --- /dev/null +++ b/shaders/line.vertex.glsl @@ -0,0 +1,85 @@ +// floor(127 / 2) == 63.0 +// the maximum allowed miter limit is 2.0 at the moment. the extrude normal is +// stored in a byte (-128..127). we scale regular normals up to length 63, but +// there are also "special" normals that have a bigger length (of up to 126 in +// this case). +// #define scale 63.0 +#define scale 0.015873016 + +attribute vec2 a_pos_normal; +attribute vec4 a_data; + +uniform mat4 u_matrix; +uniform mediump float u_ratio; +uniform vec2 u_units_to_pixels; +uniform lowp float u_device_pixel_ratio; + +varying vec2 v_normal; +varying vec2 v_width2; +varying float v_gamma_scale; +varying highp float v_linesofar; + +#pragma mapbox: define highp vec4 color +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +#pragma mapbox: define mediump float gapwidth +#pragma mapbox: define lowp float offset +#pragma mapbox: define mediump float width + +void main() { + #pragma mapbox: initialize highp vec4 color + #pragma mapbox: initialize lowp float blur + #pragma mapbox: initialize lowp float opacity + #pragma mapbox: initialize mediump float gapwidth + #pragma mapbox: initialize lowp float offset + #pragma mapbox: initialize mediump float width + + // the distance over which the line edge fades out. + // Retina devices need a smaller distance to avoid aliasing. + float ANTIALIASING = 1.0 / u_device_pixel_ratio / 2.0; + + vec2 a_extrude = a_data.xy - 128.0; + float a_direction = mod(a_data.z, 4.0) - 1.0; + + v_linesofar = (floor(a_data.z / 4.0) + a_data.w * 64.0) * 2.0; + + vec2 pos = floor(a_pos_normal * 0.5); + + // x is 1 if it's a round cap, 0 otherwise + // y is 1 if the normal points up, and -1 if it points down + // We store these in the least significant bit of a_pos_normal + mediump vec2 normal = a_pos_normal - 2.0 * pos; + normal.y = normal.y * 2.0 - 1.0; + v_normal = normal; + + // these transformations used to be applied in the JS and native code bases. + // moved them into the shader for clarity and simplicity. + gapwidth = gapwidth / 2.0; + float halfwidth = width / 2.0; + offset = -1.0 * offset; + + float inset = gapwidth + (gapwidth > 0.0 ? ANTIALIASING : 0.0); + float outset = gapwidth + halfwidth * (gapwidth > 0.0 ? 2.0 : 1.0) + (halfwidth == 0.0 ? 0.0 : ANTIALIASING); + + // Scale the extrusion vector down to a normal and then up by the line width + // of this vertex. + mediump vec2 dist = outset * a_extrude * scale; + + // Calculate the offset when drawing a line that is to the side of the actual line. + // We do this by creating a vector that points towards the extrude, but rotate + // it when we're drawing round end points (a_direction = -1 or 1) since their + // extrude vector points in another direction. + mediump float u = 0.5 * a_direction; + mediump float t = 1.0 - abs(u); + mediump vec2 offset2 = offset * a_extrude * scale * normal.y * mat2(t, -u, u, t); + + vec4 projected_extrude = u_matrix * vec4(dist / u_ratio, 0.0, 0.0); + gl_Position = u_matrix * vec4(pos + offset2 / u_ratio, 0.0, 1.0) + projected_extrude; + + // calculate how much the perspective view squishes or stretches the extrude + float extrude_length_without_perspective = length(dist); + float extrude_length_with_perspective = length(projected_extrude.xy / gl_Position.w * u_units_to_pixels); + v_gamma_scale = extrude_length_without_perspective / extrude_length_with_perspective; + + v_width2 = vec2(outset, inset); +} diff --git a/shaders/line_gradient.fragment.glsl b/shaders/line_gradient.fragment.glsl new file mode 100644 index 00000000000..ea168c4966e --- /dev/null +++ b/shaders/line_gradient.fragment.glsl @@ -0,0 +1,34 @@ +uniform lowp float u_device_pixel_ratio; +uniform sampler2D u_image; + +varying vec2 v_width2; +varying vec2 v_normal; +varying float v_gamma_scale; +varying highp float v_lineprogress; + +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity + +void main() { + #pragma mapbox: initialize lowp float blur + #pragma mapbox: initialize lowp float opacity + + // Calculate the distance of the pixel from the line in pixels. + float dist = length(v_normal) * v_width2.s; + + // Calculate the antialiasing fade factor. This is either when fading in + // the line in case of an offset line (v_width2.t) or when fading out + // (v_width2.s) + float blur2 = (blur + 1.0 / u_device_pixel_ratio) * v_gamma_scale; + float alpha = clamp(min(dist - (v_width2.t - blur2), v_width2.s - dist) / blur2, 0.0, 1.0); + + // For gradient lines, v_lineprogress is the ratio along the entire line, + // scaled to [0, 2^15), and the gradient ramp is stored in a texture. + vec4 color = texture2D(u_image, vec2(v_lineprogress, 0.5)); + + gl_FragColor = color * (alpha * opacity); + +#ifdef OVERDRAW_INSPECTOR + gl_FragColor = vec4(1.0); +#endif +} diff --git a/shaders/line_gradient.vertex.glsl b/shaders/line_gradient.vertex.glsl new file mode 100644 index 00000000000..98281e2843c --- /dev/null +++ b/shaders/line_gradient.vertex.glsl @@ -0,0 +1,87 @@ + +// the attribute conveying progress along a line is scaled to [0, 2^15) +#define MAX_LINE_DISTANCE 32767.0 + +// floor(127 / 2) == 63.0 +// the maximum allowed miter limit is 2.0 at the moment. the extrude normal is +// stored in a byte (-128..127). we scale regular normals up to length 63, but +// there are also "special" normals that have a bigger length (of up to 126 in +// this case). +// #define scale 63.0 +#define scale 0.015873016 + +attribute vec2 a_pos_normal; +attribute vec4 a_data; + +uniform mat4 u_matrix; +uniform mediump float u_ratio; +uniform lowp float u_device_pixel_ratio; +uniform vec2 u_units_to_pixels; + +varying vec2 v_normal; +varying vec2 v_width2; +varying float v_gamma_scale; +varying highp float v_lineprogress; + +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +#pragma mapbox: define mediump float gapwidth +#pragma mapbox: define lowp float offset +#pragma mapbox: define mediump float width + +void main() { + #pragma mapbox: initialize lowp float blur + #pragma mapbox: initialize lowp float opacity + #pragma mapbox: initialize mediump float gapwidth + #pragma mapbox: initialize lowp float offset + #pragma mapbox: initialize mediump float width + + // the distance over which the line edge fades out. + // Retina devices need a smaller distance to avoid aliasing. + float ANTIALIASING = 1.0 / u_device_pixel_ratio / 2.0; + + vec2 a_extrude = a_data.xy - 128.0; + float a_direction = mod(a_data.z, 4.0) - 1.0; + + v_lineprogress = (floor(a_data.z / 4.0) + a_data.w * 64.0) * 2.0 / MAX_LINE_DISTANCE; + + vec2 pos = floor(a_pos_normal * 0.5); + + // x is 1 if it's a round cap, 0 otherwise + // y is 1 if the normal points up, and -1 if it points down + // We store these in the least significant bit of a_pos_normal + mediump vec2 normal = a_pos_normal - 2.0 * pos; + normal.y = normal.y * 2.0 - 1.0; + v_normal = normal; + + // these transformations used to be applied in the JS and native code bases. + // moved them into the shader for clarity and simplicity. + gapwidth = gapwidth / 2.0; + float halfwidth = width / 2.0; + offset = -1.0 * offset; + + float inset = gapwidth + (gapwidth > 0.0 ? ANTIALIASING : 0.0); + float outset = gapwidth + halfwidth * (gapwidth > 0.0 ? 2.0 : 1.0) + (halfwidth == 0.0 ? 0.0 : ANTIALIASING); + + // Scale the extrusion vector down to a normal and then up by the line width + // of this vertex. + mediump vec2 dist = outset * a_extrude * scale; + + // Calculate the offset when drawing a line that is to the side of the actual line. + // We do this by creating a vector that points towards the extrude, but rotate + // it when we're drawing round end points (a_direction = -1 or 1) since their + // extrude vector points in another direction. + mediump float u = 0.5 * a_direction; + mediump float t = 1.0 - abs(u); + mediump vec2 offset2 = offset * a_extrude * scale * normal.y * mat2(t, -u, u, t); + + vec4 projected_extrude = u_matrix * vec4(dist / u_ratio, 0.0, 0.0); + gl_Position = u_matrix * vec4(pos + offset2 / u_ratio, 0.0, 1.0) + projected_extrude; + + // calculate how much the perspective view squishes or stretches the extrude + float extrude_length_without_perspective = length(dist); + float extrude_length_with_perspective = length(projected_extrude.xy / gl_Position.w * u_units_to_pixels); + v_gamma_scale = extrude_length_without_perspective / extrude_length_with_perspective; + + v_width2 = vec2(outset, inset); +} diff --git a/shaders/line_pattern.fragment.glsl b/shaders/line_pattern.fragment.glsl new file mode 100644 index 00000000000..e18de38320e --- /dev/null +++ b/shaders/line_pattern.fragment.glsl @@ -0,0 +1,70 @@ +uniform lowp float u_device_pixel_ratio; +uniform vec2 u_texsize; +uniform float u_fade; +uniform mediump vec4 u_scale; + +uniform sampler2D u_image; + +varying vec2 v_normal; +varying vec2 v_width2; +varying float v_linesofar; +varying float v_gamma_scale; + +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity + +void main() { + #pragma mapbox: initialize mediump vec4 pattern_from + #pragma mapbox: initialize mediump vec4 pattern_to + + #pragma mapbox: initialize lowp float blur + #pragma mapbox: initialize lowp float opacity + + vec2 pattern_tl_a = pattern_from.xy; + vec2 pattern_br_a = pattern_from.zw; + vec2 pattern_tl_b = pattern_to.xy; + vec2 pattern_br_b = pattern_to.zw; + + float pixelRatio = u_scale.x; + float tileZoomRatio = u_scale.y; + float fromScale = u_scale.z; + float toScale = u_scale.w; + + vec2 display_size_a = vec2((pattern_br_a.x - pattern_tl_a.x) / pixelRatio, (pattern_br_a.y - pattern_tl_a.y) / pixelRatio); + vec2 display_size_b = vec2((pattern_br_b.x - pattern_tl_b.x) / pixelRatio, (pattern_br_b.y - pattern_tl_b.y) / pixelRatio); + + vec2 pattern_size_a = vec2(display_size_a.x * fromScale / tileZoomRatio, display_size_a.y); + vec2 pattern_size_b = vec2(display_size_b.x * toScale / tileZoomRatio, display_size_b.y); + + // Calculate the distance of the pixel from the line in pixels. + float dist = length(v_normal) * v_width2.s; + + // Calculate the antialiasing fade factor. This is either when fading in + // the line in case of an offset line (v_width2.t) or when fading out + // (v_width2.s) + float blur2 = (blur + 1.0 / u_device_pixel_ratio) * v_gamma_scale; + float alpha = clamp(min(dist - (v_width2.t - blur2), v_width2.s - dist) / blur2, 0.0, 1.0); + + float x_a = mod(v_linesofar / pattern_size_a.x, 1.0); + float x_b = mod(v_linesofar / pattern_size_b.x, 1.0); + + // v_normal.y is 0 at the midpoint of the line, -1 at the lower edge, 1 at the upper edge + // we clamp the line width outset to be between 0 and half the pattern height plus padding (2.0) + // to ensure we don't sample outside the designated symbol on the sprite sheet. + // 0.5 is added to shift the component to be bounded between 0 and 1 for interpolation of + // the texture coordinate + float y_a = 0.5 + (v_normal.y * clamp(v_width2.s, 0.0, (pattern_size_a.y + 2.0) / 2.0) / pattern_size_a.y); + float y_b = 0.5 + (v_normal.y * clamp(v_width2.s, 0.0, (pattern_size_b.y + 2.0) / 2.0) / pattern_size_b.y); + vec2 pos_a = mix(pattern_tl_a / u_texsize, pattern_br_a / u_texsize, vec2(x_a, y_a)); + vec2 pos_b = mix(pattern_tl_b / u_texsize, pattern_br_b / u_texsize, vec2(x_b, y_b)); + + vec4 color = mix(texture2D(u_image, pos_a), texture2D(u_image, pos_b), u_fade); + + gl_FragColor = color * alpha * opacity; + +#ifdef OVERDRAW_INSPECTOR + gl_FragColor = vec4(1.0); +#endif +} diff --git a/shaders/line_pattern.vertex.glsl b/shaders/line_pattern.vertex.glsl new file mode 100644 index 00000000000..6b4eb54c87a --- /dev/null +++ b/shaders/line_pattern.vertex.glsl @@ -0,0 +1,91 @@ +// floor(127 / 2) == 63.0 +// the maximum allowed miter limit is 2.0 at the moment. the extrude normal is +// stored in a byte (-128..127). we scale regular normals up to length 63, but +// there are also "special" normals that have a bigger length (of up to 126 in +// this case). +// #define scale 63.0 +#define scale 0.015873016 + +// We scale the distance before adding it to the buffers so that we can store +// long distances for long segments. Use this value to unscale the distance. +#define LINE_DISTANCE_SCALE 2.0 + +attribute vec2 a_pos_normal; +attribute vec4 a_data; + +uniform mat4 u_matrix; +uniform vec2 u_units_to_pixels; +uniform mediump float u_ratio; +uniform lowp float u_device_pixel_ratio; + +varying vec2 v_normal; +varying vec2 v_width2; +varying float v_linesofar; +varying float v_gamma_scale; + +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp float offset +#pragma mapbox: define mediump float gapwidth +#pragma mapbox: define mediump float width +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to + +void main() { + #pragma mapbox: initialize lowp float blur + #pragma mapbox: initialize lowp float opacity + #pragma mapbox: initialize lowp float offset + #pragma mapbox: initialize mediump float gapwidth + #pragma mapbox: initialize mediump float width + #pragma mapbox: initialize mediump vec4 pattern_from + #pragma mapbox: initialize mediump vec4 pattern_to + + // the distance over which the line edge fades out. + // Retina devices need a smaller distance to avoid aliasing. + float ANTIALIASING = 1.0 / u_device_pixel_ratio / 2.0; + + vec2 a_extrude = a_data.xy - 128.0; + float a_direction = mod(a_data.z, 4.0) - 1.0; + float a_linesofar = (floor(a_data.z / 4.0) + a_data.w * 64.0) * LINE_DISTANCE_SCALE; + // float tileRatio = u_scale.y; + vec2 pos = floor(a_pos_normal * 0.5); + + // x is 1 if it's a round cap, 0 otherwise + // y is 1 if the normal points up, and -1 if it points down + // We store these in the least significant bit of a_pos_normal + mediump vec2 normal = a_pos_normal - 2.0 * pos; + normal.y = normal.y * 2.0 - 1.0; + v_normal = normal; + + // these transformations used to be applied in the JS and native code bases. + // moved them into the shader for clarity and simplicity. + gapwidth = gapwidth / 2.0; + float halfwidth = width / 2.0; + offset = -1.0 * offset; + + float inset = gapwidth + (gapwidth > 0.0 ? ANTIALIASING : 0.0); + float outset = gapwidth + halfwidth * (gapwidth > 0.0 ? 2.0 : 1.0) + (halfwidth == 0.0 ? 0.0 : ANTIALIASING); + + // Scale the extrusion vector down to a normal and then up by the line width + // of this vertex. + mediump vec2 dist = outset * a_extrude * scale; + + // Calculate the offset when drawing a line that is to the side of the actual line. + // We do this by creating a vector that points towards the extrude, but rotate + // it when we're drawing round end points (a_direction = -1 or 1) since their + // extrude vector points in another direction. + mediump float u = 0.5 * a_direction; + mediump float t = 1.0 - abs(u); + mediump vec2 offset2 = offset * a_extrude * scale * normal.y * mat2(t, -u, u, t); + + vec4 projected_extrude = u_matrix * vec4(dist / u_ratio, 0.0, 0.0); + gl_Position = u_matrix * vec4(pos + offset2 / u_ratio, 0.0, 1.0) + projected_extrude; + + // calculate how much the perspective view squishes or stretches the extrude + float extrude_length_without_perspective = length(dist); + float extrude_length_with_perspective = length(projected_extrude.xy / gl_Position.w * u_units_to_pixels); + v_gamma_scale = extrude_length_without_perspective / extrude_length_with_perspective; + + v_linesofar = a_linesofar; + v_width2 = vec2(outset, inset); +} diff --git a/shaders/line_sdf.fragment.glsl b/shaders/line_sdf.fragment.glsl new file mode 100644 index 00000000000..70a74996b34 --- /dev/null +++ b/shaders/line_sdf.fragment.glsl @@ -0,0 +1,45 @@ + +uniform lowp float u_device_pixel_ratio; +uniform sampler2D u_image; +uniform float u_sdfgamma; +uniform float u_mix; + +varying vec2 v_normal; +varying vec2 v_width2; +varying vec2 v_tex_a; +varying vec2 v_tex_b; +varying float v_gamma_scale; + +#pragma mapbox: define highp vec4 color +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +#pragma mapbox: define mediump float width +#pragma mapbox: define lowp float floorwidth + +void main() { + #pragma mapbox: initialize highp vec4 color + #pragma mapbox: initialize lowp float blur + #pragma mapbox: initialize lowp float opacity + #pragma mapbox: initialize mediump float width + #pragma mapbox: initialize lowp float floorwidth + + // Calculate the distance of the pixel from the line in pixels. + float dist = length(v_normal) * v_width2.s; + + // Calculate the antialiasing fade factor. This is either when fading in + // the line in case of an offset line (v_width2.t) or when fading out + // (v_width2.s) + float blur2 = (blur + 1.0 / u_device_pixel_ratio) * v_gamma_scale; + float alpha = clamp(min(dist - (v_width2.t - blur2), v_width2.s - dist) / blur2, 0.0, 1.0); + + float sdfdist_a = texture2D(u_image, v_tex_a).a; + float sdfdist_b = texture2D(u_image, v_tex_b).a; + float sdfdist = mix(sdfdist_a, sdfdist_b, u_mix); + alpha *= smoothstep(0.5 - u_sdfgamma / floorwidth, 0.5 + u_sdfgamma / floorwidth, sdfdist); + + gl_FragColor = color * (alpha * opacity); + +#ifdef OVERDRAW_INSPECTOR + gl_FragColor = vec4(1.0); +#endif +} diff --git a/shaders/line_sdf.vertex.glsl b/shaders/line_sdf.vertex.glsl new file mode 100644 index 00000000000..c85140ef7c4 --- /dev/null +++ b/shaders/line_sdf.vertex.glsl @@ -0,0 +1,98 @@ +// floor(127 / 2) == 63.0 +// the maximum allowed miter limit is 2.0 at the moment. the extrude normal is +// stored in a byte (-128..127). we scale regular normals up to length 63, but +// there are also "special" normals that have a bigger length (of up to 126 in +// this case). +// #define scale 63.0 +#define scale 0.015873016 + +// We scale the distance before adding it to the buffers so that we can store +// long distances for long segments. Use this value to unscale the distance. +#define LINE_DISTANCE_SCALE 2.0 + +attribute vec2 a_pos_normal; +attribute vec4 a_data; + +uniform mat4 u_matrix; +uniform mediump float u_ratio; +uniform lowp float u_device_pixel_ratio; +uniform vec2 u_patternscale_a; +uniform float u_tex_y_a; +uniform vec2 u_patternscale_b; +uniform float u_tex_y_b; +uniform vec2 u_units_to_pixels; + +varying vec2 v_normal; +varying vec2 v_width2; +varying vec2 v_tex_a; +varying vec2 v_tex_b; +varying float v_gamma_scale; + +#pragma mapbox: define highp vec4 color +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +#pragma mapbox: define mediump float gapwidth +#pragma mapbox: define lowp float offset +#pragma mapbox: define mediump float width +#pragma mapbox: define lowp float floorwidth + +void main() { + #pragma mapbox: initialize highp vec4 color + #pragma mapbox: initialize lowp float blur + #pragma mapbox: initialize lowp float opacity + #pragma mapbox: initialize mediump float gapwidth + #pragma mapbox: initialize lowp float offset + #pragma mapbox: initialize mediump float width + #pragma mapbox: initialize lowp float floorwidth + + // the distance over which the line edge fades out. + // Retina devices need a smaller distance to avoid aliasing. + float ANTIALIASING = 1.0 / u_device_pixel_ratio / 2.0; + + vec2 a_extrude = a_data.xy - 128.0; + float a_direction = mod(a_data.z, 4.0) - 1.0; + float a_linesofar = (floor(a_data.z / 4.0) + a_data.w * 64.0) * LINE_DISTANCE_SCALE; + + vec2 pos = floor(a_pos_normal * 0.5); + + // x is 1 if it's a round cap, 0 otherwise + // y is 1 if the normal points up, and -1 if it points down + // We store these in the least significant bit of a_pos_normal + mediump vec2 normal = a_pos_normal - 2.0 * pos; + normal.y = normal.y * 2.0 - 1.0; + v_normal = normal; + + // these transformations used to be applied in the JS and native code bases. + // moved them into the shader for clarity and simplicity. + gapwidth = gapwidth / 2.0; + float halfwidth = width / 2.0; + offset = -1.0 * offset; + + float inset = gapwidth + (gapwidth > 0.0 ? ANTIALIASING : 0.0); + float outset = gapwidth + halfwidth * (gapwidth > 0.0 ? 2.0 : 1.0) + (halfwidth == 0.0 ? 0.0 : ANTIALIASING); + + // Scale the extrusion vector down to a normal and then up by the line width + // of this vertex. + mediump vec2 dist =outset * a_extrude * scale; + + // Calculate the offset when drawing a line that is to the side of the actual line. + // We do this by creating a vector that points towards the extrude, but rotate + // it when we're drawing round end points (a_direction = -1 or 1) since their + // extrude vector points in another direction. + mediump float u = 0.5 * a_direction; + mediump float t = 1.0 - abs(u); + mediump vec2 offset2 = offset * a_extrude * scale * normal.y * mat2(t, -u, u, t); + + vec4 projected_extrude = u_matrix * vec4(dist / u_ratio, 0.0, 0.0); + gl_Position = u_matrix * vec4(pos + offset2 / u_ratio, 0.0, 1.0) + projected_extrude; + + // calculate how much the perspective view squishes or stretches the extrude + float extrude_length_without_perspective = length(dist); + float extrude_length_with_perspective = length(projected_extrude.xy / gl_Position.w * u_units_to_pixels); + v_gamma_scale = extrude_length_without_perspective / extrude_length_with_perspective; + + v_tex_a = vec2(a_linesofar * u_patternscale_a.x / floorwidth, normal.y * u_patternscale_a.y + u_tex_y_a); + v_tex_b = vec2(a_linesofar * u_patternscale_b.x / floorwidth, normal.y * u_patternscale_b.y + u_tex_y_b); + + v_width2 = vec2(outset, inset); +} diff --git a/shaders/raster.fragment.glsl b/shaders/raster.fragment.glsl new file mode 100644 index 00000000000..11e6d473c32 --- /dev/null +++ b/shaders/raster.fragment.glsl @@ -0,0 +1,52 @@ +uniform float u_fade_t; +uniform float u_opacity; +uniform sampler2D u_image0; +uniform sampler2D u_image1; +varying vec2 v_pos0; +varying vec2 v_pos1; + +uniform float u_brightness_low; +uniform float u_brightness_high; + +uniform float u_saturation_factor; +uniform float u_contrast_factor; +uniform vec3 u_spin_weights; + +void main() { + + // read and cross-fade colors from the main and parent tiles + vec4 color0 = texture2D(u_image0, v_pos0); + vec4 color1 = texture2D(u_image1, v_pos1); + if (color0.a > 0.0) { + color0.rgb = color0.rgb / color0.a; + } + if (color1.a > 0.0) { + color1.rgb = color1.rgb / color1.a; + } + vec4 color = mix(color0, color1, u_fade_t); + color.a *= u_opacity; + vec3 rgb = color.rgb; + + // spin + rgb = vec3( + dot(rgb, u_spin_weights.xyz), + dot(rgb, u_spin_weights.zxy), + dot(rgb, u_spin_weights.yzx)); + + // saturation + float average = (color.r + color.g + color.b) / 3.0; + rgb += (average - rgb) * u_saturation_factor; + + // contrast + rgb = (rgb - 0.5) * u_contrast_factor + 0.5; + + // brightness + vec3 u_high_vec = vec3(u_brightness_low, u_brightness_low, u_brightness_low); + vec3 u_low_vec = vec3(u_brightness_high, u_brightness_high, u_brightness_high); + + gl_FragColor = vec4(mix(u_high_vec, u_low_vec, rgb) * color.a, color.a); + +#ifdef OVERDRAW_INSPECTOR + gl_FragColor = vec4(1.0); +#endif +} diff --git a/shaders/raster.vertex.glsl b/shaders/raster.vertex.glsl new file mode 100644 index 00000000000..07f44971bed --- /dev/null +++ b/shaders/raster.vertex.glsl @@ -0,0 +1,21 @@ +uniform mat4 u_matrix; +uniform vec2 u_tl_parent; +uniform float u_scale_parent; +uniform float u_buffer_scale; + +attribute vec2 a_pos; +attribute vec2 a_texture_pos; + +varying vec2 v_pos0; +varying vec2 v_pos1; + +void main() { + gl_Position = u_matrix * vec4(a_pos, 0, 1); + // We are using Int16 for texture position coordinates to give us enough precision for + // fractional coordinates. We use 8192 to scale the texture coordinates in the buffer + // as an arbitrarily high number to preserve adequate precision when rendering. + // This is also the same value as the EXTENT we are using for our tile buffer pos coordinates, + // so math for modifying either is consistent. + v_pos0 = (((a_texture_pos / 8192.0) - 0.5) / u_buffer_scale ) + 0.5; + v_pos1 = (v_pos0 * u_scale_parent) + u_tl_parent; +} diff --git a/shaders/shaders.js b/shaders/shaders.js new file mode 100644 index 00000000000..221728dfddd --- /dev/null +++ b/shaders/shaders.js @@ -0,0 +1,180 @@ + +// Disable Flow annotations here because Flow doesn't support importing GLSL files +/* eslint-disable flowtype/require-valid-file-annotation */ + +import preludeFrag from './_prelude.fragment.glsl'; +import preludeVert from './_prelude.vertex.glsl'; +import backgroundFrag from './background.fragment.glsl'; +import backgroundVert from './background.vertex.glsl'; +import backgroundPatternFrag from './background_pattern.fragment.glsl'; +import backgroundPatternVert from './background_pattern.vertex.glsl'; +import circleFrag from './circle.fragment.glsl'; +import circleVert from './circle.vertex.glsl'; +import clippingMaskFrag from './clipping_mask.fragment.glsl'; +import clippingMaskVert from './clipping_mask.vertex.glsl'; +import heatmapFrag from './heatmap.fragment.glsl'; +import heatmapVert from './heatmap.vertex.glsl'; +import heatmapTextureFrag from './heatmap_texture.fragment.glsl'; +import heatmapTextureVert from './heatmap_texture.vertex.glsl'; +import collisionBoxFrag from './collision_box.fragment.glsl'; +import collisionBoxVert from './collision_box.vertex.glsl'; +import collisionCircleFrag from './collision_circle.fragment.glsl'; +import collisionCircleVert from './collision_circle.vertex.glsl'; +import debugFrag from './debug.fragment.glsl'; +import debugVert from './debug.vertex.glsl'; +import fillFrag from './fill.fragment.glsl'; +import fillVert from './fill.vertex.glsl'; +import fillOutlineFrag from './fill_outline.fragment.glsl'; +import fillOutlineVert from './fill_outline.vertex.glsl'; +import fillOutlinePatternFrag from './fill_outline_pattern.fragment.glsl'; +import fillOutlinePatternVert from './fill_outline_pattern.vertex.glsl'; +import fillPatternFrag from './fill_pattern.fragment.glsl'; +import fillPatternVert from './fill_pattern.vertex.glsl'; +import fillExtrusionFrag from './fill_extrusion.fragment.glsl'; +import fillExtrusionVert from './fill_extrusion.vertex.glsl'; +import fillExtrusionPatternFrag from './fill_extrusion_pattern.fragment.glsl'; +import fillExtrusionPatternVert from './fill_extrusion_pattern.vertex.glsl'; +import hillshadePrepareFrag from './hillshade_prepare.fragment.glsl'; +import hillshadePrepareVert from './hillshade_prepare.vertex.glsl'; +import hillshadeFrag from './hillshade.fragment.glsl'; +import hillshadeVert from './hillshade.vertex.glsl'; +import lineFrag from './line.fragment.glsl'; +import lineVert from './line.vertex.glsl'; +import lineGradientFrag from './line_gradient.fragment.glsl'; +import lineGradientVert from './line_gradient.vertex.glsl'; +import linePatternFrag from './line_pattern.fragment.glsl'; +import linePatternVert from './line_pattern.vertex.glsl'; +import lineSDFFrag from './line_sdf.fragment.glsl'; +import lineSDFVert from './line_sdf.vertex.glsl'; +import rasterFrag from './raster.fragment.glsl'; +import rasterVert from './raster.vertex.glsl'; +import symbolIconFrag from './symbol_icon.fragment.glsl'; +import symbolIconVert from './symbol_icon.vertex.glsl'; +import symbolSDFFrag from './symbol_sdf.fragment.glsl'; +import symbolSDFVert from './symbol_sdf.vertex.glsl'; +import symbolTextAndIconFrag from './symbol_text_and_icon.fragment.glsl'; +import symbolTextAndIconVert from './symbol_text_and_icon.vertex.glsl'; + +export const prelude = compile(preludeFrag, preludeVert); +export const background = compile(backgroundFrag, backgroundVert); +export const backgroundPattern = compile(backgroundPatternFrag, backgroundPatternVert); +export const circle = compile(circleFrag, circleVert); +export const clippingMask = compile(clippingMaskFrag, clippingMaskVert); +export const heatmap = compile(heatmapFrag, heatmapVert); +export const heatmapTexture = compile(heatmapTextureFrag, heatmapTextureVert); +export const collisionBox = compile(collisionBoxFrag, collisionBoxVert); +export const collisionCircle = compile(collisionCircleFrag, collisionCircleVert); +export const debug = compile(debugFrag, debugVert); +export const fill = compile(fillFrag, fillVert); +export const fillOutline = compile(fillOutlineFrag, fillOutlineVert); +export const fillOutlinePattern = compile(fillOutlinePatternFrag, fillOutlinePatternVert); +export const fillPattern = compile(fillPatternFrag, fillPatternVert); +export const fillExtrusion = compile(fillExtrusionFrag, fillExtrusionVert); +export const fillExtrusionPattern = compile(fillExtrusionPatternFrag, fillExtrusionPatternVert); +export const hillshadePrepare = compile(hillshadePrepareFrag, hillshadePrepareVert); +export const hillshade = compile(hillshadeFrag, hillshadeVert); +export const line = compile(lineFrag, lineVert); +export const lineGradient = compile(lineGradientFrag, lineGradientVert); +export const linePattern = compile(linePatternFrag, linePatternVert); +export const lineSDF = compile(lineSDFFrag, lineSDFVert); +export const raster = compile(rasterFrag, rasterVert); +export const symbolIcon = compile(symbolIconFrag, symbolIconVert); +export const symbolSDF = compile(symbolSDFFrag, symbolSDFVert); +export const symbolTextAndIcon = compile(symbolTextAndIconFrag, symbolTextAndIconVert); + +// Expand #pragmas to #ifdefs. + +function compile(fragmentSource, vertexSource) { + const re = /#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g; + + const fragmentPragmas = {}; + + fragmentSource = fragmentSource.replace(re, (match, operation, precision, type, name) => { + fragmentPragmas[name] = true; + if (operation === 'define') { + return ` +#ifndef HAS_UNIFORM_u_${name} +varying ${precision} ${type} ${name}; +#else +uniform ${precision} ${type} u_${name}; +#endif +`; + } else /* if (operation === 'initialize') */ { + return ` +#ifdef HAS_UNIFORM_u_${name} + ${precision} ${type} ${name} = u_${name}; +#endif +`; + } + }); + + vertexSource = vertexSource.replace(re, (match, operation, precision, type, name) => { + const attrType = type === 'float' ? 'vec2' : 'vec4'; + const unpackType = name.match(/color/) ? 'color' : attrType; + + if (fragmentPragmas[name]) { + if (operation === 'define') { + return ` +#ifndef HAS_UNIFORM_u_${name} +uniform lowp float u_${name}_t; +attribute ${precision} ${attrType} a_${name}; +varying ${precision} ${type} ${name}; +#else +uniform ${precision} ${type} u_${name}; +#endif +`; + } else /* if (operation === 'initialize') */ { + if (unpackType === 'vec4') { + // vec4 attributes are only used for cross-faded properties, and are not packed + return ` +#ifndef HAS_UNIFORM_u_${name} + ${name} = a_${name}; +#else + ${precision} ${type} ${name} = u_${name}; +#endif +`; + } else { + return ` +#ifndef HAS_UNIFORM_u_${name} + ${name} = unpack_mix_${unpackType}(a_${name}, u_${name}_t); +#else + ${precision} ${type} ${name} = u_${name}; +#endif +`; + } + } + } else { + if (operation === 'define') { + return ` +#ifndef HAS_UNIFORM_u_${name} +uniform lowp float u_${name}_t; +attribute ${precision} ${attrType} a_${name}; +#else +uniform ${precision} ${type} u_${name}; +#endif +`; + } else /* if (operation === 'initialize') */ { + if (unpackType === 'vec4') { + // vec4 attributes are only used for cross-faded properties, and are not packed + return ` +#ifndef HAS_UNIFORM_u_${name} + ${precision} ${type} ${name} = a_${name}; +#else + ${precision} ${type} ${name} = u_${name}; +#endif +`; + } else /* */{ + return ` +#ifndef HAS_UNIFORM_u_${name} + ${precision} ${type} ${name} = unpack_mix_${unpackType}(a_${name}, u_${name}_t); +#else + ${precision} ${type} ${name} = u_${name}; +#endif +`; + } + } + } + }); + + return {fragmentSource, vertexSource}; +} diff --git a/shaders/symbol_icon.fragment.glsl b/shaders/symbol_icon.fragment.glsl new file mode 100644 index 00000000000..4f6d75e70fb --- /dev/null +++ b/shaders/symbol_icon.fragment.glsl @@ -0,0 +1,17 @@ +uniform sampler2D u_texture; + +varying vec2 v_tex; +varying float v_fade_opacity; + +#pragma mapbox: define lowp float opacity + +void main() { + #pragma mapbox: initialize lowp float opacity + + lowp float alpha = opacity * v_fade_opacity; + gl_FragColor = texture2D(u_texture, v_tex) * alpha; + +#ifdef OVERDRAW_INSPECTOR + gl_FragColor = vec4(1.0); +#endif +} diff --git a/shaders/symbol_icon.vertex.glsl b/shaders/symbol_icon.vertex.glsl new file mode 100644 index 00000000000..16ab111429c --- /dev/null +++ b/shaders/symbol_icon.vertex.glsl @@ -0,0 +1,94 @@ +const float PI = 3.141592653589793; + +attribute vec4 a_pos_offset; +attribute vec4 a_data; +attribute vec4 a_pixeloffset; +attribute vec3 a_projected_pos; +attribute float a_fade_opacity; + +uniform bool u_is_size_zoom_constant; +uniform bool u_is_size_feature_constant; +uniform highp float u_size_t; // used to interpolate between zoom stops when size is a composite function +uniform highp float u_size; // used when size is both zoom and feature constant +uniform highp float u_camera_to_center_distance; +uniform highp float u_pitch; +uniform bool u_rotate_symbol; +uniform highp float u_aspect_ratio; +uniform float u_fade_change; + +uniform mat4 u_matrix; +uniform mat4 u_label_plane_matrix; +uniform mat4 u_coord_matrix; + +uniform bool u_is_text; +uniform bool u_pitch_with_map; + +uniform vec2 u_texsize; + +varying vec2 v_tex; +varying float v_fade_opacity; + +#pragma mapbox: define lowp float opacity + +void main() { + #pragma mapbox: initialize lowp float opacity + + vec2 a_pos = a_pos_offset.xy; + vec2 a_offset = a_pos_offset.zw; + + vec2 a_tex = a_data.xy; + vec2 a_size = a_data.zw; + + float a_size_min = floor(a_size[0] * 0.5); + vec2 a_pxoffset = a_pixeloffset.xy; + vec2 a_minFontScale = a_pixeloffset.zw / 256.0; + + highp float segment_angle = -a_projected_pos[2]; + float size; + + if (!u_is_size_zoom_constant && !u_is_size_feature_constant) { + size = mix(a_size_min, a_size[1], u_size_t) / 128.0; + } else if (u_is_size_zoom_constant && !u_is_size_feature_constant) { + size = a_size_min / 128.0; + } else { + size = u_size; + } + + vec4 projectedPoint = u_matrix * vec4(a_pos, 0, 1); + highp float camera_to_anchor_distance = projectedPoint.w; + // See comments in symbol_sdf.vertex + highp float distance_ratio = u_pitch_with_map ? + camera_to_anchor_distance / u_camera_to_center_distance : + u_camera_to_center_distance / camera_to_anchor_distance; + highp float perspective_ratio = clamp( + 0.5 + 0.5 * distance_ratio, + 0.0, // Prevents oversized near-field symbols in pitched/overzoomed tiles + 4.0); + + size *= perspective_ratio; + + float fontScale = u_is_text ? size / 24.0 : size; + + highp float symbol_rotation = 0.0; + if (u_rotate_symbol) { + // See comments in symbol_sdf.vertex + vec4 offsetProjectedPoint = u_matrix * vec4(a_pos + vec2(1, 0), 0, 1); + + vec2 a = projectedPoint.xy / projectedPoint.w; + vec2 b = offsetProjectedPoint.xy / offsetProjectedPoint.w; + + symbol_rotation = atan((b.y - a.y) / u_aspect_ratio, b.x - a.x); + } + + highp float angle_sin = sin(segment_angle + symbol_rotation); + highp float angle_cos = cos(segment_angle + symbol_rotation); + mat2 rotation_matrix = mat2(angle_cos, -1.0 * angle_sin, angle_sin, angle_cos); + + vec4 projected_pos = u_label_plane_matrix * vec4(a_projected_pos.xy, 0.0, 1.0); + gl_Position = u_coord_matrix * vec4(projected_pos.xy / projected_pos.w + rotation_matrix * (a_offset / 32.0 * max(a_minFontScale, fontScale) + a_pxoffset / 16.0), 0.0, 1.0); + + v_tex = a_tex / u_texsize; + vec2 fade_opacity = unpack_opacity(a_fade_opacity); + float fade_change = fade_opacity[1] > 0.5 ? u_fade_change : -u_fade_change; + v_fade_opacity = max(0.0, min(1.0, fade_opacity[0] + fade_change)); +} diff --git a/shaders/symbol_sdf.fragment.glsl b/shaders/symbol_sdf.fragment.glsl new file mode 100644 index 00000000000..6b077543069 --- /dev/null +++ b/shaders/symbol_sdf.fragment.glsl @@ -0,0 +1,52 @@ +#define SDF_PX 8.0 + +uniform bool u_is_halo; +uniform sampler2D u_texture; +uniform highp float u_gamma_scale; +uniform lowp float u_device_pixel_ratio; +uniform bool u_is_text; + +varying vec2 v_data0; +varying vec3 v_data1; + +#pragma mapbox: define highp vec4 fill_color +#pragma mapbox: define highp vec4 halo_color +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp float halo_width +#pragma mapbox: define lowp float halo_blur + +void main() { + #pragma mapbox: initialize highp vec4 fill_color + #pragma mapbox: initialize highp vec4 halo_color + #pragma mapbox: initialize lowp float opacity + #pragma mapbox: initialize lowp float halo_width + #pragma mapbox: initialize lowp float halo_blur + + float EDGE_GAMMA = 0.105 / u_device_pixel_ratio; + + vec2 tex = v_data0.xy; + float gamma_scale = v_data1.x; + float size = v_data1.y; + float fade_opacity = v_data1[2]; + + float fontScale = u_is_text ? size / 24.0 : size; + + lowp vec4 color = fill_color; + highp float gamma = EDGE_GAMMA / (fontScale * u_gamma_scale); + lowp float buff = (256.0 - 64.0) / 256.0; + if (u_is_halo) { + color = halo_color; + gamma = (halo_blur * 1.19 / SDF_PX + EDGE_GAMMA) / (fontScale * u_gamma_scale); + buff = (6.0 - halo_width / fontScale) / SDF_PX; + } + + lowp float dist = texture2D(u_texture, tex).a; + highp float gamma_scaled = gamma * gamma_scale; + highp float alpha = smoothstep(buff - gamma_scaled, buff + gamma_scaled, dist); + + gl_FragColor = color * (alpha * opacity * fade_opacity); + +#ifdef OVERDRAW_INSPECTOR + gl_FragColor = vec4(1.0); +#endif +} diff --git a/shaders/symbol_sdf.vertex.glsl b/shaders/symbol_sdf.vertex.glsl new file mode 100644 index 00000000000..71ccf3c81d7 --- /dev/null +++ b/shaders/symbol_sdf.vertex.glsl @@ -0,0 +1,115 @@ +const float PI = 3.141592653589793; + +attribute vec4 a_pos_offset; +attribute vec4 a_data; +attribute vec4 a_pixeloffset; +attribute vec3 a_projected_pos; +attribute float a_fade_opacity; + +// contents of a_size vary based on the type of property value +// used for {text,icon}-size. +// For constants, a_size is disabled. +// For source functions, we bind only one value per vertex: the value of {text,icon}-size evaluated for the current feature. +// For composite functions: +// [ text-size(lowerZoomStop, feature), +// text-size(upperZoomStop, feature) ] +uniform bool u_is_size_zoom_constant; +uniform bool u_is_size_feature_constant; +uniform highp float u_size_t; // used to interpolate between zoom stops when size is a composite function +uniform highp float u_size; // used when size is both zoom and feature constant +uniform mat4 u_matrix; +uniform mat4 u_label_plane_matrix; +uniform mat4 u_coord_matrix; +uniform bool u_is_text; +uniform bool u_pitch_with_map; +uniform highp float u_pitch; +uniform bool u_rotate_symbol; +uniform highp float u_aspect_ratio; +uniform highp float u_camera_to_center_distance; +uniform float u_fade_change; +uniform vec2 u_texsize; + +varying vec2 v_data0; +varying vec3 v_data1; + +#pragma mapbox: define highp vec4 fill_color +#pragma mapbox: define highp vec4 halo_color +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp float halo_width +#pragma mapbox: define lowp float halo_blur + +void main() { + #pragma mapbox: initialize highp vec4 fill_color + #pragma mapbox: initialize highp vec4 halo_color + #pragma mapbox: initialize lowp float opacity + #pragma mapbox: initialize lowp float halo_width + #pragma mapbox: initialize lowp float halo_blur + + vec2 a_pos = a_pos_offset.xy; + vec2 a_offset = a_pos_offset.zw; + + vec2 a_tex = a_data.xy; + vec2 a_size = a_data.zw; + + float a_size_min = floor(a_size[0] * 0.5); + vec2 a_pxoffset = a_pixeloffset.xy; + + highp float segment_angle = -a_projected_pos[2]; + float size; + + if (!u_is_size_zoom_constant && !u_is_size_feature_constant) { + size = mix(a_size_min, a_size[1], u_size_t) / 128.0; + } else if (u_is_size_zoom_constant && !u_is_size_feature_constant) { + size = a_size_min / 128.0; + } else { + size = u_size; + } + + vec4 projectedPoint = u_matrix * vec4(a_pos, 0, 1); + highp float camera_to_anchor_distance = projectedPoint.w; + // If the label is pitched with the map, layout is done in pitched space, + // which makes labels in the distance smaller relative to viewport space. + // We counteract part of that effect by multiplying by the perspective ratio. + // If the label isn't pitched with the map, we do layout in viewport space, + // which makes labels in the distance larger relative to the features around + // them. We counteract part of that effect by dividing by the perspective ratio. + highp float distance_ratio = u_pitch_with_map ? + camera_to_anchor_distance / u_camera_to_center_distance : + u_camera_to_center_distance / camera_to_anchor_distance; + highp float perspective_ratio = clamp( + 0.5 + 0.5 * distance_ratio, + 0.0, // Prevents oversized near-field symbols in pitched/overzoomed tiles + 4.0); + + size *= perspective_ratio; + + float fontScale = u_is_text ? size / 24.0 : size; + + highp float symbol_rotation = 0.0; + if (u_rotate_symbol) { + // Point labels with 'rotation-alignment: map' are horizontal with respect to tile units + // To figure out that angle in projected space, we draw a short horizontal line in tile + // space, project it, and measure its angle in projected space. + vec4 offsetProjectedPoint = u_matrix * vec4(a_pos + vec2(1, 0), 0, 1); + + vec2 a = projectedPoint.xy / projectedPoint.w; + vec2 b = offsetProjectedPoint.xy / offsetProjectedPoint.w; + + symbol_rotation = atan((b.y - a.y) / u_aspect_ratio, b.x - a.x); + } + + highp float angle_sin = sin(segment_angle + symbol_rotation); + highp float angle_cos = cos(segment_angle + symbol_rotation); + mat2 rotation_matrix = mat2(angle_cos, -1.0 * angle_sin, angle_sin, angle_cos); + + vec4 projected_pos = u_label_plane_matrix * vec4(a_projected_pos.xy, 0.0, 1.0); + gl_Position = u_coord_matrix * vec4(projected_pos.xy / projected_pos.w + rotation_matrix * (a_offset / 32.0 * fontScale + a_pxoffset), 0.0, 1.0); + float gamma_scale = gl_Position.w; + + vec2 fade_opacity = unpack_opacity(a_fade_opacity); + float fade_change = fade_opacity[1] > 0.5 ? u_fade_change : -u_fade_change; + float interpolated_fade_opacity = max(0.0, min(1.0, fade_opacity[0] + fade_change)); + + v_data0 = a_tex / u_texsize; + v_data1 = vec3(gamma_scale, size, interpolated_fade_opacity); +} diff --git a/shaders/symbol_text_and_icon.fragment.glsl b/shaders/symbol_text_and_icon.fragment.glsl new file mode 100644 index 00000000000..6220563c415 --- /dev/null +++ b/shaders/symbol_text_and_icon.fragment.glsl @@ -0,0 +1,68 @@ +#define SDF_PX 8.0 + +#define SDF 1.0 +#define ICON 0.0 + +uniform bool u_is_halo; +uniform sampler2D u_texture; +uniform sampler2D u_texture_icon; +uniform highp float u_gamma_scale; +uniform lowp float u_device_pixel_ratio; + +varying vec4 v_data0; +varying vec4 v_data1; + +#pragma mapbox: define highp vec4 fill_color +#pragma mapbox: define highp vec4 halo_color +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp float halo_width +#pragma mapbox: define lowp float halo_blur + +void main() { + #pragma mapbox: initialize highp vec4 fill_color + #pragma mapbox: initialize highp vec4 halo_color + #pragma mapbox: initialize lowp float opacity + #pragma mapbox: initialize lowp float halo_width + #pragma mapbox: initialize lowp float halo_blur + + float fade_opacity = v_data1[2]; + + if (v_data1.w == ICON) { + vec2 tex_icon = v_data0.zw; + lowp float alpha = opacity * fade_opacity; + gl_FragColor = texture2D(u_texture_icon, tex_icon) * alpha; + +#ifdef OVERDRAW_INSPECTOR + gl_FragColor = vec4(1.0); +#endif + return; + } + + vec2 tex = v_data0.xy; + + float EDGE_GAMMA = 0.105 / u_device_pixel_ratio; + + float gamma_scale = v_data1.x; + float size = v_data1.y; + + float fontScale = size / 24.0; + + lowp vec4 color = fill_color; + highp float gamma = EDGE_GAMMA / (fontScale * u_gamma_scale); + lowp float buff = (256.0 - 64.0) / 256.0; + if (u_is_halo) { + color = halo_color; + gamma = (halo_blur * 1.19 / SDF_PX + EDGE_GAMMA) / (fontScale * u_gamma_scale); + buff = (6.0 - halo_width / fontScale) / SDF_PX; + } + + lowp float dist = texture2D(u_texture, tex).a; + highp float gamma_scaled = gamma * gamma_scale; + highp float alpha = smoothstep(buff - gamma_scaled, buff + gamma_scaled, dist); + + gl_FragColor = color * (alpha * opacity * fade_opacity); + +#ifdef OVERDRAW_INSPECTOR + gl_FragColor = vec4(1.0); +#endif +} diff --git a/shaders/symbol_text_and_icon.vertex.glsl b/shaders/symbol_text_and_icon.vertex.glsl new file mode 100644 index 00000000000..647310fc9c9 --- /dev/null +++ b/shaders/symbol_text_and_icon.vertex.glsl @@ -0,0 +1,116 @@ +const float PI = 3.141592653589793; + +attribute vec4 a_pos_offset; +attribute vec4 a_data; +attribute vec3 a_projected_pos; +attribute float a_fade_opacity; + +// contents of a_size vary based on the type of property value +// used for {text,icon}-size. +// For constants, a_size is disabled. +// For source functions, we bind only one value per vertex: the value of {text,icon}-size evaluated for the current feature. +// For composite functions: +// [ text-size(lowerZoomStop, feature), +// text-size(upperZoomStop, feature) ] +uniform bool u_is_size_zoom_constant; +uniform bool u_is_size_feature_constant; +uniform highp float u_size_t; // used to interpolate between zoom stops when size is a composite function +uniform highp float u_size; // used when size is both zoom and feature constant +uniform mat4 u_matrix; +uniform mat4 u_label_plane_matrix; +uniform mat4 u_coord_matrix; +uniform bool u_is_text; +uniform bool u_pitch_with_map; +uniform highp float u_pitch; +uniform bool u_rotate_symbol; +uniform highp float u_aspect_ratio; +uniform highp float u_camera_to_center_distance; +uniform float u_fade_change; +uniform vec2 u_texsize; +uniform vec2 u_texsize_icon; + +varying vec4 v_data0; +varying vec4 v_data1; + +#pragma mapbox: define highp vec4 fill_color +#pragma mapbox: define highp vec4 halo_color +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp float halo_width +#pragma mapbox: define lowp float halo_blur + +void main() { + #pragma mapbox: initialize highp vec4 fill_color + #pragma mapbox: initialize highp vec4 halo_color + #pragma mapbox: initialize lowp float opacity + #pragma mapbox: initialize lowp float halo_width + #pragma mapbox: initialize lowp float halo_blur + + vec2 a_pos = a_pos_offset.xy; + vec2 a_offset = a_pos_offset.zw; + + vec2 a_tex = a_data.xy; + vec2 a_size = a_data.zw; + + float a_size_min = floor(a_size[0] * 0.5); + float is_sdf = a_size[0] - 2.0 * a_size_min; + + highp float segment_angle = -a_projected_pos[2]; + float size; + + if (!u_is_size_zoom_constant && !u_is_size_feature_constant) { + size = mix(a_size_min, a_size[1], u_size_t) / 128.0; + } else if (u_is_size_zoom_constant && !u_is_size_feature_constant) { + size = a_size_min / 128.0; + } else { + size = u_size; + } + + vec4 projectedPoint = u_matrix * vec4(a_pos, 0, 1); + highp float camera_to_anchor_distance = projectedPoint.w; + // If the label is pitched with the map, layout is done in pitched space, + // which makes labels in the distance smaller relative to viewport space. + // We counteract part of that effect by multiplying by the perspective ratio. + // If the label isn't pitched with the map, we do layout in viewport space, + // which makes labels in the distance larger relative to the features around + // them. We counteract part of that effect by dividing by the perspective ratio. + highp float distance_ratio = u_pitch_with_map ? + camera_to_anchor_distance / u_camera_to_center_distance : + u_camera_to_center_distance / camera_to_anchor_distance; + highp float perspective_ratio = clamp( + 0.5 + 0.5 * distance_ratio, + 0.0, // Prevents oversized near-field symbols in pitched/overzoomed tiles + 4.0); + + size *= perspective_ratio; + + float fontScale = size / 24.0; + + highp float symbol_rotation = 0.0; + if (u_rotate_symbol) { + // Point labels with 'rotation-alignment: map' are horizontal with respect to tile units + // To figure out that angle in projected space, we draw a short horizontal line in tile + // space, project it, and measure its angle in projected space. + vec4 offsetProjectedPoint = u_matrix * vec4(a_pos + vec2(1, 0), 0, 1); + + vec2 a = projectedPoint.xy / projectedPoint.w; + vec2 b = offsetProjectedPoint.xy / offsetProjectedPoint.w; + + symbol_rotation = atan((b.y - a.y) / u_aspect_ratio, b.x - a.x); + } + + highp float angle_sin = sin(segment_angle + symbol_rotation); + highp float angle_cos = cos(segment_angle + symbol_rotation); + mat2 rotation_matrix = mat2(angle_cos, -1.0 * angle_sin, angle_sin, angle_cos); + + vec4 projected_pos = u_label_plane_matrix * vec4(a_projected_pos.xy, 0.0, 1.0); + gl_Position = u_coord_matrix * vec4(projected_pos.xy / projected_pos.w + rotation_matrix * (a_offset / 32.0 * fontScale), 0.0, 1.0); + float gamma_scale = gl_Position.w; + + vec2 fade_opacity = unpack_opacity(a_fade_opacity); + float fade_change = fade_opacity[1] > 0.5 ? u_fade_change : -u_fade_change; + float interpolated_fade_opacity = max(0.0, min(1.0, fade_opacity[0] + fade_change)); + + v_data0.xy = a_tex / u_texsize; + v_data0.zw = a_tex / u_texsize_icon; + v_data1 = vec4(gamma_scale, size, interpolated_fade_opacity, is_sdf); +} diff --git a/test/android/app/src/main/assets/to_zip.txt b/test/android/app/src/main/assets/to_zip.txt index 3a2a6f35f5f..014f75486b7 100644 --- a/test/android/app/src/main/assets/to_zip.txt +++ b/test/android/app/src/main/assets/to_zip.txt @@ -1,3 +1,3 @@ test/results/ test/fixtures/ -maplibre-gl-js/src/style-spec/reference/ +scripts/style-spec-reference/ diff --git a/test/style/expression/expression.test.cpp b/test/style/expression/expression.test.cpp index b2b2b256c16..85945fb5345 100644 --- a/test/style/expression/expression.test.cpp +++ b/test/style/expression/expression.test.cpp @@ -25,7 +25,7 @@ using namespace mbgl::style; TEST(Expression, IsExpression) { rapidjson::GenericDocument, rapidjson::CrtAllocator> spec; - spec.Parse<0>(util::read_file("maplibre-gl-js/src/style-spec/reference/v8.json").c_str()); + spec.Parse<0>(util::read_file("scripts/style-spec-reference/v8.json").c_str()); ASSERT_FALSE(spec.HasParseError()); ASSERT_TRUE(spec.IsObject() && spec.HasMember("expression_name") &&