Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Show again a layer removed with mapController.removeLayer("nameOfLayer") #799

@AlbertoNoris

Description

@AlbertoNoris

Hi everyone,
I'm trying to find a way to toggle different layers on and off from my Style.

For example if I don't want to show the layer ztl-bergamo
Inked144089280-e1d26f99-45e2-450e-ab47-14e68d71c7d7_LI
I've found out that I can use
mapController?.removeLayer("ztl-bergamo");
which removes completely the layer from the app view but now the problem is that I don't know how to put it back.

So my question is: how can I show again a layer that I removed with mapController?.removeLayer("nameOfLayer").

Thanks in advance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions