Minor fix for correctly serving empty responses for missing tiles
This commit is contained in:
parent
51d6ca0880
commit
82f179b07c
1 changed files with 2 additions and 1 deletions
|
@ -164,6 +164,7 @@ module.exports = function(options, repo, params, id, dataResolver) {
|
|||
var parts = req.url.split('/');
|
||||
var sourceId = parts[2];
|
||||
var source = map.sources[sourceId];
|
||||
var sourceInfo = styleJSON.sources[sourceId];
|
||||
var z = parts[3] | 0,
|
||||
x = parts[4] | 0,
|
||||
y = parts[5].split('.')[0] | 0,
|
||||
|
@ -171,7 +172,7 @@ module.exports = function(options, repo, params, id, dataResolver) {
|
|||
source.getTile(z, x, y, function(err, data, headers) {
|
||||
if (err) {
|
||||
//console.log('MBTiles error, serving empty', err);
|
||||
createEmptyResponse(source.format, source.color, callback);
|
||||
createEmptyResponse(sourceInfo.format, sourceInfo.color, callback);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue