| | |
| | | "element-ui": "^2.14.1", |
| | | "jquery": "^3.5.1", |
| | | "js-cookie": "^2.2.0", |
| | | "leaflet": "^1.6.0", |
| | | "leaflet": "^1.7.1", |
| | | "leaflet-canvas-marker": "^0.2.0", |
| | | "leaflet.markercluster": "^1.4.1", |
| | | "lodash": "^4.17.10", |
| | |
| | | |
| | | map = L.map(div, MapConfig.mapOptions) |
| | | |
| | | map.on('click', (event, a, b) => { |
| | | console.log(event, a, b) |
| | | }) |
| | | |
| | | window.map = map |
| | | window.L = L |
| | | |
| | |
| | | this.tileLayersArray.push(layer) |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 隐藏服务图层 |
| | | * @param {*} name |
| | | */ |
| | | hideTileLayer(name){ |
| | | if(this.tileLayersMap){ |
| | | let tileLayer = this.tileLayersMap.get(name) |
| | |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 获取所有的服务图层 |
| | | */ |
| | | getTileLayers(){ |
| | | return this.tilelayersArray |
| | | } |
| | |
| | | maxZoom: 18, |
| | | center: [26, 104], |
| | | zoom: 3, |
| | | worldCopyJump: true, |
| | | inertia: true, |
| | | zoomControl: false, |
| | | attributionControl: false, |
| | | editable: true |
| | |
| | | visible: false, |
| | | layerType: 'img_c', |
| | | isLoadMapByToken: true, |
| | | url: SINOPEC_GIS_HOST + '/OneMapServer/rest/services/base-tdt-image-globe/WMTS', |
| | | url: SINOPEC_GIS_HOST + '/OneMapServer/rest/services/base-tdt-image-globe/WMTS?'+ |
| | | 'layer=img&style=default&tilematrixset=c&Service=WMTS&Request=GetTile&Version=1.0.0&Format=tiles&TileMatrix={z}&TileCol={x}&TileRow={y}', |
| | | option:{ |
| | | maxZoom: 18, |
| | | minZoom: 1, |
| | | zoomOffset: 0 |
| | | zoomOffset: 1 |
| | | } |
| | | }, |
| | | annotation: { |
| | |
| | | visible: false, |
| | | layerType: 'cia_c', |
| | | isLoadMapByToken: true, |
| | | url: SINOPEC_GIS_HOST + '/OneMapServer/rest/services/base-tdt-label-image/WMTS', |
| | | url: SINOPEC_GIS_HOST + '/OneMapServer/rest/services/base-tdt-label-image/WMTS?'+ |
| | | 'layer=cia&style=default&tilematrixset=c&Service=WMTS&Request=GetTile&Version=1.0.0&Format=tiles&TileMatrix={z}&TileCol={x}&TileRow={y}', |
| | | option:{ |
| | | maxZoom: 18, |
| | | minZoom: 1, |
| | | zoomOffset: 0 |
| | | zoomOffset: 1 |
| | | } |
| | | }, |
| | | }, |
| | |
| | | visible: false, |
| | | layerType: 'vec_c', |
| | | isLoadMapByToken: true, |
| | | url: SINOPEC_GIS_HOST + '/OneMapServer/rest/services/base-tdt-vector-globe/WMTS', |
| | | url: SINOPEC_GIS_HOST + '/OneMapServer/rest/services/base-tdt-vector-globe/WMTS?'+ |
| | | 'layer=vec&style=default&tilematrixset=c&Service=WMTS&Request=GetTile&Version=1.0.0&Format=tiles&TileMatrix={z}&TileCol={x}&TileRow={y}', |
| | | option:{ |
| | | maxZoom: 18, |
| | | minZoom: 1, |
| | | zoomOffset: 0 |
| | | zoomOffset: 1 |
| | | } |
| | | }, |
| | | annotation: { |
| | |
| | | visible: false, |
| | | layerType: 'cva_c', |
| | | isLoadMapByToken: true, |
| | | url: SINOPEC_GIS_HOST + '/OneMapServer/rest/services/base-tdt-label-vector/WMTS', |
| | | url: SINOPEC_GIS_HOST + '/OneMapServer/rest/services/base-tdt-label-vector/WMTS?'+ |
| | | 'layer=cva&style=default&tilematrixset=c&Service=WMTS&Request=GetTile&Version=1.0.0&Format=tiles&TileMatrix={z}&TileCol={x}&TileRow={y}', |
| | | option:{ |
| | | maxZoom: 18, |
| | | minZoom: 1, |
| | | zoomOffset: 0 |
| | | zoomOffset: 1 |
| | | } |
| | | } |
| | | } |
| | |
| | | option:{ |
| | | maxZoom: 18, |
| | | minZoom: 1, |
| | | zoomOffset: 0 |
| | | zoomOffset: 1 |
| | | } |
| | | }, |
| | | annotation: { |
| | |
| | | option:{ |
| | | maxZoom: 18, |
| | | minZoom: 1, |
| | | zoomOffset: 0 |
| | | zoomOffset: 1 |
| | | } |
| | | }, |
| | | }, |
| | |
| | | option:{ |
| | | maxZoom: 18, |
| | | minZoom: 1, |
| | | zoomOffset: 0 |
| | | zoomOffset: 1 |
| | | } |
| | | }, |
| | | annotation: { |
| | |
| | | option:{ |
| | | maxZoom: 18, |
| | | minZoom: 1, |
| | | zoomOffset: 0 |
| | | zoomOffset: 1 |
| | | } |
| | | } |
| | | } |