<?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 Trouble loading tiledMapLayer - get 404 (Not Found) in Open Source Mapping Libraries Ques.</title>
    <link>https://community.esri.com/t5/open-source-mapping-libraries-ques/trouble-loading-tiledmaplayer-get-404-not-found/m-p/770381#M160</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We have a tiled layer stored on ArcGIS Server 10.4.1. We use tokens which are at present hard-coded into the JavaScript or are sent to the Javascript via a C#/.NET session variable. This works fine for the same map window I have using ESRI's JavaScript API.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is the code I have to load the layer up:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE class="lia-code-sample line-numbers language-none" tabindex="0"&gt;&lt;CODE&gt;      L.esri.tiledMapLayer({
          url: "https://myserver.com/arcgis_gp/rest/services/Projects/MyMap/MapServer",
          token: "myToken"
      }).addTo(map);‍‍‍‍&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;But nothing loads up. When I look in Chrome's developer tools and goto "Network" you can see it connects to the layer:&lt;BR /&gt;&lt;IMG class="jive-emoji image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/490328_LeafletImageryTileError.png" border="0" alt="" /&gt;&lt;/P&gt;
&lt;P&gt;&lt;IMG class="jive-emoji jive-image image-2 j-img-original" src="https://community.esri.com/legacyfs/online/490329_LeafletImageryTileError2.png" border="0" alt="" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I initially tried this on a layer that was projected to British National Grid, but this layer is based projected to Web Mercator and have ensured that the standard ArcGIS Online caching type is used.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If anyone has any suggestions I would be grateful. At first I thought it was a "tokens" problem but a FeatureLayer seems to load up fine.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Barney&lt;/P&gt;</description>
    <pubDate>Mon, 28 Aug 2023 12:52:23 GMT</pubDate>
    <dc:creator>BarnabyBurman1</dc:creator>
    <dc:date>2023-08-28T12:52:23Z</dc:date>
    <item>
      <title>Trouble loading tiledMapLayer - get 404 (Not Found)</title>
      <link>https://community.esri.com/t5/open-source-mapping-libraries-ques/trouble-loading-tiledmaplayer-get-404-not-found/m-p/770381#M160</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We have a tiled layer stored on ArcGIS Server 10.4.1. We use tokens which are at present hard-coded into the JavaScript or are sent to the Javascript via a C#/.NET session variable. This works fine for the same map window I have using ESRI's JavaScript API.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is the code I have to load the layer up:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE class="lia-code-sample line-numbers language-none" tabindex="0"&gt;&lt;CODE&gt;      L.esri.tiledMapLayer({
          url: "https://myserver.com/arcgis_gp/rest/services/Projects/MyMap/MapServer",
          token: "myToken"
      }).addTo(map);‍‍‍‍&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;But nothing loads up. When I look in Chrome's developer tools and goto "Network" you can see it connects to the layer:&lt;BR /&gt;&lt;IMG class="jive-emoji image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/490328_LeafletImageryTileError.png" border="0" alt="" /&gt;&lt;/P&gt;
&lt;P&gt;&lt;IMG class="jive-emoji jive-image image-2 j-img-original" src="https://community.esri.com/legacyfs/online/490329_LeafletImageryTileError2.png" border="0" alt="" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I initially tried this on a layer that was projected to British National Grid, but this layer is based projected to Web Mercator and have ensured that the standard ArcGIS Online caching type is used.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If anyone has any suggestions I would be grateful. At first I thought it was a "tokens" problem but a FeatureLayer seems to load up fine.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Barney&lt;/P&gt;</description>
      <pubDate>Mon, 28 Aug 2023 12:52:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/open-source-mapping-libraries-ques/trouble-loading-tiledmaplayer-get-404-not-found/m-p/770381#M160</guid>
      <dc:creator>BarnabyBurman1</dc:creator>
      <dc:date>2023-08-28T12:52:23Z</dc:date>
    </item>
  </channel>
</rss>

