adds style switcher for maplibre

This commit is contained in:
Christian Beutel
2024-11-28 22:01:34 +01:00
parent aea4e26084
commit 0cfacd4c38
6 changed files with 217 additions and 28 deletions

View File

@@ -33,7 +33,7 @@ export async function gpx2trail(gpxString: string, fallbackName?: string) {
for (const wpt of gpx.wpt ?? []) {
const wp = new Waypoint(wpt.$.lat ?? 0, wpt.$.lon ?? 0);
wp.id = cryptoRandomString({ length: 15 });
wp.name = wpt.name
wp.name = wpt.name ?? ""
wp.description = wpt.desc;
trail.expand.waypoints.push(wp);
}

View File

@@ -20,7 +20,7 @@ export function createMarkerFromWaypoint(waypoint: Waypoint, onDragEnd?: (marker
const marker = new FontawesomeMarker({
icon: `fa fa-${waypoint.icon}`,
}, {
draggable: onDragEnd != null,
draggable: onDragEnd !== undefined,
color: "#6b7280"
})