public void loadMap() 
	{
		System.out.println("Loading mygraph.bin");
		try {
			FileInputStream file = new FileInputStream("mygraph.bin");
			ObjectInputStream in = new ObjectInputStream(file);
			ArrayList<Node> cities= new ArrayList<Node>();
			Node city = (Node) in.readObject();
			boolean load = true;
			while (load) {
				cities.add(city);
				try {
					city= (Node) in.readObject();
				} catch (EOFException e) {
					in.close();
					file.close();
					load = false;
				}
			}
			map.resetGraph();
			for(Node i: cities)
			{
				map.addCity(i);
			}
			if (map.getSize() > 0) {
				System.out.println("Your map was loaded from mygraph.bin");
			}
		} catch (IOException e) {
			e.printStackTrace();
		} catch (ClassNotFoundException e) {
			e.printStackTrace();
		}

	}