mirror of
https://github.com/a-nyx/maputnik-with-pmtiles.git
synced 2024-12-30 21:50:32 +01:00
Added heatmap layer type.
This commit is contained in:
parent
a092bc2689
commit
77ddf67201
5 changed files with 19 additions and 2 deletions
|
@ -19,6 +19,7 @@ class LayerIcon extends React.Component {
|
||||||
case 'fill-extrusion': return <BackgroundIcon {...iconProps} />
|
case 'fill-extrusion': return <BackgroundIcon {...iconProps} />
|
||||||
case 'raster': return <FillIcon {...iconProps} />
|
case 'raster': return <FillIcon {...iconProps} />
|
||||||
case 'hillshade': return <FillIcon {...iconProps} />
|
case 'hillshade': return <FillIcon {...iconProps} />
|
||||||
|
case 'heatmap': return <FillIcon {...iconProps} />
|
||||||
case 'fill': return <FillIcon {...iconProps} />
|
case 'fill': return <FillIcon {...iconProps} />
|
||||||
case 'background': return <BackgroundIcon {...iconProps} />
|
case 'background': return <BackgroundIcon {...iconProps} />
|
||||||
case 'line': return <LineIcon {...iconProps} />
|
case 'line': return <LineIcon {...iconProps} />
|
||||||
|
|
|
@ -138,7 +138,7 @@ export default class LayerEditor extends React.Component {
|
||||||
onChange={v => this.changeProperty(null, 'source', v)}
|
onChange={v => this.changeProperty(null, 'source', v)}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
{this.props.layer.type !== 'raster' && this.props.layer.type !== 'background' && this.props.layer.type !== 'hillshade' &&
|
{['background', 'raster', 'hillshade', 'heatmap'].indexOf(this.state.type) < 0 &&
|
||||||
<LayerSourceLayerBlock
|
<LayerSourceLayerBlock
|
||||||
sourceLayerIds={sourceLayerIds}
|
sourceLayerIds={sourceLayerIds}
|
||||||
value={this.props.layer['source-layer']}
|
value={this.props.layer['source-layer']}
|
||||||
|
|
|
@ -23,6 +23,7 @@ class LayerTypeBlock extends React.Component {
|
||||||
['circle', 'Circle'],
|
['circle', 'Circle'],
|
||||||
['fill-extrusion', 'Fill Extrusion'],
|
['fill-extrusion', 'Fill Extrusion'],
|
||||||
['hillshade', 'Hillshade'],
|
['hillshade', 'Hillshade'],
|
||||||
|
['heatmap', 'Heatmap'],
|
||||||
]}
|
]}
|
||||||
onChange={this.props.onChange}
|
onChange={this.props.onChange}
|
||||||
value={this.props.value}
|
value={this.props.value}
|
||||||
|
|
|
@ -136,7 +136,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 !== 'raster' && this.state.type !== 'hillshade' &&
|
{['background', 'raster', 'hillshade', 'heatmap'].indexOf(this.state.type) < 0 &&
|
||||||
<LayerSourceLayerBlock
|
<LayerSourceLayerBlock
|
||||||
isFixed={true}
|
isFixed={true}
|
||||||
sourceLayerIds={layers}
|
sourceLayerIds={layers}
|
||||||
|
|
|
@ -210,5 +210,20 @@
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
"heatmap": {
|
||||||
|
"groups": [
|
||||||
|
{
|
||||||
|
"title": "Paint properties",
|
||||||
|
"type": "properties",
|
||||||
|
"fields": [
|
||||||
|
"heatmap-radius",
|
||||||
|
"heatmap-weight",
|
||||||
|
"heatmap-intensity",
|
||||||
|
"heatmap-color",
|
||||||
|
"heatmap-opacity"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue