diff --git a/tasks/enduro-trails/prototype/static/app.js b/tasks/enduro-trails/prototype/static/app.js index 5843daf..6251311 100644 --- a/tasks/enduro-trails/prototype/static/app.js +++ b/tasks/enduro-trails/prototype/static/app.js @@ -1423,8 +1423,8 @@ async function buildScenicRoute() { const geojson = { type: 'Feature', geometry: r.geometry, properties: {} }; const sid = `scenic-src-${i}`; const lid = `scenic-line-${i}`; - if (map.getSource(sid)) map.removeSource(sid); if (map.getLayer(lid)) map.removeLayer(lid); + if (map.getSource(sid)) map.removeSource(sid); map.addSource(sid, { type: 'geojson', data: geojson }); map.addLayer({ id: lid, type: 'line', source: sid, @@ -1446,8 +1446,10 @@ async function buildScenicRoute() { const time = formatDuration(r.duration_s); const dirt = r.stats?.dirt_total_pct || '?'; const pois = (r.scenic_pois || []).map(p => { - const icon = {'natural=water':'💧','tourism=viewpoint':'👁','historic=ruins':'🏚','natural=peak':'🔺','natural=cave_entrance':'🕳','ford=yes':'🌊'}[p.type] || '📍'; - return `
${icon} ${p.name || p.type}
`; + const SCENIC_LABELS = {'natural=water':'💧 Озёро','tourism=viewpoint':'👁 Смотровая','historic=ruins':'🏚 Руины','natural=peak':'🔺 Вершина','natural=cave_entrance':'🕳 Пещера','ford=yes':'🌊 Брод'}; + const label = SCENIC_LABELS[p.type] || '📍 ' + p.type; + const name = p.name ? ` — ${p.name}` : ''; + return `
${label}${name}
`; }).join(''); return `
diff --git a/tasks/enduro-trails/prototype/static/index.html b/tasks/enduro-trails/prototype/static/index.html index c8b5687..4ae6c8b 100644 --- a/tasks/enduro-trails/prototype/static/index.html +++ b/tasks/enduro-trails/prototype/static/index.html @@ -174,8 +174,9 @@ - +