使用产品:SuperMap iServer 9D(2019) 操作系统:win10 x64
数据类型: wmts 瓦片
问题详细描述:地图放大到4级,再放大,位置发生偏移 地图从北京偏移到哈萨克斯坦了
问题重现步骤:
1.地图初始zoom 0
2.点击放大控件到第4级
再放大
<!--********************************************************************
* Copyright© 2000 - 2018 SuperMap Software Co.Ltd. All rights reserved.
*********************************************************************-->
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title data-i18n="resources.title_wmtsLayer"></title>
<script type="text/javascript" src="../js/include-web.js"></script>
<link rel="stylesheet" href="./leaflet/leaflet.css">
<script src="./leaflet/leaflet.js"></script>
<link rel="stylesheet" href="supermap_iclient_910/dist/leaflet/iclient9-leaflet.css">
<script src="supermap_iclient_910/dist/leaflet/iclient9-leaflet.js"></script>
</head>
<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%;position: absolute;top: 0;">
<div id="map" style="margin:0 auto;width: 100%;height: 100%"></div>
<script type="text/javascript" src="../../dist/leaflet/include-leaflet.js"></script>
<script type="text/javascript">
var res = [];
for (var i = 0; i < 22; i++) {
res.push(165664.43905455674 / (Math.pow(2, i)));
}
var origin = [29.38, 120.28];
var map = L.map('map', {
center: [0, 0],
maxZoom: 20,
zoom:0,
crs: new L.Proj.CRS("WGS84",
{
origin: [-2.0037508342789244E7, 2.0037508342789244E7],
resolutions: res,
})
});
L.supermap.wmtsLayer("http://114.251.10.240:9999/iserver/services/map-tianditu/wmts100", {
layer: "矢量底图_经纬度",
style: "default",
tilematrixSet: "GlobalCRS84Scale_矢量底图_经纬度",
format: "image/png",
isBaseLayer:true
}).addTo(map);
var layerLabel=L.supermap.wmtsLayer("http://114.251.10.240:9999/iserver/services/map-tianditu/wmts100", {
layer: "矢量中文注记_经纬度",
style: "default",
tilematrixSet: "GlobalCRS84Scale_矢量中文注记_经纬度",
format: "image/png",
});
map.addLayer(layerLabel)
</script>
</body>
</html>
地图的能力描述:http://114.251.10.240:9999/iserver/services/map-tianditu/wmts100