전단지 WMTS 잘못된 타일 순서
Aug 21 2020
Leaflet 맵에 WMTS 레이어를 추가했습니다. 타일이로드 중이지만 올바른 순서가 아닙니다. 이 문제에 직면 한 사람이 있습니까? 그렇다면 어떻게 극복 했습니까?

var map = new L.Map('viewerDiv', {
crs: L.CRS.EPSG3857
});
var url =
'http://services.arcgisonline.com/arcgis/rest/services/World_Topo_Map/MapServer/WMTS/tile/1.0.0/World_Topo_Map/default/default028mm/{z}/{x}/{y}.png';
var tilelayer = new L.tileLayer(url, {
tileSize: 256,
tms: true,
attribution: 'World Map'
});
map.addLayer(tilelayer);
map.setView(L.latLng(50, 8), 4);
http://services.arcgisonline.com/arcgis/rest/services/World_Topo_Map/MapServer/WMTS/1.0.0/WMTSCapabilities.xml
답변
TomazicM Aug 21 2020 at 21:45
타일셋 기능을 살펴보면 라인이 표시됩니다 <TileMatrixSet>GoogleMapsCompatible</TileMatrixSet>
. 이는 표준 Google지도 타일셋임을 의미합니다. @nmtoken가 지적한 바와 같이,이 방법 x
과 y
순서가 반대해야하며, 레이어 옵션이 있으므로이, 층 TMS되지 않는다는 것을 tms
알아 두어야합니다 :
var tilelayer = new L.tileLayer(
'http://services.arcgisonline.com/arcgis/rest/services/World_Topo_Map/MapServer/WMTS/tile/1.0.0/World_Topo_Map/default/default028mm/{z}/{y}/{x}.png',
{
tileSize: 256,
attribution: 'World Map'
}
);