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

Fix sharing when using initfile #7270

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

glughi
Copy link
Contributor

@glughi glughi commented Sep 9, 2024

What this PR does

Fixes #7269

Checklist

  • There are unit tests to verify my changes are correct or unit tests aren't applicable (if so, write quick reason why unit tests don't exist)
  • I've updated relevant documentation in doc/.
  • I've updated CHANGES.md with what I changed.
  • I've provided instructions in the PR description on how to test this PR.

@na9da
Copy link
Collaborator

na9da commented Oct 21, 2024

Hi @glughi,

thanks for the PR.

We are keen to know how you use the init file from URL feature.

Internally, we were thinking of introducing some controls around how this feature works, because it is not ideal for all maps to allow others to modify the catalog. So maybe we could restrict it by default or disallow init files from URLs from modifying existing catalog items.

Any insights on your specific use case for this feature could help us decide.

Is there a reason you can't have the init URL be part of your config.json?

Cheers

@glughi
Copy link
Contributor Author

glughi commented Oct 21, 2024

Hi @na9da, we make great use of TerriaJS ability to use different catalogs in addition to the default ones (added through the config.js file), defining them via URL. This way, we don't have just one gigantic catalog, which could be inconvenient for users, but in addition to the standard catalogs, we have some thematic catalogs. For example, the Emilia-Romagna Region has its standard catalog, but it has added one specific for the 2023 flood emergency. Some catalogs are used only by regional technicians and are not available to other users. Working in this way, it becomes necessary to have the ability to share the map without losing a catalog name added by the URL.

@na9da
Copy link
Collaborator

na9da commented Oct 21, 2024

Thanks for sharing your use case @glughi

We do have a type of catalog item called terria-reference which lets you pull items from another catalog. It doesn't let you modify the catalog dynamically, but allows referencing external catalogs without adding init file to the URL. Not sure if it exactly suits your needs though.

@glughi
Copy link
Contributor Author

glughi commented Oct 23, 2024

Hi, we know terria-reference but it is not what we need in this case. Thanks to URL catalog management, we can put links in web pages all using the same instance of Terria but load a catalog rather than another depending on the page's topic and target.
Little examples:
https://mappe.regione.emilia-romagna.it/#emg202305
https://mappe.regione.emilia-romagna.it/#emg202305rilievi
https://mappe.regione.emilia-romagna.it/#emg202409

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

Successfully merging this pull request may close these issues.

Share using initfile
2 participants