<?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 Add WMTS Layers with API JS 3 in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-wmts-layers-with-api-js-3/m-p/1220671#M78951</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;As part of a GIS web application, using the ArcGIS API for JavaScript version 3.19, I would like to add a WMTS Layer.&lt;/P&gt;&lt;P&gt;For this, I copied the code provided by the documentation : documentation. &lt;A href="https://developers.arcgis.com/javascript/3/jssamples/layers_wmtslayer.html" target="_blank"&gt;https://developers.arcgis.com/javascript/3/jssamples/layers_wmtslayer.html&lt;/A&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;url = "https://wxs.ign.fr/parcellaire/geoportail/wmts?service=WMTS&amp;amp;REQUEST=GetCapabilities"
var layerInfo = new esri.layers.WMTSLayerInfo({
	identifier: "PCI",
});
layerIndex = 1;
var options = {
	layerInfo: layerInfo
};

layer = new esri.layers.WMTSLayer(url, options);
this.map.addLayer(layer, layerIndex);&lt;/LI-CODE&gt;&lt;P&gt;But the addition in the map does not go well. I get an error&amp;nbsp;&lt;/P&gt;&lt;P&gt;The WMTS capabilities XML is not valid.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="errorWMTSCapabilities.PNG" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/53323i0FB8A454AE36B433/image-size/medium?v=v2&amp;amp;px=400" role="button" title="errorWMTSCapabilities.PNG" alt="errorWMTSCapabilities.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Looking more closely at the GetCapabilities request, I observe that in the url, the end "/1.0.0/GetCapabilities.xml" seems to be extra.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="response.PNG" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/53324iF35B043FE184C369/image-size/medium?v=v2&amp;amp;px=400" role="button" title="response.PNG" alt="response.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Is there a way to not have this addition, to no longer encounter this problem?&lt;/P&gt;</description>
    <pubDate>Tue, 11 Oct 2022 13:17:38 GMT</pubDate>
    <dc:creator>ThibaultPetiet</dc:creator>
    <dc:date>2022-10-11T13:17:38Z</dc:date>
    <item>
      <title>Add WMTS Layers with API JS 3</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-wmts-layers-with-api-js-3/m-p/1220671#M78951</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;As part of a GIS web application, using the ArcGIS API for JavaScript version 3.19, I would like to add a WMTS Layer.&lt;/P&gt;&lt;P&gt;For this, I copied the code provided by the documentation : documentation. &lt;A href="https://developers.arcgis.com/javascript/3/jssamples/layers_wmtslayer.html" target="_blank"&gt;https://developers.arcgis.com/javascript/3/jssamples/layers_wmtslayer.html&lt;/A&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;url = "https://wxs.ign.fr/parcellaire/geoportail/wmts?service=WMTS&amp;amp;REQUEST=GetCapabilities"
var layerInfo = new esri.layers.WMTSLayerInfo({
	identifier: "PCI",
});
layerIndex = 1;
var options = {
	layerInfo: layerInfo
};

layer = new esri.layers.WMTSLayer(url, options);
this.map.addLayer(layer, layerIndex);&lt;/LI-CODE&gt;&lt;P&gt;But the addition in the map does not go well. I get an error&amp;nbsp;&lt;/P&gt;&lt;P&gt;The WMTS capabilities XML is not valid.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="errorWMTSCapabilities.PNG" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/53323i0FB8A454AE36B433/image-size/medium?v=v2&amp;amp;px=400" role="button" title="errorWMTSCapabilities.PNG" alt="errorWMTSCapabilities.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Looking more closely at the GetCapabilities request, I observe that in the url, the end "/1.0.0/GetCapabilities.xml" seems to be extra.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="response.PNG" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/53324iF35B043FE184C369/image-size/medium?v=v2&amp;amp;px=400" role="button" title="response.PNG" alt="response.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Is there a way to not have this addition, to no longer encounter this problem?&lt;/P&gt;</description>
      <pubDate>Tue, 11 Oct 2022 13:17:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-wmts-layers-with-api-js-3/m-p/1220671#M78951</guid>
      <dc:creator>ThibaultPetiet</dc:creator>
      <dc:date>2022-10-11T13:17:38Z</dc:date>
    </item>
    <item>
      <title>Re: Add WMTS Layers with API JS 3</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-wmts-layers-with-api-js-3/m-p/1220834#M78967</link>
      <description>&lt;P&gt;I think the first problem is that you shouldn't specify the query string in the URL as seen on line 1.&lt;/P&gt;&lt;P&gt;Instead, it should just be&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;url = "https://wxs.ign.fr/parcellaire/geoportail/wmts";&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You might also consider the documentation in the &lt;A href="https://developers.arcgis.com/javascript/3/jsapi/wmtslayer-amd.html#wmtslayer1" target="_self"&gt;constructor&lt;/A&gt; for the resourceInfo object.&amp;nbsp; When using WMTS layers, I've preferred specifying the necessary resourceInfo properties up front so that the GetCapabilities request can be bypassed entirely, and the application can just go immediately to rendering the tiles.&amp;nbsp; The necessary information to specify within resourceInfo can be gathered manually from the contents of the GetCapabilities response.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Oct 2022 18:39:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-wmts-layers-with-api-js-3/m-p/1220834#M78967</guid>
      <dc:creator>JoelBennett</dc:creator>
      <dc:date>2022-10-11T18:39:54Z</dc:date>
    </item>
    <item>
      <title>Re: Add WMTS Layers with API JS 3</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-wmts-layers-with-api-js-3/m-p/1221518#M79001</link>
      <description>&lt;P&gt;Thank you for your reply. I was able to add the resource info object. And I tried to rebuild TileInfo from the GetCapabilities data.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;url = "https://wxs.ign.fr/parcellaire/geoportail/wmts"

var tileInfo1 = new esri.layers.TileInfo({
	"dpi": 96,
	"spatialReference": this.map.spatialReference,
	"format": "image/png",
	"origin": {
		"x": 0.0000000000000000,
		"y": 12000000.0000000000000000,
	},
	"lods": lods,
});

var layerInfo = new esri.layers.WMTSLayerInfo({
	format: "image/png",
	fullExtent: this.map.extent,
	initialExtent : this.map.extent,
	identifier: "CADASTRALPARCELS.PARCELS",
	tileInfo: tileInfo1,
	tileMatrixSet: "LAMB93",
	title: "Parcelles cadastrales"
});

var resourceInfo = {
	version: "1.0.0",
	layerInfos: [layerInfo],
}

var options = {
	resourceInfo: resourceInfo,
	serviceMode: "KVP",
};

layer = new esri.layers.WMTSLayer(url, options);

this.map.addLayer(layer, layerIndex);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The layer object is well created but the addition to the map does not take place. Do you think it's a parameter issue or something else ?&lt;/P&gt;</description>
      <pubDate>Thu, 13 Oct 2022 13:57:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-wmts-layers-with-api-js-3/m-p/1221518#M79001</guid>
      <dc:creator>ThibaultPetiet</dc:creator>
      <dc:date>2022-10-13T13:57:37Z</dc:date>
    </item>
    <item>
      <title>Re: Add WMTS Layers with API JS 3</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-wmts-layers-with-api-js-3/m-p/1222584#M79049</link>
      <description>&lt;P&gt;I'm afraid my time available to help is very limited.&amp;nbsp; The best I might offer at this point is what I would try next if it were me.&amp;nbsp; I would avoid specifying parameters in the constructor for &lt;A href="https://developers.arcgis.com/javascript/3/jsapi/tileinfo-amd.html" target="_self"&gt;TileInfo&lt;/A&gt;&amp;nbsp;since it's not well documented (and maybe even the same for &lt;A href="https://developers.arcgis.com/javascript/3/jsapi/wmtslayerinfo-amd.html" target="_self"&gt;WMSTileInfo&lt;/A&gt;).&lt;/P&gt;&lt;P&gt;For example, instead of something like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;var tileInfo = new TileInfo({
	propertyName1: propertValue1,
	propertyName2: propertValue2
});&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;maybe something like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;var tileInfo = new TileInfo();
tileInfo.propertyName1 = tileInfo.propertyValue1;
tileInfo.propertyName2 = tileInfo.propertyValue2;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In doing that, be sure to use fully instantiated objects as well.&amp;nbsp; For example, when specifying the &lt;A href="https://developers.arcgis.com/javascript/3/jsapi/tileinfo-amd.html#origin" target="_self"&gt;origin&lt;/A&gt; property, I recommend using an &lt;A href="https://developers.arcgis.com/javascript/3/jsapi/point-amd.html" target="_self"&gt;Point&lt;/A&gt; object instance with its &lt;A href="https://developers.arcgis.com/javascript/3/jsapi/point-amd.html#spatialreference" target="_self"&gt;spatialReference&lt;/A&gt; specified.&amp;nbsp; The way you presently have it as an object literal, I'm not sure what the API would do, and since there's no spatialReference specified, it would default to WGS 84 (4326), but I can tell you're not trying to use that.&lt;/P&gt;&lt;P&gt;Another example, is that in the "format" property for TileInfo, &lt;A href="https://developers.arcgis.com/javascript/3/jsapi/tileinfo-amd.html#format" target="_self"&gt;the documentation for that property&lt;/A&gt; accepts the values "png8", "png24", "png32", and "jpg", but you have "image/png".&lt;/P&gt;&lt;P&gt;I hope that helps...I apologize for not being able to do more.&lt;/P&gt;</description>
      <pubDate>Mon, 17 Oct 2022 18:51:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-wmts-layers-with-api-js-3/m-p/1222584#M79049</guid>
      <dc:creator>JoelBennett</dc:creator>
      <dc:date>2022-10-17T18:51:07Z</dc:date>
    </item>
    <item>
      <title>Re: Add WMTS Layers with API JS 3</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-wmts-layers-with-api-js-3/m-p/1224290#M79080</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;It works like this :&lt;/P&gt;&lt;P&gt;&lt;A href="https://codepen.io/blaurancin/pen/abGeWZJ" target="_blank" rel="noopener"&gt;https://codepen.io/blaurancin/pen/abGeWZJ&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;html&amp;gt;

&amp;lt;head&amp;gt;
  &amp;lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8"&amp;gt;

  &amp;lt;meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"&amp;gt;
  &amp;lt;title&amp;gt;Add WMTS Layer&amp;lt;/title&amp;gt;

  &amp;lt;link rel="stylesheet" href="https://js.arcgis.com/3.41/esri/css/esri.css"&amp;gt;
  &amp;lt;style&amp;gt;
    html,
    body,
    #mapDiv {
      height: 100%;
      width: 100%;
      margin: 0;
      padding: 0;
    }
  &amp;lt;/style&amp;gt;
  &amp;lt;script src="https://js.arcgis.com/3.41/"&amp;gt;&amp;lt;/script&amp;gt;

  &amp;lt;script&amp;gt;
    require([
      "esri/map", "esri/layers/WMTSLayer", "esri/layers/WMTSLayerInfo",
      "esri/geometry/Extent", "esri/layers/TileInfo", "esri/SpatialReference", "esri/geometry/Point",
      "dojo/domReady!"
    ], function(
      Map, WMTSLayer, WMTSLayerInfo,
      Extent, TileInfo, SpatialReference, Point,
    ) {
      // parser.parse();
      var bounds = new Extent({
        "xmin": 14000,
        "ymin": 6000000,
        "xmax": 1200000,
        "ymax": 8100000,
        "spatialReference": {
          "wkid": 2154
        }
      });
      var map = new Map("mapDiv", {
        extent: bounds
      });
      map.spatialReference = new SpatialReference({
        wkid: 2154
      });
      // les paramètres tile matrix
      var tileInfo = new TileInfo({
        "dpi": 96,
        "format": "png",
        "spatialReference": new SpatialReference({
          "wkid": 2154
        }),
        "rows": 256,
        "cols": 256,
        "origin": {
          "x": 0,
          "y": 12000000
        },
        "lods": [{
          "level": "0",
          "scale": 373497230.5353357571875677,
          "resolution": 104579.2245498940
        }, {
          "level": "1",
          "scale": 186705472.6921089404495433,
          "resolution": 52277.5323537905
        }, {
          "level": "2",
          "scale": 93341025.2806978682347108,
          "resolution": 26135.4870785954
        }, {
          "level": "3",
          "scale": 46667469.2207142901243060,
          "resolution": 13066.8913818000
        }, {
          "level": "4",
          "scale": 23332959.3004053602435306,
          "resolution": 6533.2286041135
        }, {
          "level": "5",
          "scale": 11666284.0159382160591122,
          "resolution": 3266.5595244627
        }, {
          "level": "6",
          "scale": 5833092.8735621436167094,
          "resolution": 1633.2660045974
        }, {
          "level": "7",
          "scale": 2916534.1249500003143567,
          "resolution": 816.6295549860
        }, {
          "level": "8",
          "scale": 1458263.9809885714915936,
          "resolution": 408.3139146768
        }, {
          "level": "9",
          "scale": 729131.2196817857459905,
          "resolution": 204.1567415109
        }, {
          "level": "10",
          "scale": 364565.417082857155833,
          "resolution": 102.0783167832
        }, {
          "level": "11",
          "scale": 182282.6603450000154965,
          "resolution": 51.0391448966
        }, {
          "level": "12",
          "scale": 91141.3181225000130965,
          "resolution": 25.5195690743
        }, {
          "level": "13",
          "scale": 45570.6560485714301016,
          "resolution": 12.7597836936
        }, {
          "level": "14",
          "scale": 22785.3272714285733418,
          "resolution": 6.3798916360
        }]
      });
      var tileInfo2 = new TileInfo({
        dpi: 96,
        height: 256,
        lods: [{
            "level": 0,
            "resolution": 2000.0000000000002,
            "scale": 7559040
          },
          {
            "level": 1,
            "resolution": 1000.0000000000001,
            "scale": 3779520
          },
          {
            "level": 2,
            "resolution": 500.00000000000006,
            "scale": 1889760
          },
          {
            "level": 3,
            "resolution": 250.00000000000003,
            "scale": 944880
          },
          {
            "level": 4,
            "resolution": 100,
            "scale": 377952
          },
          {
            "level": 5,
            "resolution": 50,
            "scale": 188976
          },
          {
            "level": 6,
            "resolution": 25,
            "scale": 94488
          },
          {
            "level": 7,
            "resolution": 9.9999470832275,
            "scale": 37795
          },
          {
            "level": 8,
            "resolution": 5.000105833545001,
            "scale": 18898
          },
          {
            "level": 9,
            "resolution": 2.5000529167725003,
            "scale": 9449
          },
          {
            "level": 10,
            "resolution": 1.0001270002540006,
            "scale": 3780
          },
          {
            "level": 11,
            "resolution": 0.5000635001270003,
            "scale": 1890
          },
          {
            "level": 12,
            "resolution": 0.26458386250105836,
            "scale": 1000
          },
          {
            "level": 13,
            "resolution": 0.13229193125052918,
            "scale": 500
          },
          {
            "level": 14,
            "resolution": 0.06614596562526459,
            "scale": 225
          },
          {
            "level": 15,
            "resolution": 0.026458386250105836,
            "scale": 100
          },
          {
            "level": 16,
            "resolution": 0.013229193125052918,
            "scale": 50
          }
        ],
        origin: new Point(0.0000000000000000, 12000000.0000000000000000, new SpatialReference(2154)),
        spatialReference: new SpatialReference(2154),
        width: 256
      });
      var tileInfo3 = new TileInfo({
        dpi: 96,
        height: 256,
        lods: [{
          "level": 0,
          "scale": 395260061.290938,
          "resolution": 104579.22454989403
        }, {
          "level": 1,
          "scale": 197584374.25054678,
          "resolution": 52277.532353790506
        }, {
          "level": 2,
          "scale": 98779793.68288027,
          "resolution": 26135.487078595404
        }, {
          "level": 3,
          "scale": 49386676.08869292,
          "resolution": 13066.891381800004
        }, {
          "level": 4,
          "scale": 24692517.558854178,
          "resolution": 6533.228604113501
        }, {
          "level": 5,
          "scale": 12346051.74600076,
          "resolution": 3266.5595244627007
        }, {
          "level": 6,
          "scale": 6172973.875643717,
          "resolution": 1633.2660045974
        }, {
          "level": 7,
          "scale": 3086473.908608504,
          "resolution": 816.629554986
        }, {
          "level": 8,
          "scale": 1543233.6932666455,
          "resolution": 408.3139146768
        }, {
          "level": 9,
          "scale": 771616.0309073386,
          "resolution": 204.15674151090005
        }, {
          "level": 10,
          "scale": 385807.811464063,
          "resolution": 102.0783167832
        }, {
          "level": 11,
          "scale": 192903.8547273071,
          "resolution": 51.03914489660001
        }, {
          "level": 12,
          "scale": 96451.91461152758,
          "resolution": 25.519569074300005
        }, {
          "level": 13,
          "scale": 48225.954117543304,
          "resolution": 12.7597836936
        }, {
          "level": 14,
          "scale": 24112.976262047247,
          "resolution": 6.379891636000001
        }, {
          "level": 15,
          "scale": 12056.487931842521,
          "resolution": 3.1899457653
        }, {
          "level": 16,
          "scale": 6028.243916220473,
          "resolution": 1.5949728695
        }, {
          "level": 17,
          "scale": 3014.121945826772,
          "resolution": 0.7974864315000002
        }, {
          "level": 18,
          "scale": 1507.0609697007874,
          "resolution": 0.39874321490000003
        }, {
          "level": 19,
          "scale": 753.5304842834646,
          "resolution": 0.1993716073
        }],
        origin: new Point(0.0000000000000000, 12000000.0000000000000000, new SpatialReference(2154)),
        spatialReference: new SpatialReference(2154),
        width: 256
      });
      // console.log(tileInfo2);
      var tileExtent2 = new Extent(14000, 6000000, 1200000, 8100000, new SpatialReference({
        wkid: 2154
      }));
      var layerInfo2 = new WMTSLayerInfo({
        tileInfo: tileInfo,
        fullExtent: tileExtent2,
        initialExtent: tileExtent2,
        identifier: "CADASTRALPARCELS.PARCELS.L93",
        tileMatrixSet: "LAMB93",
        format: "png",
        style: "normal"
      });
      // console.log(layerInfo2);
      var resourceInfo = {
        version: "1.0.0",
        layerInfos: [layerInfo2],
        copyright: "IGN"
      };
      // console.log(resourceInfo);
      var options = {
        serviceMode: "KVP",
        resourceInfo: resourceInfo,
        layerInfo: layerInfo2
      };
      // console.log(options);
      var wmtsLayer = new WMTSLayer("https://wxs.ign.fr/lambert93/geoportail/wmts", options);
      console.log(wmtsLayer);
      map.addLayer(wmtsLayer);
      console.log("map.spatialReference", map.spatialReference)
      console.log("wmtsLayer", wmtsLayer)
      for (var i = 0; i &amp;lt; wmtsLayer.layerInfos[0].tileInfo.lods.length; i++) {
        console.log(i + ":");
        console.log("endTileCol:" + wmtsLayer.layerInfos[0].tileInfo.lods[i].endTileCol);
        console.log("endTileRow:" + wmtsLayer.layerInfos[0].tileInfo.lods[i].endTileRow);
        console.log("level:" + wmtsLayer.layerInfos[0].tileInfo.lods[i].level);
        console.log("resolution:" + wmtsLayer.layerInfos[0].tileInfo.lods[i].resolution);
        console.log("scale:" + wmtsLayer.layerInfos[0].tileInfo.lods[i].scale);
        console.log("startTileCol:" + wmtsLayer.layerInfos[0].tileInfo.lods[i].startTileCol);
        console.log("startTileRow:" + wmtsLayer.layerInfos[0].tileInfo.lods[i].startTileRow);
      }
    });
  &amp;lt;/script&amp;gt;

&amp;lt;body&amp;gt;
  &amp;lt;div id="mapDiv"&amp;gt;

  &amp;lt;/div&amp;gt;
&amp;lt;/body&amp;gt;

&amp;lt;/html&amp;gt;&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 21 Oct 2022 16:11:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-wmts-layers-with-api-js-3/m-p/1224290#M79080</guid>
      <dc:creator>Bertrand_Laurancin</dc:creator>
      <dc:date>2022-10-21T16:11:58Z</dc:date>
    </item>
    <item>
      <title>Re: Add WMTS Layers with API JS 3</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-wmts-layers-with-api-js-3/m-p/1224295#M79081</link>
      <description>&lt;P&gt;Or like this :&lt;/P&gt;&lt;P&gt;&lt;A href="https://codepen.io/blaurancin/pen/VwxNPgW" target="_blank"&gt;https://codepen.io/blaurancin/pen/VwxNPgW&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;html&amp;gt;

&amp;lt;head&amp;gt;
  &amp;lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8"&amp;gt;
  &amp;lt;meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"&amp;gt;
  &amp;lt;title&amp;gt;Add WMTS Layer&amp;lt;/title&amp;gt;
  &amp;lt;link rel="stylesheet" href="https://js.arcgis.com/3.41/esri/css/esri.css"&amp;gt;
  &amp;lt;style&amp;gt;
    html,
    body,
    #mapDiv {
      height: 100%;
      width: 100%;
      margin: 0;
      padding: 0;
    }
  &amp;lt;/style&amp;gt;
  &amp;lt;script src="https://js.arcgis.com/3.41/"&amp;gt;&amp;lt;/script&amp;gt;
  &amp;lt;script&amp;gt;
    require([
      "esri/map",
      "esri/layers/WMTSLayer",
      "esri/layers/WMTSLayerInfo",
      "esri/layers/TileInfo",
      "esri/SpatialReference",
      "esri/geometry/Extent",
      "esri/geometry/Point",
      "esri/config",
      "dojo/domReady!"
    ], function(
      Map, WMTSLayer, WMTSLayerInfo, TileInfo, SpatialReference, Extent, Point, esriConfig
    ) {
      esriConfig.defaults.io.corsEnabledServers.push("wxs.ign.fr", "codepen.io");
      const extent2154 = new Extent({
        "xmin": 14000,
        "ymin": 6000000,
        "xmax": 1200000,
        "ymax": 8100000,
        "spatialReference": {
          "wkid": 2154
        }
      });
      const map = new Map("mapDiv", {
        // basemap: "topo-vector",
        // center: [2.4641536, 48.8210432], //27.988056, 86.925
        zoom: 18,
        extent: extent2154
      });
      map.spatialReference = new SpatialReference({
        wkid: 2154
      });
      const tileInfo = new TileInfo({
        "dpi": 96,
        "format": "png",
        "spatialReference": new SpatialReference({
          "wkid": 2154
        }),
        "rows": 256,
        "cols": 256,
        "origin": {
          "x": 0,
          "y": 12000000
        },
        "lods": [{
          "level": "0",
          "scale": 373497230.5353357571875677,
          "resolution": 104579.2245498940
        }, {
          "level": "1",
          "scale": 186705472.6921089404495433,
          "resolution": 52277.5323537905
        }, {
          "level": "2",
          "scale": 93341025.2806978682347108,
          "resolution": 26135.4870785954
        }, {
          "level": "3",
          "scale": 46667469.2207142901243060,
          "resolution": 13066.8913818000
        }, {
          "level": "4",
          "scale": 23332959.3004053602435306,
          "resolution": 6533.2286041135
        }, {
          "level": "5",
          "scale": 11666284.0159382160591122,
          "resolution": 3266.5595244627
        }, {
          "level": "6",
          "scale": 5833092.8735621436167094,
          "resolution": 1633.2660045974
        }, {
          "level": "7",
          "scale": 2916534.1249500003143567,
          "resolution": 816.6295549860
        }, {
          "level": "8",
          "scale": 1458263.9809885714915936,
          "resolution": 408.3139146768
        }, {
          "level": "9",
          "scale": 729131.2196817857459905,
          "resolution": 204.1567415109
        }, {
          "level": "10",
          "scale": 364565.417082857155833,
          "resolution": 102.0783167832
        }, {
          "level": "11",
          "scale": 182282.6603450000154965,
          "resolution": 51.0391448966
        }, {
          "level": "12",
          "scale": 91141.3181225000130965,
          "resolution": 25.5195690743
        }, {
          "level": "13",
          "scale": 45570.6560485714301016,
          "resolution": 12.7597836936
        }, {
          "level": "14",
          "scale": 22785.3272714285733418,
          "resolution": 6.3798916360
        }]
      });
      // map._params.tileInfo = tileInfo3;
      // map.__tileInfo = tileInfo3;
      const url = "https://wxs.ign.fr/lambert93/geoportail/wmts";
      const layerInfo = new esri.layers.WMTSLayerInfo({
        tileInfo: tileInfo,
        identifier: "CADASTRALPARCELS.PARCELS.L93",
        tileMatrixSet: "LAMB93",
        format: "png",
        fullExtent: extent2154,
        initialExtent: extent2154,
        style: "normal"
      });
      const options = {
        serviceMode: "KVP",
        minScale: 100000000,
        maxScale: 200,
        layerInfo: layerInfo
      };
      const aLayers = [];
      // ESRI basemaps
      const strEsriUrl = "https://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer";
      const esriLayer = new esri.layers.ArcGISTiledMapServiceLayer(strEsriUrl);
      const ignWmtsLayer = new esri.layers.WMTSLayer(url, options);
      //
      console.log("esriLayer", esriLayer)
      console.log("ignWmtsLayer", ignWmtsLayer)
      console.log("map.spatialReference", map.spatialReference)
      // console.log("map", map)
      aLayers.push(ignWmtsLayer);
      // aLayers.push(esriLayer);
      map.addLayers(aLayers);
    });
  &amp;lt;/script&amp;gt;
&amp;lt;/head&amp;gt;

&amp;lt;body&amp;gt;
  &amp;lt;div id="mapDiv"&amp;gt;&amp;lt;/div&amp;gt;
&amp;lt;/body&amp;gt;

&amp;lt;/html&amp;gt;&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 21 Oct 2022 16:24:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-wmts-layers-with-api-js-3/m-p/1224295#M79081</guid>
      <dc:creator>Bertrand_Laurancin</dc:creator>
      <dc:date>2022-10-21T16:24:51Z</dc:date>
    </item>
    <item>
      <title>Re: Add WMTS Layers with API JS 3</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-wmts-layers-with-api-js-3/m-p/1225083#M79110</link>
      <description>&lt;P&gt;The scales are defined here :&lt;/P&gt;&lt;P&gt;&lt;A title="" href="https://geoservices.ign.fr/documentation/services/api-et-services-ogc/images-tuilees-wmts-ogc" target="_blank" rel="noopener noreferrer"&gt;https://geoservices.ign.fr/documentation/services/api-et-services-ogc/images-tuilees-wmts-ogc&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Oct 2022 09:00:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-wmts-layers-with-api-js-3/m-p/1225083#M79110</guid>
      <dc:creator>Bertrand_Laurancin</dc:creator>
      <dc:date>2022-10-25T09:00:59Z</dc:date>
    </item>
  </channel>
</rss>

