I was having some problem when trying to find the minimum distance and from the minimum distance, I then plot two circles onto the map. Currently I am getting 15, 3, 15, 14 as DIST but I could not get the minDist as it is not printed out. Any ideas? Thanks in advance. Answer You probably want: and initialize minDistance