From 208ed7f6136e748439a81e4a854e454e7c2f9dd2 Mon Sep 17 00:00:00 2001 From: thinkinggis Date: Tue, 7 May 2019 19:52:33 +0800 Subject: [PATCH 1/2] fix(heatmap): setValue --- src/layer/render/heatmap/heatmap.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/layer/render/heatmap/heatmap.js b/src/layer/render/heatmap/heatmap.js index c03d7f9b46..887f41f954 100644 --- a/src/layer/render/heatmap/heatmap.js +++ b/src/layer/render/heatmap/heatmap.js @@ -68,7 +68,7 @@ function copyPass(layer) { const style = layer.get('styleOptions'); const material = new HeatmapColorizeMaterial({ u_rampColors: layer.rampColors, - u_opacity: style.opacity + u_opacity: style.opacity || 1.0 }, {}); const copyPass = new ShaderPass(material, 'u_texture'); return copyPass; From 83df28b24603595fc6e8e7051c1559d858176ad7 Mon Sep 17 00:00:00 2001 From: thinkinggis Date: Tue, 14 May 2019 17:42:46 +0800 Subject: [PATCH 2/2] fix(Amap): fix mapstyle --- src/map/AMap.js | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/src/map/AMap.js b/src/map/AMap.js index d5bf7aae89..aa7a1a1719 100644 --- a/src/map/AMap.js +++ b/src/map/AMap.js @@ -38,15 +38,17 @@ export default class GaodeMap extends Base { initMap() { const mapStyle = this.get('mapStyle'); - switch (mapStyle) { - case 'dark': - this.set('mapStyle', Theme.DarkTheme.mapStyle); - break; - case 'light': - this.set('mapStyle', Theme.LightTheme.mapStyle); - break; - default: - this.set('mapStyle', mapStyle); + if (mapStyle) { + switch (mapStyle) { + case 'dark': + this.set('mapStyle', Theme.DarkTheme.mapStyle); + break; + case 'light': + this.set('mapStyle', Theme.LightTheme.mapStyle); + break; + default: + this.set('mapStyle', mapStyle); + } } this.set('zooms', [ this.get('minZoom'), this.get('maxZoom') ]); const map = this.get('map');