Исправил багу отсутствия отображения землетрясений

This commit is contained in:
zakhy 2025-04-04 16:10:43 +07:00
parent 487b1591b9
commit 7fac9bcafd
2 changed files with 11 additions and 7 deletions

View File

@ -193,19 +193,22 @@
})
const drawEarthquakes = async (date) => {
const data = await fetchEarthquakes(date)
seismicManager.clearMarkers();
data.forEach(eq => {
seismicManager.addMarker(eq.id, [eq.lon, eq.lat], eq);
});
}
const timeSlider = new TimeSlider({
sliderId: 'time-slider',
dateDisplayId: 'slider-date',
onChange: async (date) => {
const data = await fetchEarthquakes(date)
seismicManager.clearMarkers();
data.forEach(eq => {
seismicManager.addMarker(eq.id, [eq.lon, eq.lat], eq);
});
await drawEarthquakes(date)
},
formatDate: (date) => `Землетрясения с: ${formatDateToRussian(date)}`
});
const now = new Date();
const startDate = new Date();
startDate.setDate(now.getDate() - {{ seism_days }});
@ -214,6 +217,7 @@
initialDate.setDate(now.getDate() - {{ seism_days_init }});
timeSlider.setRange(startDate, now, initialDate);
await drawEarthquakes(startDate)
const coefficientsManager = new CoefficientsManager({
items: [

View File

@ -42,7 +42,7 @@ INSTALLED_APPS = [
"""Информация о приложении """
SITE_TITLE = "Многофункциональная система безопасности ОГР"
SITE_TITLE_S = "МФСБ ОГР"
APP_VER = "1.0.13.1"
APP_VER = "1.0.13.2"
APP_VEK = "2023 - 2025гг"
APP_COPPIRIGHT = "Многофункциональная система безопасности ОГР"