limit user location circle size
This commit is contained in:
parent
c3ff893151
commit
dda7f39fca
1 changed files with 1 additions and 1 deletions
|
@ -52,7 +52,7 @@ let locationRadius=L.circle([0,0]).addTo(map).bringToBack();
|
||||||
map.locate({watch:true});
|
map.locate({watch:true});
|
||||||
map.on("locationfound",e=>{
|
map.on("locationfound",e=>{
|
||||||
locationMarker.setLatLng(e.latlng).bindPopup("<b>You</b> at<br>"+new Date().toLocaleTimeString());
|
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>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue