mirror of
https://github.com/a-nyx/maputnik-with-pmtiles.git
synced 2024-12-29 07:30:32 +01:00
Hide source layer for raster source
This commit is contained in:
parent
7c9dcb3083
commit
118f0360d0
1 changed files with 4 additions and 2 deletions
|
@ -32,8 +32,10 @@ class AddModal extends React.Component {
|
||||||
|
|
||||||
if(this.state.type !== 'background') {
|
if(this.state.type !== 'background') {
|
||||||
layer.source = this.state.source
|
layer.source = this.state.source
|
||||||
|
if(this.state.type !== 'raster') {
|
||||||
layer['source-layer'] = this.state['source-layer']
|
layer['source-layer'] = this.state['source-layer']
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
changedLayers.push(layer)
|
changedLayers.push(layer)
|
||||||
|
|
||||||
|
@ -91,7 +93,7 @@ class AddModal extends React.Component {
|
||||||
onChange={v => this.setState({ source: v })}
|
onChange={v => this.setState({ source: v })}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
{this.state.type !== 'background' &&
|
{this.state.type !== 'background' && this.state.type !== 'raster' &&
|
||||||
<LayerSourceLayerBlock
|
<LayerSourceLayerBlock
|
||||||
sourceLayerIds={this.props.sources[this.state.source] || []}
|
sourceLayerIds={this.props.sources[this.state.source] || []}
|
||||||
value={this.state['source-layer']}
|
value={this.state['source-layer']}
|
||||||
|
|
Loading…
Reference in a new issue