I am creating a feature layer from feature collection by fetching data from external query service and adding to the map.
As per my project need I have to re-fetch the data and add on the map after every 5 seconds. To achieve this I am requesting data using external query and after getting the response data(in JSON format) I am removing the previous feature layer and adding a new one.
Issues: While adding the new layer on the map it takes a little time (~1 sec) to reflect the feature on the map which looks like a flicker effect.
Question: Is there a way to load/update the data without removing feature layer and without flicker effect (only added/removed features should reflect on the map )