map reroutes based on sorted waypoints