pass through comments for display on the map
This commit is contained in:
@ -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):
|
||||
|
@ -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):
|
||||
|
Reference in New Issue
Block a user