Skip to content

Commit

Permalink
Add new render tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mpulkki-mapbox committed Feb 24, 2020
1 parent d13e5ad commit fe44204
Show file tree
Hide file tree
Showing 8 changed files with 408 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,78 @@
{
"version": 8,
"metadata": {
"test": {
"collisionDebug": true,
"width": 512,
"height": 512
}
},
"center": [
0,
0
],
"zoom": 4,
"pitch": 0,
"bearing": 0,
"sources": {
"geojson": {
"type": "geojson",
"maxzoom": 1,
"data": {
"type": "FeatureCollection",
"features": [{
"type": "Feature",
"properties": {
"name": "abcdefg"
},
"geometry": {
"type": "LineString",
"coordinates": [
[ -5, 4 ], [ 5, 4 ]
]
}

},
{
"type": "Feature",
"properties": {
"name": "abcdefg"
},
"geometry": {
"type": "LineString",
"coordinates": [
[ 5, -4 ], [ -5, -4 ]
]
}

}]
}
}
},
"glyphs": "local://glyphs/{fontstack}/{range}.pbf",
"layers": [
{
"id": "background",
"type": "background",
"paint": {
"background-color": "white"
}
},
{
"id": "line",
"type": "symbol",
"source": "geojson",
"layout": {
"text-field": "{name}",
"text-font": [
"Open Sans Semibold",
"Arial Unicode MS Bold"
],
"symbol-placement": "line",
"symbol-spacing": 100,
"text-pitch-alignment": "map",
"text-anchor": "right"
}
}
]
}
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,76 @@
{
"version": 8,
"metadata": {
"test": {
"collisionDebug": true,
"width": 512,
"height": 512
}
},
"center": [
0,
0
],
"zoom": 4,
"pitch": 60,
"bearing": 90,
"sources": {
"geojson": {
"type": "geojson",
"maxzoom": 1,
"data": {
"type": "FeatureCollection",
"features": [{
"type": "Feature",
"properties": {
"name": "Some sentence that is quite long"
},
"geometry": {
"type": "LineString",
"coordinates": [
[ -20, 4 ], [ 20, 4 ]
]
}

},
{
"type": "Feature",
"properties": {
"name": "Another sentence that is even longer than the previous one"
},
"geometry": {
"type": "LineString",
"coordinates": [
[ 0, 0 ], [ 50, 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": "{name}",
"text-font": [
"Open Sans Semibold",
"Arial Unicode MS Bold"
],
"symbol-placement": "line",
"text-pitch-alignment": "map"
}
}
]
}
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,128 @@
{
"version": 8,
"metadata": {
"test": {
"collisionDebug": true,
"width": 512,
"height": 512
}
},
"center": [
0,
0
],
"zoom": 4,
"pitch": 60,
"sources": {
"geojson": {
"type": "geojson",
"maxzoom": 1,
"data": {
"type": "FeatureCollection",
"features": [{
"type": "Feature",
"properties": {
"name": "a"
},
"geometry": {
"type": "LineString",
"coordinates": [
[ -5, 4 ], [ -1, 4 ]
]
}

},
{
"type": "Feature",
"properties": {
"name": "ab"
},
"geometry": {
"type": "LineString",
"coordinates": [
[ -5, 0 ], [ -1, 0 ]
]
}

},
{
"type": "Feature",
"properties": {
"name": "abc"
},
"geometry": {
"type": "LineString",
"coordinates": [
[ -5, -4 ], [ -1, -4 ]
]
}

},
{
"type": "Feature",
"properties": {
"name": "abcd"
},
"geometry": {
"type": "LineString",
"coordinates": [
[ 1, 4 ], [ 5, 4 ]
]
}

},
{
"type": "Feature",
"properties": {
"name": "abcde"
},
"geometry": {
"type": "LineString",
"coordinates": [
[ 1, 0 ], [ 5, 0 ]
]
}

},
{
"type": "Feature",
"properties": {
"name": "abcdef"
},
"geometry": {
"type": "LineString",
"coordinates": [
[ 1, -4 ], [ 5, -4 ]
]
}

}]
}
}
},
"glyphs": "local://glyphs/{fontstack}/{range}.pbf",
"layers": [
{
"id": "background",
"type": "background",
"paint": {
"background-color": "white"
}
},
{
"id": "line",
"type": "symbol",
"source": "geojson",
"layout": {
"text-field": "{name}",
"symbol-spacing": 30,
"text-font": [
"Open Sans Semibold",
"Arial Unicode MS Bold"
],
"symbol-placement": "line",
"text-pitch-alignment": "viewport"
}
}
]
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit fe44204

Please sign in to comment.