diff --git a/js/tracker.js b/js/tracker.js index fcbf4bf..dfb4d14 100644 --- a/js/tracker.js +++ b/js/tracker.js @@ -878,6 +878,29 @@ function showLaunchSites() { var popup = new L.popup({ autoClose: false, closeOnClick: false }); marker.bindPopup(popup); launches.addLayer(marker); + var popupLink = "https://docs.google.com/forms/d/e/1FAIpQLSfIbBSQMZOXpNE4VpK4BqUbKDPCWCDgU9QxYgmhh-JD-JGSsQ/viewform?usp=pp_url&entry.796606853=Modify+Existing+Site"; + popupLink += "&entry.749833526=" + key; + if (json[key].hasOwnProperty('station_name')) { + popupLink += "&entry.675505431=" + json[key].station_name.replace(/\s/g, '+'); + } + if (json[key].hasOwnProperty('position')) { + popupLink += "&entry.1613779787=" + json[key].position.reverse().toString(); + } + if (json[key].hasOwnProperty('alt')) { + popupLink += "&entry.753148337=" + json[key].alt; + } + if (json[key].hasOwnProperty('ascent_rate')) { + popupLink += "&entry.509146334=" + json[key]["ascent_rate"]; + } + if (json[key].hasOwnProperty('burst_altitude')) { + popupLink += "&entry.1897602989=" + json[key]["burst_altitude"]; + } + if (json[key].hasOwnProperty('descent_rate')) { + popupLink += "&entry.267462486=" + json[key]["descent_rate"]; + } + if (json[key].hasOwnProperty('notes')) { + popupLink += "&entry.197384117=" + json[key]["notes"].replace(/\s/g, '+'); + } if (json[key].hasOwnProperty('times')) { var popupContent = null; popupContent = "" + json[key].station_name + "

Sondes launched: " + sondesList; @@ -932,14 +955,14 @@ function showLaunchSites() { if (json[key].hasOwnProperty('notes')) { popupContent += "
Notes: " + json[key]["notes"]; } - popupContent += "
Know when this site launches? Contribute here"; + popupContent += "
Know when this site launches? Contribute here"; popupContent += "
"; } else { popupContent = "" + json[key].station_name + "

Sondes launched: " + sondesList; if (json[key].hasOwnProperty('notes')) { popupContent += "
Notes: " + json[key]["notes"]; } - popupContent += "
Know when this site launches? Contribute here"; + popupContent += "
Know when this site launches? Contribute here"; } popup.setContent(popupContent); }