Improve namig

This commit is contained in:
Daniel García Aubert 2017-12-11 19:22:15 +01:00
parent 3f075ca432
commit 87c4848e19

View File

@ -86,7 +86,7 @@ module.exports = class AggregationMapConfigAdapter {
} else if (aggregation === undefined) {
if (mapConfig.isVectorOnlyMapConfig()) {
shouldAdapt = true;
} else if (this._hasAggregation(requestMapConfig)){
} else if (this._hasAnyLayerAggregation(requestMapConfig)){
shouldAdapt = true;
}
}
@ -94,7 +94,7 @@ module.exports = class AggregationMapConfigAdapter {
return shouldAdapt;
}
_hasAggregation (requestMapConfig) {
_hasAnyLayerAggregation (requestMapConfig) {
for (const layer of requestMapConfig.layers) {
if (this._hasLayerAggregation(layer)) {
return true;
@ -111,7 +111,6 @@ module.exports = class AggregationMapConfigAdapter {
_adaptLayers (connection, mapConfig, requestMapConfig, context, callback) {
const isVectorOnlyMapConfig = mapConfig.isVectorOnlyMapConfig();
const adaptLayerPromises = requestMapConfig.layers.map((layer, index) => {
return this._adaptLayer(connection, layer, index, isVectorOnlyMapConfig, mapConfig);
});