| | |
| | | import BasemapHelper from '@components/helpers/BasemapHelper' |
| | | import VectorLayerHelper from '@components/helpers/VectorLayerHelper' |
| | | |
| | | // 初始化显示 |
| | | import '@components/plugin/PathDrag' |
| | | |
| | | import MapConfig from '@/conf/MapConfig' |
| | | import '@components/plugin/PathDashFlow' // 流动线图 |
| | | import DownLoad from '@components/plugin/DownLoad' |
| | |
| | | import '@/components/plugin/magicMarker.css' |
| | | import '@components/plugin/pulse/Pulse' // marker 外圈波 |
| | | import '@components/plugin/pulse/Pulse.css' // marker 外圈波 css |
| | | |
| | | import BasemapHelper from '@components/helpers/BasemapHelper' |
| | | import VectorLayerHelper from '@components/helpers/VectorLayerHelper' |
| | | let map = null |
| | | const L = window.L |
| | | const initMap = (div, mapOption) => { |
| | |
| | | // getGasQueryOnlineMonData: [] |
| | | } |
| | | }, |
| | | mounted () { |
| | | this.$nextTick(() => { |
| | | console.log(this.$refs.publicBounced) |
| | | }) |
| | | }, |
| | | methods: { |
| | | closePopup () { |
| | | this.flag = false |
| | |
| | | .public-bounced { |
| | | z-index: 2000; |
| | | position: absolute; |
| | | top: 15%; |
| | | top: 45%; |
| | | left: 20%; |
| | | |
| | | .public-bounced-title { |
| | |
| | | |
| | | // 区分不同类型 使用不同img |
| | | const defaultImg = '/assets/images/map/solidwaste/voc.png' |
| | | const setting = '/assets/images/map/solidwaste/gf_green.png' |
| | | const setting = '/assets/images/map/solidwaste/gf_green2.png' |
| | | |
| | | // 请求接口数据 |
| | | const mapApi = require('../../../api/mapApi').default |
| | |
| | | // 通过方法 向绑定弹框传递数据 |
| | | instance.setData(resultBasic.Result.DataInfo, resultDetailed.Result.DataInfo, 'gufei') |
| | | /* flyTo()弹出框平移事件 */ |
| | | this.setPanTo(e.latlng, 80) |
| | | this.setPanTo(e.latlng, 200) |
| | | } |
| | | |
| | | // flayTo() 弹框的可滑动事件 |
| | |
| | | methods: { |
| | | updateBasemapList () { |
| | | this.basemapList = this.basemapHelper.getBasemapList() |
| | | console.log(this.basemapList) |
| | | // console.log(this.basemapList) |
| | | }, |
| | | changeBasemap (itm) { |
| | | // console.log(itm) |
| | | const code = itm.code |
| | | this.basemapList.forEach((item) => { |
| | | if (item.code === code) { |
| | | console.log(this.currentBaseMapCode) |
| | | // console.log(this.currentBaseMapCode) |
| | | if (this.currentBaseMapCode == null || this.currentBaseMapCode !== code) { |
| | | this.currentBaseMapCode = code |
| | | this.basemapHelper.showBasemap(item.code, item.conf.annotationCheck, true) |
| | |
| | | /* eslint-disable no-debugger */ |
| | | import AjaxUtils from '@/utils/AjaxUtils' |
| | | import * as utils from '../../utils/utils' |
| | | // import * as utils from '../../utils/utils' |
| | | /** |
| | | * 底图管理助手,负责底图创建及开关 |
| | | */ |
| | |
| | | const internetBasemaps = config.mapConfig.InternetBaseMaps |
| | | for (let i = 0, len = internetBasemaps.length; i < len; ++i) { |
| | | const basemapConfig = internetBasemaps[i] |
| | | const mapToken = utils.getRandomTDTToken() |
| | | const mapUrl = utils.changeURLArg(basemapConfig.map.url, 'tk', mapToken) |
| | | const basemapLayer = this.L.tileLayer(mapUrl, basemapConfig.map.option) |
| | | const basemapAnnotationLayer = this.L.tileLayer(mapUrl, basemapConfig.annotation.option) |
| | | const basemapLayer = this.L.tileLayer(basemapConfig.map.url, basemapConfig.map.option) |
| | | const basemapAnnotationLayer = this.L.tileLayer(basemapConfig.annotation.url, basemapConfig.annotation.option) |
| | | |
| | | const basemap = { |
| | | code: basemapConfig.code, |
| | |
| | | }) |
| | | }, |
| | | methods: { |
| | | |
| | | init (map) { |
| | | this.map = map |
| | | this.toolBoxPanelVisible = true |
| | |
| | | this.drawLayer = this.L.layerGroup().addTo(this.map) |
| | | } |
| | | this.active = index |
| | | console.log(this.basemapList) |
| | | // console.log(this.basemapList) |
| | | for (let i = 0; i < this.isShow.length; i++) { |
| | | if (i !== index) { |
| | | this.isShow[i] = false |
| | |
| | | } // 污雨水图层配置 |
| | | } |
| | | |
| | | const mapTokenArray = ['5d76218063082952d18b76da5005f490', |
| | | 'f1b72b5e7cb1175acddfa485f1bc9770', |
| | | 'ac8bbce8119b337d75d4b06696f6186d', |
| | | '9bf834ce1ba3ba01c568147e9bfcab7c'] |
| | | /** |
| | | * 内网GIS,获取token参数 |
| | | */ |
| | |
| | | mapOptions, |
| | | mapConfig, |
| | | TokenConfig, |
| | | BLUEMAP_HOST, |
| | | mapTokenArray |
| | | BLUEMAP_HOST |
| | | // mapTokenArray |
| | | // MagicMaker |
| | | } |
| | |
| | | // basemap主机配置 |
| | | |
| | | const SINOPEC_GIS_HOST = 'http://10.246.132.249:8080' // 内网天地图主机地址 |
| | | const TIANDITU_GIS_HOST = 'http://t0.tianditu.gov.cn' // 公网天地图主机地址 |
| | | const TIANDITU_GIS_TOKEN = '5d76218063082952d18b76da5005f490' // 备用tk: f1b72b5e7cb1175acddfa485f1bc9770 |
| | | |
| | | const mapTokenArray = ['5d76218063082952d18b76da5005f490', |
| | | 'f1b72b5e7cb1175acddfa485f1bc9770', |
| | | 'ac8bbce8119b337d75d4b06696f6186d', |
| | | '9bf834ce1ba3ba01c568147e9bfcab7c'] |
| | | |
| | | const TIANDITU_GIS_TOKEN = mapTokenArray[Math.floor(Math.random() * mapTokenArray.length)] // 备用tk: f1b72b5e7cb1175acddfa485f1bc9770 |
| | | |
| | | const intranet = [ |
| | | { |
| | | code: 'tianditu_img', |
| | |
| | | import '@/utils/dialogDrag.js' |
| | | import '@components/plugin/leaflet-measure-path/leaflet-measure-path.css' |
| | | import '@components/plugin/leaflet-measure-path/leaflet-measure-path' |
| | | import '@components/plugin/PathDrag' |
| | | const appConfig = require('@/app.config') |
| | | Vue.config.productionTip = false |
| | | |
| | |
| | | * arg_val 替换后的参数的值 |
| | | * return url 参数替换后的url |
| | | */ |
| | | import MapConfig from '../conf/MapConfig' |
| | | export function changeURLArg (url, arg, argValue) { |
| | | var pattern = arg + '=([^&]*)' |
| | | var replaceText = arg + '=' + argValue |
| | |
| | | } |
| | | // eslint-disable-next-line no-unreachable |
| | | return url + '\n' + arg + '\n' + argValue |
| | | } |
| | | export function getRandomTDTToken () { |
| | | return MapConfig.mapTokenArray[Math.floor(Math.random() * MapConfig.mapTokenArray.length)] |
| | | } |