Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

20 lines (17 sloc) 0.688 kB
var tilelive = require('tilelive');
// Server-side sync method for Tileset model.
models.Tilesets.prototype.sync = function(method, model, success, error) {
if (method !== 'read') return error(new Error('Unsupported method.'));
var filepath = Bones.plugin.config.tiles + model.options.basepath;
tilelive.all(filepath, function(err, data) {
if (err) return error(err);
data = _(data).map(function(tileset) {
var err = tilelive.verify(tileset);
if (err) {
tileset.error = err.message;
}
return models.Tileset.syncread(tileset, model.options);
});
return success(data);
});
};
Jump to Line
Something went wrong with that request. Please try again.