= {
grade: t("elevation.grade"),
highway: t("elevation.highway"),
maxspeed: t("elevation.maxspeed"),
smoothness: t("elevation.smoothness"),
tracktype: t("elevation.tracktype"),
cycleway: t("elevation.cycleway"),
bikeroute: t("elevation.bikeroute"),
};
const title = titles[colorMode] ?? t("elevation.profile");
const link = osmLinks[colorMode];
return link ? (
{title}
) : (
{title}
);
})()}
{colorMode === "grade" && (<>
{"<3%"}
{"<6%"}
{"<10%"}
{"<15%"}
{"15%+"}
>)}
{colorMode === "elevation" && (<>
{Math.round(Math.min(...points.map(p => p.elevation)))}m
{Math.round(Math.max(...points.map(p => p.elevation)))}m
>)}
{colorMode === "surface" && surfaces.length > 0 && (<>
{[...new Set(surfaces)].slice(0, 6).map((s) => (
{s}
))}
{[...new Set(surfaces)].length > 6 && +{[...new Set(surfaces)].length - 6}}
>)}
{colorMode === "highway" && highways.length > 0 && (<>
{[...new Set(highways)].slice(0, 6).map((h) => (
{h}
))}
{[...new Set(highways)].length > 6 && +{[...new Set(highways)].length - 6}}
>)}
{colorMode === "maxspeed" && (<>
{"≤30"}
{"≤50"}
{"≤70"}
{"≤100"}
{"100+"}
>)}
{colorMode === "smoothness" && smoothnesses.length > 0 && (<>
{[...new Set(smoothnesses)].slice(0, 6).map((s) => (
{s}
))}
{[...new Set(smoothnesses)].length > 6 && +{[...new Set(smoothnesses)].length - 6}}
>)}
{colorMode === "tracktype" && (<>
grade1
grade2
grade3
grade4
grade5
>)}
{colorMode === "cycleway" && cycleways.length > 0 && (<>
{[...new Set(cycleways)].slice(0, 6).map((c) => (
{c}
))}
{[...new Set(cycleways)].length > 6 && +{[...new Set(cycleways)].length - 6}}
>)}
{colorMode === "bikeroute" && (<>
International
National
Regional
Local
None
>)}