Originally posted by **ComradeMashkov** August 27, 2024
Hey there! Recently I tried to add layers during runtime and I did it successfully:
```cpp
auto layer = rocky::MBTilesImageLayer::create();
layer->setURI("data\\world\\world_white.mbtiles");
app_.mapNode->map->layers().add(layer);
```
It works just fine but I was wondering: am I able to remove layers during runtime? I tried it too but it didn't work (mostly because of lack of experience from my side). I tried naive solution:
```cpp
app_.mapNode->map->layers().remove(layer);
```
And nothing happens. I guess we should tell map node or application to redraw layers or to update LayerCollection somehow but I don't know how exactly... I would appreciate it so much if you give me a clear explanation about this moment :)
Discussed in https://github.com/pelicanmapping/rocky/discussions/53