AnsweredAssumed Answered

Getting WMTS content in Runtime 100.1

Question asked by Pscovis on Oct 11, 2017
Latest reply on Oct 13, 2017 by Pscovis

I am trying to consume WMTS content using ArcGIS Runtime 100.1, and can't get it to work when the server only supports KVP service mode.  There was a way in 10.2 to set the service mode on the layer object, but I don't see it in the 100.1 API.  

 

For example, a public service with this problem is:

http://opencache.statkart.no/gatekeeper/gk/gk.open_wmts?Version=1.0.0&service=wmts&request=getcapabilities

 

My code is something like this:

   WmtsService service = new WmtsService(_TiledUri);
   await service.LoadAsync();
   WmtsServiceInfo info = service.ServiceInfo;
   _TiledLayer = new WmtsLayer(info.LayerInfos.ToArray()[0]);

   _MapView.Map.Basemap.BaseLayers.Add(_TiledLayer);

   _TiledLayer.IsVisible = true;
   await _TiledLayer.LoadAsync();

 

The service metadata loads just fine.  However the layer itself does not display.  In fact, there is no further web traffic to fetch the tiles at all.

 

The GetCapabilities call on the above uri contains:

<ows:Operation name="GetTile">
<ows:DCP>
    <ows:HTTP>
       <ows:Get xlink:href="http://opencache.statkart.no/gatekeeper/gk/gk.open_wmts?">
          <ows:Constraint name="GetEncoding">
             <ows:AllowedValues>
                <ows:Value>KVP</ows:Value>
             </ows:AllowedValues>
          </ows:Constraint>
       </ows:Get>
    </ows:HTTP>
</ows:DCP>
</ows:Operation>

I suspect that since RESTful is not supported, this is the problem.  10.2 would allow you to set the service mode on the layer, and would also automatically try KVP if RESTful failed.  How can a similar thing be done in 100.1?

Outcomes