Fix layer filter by query params
This commit is contained in:
parent
97a49fab2f
commit
d3c9da6d5f
@ -118,12 +118,13 @@ function getNamedMapProvider ({ namedMapProviderCache, label, forcedFormat = nul
|
||||
return function getNamedMapProviderMiddleware (req, res, next) {
|
||||
const { user, token, cache_buster, api_key } = res.locals;
|
||||
const { dbuser, dbname, dbpassword, dbhost, dbport } = res.locals;
|
||||
const { template_id, layer, z, x, y, format } = req.params;
|
||||
const { template_id, layer: layerFromParams, z, x, y, format } = req.params;
|
||||
const { layer: layerFromQuery } = req.query;
|
||||
|
||||
const params = {
|
||||
user, token, cache_buster, api_key,
|
||||
dbuser, dbname, dbpassword, dbhost, dbport,
|
||||
template_id, layer, z, x, y, format
|
||||
template_id, layer: (layerFromQuery || layerFromParams), z, x, y, format
|
||||
};
|
||||
|
||||
if (forcedFormat) {
|
||||
|
Loading…
Reference in New Issue
Block a user