Hi,
I am trying to trigger a click on the Weather Layer of a google maps instance in order to open the weather info window of a city:
//Create the map var options = { center: new google.maps.LatLng(49.265984,-123.127491), }; var map = new google.maps.Map(document.getElementById("map_canvas"), options); //Create the weather layer var weatherLayer = new google.maps.weather.WeatherLayer(); weatherLayer.setMap(map); //Create the event, how? var event = ?; //Trigger the click google.maps.event.trigger(weatherLayer, 'click', event);
The problem is the event that I have to pass to the trigger function. It must be an instance of WeatherMouseEvent. This instance is created by the layer when the user clicks on one of its markers, and I don't know how to generate this event.
Thanks!