Geoserver WMTS service in leaflet dont display tiles, columns is out of range

1.3k views Asked by At

WMTS Service

Geoserver: 2.16
URL: http://dejsoftware.com:8130/geoserver/gwc/service/wmts?Service=WMTS&Request=GetCapabilities
Layer: Orthofoto_CMD_Resumen_Rodeo_GeoTIFF
TileMatrixSet: grilla_3857

Front-end implementation

leaftlet 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:
          '&copy; <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);

Results

Tile Zone
Browser request
Geoserver Response

Leaflet create many request like this

http://dejsoftware.com:8130/geoserver/gwc/service/wmts?service=WMTS&request=GetTile&version=1.0.0&layer=cmd_cucuta:Orthofoto_CMD_Resumen_Rodeo_GeoTIFF&style=raster&Format=image/jpeg&tilematrixset=grilla_3857&TileMatrix=17&TileRow=68416&TileCol=39119

In the zone where the tiles should be display the server returns

<?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>
0

There are 0 answers