| | |
| | | |
| | | <script> |
| | | import '@assets/css/map/magic.min.css' |
| | | import presets from './layerControllerPresets' |
| | | |
| | | import iconSetting from '@/assets/images/map-pages/icon/setting.png' |
| | | import LcServiceLayer from './modules/LcServiceLayer' |
| | |
| | | methods: { |
| | | showPanel () { |
| | | this.layerControllerVisible = !this.layerControllerVisible |
| | | }, |
| | | init () { |
| | | this.initPreset() |
| | | }, |
| | | initPreset () { |
| | | if (this.preset !== 'default') { |
| | | const prmPreset = presets[this.preset] |
| | | Object.assign(this.layerControllerVisible, prmPreset) // 防止预设参数与默认参数不一致导致报错,如果没有按照您的配置发生改变,请检查拼写是否正确 |
| | | if (prmPreset === 'undefined') { |
| | | console.log('该图层控制面板的预设没有找到,请检查预设名称是否正确!') |
| | | } else { |
| | | this.$store.commit('updateLayerControllerVisible', this.layerControllerVisible) |
| | | } |
| | | } |
| | | }, |
| | | switchPanel () { |
| | | this.panelSwitch.main = !this.panelSwitch.main |