Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Remove obsolete code
  • Loading branch information
argilo committed Oct 3, 2024
commit b2430050b5e13fa88dc6c391167a7ac94de4c5ae
6 changes: 0 additions & 6 deletions js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -553,12 +553,6 @@ $(window).ready(function() {
$("#main").removeClass("drag");
});

// confirm dialog when launchnig a native map app with coordinates
//$('#main').on('click', '#launch_mapapp', function() {
// var answer = confirm("Launch your maps app?");
// return answer;
//});

// follow vehicle by clicking on data
$('#main').on('click', '.row .data', function() {
var e = $(this).parent();
Expand Down
6 changes: 3 additions & 3 deletions js/tracker.js
Original file line number Diff line number Diff line change
Expand Up @@ -1804,15 +1804,15 @@ function updateVehicleInfo(vcallsign, newPosition) {

// determine how to link the vehicle coordinates to a native app, if on a mobile device
if(ua.indexOf('iphone') > -1) {
coords_text = '<a id="launch_mapapp" href="maps://?q='+newPosition.gps_lat+','+newPosition.gps_lon+'">' +
coords_text = '<a href="maps://?q='+newPosition.gps_lat+','+newPosition.gps_lon+'">' +
roundNumber(newPosition.gps_lat, 5) + ', ' + roundNumber(newPosition.gps_lon, 5) +'</a>' +
' <i class="icon-location"></i>';
} else if(ua.indexOf('android') > -1) {
coords_text = '<a id="launch_mapapp" href="geo:'+newPosition.gps_lat+','+newPosition.gps_lon+'?q='+newPosition.gps_lat+','+newPosition.gps_lon+'('+vcallsign+')">' +
coords_text = '<a href="geo:'+newPosition.gps_lat+','+newPosition.gps_lon+'?q='+newPosition.gps_lat+','+newPosition.gps_lon+'('+vcallsign+')">' +
roundNumber(newPosition.gps_lat, 5) + ', ' + roundNumber(newPosition.gps_lon, 5) +'</a>' +
' <i class="icon-location"></i>';
} else {
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">' +
coords_text = '<a href="https://www.google.com/maps/search/?api=1&query='+newPosition.gps_lat+','+newPosition.gps_lon+'" target="_blank" rel="noopener noreferrer">' +
roundNumber(newPosition.gps_lat, 5) + ', ' + roundNumber(newPosition.gps_lon, 5) +'</a>' +
' <i class="icon-location"></i>';
}
Expand Down