<?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 WMTSLayer WKID in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/wmtslayer-wkid/m-p/580194#M54132</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying a to add support of reading OGC services to a solution we are building, so the first guess is to use &amp;nbsp;"esri/layers/WMTSLayer" class. First thing noticed is that the service is not an actual service, rather it is a directory of image/tiled&amp;nbsp;services.&amp;nbsp;&lt;BR /&gt;I encountered the following issues:&lt;BR /&gt;- the base map we are using "World_Imagery" has "&lt;SPAN style="color: #000000; background-color: #ffffff; font-size: 14.4px;"&gt;102100&lt;/SPAN&gt;" spatial reference &lt;SPAN&gt;wkid&lt;/SPAN&gt;, while the #OGC service we are testing to use has spatial ref wkid "4326", which caused lot of JS errors from within the WMTSLayer api class&lt;/P&gt;&lt;P&gt;- i&amp;nbsp;changed the scenario to use base map and OGC service with the same &lt;SPAN&gt;wkid, and the error disappeared and i can see both services on the map-view&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Now I want to force limiting adding OGC services to the app unless the service has wkid identical to the base map's.&amp;nbsp;The problem is that the WMTSLayer object that got filled after the layer is loaded has always wkid value of "4326", although I am using the service&amp;nbsp;of&amp;nbsp;wkid "&lt;SPAN style="background-color: #ffffff;"&gt;3857&lt;/SPAN&gt;" projection. Is there a way to get the correct WKID of the #WMTSLayer object?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 30 Oct 2017 03:38:07 GMT</pubDate>
    <dc:creator>AdamMaps84</dc:creator>
    <dc:date>2017-10-30T03:38:07Z</dc:date>
    <item>
      <title>WMTSLayer WKID</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/wmtslayer-wkid/m-p/580194#M54132</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying a to add support of reading OGC services to a solution we are building, so the first guess is to use &amp;nbsp;"esri/layers/WMTSLayer" class. First thing noticed is that the service is not an actual service, rather it is a directory of image/tiled&amp;nbsp;services.&amp;nbsp;&lt;BR /&gt;I encountered the following issues:&lt;BR /&gt;- the base map we are using "World_Imagery" has "&lt;SPAN style="color: #000000; background-color: #ffffff; font-size: 14.4px;"&gt;102100&lt;/SPAN&gt;" spatial reference &lt;SPAN&gt;wkid&lt;/SPAN&gt;, while the #OGC service we are testing to use has spatial ref wkid "4326", which caused lot of JS errors from within the WMTSLayer api class&lt;/P&gt;&lt;P&gt;- i&amp;nbsp;changed the scenario to use base map and OGC service with the same &lt;SPAN&gt;wkid, and the error disappeared and i can see both services on the map-view&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Now I want to force limiting adding OGC services to the app unless the service has wkid identical to the base map's.&amp;nbsp;The problem is that the WMTSLayer object that got filled after the layer is loaded has always wkid value of "4326", although I am using the service&amp;nbsp;of&amp;nbsp;wkid "&lt;SPAN style="background-color: #ffffff;"&gt;3857&lt;/SPAN&gt;" projection. Is there a way to get the correct WKID of the #WMTSLayer object?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Oct 2017 03:38:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/wmtslayer-wkid/m-p/580194#M54132</guid>
      <dc:creator>AdamMaps84</dc:creator>
      <dc:date>2017-10-30T03:38:07Z</dc:date>
    </item>
    <item>
      <title>Re: WMTSLayer WKID</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/wmtslayer-wkid/m-p/580195#M54133</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I believe you should be able to do a GetCapabilities operation on the WMTS service just like you can with a WMS service. If so, just get that data ahead of time before creating the layer in the ArcGIS API. You could then check the returned XML for the appropriate projection data. Spatial references are usually prefixed with "EPSG".&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Nov 2017 21:57:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/wmtslayer-wkid/m-p/580195#M54133</guid>
      <dc:creator>DavidBlanchard</dc:creator>
      <dc:date>2017-11-15T21:57:34Z</dc:date>
    </item>
    <item>
      <title>Re: WMTSLayer WKID</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/wmtslayer-wkid/m-p/1550877#M85931</link>
      <description>&lt;P&gt;You can use esriRequest to get all the layers from capabilities meta.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;require([
    "esri/request"
], function(esriRequest) {
    const capabilitiesUrl = "https://svc.someservice.com/Image/FBA1F622-5FF3-56B2-CBB2-777AD52F0EC9/wmts?request=GetCapabilities";

    // Fetch the WMTS capabilities
    esriRequest(capabilitiesUrl, { responseType: "text" })
        .then(function(response) {
            // Parse the XML response
            const parser = new DOMParser();
            const xmlDoc = parser.parseFromString(response.data, "application/xml");
            const layers = xmlDoc.getElementsByTagName("Layer");

            // Loop through each layer and extract details
            for (let i = 0; i &amp;lt; layers.length; i++) {
                const identifier = layers[i].getElementsByTagName("ows:Identifier")[0]?.textContent || "N/A";
                const title = layers[i].getElementsByTagName("ows:Title")[0]?.textContent || "N/A";
                const abstractText = layers[i].getElementsByTagName("ows:Abstract")[0]?.textContent || "N/A";

                console.log(`Layer Identifier: ${identifier}, Title: ${title}, Abstract: ${abstractText}`);
            }
        })
        .catch(function(err) {
            console.error("Error fetching WMTS capabilities: ", err);
        });
});&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Oct 2024 14:04:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/wmtslayer-wkid/m-p/1550877#M85931</guid>
      <dc:creator>GregoryBologna</dc:creator>
      <dc:date>2024-10-22T14:04:04Z</dc:date>
    </item>
  </channel>
</rss>

