Only init websocket if local API

This commit is contained in:
Lukas Martinelli
2017-01-01 15:12:46 +01:00
parent ce39ae723c
commit fa38667125
3 changed files with 34 additions and 34 deletions

View File

@@ -29,8 +29,8 @@ export default class App extends React.Component {
onLocalStyleChange: mapStyle => this.onStyleChanged(mapStyle, false)
})
this.styleStore.supported(isSupported => {
if(!isSupported) {
this.styleStore.init(err => {
if(err) {
console.log('Falling back to local storage for storing styles')
this.styleStore = new StyleStore()
}
@@ -150,11 +150,11 @@ export default class App extends React.Component {
onDataChange: (e) => {
this.layerWatcher.analyzeMap(e.map)
},
//TODO: This would actually belong to the layout component
//TODO: This would actually belong to the layout component
style:{
top: 40,
//left: 500,
}
top: 40,
//left: 500,
}
}
const renderer = metadata['maputnik:renderer'] || 'mbgljs'