Does anyone know if there is a way to refresh the Weather Layer in Google Maps javascript API?
To give a little background, we have an application which stays open in the browser and updates some information on the map every few minutes. We let the users open the weather layer on the map, but the weather only loads once, when the layer is created. After a while, it gets outdated and we'd like it to stay current. I've tried everything from recreating the layer and setting the map to null, then back to the current map, but temperatures never reload.
Any suggestions would really help. Thanks!
Update: Some code snippets to show how I tried reloading the weather layer.
//Global variable for the weather layer
var weatherLayer = null;
//When user clicks the weather button on the map
weatherLayer = new google.maps.weather.WeatherLayer({..});
weatherLayer.setMap(myMap);
//When I try to refresh the layer
weatherLayer.setMap(null); //This successfully hides it
weatherLayer = new google.maps.weather.WeatherLayer({...});
weatherLayer.setMap(myMap); //This doesnt' reload the data.
//Tried resetting the options before and after recreating the layer to see if that would help, but it didn't
weatherLayer.setOptions({..new option set..});