Skip to content

Kepler.gl is a powerful open source geospatial analysis tool for large-scale data sets.

[Refactor] Small update of readability (#250)

Oskar8e5b5b66fab2
diff --git a/src/components/map-container.js b/src/components/map-container.js
index fb3363ba5..fc50e7ca5 100644
--- a/src/components/map-container.js
+++ b/src/components/map-container.js
@@ -380,7 +380,10 @@ export default function MapContainerFactory(MapPopover, MapControl) {
}
render() {
- const {mapState, mapStyle, mapStateActions} = this.props;
+ const {
+ mapState, mapStyle, mapStateActions, mapLayers, layers, MapComponent,
+ datasets, mapboxApiAccessToken, mapControls, toggleMapControl
+ } = this.props;
const {updateMap, onMapClick} = mapStateActions;
if (!mapStyle.bottomMapStyle) {
@@ -388,9 +391,6 @@ export default function MapContainerFactory(MapPopover, MapControl) {
return <div/>;
}
- const {mapLayers, layers, datasets, mapboxApiAccessToken,
- mapControls, toggleMapControl} = this.props;
-
const mapProps = {
...mapState,
preserveDrawingBuffer: true,
@@ -418,7 +418,7 @@ export default function MapContainerFactory(MapPopover, MapControl) {
onToggleFullScreen={mapStateActions.toggleFullScreen}
onToggleMapControl={toggleMapControl}
/>
- <this.props.MapComponent
+ <MapComponent
{...mapProps}
key="bottom"
ref={this._setMapboxMap}
@@ -428,10 +428,10 @@ export default function MapContainerFactory(MapPopover, MapControl) {
>
{this._renderOverlay()}
{this._renderMapboxOverlays()}
- </this.props.MapComponent>
+ </MapComponent>
{mapStyle.topMapStyle && (
<div style={MAP_STYLE.top}>
- <this.props.MapComponent
+ <MapComponent
{...mapProps}
key="top"
mapStyle={mapStyle.topMapStyle}