| | |
| | | import LcServiceLayer from '@components/LayerController/modules/LcServiceLayer' |
| | | import LcServiceLayerFilter from '@components/LayerController/modules/LcServiceLayerFilter' |
| | | import MonitorPanel from '@components/panel/MonitorPanel' |
| | | import { mapMutations, mapState } from 'vuex' |
| | | import TopEnterprisePanel from "@components/panel/TopEnterprisePanel"; |
| | | |
| | | export default { |
| | |
| | | } |
| | | }, |
| | | computed:{ |
| | | ...mapState({ |
| | | showServiceLayerFilter: state => state.showServiceLayerFilter, |
| | | mapConfig: state => state.mapConfig |
| | | }) |
| | | showServiceLayerFilter(){ |
| | | return this.$store.state.map.showServiceLayerFilter |
| | | }, |
| | | mapConfig(){ |
| | | return this.$store.state.map.mapConfig |
| | | } |
| | | }, |
| | | beforeMount(){ |
| | | this.$nextTick(() => { |
| | |
| | | }) |
| | | }, |
| | | methods:{ |
| | | ...mapMutations({ |
| | | setMapObj: 'setMapObj', |
| | | setBasemapHelper: 'setBasemapHelper', |
| | | setServiceLayerHelper: 'setServiceLayerHelper', |
| | | setVectorLayerHelper: 'setVectorLayerHelper' |
| | | }), |
| | | saveMapStatus(){ |
| | | this.$store.commit('setMapObj', this.mapObj); |
| | | this.$store.commit('setBasemapHelper', this.basemapHelper); |
| | | this.$store.commit('setServiceLayerHelper', this.serviceLayerHelper); |
| | | this.$store.commit('setVectorLayerHelper', this.vectorLayerHelper); |
| | | }, |
| | | init() { |
| | | const mapcontainer = this.$refs.rootmap |
| | | this.mapObj = Sgis.initMap(mapcontainer) |
| | |
| | | this.vectorLayerHelper = Sgis.initVectorLayersHelper(this.mapObj.map, this.mapObj.L) // 初始化动态要素图层助手 |
| | | this.vectorLayerHelper.initVectorLayers(this.mapConfig) |
| | | |
| | | this.setMapObj(this.mapObj) |
| | | this.setBasemapHelper(this.basemapHelper) |
| | | this.setServiceLayerHelper(this.serviceLayerHelper) |
| | | this.setVectorLayerHelper(this.vectorLayerHelper) |
| | | |
| | | this.saveMapStatus() |
| | | // this.setMapObj(this.mapObj) |
| | | // this.setBasemapHelper(this.basemapHelper) |
| | | // this.setServiceLayerHelper(this.serviceLayerHelper) |
| | | // this.setVectorLayerHelper(this.vectorLayerHelper) |
| | | } |
| | | } |
| | | } |