link icao to the map

This commit is contained in:
Jakob Ketterl 2023-08-26 21:23:28 +02:00
parent 4a49e485fb
commit a08e3c0fb6
2 changed files with 9 additions and 1 deletions

View file

@ -330,7 +330,7 @@ AdsbMessagePanel.prototype.pushMessage = function(message) {
}
state.el.html(
'<td>' + state.icao + '</td>' +
'<td><a href="map?icao=' + state.icao + '" target="openwebrx-map">' + state.icao + '</a></td>' +
'<td>' + ifDefined(state.identification) + '</td>' +
'<td>' + ifDefined(state.altitude) + '</td>' +
'<td>' + ifDefined(state.groundspeed || state.IAS || state.TAS, Math.round) + '</td>' +

View file

@ -7,6 +7,8 @@ $(function(){
}
var expectedLocator;
if (query.has('locator')) expectedLocator = query.get('locator');
var expectedIcao;
if (query.has('icao')) expectedIcao = query.get('icao');
var protocol = window.location.protocol.match(/https/) ? 'wss' : 'ws';
@ -164,6 +166,12 @@ $(function(){
expectedCallsign = false;
}
if (expectedIcao && expectedIcao === update.source.icao) {
map.panTo(pos);
showMarkerInfoWindow(update.source, pos);
expectedIcao = false;
}
if (infowindow && infowindow.source && shallowEquals(infowindow.source, update.source)) {
showMarkerInfoWindow(infowindow.source, pos);
}