Add calculate distance between logic in Controller.