Trouble loading tiledMapLayer - get 404 (Not Found)

771
0
04-29-2020 01:30 AM
Labels (1)
BarnabyBurman1
New Contributor

Hi,

 

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.

 

Here is the code I have to load the layer up:

 

      L.esri.tiledMapLayer({
          url: "https://myserver.com/arcgis_gp/rest/services/Projects/MyMap/MapServer",
          token: "myToken"
      }).addTo(map);‍‍‍‍

But nothing loads up. When I look in Chrome's developer tools and goto "Network" you can see it connects to the layer:

 

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.

 

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.

 

Thanks,

 

Barney

Tags (1)
0 Replies