Serve TileJSONs on /{prefix}.json

This commit is contained in:
Petr Sloup
2016-03-09 19:18:59 +01:00
parent 9efa22b52b
commit 6f644a4c03
5 changed files with 33 additions and 39 deletions

View File

@@ -303,15 +303,5 @@ module.exports = function(maps, options, prefix) {
return respondImage(z, x, y, w, h, scale, format, res, next);
});
app.get('/index.json', function(req, res, next) {
var info = clone(map.tileJSON);
info.tiles = utils.getTileUrls(req.protocol, domains, req.headers.host,
prefix, tilePath, info.format,
req.query.key);
return res.send(info);
});
return app;
};