Stuff
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Kekskurse 2022-01-16 13:14:34 +01:00
parent c825ccbb0e
commit 6de086824b
Signed by: kekskurse
GPG Key ID: 728ACCB59341E7E4
1 changed files with 3 additions and 5 deletions

View File

@ -15,7 +15,7 @@
<div id="map"></div>
Last Update: <span id="update"></span>
<a href="/activate">Es gibt einen Notfall, zeige mir den standort an, eine sms mit einer benachrichtung wird gesendet</a>
<a href="/activate">Es gibt einen Notfall, zeige mir den Standort, eine SMS wird verschickt</a>
<script>
var map = L.map('map').setView([52.0, 13.0], 1);
@ -27,11 +27,9 @@ Last Update: <span id="update"></span>
marker = L.marker([52.0, 13.0]).addTo(map)
function update() {
setTimeout("update()", 5000)
fetch('/json')
.then(response => {
response.json()
setTimeout("update()", 5000)
})
.then(response => response.json())
.then(data => {
map.setView([data["lat"], data["lon"]], 18);
circle.setLatLng([data["lat"], data["lon"]])