Skip to content

Commit

Permalink
Make implicit API expectation implicit
Browse files Browse the repository at this point in the history
I was bitten by issue mapbox#42 when trying to implement a tilelive TileSource that used vector tiles, which by their nature are sparse. (My backend would faithfully emit error messages for missing tiles, but with a different wording which med tilelive crash out rather than just skip the tile.) Until the actual issue is resolved (which would mean rewriting all tilelive implementations, I guess) it should be made an explicit part or the API doc.
  • Loading branch information
robpvn committed Aug 7, 2015
1 parent 7c9df39 commit 6bf7e6c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions API.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ Tilesource.prototype.getTile = function(z, x, y, callback) {
// obtains tile and calls callback:
function(err, tile, options) {
// err is set when the tile does not exist or when retrieval failed.
// If the tile does not exist and that's OK, the error message should
// explicitly read 'Tile does not exist' in order to be handled correctly
// by tilelive.copy.
// otherwise, tile is a buffer containing the compressed image data
}
};
Expand Down

0 comments on commit 6bf7e6c

Please # to comment.