This commit is contained in:
parent
8ae4307866
commit
ebc27882a9
1 changed files with 3 additions and 3 deletions
|
@ -7,7 +7,7 @@
|
||||||
crossorigin=""></script>
|
crossorigin=""></script>
|
||||||
|
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
#map { height: 180px; }
|
#map { height: 100%; }
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
@ -15,7 +15,7 @@
|
||||||
<div id="map"></div>
|
<div id="map"></div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
var map = L.map('map').setView([51.505, -0.09], 5);
|
var map = L.map('map').setView([51.505, -0.09], 18);
|
||||||
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
||||||
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
|
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
|
||||||
}).addTo(map);
|
}).addTo(map);
|
||||||
|
@ -26,7 +26,7 @@
|
||||||
fetch('/json')
|
fetch('/json')
|
||||||
.then(response => response.json())
|
.then(response => response.json())
|
||||||
.then(data => {
|
.then(data => {
|
||||||
map.setView([data["lat"], data["lon"]], 5);
|
map.setView([data["lat"], data["lon"]], 18);
|
||||||
circle.setLatLng([data["lat"], data["lon"]])
|
circle.setLatLng([data["lat"], data["lon"]])
|
||||||
circle.setRadius(data["acc"])
|
circle.setRadius(data["acc"])
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue