Remove copyResume method.

This commit is contained in:
Young Hahn
2012-03-10 18:40:02 -05:00
parent 393acc38a2
commit cba3ef5d1e

View File

@@ -656,18 +656,3 @@ MBTiles.prototype.putInfo = function(data, callback) {
});
};
// Copy resume. Optionally retrieve the highest inserted key for resuming a
// tilelive.copy operation.
MBTiles.prototype.copyResume = function(callback) {
if (typeof callback !== 'function') throw new Error('Callback needed');
if (!this.open) return callback(new Error('MBTiles not yet loaded'));
var mbtiles = this;
// y is ASC here because tilelive.copy uses XYZ when writing/ordering
// tiles but y is "flipped" to TMS when stored in an MBTiles database.
this._db.get('SELECT zoom_level AS z, tile_column AS x, tile_row AS y FROM tiles ORDER BY z DESC, y ASC, x DESC LIMIT 1', function(err, row) {
if (err) return callback(err);
if (row) row.y = (1 << row.z) - 1 - row.y; // TMS => XYZ
return callback(null, row);
});
};