Add option to disable static maps (close #129)
This commit is contained in:
parent
37386bfb29
commit
0673c8990a
2 changed files with 108 additions and 105 deletions
|
@ -27,7 +27,8 @@ Example::
|
|||
},
|
||||
"maxSize": 2048,
|
||||
"pbfAlias": "pbf",
|
||||
"serveAllFonts": false
|
||||
"serveAllFonts": false,
|
||||
"serveStaticMaps": true
|
||||
},
|
||||
"styles": {
|
||||
"basic": {
|
||||
|
|
|
@ -474,6 +474,7 @@ module.exports = function(options, repo, params, id, dataResolver) {
|
|||
return z;
|
||||
};
|
||||
|
||||
if (options.serveStaticMaps !== false) {
|
||||
var staticPattern =
|
||||
'/static/:raw(raw)?/%s/:width(\\d+)x:height(\\d+)' +
|
||||
':scale(' + SCALE_PATTERN + ')?\.:format([\\w]+)';
|
||||
|
@ -589,6 +590,7 @@ module.exports = function(options, repo, params, id, dataResolver) {
|
|||
return respondImage(z, x, y, bearing, pitch, w, h, scale, format,
|
||||
res, next, overlay);
|
||||
});
|
||||
}
|
||||
|
||||
app.get('/rendered.json', function(req, res, next) {
|
||||
var info = clone(tileJSON);
|
||||
|
|
Loading…
Reference in a new issue