From cb3a1ff88fa61a933bbf2ff5e7bc337176445be8 Mon Sep 17 00:00:00 2001 From: p-a-s-c-a-l Date: Mon, 18 May 2020 15:10:57 +0200 Subject: [PATCH] #96 backwards compatibility for old studies --- src/components/commons/BasicMap.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/commons/BasicMap.js b/src/components/commons/BasicMap.js index 9fc0f39..7aad769 100644 --- a/src/components/commons/BasicMap.js +++ b/src/components/commons/BasicMap.js @@ -97,7 +97,7 @@ export default class BasicMap extends React.Component { // copy and extend queryParams using spread operator :o this.queryParams = { ...this.queryParams, ...queryString.parse(this.props.location.search) }; } else { - log.warn('no query parameters found, showing empty map!'); + log.warn('no query parameters found, showing empty map!'); } /** @@ -119,7 +119,9 @@ export default class BasicMap extends React.Component { this.overlayLayersTagName = this.queryParams.overlayLayersTagName ? this.queryParams.overlayLayersTagName : props.mapSelectionId; // grouping_tag query params overwrites the grouping criteria set by the child class in this.props! // if we use child.groupingCriteria = x it will override queryParams, therefore we put them in class variable this.overlayLayersGroupingTagType - this.overlayLayersGroupingTagType = this.queryParams.grouping_tag ? this.queryParams.grouping_tag : props.groupingCriteria; //e.g. taxonomy_term--eu_gl + + this.overlayLayersGroupingTagType = this.queryParams.overlayLayersGroupingTagType ? this.queryParams.overlayLayersGroupingTagType + : (this.queryParams.grouping_tag ? this.queryParams.grouping_tag : props.groupingCriteria); //e.g. taxonomy_term--eu_gl // Actually, this parameters are not used anymore! For data package and resource we use study_area as initial bbox // Yeah, that's inconsistent and not correct, but we reuse this query param since we don't want to re-implement