Added code so that the html page can figure out where to draw the compass with the least overlap on the course.