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

DocumentHandler: Dissolve the 1:1 relationship between document and map, allow same document being placed in many maps #1305

Closed
jacobwod opened this issue Mar 27, 2023 · 1 comment

Comments

@jacobwod
Copy link
Member

Currently we have a 1:1 relationship, as described in title.

The Admin UI does not allow to do anything that'd allow many maps to have the same documents, either.

But this can be fixed by copy-pasting the relevant portions of layerswitcher and documenthandler configs between map configs.

This works well but there seem to be one issue to resolve: DocumentHandler can contain links that are supposed to change visibility of layers. This is referred to as maplink functionality. The problem with its current implementation is that it seems to be tightly coupled to a specific map config in order to work: the m parameter must be present in the URL, else it will not work.

I'd like to propose a change of this behaviour as it's reasonable to assume that we never want to change the current map when clicking such a link. There's no reason to this tight coupling as far as I can see.

@jacobwod
Copy link
Member Author

OK, I've figured out what's wrong. The current implementation requires all layers specified in the "show layers array" to actually exist in the map. Otherwise, OpenLayers fails silently and no layers visibility's change. This is a bit problematic, so I think I'll add a check and perhaps display a warning (in the console) but I'll let the existing layers to actually be made visible.

@jacobwod jacobwod modified the milestones: 3.x, 3.12 Mar 28, 2023
@jacobwod jacobwod self-assigned this Mar 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant