def vehicle_position_history_geojson(session, id): """ return geojson of latest positions """ positions = q.position_history(session, id) features = Position.to_geojson_features(positions) ret_val = features_to_json(features) return ret_val
def vehicle_position_history_geojson(session, id): ''' return geojson of latest positions ''' positions = q.position_history(session, id) features = Position.to_geojson_features(positions) ret_val = features_to_json(features) return ret_val
def vehicle_information(session, id): """ return vehicle data as json """ v = q.vehicle_information(session, id) v = v.to_dict() p = q.position_history(session, id) p = Position.to_dict_list(p) v["positions"] = p ret_val = json.dumps(v) return ret_val
def vehicle_information(session, id): ''' return vehicle data as json ''' v = q.vehicle_information(session, id) v = v.to_dict() p = q.position_history(session, id) p = Position.to_dict_list(p) v['positions'] = p ret_val = json.dumps(v) return ret_val