Wrote the select_from_map function for integrated_viewer