Open JefNewTech opened 8 years ago
+1 would be very nice to map icons to weatherCode
Could you please comment on this, is this on the roadmap? Or could you tell us if there's a workaround to link any of the existing params to different weather icons?
I made this, just a guide, working in TypeScript... if it helps, just transform XML to JSON and replace emojis with icon id's from https://github.com/erikflowers/weather-icons/blob/master/values/weathericons.xml
// Index of the weather type in the area.
export enum EWeatherCode {
clear = 'Clear',
partlyCloud = 'Partly cloudy',
cloudy = 'Cloudy',
fog = 'Fog',
drizzle = 'Drizzle',
rain = 'Rain',
freezingRain = 'Freezing rain',
snow = 'Snow',
rainShower = 'Rain shower',
snowShower = 'Snow shower',
hail = 'Hail',
thunder = 'Thunder',
}
export const WeatherCodes = {
clear: ['âī¸', 'đ'],
partlyCloud: ['đ¤ī¸', 'â
'],
cloudy: ['â
', 'âī¸'],
fog: ['đĢī¸', 'đ'],
drizzle: ['đĻī¸', 'đ'],
rain: ['đ§ī¸', 'đĻī¸'],
freezingRain: ['âī¸ī¸', 'ī¸đ¨ī¸'],
snow: ['âī¸', 'âī¸'],
rainShower: ['ī¸đ¨ī¸', 'â'],
snowShower: ['âī¸', 'âī¸ī¸'],
hail: ['đĒī¸', 'đŋ'],
thunder: ['âī¸', 'đŠī¸'],
}
export const WeatherKeys = {
'0': WeatherCodes.clear,
'1': WeatherCodes.partlyCloud,
'2': WeatherCodes.cloudy,
'3': WeatherCodes.fog,
'4': WeatherCodes.drizzle,
'5': WeatherCodes.rain,
'6': WeatherCodes.freezingRain,
'7': WeatherCodes.snow,
'8': WeatherCodes.rainShower,
'9': WeatherCodes.snowShower,
'10': WeatherCodes.hail,
'11': WeatherCodes.thunder,
}
Hello, is it possible to add the type of weather as an icon? To display as an icon in your applications? consistent with this https://erikflowers.github.io/weather-icons/ thank you