move ysf metadata parsing to server; improve map pin behavior

This commit is contained in:
Jakob Ketterl
2021-01-17 19:21:13 +01:00
parent c59c5b76d8
commit 3246e5ab3a
2 changed files with 21 additions and 16 deletions

View File

@ -137,14 +137,13 @@
marker.band = update.band;
marker.comment = update.location.comment;
// TODO the trim should happen on the server side
if (expectedCallsign && expectedCallsign == update.callsign.trim()) {
if (expectedCallsign && expectedCallsign == update.callsign) {
map.panTo(pos);
showMarkerInfoWindow(update.callsign, pos);
expectedCallsign = false;
}
if (infowindow && infowindow.callsign && infowindow.callsign == update.callsign.trim()) {
if (infowindow && infowindow.callsign && infowindow.callsign == update.callsign) {
showMarkerInfoWindow(infowindow.callsign, pos);
}
break;
@ -319,6 +318,8 @@
delete infowindow.callsign;
});
}
delete infowindow.locator;
delete infowindow.callsign;
return infowindow;
}