Merge branch 'develop' of http://xearth.cn:6600/r/wuyushui/SewerAndRainNetwork into develop
4个文件已删除
6个文件已添加
8个文件已修改
2 文件已重命名
| | |
| | | |
| | | <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' |
| | |
| | | } |
| | | } |
| | | }, |
| | | mounted () { |
| | | this.$nextTick(function () { |
| | | this.init() |
| | | }) |
| | | }, |
| | | 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 |
| | |
| | | <div class="wms-panel"> |
| | | <el-scrollbar class="wms-panel-scrollbar"> |
| | | <div v-for="item in serviceLayers" :key="item.code" class="layerbox"> |
| | | <!-- 一级图层遍历 --> |
| | | <div> |
| | | <input type="checkbox" :name="'wmsLayer_'+item.code" :checked="item.checked" :value="item.code" @change="swAllLayers(item)"/>{{ item.name }} |
| | | <input type="checkbox" :name="'wmsLayer_'+item.code" :checked="item.checked" :value="item.code" |
| | | @change="swAllLayers(item)"/>{{ item.name }} |
| | | </div> |
| | | <div class="layerbox-item"> |
| | | <!-- 二级图层遍历 --> |
| | | <div class="basemap-layer-item" v-for="itm in item.layers" :key="itm.code"> |
| | | <input type="checkbox" |
| | | :name="'wmsSublayers_'+item.code+'_'+itm.code" |
| | | :checked="itm.checked" |
| | | :value="itm.code" |
| | | @change="swWmsLayer(itm)"/>{{ itm.name }} |
| | | <!-- 三级图层遍历 --> |
| | | <div style="width: 100%"> |
| | | <div class="basemap-layer-item" v-for="layer in itm.layers" :key="layer.code"> |
| | | <input type="checkbox" |
| | | :name="'wmsSublayers_'+item.code+'_'+layer.code" |
| | | :checked="layer.checked" |
| | | :value="layer.code" |
| | | @change="swWmsLayer(layer)"/>{{ layer.name }} |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </el-scrollbar> |
| | | </div> |
| | | <lc-service-layer-filter v-if="layerFilterVisible" ref="serviceLayerFilter"></lc-service-layer-filter> |
| | | <lc-service-layer-filter ref="serviceLayerFilter"></lc-service-layer-filter> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | export default { |
| | | name: 'LcServiceLayer', |
| | | components: { LcServiceLayerFilter }, |
| | | data () { |
| | | return { |
| | | layerFilterVisible: false |
| | | } |
| | | }, |
| | | computed: { |
| | | serviceLayers () { |
| | | return this.$store.state.map.serviceLayers.LayerSewersLine |
| | |
| | | } |
| | | // this.updateWms() |
| | | }, |
| | | swFilter (item) { |
| | | this.layerFilterVisible = !this.layerFilterVisible |
| | | }, |
| | | updateServiceLayerList () { |
| | | |
| | | }, |
| | |
| | | |
| | | <style scoped lang="less"> |
| | | .inner-panel { |
| | | .title{ |
| | | .title { |
| | | color: #ffffff; |
| | | font-size: 16px; |
| | | font-weight: 600; |
| | | margin: 10px; |
| | | text-align: center; |
| | | } |
| | | |
| | | .btn-filter { |
| | | cursor: pointer; |
| | | color: #ffffff; |
| | | } |
| | | |
| | | .wms-panel { |
| | | width: 1.79167rem; |
| | | .wms-panel-scrollbar{ |
| | | width: 1.79167rem; |
| | | |
| | | .wms-panel-scrollbar { |
| | | height: 50vh; |
| | | width: 100%; |
| | | } |
| | | |
| | | .layerbox { |
| | | width: 100%; |
| | | |
| | | .layerbox-item { |
| | | display: flex; |
| | | flex-flow: row wrap; |
| | |
| | | * 加载业务数据图层 |
| | | */ |
| | | |
| | | import styles from '../../../conf/Styles' |
| | | import { STYLES } from '../../../conf/Constants' |
| | | import AjaxUtils from '../../../utils/AjaxUtils' |
| | | |
| | | class WfsLayerService { |
| | |
| | | this.L.geoJSON(features, { |
| | | style: function (feature) { |
| | | return { |
| | | fill: styles.defaultLineStyle.fill, |
| | | weight: styles.defaultLineStyle.weight, |
| | | fillColor: styles.defaultLineStyle.fillColor, |
| | | color: styles.defaultLineStyle.color, |
| | | fillOpacity: styles.defaultLineStyle.fillOpacity, |
| | | opacity: styles.defaultLineStyle.opacity, |
| | | dashArray: styles.defaultLineStyle.dashArray, |
| | | dashSpeed: styles.defaultLineStyle.dashSpeed |
| | | fill: STYLES.FILL, |
| | | weight: STYLES.WEIGHT, |
| | | fillColor: STYLES.FILL_COLOR, |
| | | color: STYLES.COLOR, |
| | | fillOpacity: STYLES.FILL_OPACITY, |
| | | opacity: STYLES.OPACITY, |
| | | dashArray: STYLES.DASH_ARRAY, |
| | | dashSpeed: STYLES.DASH_SPPED |
| | | } |
| | | }, |
| | | pointToLayer: (geoJsonPoint, latlng) => { |
| | |
| | | img: { |
| | | // url: 'assets/images/map/marker-icon.png', |
| | | url: '/assets/images/map/' + icon, |
| | | size: styles.defaultLineStyle.size |
| | | size: STYLES.ICON_SIZE |
| | | } |
| | | }) |
| | | }, |
| | |
| | | const icon = this.config.icon |
| | | const type = e.target.feature.geometry.type |
| | | if (type === 'LineString' || type === 'MultiLineString') { |
| | | layer.setStyle({ weight: styles.defaultLineStyle.weight, color: styles.defaultLineStyle.color }) |
| | | layer.setStyle({ weight: STYLES.WEIGHT, color: STYLES.COLOR }) |
| | | } |
| | | if (type === 'Point' || type === 'MultiPoint') { |
| | | layer.setStyle({ |
| | | img: { |
| | | url: '/assets/images/map/' + icon, |
| | | size: styles.defaultLineStyle.size |
| | | size: STYLES.ICON_SIZE |
| | | } |
| | | }) |
| | | } |
| | |
| | | sewersAreaGs: 'Company.js' |
| | | } |
| | | |
| | | export const STYLES = { |
| | | FILL: true, |
| | | WEIGHT: 3, |
| | | FILL_COLOR: '#73b2ff', |
| | | COLOR: '#73b2ff', |
| | | FILL_OPACITY: 0.2, |
| | | OPACITY: 1, |
| | | DASH_ARRAY: '4,4', |
| | | DASH_SPPED: -5, |
| | | ICON_SIZE: [20, 20] |
| | | } |
| | | |
| | | export const props = { |
| | | pipename: '管线名称', |
| | | pipecode: '管线编码', |
New file |
| | |
| | | /** |
| | | * 管线数据 |
| | | */ |
| | | import { LayerPipeLines } from './layers/LayerPipeLines' |
| | | import { LayerArea } from './layers/LayerArea' |
| | | import { LayerPk } from './layers/LayerPk' |
| | | |
| | | export const LayerPipeLine = { |
| | | code: 'sewersPipeLine', |
| | | name: '管线数据', |
| | | checked: true, |
| | | layers: [LayerPipeLines, LayerPk, LayerArea] |
| | | } |
New file |
| | |
| | | /** |
| | | * 区域 |
| | | */ |
| | | import { LayerWasteWater } from './layers/LayerWasteWater' |
| | | import { LayerWasteGas } from './layers/LayerWasteGas' |
| | | import { LayerWasteSolid } from './layers/LayerWasteSolid' |
| | | import { LayerAirQuality } from './layers/LayerAirQuality' |
| | | import { LayerEnvRisk } from './layers/LayerEnvRisk' |
| | | import { LayerSoilGroundWater } from './layers/LayerSoilGroundWater' |
| | | |
| | | export const LayerTopic = { |
| | | code: 'sewersTopic', |
| | | name: '专题图层', |
| | | checked: true, |
| | | layers: [LayerWasteWater, LayerWasteGas, LayerWasteSolid, LayerAirQuality, LayerEnvRisk, LayerSoilGroundWater] |
| | | } |
| | |
| | | import * as L from 'leaflet' |
| | | import TDT from './TDT' |
| | | import { LayerSewersPoint } from './layers/LayerSewers' |
| | | import { LayerWasteWater } from './layers/LayerWasteWater' |
| | | import { LayerSolidWaste } from './layers/LayerSolidWaste' |
| | | import { LayerWasteGas } from './layers/LayerWasteGas' |
| | | import { LayerPipeLine } from './layers/LayerPipeLine' |
| | | import { LayerArea } from './layers/LayerArea' |
| | | import { LayerPk } from './layers/LayerPk' |
| | | import { LayerFsss } from './layers/LayerFsss' |
| | | import { LayerHbss } from './layers/LayerHbss' |
| | | import { LayerTopic } from './LayerTopic' |
| | | import { LayerPipeLine } from './LayerPipeLine' |
| | | |
| | | const curWwwPath = window.document.location.href |
| | | const pathname = window.document.location.pathname |
| | |
| | | IntranetBaseMaps: TDT.intranet, |
| | | InternetBaseMaps: TDT.internet, |
| | | Layers: { |
| | | LayerSewersLine: [LayerPipeLine, LayerFsss, LayerHbss, LayerArea, LayerPk, LayerWasteWater, LayerWasteGas, LayerSolidWaste], |
| | | LayerSewersLine: [LayerPipeLine, LayerTopic], |
| | | layerSewersPoint: LayerSewersPoint |
| | | } // 污雨水图层配置 |
| | | } |
New file |
| | |
| | | /** |
| | | * 区域 |
| | | */ |
| | | const APP_GIS_HOST_2 = 'http://xearth.cn:8088' |
| | | const WFS_URL = APP_GIS_HOST_2 + '/server/ogcserver/PipeLine/wfs' |
| | | export const LayerAirQuality = { |
| | | code: 'sewersAirQuality', |
| | | name: '空气质量', |
| | | checked: true, |
| | | layers: [ |
| | | { |
| | | code: 'airQualityStation', |
| | | name: '监测站', |
| | | sname: '监测站', // 表名 |
| | | checked: true, // 默认选中状态 |
| | | url: WFS_URL + '?TYPENAME=公司', |
| | | minZoom: 10 |
| | | } |
| | | ] |
| | | } |
New file |
| | |
| | | /** |
| | | * 流域 |
| | | */ |
| | | const APP_GIS_HOST_2 = 'http://xearth.cn:8088' |
| | | const WFS_URL = APP_GIS_HOST_2 + '/server/ogcserver/PipeLine/wfs' |
| | | export const LayerBasin = { |
| | | code: 'sewersBasin', |
| | | name: '区域图层', |
| | | checked: true, |
| | | layers: [ |
| | | { |
| | | code: 'basinCj', |
| | | name: '长江流域', |
| | | sname: '长江流域', // 表名 |
| | | checked: true, // 默认选中状态 |
| | | url: WFS_URL + '?TYPENAME=公司', |
| | | minZoom: 10 |
| | | }, |
| | | { |
| | | code: 'basinHh', |
| | | name: '黄河流域', |
| | | sname: '黄河流域', |
| | | checked: true, // 默认选中状态 |
| | | wfs: WFS_URL + '?TYPENAME=码头', |
| | | minZoom: 10 |
| | | }, |
| | | { |
| | | code: 'basinBh', |
| | | name: '渤海流域', |
| | | sname: '渤海流域', |
| | | checked: true, // 默认选中状态 |
| | | wfs: WFS_URL + '?TYPENAME=装置区', |
| | | minZoom: 10 |
| | | }, |
| | | { |
| | | code: 'basinQt', |
| | | name: '其他', |
| | | sname: '其他', |
| | | checked: true, // 默认选中状态 |
| | | wfs: WFS_URL + '?TYPENAME=装置区', |
| | | minZoom: 10 |
| | | } |
| | | ] |
| | | } |
New file |
| | |
| | | /** |
| | | * 环境风险 |
| | | */ |
| | | const APP_GIS_HOST_2 = 'http://xearth.cn:8088' |
| | | const WFS_URL = APP_GIS_HOST_2 + '/server/ogcserver/PipeLine/wfs' |
| | | export const LayerEnvRisk = { |
| | | code: 'sewersEnvRisk', |
| | | name: '环境风险', |
| | | checked: true, |
| | | layers: [ |
| | | { |
| | | code: 'envRiskChart', |
| | | name: '风险统计图', |
| | | sname: '风险统计图', // 表名 |
| | | checked: true, // 默认选中状态 |
| | | url: WFS_URL + '?TYPENAME=公司', |
| | | minZoom: 10 |
| | | }, |
| | | { |
| | | code: 'envRiskMaterial', |
| | | name: '物资库', |
| | | sname: '物资库', |
| | | checked: true, // 默认选中状态 |
| | | wfs: WFS_URL + '?TYPENAME=码头', |
| | | minZoom: 10 |
| | | }, |
| | | { |
| | | code: 'envRiskMajor', |
| | | name: '重大风险', |
| | | sname: '重大风险', |
| | | checked: true, // 默认选中状态 |
| | | wfs: WFS_URL + '?TYPENAME=装置区', |
| | | minZoom: 10 |
| | | }, |
| | | { |
| | | code: 'envRiskFirst', |
| | | name: '一级风险', |
| | | sname: '一级风险', |
| | | checked: true, // 默认选中状态 |
| | | wfs: WFS_URL + '?TYPENAME=装置区', |
| | | minZoom: 10 |
| | | }, |
| | | { |
| | | code: 'envRiskSecond', |
| | | name: '二级风险', |
| | | sname: '二级风险', |
| | | checked: true, // 默认选中状态 |
| | | wfs: WFS_URL + '?TYPENAME=装置区', |
| | | minZoom: 10 |
| | | } |
| | | ] |
| | | } |
File was renamed from src/conf/layers/LayerPipeLine.js |
| | |
| | | const APP_GIS_HOST_2 = 'http://xearth.cn:8088' |
| | | const WFS_URL = APP_GIS_HOST_2 + '/server/ogcserver/PipeLine/wfs' |
| | | |
| | | export const LayerPipeLine = { |
| | | code: 'sewersPipeLine', |
| | | export const LayerPipeLines = { |
| | | code: 'sewersPipeLines', |
| | | name: '管线', |
| | | checked: true, |
| | | layers: [ |
| | |
| | | checked: true, // 默认选中状态 |
| | | wfs: WFS_URL + '?TYPENAME=管网', |
| | | minZoom: 10, // 在指定级别显示 |
| | | childLayer: 'fsss,hbss' // 关联PointLayers |
| | | childLayer: 'sewersFsss,sewersHbss' // 关联PointLayers |
| | | }, |
| | | { |
| | | code: 'oilline', |
| | |
| | | checked: true, // 默认选中状态 |
| | | wfs: WFS_URL + '?TYPENAME=含油污水', |
| | | minZoom: 10, |
| | | childLayer: 'fsss,hbss' // 关联PointLayers |
| | | childLayer: 'sewersFsss,sewersHbss' // 关联PointLayers |
| | | }, |
| | | { |
| | | code: 'saltline', |
| | |
| | | checked: true, // 默认选中状态 |
| | | wfs: WFS_URL + '?TYPENAME=含盐污水', |
| | | minZoom: 10, |
| | | childLayer: 'fsss,hbss' // 关联PointLayers |
| | | childLayer: 'sewersFsss,sewersHbss' // 关联PointLayers |
| | | }, |
| | | { |
| | | code: 'alkaliline', |
| | |
| | | checked: true, // 默认选中状态 |
| | | wfs: WFS_URL + '?TYPENAME=含碱污水', |
| | | minZoom: 10, |
| | | childLayer: 'fsss,hbss' // 关联PointLayers |
| | | childLayer: 'sewersFsss,sewersHbss' // 关联PointLayers |
| | | }, |
| | | { |
| | | code: 'outlet', |
| | |
| | | checked: true, // 默认选中状态 |
| | | wfs: WFS_URL + '?TYPENAME=事故水', |
| | | minZoom: 10, |
| | | childLayer: 'fsss,hbss' // 关联PointLayers |
| | | childLayer: 'sewersFsss,sewersHbss' // 关联PointLayers |
| | | }, |
| | | { |
| | | code: 'loopline', |
| | |
| | | checked: true, // 默认选中状态 |
| | | wfs: WFS_URL + '?TYPENAME=循环水', |
| | | minZoom: 10, |
| | | childLayer: 'fsss,hbss' // 关联PointLayers |
| | | childLayer: 'sewersFsss,sewersHbss' // 关联PointLayers |
| | | }, |
| | | { |
| | | code: 'purifyline', |
| | |
| | | checked: true, // 默认选中状态 |
| | | wfs: WFS_URL + '?TYPENAME=净化水', |
| | | minZoom: 10, |
| | | childLayer: 'fsss,hbss' // 关联PointLayers |
| | | childLayer: 'sewersFsss,sewersHbss' // 关联PointLayers |
| | | }, |
| | | { |
| | | code: 'lifeline', |
| | |
| | | checked: true, // 默认选中状态 |
| | | wfs: WFS_URL + '?TYPENAME=生活污水', |
| | | minZoom: 10, |
| | | childLayer: 'fsss,hbss' // 关联PointLayers |
| | | childLayer: 'sewersFsss,sewersHbss' // 关联PointLayers |
| | | }, |
| | | { |
| | | code: 'areainfo', |
New file |
| | |
| | | /** |
| | | * 土壤及地下水 |
| | | */ |
| | | const APP_GIS_HOST_2 = 'http://xearth.cn:8088' |
| | | const WFS_URL = APP_GIS_HOST_2 + '/server/ogcserver/PipeLine/wfs' |
| | | export const LayerSoilGroundWater = { |
| | | code: 'sewersSoilGroundWater', |
| | | name: '土壤及地下水', |
| | | checked: true, |
| | | layers: [ |
| | | { |
| | | code: 'soil', |
| | | name: '土壤', |
| | | sname: '土壤', // 表名 |
| | | checked: true, // 默认选中状态 |
| | | url: WFS_URL + '?TYPENAME=公司', |
| | | minZoom: 10 |
| | | }, |
| | | { |
| | | code: 'groundWater', |
| | | name: '地下水', |
| | | sname: '地下水', |
| | | checked: true, // 默认选中状态 |
| | | wfs: WFS_URL + '?TYPENAME=码头', |
| | | minZoom: 10 |
| | | }, |
| | | { |
| | | code: 'firstRiskBlock', |
| | | name: '一级风险地块', |
| | | sname: '一级风险地块', |
| | | checked: true, // 默认选中状态 |
| | | wfs: WFS_URL + '?TYPENAME=装置区', |
| | | minZoom: 10 |
| | | }, |
| | | { |
| | | code: 'secondRiskBlock', |
| | | name: '二级风险地块', |
| | | sname: '二级风险地块', |
| | | checked: true, // 默认选中状态 |
| | | wfs: WFS_URL + '?TYPENAME=装置区', |
| | | minZoom: 10 |
| | | }, |
| | | { |
| | | code: 'threeRiskBlock', |
| | | name: '三级风险地块', |
| | | sname: '三级风险地块', |
| | | checked: true, // 默认选中状态 |
| | | wfs: WFS_URL + '?TYPENAME=装置区', |
| | | minZoom: 10 |
| | | } |
| | | ] |
| | | } |
File was renamed from src/conf/layers/LayerSolidWaste.js |
| | |
| | | * @type {string} |
| | | */ |
| | | |
| | | export const LayerSolidWaste = { |
| | | export const LayerWasteSolid = { |
| | | code: 'solidWaste', |
| | | name: '固废', |
| | | checked: true, |
| | |
| | | <popup ref="popup" @callPopup="callPopup"></popup> |
| | | <div id="map" ref="rootmap"> |
| | | </div> |
| | | <sgis-layer-controller :preset="'warningPreset'"> |
| | | <lc-basemap></lc-basemap> |
| | | <!-- <div class="barline"></div>--> |
| | | <lc-service-layer class="barline" v-if="lcServiceLayerVisible"></lc-service-layer> |
| | | </sgis-layer-controller> |
| | | <sgis-layer-controller></sgis-layer-controller> |
| | | <monitor-panel></monitor-panel> |
| | | <!-- <top-enterprise-panel></top-enterprise-panel>--> |
| | | <tool-box-panel ref="toolBox"></tool-box-panel> |
| | |
| | | import Sgis from '@src/Sgis' |
| | | // import mapConfig from '@/conf/MapConfig' |
| | | import SgisLayerController from '@components/LayerController/LayerController' |
| | | import LcBasemap from '@components/LayerController/modules/LcBaseMap' |
| | | import LcServiceLayer from '@components/LayerController/modules/LcServiceLayer' |
| | | import MonitorPanel from '@components/panel/RightSearchPanel' |
| | | // import TopEnterprisePanel from '@components/panel/TopEnterprisePanel' |
| | | import summarySheets from '@components/table/summarySheets.vue' |
| | |
| | | // import MenuSpecial from '@components/panel/MenuTopic' |
| | | import LegendPanel from '@components/panel/LegendPanel' |
| | | import Enterprise from '../components/table/enterprise' |
| | | // 底图业务js逻辑 |
| | | |
| | | import AddWasteWaterHelper from '@components/BaseNav/WasteWater/WasteWater' |
| | | import AddGasHelper from '@components/BaseNav/flueGas/flueGas' |
| | | // // 公共展示数据 |
| | | import PublicBounced from '@components/BaseNav/PublicBounced/PublicBounced' |
| | | import LayerFactory from '@components/LayerController/service/LayerFactory' |
| | |
| | | // TopEnterprisePanel, |
| | | SgisLayerController, |
| | | MonitorPanel, |
| | | LcBasemap, |
| | | LcServiceLayer, |
| | | Popup, |
| | | summarySheets, |
| | | PublicBounced |
| | |
| | | }) |
| | | }, |
| | | methods: { |
| | | AddGasHelper () { |
| | | const data = { |
| | | companyId: 3900100145, |
| | | id: '', |
| | | monType: 2, |
| | | userCode: 'wenchun.deng', |
| | | monDuration: '', |
| | | epName: '', |
| | | secdDeptId: '', |
| | | contrLevel: '', |
| | | dataStatus: '', |
| | | dataFlag: '', |
| | | runStatus: '', |
| | | emissTypeId: '' |
| | | } |
| | | const AddGas = new AddGasHelper({ map: this.map }) |
| | | AddGas.requestData(data) |
| | | AddGas.SetPlueGasContent(this.config, this.$refs.PublicBounced) |
| | | }, |
| | | ChangeWaterState () { |
| | | const data = { |
| | | companyId: 3900100145, |
| | | id: '', |
| | | monType: 1, |
| | | userCode: 'wenchun.deng', |
| | | monDuration: '', |
| | | epName: '', |
| | | secdDeptId: '', |
| | | contrLevel: '', |
| | | dataStatus: '', |
| | | dataFlag: '', |
| | | runStatus: '', |
| | | emissTypeId: '' |
| | | } |
| | | const AddWasteWater = new AddWasteWaterHelper({ map: this.map }) |
| | | AddWasteWater.requestData(data) |
| | | AddWasteWater.SetWasteWaterContent(this.config, this.$refs.PublicBounced) |
| | | }, |
| | | saveMapStatus () { |
| | | window.serviceLayerHelper = this.serviceLayerHelper |
| | | this.$store.commit('setMapObj', this.map) |
| | |
| | | |
| | | this.basemapHelper = Sgis.initBasemapsHelper(this.map) // 初始化基础底图助手 |
| | | this.basemapHelper.initBasemap(this.config, false) // 第二个参数,表示是否内网底图 |
| | | |
| | | // this.serviceLayerHelper = Sgis.initTileLayersHelper(this.map) // 初始化业务底图助手 |
| | | // console.log('-------' + this.$refs.popup.$el) |
| | | // this.serviceLayerHelper.initServiceLayers(this.config, this.$refs.popup) |
| | | |
| | | this.vectorLayerHelper = Sgis.initVectorLayersHelper(this.map) // 初始化动态要素图层助手 |
| | | this.vectorLayerHelper.initVectorLayers(this.config) |
| | | |
| | |
| | | // this.setServiceLayerHelper(this.serviceLayerHelper) |
| | | // this.setVectorLayerHelper(this.vectorLayerHelper) |
| | | this.addMarker() |
| | | }, |
| | | addMarker () { |
| | | const L = this.L |
| | | var icon = new L.Icon({ |
| | | iconUrl: 'assets/images/map/marker-icon.png', |
| | | shadowUrl: 'assets/images/map/marker-shadow.png', |
| | | iconSize: [25, 41], |
| | | iconAnchor: [12, 41], |
| | | popupAnchor: [1, -34], |
| | | shadowSize: [41, 41] |
| | | }) |
| | | var marker = L.marker([32.2221, 118.7843], { |
| | | icon: icon |
| | | }).addTo(this.map) |
| | | .bindPopup(() => this.$refs.popup.$el, { |
| | | className: 's-map-popup', |
| | | minWidth: 300, |
| | | closeButton: false, |
| | | autoClose: false |
| | | }) |
| | | .bindTooltip('字体光晕效果t.', { |
| | | // permanent : true, |
| | | offset: [0, 0], // 偏移 |
| | | direction: 'right', // 放置位置 |
| | | // sticky:true,//是否标记在点上面 |
| | | className: 'anim-tooltip'// CSS控制 |
| | | }) |
| | | |
| | | marker.on('popupopen', this.onLayerClick) |
| | | }, |
| | | onLayerClick () { |
| | | this.$refs.popup.setShow() |
| | |
| | | import 'leaflet/dist/leaflet.css' |
| | | import Sgis from '@src/Sgis' |
| | | import PipeLineList from './PipeLineList' |
| | | import { mapMutations } from 'vuex' |
| | | |
| | | export default { |
| | | name: 'PipeLineIndex', |
| | |
| | | }) |
| | | }, |
| | | methods: { |
| | | ...mapMutations({ |
| | | setMapObj: 'setMapObj', |
| | | setLayerHelper: 'setLayerHelper' |
| | | }), |
| | | init () { |
| | | const mapcontainer = this.$refs.rootmap |
| | | this.mapObj = Sgis.initMap(mapcontainer) |
| | | this.basemapHelper = Sgis.initBasemaps(this.mapObj.map, this.mapObj.L) // 初始化底图 |
| | | this.vectorLayerHelper = Sgis.initLayers(this.mapObj.map, this.mapObj.L, {}, this.$nodeEnv) // 初始化业务图层 |
| | | this.setLayerHelper(this.vectorLayerHelper) |
| | | Sgis.initMap(mapcontainer) |
| | | return this.map |
| | | }, |
| | | setLayerHelper () { |
| | | |
| | | } |
| | | } |
| | | } |