Check weather data

This commit is contained in:
2021-09-04 23:04:49 +02:00
parent c04be09c3d
commit 47b199702a
2 changed files with 21 additions and 8 deletions

View File

@@ -624,10 +624,12 @@ function addSpotMessages(aoMessages) {
}
//Weather
$Tooltip.append($('<p>', {'class':'weather', 'title':oSpot.lang(oMsg.weather_cond)})
.addIcon('fa-'+oMsg.weather_icon+' fa-fw fa-lg', true)
.append(oMsg.weather_temp+'°C')
);
if(oMsg.weather_icon) {
$Tooltip.append($('<p>', {'class':'weather', 'title':oSpot.lang(oMsg.weather_cond)})
.addIcon('fa-'+oMsg.weather_icon+' fa-fw fa-lg', true)
.append(oMsg.weather_temp+'°C')
);
}
//Tooltip: Medias
if(oMsg.medias) {
@@ -818,7 +820,7 @@ function getPost(asPost) {
.append($('<p>').addIcon('fa-time', true).append(sAbsTime))
.append(bTimeDiff?$('<p>').addIcon('fa-timezone', true).append(oSpot.lang('local_time', sAbsTimeLocal)):'')
.append($('<a>', {'class':'drill'})
.append($('<span>', {'class':'weather', 'title':oSpot.lang(asPost.weather_cond)}).addIcon('fa-'+asPost.weather_icon, true).append(asPost.weather_temp+'°C'))
.append((!asPost.weather_icon)?'':$('<span>', {'class':'weather', 'title':oSpot.lang(asPost.weather_cond)}).addIcon('fa-'+asPost.weather_icon, true).append(asPost.weather_temp+'°C'))
.append($('<img>', {'class':'staticmap', title: oSpot.lang('click_zoom'), src: getWmtsApiUrl('static', asPost.latitude, asPost.longitude, 13)}))
.append($('<span>', {'class': 'drill-icon fa-stack'})
.addIcon('fa-message fa-stack-2x')