add position view

This commit is contained in:
Götz 2017-10-17 22:13:08 +02:00
parent c178976fcf
commit 674ecde707
2 changed files with 4 additions and 1 deletions

View File

@ -13,6 +13,7 @@ function getPos() {
navigator.geolocation.getCurrentPosition(function (position) {
lat = position.coords.latitude;
lon = position.coords.longitude;
document.getElementById('position').innerHTML = "Lat:" + pos['lat'] + " Lon: " + pos['lon']
}, function (err) {
}, geo_option)
}
@ -42,6 +43,7 @@ function loadVGNPos() {
document.getElementsByTagName('body')[0].style.visibility = "hidden"
pos = getPos()
console.log(pos)
getVGNCoords(pos['lat'], pos['lon'])
}

View File

@ -7,6 +7,7 @@
<p class="text-center">Donar</p>
{% endblock %}
{% block content %}
<p id="position"></p>
<div class="row">
{% if locations %}
{% for location in locations %}