Angular JS service that calculates the distance between two sets of coordinates