Merge branch 'master' into mvt

This commit is contained in:
thinkinggis 2019-05-14 17:44:03 +08:00
commit e851483951
2 changed files with 12 additions and 10 deletions

View File

@ -68,7 +68,7 @@ function copyPass(layer) {
const style = layer.get('styleOptions'); const style = layer.get('styleOptions');
const material = new HeatmapColorizeMaterial({ const material = new HeatmapColorizeMaterial({
u_rampColors: layer.rampColors, u_rampColors: layer.rampColors,
u_opacity: style.opacity u_opacity: style.opacity || 1.0
}, {}); }, {});
const copyPass = new ShaderPass(material, 'u_texture'); const copyPass = new ShaderPass(material, 'u_texture');
return copyPass; return copyPass;

View File

@ -38,15 +38,17 @@ export default class GaodeMap extends Base {
initMap() { initMap() {
const mapStyle = this.get('mapStyle'); const mapStyle = this.get('mapStyle');
switch (mapStyle) { if (mapStyle) {
case 'dark': switch (mapStyle) {
this.set('mapStyle', Theme.DarkTheme.mapStyle); case 'dark':
break; this.set('mapStyle', Theme.DarkTheme.mapStyle);
case 'light': break;
this.set('mapStyle', Theme.LightTheme.mapStyle); case 'light':
break; this.set('mapStyle', Theme.LightTheme.mapStyle);
default: break;
this.set('mapStyle', mapStyle); default:
this.set('mapStyle', mapStyle);
}
} }
this.set('zooms', [ this.get('minZoom'), this.get('maxZoom') ]); this.set('zooms', [ this.get('minZoom'), this.get('maxZoom') ]);
const map = this.get('map'); const map = this.get('map');