Skip to content

Commit

Permalink
Add tests for issue #5112.
Browse files Browse the repository at this point in the history
Without the fix:
 - The "viewport-overzoomed" test would show "Figueroa St." jumbled in the lower half of the screen
 - The "viewport-overzoomed-single-glyph" test would show the letter "C" upside down
  • Loading branch information
ChrisLoer committed Aug 22, 2017
1 parent 022fbee commit 5aa127c
Show file tree
Hide file tree
Showing 5 changed files with 112 additions and 0 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -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
}
}
]
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -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
}
}
]
}
Binary file not shown.

0 comments on commit 5aa127c

Please sign in to comment.