Skip to content

Commit

Permalink
Draw debug tiles for all current sources
Browse files Browse the repository at this point in the history
  • Loading branch information
Asheem Mamoowala committed Jul 18, 2017
1 parent f276668 commit 3c660d3
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/render/painter.js
Original file line number Diff line number Diff line change
Expand Up @@ -273,8 +273,8 @@ class Painter {
this.renderPass();

if (this.options.showTileBoundaries) {
const sourceCache = this.style.sourceCaches[Object.keys(this.style.sourceCaches)[0]];
if (sourceCache) {
for (const sourceKey: SourceCache in this.style.sourceCaches) {
const sourceCache = this.style.sourceCaches[sourceKey];
draw.debug(this, sourceCache, sourceCache.getVisibleCoordinates());
}
}
Expand Down
Binary file modified test/integration/render-tests/debug/tile/expected.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions test/integration/render-tests/debug/tile/style.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@
],
"zoom": 14,
"sources": {
"satellite": {
"type": "raster",
"tiles": [
"local://tiles/{z}-{x}-{y}.satellite.png"
],
"maxzoom": 1,
"tileSize": 256
},
"mapbox": {
"type": "vector",
"maxzoom": 14,
Expand All @@ -30,6 +38,14 @@
"background-color": "white"
}
},
{
"id": "raster",
"type": "raster",
"source": "satellite",
"paint": {
"raster-fade-duration": 0
}
},
{
"id": "line",
"type": "symbol",
Expand Down

0 comments on commit 3c660d3

Please sign in to comment.