diff --git a/map.js b/map.js index 18859e5..43ad5e0 100644 --- a/map.js +++ b/map.js @@ -1,4 +1,7 @@ +var noDescText = "No description available"; + + var shOSM = L.tileLayer('https://mbtiler.nyaaa.net/styles/basic-preview/512/{z}/{x}/{y}.png', { maxZoom: 19, @@ -45,11 +48,12 @@ fetch('./data.json') .then(data => { // Define waypoint markers function createMarker(waypoint) { + return L.marker([waypoint.lat, waypoint.lng], { radius: 5, color: '#337aff', fillColor: '#337aff' - }); + }).bindPopup(waypoint.desc ?? noDescText); }; // Create waypoints from server data and add them to the map