added find nearest coordinate by using mouse click