The Geoserver at Open Development Cambodia was configured to serve TMS tiles but it didn’t seem to work, here were the steps taken to debug and resolve the issue.The starting point was at the TMS endpoint (http://geoserver.opendevelopmentcambodia.net:8181/geoserver/gwc/service/tms/1.0.0/) which gave information about all the layers that were present in the server, the first task was to find a layer that is confirmed to work so browsing through an ideal candidate is “cambodia_geo_relief“. Next step is to plug the WMS layer into JOSM just to see what happens.
Well and good. Next, TMS is not handled natively in Geoserver but rather by an extension called Geo Web Cache which the document specifies exposes URLs in the format
http://servername/contextpath/service/tms/1.0.0/layername/z/x/y.formatExtension or http://servername/contextpath/service/tms/1.0.0/layername@grisetId@formatExtension/z/x/y.formatExtension
http://geoserver.opendevelopmentcambodia.net:8181/geoserver/gwc/service/tms/1.0.0/based_maps%3Acambodia_geo_relief@EPSG%3A900913@png/{zoom}/{x}/{y}.png
Which doesn’t quite work, now there are issues in regards to TMS and the Y axis so one way to resolve this is to figure out if the problem is in the URL scheme or not. One tile server that works for sure is demo.opengeo.org which serves up the Blue Marble with the following result:
So there is an issue with the Y axis after all, this was resolved by using an /{zoom}/{x}/{-y}.jpg URL scheme, with the following result:
Next, let’s use the same scheme for our current TMS tiles:
So there is a problem with the Geocache instance on the current server. One thing that can be done is to try clearing the resource cache:
That seems to solve the problem of the blank TMS tiles.
Copyright © 2015. All Rights Reserved.