Print Service issue on WMTS with multiple tilematrixsets

12-04-2015 08:06 AM
New Contributor III


We have a custom print service hosted on ArcGIS Server 10.3.1 that is being used to print an external (and non-ESRI) WMTS.

This has worked fine up until today when a new tilematrixset was added for some of the layers we use, which provides tiles in a different tiling scheme and projection.  Following this addition the print service no longer printed maps correctly, as it was ignoring the tileMatrixSet given in the exportwebmap object, and instead selecting the new tilematrixset from the service.

The Web_Map_As_JSON submitted to the server is below (I've removed the service URL);


The print service accepts this however it retrieves tiles from the other tileMatrixSet for the layer - disregarding the property in the JSON web map.  I've confirmed this capturing traffic from ArcGIS Server.

Altering the capabilities document to re-order the tilematrixsetlinks for the layer and put the desired matrixset first resolves the problem - it seems the print service uses the first tilematrixset specified for the layer when requesting tiles rather than that specified in the web map.  I've attached an example below:

      <ows:Title>OS Background Stack</ows:Title>
        <ows:LowerCorner>-10.4455381418 54.444252928</ows:LowerCorner>
        <ows:UpperCorner>-0.248994254178 61.2560481198</ows:UpperCorner>
          <TileMatrixSetLink> <!-- moving the desired tile set to be first causes it to be used by the print service -->
      <ResourceURL format="image/png" resourceType="tile"         template="http://WMTS_URL/wmts/os_background_bng_colour/{style}/{TileMatrixSet}/{TileMatrix}/{TileCol}/{TileRow}.png"/>

Of course this fix will only work if you just need one tile set, and the services are stable enough for you to hand craft a local capabilities document.  Hopefully ESRI can update the print services to correctly use the matrix specified.


0 Kudos
0 Replies