I want to disable 'snapshot mode' in my SceneView. As described and discussed in this Ideas Post, "Fix 4.2x so that initial requests for large layers are faster" and in these Questions (Post 1, Post 2), the feature can really slow down the loading of large MapService layers. For a MapView (2D) the workaround posted in the links is to configure:
'featurelayer-snapshot-disabled':0
But now I need to do that in a SceneView because I seem to be having the same issue there.
Here's a simple CodePen of it working for a MapView.
Here's a copied CodePen of same thing failing for a SceneView.
Although the effects aren't that significant for this sample data above, you can see that in the sceneView you will still get requests with `returnCountTrue` param which are the snapshot feature requests if you open your browser DevTools to the network pane and watch traffic.
Is there a 3D equivalent of 'featurelayer-snapshot-disabled':0? Help!
Solved! Go to Solution.
Unfortunately, currently it is not possible to disable the calls for returnCountOnly for SceneView and there is no other workaround we can suggest you.
We're looking into improving that in the future.
Hi again! We've managed to include the update to honor 'featurelayer-snapshot-disabled':0 in SceneView in the upcoming release of the API (version 4.27). With this, the where1=1 call shouldn't happen anymore.
You can test this fix out before it heads to production – for that, check out the development version of the API, https://js.arcgis.com/next.
Let us know if you have any feedback - and thanks for pointing out this issue with big data sets!
For such datasets, SceneView doesn't use the snapshot mode - it automatically uses tiles instead (as you can see in your app, the data is loaded incrementally). Note that SceneView still uses `returnCountTrue` and the features are counted per tile.
Does this answer your question? If not, could you please describe a bit what you are experiencing and what you expect from the app?
Thanks for your prompt response.
The problem is that these request for the count of features take really long-- as I've described in the linked posts. This prevents the layers from loading in a SceneView the same as it did in our MapView. In 2D, disabling "snapshot mode" allowed those layers to continue to work because these types of requests were no longer made. I would like to do the same in a SceneView.
Perhaps disabling these calls to 'returnCountOnly' is not possible? I know that in a SceneView, there are parameters like maximumNumberOfFeatures that are applied to LayerViews.
More Detail:
When I load the sceneView, I see two different types of calls for returnCountOnly for each layer: there is first one for the total layer count (where1=1). Subsequent to that, there is calls for the count within a specific area (tile). I think it is the first that are the problematic ones.
I will do some sandbox testing to check further. If you can clarify that disabling these calls for returnCountOnly are not able to be disabled for SceneView and perhaps provide a bit of guidance why that would probably answer this question. I might open different ones to explore other ways to deal with this problem as I test more.
Since I can't share our own large MapService layers, I'll probably start by pursuing the question/issue further with ESRI Canada technical support.
Unfortunately, currently it is not possible to disable the calls for returnCountOnly for SceneView and there is no other workaround we can suggest you.
We're looking into improving that in the future.
Hi again! We've managed to include the update to honor 'featurelayer-snapshot-disabled':0 in SceneView in the upcoming release of the API (version 4.27). With this, the where1=1 call shouldn't happen anymore.
You can test this fix out before it heads to production – for that, check out the development version of the API, https://js.arcgis.com/next.
Let us know if you have any feedback - and thanks for pointing out this issue with big data sets!
Thanks for the update. I just tested our app with the next version of the ArcGIS JavaScript API ArcGIS Maps SDK and it works! Thank you for the fix. Look forward to the upcoming release of 4.27.