Liebe Gäste
Wir befinden uns ab Auffahrt (29. Mai 2025) in der Sommersaison und haben täglich geöffnet.
Für detaillierte Informationen und Änderungen konsultieren Sie bitte unsere Webseite.
Wir freuen uns auf Euren Besuch.
Sportliche Grüsse
Ihr Sportbahnen Elm Team
Wetterprognose
Keine Saison!
Wintersportbericht
Schneebericht
100 cm
Schneehöhe
100 cm
0 cm im Ort
Schneezustand
keine Meldung
Letzter Schneefall
16.03.2025
Detaillierte Prognose
`;
}
function buildSnowChart(forecasts) {
let locale = "de";
let snowList = document.createElement('ul');
snowList.classList.add('SnowChart');
for (let i = 0; i < forecasts.length; i++) {
let item = document.createElement('li');
item.setAttribute('data-js-tooltip', 'top');
const tooltipValue = getDayName(forecasts[i].date) + ': ' + forecasts[i].snow_sum_day + ' ' + forecasts[i].unit;
item.setAttribute('data-title', tooltipValue);
item.innerHTML = `
${getDayName(forecasts[i].date, locale)}${forecasts[i].snow_sum_day} ${forecasts[i].unit}
`
snowList.appendChild(item);
}
return snowList.outerHTML;
}
function getDayName(dateStr, locale) {
let date = new Date(dateStr);
return date.toLocaleDateString(locale, {weekday: "short"});
}
const hasMountainWeather = true;
const hasValleyWeather = true;
if (hasMountainWeather) {
loadWeatherData("https:\/\/cdn2.myswitzerland.com\/meteo\/transformed\/resort_5524.json", buildDomElement, document.getElementById('srfSnowChart'));
} else if (!hasMountainWeather && hasValleyWeather) {
loadWeatherData("https:\/\/cdn2.myswitzerland.com\/meteo\/transformed\/resort_452.json", buildDomElement, document.getElementById('srfSnowChart'));
} else {
loadWeatherData("https:\/\/cdn2.myswitzerland.com\/meteo\/transformed\/resort_452.json", buildDomElement, document.getElementById('srfSnowChart'));
}
const snowCheckboxes = document.getElementsByName('snowType');
snowCheckboxes.forEach(cb => {
cb.addEventListener('change', ev => {
if (ev.target.value === 'valley') {
loadWeatherData("https:\/\/cdn2.myswitzerland.com\/meteo\/transformed\/resort_452.json", buildDomElement, document.getElementById('srfSnowChart'));
} else {
loadWeatherData("https:\/\/cdn2.myswitzerland.com\/meteo\/transformed\/resort_5524.json", buildDomElement, document.getElementById('srfSnowChart'));
}
});
});
//]]>