Actual waypoints

This commit is contained in:
Carl Vargklint 2025-01-07 01:37:36 +01:00
parent 4b9e243600
commit f3a81a7ba5
3 changed files with 27880 additions and 3 deletions

6865
b64 Normal file

File diff suppressed because it is too large Load Diff

21012
dataActual.json Normal file

File diff suppressed because it is too large Load Diff

6
map.js
View File

@ -43,17 +43,17 @@ map.on('click', onMapClick);
var markers = L.markerClusterGroup(); var markers = L.markerClusterGroup();
fetch('./data.json') fetch('./dataActual.json')
.then(response => response.json()) .then(response => response.json())
.then(data => { .then(data => {
// Define waypoint markers // Define waypoint markers
function createMarker(waypoint) { function createMarker(waypoint) {
return L.marker([waypoint.lat, waypoint.lng], { return L.marker([waypoint.latlng.split(",")[0], waypoint.latlng.split(",")[1]], {
radius: 5, radius: 5,
color: '#337aff', color: '#337aff',
fillColor: '#337aff' fillColor: '#337aff'
}).bindPopup(waypoint.desc ?? noDescText); }).bindPopup(waypoint.title ?? noDescText);
}; };
// Create waypoints from server data and add them to the map // Create waypoints from server data and add them to the map