diff options
| author | Yuval Adam <_@yuv.al> | 2019-10-16 21:54:40 +0300 |
|---|---|---|
| committer | Yuval Adam <_@yuv.al> | 2019-10-16 21:54:40 +0300 |
| commit | b5cdb40f9d55f4553c79e688dccffa63042ae76a (patch) | |
| tree | 8c0e05815f48e4a0cbb5c6e34b40244ebe4030e0 /src/Geshem.js | |
| parent | b056abbde2274661f15676ed07c29a13c620753c (diff) | |
Set proper layer opacity
Diffstat (limited to 'src/Geshem.js')
| -rw-r--r-- | src/Geshem.js | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/src/Geshem.js b/src/Geshem.js index 6e09561..2ccaa62 100644 --- a/src/Geshem.js +++ b/src/Geshem.js @@ -88,47 +88,6 @@ class OldGeshem extends Component { } } - showRadarLayer(res, i) { - this.map.setPaintProperty(`radar-${res}-${i}`, "raster-opacity", 0.85); - } - - hideRadarLayer(res, i) { - this.map.setPaintProperty(`radar-${res}-${i}`, "raster-opacity", 0); - } - - removeRadarLayer(res, i) { - this.map.removeLayer(`radar-${res}-${i}`); - } - - onChangeSlider(val) { - this.hideRadarLayer(this.state.res, this.state.slider); - this.setState({ slider: val }); - this.showRadarLayer(this.state.res, val); - } - - initMap() { - const { lng, lat, zoom } = this.state; - - this.map.on("style.load", () => { - this.setState({ - mapLoaded: true - }); - if (this.state.imgs !== null) { - this.loadSources(); - } - }); - } - - componentDidMount() { - // this.getGeolocation(); - if (this.state.playback) { - this.loadPlaybackData(); - } else { - this.loadRadarData(); - } - this.initMap(); - } - render() { return ( <div id="geshem"> |
