update
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user