From 393acc38a29860e8ede2f799e99362aa9f67b16a Mon Sep 17 00:00:00 2001 From: Young Hahn Date: Sat, 10 Mar 2012 14:30:54 -0500 Subject: [PATCH] data.id => data.key. --- lib/mbtiles.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/mbtiles.js b/lib/mbtiles.js index fb2c900..f22dbe8 100644 --- a/lib/mbtiles.js +++ b/lib/mbtiles.js @@ -542,11 +542,9 @@ MBTiles.prototype.putTile = function(z, x, y, data, callback) { // Flip Y coordinate because MBTiles files are TMS. y = (1 << z) - 1 - y; - // Allow tilelive to pass us a data.id. If not, generate an md5 + // Tilelive may pass us a data.key. If not, generate an md5 // from the image buffer data. - // @TODO refactor this such that it is entirely tilelive's responsibility - // to assign an ID to tiles and identify blanks. We're halfway there. - var id = data.id || crypto.createHash('md5').update(data).digest('hex'); + var id = data.key || crypto.createHash('md5').update(data).digest('hex'); if (!this._tileCache[id]) { // This corresponds to the images table. this._tileCache[id] = data;