I am using Google Maps for a weather information display web.
I want to show the cloud condition for past seven days.
I am using overlays to display clouds on my web.
Now my question is can we change image of google.maps.GroundOverlay using javascript?
I believe it is not possible to change the image of a GroundOverlay. The image is set in the constructor and there is currently no setter documented to change it.
What you could try is to create two GroundOverlays with the same coordinates but pass the constructor map:null on one of them so it doesn't show on your map. Then, when you want to replace the image, call setMap(null) on the overlay that is showing--that will hide it--and then call setMap(map) (assuming you set your map to a variable named map) on the overlay that you want to show.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With