fix silly scope issue
This commit is contained in:
+4
-4
@@ -588,17 +588,17 @@ MBTiles.prototype.putGrid = function(z, x, y, data, callback) {
|
|||||||
/*
|
/*
|
||||||
this._gridCache[id] = zlib.deflate(new Buffer(json, 'utf8'));
|
this._gridCache[id] = zlib.deflate(new Buffer(json, 'utf8'));
|
||||||
*/
|
*/
|
||||||
|
var that = this;
|
||||||
Step(function() {
|
Step(function() {
|
||||||
zlib.deflate(new Buffer(json, 'utf8'),this);
|
zlib.deflate(new Buffer(json, 'utf8'),this);
|
||||||
}, function(err,buffer) {
|
}, function(err,buffer) {
|
||||||
if (err) return callback(err);
|
if (err) return callback(err);
|
||||||
this._gridCache[id] = buffer;
|
that._gridCache[id] = buffer;
|
||||||
// This corresponds to the grid_key table.
|
// This corresponds to the grid_key table.
|
||||||
this._keyCache[id] = Object.keys(data.data || {});
|
that._keyCache[id] = Object.keys(data.data || {});
|
||||||
|
|
||||||
// This corresponds to the keymap table.
|
// This corresponds to the keymap table.
|
||||||
_(this._dataCache).extend(data.data || {});
|
_(that._dataCache).extend(data.data || {});
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user