Added logic to turn off map tracking when not visible
Added distance to line segment calculation