public void findClosestCities()
	{
		System.out.println("Enter the number of closest cities to the current city you would like.");
		input.nextLine();
		int n= input.nextInt();
		while(n<1||n>map.getSize()-1)
		{
			System.out.println("Sorry I think your input was invalid, please try again.");
			System.out.println("Enter the number of closest cities to the current city you would like.");
			n= input.nextInt();
		}
		
		if(map.getCurrentCity()==null)
			map.setCurrentCity((int) (Math.random()*(map.getSize()-1)));
		ArrayList<GPSDistance> distances= new ArrayList<GPSDistance>();
		for(int i=0; i< map.getSize();i++)
		{
			if(map.getCity(i)!=map.getCurrentCity()) //distance formula taken from https://sites.google.com/a/cs.usfca.edu/cs-107-03-2012-spring/tutorials/distancecalculator
			{
				double x= (69.1)*(map.getCity(i).getLatitude()-map.getCurrentCity().getLatitude());
				double y= (69.1)*(map.getCity(i).getLongitude()-map.getCurrentCity().getLongitude())*(Math.cos(map.getCurrentCity().getLatitude()/57.3));
				double distance=Math.sqrt((x*x) + (y*y));
				GPSDistance attachedDistance= new GPSDistance(distance,map.getCity(i));
				distances.add(attachedDistance);
			}
		}
		
		Collections.sort(distances);
		
		System.out.println("Here are your n closest cities by GPS distance: ");
		for(int i=0; i<n; i++)
		{
			int rank=i+1;
			System.out.println("");
			System.out.println(rank+ ". " + distances.get(i).getAttachedCity().getCityName() + ", Distance: " + distances.get(i).getDistance());
			System.out.println("");
		}
	}