mirror of https://gitee.com/antv-l7/antv-l7
parent
33274bf610
commit
ded4fee6c5
|
@ -92,7 +92,7 @@ scene.on('loaded', () => {
|
|||
.render();
|
||||
|
||||
setTimeout(()=>{
|
||||
scene.destroy();
|
||||
scene.setMapStyle('grey');
|
||||
},2000)
|
||||
|
||||
});
|
||||
|
|
|
@ -23,6 +23,7 @@ export default class Popup extends Base {
|
|||
this._scene.on('click', this._onClickClose);
|
||||
}, 30);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
setLnglat(lngLat) {
|
||||
this.lngLat = lngLat;
|
||||
|
|
|
@ -38,13 +38,13 @@ export default class GaodeMap extends Base {
|
|||
if (mapStyle) {
|
||||
switch (mapStyle) {
|
||||
case 'dark':
|
||||
this.set('mapStyle', Theme.DarkTheme.mapStyle);
|
||||
this.set('mapStyle', Theme.darkTheme.mapStyle);
|
||||
break;
|
||||
case 'light':
|
||||
this.set('mapStyle', Theme.LightTheme.mapStyle);
|
||||
this.set('mapStyle', Theme.lightTheme.mapStyle);
|
||||
break;
|
||||
case 'blank':
|
||||
this.set('mapStyle', 'blank');
|
||||
this.set('mapStyle', Theme.blankTheme.mapStyle);
|
||||
break;
|
||||
default:
|
||||
this.set('mapStyle', mapStyle);
|
||||
|
@ -122,10 +122,13 @@ export default class GaodeMap extends Base {
|
|||
const map = this.map;
|
||||
switch (style) {
|
||||
case 'dark':
|
||||
this.set('mapStyle', Theme.DarkTheme.mapStyle);
|
||||
this.set('mapStyle', Theme.darkTheme.mapStyle);
|
||||
break;
|
||||
case 'light':
|
||||
this.set('mapStyle', Theme.LightTheme.mapStyle);
|
||||
this.set('mapStyle', Theme.lightTheme.mapStyle);
|
||||
break;
|
||||
case 'blank':
|
||||
this.set('mapStyle', Theme.blankTheme.mapStyle);
|
||||
break;
|
||||
default:
|
||||
this.set('mapStyle', style);
|
||||
|
@ -134,7 +137,8 @@ export default class GaodeMap extends Base {
|
|||
map.setMapStyle(this.get('mapStyle'));
|
||||
if (style === 'blank') {
|
||||
map.setFeatures([]);
|
||||
} else {
|
||||
} else
|
||||
if (map.getFeatures().length === 0) {
|
||||
map.setFeatures(defaultMapFeatures);
|
||||
}
|
||||
return;
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
const BlankTheme = {
|
||||
mapStyle: 'amap://styles/07c17002b38775b32a7a76c66cf90e99?isPublic=true'
|
||||
};
|
||||
export default BlankTheme;
|
|
@ -1,3 +1,4 @@
|
|||
import DarkTheme from './dark';
|
||||
import LightTheme from './light';
|
||||
export { DarkTheme, LightTheme };
|
||||
import darkTheme from './dark';
|
||||
import lightTheme from './light';
|
||||
import blankTheme from './blank';
|
||||
export { darkTheme, lightTheme, blankTheme };
|
||||
|
|
Loading…
Reference in New Issue