WMTS 服务
地理服务器:2.16
URL:http : //dejsoftware.com :8130/geoserver/gwc/service/wmts?Service=WMTS&Request=GetCapabilities
层:Orthofoto_CMD_Resumen_Rodeo_GeoTIFF
TileMatrixSet:grilla_3857
前端实现
传单 1.7.1
map = L.map('map',{
zoomControl: false
}).setView([4, -72], 6);
let baseMap = new L.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",
{
attribution:
'© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
});
baseMap.addTo(map);
cont url = 'http://dejsoftware.com:8130/geoserver/gwc/service/wmts';
const params = [
`service=WMTS`,
`request=GetTile`,
`version=1.0.0`,
`layer=cmd_cucuta:Orthofoto_CMD_Resumen_Rodeo_GeoTIFF`,
`style=raster`,
`Format=image/png`,
`tilematrixset=grilla_3857`,
`TileMatrix={z}`,
`TileRow={y}`,
`TileCol={x}`
].join("&");
let layerOrtho = new L.tileLayer(`${url}?${params}`);
layerOrtho.addTo(map);
结果
传单创建了许多这样的请求
在应显示图块的区域中,服务器返回
<?xml version="1.0" encoding="UTF-8"?>
<ExceptionReport version="1.1.0" xmlns="http://www.opengis.net/ows/1.1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/ows/1.1 http://geowebcache.org/schema/ows/1.1.0/owsExceptionReport.xsd">
<Exception exceptionCode="TileOutOfRange" locator="TILECOLUMN">
<ExceptionText>Column 39119 is out of range, min: 0 max:66</ExceptionText>
</Exception>
</ExceptionReport>