cleaned up nav + map positioning function