def add_coords(self): pt = Point() try: if not self.fd['latmin']: self.fd['latmin'] = 0 pt.set_lat(self.fd['latdeg'], self.fd['latmin'], self.fd['dirlat']) except (InvalidPointError, ValueError) as point_err: self.err['lat'] = str(point_err) try: if not self.fd['lonmin']: self.fd['lonmin'] = 0 pt.set_lon(self.fd['londeg'], self.fd['lonmin'], self.fd['dirlon']) except (InvalidPointError, ValueError) as point_err: self.err['lon'] = str(point_err) self.wpt.position = ndb.GeoPt(pt.lat, pt.lon)
def human_readable_lon(self): return Point.human_readable_lon(self.position.lon)
def human_readable_lat(self): return Point.human_readable_lat(self.position.lat)
def __init__(self): self.centre = Point() self.zoom = self.DEFAULT_ZOOM self.type = "HYBRID"