Skip to content

Easy style switch for datasets #8566

@gannebamm

Description

@gannebamm

Is your feature request related to a problem? Please describe.
I'm always frustrated using multiple styles in the current map for a dataset. As an editor, I have to click multiple controls to be able to switch the style of a layer:

grafik

grafik

And after I switched the style I have to close everything again to see the legend. The legend itself is not displayed fully and the SLD title and abstract is not shown.

As an anonymous viewer, I am not able to do so since the layer properties tools are not shown in map_view for TOC.

Describe the solution you'd like

Provide a layer style switch dropdown. A working example is part of terria.io map and looks like this:
grafik

The dropdown is filled with associated styles and the legend will get fetched automatically after you pick your new style. The timeline tool is properly defined for the layer itself.

Describe alternatives you've considered

Currently, there are two options to mitigate that user-experience issue:

  1. Using the preview (layer detail view)
  2. Using a map with multiple layers

Both have downsides.

1. Using the preview (layer detail view)
In the layers detail view (not the map view) I am able to switch style with radio buttons:

  1. default
    grafik

  2. switch
    grafik

  3. reflected changes
    grafik

But in that template the map view is small and the focus lies on the metadata of the dataset.

2. Using a map with multiple layers

You can create a map with multiple layers for the same dataset like this:
grafik

But since the TOC is closed by default and the legends of each layer is not displayed as default you as a viewer still have to click multiple times to switch layer styles.
grafik

Furthermore, the map logic in terms of widget configuration will be shaky since a widget is always bound to a layer. With multiple layers using the same dataset (but displaying it differently) there will be errors like #8564

Additional context
The Thünen-Institute will provide funding for this feature request. We want to discuss possible solutions with the community and upstream our solution.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementfeatureA new feature to be added to the codebasefrontendIssues regarding Frontend and stylingjavascriptPull requests that update Javascript code

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions