New urls for source data tiles and rendered tiles

This commit is contained in:
Petr Sloup
2016-04-22 12:33:20 +02:00
parent c0fb4fd400
commit a25ce62662
11 changed files with 90 additions and 71 deletions

View File

@@ -45,7 +45,7 @@ module.exports = function(options, repo, params, id, reportTiles, reportFont) {
repo[id] = styleJSON;
app.get('/styles/' + id + '.json', function(req, res, next) {
app.get('/' + id + '.json', function(req, res, next) {
var fixUrl = function(url) {
return url.replace(
'local://', req.protocol + '://' + req.headers.host + '/');
@@ -61,7 +61,7 @@ module.exports = function(options, repo, params, id, reportTiles, reportFont) {
return res.send(styleJSON_);
});
app.get('/styles/' + id + '/sprite:scale(@[23]x)?\.:format([\\w]+)',
app.get('/' + id + '/sprite:scale(@[23]x)?\.:format([\\w]+)',
function(req, res, next) {
var scale = req.params.scale,
format = req.params.format;