Describe the bug
I need to hide and show the CurrentLocationLayer. When the map loads CurrentLocationLayer is shown. When a button is clicked the layer visibility should be toggled on and off. Currently when the CurrentLocationLayer gets toggled off for the first time it is not possible to show it again (it does not appear anymore). See the example code below.
Describe the bug I need to hide and show the CurrentLocationLayer. When the map loads CurrentLocationLayer is shown. When a button is clicked the layer visibility should be toggled on and off. Currently when the CurrentLocationLayer gets toggled off for the first time it is not possible to show it again (it does not appear anymore). See the example code below.
To Reproduce
Expected behavior The CurrentLocationLayer visibility should be toggled on and off.
Smartphone (please complete the following information):
Additional context Maybe I should try to show and hide the layer in some other way, I am not sure.