Skip to content

Layer control instead of drop-down #138

@do-me

Description

@do-me

I think it might be good to introduce a proper "layer control". This is what it's called in GIS but the concept is the same here. Let me explain:

Image

Currently you can toggle between:

  • "points"
  • "density"

However, this is misleading as "density" also displays points.
Also, if you select a text column, labels will show always and you cannot turn them off.

Proposal:

Instead of the dropdown, what GIS uses for this is a simple multiselect (ignore Canada Base section):

Image

Image source: https://github.com/drecchia/maplibre-layer-control

This would solve a few problems:

  • the naming would be fixed, as the density setting would then only control density and not points
  • users could hide the points in density view
  • I'd propose an additional option "labels", where users can turn them on or off and - as we already discussed in Add labels for higher zoom levels #14 - potentially add a slider here to set the label density on various zoom levels.

As a side note: you could also include the base layer in this control, i.e. the black/white background plane and add a simple color picker if users prefer a differently colored background. But this might be out of scope for you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions