umap-project/umap

Databrowser lost possibility to completely hide layer(s)

Closed this issue · 2 comments

Is your feature request related to a problem? Please describe.
I want to disallow a user to change the selection of visible layer(s) but still show the databrowser. In a previous umap version this was possible by hiding the "layers"-control and opening the databrowser via the embed-link. But since databrowser and layersbrowser are now merged, the user can directly show/hide other layers from the databrowser view.

Describe the solution you'd like
With the new implementation I could think of something like adding a parameter availableDatalayers (or similar) to make "hide a datalayer from the caption list" accessible via URL parameter additionally to the layer's option introduced in #1362

Describe alternatives you've considered
The only workaround I could find for now is hiding the databrowser and opening the first item including "next"-button.

Additional context
Maybe it gets more clear with a screenshot: The following map is included in different webpage-versions per year, having only a single layer preselected using datalayers= parameter in the embed URL.
UMap-Link
Website 2023
Image

This needs bit of thinking. uMap already has a lot of parameters, so let's see if we can deal without adding a new one.

One option from the top of my head would be to keep one map to manage your data, and then have one other map per context, using remote data to show only the wanted datalayers.

Yes a new map loading the layer as remote data works fine. Thank you!