This commit is contained in:
Your Name
2025-02-24 17:00:12 +01:00
parent 7e8bf1294c
commit e3607143a1
5 changed files with 198 additions and 38 deletions

View File

@@ -184,8 +184,8 @@ function loadConfigAndUpdateMap() {
//add a circle
var circle = L.circle([device_latitude_raw, device_longitude_raw], {
color: 'blue',
fillColor: '#f03',
fillOpacity: 0.5,
fillColor: '#3399FF',
fillOpacity: 0.3,
radius: 500
}).addTo(map);
@@ -195,13 +195,13 @@ function loadConfigAndUpdateMap() {
console.log("Marker moved to:", newLatLng.lat, newLatLng.lng);
// Update the input fields with new values
document.getElementById("device_latitude").value = newLatLng.lat;
document.getElementById("device_longitude").value = newLatLng.lng;
document.getElementById("device_latitude_precision").value = newLatLng.lat;
document.getElementById("device_longitude_precision").value = newLatLng.lng;
// Call update function to save new values
update_config('latitude', newLatLng.lat);
update_config('latitude_precision', newLatLng.lat);
setTimeout(() => { update_config('longitude', newLatLng.lng); }, 750);
setTimeout(() => { update_config('longitude_precision', newLatLng.lng); }, 750);
});
} else {