add position view
This commit is contained in:
parent
c178976fcf
commit
674ecde707
@ -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'])
|
||||
}
|
||||
|
||||
|
||||
@ -7,13 +7,14 @@
|
||||
<p class="text-center">Donar</p>
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
<p id="position"></p>
|
||||
<div class="row">
|
||||
{% if locations %}
|
||||
{% for location in locations %}
|
||||
<div class="col-12 p-1">
|
||||
<div class="p-2 border border-dark rounded-3 border border-dark rounded bg-light text-dark">
|
||||
<a class="connection" href="">{{ location.name }}</a>
|
||||
<p class="destination" hidden>{{ location.coords}}</p>
|
||||
<p class="destination" hidden>{{ location.coords }}</p>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
Reference in New Issue
Block a user