Skip to content

Commit

Permalink
-
Browse files Browse the repository at this point in the history
  • Loading branch information
BB committed Nov 10, 2023
1 parent 45b0893 commit 18bb4d5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
8 changes: 8 additions & 0 deletions elev/elev.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,14 @@ function showPosition(position) {
document.getElementById("osmposition").innerHTML = lat + " " + lon;
}

function getLocationFromPicker() {
prefs = get_prefs();
coords = prefs['picker']['coord'].split(" ");
lat = parseFloat(coords[0]);
lon = parseFloat(coords[1]);
document.getElementById("osmposition").innerHTML = lat + " " + lon;
}

function in_tens(x) {
return parseInt(parseInt(parseFloat(parseInt(x)) / 10)*10);
}
Expand Down
4 changes: 3 additions & 1 deletion elev/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ <h1><a href="..">BBApps</a></h1>
<p>
<button onclick="getLocation()">Get Location</button>
&nbsp;
<button onclick="getLocationFromPicker()">Picker</button>
&nbsp;
Max Elevation:
<select id="max_elev" name="max_elev" method="POST">
<option value= "300">300</option>"
Expand All @@ -35,7 +37,7 @@ <h1><a href="..">BBApps</a></h1>
<option value= "2000">2000</option>"

</select>
&nbsp;
<br/><br/>
Radius:
<select id="radius" name="radius" method="POST">
<option value= "1 km">1</option>"
Expand Down

0 comments on commit 18bb4d5

Please sign in to comment.