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
Solved! Go to Solution.
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(...)".
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(...)".