Skip to content

Commit 5fc5836

Browse files
author
MrARM
authored
Add a link to google maps on browsers (#258)
1 parent bdd3299 commit 5fc5836

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

js/tracker.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1582,7 +1582,9 @@ function updateVehicleInfo(vcallsign, newPosition) {
15821582
roundNumber(newPosition.gps_lat, 5) + ', ' + roundNumber(newPosition.gps_lon, 5) +'</a>' +
15831583
' <i class="icon-location"></i>';
15841584
} else {
1585-
coords_text = roundNumber(newPosition.gps_lat, 5) + ', ' + roundNumber(newPosition.gps_lon, 5);
1585+
coords_text = '<a id="launch_mapapp" href="https://www.google.com/maps/search/?api=1&query='+newPosition.gps_lat+','+newPosition.gps_lon+'" target="_blank" rel="noopener noreferrer">' +
1586+
roundNumber(newPosition.gps_lat, 5) + ', ' + roundNumber(newPosition.gps_lon, 5) +'</a>' +
1587+
' <i class="icon-location"></i>';
15861588
}
15871589

15881590
// format altitude strings

0 commit comments

Comments
 (0)