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

Viewport with empty layer ids list shows all layers #2254

Open
rubenthoms opened this issue Sep 20, 2024 · 5 comments
Open

Viewport with empty layer ids list shows all layers #2254

rubenthoms opened this issue Sep 20, 2024 · 5 comments
Assignees
Labels
enhancement New feature or request map-component Issues related to the map component.

Comments

@rubenthoms
Copy link
Collaborator

I would expect a viewport with an empty layer ids list to not show anything.

@rubenthoms rubenthoms added the bug Something isn't working label Sep 20, 2024
@w1nklr
Copy link
Collaborator

w1nklr commented Sep 20, 2024

It is for convenience.
If you display a single view (the usual case), you probably don't want to specify all the displayed layers on one side plus all the corresponding layer ids for the viewport...

@rubenthoms
Copy link
Collaborator Author

rubenthoms commented Sep 20, 2024

@w1nklr I understand the use case. However, in my opinion, sending in an empty list should result in showing no layers, as specified. Why can't layerIds be left undefined if one wants all layers to be displayed?

@rubenthoms rubenthoms added enhancement New feature or request and removed bug Something isn't working labels Sep 20, 2024
@w1nklr
Copy link
Collaborator

w1nklr commented Sep 20, 2024

I don't know. I was not there at the initial design...
I don't really see the use case needed to display nothing.

But if you have such an use case and if you can provide an easy way to display all the layers (and set that as DEFAULT_VIEWS), I don't object to a change.

BTW, this would be closer to Deck.gl approach: https://github.com/visgl/deck.gl/blob/4dd814805121ab70c16ea3b458593ecc92f92f1a/docs/api-reference/core/layer-manager.md?plain=1#L46

@rubenthoms
Copy link
Collaborator Author

We have a component where individual viewports can be added. To each of the latter custom layers can be added later on (in some sort of tree arrangement). When adding a layer to the first viewport, it becomes visible in all (empty) viewports although they should not have any children. We would be glad to have the possibility to temporarily have views without any layers.

@hkfb
Copy link
Collaborator

hkfb commented Sep 23, 2024

Agree, it makes sense to be able to show empty views, especially in the multi-viewport case.

It should be a minor change. Who will fix this (preferably with a story to demonstrate)?

@hkfb hkfb added the map-component Issues related to the map component. label Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request map-component Issues related to the map component.
Projects
None yet
Development

No branches or pull requests

3 participants