예제 #1
0
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
예제 #2
0
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
예제 #3
0
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
예제 #4
0
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