Add nofilters query param
This commit is contained in:
parent
00f81db57e
commit
605be77a04
@ -40,8 +40,8 @@ DataviewBackend.prototype.getDataview = function (mapConfigProvider, user, param
|
||||
var pg = new PSQL(dbParamsFromReqParams(params));
|
||||
|
||||
var ownFilter = +params.own_filter;
|
||||
// ownFilter = !!ownFilter;
|
||||
var query = getDaviewQuery(dataviewDefinition, ownFilter);
|
||||
var noFilters = !!params.no_filters;
|
||||
var query = getDaviewQuery(dataviewDefinition, ownFilter, noFilters);
|
||||
if (params.bbox) {
|
||||
var bboxFilter = new BBoxFilter({column: 'the_geom_webmercator', srid: 3857}, {bbox: params.bbox});
|
||||
query = bboxFilter.sql(query);
|
||||
@ -62,8 +62,8 @@ DataviewBackend.prototype.getDataview = function (mapConfigProvider, user, param
|
||||
);
|
||||
};
|
||||
|
||||
function getDaviewQuery(dataviewDefinition, ownFilter) {
|
||||
if (ownFilter === -1) {
|
||||
function getDaviewQuery(dataviewDefinition, ownFilter, noFilters) {
|
||||
if (noFilters) {
|
||||
return dataviewDefinition.sql.no_filters;
|
||||
} else if (ownFilter === 1) {
|
||||
return dataviewDefinition.sql.own_filter_on;
|
||||
|
@ -109,6 +109,7 @@ LayergroupController.prototype.register = function(app) {
|
||||
var allowedDataviewQueryParams = [
|
||||
'filters', // json
|
||||
'own_filter', // 0, 1
|
||||
'no_filters', // 0, 1
|
||||
'bbox', // w,s,e,n
|
||||
'start', // number
|
||||
'end', // number
|
||||
|
Loading…
Reference in New Issue
Block a user