def submit_render(): global name global user_coords global js global f_map global x # find user friend_num, user_coords, js = MapGenerator.create_user_marker(name) MapGenerator.add_marker(f_map, user_coords, js, status="POINT") return render_template('submit.html', maximum=str(friend_num), Num=str(friend_num), User="******"+name)
def loading(): global f_map global user_coords x = 0 friends = twitterAPI.json_get_user_friend_info(name, int(number)) for i in friends: x += 1 # find all friends print(x, "of", number) friend_coord, js, status = MapGenerator.create_friend_marker(i) MapGenerator.add_marker(f_map, friend_coord, js, status=status) MapGenerator.add_line(f_map, [user_coords, friend_coord]) f_map.save('templates\\Map.html') htmlEditor.edit_map('templates\\Map.html', htmlEditor.header) return render_template("Map.html", User="******"+name)