<?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 Leaflet tms propertly equivalent in ESRI WebTiledLayer in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/leaflet-tms-propertly-equivalent-in-esri/m-p/451436#M41709</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For a dataset, Leaflet renders API tile service correctly when tms property is passed. But in ESRI Webtile layer do we have an equivalent option to pass this tms property or should I be using a different layer type to render api tile service?&amp;nbsp;&lt;/P&gt;&lt;P&gt;In leaflet, mapbox streets has been added as the first tile layer and then on top of it another tile service layer has been added.&lt;/P&gt;&lt;P&gt;MapBox streets API Zoom level , X &amp;amp; Y coordinates are - 18 / 65916 / 98537&lt;/P&gt;&lt;P&gt;Custom Tile API&amp;nbsp;&lt;SPAN&gt;Zoom level , X &amp;amp; Y coordinates are - 18 / 65916 / &lt;STRONG&gt;163606&amp;nbsp; (how does this y value changes on the above tile in leaflet but not in ESRI. This happens only when tms property is passed in leaflet)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 13 Feb 2018 09:09:09 GMT</pubDate>
    <dc:creator>RaghuM</dc:creator>
    <dc:date>2018-02-13T09:09:09Z</dc:date>
    <item>
      <title>Leaflet tms propertly equivalent in ESRI WebTiledLayer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/leaflet-tms-propertly-equivalent-in-esri/m-p/451436#M41709</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For a dataset, Leaflet renders API tile service correctly when tms property is passed. But in ESRI Webtile layer do we have an equivalent option to pass this tms property or should I be using a different layer type to render api tile service?&amp;nbsp;&lt;/P&gt;&lt;P&gt;In leaflet, mapbox streets has been added as the first tile layer and then on top of it another tile service layer has been added.&lt;/P&gt;&lt;P&gt;MapBox streets API Zoom level , X &amp;amp; Y coordinates are - 18 / 65916 / 98537&lt;/P&gt;&lt;P&gt;Custom Tile API&amp;nbsp;&lt;SPAN&gt;Zoom level , X &amp;amp; Y coordinates are - 18 / 65916 / &lt;STRONG&gt;163606&amp;nbsp; (how does this y value changes on the above tile in leaflet but not in ESRI. This happens only when tms property is passed in leaflet)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Feb 2018 09:09:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/leaflet-tms-propertly-equivalent-in-esri/m-p/451436#M41709</guid>
      <dc:creator>RaghuM</dc:creator>
      <dc:date>2018-02-13T09:09:09Z</dc:date>
    </item>
    <item>
      <title>Re: Leaflet tms propertly equivalent in ESRI WebTiledLayer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/leaflet-tms-propertly-equivalent-in-esri/m-p/451437#M41710</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Raghu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;What is the WKIDs of these two tiled map services?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Feb 2018 13:52:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/leaflet-tms-propertly-equivalent-in-esri/m-p/451437#M41710</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2018-02-13T13:52:50Z</dc:date>
    </item>
    <item>
      <title>Re: Leaflet tms propertly equivalent in ESRI WebTiledLayer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/leaflet-tms-propertly-equivalent-in-esri/m-p/451438#M41711</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for getting back Robert. We found the solution, this needs to be done by normalizing the coordinates and use it in getTileUrl&lt;/P&gt;&lt;P&gt;var getNormalizedCoord = function(coord, zoom) {&lt;BR /&gt; var y = coord.y;&lt;BR /&gt; var x = coord.x; &lt;BR /&gt; var tileRange = 1 &amp;lt;&amp;lt; zoom;&lt;BR /&gt; if (y &amp;lt; 0 || y &amp;gt;= tileRange) {&lt;BR /&gt; return null;&lt;BR /&gt; }&lt;BR /&gt; if (x &amp;lt; 0 || x &amp;gt;= tileRange) {&lt;BR /&gt; x = (x % tileRange + tileRange) % tileRange;&lt;BR /&gt; }&amp;nbsp;&lt;BR /&gt; return {x: x, y: y};&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;yourLayer.getTileUrl = function(l,r,c){ &lt;BR /&gt; var normalizedCoord = getNormalizedCoord({x:c,y:r}, l);&lt;BR /&gt; if (!normalizedCoord) {&lt;BR /&gt; return null;&lt;BR /&gt; }&lt;BR /&gt; var bound = Math.pow(2, l); &lt;BR /&gt; var url = this.url.replace('${col}', normalizedCoord.x)&lt;BR /&gt; url = url.replace('${row}', (bound - normalizedCoord.y -1))&lt;BR /&gt; url = url.replace('${level}', l) &lt;BR /&gt; return url;&lt;BR /&gt; }&lt;BR /&gt; map.addLayer(&lt;SPAN&gt;yourLayer&lt;/SPAN&gt;);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Feb 2018 15:01:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/leaflet-tms-propertly-equivalent-in-esri/m-p/451438#M41711</guid>
      <dc:creator>RaghuM</dc:creator>
      <dc:date>2018-02-13T15:01:07Z</dc:date>
    </item>
  </channel>
</rss>

