Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Datasources might not be added / removed correctly from Cesium and Leaflet maps in some rare cases #6344

Closed
na9da opened this issue Jun 15, 2022 · 0 comments · Fixed by #6639
Assignees
Labels

Comments

@na9da
Copy link
Collaborator

na9da commented Jun 15, 2022

After Cesiums' switch to real Promise api from when.js, the DataSourceCollection.add() api is fully asynchronous all the time. Previously, when passing a concrete DataSource as argument, the add() used to happen instantly without any delay. But after the switch, add() is always deferred.

This has some consequence to our code for adding datasources to cesium/leaflet maps. Our implementation (incorrectly) depended on this "instant" add effect to work correctly.

  • The subsequent call to raiseToTop() might silently delete a datasource (because calling raiseToTop on an item that does not exist has an undefined behavior)
  • Datasources might get addded multiple times to the DataSourceCollection

This is rare and difficult to repro by adding items from catalog, but might happen when programatically adding data sources.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
1 participant