Hello,
I am working on a Web App where users could remove selected features from their SceneLayer and then save the changes in a new WebScene.
Right now, I have been able to add a filter but it does not save the changes properly. I think I should maybe try to retrieve the objectID of the selected features and work with them but I don't know if it is possible to do something.
Do you have any idea of how I could do it?
Thank you for your help.
Edit: I removed the old code, I've been able to solve my problem, the answer is below
Solved! Go to Solution.
Done. So the definitionExpression works well for what I wanted but does not completely remove the features, it's just an expression associated to the layer (in ArcGIS Online, it creates a custom filter in the layer properties)
Here is the code: GitHub - ArthurGenet/webscene-features-remover
And the Web App hosted on GitHub Pages : Verberg Webscene Features (everything is in dutch but you just need to put a Webscene id and then you can modify it with the tools in the bottom-right and then you can save it, overwrite it or upload a new webscene with the left panel)
Hope it can help some of you.
Have a nice day
Ok I've been able to made it with using a query on geometry and then definitionExpression.
I will share my code when I will have finished
Done. So the definitionExpression works well for what I wanted but does not completely remove the features, it's just an expression associated to the layer (in ArcGIS Online, it creates a custom filter in the layer properties)
Here is the code: GitHub - ArthurGenet/webscene-features-remover
And the Web App hosted on GitHub Pages : Verberg Webscene Features (everything is in dutch but you just need to put a Webscene id and then you can modify it with the tools in the bottom-right and then you can save it, overwrite it or upload a new webscene with the left panel)
Hope it can help some of you.
Have a nice day