<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Getting WMTS content in Runtime 100.1 in .NET Maps SDK Questions</title>
    <link>https://community.esri.com/t5/net-maps-sdk-questions/getting-wmts-content-in-runtime-100-1/m-p/697453#M8835</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The problem was the spatial reference mismatch.  Thank you for your help, Matvei!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 13 Oct 2017 21:11:30 GMT</pubDate>
    <dc:creator>PhilScovis</dc:creator>
    <dc:date>2017-10-13T21:11:30Z</dc:date>
    <item>
      <title>Getting WMTS content in Runtime 100.1</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/getting-wmts-content-in-runtime-100-1/m-p/697449#M8831</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;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.&amp;nbsp; There was a way in 10.2 to set the service mode&amp;nbsp;on the layer object, but I don't see it in the 100.1 API.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, a public service with this problem is:&lt;/P&gt;&lt;P&gt;&lt;A href="http://opencache.statkart.no/gatekeeper/gk/gk.open_wmts?Version=1.0.0&amp;amp;service=wmts&amp;amp;request=getcapabilities"&gt;http://opencache.statkart.no/gatekeeper/gk/gk.open_wmts?Version=1.0.0&amp;amp;service=wmts&amp;amp;request=getcapabilities&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My code is something like this:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;WmtsService service = new WmtsService(_TiledUri);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;await service.LoadAsync();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;WmtsServiceInfo info = service.ServiceInfo;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;_TiledLayer = new WmtsLayer(info.LayerInfos.ToArray()[0]);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;_MapView.Map.Basemap.BaseLayers.Add(_TiledLayer);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;_TiledLayer.IsVisible = true;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;await _TiledLayer.LoadAsync();&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The service metadata loads just fine.&amp;nbsp; However the layer itself does not display.&amp;nbsp; In fact, there is no further web traffic to fetch the tiles at all.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The GetCapabilities call on the above uri contains:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;lt;ows:Operation name="GetTile"&amp;gt;&lt;BR /&gt; &amp;lt;ows:DCP&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;ows:HTTP&amp;gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;ows:Get xlink:href="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2Fopencache.statkart.no%2Fgatekeeper%2Fgk%2Fgk.open_wmts" rel="nofollow" target="_blank"&gt;http://opencache.statkart.no/gatekeeper/gk/gk.open_wmts&lt;/A&gt;&lt;SPAN&gt;?"&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;ows:Constraint name="GetEncoding"&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;ows:AllowedValues&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;ows:Value&amp;gt;KVP&amp;lt;/ows:Value&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/ows:AllowedValues&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/ows:Constraint&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/ows:Get&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/ows:HTTP&amp;gt;&lt;BR /&gt; &amp;lt;/ows:DCP&amp;gt;&lt;BR /&gt;&amp;lt;/ows:Operation&amp;gt;&lt;BR /&gt;&lt;BR /&gt;I suspect that since RESTful is not supported, this is the problem.&amp;nbsp; 10.2 would allow you to set the service mode on the layer, and would also automatically try KVP if RESTful failed.&amp;nbsp; How can a similar thing be done in 100.1?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Oct 2017 18:33:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/getting-wmts-content-in-runtime-100-1/m-p/697449#M8831</guid>
      <dc:creator>PhilScovis</dc:creator>
      <dc:date>2017-10-11T18:33:25Z</dc:date>
    </item>
    <item>
      <title>Re: Getting WMTS content in Runtime 100.1</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/getting-wmts-content-in-runtime-100-1/m-p/697450#M8832</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for taking time to report this! I was able to reproduce the issue with the information you provided.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The new API does not provide a way to switch between KVP and RESTful modes. However, the layer in your example fails to load for a different reason.&amp;nbsp;You are running into a known compatibility issue in&amp;nbsp;Runtime's new WMTS implementation: by default we're asking for image tiles in "&lt;A href="http://opencache.statkart.no/gatekeeper/gk/gk.open_wmts?TileCol=66&amp;amp;TileMatrix=EPSG%3A4326%3A6&amp;amp;TileMatrixSet=EPSG%3A4326&amp;amp;TileRow=10&amp;amp;format=image%2Fjpg&amp;amp;layer=matrikkel_bakgrunn&amp;amp;request=GetTile&amp;amp;service=WMTS&amp;amp;style=default&amp;amp;version=1.0.0" rel="nofollow noopener noreferrer" target="_blank"&gt;image/&lt;STRONG&gt;jpg&lt;/STRONG&gt;&lt;/A&gt;" format, but this particular server only&amp;nbsp;recognizes "&lt;A href="http://opencache.statkart.no/gatekeeper/gk/gk.open_wmts?TileCol=66&amp;amp;TileMatrix=EPSG%3A4326%3A6&amp;amp;TileMatrixSet=EPSG%3A4326&amp;amp;TileRow=10&amp;amp;format=image%2Fjpeg&amp;amp;layer=matrikkel_bakgrunn&amp;amp;request=GetTile&amp;amp;service=WMTS&amp;amp;style=default&amp;amp;version=1.0.0" rel="nofollow noopener noreferrer" target="_blank"&gt;image/&lt;STRONG&gt;jpeg&lt;/STRONG&gt;&lt;/A&gt;".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As a workaround, you can configure the layer to use a different supported tile format (such as PNG).&amp;nbsp;Here is the modified code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;WmtsService service = new WmtsService(_TiledUri);
await service.LoadAsync();
WmtsServiceInfo info = service.ServiceInfo;
_TiledLayer = new WmtsLayer(info.LayerInfos.ToArray()[0]&lt;STRONG&gt;, TileImageFormat.Png&lt;/STRONG&gt;);
_MapView.Map.Basemap.BaseLayers.Add(_TiledLayer);
_TiledLayer.IsVisible = true;
await _TiledLayer.LoadAsync();&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With this modification I was able to display the&amp;nbsp;layer from your example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/379812_2017-10-11_20-04-39_WmtsTest.png" style="width: 620px; height: 493px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We hope to fix this jpg-jpeg compatibility issue in a future update. But for now, I hope that this workaround solves your problem.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 16:49:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/getting-wmts-content-in-runtime-100-1/m-p/697450#M8832</guid>
      <dc:creator>MatveiStefarov</dc:creator>
      <dc:date>2021-12-12T16:49:02Z</dc:date>
    </item>
    <item>
      <title>Re: Getting WMTS content in Runtime 100.1</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/getting-wmts-content-in-runtime-100-1/m-p/697451#M8833</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for looking into this.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I modified my code to explicitly request PNG from the layer, and still, no imagery.&amp;nbsp; Again, there is no web traffic even attempting to get the tiles in any format.&amp;nbsp; The GetCapabilities works just fine, but no&amp;nbsp;subsequent requests are made when displaying the map control.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One thing I did notice was that the URI in the Service Info continues to have the REQUEST=GetCapabilities&amp;nbsp;query on it.&amp;nbsp; I don't know if this is messing it up, but all of my working examples assume this query by default, and all of my non-working examples require it.&amp;nbsp; (Omitting it causes a 400 error from this particular server).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I see that you have it working, with the lovely Norwegian coast displaying.&amp;nbsp; Are you putting in the full URI with the GetCapabilities into the WmtsService constructor?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Oct 2017 20:56:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/getting-wmts-content-in-runtime-100-1/m-p/697451#M8833</guid>
      <dc:creator>PhilScovis</dc:creator>
      <dc:date>2017-10-12T20:56:57Z</dc:date>
    </item>
    <item>
      <title>Re: Getting WMTS content in Runtime 100.1</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/getting-wmts-content-in-runtime-100-1/m-p/697452#M8834</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes,&amp;nbsp;WmtsService and WmtsLayer constructors expect a direct URL to the&amp;nbsp;GetCapabilities resource.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;WMTS servers&amp;nbsp;that support RESTful&amp;nbsp;mode will usually work with a simple URL, such as: &lt;A class="link-titled" href="http://sampleserver6.arcgisonline.com/arcgis/rest/services/WorldTimeZones/MapServer/WMTS" title="http://sampleserver6.arcgisonline.com/arcgis/rest/services/WorldTimeZones/MapServer/WMTS"&gt;http://sampleserver6.arcgisonline.com/arcgis/rest/services/WorldTimeZones/MapServer/WMTS&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;Most WMTS&amp;nbsp;servers (especially those that only support KVP mode) do need&amp;nbsp;to have the&amp;nbsp;parameters&amp;nbsp;specified. The exact URL I used was:&amp;nbsp;&lt;A class="link-titled" href="http://opencache.statkart.no/gatekeeper/gk/gk.open_wmts?Version=1.0.0&amp;amp;service=wmts&amp;amp;request=getcapabilities" title="http://opencache.statkart.no/gatekeeper/gk/gk.open_wmts?Version=1.0.0&amp;amp;service=wmts&amp;amp;request=getcapabilities"&gt;http://opencache.statkart.no/gatekeeper/gk/gk.open_wmts?Version=1.0.0&amp;amp;service=wmts&amp;amp;request=getcapabilities&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's a little self-contained WPF program that loads and displays the&amp;nbsp;Norwegian coast service:&amp;nbsp;&lt;A class="link-titled" href="https://gist.github.com/fragmer/2ca55c8e5a6ff94338ce5c7796abc0ce#file-miniwmtsprogram-cs" title="https://gist.github.com/fragmer/2ca55c8e5a6ff94338ce5c7796abc0ce#file-miniwmtsprogram-cs"&gt;MiniWmtsProgram.cs (GitHub)&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I thought of one more possible cause for your layer not displaying: spatial reference mismatch. You can detect&amp;nbsp;these kinds of problems&amp;nbsp;by listening for&amp;nbsp;&lt;A href="https://developers.arcgis.com/net/latest/wpf/api-reference/html/E_Esri_ArcGISRuntime_UI_Controls_GeoView_LayerViewStateChanged.htm" title="https://developers.arcgis.com/net/latest/wpf/api-reference/html/E_Esri_ArcGISRuntime_UI_Controls_GeoView_LayerViewStateChanged.htm"&gt;GeoView.LayerViewStateChanged Event &lt;/A&gt;— or simply by comparing&amp;nbsp;&lt;A class="" href="https://developers.arcgis.com/net/latest/wpf/api-reference/html/P_Esri_ArcGISRuntime_Mapping_Map_SpatialReference.htm" title="https://developers.arcgis.com/net/latest/wpf/api-reference/html/P_Esri_ArcGISRuntime_Mapping_Map_SpatialReference.htm"&gt;Map.SpatialReference Property&lt;/A&gt;&amp;nbsp;and&amp;nbsp;&lt;A class="" href="https://developers.arcgis.com/net/latest/wpf/api-reference/html/P_Esri_ArcGISRuntime_Mapping_Layer_SpatialReference.htm" title="https://developers.arcgis.com/net/latest/wpf/api-reference/html/P_Esri_ArcGISRuntime_Mapping_Layer_SpatialReference.htm"&gt;Layer.SpatialReference Property&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When a Map is loaded, the spatial reference of its first Layer is used&amp;nbsp;for the entire map (unless you've already specified a spatial reference in Map's constructor). When each Layer is loaded, it will&amp;nbsp;try to match its Map's spatial reference. But if a Layer is loaded before it's associated with a Map&amp;nbsp;— or&amp;nbsp;if it's configured to use a&amp;nbsp;service in a different spatial reference — then you'll end up with mismatched spatial references. WmtsLayer&amp;nbsp;cannot reproject tiles on the fly, so it will fail to draw.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If it turns out that you do have mismatched spatial references,&amp;nbsp;try calling LoadAsync() on your WmtsLayer &lt;EM&gt;after&lt;/EM&gt; adding it to the Map — or using a TileMatrixSet with a different spatial reference. For example, that Norwegian service&amp;nbsp;provides options for&amp;nbsp;EPSG:4326 (WGS84/Plate Carrée),&amp;nbsp;EPSG:3857 (WebMercator), and a few others.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know if this helps!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Oct 2017 20:38:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/getting-wmts-content-in-runtime-100-1/m-p/697452#M8834</guid>
      <dc:creator>MatveiStefarov</dc:creator>
      <dc:date>2017-10-13T20:38:29Z</dc:date>
    </item>
    <item>
      <title>Re: Getting WMTS content in Runtime 100.1</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/getting-wmts-content-in-runtime-100-1/m-p/697453#M8835</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The problem was the spatial reference mismatch.  Thank you for your help, Matvei!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Oct 2017 21:11:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/getting-wmts-content-in-runtime-100-1/m-p/697453#M8835</guid>
      <dc:creator>PhilScovis</dc:creator>
      <dc:date>2017-10-13T21:11:30Z</dc:date>
    </item>
  </channel>
</rss>

