Use passed id in putGrid.
This commit is contained in:
@@ -566,7 +566,7 @@ MBTiles.prototype.putGrid = function(z, x, y, data, callback) {
|
||||
|
||||
// Preprocess grid data.
|
||||
var json = JSON.stringify({ grid: data.grid, keys: data.keys });
|
||||
var id = crypto.createHash('md5').update(json).digest('hex');
|
||||
var id = data.id || crypto.createHash('md5').update(json).digest('hex');
|
||||
if (!this._gridCache[id]) {
|
||||
// This corresponds to the grid_utfgrid table.
|
||||
this._gridCache[id] = zlib.deflate(new Buffer(json, 'utf8'));
|
||||
|
||||
Reference in New Issue
Block a user