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

#clean only works when loading terria, does not work when passing it after terria has already loaded #6701

Open
meh9 opened this issue Feb 17, 2023 · 1 comment · May be fixed by #6705
Open
Labels

Comments

@meh9
Copy link
Contributor

meh9 commented Feb 17, 2023

Loading a a terria map with #clean on the URL clears out the catalogue so that it's empty, that's currently working:

https://nationalmap.gov.au/#clean

We used to be able to pass the #clean param in a running session as well in order to clean the catalogue manually from the URL bar after the fact, e.g. useful if you are experimenting with drag and dropping many init files. This is currently not working.

To reproduce:

  1. Load https://nationalmap.gov.au/
  2. Once the map has loaded and you've clicked through the Welcome message, add /#clean to the end of the URL bar and hit enter.
  3. Expected: the catalogue is cleared out.
  4. Actual: the catalogue is not cleared out.

To see how it is supposed to work, try it instead with #hideWorkbench=1 / #hideWorkbench=0, and you can see that you can enable and disable the workbench from the running session.

@meh9 meh9 added the T-Bug label Feb 17, 2023
@steve9164
Copy link
Member

steve9164 commented Feb 22, 2023

#clean can only prevent loading data from initialisation sources that exist but haven't been loaded yet. In the case of loading Terria with #clean the default initialisation sources are not loaded due to this, so the catalogue is empty.

I propose that #clean be extended to:

  • Reset terria.catalog.group:
    • Effect: An empty catalogue window
  • Reset terria.catalog.group and remove (+GC) models under terria.catalog.group from terria.models, except for models in the workbench:
    • Effect: Empty catalogue window, but workbench remains populated. Could be a powerful tool for slimming down share JSON to just modifications made to workbench items - this would also reset every group to its default (closed) state
  • Reset terria.catalog.group and remove (+GC) models under terria.catalog.group from terria.models and the workbench:
    • Effect: Empty catalogue window and all items added from the catalogue get removed from the workbench. It's possible that some items will remain in the workbench if they were added from code - graphs expanded from feature info might be an example of this

Any of these options will still leave a difference in behaviour between launching a map with #clean and adding #clean to a running map. The difference is that launching with #clean will skip applying configuration stored inside the initialisation file (most of https://docs.terria.io/guide/customizing/initialization-files/#init-file-properties).

steve9164 added a commit that referenced this issue Feb 22, 2023
@steve9164 steve9164 linked a pull request Feb 22, 2023 that will close this issue
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants