diff --git a/qsomap.py b/qsomap.py index a29b1b8..960854d 100644 --- a/qsomap.py +++ b/qsomap.py @@ -570,7 +570,7 @@ def render(ref_lat, ref_lon, output_stream, adif_stream): .marker_label { fill: blue; - font-size: 2px; + font-size: 8px; font-family: sans-serif; text-anchor: middle; } diff --git a/static/map.js b/static/map.js index ae966f3..434bbd0 100644 --- a/static/map.js +++ b/static/map.js @@ -4,15 +4,12 @@ function update_map(event) document.getElementById("svgcontainer").innerHTML = '
Generating, please wait…
'; - var lat = document.getElementById('lat').value; - var lon = document.getElementById('lon').value; - - request_url = new URL("/render/map.svg", document.URL); - request_url.searchParams.append("lat", lat); - request_url.searchParams.append("lon", lon); + var formdata = new FormData(document.getElementById('mapinfo')); var request = new XMLHttpRequest(); - request.open("GET", request_url); + + request.open("POST", "/render/map.svg", true); + //request.setRequestHeader('Content-type', 'multipart/form-data'); request.addEventListener('load', function(event) { if (request.status >= 200 && request.status < 300) { @@ -31,11 +28,11 @@ function update_map(event) link.innerHTML = "Download this map."; link_container.appendChild(link); // Or append it whereever you want - URL.revokeObjectURL(blobUrl); + //URL.revokeObjectURL(blobUrl); } else { console.warn(request.statusText, request.responseText); } }); - request.send(); + request.send(formdata); } diff --git a/static/style.css b/static/style.css index 6b555bc..5508706 100644 --- a/static/style.css +++ b/static/style.css @@ -31,6 +31,11 @@ div.form * input[type=text] { text-align: right; } +div.form * input[type=file] { + flex: 3; + margin-left: 1em; +} + div.form * input[type=submit] { flex: 1; } diff --git a/views/index.tpl b/views/index.tpl index 8039449..361d617 100644 --- a/views/index.tpl +++ b/views/index.tpl @@ -12,10 +12,11 @@Here you can generate a map in azimuthal-equidistant projection for any point on Earth. You get a map where the specified coordinate is in the center, and all other locations are projected such that locations with the same physical distance from the given coordinate are also the same distance from the center on the map.
+You can optionally upload an ADIF file. All QSOs that have a QTH locator attached are then marked on the map.
The generated output is a Scalable Vector Graphics (SVG) image that can be edited as needed. I recommend Inkscape as an SVG editor.
Please note: It may take a few seconds to generate the map. Please give it some time. The map will appear below the form along with a download link. If you have JavaScript disabled, the map will replace this page.