From 290aa4c2bcd83c584e0b10cab76131c069bf64b7 Mon Sep 17 00:00:00 2001 From: 少年 <1392120328@qq.com> Date: 星期三, 13 三月 2024 10:44:25 +0800 Subject: [PATCH] youhua --- src/utils/tool.js | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/utils/tool.js b/src/utils/tool.js index a8e0345..ae201d3 100644 --- a/src/utils/tool.js +++ b/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}`, }) }); -- Gitblit v1.9.3