I use ArcGIS .Net SDK 10.2.7 and my application has a mapview which can display the layers added by the user.
The above WMTS previously supported Rest and was working fine. They have changed it to support KVP only and now it's not working as expected. This is my code.
var base_layer = new WmtsLayer(new Uri("https://data.linz.govt.nz/services;key=5169bef47e224d43a935e4283e2d57a6/wmts/1.0.0/set/4769/WMTSCapa... "));
base_layer.DisplayName = "wmts_layer";
base_layer.Layer = "set-4769";
base_layer.ImageFormat = "image/png";
base_layer.Style = "style=2087";
base_layer.ServiceMode = ServiceMode.Kvp;
I tried the url
The layer gets initialized without errors. But I can't see the tiles on the map.
This code worked fine previously when it supported Rest. The only difference was Service mode was set to Rest instead of KVP.
I don't think KVP was ever that well tested, and I've seen varying implementations of WMTS that can trip up a client.
10.2.7 is out of support at this point, but 100.x release has pretty good WMTS support.
If all else fails, the WMTS layer for 10.2.x is actually open source, so you could grab that and step through it and see if it just needs a tweak or two:
Thanks for your prompt reply.
I tried the code. It needs Esri.ArcGIS.Client.dll. Unfortunately I don't have it anymore as 'Esri.ArcGISRuntime.dll' was sufficient for our recent work.
I cannot download it anymore as 'ArcGIS Runtime SDK for WPF' is labelled as retired.
Is there a way to get the above dll?
Oops I'm sorry. That source code was for a much much older API (and not 10.2.x). Just ignore what I wrote.
Your best bet is to upgrade your app to 100.7 if possible, as that should give you the best OGC support.