Skip to content

Commit

Permalink
Add render test to verify that linear filtering is used
Browse files Browse the repository at this point in the history
Test that linear filtering is used for icons in text when
text-size is zoom-dependent.
  • Loading branch information
alexshalamov committed Nov 18, 2019
1 parent ad496b2 commit a320196
Show file tree
Hide file tree
Showing 2 changed files with 69 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,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"],
4,
8,
20,
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"
]
}
}
]
}

0 comments on commit a320196

Please sign in to comment.