问题描述:地图坐标系EPSG Code:4544,用iServer发布成WMTS100服务后,用idesktop打开web型数据源,发现地图一片空白,客户端通过L.supermap.wmtsLayer也加载不出来,会报错,请问该如何解决?
你好,我制作的地图坐标系是EPSG4544,我创建map对象定义坐标系为EPSG3857时,加载该WMTS地图可见,但我把L.map的crs改成EPSG:4544时,WMTS加载不正确
proj4.defs("EPSG:4544","+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"); var crs = L.Proj.CRS("EPSG:4544",{ origin: [103.6,25.6], //原点,即左上角点坐标 scaleDenominators: [1000000,500000,250000,100000,50000,25000,10000,5000,2500,1000,500] });
var map = L.map('map', { center: [25.3, 103.8], maxZoom: 18, zoom: 0, crs:L.CRS.EPSG3857 }); var wmtslayer = L.supermap.wmtsLayer("http://zhanglihong:8090/iserver/services/map-tdly_530302/wmts100", { layer: "JBNTBHPK", style: "default", tilematrixSet: "Custom_JBNTBHPK", format: "image/png", noWrap:true } ).addTo(map);
两个地图叠加不显示可能是因为坐标系不同,另分辨率计算方式请参考这篇文章https://wenku.baidu.com/view/0bb5ad757fd5360cba1adb1d.html