adapts trailinfopanel map to new design

This commit is contained in:
Christian Beutel
2024-09-13 20:16:41 +02:00
parent c38d415460
commit 4e257d798d
4 changed files with 8 additions and 12 deletions

View File

@@ -139,7 +139,7 @@
closeBtn: false,
followMarker: true,
autofitBounds: true,
imperial: $page.data.settings?.unit == "imperial" ?? false,
imperial: $page.data.settings.unit == "imperial",
reverseCoords: false,
acceleration: false,
slope: true,

View File

@@ -21,7 +21,7 @@
formatElevation,
formatTimeHHMM,
} from "$lib/util/format_util";
import { createMarkerFromWaypoint } from "$lib/util/leaflet_util";
import { createMarkerFromWaypoint, endIcon, startIcon } from "$lib/util/leaflet_util";
import "$lib/vendor/leaflet-elevation/src/index.css";
import type { Icon, Map, Marker } from "leaflet";
import "leaflet.awesome-markers/dist/leaflet.awesome-markers.css";
@@ -92,13 +92,9 @@
parseElements: ["track", "route"] as any,
},
marker_options: {
startIcon: L.AwesomeMarkers.icon({
icon: "circle-half-stroke",
prefix: "fa",
markerColor: "cadetblue",
iconColor: "white",
}) as Icon,
startIcon: startIcon() as any,
startIconUrl: "",
endIcon: endIcon() as any,
endIconUrl: "",
shadowUrl: "",
},