Merge branch 'master' into errorLogs

This commit is contained in:
Simon Martín
2017-12-12 16:15:30 +01:00
8 changed files with 61 additions and 25 deletions
+4 -2
View File
@@ -357,7 +357,9 @@ LayergroupController.prototype.center = function(req, res, next) {
LayergroupController.prototype.staticMap = function(req, res, width, height, zoom /* bounds */, center, next) {
var format = req.params.format === 'jpg' ? 'jpeg' : 'png';
req.params.format = req.params.format || 'png';
// We force always the tile to be generated using PNG because
// is the only format we support by now
res.locals.format = 'png';
res.locals.layer = res.locals.layer || 'all';
var self = this;
@@ -507,4 +509,4 @@ function validateLayerRouteMiddleware(req, res, next) {
}
next();
}
}
+4 -2
View File
@@ -28,7 +28,7 @@ NamedMapsController.prototype.register = function(app) {
userMiddleware,
this.prepareContext,
this.tile.bind(this),
vectorError()
vectorError()
);
app.get(
@@ -121,7 +121,9 @@ NamedMapsController.prototype.staticMap = function(req, res, next) {
var cdbUser = res.locals.user;
var format = req.params.format === 'jpg' ? 'jpeg' : 'png';
res.locals.format = req.params.format || 'png';
// We force always the tile to be generated using PNG because
// is the only format we support by now
res.locals.format = 'png';
res.locals.layer = res.locals.layer || 'all';
var namedMapProvider;