Closed BohdanKorinnyi closed 6 years ago
Hi @BohdanKorinnyi!
Could you provide me a codepen with an example?
Thank you!
Hi @BohdanKorinnyi!
You can remove sources and layers with:
$scope.glSources = []; // Sources
$scope.glLayers = []; // Layers
But remember, you have to remove sources and layers to clean all correctly.
Tell me if it worked!
@Naimikan Thank you! It works for me!
Hi @Naimikan ! I try to remove all layers from from the map but in some reason it doesn't work.
I have the following sources
In order to remove all source I do:
After that I try to add a source with id that was in
$scope.glSource
before removing I receive an error because the souce already exists with such id.How can I remove source/layer correctly?