Select to view content in your preferred language

JS API Scene Layer: queryFeatures() throw 'scenelayer:query-not-available' error

1846
4
11-02-2016 08:27 PM
sreeku
by
Deactivated User

Hi Everyone,

I have an issue with Scene Layer queryFeatures() method. This method throws scenelayer:query-not-available error when I try to query Scene Layer features. I understand from documentation, it may happens if there is no companion Feature layer for Scene Layer. But Verified my arcgis portal and have all 3 files with same name (Scene Layer, Feaure Layer & Service definition).

So my question is how companion Feature layer is different from Feature Layer linked to Scene Layer? Any comments. Apreciate you views. If anyone sucessfully queried scene layer, plz reply with code snipet. Thanks in Advance.

Great Day

Sree

Tags (1)
0 Kudos
4 Replies
RobertScheitlin__GISP
MVP Emeritus
srikanthkurukundu
Deactivated User

Hi Robert,

Thanks for the sample, I have noticed a workaround in the sample. But curious to know what does it mean 'The Scene Service does not have a companion FeatureLayer' is there any way to configure companion FeatureLayer? Appreciate any views on this. Thanks

Great Day

Sree

0 Kudos
RalucaNicola1
Esri Contributor

Hi Sree,

If you publish a layer in Pro as a web scene layer then the layer automatically gets a companion Feature Layer. This seems to be your case. You can check if querying works with the getFieldUsageInfo(field) method. 

The sample provides a workaround to this, in case you didn't publish the scene layer in Pro, but exported it to slpk. Then you would do the query on a feature layer that contains information about the scene layer data. The two layers should be linked by a common column, like ObjectID.

Hope this helps,

Raluca

Wade
by
Occasional Contributor

Hi @RalucaNicola1 

The release layer is published successfully and also has Features, but scenelayer:query-not-available appears when using queryFeatures(), Because the ObjectID does not correspond to the ?

 

0 Kudos