limit user location circle size

This commit is contained in:
steven 2025-05-09 12:38:42 -04:00
parent c3ff893151
commit dda7f39fca

View file

@ -52,7 +52,7 @@ let locationRadius=L.circle([0,0]).addTo(map).bringToBack();
map.locate({watch:true});
map.on("locationfound",e=>{
locationMarker.setLatLng(e.latlng).bindPopup("<b>You</b> at<br>"+new Date().toLocaleTimeString());
locationRadius.setLatLng(e.latlng).setRadius(e.accuracy/2)
if(e.accuracy<100)locationRadius.setLatLng(e.latlng).setRadius(e.accuracy/2)
});
</script>
</body>