---
### Google Map Layer Visibility Issue
**Previous Version (1.19):**
In version 1.19, there were no issues.
**Current Version (1.21):**
However, in version 1.21, changing the `layer.visible` property of the Google map is not working.
**Details:**
I am using `<layer url='googlemap.js' />` from Google Map version 1.21. I toggle between the Google map and my custom image map. When switching maps, I use `set()` to change both `layer.visible` and `layer.alpha`.
The custom image map works fine, but after updating to version 1.21, the Google map disappears and does not display properly.
**Problem:**
After extensive investigation, I discovered the issue. The Google map layer's visibility is not updating correctly even though the `visible` value changes. In other words, even if the map layer's `visible` property is `true`, it does not display but still exists.
**Solution:**
Instead of changing both `layer.visible` and `layer.alpha`, only change `layer.alpha`. Ensure that the layer's `autoalpha` property is set to `true`.
**Note:**
Although I find `autoalpha` convenient, it can cause bugs, such as disappearing hotspots in krpano version 1.19. However, in version 1.21, I had to use `autoalpha` to fix the Google map layer disappearance issue.
---