drag-select range elevation profile

This commit is contained in:
vcoppe
2024-06-12 12:13:30 +02:00
parent 5642129623
commit 9ad16ac294
5 changed files with 121 additions and 10 deletions

View File

@@ -27,7 +27,7 @@ export class StartEndMarkers {
update() {
let tool = get(currentTool);
let statistics = tool === Tool.SCISSORS ? get(slicedGPXStatistics) : get(gpxStatistics);
let statistics = get(slicedGPXStatistics) ?? get(gpxStatistics);
if (statistics.local.points.length > 0 && tool !== Tool.ROUTING) {
this.start.setLngLat(statistics.local.points[0].getCoordinates()).addTo(this.map);
this.end.setLngLat(statistics.local.points[statistics.local.points.length - 1].getCoordinates()).addTo(this.map);