From 43573fcd8c2d8b84dfcd7b4a4fa20ea9f791742a Mon Sep 17 00:00:00 2001 From: Lukas Martinelli Date: Fri, 16 Dec 2016 15:14:20 +0100 Subject: [PATCH] Switch map renderer based on state --- src/app.jsx | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/app.jsx b/src/app.jsx index ed9c602..d3da4f4 100644 --- a/src/app.jsx +++ b/src/app.jsx @@ -39,7 +39,8 @@ export default class App extends React.Component { this.state = { accessToken: this.settingsStore.accessToken, workContext: "layers", - currentStyle: style.emptyStyle + currentStyle: style.emptyStyle, + mapRenderer: 'gl', } } @@ -99,6 +100,10 @@ export default class App extends React.Component { } render() { + const mapProps = { + mapStyle: this.state.currentStyle, + accessToken: this.state.accessToken, + } return
0} @@ -117,10 +122,8 @@ export default class App extends React.Component { accessToken={this.state.accessToken} onAccessTokenChanged={this.onAccessTokenChanged.bind(this)} /> - + {this.state.mapRenderer == 'ol3' && } + {this.state.mapRenderer == 'gl' && }
} }