I’m loading a small number (~4) of GeoJson dataSources, each with a small number (~2) of features. When I remove a single dataSource, the dataSource’s features are still visible in the viewer. The viewer’s dataSources collection contains the correct number of remaining dataSources. Only when I call viewer.resize() or when all of the dataSources have been removed does the viewer update properly, showing no features. This happens whether or not I set the destroy parameter to true:
//nothing changes in the viewer until the last dataSource has been removed
viewer.resize(); //this causes the viewer to update correctly
viewer.dataSources.removeAll(); //this works as expected and as in Sandcastle
When I call viewer.resize() after removing a single dataSource, it is removed from the viewer. Am I missing something, or is this the intended behavior?