派生自 wuyushui/SewerAndRainNetwork

wangrui
2020-12-24 5c8763bbc9cbb8aead140091c29fa8cc77af3c24
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
/**
 * 加载公共的图层,例如国界,铁路,蓝色地图等图层
 */
import L from 'leaflet'
 
import MapConfig from '@/conf/MapConfig'
const tokenStr = 'tk=' + 'f1b72b5e7cb1175acddfa485f1bc9770' + '&'
class CommonLayerLoad {
    // 中国蓝色覆盖层
    loadBlueMap() {
        return L.tileLayer(MapConfig.BLUEMAP_HOST + '/server/ogcserver/whp_basemap_tile/wmts?x={x}&y={y}&z={z}', {
            maxZoom: 7,
            minZoom: 1,
            zoomOffset: 1
 
        })
    }
    // 道路路
    loadNormalMap() {
        return L.tileLayer('http://t0.tianditu.gov.cn/vec_c/wmts?' + tokenStr +
            'layer=cva&style=default&tilematrixset=c&Service=WMTS&Request=GetTile&Version=1.0.0&Format=tiles&TileMatrix={z}&TileCol={x}&TileRow={y}', {
            maxZoom: 18,
            minZoom: 1,
            zoomOffset: 1
        })
    }
    // 道路标注
    loadNormalMapa() {
        return L.tileLayer('http://t0.tianditu.gov.cn/cva_c/wmts?' + tokenStr +
            'layer=cva&style=default&tilematrixset=c&Service=WMTS&Request=GetTile&Version=1.0.0&Format=tiles&TileMatrix={z}&TileCol={x}&TileRow={y}', {
            maxZoom: 18,
            minZoom: 1,
            zoomOffset: 1
 
        })
    }
    // 影像图
    loadImgMapm() {
        return L.tileLayer('http://t0.tianditu.gov.cn/img_c/wmts?' + tokenStr +
            'layer=img&style=default&tilematrixset=c&Service=WMTS&Request=GetTile&Version=1.0.0&Format=tiles&TileMatrix={z}&TileCol={x}&TileRow={y}', {
            maxZoom: 18,
            minZoom: 1,
            zoomOffset: 1
        })
    }
    // 影像标注
    loadImgMapa() {
        return L.tileLayer('http://t0.tianditu.gov.cn/cia_c/wmts?' + tokenStr +
            'layer=cia&style=default&tilematrixset=c&Service=WMTS&Request=GetTile&Version=1.0.0&Format=tiles&TileMatrix={z}&TileCol={x}&TileRow={y}', {
            maxZoom: 18,
            minZoom: 1,
            zoomOffset: 1
        })
    }
    // 中石化内网影像图
    loadIntranetImgMap(token) {
        return L.tileLayer('http://10.246.132.249:8080/OneMapServer/rest/services/base-tdt-image-globe/WMTS?token=' + token + '&' +
            'layer=img&style=default&tilematrixset=c&Service=WMTS&Request=GetTile&Version=1.0.0&Format=tiles&TileMatrix={z}&TileCol={x}&TileRow={y}', {
            maxZoom: 18,
            minZoom: 1,
            zoomOffset: 1
        })
    }
    // 中石化内网影像图标注
    loadIntranetImgMapCia(token) {
        return L.tileLayer('http://10.246.132.249:8080/OneMapServer/rest/services/base-tdt-label-image/WMTS?token=' + token + '&' +
            'layer=cia&style=default&tilematrixset=c&Service=WMTS&Request=GetTile&Version=1.0.0&Format=tiles&TileMatrix={z}&TileCol={x}&TileRow={y}', {
            maxZoom: 18,
            minZoom: 1,
            zoomOffset: 1
        })
    }
}
export default CommonLayerLoad