diff --git a/htdocs/map.js b/htdocs/map.js
index 7d98f490..d235e07b 100644
--- a/htdocs/map.js
+++ b/htdocs/map.js
@@ -115,6 +115,7 @@
marker.lastseen = update.lastseen;
marker.mode = update.mode;
marker.band = update.band;
+ marker.comment = update.location.comment;
// TODO the trim should happen on the server side
if (expectedCallsign && expectedCallsign == update.callsign.trim()) {
@@ -283,9 +284,14 @@
if (!infowindow) infowindow = new google.maps.InfoWindow();
var marker = markers[callsign];
var timestring = moment(marker.lastseen).fromNow();
+ var commentString = "";
+ if (marker.comment) {
+ commentString = '
' + marker.comment + '
';
+ }
infowindow.setContent(
'' + callsign + '
' +
- '' + timestring + ' using ' + marker.mode + '
'
+ '' + timestring + ' using ' + marker.mode + '
' +
+ commentString
);
infowindow.open(map, marker);
}
diff --git a/owrx/kiss.py b/owrx/kiss.py
index d153d5bc..bc3300be 100644
--- a/owrx/kiss.py
+++ b/owrx/kiss.py
@@ -91,7 +91,8 @@ class KissClient(object):
logger.debug(data)
if "lat" in data and "lon" in data:
- Map.getSharedInstance().updateLocation(data["source"], LatLngLocation(data["lat"], data["lon"]), "APRS")
+ loc = LatLngLocation(data["lat"], data["lon"], data["comment"] if "comment" in data else None)
+ Map.getSharedInstance().updateLocation(data["source"], loc, "APRS")
return data
def parseAprsData(self, data):
diff --git a/owrx/map.py b/owrx/map.py
index 9908d7af..a07fd0d1 100644
--- a/owrx/map.py
+++ b/owrx/map.py
@@ -92,12 +92,15 @@ class Map(object):
class LatLngLocation(Location):
- def __init__(self, lat: float, lon: float):
+ def __init__(self, lat: float, lon: float, comment = None):
self.lat = lat
self.lon = lon
+ self.comment = comment
def __dict__(self):
- return {"type": "latlon", "lat": self.lat, "lon": self.lon}
+ res = {"type": "latlon", "lat": self.lat, "lon": self.lon}
+ if self.comment is not None: res["comment"] = self.comment
+ return res
class LocatorLocation(Location):