Mars Trek

WMTS Layer services

Map layers are available through OGC RESTful WMTS protocol. To find more information about OGC WMTS, goto Simple javascript example using ESRI javascript client library is included for each services. Click 'Preview' to run it.

To access these tiles through WMTS client library, depending on the WMTS client library, you only need to provide WMTS Endpoint and full extent or bbox information. However, if you want to access tiles without using WMTS client library, the following information would give you some help.

Here is basic information about how to request image tiles from RESTful WMTS service. The basic URL template is as follow.

 http://{host}/catalog/{product name}/1.0.0/{Style}/{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}.png

* Some service is .png some are .jpg. Please look at WMTS GetCapabilities ResourcesURL element to find out what extention to use.

In order to fill in the varialbes in the template URL, you need to parse WMTS GetCapabilities XML. GetCapabilities XML can be found for each products below.

From the WMTS GetCapabilities XML, find ows:Identifier element inside Style element. This value replaces {Style}. ows:Identifier element inside TileMatrixSet element replaces {TileMatrixSet}. Inside TileMatrixSet element in WMTS Capabilities, there is a list of TileMatrix. This is the Zoom level. Replace {TileMatrix} with the ows:Identifier found in TileMatrix element.

{TileRow} and {TileCol} are row and col index for tiles. The first zoom level for product that covers whole globe will have two columns and one row so the URLs are as follow:

The second zoom level has four columns and two rows and so on.

If the image tile is missing, that means there is no data coverage in that area. You can also use coverage Bbox to calcuate the coverage before request image tiles.