def retrieve_route_from_google(self): route = geo.directions(self.waypoint_list) points = [] for waypoint in route: points += [ (x,y) # YAY!PEP!8!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! for y,x in waypoint['overview_polyline']['points']]#!!!!!! self.route = LineString(points)#!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
def retrieve_route_from_google(self): route = geo.directions(self.waypoint_list) points = [] for waypoint in route: flip_me = waypoint['overview_polyline']['points'] points += [(x, y) for y, x in flip_me] self.route = LineString(points)