0.0.1 • Published 9 years ago
leaflet-weathericonslayer v0.0.1
Leaflet.WeatherIconsLayer
Current weather icons layer for Leaflet, based on OpenWeatherMap API. Partial rework of outdated sample script from OpenWeatherMap site.
As an OpenWeatherMap derivative work, licenced with Creative Commons BY-SA 2.0. OpenWeatherMap Terms of service apply.
Usage
map.addLayer(new L.WeatherIconsLayer());
Also, several options available. Here are the defaults shown:
map.addLayer(new L.WeatherIconsLayer({
apiKey: undefined, // OpenWeatherMap API key
host: 'http://openweathermap.org/', // API host
i18n: {...}, // object with translation strings, see code
units: 'metric', // or 'imperial'; temperature scale
temperatureDigits: 0, // how many decimal digits in temperature
maxAgeSeconds: 24*60*60, // 24h; how long the weather data is considered worth showing
}));
0.0.1
9 years ago