forked from maplibre/maplibre-gl-js
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add render test for collision issue maplibre#2171
- Loading branch information
Showing
2 changed files
with
69 additions
and
0 deletions.
There are no files selected for viewing
Binary file added
BIN
+33.4 KB
test/integration/render/tests/text-offset/line-collision/expected.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
69 changes: 69 additions & 0 deletions
69
test/integration/render/tests/text-offset/line-collision/style.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
{ | ||
"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, | ||
"collisionDebug": true | ||
} | ||
}, | ||
"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-concave", | ||
"type": "symbol", | ||
"source": "mapbox", | ||
"source-layer": "marine_label", | ||
"layout": { | ||
"text-field": "This used to be the Carribean", | ||
"symbol-placement": "line-center", | ||
"text-allow-overlap": true, | ||
"text-size": 20, | ||
"text-offset": [0, -2], | ||
"text-font": ["Open Sans Semibold", "Arial Unicode MS Bold"], | ||
"text-max-width": 0 | ||
} | ||
}, | ||
{ | ||
"id": "line-convex", | ||
"type": "symbol", | ||
"source": "mapbox", | ||
"source-layer": "marine_label", | ||
"layout": { | ||
"text-field": "This used to be the Carribean", | ||
"symbol-placement": "line-center", | ||
"text-allow-overlap": true, | ||
"text-size": 20, | ||
"text-offset": [0, 2], | ||
"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 | ||
} | ||
} | ||
] | ||
} |