Skip to content

Remove legend from control #10

@joffreyj

Description

@joffreyj

I would like to be able to remove the legend from the control. My use case: I have users who will add raster images to the map from db search results. This could be a large number of images.

It would be very helpful to have an option "allowRemove" which would place an (X) on the "htmlLegend" control for the layer which would allow the user to remove the layer from the "l.control.layers" control. I know I can keep track of the ids and allow the user to remove the layer from somewhere else (like in your example) but this seems much more intuitive.

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