Given a specific entity ID, I want to remove an entity from DynamicDataSource or DynamicEntityLayer. Is that possible?
Solved! Go to Solution.
Hi @FatmaAkdemir ,
Yes indeed, you can call deleteEntityAsync and pass in the ID. It is a protected function, but if you are implementing your own data source you should have access to it.
If you are using the out-of-the-box ArcGISStreamService class, then it won't be possible.
Hi @FatmaAkdemir ,
Yes indeed, you can call deleteEntityAsync and pass in the ID. It is a protected function, but if you are implementing your own data source you should have access to it.
If you are using the out-of-the-box ArcGISStreamService class, then it won't be possible.
Hi @JamesBallard1 ,
Thanks for the answer. What should I do with the return value QFuture?
@FatmaAkdemir we recommend you check for errors in case anything goes wrong.
See the "Handling Errors" section here: https://developers.arcgis.com/qt/cpp/api-reference/working-with-qfuture.html
https://developers.arcgis.com/qt/cpp/api-reference/esri-arcgisruntime-errorexception.html
All tasks can fail, so it is best to recognize when and if that happens so your code can recover (or ignore) accordingly. For example if you pass an invalid ID (doesn't exist, for example), then I assume the task will fail with an error indicating that's what happened.
Thank you very much for the explanation. If there was a function in DynamicEntity like setVisible() or hide() that would be great. Do you have any plans for the next releases regarding this?
When we apply a filter associated with a DataSource on runtime, we need to show some entities and hide some other entities but I could not find necessary functions neither in DynamicEntityDataSource nor in DynamicEntityLayer. After I apply the filter, there is no way to delete previously added observations.
@FatmaAkdemir unfortunately no, no plans for setVisible or hide functionality. That would be similar to a display filter, and no immediate plans for that at the moment.