Aded haversine formula and calculates distance bwteen click and target location