|
|
|
@ -4,24 +4,29 @@
|
|
|
|
|
<div id="home_content">
|
|
|
|
|
<p id="position"></p>
|
|
|
|
|
<!-- <h1 class="header" id="title">GEO</h1> -->
|
|
|
|
|
<button id="store_location" onclick="store_location()">store my position</button>
|
|
|
|
|
<button id="add_text" onclick="add_text()">add message</button>
|
|
|
|
|
<button id="add_audio" onclick="add_audio()">add audio</button>
|
|
|
|
|
<div id="button_group">
|
|
|
|
|
<button id="store_location" onclick="store_location()">store my position</button>
|
|
|
|
|
<button id="add_text" onclick="add_text()">add message</button>
|
|
|
|
|
<button id="add_audio" onclick="add_audio()">add audio</button>
|
|
|
|
|
|
|
|
|
|
<select id="viewSelector" onchange="changeViewSelect()" >
|
|
|
|
|
<option>Choose view</option>
|
|
|
|
|
<option value="all">all nodes</option>
|
|
|
|
|
<option value="closest">closest</option>
|
|
|
|
|
</select>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- HEADING DIRECTION https://stackoverflow.com/questions/46033649/heading-javascript-geolocation -->
|
|
|
|
|
<!-- COMPASS CROSS DEVICE https://stackoverflow.com/questions/16048514/can-i-use-javascript-to-get-the-compass-heading-for-ios-and-android-->
|
|
|
|
|
|
|
|
|
|
<select id="viewSelector" onchange="changeViewSelect()" >
|
|
|
|
|
<option>---Choose view---</option>
|
|
|
|
|
<option value="all">all nodes</option>
|
|
|
|
|
<option value="closest">closest</option>
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="locations_popup">
|
|
|
|
|
{% for location in locations %}
|
|
|
|
|
<div class="row" id={{location.id}}>
|
|
|
|
|
<div onclick="closeLocation()" class="close">×</div>
|
|
|
|
|
<div>{{location.longitude}}, {{location.latitude}}</div>
|
|
|
|
|
<div>{{location.message if location.loc_type == "message"}}</div>
|
|
|
|
|
<div>
|
|
|
|
@ -246,6 +251,13 @@
|
|
|
|
|
document.getElementById(id).style.display = "block";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function closeLocation(){
|
|
|
|
|
var divsToHide = document.getElementsByClassName("row"); //divsToHide is an array
|
|
|
|
|
for(var i = 0; i < divsToHide.length; i++){
|
|
|
|
|
divsToHide[i].style.display = "none"; // depending on what you're doing
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
window.addEventListener('resize', function(event) {
|
|
|
|
|
updateView()
|
|
|
|
|
}, true);
|
|
|
|
|