Skip to content

Commit

Permalink
Add more render tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Anand Thakker committed Mar 27, 2017
1 parent 2a10066 commit c798663
Show file tree
Hide file tree
Showing 6 changed files with 191 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,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"
}
}
]
}
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,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"
}
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,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 ]
]
}
}
}
]
}

0 comments on commit c798663

Please sign in to comment.