Can I query a Scene Layer with Arcgis REST JS?

618
1
Jump to solution
06-13-2022 06:15 AM
jeroenverdonschot
New Contributor

Hi,

I'm trying to query this layer: https://tiles.arcgis.com/tiles/nSZVuSZjHpEZZbRo/arcgis/rest/services/3D_Bomen_WGS/SceneServer/layers...

It is a Scene Layer. But somehow I don't get any results when I use the JS API.

 

 

const apiKey = "AAPK15f3dab70322487db19968e34d3****************************"; // altered for safety
const url =  "https://tiles.arcgis.com/tiles/nSZVuSZjHpEZZbRo/arcgis/rest/services/3D_Bomen_WGS/SceneServer/layers/0";
 
const { ApiKeyManager } = require("@esri/arcgis-rest-request");
const { queryFeatures } = require("@esri/arcgis-rest-feature-service");

const authentication = ApiKeyManager.fromKey(apiKey);

queryFeatures({
  url,
  where: "OBJECTID = 9698479",
  resultRecordCount: 1,
  authentication
}).then((response) => {
  console.log(response.features);
});

 

 

Please help I don't know what I'm doing wrong.

Thanks for your help

 

 

 

0 Kudos
1 Solution

Accepted Solutions
GavinRehkemper
Esri Contributor

Hi, a vector tile layer is not able to be queried like Feature Layers. You probably want to publish the data as a Feature Layer then you can use "queryFeatures(...)".

View solution in original post

1 Reply
GavinRehkemper
Esri Contributor

Hi, a vector tile layer is not able to be queried like Feature Layers. You probably want to publish the data as a Feature Layer then you can use "queryFeatures(...)".