Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
2023-03-07 14:04:04 +01:00
4 changed files with 16 additions and 5 deletions

View File

@@ -25,7 +25,7 @@ export class DetailComponent implements OnInit {
test = {
name: 'SPAI',
cordinates: "46.165262,8.791225",
cordinates: "46.15187077044123, 8.799829438699243",
description: "Lorem ipsum"
}
@@ -35,7 +35,8 @@ export class DetailComponent implements OnInit {
}
showNav = true;
distance = 0;
distance: number | undefined;
displayedDistance = 0;
getLocation() {
console.log("get location");
@@ -61,6 +62,11 @@ export class DetailComponent implements OnInit {
if (this.showNav) {
this.distance = this.getDistanceBetweenCoordinates(lat1, lon1, +lat2, +lon2);
console.log(this.distance);
if (this.distance == 0) {
this.showNav = false;
this.displayedDistance = Math.round(this.distance * 100) / 100;
}
if (this.distance < 0.05) {
this.showNav = false;
clearInterval(intervalID);