diff --git a/src/serve_data.js b/src/serve_data.js index c10d622..dc70127 100644 --- a/src/serve_data.js +++ b/src/serve_data.js @@ -149,8 +149,13 @@ module.exports = function(options, repo, params, id, styles) { app.get('/' + id + '.json', function(req, res, next) { var info = clone(tileJSON); - info.tiles = utils.getTileUrls(req, info.tiles, - 'data/' + id, info.format); + info.tiles = utils.getTileUrls(req, info.tiles, 'data/' + id, info.format); + // delete usless info + delete info.Layer; + delete info.id; + delete info.filesize; + delete info.basename; + delete info.mtime; return res.send(info); }); diff --git a/test/metadata.js b/test/metadata.js index 2414445..19f1543 100644 --- a/test/metadata.js +++ b/test/metadata.js @@ -18,7 +18,7 @@ var testTileJSONArray = function(url) { }); }; -var testTileJSON = function(url, basename) { +var testTileJSON = function(url) { describe(url + ' is TileJSON', function() { it('is json', function(done) { supertest(app) @@ -27,11 +27,10 @@ var testTileJSON = function(url, basename) { .expect('Content-Type', /application\/json/, done); }); - it('has valid basename and tiles', function(done) { + it('has valid tiles', function(done) { supertest(app) .get(url) .expect(function(res) { - res.body.basename.should.equal(basename); res.body.tiles.length.should.be.greaterThan(0); }).end(done); }); @@ -64,6 +63,6 @@ describe('Metadata', function() { }); }); - testTileJSON('/styles/bright/rendered.json', 'bright'); - testTileJSON('/data/zurich-vector.json', 'zurich-vector'); + testTileJSON('/styles/bright/rendered.json'); + testTileJSON('/data/zurich-vector.json'); });