Actual waypoints
This commit is contained in:
parent
4b9e243600
commit
f3a81a7ba5
File diff suppressed because it is too large
Load Diff
6
map.js
6
map.js
|
@ -43,17 +43,17 @@ map.on('click', onMapClick);
|
|||
var markers = L.markerClusterGroup();
|
||||
|
||||
|
||||
fetch('./data.json')
|
||||
fetch('./dataActual.json')
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
// Define waypoint markers
|
||||
function createMarker(waypoint) {
|
||||
|
||||
return L.marker([waypoint.lat, waypoint.lng], {
|
||||
return L.marker([waypoint.latlng.split(",")[0], waypoint.latlng.split(",")[1]], {
|
||||
radius: 5,
|
||||
color: '#337aff',
|
||||
fillColor: '#337aff'
|
||||
}).bindPopup(waypoint.desc ?? noDescText);
|
||||
}).bindPopup(waypoint.title ?? noDescText);
|
||||
};
|
||||
|
||||
// Create waypoints from server data and add them to the map
|
||||
|
|
Loading…
Reference in New Issue