diff --git a/src/client/containers/MapApp.js b/src/client/containers/MapApp.js index 45c0e2d7e79d1aa74b1fb8a8a6188f2500451f2f..f2ceb624bff1f05ecaa2c5000fa51e0f3ac1374d 100644 --- a/src/client/containers/MapApp.js +++ b/src/client/containers/MapApp.js @@ -62,7 +62,6 @@ const styles = theme => ({ }, map: { marginLeft: theme.spacing.unit, - //marginBotto: theme.spacing.unit * 3, height: '65%' }, statistics: { @@ -74,7 +73,7 @@ let MapApp = (props) => { const { classes, error, analysisView, heatMap } = props; let map = ''; - if (heatMap) { + if (props.results.length > 0 && heatMap) { map = ( <GMap results={props.results} @@ -84,7 +83,7 @@ let MapApp = (props) => { mapElement={<div style={{ height: `100%` }} />} /> ); - } else { + } else if (props.results.length > 0) { map = ( <LeafletMap sliderValue={100} @@ -129,9 +128,11 @@ let MapApp = (props) => { /> </Grid> <Grid item xs={12} sm={analysisView ? 4 : 8}> - <Paper className={classes.map}> - {map} - </Paper> + {props.results.length > 0 && + <Paper className={classes.map}> + {map} + </Paper> + } <div className={classes.statistics}> <Pie data={props.results} groupBy={props.search.groupBy} query={props.search.query} /> </div> diff --git a/src/client/reducers/options.js b/src/client/reducers/options.js index 151982a965d198c93fed3a3465c3b0b6ba662f94..3d66f4b3d15452f42e4362e92ac919fafa1b74e5 100644 --- a/src/client/reducers/options.js +++ b/src/client/reducers/options.js @@ -7,7 +7,7 @@ import { const DEFAULT_LANGUAGE = 'en'; const DEFAULT_ANALYSIS_VIEW = true; -const DEFAULT_HEATMAP = true; +const DEFAULT_HEATMAP = false; const DEFAULT_RESULT_FORMAT = 'table'; export const INITIAL_STATE = { diff --git a/src/client/reducers/search.js b/src/client/reducers/search.js index 2ae9b582d6fc20e6fb0560960e2cafbaba808e4d..2b215347bbac9d60660343d19332c563d4c2003b 100644 --- a/src/client/reducers/search.js +++ b/src/client/reducers/search.js @@ -50,8 +50,8 @@ export const INITIAL_STATE = { suggestions: [], suggestionsQuery: '', fetchingSuggestions: false, - //results: [], - results: sampleResults, + results: [], + // results: sampleResults, resultsFilter: { 'label': new Set(), 'modifier': new Set(),