Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <title>Query All Features</title>
  
  <script src="https://unpkg.com/@esri/arcgis-rest-request@4"></script>
  <script src="https://unpkg.com/@esri/arcgis-rest-feature-service@4"></script>
  <script src="https://unpkg.com/query-all-features"></script>
</head>
<body>
  <script>
    queryAllFeatures.queryAllFeatures({
      url: "https://sampleserver6.arcgisonline.com/arcgis/rest/services/USA/MapServer/0"
    }).then((results) => {
      console.log('results', results);
      document.body.innerHTML = `${results.features.length} results: <br /><br /><pre>` +  JSON.stringify(results, null, 4) + '</pre>';
    }, (err) => {
      console.log('err', err);
      document.body.innerHTML = err;
    });
  </script>
</body>
</html>
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
gavrehpro
0viewers