adds style switcher for maplibre
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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"
|
||||
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user