使用leaflet加载wmts服务的地图,地图不显示。代码如下:
var scalesArr = [
5.575667832355465E8,
2.7878339161777323E8,
1.3939169580888662E8,
6.969584790444331E7,
3.4847923952221654E7,
1.7423961976110827E7,
8711980.988055414,
4355990.494027707,
2177995.2470138534,
1088997.6235069267,
544498.8117534633,
272249.4058767317,
136124.70293836584,
68062.35146918292,
34031.17573459146,
17015.58786729573,
8507.793933647865
]
var map = L.map('map', {
center: [116.49 , 39.85],
maxZoom: 16,
zoom: 0,
crs: new L.Proj.CRS("EPSG:4326",
{
origin: [-179.1909461364443,85.13041252989518 ],
scaleDenominators: scalesArr,
})
});
L.supermap.wmtsLayer("http://172.16.15.252:8090/iserver/services/map-beijing-2/wmts100",
{
layer: "beijingMap_Blue",
style: "default",
tilematrixSet: "Custom_beijingMap_Blue",
format: "image/png",
// requestEncoding: 'REST',
transparent : true
}
).addTo(map);
参数来源说明如下图图片:
L.Proj.CRS中origin的参数是经纬度坐标系下地图的左上角值
报错信息:
从报错信息看应该是L.Proj.CRS("EPSG:4326")系下原点origin错误,但不知道如何获取才对
wmts服务文件地址:
链接:https://pan.baidu.com/s/16eYECDcPhdc6F8HZ9AlQbg
提取码:im0v