timeout error vector with lines
This commit is contained in:
parent
1ea4fc50c9
commit
4fc90db495
Binary file not shown.
@ -2,30 +2,36 @@
|
|||||||
|
|
||||||
import mapbox_vector_tile
|
import mapbox_vector_tile
|
||||||
|
|
||||||
|
lines_list = []
|
||||||
|
|
||||||
|
# main diagonal line
|
||||||
|
lines_list.append({ "geometry":"LINESTRING (0 0, 4096 4096)"})
|
||||||
|
|
||||||
|
# diagonal lines
|
||||||
|
for i in range(4096/32, 4096, 4096/32):
|
||||||
|
start = i
|
||||||
|
end = 4096 - i
|
||||||
|
|
||||||
|
lines_list.append({ "geometry":"LINESTRING (0 " + str(start) + ", " + str(end) + " 4096)" })
|
||||||
|
lines_list.append({ "geometry":"LINESTRING (" + str(start) + " 0, 4096 " + str(end) + ")" })
|
||||||
|
|
||||||
|
# box lines
|
||||||
|
lines_list.append({ "geometry":"LINESTRING (0 0, 0 4096)"})
|
||||||
|
lines_list.append({ "geometry":"LINESTRING (0 4096, 4096 4096)"})
|
||||||
|
lines_list.append({ "geometry":"LINESTRING (4096 4096, 4096 0)"})
|
||||||
|
lines_list.append({ "geometry":"LINESTRING (4096 0, 0 0)"})
|
||||||
|
|
||||||
|
|
||||||
tile = mapbox_vector_tile.encode([
|
tile = mapbox_vector_tile.encode([
|
||||||
{
|
{
|
||||||
"name": "errorTileSquareLayer",
|
"name": "errorTileSquareLayer",
|
||||||
"features": [{
|
"features": [{ "geometry":"POLYGON ((0 0, 0 4096, 4096 4096, 4096 0, 0 0))" }]
|
||||||
"geometry":"POLYGON ((0 0, 0 4096, 4096 4096, 4096 0, 0 0))",
|
|
||||||
"properties":{
|
|
||||||
"uid":123,
|
|
||||||
"foo":"bar",
|
|
||||||
"cat":"flew"
|
|
||||||
}
|
|
||||||
}]
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "errorTileStripesLayer",
|
"name": "errorTileStripesLayer",
|
||||||
"features": [{
|
"features": lines_list
|
||||||
"geometry":"LINESTRING(159 3877, -1570 3877)",
|
|
||||||
"properties":{
|
|
||||||
"uid":1234,
|
|
||||||
"foo":"bar",
|
|
||||||
"cat":"flew"
|
|
||||||
}
|
|
||||||
}]
|
|
||||||
}
|
}
|
||||||
])
|
])
|
||||||
|
|
||||||
with open('./assets/render-timeout-fallback.mvt', 'w') as f:
|
with open('./assets/render-timeout-fallback.mvt', 'w+') as f:
|
||||||
f.write(tile)
|
f.write(tile)
|
Loading…
Reference in New Issue
Block a user