mirror of
https://github.com/lemeow125/StudE-Frontend.git
synced 2024-11-16 22:09:26 +08:00
Fixed distance calculation rounding down to 0 and reduced distance threshhold to 1km
This commit is contained in:
parent
f53056f932
commit
3208c37a86
2 changed files with 2 additions and 2 deletions
|
@ -15,6 +15,6 @@ export default function GetDistanceFromUSTP(location: LocationType) {
|
|||
ustpCoords.latitude,
|
||||
ustpCoords.longitude
|
||||
);
|
||||
dist = Math.round(dist);
|
||||
dist = Math.round(dist * 100) / 100;
|
||||
return dist;
|
||||
}
|
||||
|
|
|
@ -345,7 +345,7 @@ export default function Home() {
|
|||
|
||||
function CustomMap() {
|
||||
if (dist && location) {
|
||||
if (dist <= 2 || map_distance_override) {
|
||||
if (dist <= 1 || map_distance_override) {
|
||||
return (
|
||||
<>
|
||||
<MapView
|
||||
|
|
Loading…
Reference in a new issue