Skip to content

Commit

Permalink
first step to have an emptytile.json to avoid senseless vector files
Browse files Browse the repository at this point in the history
  • Loading branch information
DerDakon committed Mar 14, 2016
1 parent fc56afd commit 2613fcb
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions bitmaptilerequest.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,15 @@ BitmapTilerequest.prototype =
self.abortRequest('Vectortile could not be created. Aborting.');
return;
}

if (data.features.length === 0)
{
// the vector tile was successfully created, but contains no data
// -hardlink to emptytile.json, this saves space and inodes on disk
// -serve emptytile.png, no need to render
self.tile.debug('Vector tile was empty');
}

self.tile.debug('Vector tile created successfully, saving vector tile...');
self.tile.saveVectorData(function(err)
{
Expand Down

0 comments on commit 2613fcb

Please sign in to comment.