0

WMTS 服务

地理服务器:2.16
URLhttp : //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:
          '&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);

结果

瓦片区
浏览器请求
地理服务器响应

传单创建了许多这样的请求

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=93

在应显示图块的区域中,服务器返回

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

0 回答 0