Overviews Adapter: Do not check overviews if using MVT pure style or aggregations

This commit is contained in:
Raul Marin 2019-06-26 16:52:16 +02:00
parent f9bd3d39f0
commit 7b731a24d1

View File

@ -2,6 +2,7 @@
var queue = require('queue-async');
var _ = require('underscore');
const AggregationMapConfig = require('../../aggregation/aggregation-mapconfig');
function MapConfigOverviewsAdapter(overviewsMetadataBackend, filterStatsBackend) {
this.overviewsMetadataBackend = overviewsMetadataBackend;
@ -14,7 +15,9 @@ MapConfigOverviewsAdapter.prototype.getMapConfig = function (user, requestMapCon
var layers = requestMapConfig.layers;
var analysesResults = context.analysesResults;
if (!layers || layers.length === 0) {
const aggMapConfig = new AggregationMapConfig(null, requestMapConfig);
if (aggMapConfig.isVectorOnlyMapConfig() || aggMapConfig.isAggregationMapConfig() ||
!layers || layers.length === 0) {
return callback(null, requestMapConfig);
}