[GIS] Using GeoWebCache tiles with default geoserver url

geoservergeowebcachetiles

I am having GWC tiles access issue when integrated in another application using GWC url. //systemname:8080/geoserver/gwc/service/wms.

The error is given below.

I have created new grid set (Epsg:900913 with 128*128 tile size) with 21 customized map scales with respect to target application scales (which is using bing maps overlay)

400: X,Y values for the tile index were calculated to be {318.09479476312816, 690.2686949979606} which had to be rounded to {318, 690} and exceeds the threshold of 10%. Perhaps the client is using the wrong origin ?

I have seen some GeoServer users got this error, but not posted back final answers about how they have resolved this issue.

Possibility check:

When I have accessed the Geoserver url like //systemname:8080/geoserver/wms, everything works fine but with a very slow response, so i wanted to use Tiles with geoserver url with direct integration enabled with GeoServer WMS adding "&tiled=true" to the wms url.

Will it take gwc tiles & display in webmaps and how to confirm that it is accessing gwc tiles only?

Best Answer

The error happens because the tiles you're requesting are misaligned vs the cached grid, see user30184 comment about it. In order to use the GeoServer WMS endpoint and get cached tiles:

  • Go in "caching defaults" and enable "direct integration"
  • Add tiled=true and make sure your requests are aligned (otherwise you'll get a standard WMS response instead of a cached tile)
  • Check the HTTP response headers
    • If they do not contain any "gwc*" header then probabbly the direct integration did not enable, or the tiled=true parameter is missing
    • If you hit a cached tile you'll see a "geowebcache-cache-result:HIT" header
    • Otherwise you'll see a "geowebcache-cache-result:MISS" header, there is a "miss-reason" header telling you why, for example in the case of misaligned requests you'll get a "geowebcache-miss-reason: request does not align to grid(s) 'EPSG:4326'"
Related Question