Use first vector source for OL3

This commit is contained in:
Lukas Martinelli
2017-01-10 14:05:25 +01:00
parent 7ff0ac9bb5
commit b470885263
3 changed files with 80 additions and 43 deletions
+1 -1
View File
@@ -66,7 +66,7 @@ class AddModal extends React.Component {
if(!this.state.source && sourceIds.length > 0) {
this.setState({
source: sourceIds[0],
'source-layer': this.state['source-layer'] || nextProps.sources[sourceIds[0]][0]
'source-layer': this.state['source-layer'] || (nextProps.sources[sourceIds[0]] || [])[0]
})
}
}
-1
View File
@@ -105,7 +105,6 @@ class ActiveSourceTypeEditor extends React.Component {
borderWidth: 2,
borderStyle: 'solid',
padding: margins[1],
height: 50
}}>
<SourceTypeEditor
onChange={this.props.onChange}