Hi, I am attempting to query a scene layer using the latest Javascript API, but am getting the 'query-not-available' error.
I can confirm that I have a associated feature layer, although uploading the scene layer from ArcGIS Pro did not give me the option to associate the feature layer, even though I can see it uploaded the feature layer.
I have a feeling that the issue relates to the fact that I have an ArcGIS Online account, not a ArcGIS Enterprise account - can someone please confirm this.
It would be disappointing if that was the reason why I cannot query a scene layer.
Solved! Go to Solution.
Hi @sullivani
I found an ESRI JS sample that is doing something very similar to what you are doing, and I can see it is giving the same error message, even before doing any query/identify operation.
https://developers.arcgis.com/javascript/latest/sample-code/layers-scenelayerview-query/live/
My guess now is that there is something wrong either with the JS APIs latest release or something wrong with the published data.
However, by debugging the code, I can see that the "buffer-too-small" error is not stopping the application, and I am still able to do the identify and see the result in the browser console.
Regards
Ihab
Ok, so I have reuploaded the data to ArcGIS Online and retried the query, but it seems I have hit another issue, one which I have not been able to find any info on.
The following error is occurring when I either attempt to apply a query or a definition expression to the Scene layer. Weirdly, I can identify the features within a Scene layer i.e. if I click on the map, I get a popup showing the feature attributes.
Logger.js:5 [esri.views.3d.layers.i3s.I3SBinaryReader] Invalid attribute buffer size expected: 7676922352, actual: 25)
Does anyone know what could be causing these errors?
Hi @sullivani
There is SceneView and there is a FeatureLayer:
SceneView: provides the 3D display for the added feature layers
FeatureLayer: endpoint to a map service that may allow querying underlying data source
So, you may need to check first if the FeatureLayer has query endpoint available, check if you can browse to similar URL to this "{arcgis server url}/server/rest/services/Hosted/HV_ONE/FeatureServer/0/query"
This might be one thing that can clear things up.
Regards
Ihab
Hi @IhabHassan, I can confirm that there is a corresponding feature service and it is queryable. It seems the first issue I mentioned may have been resolved, but now the second issue is occurring, which I can't find any info on.
can you paste here the function/logic that you are trying to run which gives this error?
Its a simple query:
const query = sceneLayer.createQuery();
query.geometry = pointGeometry;
query.spatialRelationship = 'intersects';
query.returnGeometry = false;
sceneLayer.queryFeatures(query).then(featureSet => {
// Do something here
});
Actually it looks like I am getting the same error no matter if its a query, identify or definitionExpression.
So there is something clearly wrong with the service....but I have no idea what that could be as the scene layer and associated feature layer were uploaded via ArcGIS Pro as per the screenshot.
The issue may be related to the fact that there appears to be no attributes associated with the scene layer.
In addition to the previous error, I am also getting the following errors:
When I upload the layers to ArcGIS Online, I have checked that the upload includes associated attributes as per the screenshot:
Hi @sullivani
I found an ESRI JS sample that is doing something very similar to what you are doing, and I can see it is giving the same error message, even before doing any query/identify operation.
https://developers.arcgis.com/javascript/latest/sample-code/layers-scenelayerview-query/live/
My guess now is that there is something wrong either with the JS APIs latest release or something wrong with the published data.
However, by debugging the code, I can see that the "buffer-too-small" error is not stopping the application, and I am still able to do the identify and see the result in the browser console.
Regards
Ihab
That is the exact error I am getting, but unfortunately it does seem to stop the queries and definition expressions from working correctly.
I just had a look at the scene layer metadata and I cant see any info on the fields as per the screenshot. Is this normal, or should it show info on the associated fields?