北京经济技术开发区经开区虚拟城市项目-【前端】-移动端Web
lixuliang
2024-03-13 065669d31914a2f65c48d351417f48e49bd79c0c
src/utils/tool.js
@@ -30,6 +30,8 @@
    _GLOBAL.ImageLayer = new ol.layer.Tile({
        source: new ol.source.XYZ({
            url: `${'https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer'}/tile/{z}/{y}/{x}`,
            projection:"EPSG:3857",
            tileSize: 512
        }),
    });
    window.mapapi.addLayer(_GLOBAL.ImageLayer);
@@ -43,7 +45,7 @@
            url: "https://skyzt.bda.gov.cn/gisserver/wmsserver/shiliangditu_baisexi_wms", //图层地址
            params: {
                VERSION: "1.1.1",
                SRS: "EPSG:4326",
                SRS: "EPSG:3857",
                FORMAT: "image/png",
                TILED: true,
                LAYERS: "",
@@ -88,7 +90,7 @@
            url: 'https://skyzt.bda.gov.cn/gisserver/wmsserver/YZ_BJ60',
            params: {
                'VERSION': '1.1.1',
                'SRS': 'EPSG:4326',
                'SRS': 'EPSG:3857',
                'FORMAT': 'image/png',
                'TILED': true,
                "LAYERS": ''
@@ -106,7 +108,7 @@
            url: 'https://skyzt.bda.gov.cn/gisserver/wmsserver/YZ_BJ',//图层地址
            params: {
                'VERSION': '1.1.1',
                'SRS': 'EPSG:4326',
                'SRS': 'EPSG:3857',
                'FORMAT': 'image/png',
                'TILED': true,
                "LAYERS": ''
@@ -124,6 +126,7 @@
    }
    _GLOBAL.historyLayer = new ol.layer.Tile({
        source: new ol.source.XYZ({
            projection:"EPSG:3857",
            url: `https://skyzt.bda.gov.cn/yzAdapter/Vector/?request=1&year=${layerName}&type=Sate&level={z}&x={x}&y={y}`,
        })
    });