|
|
@ -4,24 +4,29 @@
|
|
|
|
<div id="home_content">
|
|
|
|
<div id="home_content">
|
|
|
|
<p id="position"></p>
|
|
|
|
<p id="position"></p>
|
|
|
|
<!-- <h1 class="header" id="title">GEO</h1> -->
|
|
|
|
<!-- <h1 class="header" id="title">GEO</h1> -->
|
|
|
|
<button id="store_location" onclick="store_location()">store my position</button>
|
|
|
|
<div id="button_group">
|
|
|
|
<button id="add_text" onclick="add_text()">add message</button>
|
|
|
|
<button id="store_location" onclick="store_location()">store my position</button>
|
|
|
|
<button id="add_audio" onclick="add_audio()">add audio</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>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- HEADING DIRECTION https://stackoverflow.com/questions/46033649/heading-javascript-geolocation -->
|
|
|
|
<!-- 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-->
|
|
|
|
<!-- 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">
|
|
|
|
<div class="locations_popup">
|
|
|
|
{% for location in locations %}
|
|
|
|
{% for location in locations %}
|
|
|
|
<div class="row" id={{location.id}}>
|
|
|
|
<div class="row" id={{location.id}}>
|
|
|
|
|
|
|
|
<div onclick="closeLocation()" class="close">×</div>
|
|
|
|
<div>{{location.longitude}}, {{location.latitude}}</div>
|
|
|
|
<div>{{location.longitude}}, {{location.latitude}}</div>
|
|
|
|
<div>{{location.message if location.loc_type == "message"}}</div>
|
|
|
|
<div>{{location.message if location.loc_type == "message"}}</div>
|
|
|
|
<div>
|
|
|
|
<div>
|
|
|
@ -246,6 +251,13 @@
|
|
|
|
document.getElementById(id).style.display = "block";
|
|
|
|
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) {
|
|
|
|
window.addEventListener('resize', function(event) {
|
|
|
|
updateView()
|
|
|
|
updateView()
|
|
|
|
}, true);
|
|
|
|
}, true);
|
|
|
|