adds maplibre for new routes
This commit is contained in:
@@ -347,15 +347,4 @@
|
||||
.leaflet-popup-content {
|
||||
width: max-content !important;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.leaflet-anchor {
|
||||
background-color: #fff;
|
||||
border: 2px solid black;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
border-radius: 50%;
|
||||
-moz-border-radius: 50%;
|
||||
-webkit-border-radius: 50%;
|
||||
text-align: center;
|
||||
}
|
||||
@@ -25,7 +25,10 @@ export function haversineCumulatedDistanceWgs84(path: Position[]): number[] {
|
||||
|
||||
export function smoothElevations(positions: Position[], windowSize: number): Position[] {
|
||||
// Ensure windowSize is valid (at least 1)
|
||||
if (windowSize < 1) throw new Error("Window size must be at least 1.");
|
||||
if (windowSize < 1) {
|
||||
console.warn("Window size must be at least 1.");
|
||||
return positions
|
||||
};
|
||||
|
||||
// Create a new array with smoothed elevations
|
||||
return positions.map((pos, i, arr) => {
|
||||
|
||||
Reference in New Issue
Block a user