| | |
| | | <div class="full-screen"> |
| | | <div id="map" ref="rootmap"></div> |
| | | <sgis-layer-controller :preset="'warningPreset'"> |
| | | <lc-basemap ref="lcBasemap"></lc-basemap> |
| | | <lc-basemap></lc-basemap> |
| | | </sgis-layer-controller> |
| | | <monitor-panel></monitor-panel> |
| | | </div> |
| | |
| | | init() { |
| | | const mapcontainer = this.$refs.rootmap |
| | | this.mapObj = Sgis.initMap(mapcontainer) |
| | | console.log('01步骤:', this.mapObj) |
| | | |
| | | this.basemapHelper = Sgis.initBasemapsHelper(this.mapObj.map, this.mapObj.L) // 初始化基础底图助手 |
| | | this.basemapHelper.initBasemap(mapConfig, false) // 第二个参数,表示是否内网底图 |
| | |
| | | this.vectorLayerHelper = Sgis.initVectorLayersHelper(this.mapObj.map, this.mapObj.L) // 初始化动态要素图层助手 |
| | | this.vectorLayerHelper.initVectorLayers(mapConfig) |
| | | |
| | | console.log('02步骤:', this.basemapHelper) |
| | | this.$refs.lcBasemap.init(this.basemapHelper) |
| | | this.setMapObj(this.mapObj) |
| | | this.setBasemapHelper(this.basemapHelper) |
| | | this.setServiceLayerHelper(this.serviceLayerHelper) |
| | | this.setVectorLayerHelper(this.vectorLayerHelper) |
| | | return this.map |
| | | } |
| | | } |
| | | } |