Weather information google-maps-api v3

1k Views Asked by At

I have a google maps api , and I have included the weather api as well in that.

<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?v=3&sensor=false&libraries=weather">
    </script>
// Assigning map to its variable
    map = new google.maps.Map(document.getElementById("map-canvas"),
        mapOptions);

    var weatherLayer = new google.maps.weather.WeatherLayer({
        temperatureUnits: google.maps.weather.TemperatureUnit.FAHRENHEIT
    });
    weatherLayer.setMap(map);

Now I just need to display windspeed on click of a marker regarding a place. But I am not able to find any methods exposed for displaying the wind speed.

1

There are 1 best solutions below

0
On

There is no "weather" library or weather API that is part of the Google Maps Javascript API v3. There used to be a weather layer but per the documentation on archive.org from March 18, 2015 it was deprecated in 2014 and turned off last June:

The Weather and Cloud layers allow you to add weather forecasts and cloud imagery to your map.

Note: The Weather and Cloud layers have been deprecated as of June 4, 2014. They will cease functioning on June 4, 2015.