Fix URLs in /index.json and /rendered.json

This commit is contained in:
Petr Sloup 2016-12-20 13:56:23 +01:00
parent 2d29a21596
commit 557f83121c

View file

@ -175,8 +175,13 @@ module.exports = function(opts, callback) {
var addTileJSONs = function(arr, req, type) { var addTileJSONs = function(arr, req, type) {
Object.keys(serving[type]).forEach(function(id) { Object.keys(serving[type]).forEach(function(id) {
var info = clone(serving[type][id]); var info = clone(serving[type][id]);
info.tiles = utils.getTileUrls(req, info.tiles, var path = '';
type + '/' + id, info.format); if (type == 'rendered') {
path = 'styles/' + id + '/rendered';
} else {
path = type + '/' + id;
}
info.tiles = utils.getTileUrls(req, info.tiles, path, info.format);
arr.push(info); arr.push(info);
}); });
return arr; return arr;