AnsweredAssumed Answered

Unsupported query error in a FeatureLayer created with client side graphics in SceneView

Question asked by al3xtouch on Jun 22, 2016
Latest reply on Jun 24, 2016 by KEkenes-esristaff


The sample code here: Create a FeatureLayer with client side graphics | ArcGIS API for JavaScript 4.0 shows how to create a featurelayer with client side geojson data. It works fine if I click somewhere on the map that  does not have any feature. It will not do anything, which is reasonable.

 

However, if I change MapView into SceneView in this sample (sample code attached, you can copy and paste into the sandbox),  when I click somewhere on the globe that does not have any feature, the console will show me an error, and it has an message "Unsupported query" (see image below)err.jpg

 

I'm wondering how to fix it.

 

Also, if you look closely on the SceneView globe, you will notice that each feature (point circle) has a white dot in the center (see image below)

Untitled.jpg

 

I fixed this by adding

"elevationInfo: {

        mode: "on-the-ground"}"

in the FeatureLayer. This code can be found in the attachment "sampleCodeWelevationinfo.txt". But the problem is, after adding it, the popup does not work any more and wherever you click on the globe, it will show the same error as in the first image.

 

Do you know how to fix these problems? thanks!

 

btw, in this sample code: ArcGIS API for JavaScript Sandbox  , change "onTheGround" to "on-the-ground", it has no problem for the popup and if you click somewhere on the globe that does not have any feature, it will tell you no feature is found. The only different between this one and the problem one is that in this one the FeatureLayer reference a service URL while the problem one uses an array of client-side graphics.

 

I would like to use my own data, how to fix it?

Outcomes