kopia lustrzana https://github.com/magicbug/Cloudlog
{station locations] GPS Cleaned up Interface
rodzic
0dff9a0e2e
commit
c3cf1c5439
|
@ -64,16 +64,13 @@ function load_was_map() {
|
|||
console.log("'clicked");
|
||||
if (navigator.geolocation) {
|
||||
navigator.geolocation.getCurrentPosition(showPosition);
|
||||
console.log("'got position");
|
||||
} else {
|
||||
console.log('Geolocation is not supported by this browser.');
|
||||
}
|
||||
}
|
||||
|
||||
function showPosition(position) {
|
||||
console.log(position);
|
||||
gridsquare = latLonToGridSquare(position.coords.latitude,position.coords.longitude);
|
||||
console.log(gridsquare);
|
||||
document.getElementById("stationGridsquareInput").value = gridsquare;
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -158,11 +158,16 @@
|
|||
|
||||
<div class="form-group">
|
||||
<label for="stationGridsquareInput">Gridsquare</label>
|
||||
<input type="text" class="form-control" name="gridsquare" id="stationGridsquareInput" aria-describedby="stationGridInputHelp" required>
|
||||
|
||||
<div class="input-group mb-3 w-50">
|
||||
<input type="text" class="form-control" name="gridsquare" id="stationGridsquareInput" aria-describedby="stationGridInputHelp" required>
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-outline-secondary" onclick="getLocation()"><i class="fas fa-compass"></i> Get Gridsquare</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<small id="stationGridInputHelp" class="form-text text-muted">Station grid square. For example: IO87IP</small>
|
||||
<small id="stationGridInputHelp" class="form-text text-muted">If you are located on a grid line, enter multiple grid squares separated with commas. For example: IO77,IO78,IO87,IO88.</small>
|
||||
|
||||
<button onclick="getLocation()">Find Gridsquare</button>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
|
|
Ładowanie…
Reference in New Issue