"Error While Fetching Tile" error trying to load public Feature Layer into WebMap

217
0
06-21-2021 01:09 AM
BrunoDiGiuseppe
New Contributor

Hello!

When I try to load a public Feature Layer hosted in ArcGIS using the JS library I get an error:

BrunoDiGiuseppe_0-1624261779069.png

My code is basically what the documentation suggests doing. I am using ES Modules to load the map in an Angular 12 application. The following is a snippet of what i have tried(which is just what the documentation suggests):

    const webmap = new Map({
      basemap: 'arcgis-dark-gray'
    });

    const view = new MapView({
      container: docuemnt.getElementById('container'),
      map: webmap,
      center: [-2.7319798957155292, 54.999668703716296],
      zoom: 4
    });

    const layerView = new FeatureLayer({
        url: {{FeatureLayerURL}}
    });
    
    webmap.add(layerView);

    

 

The Feature Layers shows correctly on the service definition and on the ArcGIS  Online Visualization tools.

 What seems weird is that the first request to retrieve the layer ({{url}}/FeatureServer/0) seems to  work

BrunoDiGiuseppe_1-1624262680892.png

But then it tries to query (I am not manually setting any queries so i'm lost)

BrunoDiGiuseppe_2-1624262806015.png

Does anyone have any pointers as to how to fix it? 

 

0 Kudos
0 Replies